Make stuff work with npm
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { insertAtCursor } from "@plugos/plugos-silverbullet-syscall/editor";
|
||||
import { insertAtCursor } from "@silverbulletmd/plugos-silverbullet-syscall/editor";
|
||||
|
||||
const dateMatchRegex = /(\d{4}\-\d{2}\-\d{2})/g;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { IndexTreeEvent } from "@silverbulletmd/web/app_event";
|
||||
import {
|
||||
batchSet,
|
||||
scanPrefixGlobal,
|
||||
} from "@plugos/plugos-silverbullet-syscall/index";
|
||||
} from "@silverbulletmd/plugos-silverbullet-syscall/index";
|
||||
import {
|
||||
collectNodesOfType,
|
||||
ParseTree,
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
getText,
|
||||
insertAtPos,
|
||||
replaceRange,
|
||||
} from "@plugos/plugos-silverbullet-syscall/editor";
|
||||
} from "@silverbulletmd/plugos-silverbullet-syscall/editor";
|
||||
|
||||
export async function toggleH1() {
|
||||
await togglePrefix("# ");
|
||||
|
||||
@@ -4,8 +4,8 @@ import {
|
||||
getText,
|
||||
navigate as navigateTo,
|
||||
openUrl,
|
||||
} from "@plugos/plugos-silverbullet-syscall/editor";
|
||||
import { parseMarkdown } from "@plugos/plugos-silverbullet-syscall/markdown";
|
||||
} from "@silverbulletmd/plugos-silverbullet-syscall/editor";
|
||||
import { parseMarkdown } from "@silverbulletmd/plugos-silverbullet-syscall/markdown";
|
||||
import { nodeAtPos, ParseTree } from "@silverbulletmd/common/tree";
|
||||
|
||||
const materializedQueryPrefix = /<!--\s*#query\s+/;
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
clearPageIndexForPage,
|
||||
scanPrefixGlobal,
|
||||
set,
|
||||
} from "@plugos/plugos-silverbullet-syscall/index";
|
||||
} from "@silverbulletmd/plugos-silverbullet-syscall/index";
|
||||
import {
|
||||
flashNotification,
|
||||
getCurrentPage,
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
matchBefore,
|
||||
navigate,
|
||||
prompt,
|
||||
} from "@plugos/plugos-silverbullet-syscall/editor";
|
||||
} from "@silverbulletmd/plugos-silverbullet-syscall/editor";
|
||||
|
||||
import { dispatch } from "@plugos/plugos-syscall/event";
|
||||
import {
|
||||
@@ -21,9 +21,9 @@ import {
|
||||
listPages,
|
||||
readPage,
|
||||
writePage,
|
||||
} from "@plugos/plugos-silverbullet-syscall/space";
|
||||
import { invokeFunction } from "@plugos/plugos-silverbullet-syscall/system";
|
||||
import { parseMarkdown } from "@plugos/plugos-silverbullet-syscall/markdown";
|
||||
} from "@silverbulletmd/plugos-silverbullet-syscall/space";
|
||||
import { invokeFunction } from "@silverbulletmd/plugos-silverbullet-syscall/system";
|
||||
import { parseMarkdown } from "@silverbulletmd/plugos-silverbullet-syscall/markdown";
|
||||
import {
|
||||
addParentPointers,
|
||||
collectNodesMatching,
|
||||
|
||||
@@ -2,13 +2,13 @@ import {
|
||||
listPages,
|
||||
readPage,
|
||||
writePage,
|
||||
} from "@plugos/plugos-silverbullet-syscall/space";
|
||||
} from "@silverbulletmd/plugos-silverbullet-syscall/space";
|
||||
import {
|
||||
filterBox,
|
||||
navigate,
|
||||
prompt,
|
||||
} from "@plugos/plugos-silverbullet-syscall/editor";
|
||||
import { parseMarkdown } from "@plugos/plugos-silverbullet-syscall/markdown";
|
||||
} from "@silverbulletmd/plugos-silverbullet-syscall/editor";
|
||||
import { parseMarkdown } from "@silverbulletmd/plugos-silverbullet-syscall/markdown";
|
||||
import { extractMeta } from "../query/data";
|
||||
import { renderToText } from "@silverbulletmd/common/tree";
|
||||
import { niceDate } from "./dates";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as clientStore from "@plugos/plugos-silverbullet-syscall/clientStore";
|
||||
import * as clientStore from "@silverbulletmd/plugos-silverbullet-syscall/clientStore";
|
||||
|
||||
export async function toggleMode() {
|
||||
let currentValue = !!(await clientStore.get("enableDraftMode"));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// @ts-ignore
|
||||
import emojis from "./emoji.json";
|
||||
import { matchBefore } from "@plugos/plugos-silverbullet-syscall/editor";
|
||||
import { matchBefore } from "@silverbulletmd/plugos-silverbullet-syscall/editor";
|
||||
|
||||
const emojiMatcher = /\(([^\)]+)\)\s+(.+)$/;
|
||||
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
import { readPage, writePage } from "@plugos/plugos-silverbullet-syscall/space";
|
||||
import { invokeFunction } from "@plugos/plugos-silverbullet-syscall/system";
|
||||
import {
|
||||
readPage,
|
||||
writePage,
|
||||
} from "@silverbulletmd/plugos-silverbullet-syscall/space";
|
||||
import { invokeFunction } from "@silverbulletmd/plugos-silverbullet-syscall/system";
|
||||
import {
|
||||
getCurrentPage,
|
||||
getText,
|
||||
} from "@plugos/plugos-silverbullet-syscall/editor";
|
||||
} from "@silverbulletmd/plugos-silverbullet-syscall/editor";
|
||||
import { cleanMarkdown } from "../markdown/util";
|
||||
import { parseMarkdown } from "@plugos/plugos-silverbullet-syscall/markdown";
|
||||
import { parseMarkdown } from "@silverbulletmd/plugos-silverbullet-syscall/markdown";
|
||||
import { extractMeta } from "../query/data";
|
||||
|
||||
type GhostConfig = {
|
||||
|
||||
@@ -2,8 +2,8 @@ import { run } from "@plugos/plugos-syscall/shell";
|
||||
import {
|
||||
flashNotification,
|
||||
prompt,
|
||||
} from "@plugos/plugos-silverbullet-syscall/editor";
|
||||
import { invokeFunction } from "@plugos/plugos-silverbullet-syscall/system";
|
||||
} from "@silverbulletmd/plugos-silverbullet-syscall/editor";
|
||||
import { invokeFunction } from "@silverbulletmd/plugos-silverbullet-syscall/system";
|
||||
|
||||
export async function commit(message?: string) {
|
||||
if (!message) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { hideRhs } from "@plugos/plugos-silverbullet-syscall/editor";
|
||||
import { invokeFunction } from "@plugos/plugos-silverbullet-syscall/system";
|
||||
import * as clientStore from "@plugos/plugos-silverbullet-syscall/clientStore";
|
||||
import { hideRhs } from "@silverbulletmd/plugos-silverbullet-syscall/editor";
|
||||
import { invokeFunction } from "@silverbulletmd/plugos-silverbullet-syscall/system";
|
||||
import * as clientStore from "@silverbulletmd/plugos-silverbullet-syscall/clientStore";
|
||||
|
||||
export async function togglePreview() {
|
||||
let currentValue = !!(await clientStore.get("enableMarkdownPreview"));
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import MarkdownIt from "markdown-it";
|
||||
import { getText, showRhs } from "@plugos/plugos-silverbullet-syscall/editor";
|
||||
import * as clientStore from "@plugos/plugos-silverbullet-syscall/clientStore";
|
||||
import {
|
||||
getText,
|
||||
showRhs,
|
||||
} from "@silverbulletmd/plugos-silverbullet-syscall/editor";
|
||||
import * as clientStore from "@silverbulletmd/plugos-silverbullet-syscall/clientStore";
|
||||
import { cleanMarkdown } from "./util";
|
||||
|
||||
const css = `
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
renderToText,
|
||||
replaceNodesMatching,
|
||||
} from "@silverbulletmd/common/tree";
|
||||
import { parseMarkdown } from "@plugos/plugos-silverbullet-syscall/markdown";
|
||||
import { parseMarkdown } from "@silverbulletmd/plugos-silverbullet-syscall/markdown";
|
||||
|
||||
export function encodePageUrl(name: string): string {
|
||||
return name.replaceAll(" ", "_");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Client4 } from "@mattermost/client";
|
||||
import { applyQuery, QueryProviderEvent } from "../query/engine";
|
||||
import { readPage } from "@plugos/plugos-silverbullet-syscall/space";
|
||||
import { parseMarkdown } from "@plugos/plugos-silverbullet-syscall/markdown";
|
||||
import { readPage } from "@silverbulletmd/plugos-silverbullet-syscall/space";
|
||||
import { parseMarkdown } from "@silverbulletmd/plugos-silverbullet-syscall/markdown";
|
||||
import { extractMeta } from "../query/data";
|
||||
import { niceDate } from "../core/dates";
|
||||
import { Post } from "@mattermost/types/lib/posts";
|
||||
|
||||
@@ -1,11 +1,19 @@
|
||||
{
|
||||
"name": "@silverbulletmd/plugs",
|
||||
"version": "1.0.0",
|
||||
"author": {
|
||||
"name": "Zef Hemel",
|
||||
"email": "zef@zef.me"
|
||||
},
|
||||
"version": "0.0.1",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"generate": "lezer-generator query/query.grammar -o query/parse-query.js",
|
||||
"watch": "plugos-bundle -w --dist dist --exclude @lezer/lr yaml -- */*.plug.yaml",
|
||||
"build": "plugos-bundle --dist dist --exclude @lezer/lr yaml -- */*.plug.yaml"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"@jest/globals": "^27.5.1",
|
||||
"@lezer/generator": "^0.15.4",
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
getCursor,
|
||||
insertAtCursor,
|
||||
moveCursor,
|
||||
} from "@plugos/plugos-silverbullet-syscall/editor";
|
||||
} from "@silverbulletmd/plugos-silverbullet-syscall/editor";
|
||||
|
||||
export async function insertQuery() {
|
||||
let cursorPos = await getCursor();
|
||||
|
||||
@@ -5,7 +5,7 @@ import type { IndexTreeEvent } from "@silverbulletmd/web/app_event";
|
||||
import {
|
||||
batchSet,
|
||||
scanPrefixGlobal,
|
||||
} from "@plugos/plugos-silverbullet-syscall";
|
||||
} from "@silverbulletmd/plugos-silverbullet-syscall";
|
||||
import {
|
||||
collectNodesOfType,
|
||||
findNodeOfType,
|
||||
|
||||
@@ -4,16 +4,19 @@ import {
|
||||
getText,
|
||||
reloadPage,
|
||||
save,
|
||||
} from "@plugos/plugos-silverbullet-syscall/editor";
|
||||
} from "@silverbulletmd/plugos-silverbullet-syscall/editor";
|
||||
|
||||
import { readPage, writePage } from "@plugos/plugos-silverbullet-syscall/space";
|
||||
import { invokeFunction } from "@plugos/plugos-silverbullet-syscall/system";
|
||||
import {
|
||||
readPage,
|
||||
writePage,
|
||||
} from "@silverbulletmd/plugos-silverbullet-syscall/space";
|
||||
import { invokeFunction } from "@silverbulletmd/plugos-silverbullet-syscall/system";
|
||||
import { parseQuery } from "./engine";
|
||||
import { replaceTemplateVars } from "../core/template";
|
||||
import { queryRegex, removeQueries } from "./util";
|
||||
import { dispatch } from "@plugos/plugos-syscall/event";
|
||||
import { replaceAsync } from "../lib/util";
|
||||
import { parseMarkdown } from "@plugos/plugos-silverbullet-syscall/markdown";
|
||||
import { parseMarkdown } from "@silverbulletmd/plugos-silverbullet-syscall/markdown";
|
||||
|
||||
export async function updateMaterializedQueriesCommand() {
|
||||
const currentPage = await getCurrentPage();
|
||||
|
||||
@@ -3,15 +3,18 @@ import type { ClickEvent, IndexTreeEvent } from "@silverbulletmd/web/app_event";
|
||||
import {
|
||||
batchSet,
|
||||
scanPrefixGlobal,
|
||||
} from "@plugos/plugos-silverbullet-syscall/index";
|
||||
import { readPage, writePage } from "@plugos/plugos-silverbullet-syscall/space";
|
||||
import { parseMarkdown } from "@plugos/plugos-silverbullet-syscall/markdown";
|
||||
} from "@silverbulletmd/plugos-silverbullet-syscall/index";
|
||||
import {
|
||||
readPage,
|
||||
writePage,
|
||||
} from "@silverbulletmd/plugos-silverbullet-syscall/space";
|
||||
import { parseMarkdown } from "@silverbulletmd/plugos-silverbullet-syscall/markdown";
|
||||
import {
|
||||
dispatch,
|
||||
filterBox,
|
||||
getCursor,
|
||||
getText,
|
||||
} from "@plugos/plugos-silverbullet-syscall/editor";
|
||||
} from "@silverbulletmd/plugos-silverbullet-syscall/editor";
|
||||
import {
|
||||
addParentPointers,
|
||||
collectNodesMatching,
|
||||
|
||||
Reference in New Issue
Block a user