@dxos/plugin-markdown 0.6.12-main.c974201 → 0.6.12-main.f9d0246
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/{DocumentEditor-FAXQRX37.mjs → DocumentEditor-JZI4663Q.mjs} +3 -3
- package/dist/lib/browser/{chunk-R6CSLNWW.mjs → chunk-N7FS4CK2.mjs} +1 -1
- package/dist/lib/browser/{chunk-R6CSLNWW.mjs.map → chunk-N7FS4CK2.mjs.map} +1 -1
- package/dist/lib/browser/{chunk-JDTH4A4I.mjs → chunk-QIO7ZONH.mjs} +16 -18
- package/dist/lib/browser/chunk-QIO7ZONH.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/types/index.mjs +1 -1
- package/dist/lib/node/{DocumentEditor-YVZTTY5L.cjs → DocumentEditor-QPH26VQZ.cjs} +7 -7
- package/dist/lib/node/{DocumentEditor-YVZTTY5L.cjs.map → DocumentEditor-QPH26VQZ.cjs.map} +2 -2
- package/dist/lib/node/{chunk-OEWBZFBF.cjs → chunk-KDXONMFH.cjs} +21 -23
- package/dist/lib/node/chunk-KDXONMFH.cjs.map +7 -0
- package/dist/lib/node/{chunk-MCA5BBJR.cjs → chunk-RVNU7MRZ.cjs} +4 -4
- package/dist/lib/node/{chunk-MCA5BBJR.cjs.map → chunk-RVNU7MRZ.cjs.map} +1 -1
- package/dist/lib/node/index.cjs +30 -30
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/types/index.cjs +4 -4
- package/dist/lib/node/types/index.cjs.map +1 -1
- package/dist/lib/node-esm/{DocumentEditor-JBVVPEYE.mjs → DocumentEditor-6F5ONTIO.mjs} +3 -3
- package/dist/lib/node-esm/{chunk-W525OVFX.mjs → chunk-3CHPA7Y7.mjs} +1 -1
- package/dist/lib/node-esm/{chunk-W525OVFX.mjs.map → chunk-3CHPA7Y7.mjs.map} +1 -1
- package/dist/lib/node-esm/{chunk-UG4MIBCA.mjs → chunk-NZ4H6J5H.mjs} +16 -18
- package/dist/lib/node-esm/chunk-NZ4H6J5H.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/types/index.mjs +1 -1
- package/dist/types/src/components/DocumentEditor.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +4 -4
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/package.json +29 -29
- package/src/components/DocumentEditor.tsx +22 -19
- package/src/types/types.ts +4 -3
- package/dist/lib/browser/chunk-JDTH4A4I.mjs.map +0 -7
- package/dist/lib/node/chunk-OEWBZFBF.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-UG4MIBCA.mjs.map +0 -7
- /package/dist/lib/browser/{DocumentEditor-FAXQRX37.mjs.map → DocumentEditor-JZI4663Q.mjs.map} +0 -0
- /package/dist/lib/node-esm/{DocumentEditor-JBVVPEYE.mjs.map → DocumentEditor-6F5ONTIO.mjs.map} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DocumentEditor_default
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-QIO7ZONH.mjs";
|
|
4
|
+
import "./chunk-N7FS4CK2.mjs";
|
|
5
5
|
import "./chunk-354DCID5.mjs";
|
|
6
6
|
import "./chunk-AVGUYNPR.mjs";
|
|
7
7
|
import "./chunk-2SJN46PA.mjs";
|
|
8
8
|
export {
|
|
9
9
|
DocumentEditor_default as default
|
|
10
10
|
};
|
|
11
|
-
//# sourceMappingURL=DocumentEditor-
|
|
11
|
+
//# sourceMappingURL=DocumentEditor-JZI4663Q.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/types/document.ts", "../../../src/types/types.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { ref, S, TypedObject } from '@dxos/echo-schema';\nimport { ThreadType } from '@dxos/plugin-space/types';\n\nexport class TextType extends TypedObject({ typename: 'dxos.org/type/Text', version: '0.1.0' })({\n content: S.String,\n}) {}\n\nexport class DocumentType extends TypedObject({ typename: 'dxos.org/type/Document', version: '0.1.0' })({\n name: S.optional(S.String),\n fallbackName: S.optional(S.String),\n content: ref(TextType),\n threads: S.mutable(S.Array(ref(ThreadType))),\n}) {}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport type {\n GraphBuilderProvides,\n GraphSerializerProvides,\n IntentResolverProvides,\n MetadataRecordsProvides,\n SettingsProvides,\n SurfaceProvides,\n TranslationsProvides,\n} from '@dxos/app-framework';\nimport { type SchemaProvides } from '@dxos/plugin-client';\nimport { type SpaceInitProvides } from '@dxos/plugin-space';\nimport { type Extension, type EditorInputMode, type EditorViewMode } from '@dxos/react-ui-editor';\n\nimport { type DocumentType } from './document';\nimport { MARKDOWN_PLUGIN } from '../meta';\n\nconst MARKDOWN_ACTION = `${MARKDOWN_PLUGIN}/action`;\n\nexport enum MarkdownAction {\n CREATE = `${MARKDOWN_ACTION}/create`,\n SET_VIEW_MODE = `${MARKDOWN_ACTION}/set-view-mode`,\n}\n\nexport type MarkdownProperties = Record<string, any>;\n\nexport type
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { ref, S, TypedObject } from '@dxos/echo-schema';\nimport { ThreadType } from '@dxos/plugin-space/types';\n\nexport class TextType extends TypedObject({ typename: 'dxos.org/type/Text', version: '0.1.0' })({\n content: S.String,\n}) {}\n\nexport class DocumentType extends TypedObject({ typename: 'dxos.org/type/Document', version: '0.1.0' })({\n name: S.optional(S.String),\n fallbackName: S.optional(S.String),\n content: ref(TextType),\n threads: S.mutable(S.Array(ref(ThreadType))),\n}) {}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport type {\n GraphBuilderProvides,\n GraphSerializerProvides,\n IntentResolverProvides,\n MetadataRecordsProvides,\n SettingsProvides,\n SurfaceProvides,\n TranslationsProvides,\n} from '@dxos/app-framework';\nimport { type SchemaProvides } from '@dxos/plugin-client';\nimport { type SpaceInitProvides } from '@dxos/plugin-space';\nimport { type Extension, type EditorInputMode, type EditorViewMode } from '@dxos/react-ui-editor';\n\nimport { type DocumentType } from './document';\nimport { MARKDOWN_PLUGIN } from '../meta';\n\nconst MARKDOWN_ACTION = `${MARKDOWN_PLUGIN}/action`;\n\nexport enum MarkdownAction {\n CREATE = `${MARKDOWN_ACTION}/create`,\n SET_VIEW_MODE = `${MARKDOWN_ACTION}/set-view-mode`,\n}\n\nexport type MarkdownProperties = Record<string, any>;\n\nexport type MarkdownExtensionProvider = (props: { document?: DocumentType }) => Extension | undefined;\n\nexport type OnChange = (text: string) => void;\n\nexport type MarkdownExtensionProvides = {\n // TODO(burdon): Rename.\n markdown: {\n extensions: MarkdownExtensionProvider;\n };\n};\n\n// TODO(wittjosiah): Factor out to graph plugin?\ntype StackProvides = {\n stack: {\n creators?: Record<string, any>[];\n };\n};\n\nexport type MarkdownPluginState = {\n // Codemirror extensions provided by other plugins.\n extensionProviders: NonNullable<MarkdownExtensionProvider>[];\n\n // TODO(burdon): Extend view mode per document to include scroll position, etc.\n // View mode per document.\n viewMode: Record<string, EditorViewMode>;\n};\n\nexport type MarkdownSettingsProps = {\n defaultViewMode: EditorViewMode;\n editorInputMode?: EditorInputMode;\n experimental?: boolean;\n debug?: boolean;\n toolbar?: boolean;\n typewriter?: string;\n // TODO(burdon): Per document settings.\n numberedHeadings?: boolean;\n folding?: boolean;\n};\n\n// TODO(Zan): Move this to the plugin-space plugin or another common location when we implement comments in sheets.\ntype ThreadProvides<T> = {\n thread: {\n predicate: (obj: any) => obj is T;\n createSort: (obj: T) => (anchorA: string | undefined, anchorB: string | undefined) => number;\n };\n};\n\nexport type MarkdownPluginProvides = SurfaceProvides &\n IntentResolverProvides &\n GraphBuilderProvides &\n GraphSerializerProvides &\n MetadataRecordsProvides &\n SettingsProvides<MarkdownSettingsProps> &\n TranslationsProvides &\n SchemaProvides &\n SpaceInitProvides &\n StackProvides &\n ThreadProvides<DocumentType>;\n"],
|
|
5
5
|
"mappings": ";;;;;AAIA,SAASA,KAAKC,GAAGC,mBAAmB;AACpC,SAASC,kBAAkB;AAEpB,IAAMC,WAAN,cAAuBC,YAAY;EAAEC,UAAU;EAAsBC,SAAS;AAAQ,CAAA,EAAG;EAC9FC,SAASC,EAAEC;AACb,CAAA,EAAA;AAAI;AAEG,IAAMC,eAAN,cAA2BN,YAAY;EAAEC,UAAU;EAA0BC,SAAS;AAAQ,CAAA,EAAG;EACtGK,MAAMH,EAAEI,SAASJ,EAAEC,MAAM;EACzBI,cAAcL,EAAEI,SAASJ,EAAEC,MAAM;EACjCF,SAASO,IAAIX,QAAAA;EACbY,SAASP,EAAEQ,QAAQR,EAAES,MAAMH,IAAII,UAAAA,CAAAA,CAAAA;AACjC,CAAA,EAAA;AAAI;;;ACIJ,IAAMC,kBAAkB,GAAGC,eAAAA;;UAEfC,iBAAAA;8CACD,GAAGF,eAAAA,SAAwB,IAAA;qDACpB,GAAGA,eAAAA,gBAA+B,IAAA;GAFxCE,mBAAAA,iBAAAA,CAAAA,EAAAA;",
|
|
6
6
|
"names": ["ref", "S", "TypedObject", "ThreadType", "TextType", "TypedObject", "typename", "version", "content", "S", "String", "DocumentType", "name", "optional", "fallbackName", "ref", "threads", "mutable", "Array", "ThreadType", "MARKDOWN_ACTION", "MARKDOWN_PLUGIN", "MarkdownAction"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DocumentType,
|
|
3
3
|
TextType
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-N7FS4CK2.mjs";
|
|
5
5
|
import {
|
|
6
6
|
createBaseExtensions
|
|
7
7
|
} from "./chunk-354DCID5.mjs";
|
|
@@ -58,14 +58,12 @@ var DocumentEditor = ({ document: doc, extensionProviders = [], viewMode, settin
|
|
|
58
58
|
const space = getSpace(doc);
|
|
59
59
|
const identity = useIdentity();
|
|
60
60
|
const dispatch = useIntentDispatcher();
|
|
61
|
-
const baseExtensions = useMemo(() => {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
});
|
|
68
|
-
}, [
|
|
61
|
+
const baseExtensions = useMemo(() => createBaseExtensions({
|
|
62
|
+
viewMode,
|
|
63
|
+
settings,
|
|
64
|
+
document: doc,
|
|
65
|
+
dispatch
|
|
66
|
+
}), [
|
|
69
67
|
doc,
|
|
70
68
|
viewMode,
|
|
71
69
|
dispatch,
|
|
@@ -73,12 +71,12 @@ var DocumentEditor = ({ document: doc, extensionProviders = [], viewMode, settin
|
|
|
73
71
|
settings.folding,
|
|
74
72
|
settings.numberedHeadings
|
|
75
73
|
]);
|
|
76
|
-
const
|
|
77
|
-
const
|
|
74
|
+
const pluginExtensions = useMemo(() => extensionProviders.reduce((acc, provider) => {
|
|
75
|
+
const extension = typeof provider === "function" ? provider({
|
|
78
76
|
document: doc
|
|
79
77
|
}) : provider;
|
|
80
|
-
if (
|
|
81
|
-
acc.push(
|
|
78
|
+
if (extension) {
|
|
79
|
+
acc.push(extension);
|
|
82
80
|
}
|
|
83
81
|
return acc;
|
|
84
82
|
}, []), [
|
|
@@ -100,14 +98,14 @@ var DocumentEditor = ({ document: doc, extensionProviders = [], viewMode, settin
|
|
|
100
98
|
setFallbackName(doc, text);
|
|
101
99
|
}
|
|
102
100
|
}),
|
|
103
|
-
|
|
104
|
-
|
|
101
|
+
baseExtensions,
|
|
102
|
+
pluginExtensions
|
|
105
103
|
], [
|
|
104
|
+
baseExtensions,
|
|
105
|
+
pluginExtensions,
|
|
106
106
|
doc,
|
|
107
107
|
doc.content,
|
|
108
108
|
space,
|
|
109
|
-
baseExtensions,
|
|
110
|
-
providerExtensions,
|
|
111
109
|
identity
|
|
112
110
|
]);
|
|
113
111
|
const initialValue = useMemo(() => doc.content?.content, [
|
|
@@ -163,4 +161,4 @@ export {
|
|
|
163
161
|
serializer,
|
|
164
162
|
DocumentEditor_default
|
|
165
163
|
};
|
|
166
|
-
//# sourceMappingURL=chunk-
|
|
164
|
+
//# sourceMappingURL=chunk-QIO7ZONH.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/DocumentEditor.tsx", "../../../src/util.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useEffect, useMemo } from 'react';\n\nimport { useResolvePlugin, parseFileManagerPlugin, useIntentDispatcher } from '@dxos/app-framework';\nimport { createDocAccessor, fullyQualifiedId, getSpace } from '@dxos/react-client/echo';\nimport { useIdentity } from '@dxos/react-client/halo';\nimport {\n createDataExtensions,\n listener,\n localStorageStateStoreAdapter,\n state,\n type Extension,\n type EditorSelectionState,\n} from '@dxos/react-ui-editor';\n\nimport MarkdownEditor, { type MarkdownEditorProps } from './MarkdownEditor';\nimport { createBaseExtensions } from '../extensions';\nimport { type DocumentType, type MarkdownPluginState, type MarkdownSettingsProps } from '../types';\nimport { getFallbackName, setFallbackName } from '../util';\n\ntype DocumentEditorProps = {\n document: DocumentType;\n settings: MarkdownSettingsProps;\n} & Omit<MarkdownEditorProps, 'id' | 'inputMode' | 'toolbar' | 'extensions'> &\n Pick<MarkdownPluginState, 'extensionProviders'>;\n\n/**\n * Editor for a `DocumentType`.\n */\nconst DocumentEditor = ({\n document: doc,\n extensionProviders = [],\n viewMode,\n settings,\n ...props\n}: DocumentEditorProps) => {\n const space = getSpace(doc);\n const identity = useIdentity();\n const dispatch = useIntentDispatcher();\n\n // TODO(wittjosiah): Autocomplete is not working and this query is causing performance issues.\n // TODO(burdon): Unsubscribe.\n // const query = space?.db.query(Filter.schema(DocumentType));\n // query?.subscribe();\n const baseExtensions = useMemo(\n () =>\n createBaseExtensions({\n viewMode,\n settings,\n document: doc,\n dispatch,\n // query,\n }),\n [doc, viewMode, dispatch, settings, settings.folding, settings.numberedHeadings],\n );\n\n const pluginExtensions = useMemo(\n () =>\n extensionProviders.reduce((acc: Extension[], provider) => {\n const extension = typeof provider === 'function' ? provider({ document: doc }) : provider;\n if (extension) {\n acc.push(extension);\n }\n return acc;\n }, []),\n [extensionProviders],\n );\n\n const extensions = useMemo(\n () => [\n // NOTE: Data extensions must be first so that automerge is updated before other extensions compute their state.\n createDataExtensions({\n id: doc.id,\n text: doc.content && createDocAccessor(doc.content, ['content']),\n space,\n identity,\n }),\n state(localStorageStateStoreAdapter),\n listener({\n onChange: (text) => {\n setFallbackName(doc, text);\n },\n }),\n baseExtensions,\n pluginExtensions,\n ],\n [baseExtensions, pluginExtensions, doc, doc.content, space, identity],\n );\n\n const initialValue = useMemo(() => doc.content?.content, [doc.content]);\n\n // Migrate gradually to `fallbackName`.\n useEffect(() => {\n if (!doc.fallbackName && doc.content?.content) {\n doc.fallbackName = getFallbackName(doc.content.content);\n }\n }, [doc, doc.content]);\n\n // Restore last selection and scroll point.\n const id = fullyQualifiedId(doc);\n const { scrollTo, selection } = useMemo<EditorSelectionState>(\n () => localStorageStateStoreAdapter.getState(id) ?? {},\n [doc],\n );\n\n const fileManagerPlugin = useResolvePlugin(parseFileManagerPlugin);\n const handleFileUpload = useMemo(() => {\n if (space === undefined) {\n return undefined;\n }\n\n if (fileManagerPlugin?.provides.file.upload === undefined) {\n return undefined;\n }\n\n return async (file: File) => {\n return fileManagerPlugin?.provides?.file?.upload?.(file, space);\n };\n }, [fileManagerPlugin, space]);\n\n return (\n <MarkdownEditor\n id={id}\n initialValue={initialValue}\n extensions={extensions}\n scrollTo={scrollTo}\n selection={selection}\n onFileUpload={handleFileUpload}\n inputMode={settings.editorInputMode}\n toolbar={settings.toolbar}\n viewMode={viewMode}\n {...props}\n />\n );\n};\n\nexport default DocumentEditor;\n\nexport type DocumentEditor = typeof DocumentEditor;\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { debounce } from '@dxos/async';\nimport { type TypedObjectSerializer } from '@dxos/plugin-space/types';\nimport { create, createEchoObject, isEchoObject, loadObjectReferences } from '@dxos/react-client/echo';\n\nimport { DocumentType, type MarkdownProperties, type MarkdownExtensionProvides, TextType } from './types';\n\nexport const isMarkdownProperties = (data: unknown): data is MarkdownProperties =>\n isEchoObject(data)\n ? true\n : data && typeof data === 'object'\n ? 'title' in data && typeof data.title === 'string'\n : false;\n\ntype MarkdownExtensionPlugin = Plugin<MarkdownExtensionProvides>;\n\nexport const markdownExtensionPlugins = (plugins: Plugin[]): MarkdownExtensionPlugin[] => {\n return (plugins as MarkdownExtensionPlugin[]).filter((plugin) => Boolean(plugin.provides?.markdown));\n};\n\nconst nonTitleChars = /[^\\w ]/g;\n\nexport const getFallbackName = (content: string) => {\n return content.substring(0, 31).split('\\n')[0].replaceAll(nonTitleChars, '').trim();\n};\n\nexport const setFallbackName = debounce((doc: DocumentType, content: string) => {\n const name = getFallbackName(content);\n if (doc.fallbackName !== name) {\n doc.fallbackName = name;\n }\n}, 200);\n\nexport const serializer: TypedObjectSerializer<DocumentType> = {\n serialize: async ({ object }): Promise<string> => {\n const content = await loadObjectReferences(object, (doc) => doc.content);\n return JSON.stringify({ name: object.name, content: content.content });\n },\n\n deserialize: async ({ content: serialized }) => {\n const { name, content } = JSON.parse(serialized);\n return createEchoObject(create(DocumentType, { name, content: create(TextType, { content }), threads: [] }));\n },\n};\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["React", "useEffect", "useMemo", "useResolvePlugin", "parseFileManagerPlugin", "useIntentDispatcher", "createDocAccessor", "fullyQualifiedId", "getSpace", "useIdentity", "createDataExtensions", "listener", "localStorageStateStoreAdapter", "state", "debounce", "create", "createEchoObject", "isEchoObject", "loadObjectReferences", "isMarkdownProperties", "data", "isEchoObject", "title", "markdownExtensionPlugins", "plugins", "filter", "plugin", "Boolean", "provides", "markdown", "nonTitleChars", "getFallbackName", "content", "substring", "split", "replaceAll", "trim", "setFallbackName", "debounce", "doc", "name", "fallbackName", "serializer", "serialize", "object", "loadObjectReferences", "JSON", "stringify", "deserialize", "serialized", "parse", "createEchoObject", "create", "DocumentType", "TextType", "threads", "DocumentEditor", "document", "doc", "extensionProviders", "viewMode", "settings", "props", "space", "getSpace", "identity", "useIdentity", "dispatch", "useIntentDispatcher", "baseExtensions", "useMemo", "createBaseExtensions", "folding", "numberedHeadings", "pluginExtensions", "reduce", "acc", "provider", "extension", "push", "extensions", "createDataExtensions", "id", "text", "content", "createDocAccessor", "state", "localStorageStateStoreAdapter", "listener", "onChange", "setFallbackName", "initialValue", "useEffect", "fallbackName", "getFallbackName", "fullyQualifiedId", "scrollTo", "selection", "getState", "fileManagerPlugin", "useResolvePlugin", "parseFileManagerPlugin", "handleFileUpload", "undefined", "provides", "file", "upload", "MarkdownEditor", "onFileUpload", "inputMode", "editorInputMode", "toolbar"]
|
|
7
|
+
}
|
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
markdownExtensionPlugins,
|
|
6
6
|
serializer,
|
|
7
7
|
setFallbackName
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-QIO7ZONH.mjs";
|
|
9
9
|
import {
|
|
10
10
|
DocumentType,
|
|
11
11
|
MarkdownAction,
|
|
12
12
|
TextType
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-N7FS4CK2.mjs";
|
|
14
14
|
import "./chunk-354DCID5.mjs";
|
|
15
15
|
import "./chunk-AVGUYNPR.mjs";
|
|
16
16
|
import {
|
|
@@ -115,7 +115,7 @@ var MarkdownSettings = ({ settings }) => {
|
|
|
115
115
|
|
|
116
116
|
// packages/plugins/plugin-markdown/src/components/index.ts
|
|
117
117
|
var DocumentCard = React4.lazy(() => import("./DocumentCard-RKENHCNE.mjs"));
|
|
118
|
-
var DocumentEditor = React4.lazy(() => import("./DocumentEditor-
|
|
118
|
+
var DocumentEditor = React4.lazy(() => import("./DocumentEditor-JZI4663Q.mjs"));
|
|
119
119
|
var MarkdownEditor = React4.lazy(() => import("./MarkdownEditor-5EUT7P66.mjs"));
|
|
120
120
|
|
|
121
121
|
// packages/plugins/plugin-markdown/src/translations.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/plugins/plugin-markdown/src/extensions.tsx":{"bytes":16961,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-dom/client","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-markdown/src/meta.tsx":{"bytes":1551,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-markdown/src/components/DocumentCard.tsx":{"bytes":11958,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-card","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/src/extensions.tsx","kind":"import-statement","original":"../extensions"},{"path":"packages/plugins/plugin-markdown/src/meta.tsx","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-markdown/src/hooks/useSelectCurrentThread.tsx":{"bytes":6483,"imports":[{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/src/meta.tsx","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-markdown/src/hooks/index.ts":{"bytes":544,"imports":[{"path":"packages/plugins/plugin-markdown/src/hooks/useSelectCurrentThread.tsx","kind":"import-statement","original":"./useSelectCurrentThread"}],"format":"esm"},"packages/plugins/plugin-markdown/src/components/MarkdownEditor.tsx":{"bytes":24979,"imports":[{"path":"@codemirror/search","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/src/hooks/index.ts","kind":"import-statement","original":"../hooks"},{"path":"packages/plugins/plugin-markdown/src/meta.tsx","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-markdown/src/types/document.ts":{"bytes":2402,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-markdown/src/types/types.ts":{"bytes":4373,"imports":[{"path":"packages/plugins/plugin-markdown/src/meta.tsx","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-markdown/src/types/index.ts":{"bytes":591,"imports":[{"path":"packages/plugins/plugin-markdown/src/types/document.ts","kind":"import-statement","original":"./document"},{"path":"packages/plugins/plugin-markdown/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-markdown/src/util.tsx":{"bytes":6329,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-markdown/src/components/DocumentEditor.tsx":{"bytes":13973,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/src/components/MarkdownEditor.tsx","kind":"import-statement","original":"./MarkdownEditor"},{"path":"packages/plugins/plugin-markdown/src/extensions.tsx","kind":"import-statement","original":"../extensions"},{"path":"packages/plugins/plugin-markdown/src/util.tsx","kind":"import-statement","original":"../util"}],"format":"esm"},"packages/plugins/plugin-markdown/src/components/HeadingMenu.tsx":{"bytes":5241,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-markdown/src/components/Layout.tsx":{"bytes":3294,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-markdown/src/components/MarkdownSettings.tsx":{"bytes":12506,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/plugin-settings","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/src/meta.tsx","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-markdown/src/components/index.ts":{"bytes":2441,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/src/components/DocumentCard.tsx","kind":"import-statement","original":"./DocumentCard"},{"path":"packages/plugins/plugin-markdown/src/components/DocumentEditor.tsx","kind":"import-statement","original":"./DocumentEditor"},{"path":"packages/plugins/plugin-markdown/src/components/MarkdownEditor.tsx","kind":"import-statement","original":"./MarkdownEditor"},{"path":"packages/plugins/plugin-markdown/src/components/HeadingMenu.tsx","kind":"import-statement","original":"./HeadingMenu"},{"path":"packages/plugins/plugin-markdown/src/components/Layout.tsx","kind":"import-statement","original":"./Layout"},{"path":"packages/plugins/plugin-markdown/src/components/MarkdownSettings.tsx","kind":"import-statement","original":"./MarkdownSettings"},{"path":"packages/plugins/plugin-markdown/src/components/DocumentCard.tsx","kind":"dynamic-import","original":"./DocumentCard"},{"path":"packages/plugins/plugin-markdown/src/components/DocumentEditor.tsx","kind":"dynamic-import","original":"./DocumentEditor"},{"path":"packages/plugins/plugin-markdown/src/components/MarkdownEditor.tsx","kind":"dynamic-import","original":"./MarkdownEditor"}],"format":"esm"},"packages/plugins/plugin-markdown/src/translations.ts":{"bytes":4765,"imports":[{"path":"packages/plugins/plugin-markdown/src/meta.tsx","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-markdown/src/MarkdownPlugin.tsx":{"bytes":50882,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-markdown/src/meta.tsx","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-markdown/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-markdown/src/types/index.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/plugin-markdown/src/types/index.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/plugin-markdown/src/util.tsx","kind":"import-statement","original":"./util"}],"format":"esm"},"packages/plugins/plugin-markdown/src/index.ts":{"bytes":969,"imports":[{"path":"packages/plugins/plugin-markdown/src/MarkdownPlugin.tsx","kind":"import-statement","original":"./MarkdownPlugin"},{"path":"packages/plugins/plugin-markdown/src/MarkdownPlugin.tsx","kind":"import-statement","original":"./MarkdownPlugin"},{"path":"packages/plugins/plugin-markdown/src/types/index.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/plugin-markdown/src/util.tsx","kind":"import-statement","original":"./util"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-markdown/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":36083},"packages/plugins/plugin-markdown/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-AFWT6Z7B.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-JDTH4A4I.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-R6CSLNWW.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-354DCID5.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-AVGUYNPR.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-2SJN46PA.mjs","kind":"import-statement"},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/plugin-settings","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/DocumentCard-RKENHCNE.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/DocumentEditor-FAXQRX37.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/MarkdownEditor-5EUT7P66.mjs","kind":"dynamic-import"}],"exports":["DocumentType","MarkdownAction","MarkdownPlugin","TextType","default","getFallbackName","isMarkdownProperties","markdownExtensionPlugins","serializer","setFallbackName"],"entryPoint":"packages/plugins/plugin-markdown/src/index.ts","inputs":{"packages/plugins/plugin-markdown/src/MarkdownPlugin.tsx":{"bytesInOutput":13084},"packages/plugins/plugin-markdown/src/components/index.ts":{"bytesInOutput":267},"packages/plugins/plugin-markdown/src/components/HeadingMenu.tsx":{"bytesInOutput":258},"packages/plugins/plugin-markdown/src/components/Layout.tsx":{"bytesInOutput":196},"packages/plugins/plugin-markdown/src/components/MarkdownSettings.tsx":{"bytesInOutput":3477},"packages/plugins/plugin-markdown/src/translations.ts":{"bytesInOutput":1463},"packages/plugins/plugin-markdown/src/index.ts":{"bytesInOutput":34}},"bytes":19967},"packages/plugins/plugin-markdown/dist/lib/browser/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-markdown/dist/lib/browser/meta.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-2SJN46PA.mjs","kind":"import-statement"}],"exports":["MARKDOWN_PLUGIN","default"],"entryPoint":"packages/plugins/plugin-markdown/src/meta.tsx","inputs":{},"bytes":165},"packages/plugins/plugin-markdown/dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-markdown/dist/lib/browser/types/index.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-R6CSLNWW.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-2SJN46PA.mjs","kind":"import-statement"}],"exports":["DocumentType","MarkdownAction","TextType"],"entryPoint":"packages/plugins/plugin-markdown/src/types/index.ts","inputs":{},"bytes":210},"packages/plugins/plugin-markdown/dist/lib/browser/DocumentCard-RKENHCNE.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-markdown/dist/lib/browser/DocumentCard-RKENHCNE.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-AFWT6Z7B.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-354DCID5.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-2SJN46PA.mjs","kind":"import-statement"}],"exports":["DocumentCard","default"],"entryPoint":"packages/plugins/plugin-markdown/src/components/DocumentCard.tsx","inputs":{},"bytes":254},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-AFWT6Z7B.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6298},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-AFWT6Z7B.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-354DCID5.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-2SJN46PA.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-card","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["DocumentCard","DocumentCard_default"],"inputs":{"packages/plugins/plugin-markdown/src/components/DocumentCard.tsx":{"bytesInOutput":2854}},"bytes":3140},"packages/plugins/plugin-markdown/dist/lib/browser/MarkdownEditor-5EUT7P66.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-markdown/dist/lib/browser/MarkdownEditor-5EUT7P66.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-AVGUYNPR.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-2SJN46PA.mjs","kind":"import-statement"}],"exports":["MarkdownEditor","default"],"entryPoint":"packages/plugins/plugin-markdown/src/components/MarkdownEditor.tsx","inputs":{},"bytes":233},"packages/plugins/plugin-markdown/dist/lib/browser/DocumentEditor-FAXQRX37.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-markdown/dist/lib/browser/DocumentEditor-FAXQRX37.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-JDTH4A4I.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-R6CSLNWW.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-354DCID5.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-AVGUYNPR.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-2SJN46PA.mjs","kind":"import-statement"}],"exports":["default"],"entryPoint":"packages/plugins/plugin-markdown/src/components/DocumentEditor.tsx","inputs":{},"bytes":290},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-JDTH4A4I.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":10636},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-JDTH4A4I.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-R6CSLNWW.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-354DCID5.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-AVGUYNPR.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["DocumentEditor_default","getFallbackName","isMarkdownProperties","markdownExtensionPlugins","serializer","setFallbackName"],"inputs":{"packages/plugins/plugin-markdown/src/components/DocumentEditor.tsx":{"bytesInOutput":2951},"packages/plugins/plugin-markdown/src/util.tsx":{"bytesInOutput":1246}},"bytes":4770},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-R6CSLNWW.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4007},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-R6CSLNWW.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-2SJN46PA.mjs","kind":"import-statement"},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true}],"exports":["DocumentType","MarkdownAction","TextType"],"inputs":{"packages/plugins/plugin-markdown/src/types/document.ts":{"bytesInOutput":499},"packages/plugins/plugin-markdown/src/types/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-markdown/src/types/types.ts":{"bytesInOutput":340}},"bytes":1114},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-354DCID5.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8511},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-354DCID5.mjs":{"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-dom/client","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["createBaseExtensions"],"inputs":{"packages/plugins/plugin-markdown/src/extensions.tsx":{"bytesInOutput":4032}},"bytes":4167},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-AVGUYNPR.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16246},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-AVGUYNPR.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-2SJN46PA.mjs","kind":"import-statement"},{"path":"@codemirror/search","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true}],"exports":["MarkdownEditor","MarkdownEditor_default"],"inputs":{"packages/plugins/plugin-markdown/src/components/MarkdownEditor.tsx":{"bytesInOutput":6076},"packages/plugins/plugin-markdown/src/hooks/useSelectCurrentThread.tsx":{"bytesInOutput":1356},"packages/plugins/plugin-markdown/src/hooks/index.ts":{"bytesInOutput":0}},"bytes":7806},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-2SJN46PA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":736},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-2SJN46PA.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["MARKDOWN_PLUGIN","meta_default"],"inputs":{"packages/plugins/plugin-markdown/src/meta.tsx":{"bytesInOutput":340}},"bytes":480}}}
|
|
1
|
+
{"inputs":{"packages/plugins/plugin-markdown/src/extensions.tsx":{"bytes":16961,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-dom/client","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-markdown/src/meta.tsx":{"bytes":1551,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-markdown/src/components/DocumentCard.tsx":{"bytes":11958,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-card","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/src/extensions.tsx","kind":"import-statement","original":"../extensions"},{"path":"packages/plugins/plugin-markdown/src/meta.tsx","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-markdown/src/hooks/useSelectCurrentThread.tsx":{"bytes":6483,"imports":[{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/src/meta.tsx","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-markdown/src/hooks/index.ts":{"bytes":544,"imports":[{"path":"packages/plugins/plugin-markdown/src/hooks/useSelectCurrentThread.tsx","kind":"import-statement","original":"./useSelectCurrentThread"}],"format":"esm"},"packages/plugins/plugin-markdown/src/components/MarkdownEditor.tsx":{"bytes":24979,"imports":[{"path":"@codemirror/search","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/src/hooks/index.ts","kind":"import-statement","original":"../hooks"},{"path":"packages/plugins/plugin-markdown/src/meta.tsx","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-markdown/src/types/document.ts":{"bytes":2402,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-markdown/src/types/types.ts":{"bytes":4433,"imports":[{"path":"packages/plugins/plugin-markdown/src/meta.tsx","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-markdown/src/types/index.ts":{"bytes":591,"imports":[{"path":"packages/plugins/plugin-markdown/src/types/document.ts","kind":"import-statement","original":"./document"},{"path":"packages/plugins/plugin-markdown/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-markdown/src/util.tsx":{"bytes":6329,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-markdown/src/components/DocumentEditor.tsx":{"bytes":14017,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/src/components/MarkdownEditor.tsx","kind":"import-statement","original":"./MarkdownEditor"},{"path":"packages/plugins/plugin-markdown/src/extensions.tsx","kind":"import-statement","original":"../extensions"},{"path":"packages/plugins/plugin-markdown/src/util.tsx","kind":"import-statement","original":"../util"}],"format":"esm"},"packages/plugins/plugin-markdown/src/components/HeadingMenu.tsx":{"bytes":5241,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-markdown/src/components/Layout.tsx":{"bytes":3294,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-markdown/src/components/MarkdownSettings.tsx":{"bytes":12506,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/plugin-settings","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/src/meta.tsx","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-markdown/src/components/index.ts":{"bytes":2441,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/src/components/DocumentCard.tsx","kind":"import-statement","original":"./DocumentCard"},{"path":"packages/plugins/plugin-markdown/src/components/DocumentEditor.tsx","kind":"import-statement","original":"./DocumentEditor"},{"path":"packages/plugins/plugin-markdown/src/components/MarkdownEditor.tsx","kind":"import-statement","original":"./MarkdownEditor"},{"path":"packages/plugins/plugin-markdown/src/components/HeadingMenu.tsx","kind":"import-statement","original":"./HeadingMenu"},{"path":"packages/plugins/plugin-markdown/src/components/Layout.tsx","kind":"import-statement","original":"./Layout"},{"path":"packages/plugins/plugin-markdown/src/components/MarkdownSettings.tsx","kind":"import-statement","original":"./MarkdownSettings"},{"path":"packages/plugins/plugin-markdown/src/components/DocumentCard.tsx","kind":"dynamic-import","original":"./DocumentCard"},{"path":"packages/plugins/plugin-markdown/src/components/DocumentEditor.tsx","kind":"dynamic-import","original":"./DocumentEditor"},{"path":"packages/plugins/plugin-markdown/src/components/MarkdownEditor.tsx","kind":"dynamic-import","original":"./MarkdownEditor"}],"format":"esm"},"packages/plugins/plugin-markdown/src/translations.ts":{"bytes":4765,"imports":[{"path":"packages/plugins/plugin-markdown/src/meta.tsx","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-markdown/src/MarkdownPlugin.tsx":{"bytes":50882,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-markdown/src/meta.tsx","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-markdown/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-markdown/src/types/index.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/plugin-markdown/src/types/index.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/plugin-markdown/src/util.tsx","kind":"import-statement","original":"./util"}],"format":"esm"},"packages/plugins/plugin-markdown/src/index.ts":{"bytes":969,"imports":[{"path":"packages/plugins/plugin-markdown/src/MarkdownPlugin.tsx","kind":"import-statement","original":"./MarkdownPlugin"},{"path":"packages/plugins/plugin-markdown/src/MarkdownPlugin.tsx","kind":"import-statement","original":"./MarkdownPlugin"},{"path":"packages/plugins/plugin-markdown/src/types/index.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/plugin-markdown/src/util.tsx","kind":"import-statement","original":"./util"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-markdown/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":36083},"packages/plugins/plugin-markdown/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-AFWT6Z7B.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-QIO7ZONH.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-N7FS4CK2.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-354DCID5.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-AVGUYNPR.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-2SJN46PA.mjs","kind":"import-statement"},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/plugin-settings","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/DocumentCard-RKENHCNE.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/DocumentEditor-JZI4663Q.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/MarkdownEditor-5EUT7P66.mjs","kind":"dynamic-import"}],"exports":["DocumentType","MarkdownAction","MarkdownPlugin","TextType","default","getFallbackName","isMarkdownProperties","markdownExtensionPlugins","serializer","setFallbackName"],"entryPoint":"packages/plugins/plugin-markdown/src/index.ts","inputs":{"packages/plugins/plugin-markdown/src/MarkdownPlugin.tsx":{"bytesInOutput":13084},"packages/plugins/plugin-markdown/src/components/index.ts":{"bytesInOutput":267},"packages/plugins/plugin-markdown/src/components/HeadingMenu.tsx":{"bytesInOutput":258},"packages/plugins/plugin-markdown/src/components/Layout.tsx":{"bytesInOutput":196},"packages/plugins/plugin-markdown/src/components/MarkdownSettings.tsx":{"bytesInOutput":3477},"packages/plugins/plugin-markdown/src/translations.ts":{"bytesInOutput":1463},"packages/plugins/plugin-markdown/src/index.ts":{"bytesInOutput":34}},"bytes":19967},"packages/plugins/plugin-markdown/dist/lib/browser/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-markdown/dist/lib/browser/meta.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-2SJN46PA.mjs","kind":"import-statement"}],"exports":["MARKDOWN_PLUGIN","default"],"entryPoint":"packages/plugins/plugin-markdown/src/meta.tsx","inputs":{},"bytes":165},"packages/plugins/plugin-markdown/dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-markdown/dist/lib/browser/types/index.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-N7FS4CK2.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-2SJN46PA.mjs","kind":"import-statement"}],"exports":["DocumentType","MarkdownAction","TextType"],"entryPoint":"packages/plugins/plugin-markdown/src/types/index.ts","inputs":{},"bytes":210},"packages/plugins/plugin-markdown/dist/lib/browser/DocumentCard-RKENHCNE.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-markdown/dist/lib/browser/DocumentCard-RKENHCNE.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-AFWT6Z7B.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-354DCID5.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-2SJN46PA.mjs","kind":"import-statement"}],"exports":["DocumentCard","default"],"entryPoint":"packages/plugins/plugin-markdown/src/components/DocumentCard.tsx","inputs":{},"bytes":254},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-AFWT6Z7B.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6298},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-AFWT6Z7B.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-354DCID5.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-2SJN46PA.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-card","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["DocumentCard","DocumentCard_default"],"inputs":{"packages/plugins/plugin-markdown/src/components/DocumentCard.tsx":{"bytesInOutput":2854}},"bytes":3140},"packages/plugins/plugin-markdown/dist/lib/browser/MarkdownEditor-5EUT7P66.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-markdown/dist/lib/browser/MarkdownEditor-5EUT7P66.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-AVGUYNPR.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-2SJN46PA.mjs","kind":"import-statement"}],"exports":["MarkdownEditor","default"],"entryPoint":"packages/plugins/plugin-markdown/src/components/MarkdownEditor.tsx","inputs":{},"bytes":233},"packages/plugins/plugin-markdown/dist/lib/browser/DocumentEditor-JZI4663Q.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-markdown/dist/lib/browser/DocumentEditor-JZI4663Q.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-QIO7ZONH.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-N7FS4CK2.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-354DCID5.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-AVGUYNPR.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-2SJN46PA.mjs","kind":"import-statement"}],"exports":["default"],"entryPoint":"packages/plugins/plugin-markdown/src/components/DocumentEditor.tsx","inputs":{},"bytes":290},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-QIO7ZONH.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":10652},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-QIO7ZONH.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-N7FS4CK2.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-354DCID5.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-AVGUYNPR.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["DocumentEditor_default","getFallbackName","isMarkdownProperties","markdownExtensionPlugins","serializer","setFallbackName"],"inputs":{"packages/plugins/plugin-markdown/src/components/DocumentEditor.tsx":{"bytesInOutput":2917},"packages/plugins/plugin-markdown/src/util.tsx":{"bytesInOutput":1246}},"bytes":4736},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-N7FS4CK2.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4054},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-N7FS4CK2.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-2SJN46PA.mjs","kind":"import-statement"},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true}],"exports":["DocumentType","MarkdownAction","TextType"],"inputs":{"packages/plugins/plugin-markdown/src/types/document.ts":{"bytesInOutput":499},"packages/plugins/plugin-markdown/src/types/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-markdown/src/types/types.ts":{"bytesInOutput":340}},"bytes":1114},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-354DCID5.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8511},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-354DCID5.mjs":{"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-dom/client","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["createBaseExtensions"],"inputs":{"packages/plugins/plugin-markdown/src/extensions.tsx":{"bytesInOutput":4032}},"bytes":4167},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-AVGUYNPR.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16246},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-AVGUYNPR.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-2SJN46PA.mjs","kind":"import-statement"},{"path":"@codemirror/search","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true}],"exports":["MarkdownEditor","MarkdownEditor_default"],"inputs":{"packages/plugins/plugin-markdown/src/components/MarkdownEditor.tsx":{"bytesInOutput":6076},"packages/plugins/plugin-markdown/src/hooks/useSelectCurrentThread.tsx":{"bytesInOutput":1356},"packages/plugins/plugin-markdown/src/hooks/index.ts":{"bytesInOutput":0}},"bytes":7806},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-2SJN46PA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":736},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-2SJN46PA.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["MARKDOWN_PLUGIN","meta_default"],"inputs":{"packages/plugins/plugin-markdown/src/meta.tsx":{"bytesInOutput":340}},"bytes":480}}}
|
|
@@ -16,14 +16,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
21
|
-
default: () =>
|
|
19
|
+
var DocumentEditor_QPH26VQZ_exports = {};
|
|
20
|
+
__export(DocumentEditor_QPH26VQZ_exports, {
|
|
21
|
+
default: () => import_chunk_KDXONMFH.DocumentEditor_default
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
25
|
-
var
|
|
23
|
+
module.exports = __toCommonJS(DocumentEditor_QPH26VQZ_exports);
|
|
24
|
+
var import_chunk_KDXONMFH = require("./chunk-KDXONMFH.cjs");
|
|
25
|
+
var import_chunk_RVNU7MRZ = require("./chunk-RVNU7MRZ.cjs");
|
|
26
26
|
var import_chunk_KTYIOXL5 = require("./chunk-KTYIOXL5.cjs");
|
|
27
27
|
var import_chunk_2T7LIVPT = require("./chunk-2T7LIVPT.cjs");
|
|
28
28
|
var import_chunk_LPD4NOTH = require("./chunk-LPD4NOTH.cjs");
|
|
29
|
-
//# sourceMappingURL=DocumentEditor-
|
|
29
|
+
//# sourceMappingURL=DocumentEditor-QPH26VQZ.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["DocumentEditor-
|
|
4
|
-
"sourcesContent": ["import {\n DocumentEditor_default\n} from \"./chunk-
|
|
3
|
+
"sources": ["DocumentEditor-QPH26VQZ.cjs"],
|
|
4
|
+
"sourcesContent": ["import {\n DocumentEditor_default\n} from \"./chunk-KDXONMFH.cjs\";\nimport \"./chunk-RVNU7MRZ.cjs\";\nimport \"./chunk-KTYIOXL5.cjs\";\nimport \"./chunk-2T7LIVPT.cjs\";\nimport \"./chunk-LPD4NOTH.cjs\";\nexport {\n DocumentEditor_default as default\n};\n//# sourceMappingURL=DocumentEditor-QPH26VQZ.cjs.map\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAEO;AACP,4BAAO;AACP,4BAAO;AACP,4BAAO;AACP,4BAAO;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -26,8 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_KDXONMFH_exports = {};
|
|
30
|
+
__export(chunk_KDXONMFH_exports, {
|
|
31
31
|
DocumentEditor_default: () => DocumentEditor_default,
|
|
32
32
|
getFallbackName: () => getFallbackName,
|
|
33
33
|
isMarkdownProperties: () => isMarkdownProperties,
|
|
@@ -35,8 +35,8 @@ __export(chunk_OEWBZFBF_exports, {
|
|
|
35
35
|
serializer: () => serializer,
|
|
36
36
|
setFallbackName: () => setFallbackName
|
|
37
37
|
});
|
|
38
|
-
module.exports = __toCommonJS(
|
|
39
|
-
var
|
|
38
|
+
module.exports = __toCommonJS(chunk_KDXONMFH_exports);
|
|
39
|
+
var import_chunk_RVNU7MRZ = require("./chunk-RVNU7MRZ.cjs");
|
|
40
40
|
var import_chunk_KTYIOXL5 = require("./chunk-KTYIOXL5.cjs");
|
|
41
41
|
var import_chunk_2T7LIVPT = require("./chunk-2T7LIVPT.cjs");
|
|
42
42
|
var import_react = __toESM(require("react"));
|
|
@@ -70,9 +70,9 @@ var serializer = {
|
|
|
70
70
|
},
|
|
71
71
|
deserialize: async ({ content: serialized }) => {
|
|
72
72
|
const { name, content } = JSON.parse(serialized);
|
|
73
|
-
return (0, import_echo2.createEchoObject)((0, import_echo2.create)(
|
|
73
|
+
return (0, import_echo2.createEchoObject)((0, import_echo2.create)(import_chunk_RVNU7MRZ.DocumentType, {
|
|
74
74
|
name,
|
|
75
|
-
content: (0, import_echo2.create)(
|
|
75
|
+
content: (0, import_echo2.create)(import_chunk_RVNU7MRZ.TextType, {
|
|
76
76
|
content
|
|
77
77
|
}),
|
|
78
78
|
threads: []
|
|
@@ -83,14 +83,12 @@ var DocumentEditor = ({ document: doc, extensionProviders = [], viewMode, settin
|
|
|
83
83
|
const space = (0, import_echo.getSpace)(doc);
|
|
84
84
|
const identity = (0, import_halo.useIdentity)();
|
|
85
85
|
const dispatch = (0, import_app_framework.useIntentDispatcher)();
|
|
86
|
-
const baseExtensions = (0, import_react.useMemo)(() => {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
});
|
|
93
|
-
}, [
|
|
86
|
+
const baseExtensions = (0, import_react.useMemo)(() => (0, import_chunk_KTYIOXL5.createBaseExtensions)({
|
|
87
|
+
viewMode,
|
|
88
|
+
settings,
|
|
89
|
+
document: doc,
|
|
90
|
+
dispatch
|
|
91
|
+
}), [
|
|
94
92
|
doc,
|
|
95
93
|
viewMode,
|
|
96
94
|
dispatch,
|
|
@@ -98,12 +96,12 @@ var DocumentEditor = ({ document: doc, extensionProviders = [], viewMode, settin
|
|
|
98
96
|
settings.folding,
|
|
99
97
|
settings.numberedHeadings
|
|
100
98
|
]);
|
|
101
|
-
const
|
|
102
|
-
const
|
|
99
|
+
const pluginExtensions = (0, import_react.useMemo)(() => extensionProviders.reduce((acc, provider) => {
|
|
100
|
+
const extension = typeof provider === "function" ? provider({
|
|
103
101
|
document: doc
|
|
104
102
|
}) : provider;
|
|
105
|
-
if (
|
|
106
|
-
acc.push(
|
|
103
|
+
if (extension) {
|
|
104
|
+
acc.push(extension);
|
|
107
105
|
}
|
|
108
106
|
return acc;
|
|
109
107
|
}, []), [
|
|
@@ -125,14 +123,14 @@ var DocumentEditor = ({ document: doc, extensionProviders = [], viewMode, settin
|
|
|
125
123
|
setFallbackName(doc, text);
|
|
126
124
|
}
|
|
127
125
|
}),
|
|
128
|
-
|
|
129
|
-
|
|
126
|
+
baseExtensions,
|
|
127
|
+
pluginExtensions
|
|
130
128
|
], [
|
|
129
|
+
baseExtensions,
|
|
130
|
+
pluginExtensions,
|
|
131
131
|
doc,
|
|
132
132
|
doc.content,
|
|
133
133
|
space,
|
|
134
|
-
baseExtensions,
|
|
135
|
-
providerExtensions,
|
|
136
134
|
identity
|
|
137
135
|
]);
|
|
138
136
|
const initialValue = (0, import_react.useMemo)(() => doc.content?.content, [
|
|
@@ -188,4 +186,4 @@ var DocumentEditor_default = DocumentEditor;
|
|
|
188
186
|
serializer,
|
|
189
187
|
setFallbackName
|
|
190
188
|
});
|
|
191
|
-
//# sourceMappingURL=chunk-
|
|
189
|
+
//# sourceMappingURL=chunk-KDXONMFH.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/DocumentEditor.tsx", "../../../src/util.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useEffect, useMemo } from 'react';\n\nimport { useResolvePlugin, parseFileManagerPlugin, useIntentDispatcher } from '@dxos/app-framework';\nimport { createDocAccessor, fullyQualifiedId, getSpace } from '@dxos/react-client/echo';\nimport { useIdentity } from '@dxos/react-client/halo';\nimport {\n createDataExtensions,\n listener,\n localStorageStateStoreAdapter,\n state,\n type Extension,\n type EditorSelectionState,\n} from '@dxos/react-ui-editor';\n\nimport MarkdownEditor, { type MarkdownEditorProps } from './MarkdownEditor';\nimport { createBaseExtensions } from '../extensions';\nimport { type DocumentType, type MarkdownPluginState, type MarkdownSettingsProps } from '../types';\nimport { getFallbackName, setFallbackName } from '../util';\n\ntype DocumentEditorProps = {\n document: DocumentType;\n settings: MarkdownSettingsProps;\n} & Omit<MarkdownEditorProps, 'id' | 'inputMode' | 'toolbar' | 'extensions'> &\n Pick<MarkdownPluginState, 'extensionProviders'>;\n\n/**\n * Editor for a `DocumentType`.\n */\nconst DocumentEditor = ({\n document: doc,\n extensionProviders = [],\n viewMode,\n settings,\n ...props\n}: DocumentEditorProps) => {\n const space = getSpace(doc);\n const identity = useIdentity();\n const dispatch = useIntentDispatcher();\n\n // TODO(wittjosiah): Autocomplete is not working and this query is causing performance issues.\n // TODO(burdon): Unsubscribe.\n // const query = space?.db.query(Filter.schema(DocumentType));\n // query?.subscribe();\n const baseExtensions = useMemo(\n () =>\n createBaseExtensions({\n viewMode,\n settings,\n document: doc,\n dispatch,\n // query,\n }),\n [doc, viewMode, dispatch, settings, settings.folding, settings.numberedHeadings],\n );\n\n const pluginExtensions = useMemo(\n () =>\n extensionProviders.reduce((acc: Extension[], provider) => {\n const extension = typeof provider === 'function' ? provider({ document: doc }) : provider;\n if (extension) {\n acc.push(extension);\n }\n return acc;\n }, []),\n [extensionProviders],\n );\n\n const extensions = useMemo(\n () => [\n // NOTE: Data extensions must be first so that automerge is updated before other extensions compute their state.\n createDataExtensions({\n id: doc.id,\n text: doc.content && createDocAccessor(doc.content, ['content']),\n space,\n identity,\n }),\n state(localStorageStateStoreAdapter),\n listener({\n onChange: (text) => {\n setFallbackName(doc, text);\n },\n }),\n baseExtensions,\n pluginExtensions,\n ],\n [baseExtensions, pluginExtensions, doc, doc.content, space, identity],\n );\n\n const initialValue = useMemo(() => doc.content?.content, [doc.content]);\n\n // Migrate gradually to `fallbackName`.\n useEffect(() => {\n if (!doc.fallbackName && doc.content?.content) {\n doc.fallbackName = getFallbackName(doc.content.content);\n }\n }, [doc, doc.content]);\n\n // Restore last selection and scroll point.\n const id = fullyQualifiedId(doc);\n const { scrollTo, selection } = useMemo<EditorSelectionState>(\n () => localStorageStateStoreAdapter.getState(id) ?? {},\n [doc],\n );\n\n const fileManagerPlugin = useResolvePlugin(parseFileManagerPlugin);\n const handleFileUpload = useMemo(() => {\n if (space === undefined) {\n return undefined;\n }\n\n if (fileManagerPlugin?.provides.file.upload === undefined) {\n return undefined;\n }\n\n return async (file: File) => {\n return fileManagerPlugin?.provides?.file?.upload?.(file, space);\n };\n }, [fileManagerPlugin, space]);\n\n return (\n <MarkdownEditor\n id={id}\n initialValue={initialValue}\n extensions={extensions}\n scrollTo={scrollTo}\n selection={selection}\n onFileUpload={handleFileUpload}\n inputMode={settings.editorInputMode}\n toolbar={settings.toolbar}\n viewMode={viewMode}\n {...props}\n />\n );\n};\n\nexport default DocumentEditor;\n\nexport type DocumentEditor = typeof DocumentEditor;\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { debounce } from '@dxos/async';\nimport { type TypedObjectSerializer } from '@dxos/plugin-space/types';\nimport { create, createEchoObject, isEchoObject, loadObjectReferences } from '@dxos/react-client/echo';\n\nimport { DocumentType, type MarkdownProperties, type MarkdownExtensionProvides, TextType } from './types';\n\nexport const isMarkdownProperties = (data: unknown): data is MarkdownProperties =>\n isEchoObject(data)\n ? true\n : data && typeof data === 'object'\n ? 'title' in data && typeof data.title === 'string'\n : false;\n\ntype MarkdownExtensionPlugin = Plugin<MarkdownExtensionProvides>;\n\nexport const markdownExtensionPlugins = (plugins: Plugin[]): MarkdownExtensionPlugin[] => {\n return (plugins as MarkdownExtensionPlugin[]).filter((plugin) => Boolean(plugin.provides?.markdown));\n};\n\nconst nonTitleChars = /[^\\w ]/g;\n\nexport const getFallbackName = (content: string) => {\n return content.substring(0, 31).split('\\n')[0].replaceAll(nonTitleChars, '').trim();\n};\n\nexport const setFallbackName = debounce((doc: DocumentType, content: string) => {\n const name = getFallbackName(content);\n if (doc.fallbackName !== name) {\n doc.fallbackName = name;\n }\n}, 200);\n\nexport const serializer: TypedObjectSerializer<DocumentType> = {\n serialize: async ({ object }): Promise<string> => {\n const content = await loadObjectReferences(object, (doc) => doc.content);\n return JSON.stringify({ name: object.name, content: content.content });\n },\n\n deserialize: async ({ content: serialized }) => {\n const { name, content } = JSON.parse(serialized);\n return createEchoObject(create(DocumentType, { name, content: create(TextType, { content }), threads: [] }));\n },\n};\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["import_echo", "isMarkdownProperties", "data", "isEchoObject", "title", "markdownExtensionPlugins", "plugins", "filter", "plugin", "Boolean", "provides", "markdown", "nonTitleChars", "getFallbackName", "content", "substring", "split", "replaceAll", "trim", "setFallbackName", "debounce", "doc", "name", "fallbackName", "serializer", "serialize", "object", "loadObjectReferences", "JSON", "stringify", "deserialize", "serialized", "parse", "createEchoObject", "create", "DocumentType", "TextType", "threads", "DocumentEditor", "document", "extensionProviders", "viewMode", "settings", "props", "space", "getSpace", "identity", "useIdentity", "dispatch", "useIntentDispatcher", "baseExtensions", "useMemo", "createBaseExtensions", "folding", "numberedHeadings", "pluginExtensions", "reduce", "acc", "provider", "extension", "push", "extensions", "createDataExtensions", "id", "text", "createDocAccessor", "state", "localStorageStateStoreAdapter", "listener", "onChange", "initialValue", "useEffect", "fullyQualifiedId", "scrollTo", "selection", "getState", "fileManagerPlugin", "useResolvePlugin", "parseFileManagerPlugin", "handleFileUpload", "undefined", "file", "upload", "React", "MarkdownEditor", "onFileUpload", "inputMode", "editorInputMode", "toolbar"]
|
|
7
|
+
}
|
|
@@ -16,13 +16,13 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_RVNU7MRZ_exports = {};
|
|
20
|
+
__export(chunk_RVNU7MRZ_exports, {
|
|
21
21
|
DocumentType: () => DocumentType,
|
|
22
22
|
MarkdownAction: () => MarkdownAction,
|
|
23
23
|
TextType: () => TextType
|
|
24
24
|
});
|
|
25
|
-
module.exports = __toCommonJS(
|
|
25
|
+
module.exports = __toCommonJS(chunk_RVNU7MRZ_exports);
|
|
26
26
|
var import_chunk_LPD4NOTH = require("./chunk-LPD4NOTH.cjs");
|
|
27
27
|
var import_echo_schema = require("@dxos/echo-schema");
|
|
28
28
|
var import_types = require("@dxos/plugin-space/types");
|
|
@@ -55,4 +55,4 @@ var MarkdownAction;
|
|
|
55
55
|
MarkdownAction,
|
|
56
56
|
TextType
|
|
57
57
|
});
|
|
58
|
-
//# sourceMappingURL=chunk-
|
|
58
|
+
//# sourceMappingURL=chunk-RVNU7MRZ.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/types/document.ts", "../../../src/types/types.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { ref, S, TypedObject } from '@dxos/echo-schema';\nimport { ThreadType } from '@dxos/plugin-space/types';\n\nexport class TextType extends TypedObject({ typename: 'dxos.org/type/Text', version: '0.1.0' })({\n content: S.String,\n}) {}\n\nexport class DocumentType extends TypedObject({ typename: 'dxos.org/type/Document', version: '0.1.0' })({\n name: S.optional(S.String),\n fallbackName: S.optional(S.String),\n content: ref(TextType),\n threads: S.mutable(S.Array(ref(ThreadType))),\n}) {}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport type {\n GraphBuilderProvides,\n GraphSerializerProvides,\n IntentResolverProvides,\n MetadataRecordsProvides,\n SettingsProvides,\n SurfaceProvides,\n TranslationsProvides,\n} from '@dxos/app-framework';\nimport { type SchemaProvides } from '@dxos/plugin-client';\nimport { type SpaceInitProvides } from '@dxos/plugin-space';\nimport { type Extension, type EditorInputMode, type EditorViewMode } from '@dxos/react-ui-editor';\n\nimport { type DocumentType } from './document';\nimport { MARKDOWN_PLUGIN } from '../meta';\n\nconst MARKDOWN_ACTION = `${MARKDOWN_PLUGIN}/action`;\n\nexport enum MarkdownAction {\n CREATE = `${MARKDOWN_ACTION}/create`,\n SET_VIEW_MODE = `${MARKDOWN_ACTION}/set-view-mode`,\n}\n\nexport type MarkdownProperties = Record<string, any>;\n\nexport type
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { ref, S, TypedObject } from '@dxos/echo-schema';\nimport { ThreadType } from '@dxos/plugin-space/types';\n\nexport class TextType extends TypedObject({ typename: 'dxos.org/type/Text', version: '0.1.0' })({\n content: S.String,\n}) {}\n\nexport class DocumentType extends TypedObject({ typename: 'dxos.org/type/Document', version: '0.1.0' })({\n name: S.optional(S.String),\n fallbackName: S.optional(S.String),\n content: ref(TextType),\n threads: S.mutable(S.Array(ref(ThreadType))),\n}) {}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport type {\n GraphBuilderProvides,\n GraphSerializerProvides,\n IntentResolverProvides,\n MetadataRecordsProvides,\n SettingsProvides,\n SurfaceProvides,\n TranslationsProvides,\n} from '@dxos/app-framework';\nimport { type SchemaProvides } from '@dxos/plugin-client';\nimport { type SpaceInitProvides } from '@dxos/plugin-space';\nimport { type Extension, type EditorInputMode, type EditorViewMode } from '@dxos/react-ui-editor';\n\nimport { type DocumentType } from './document';\nimport { MARKDOWN_PLUGIN } from '../meta';\n\nconst MARKDOWN_ACTION = `${MARKDOWN_PLUGIN}/action`;\n\nexport enum MarkdownAction {\n CREATE = `${MARKDOWN_ACTION}/create`,\n SET_VIEW_MODE = `${MARKDOWN_ACTION}/set-view-mode`,\n}\n\nexport type MarkdownProperties = Record<string, any>;\n\nexport type MarkdownExtensionProvider = (props: { document?: DocumentType }) => Extension | undefined;\n\nexport type OnChange = (text: string) => void;\n\nexport type MarkdownExtensionProvides = {\n // TODO(burdon): Rename.\n markdown: {\n extensions: MarkdownExtensionProvider;\n };\n};\n\n// TODO(wittjosiah): Factor out to graph plugin?\ntype StackProvides = {\n stack: {\n creators?: Record<string, any>[];\n };\n};\n\nexport type MarkdownPluginState = {\n // Codemirror extensions provided by other plugins.\n extensionProviders: NonNullable<MarkdownExtensionProvider>[];\n\n // TODO(burdon): Extend view mode per document to include scroll position, etc.\n // View mode per document.\n viewMode: Record<string, EditorViewMode>;\n};\n\nexport type MarkdownSettingsProps = {\n defaultViewMode: EditorViewMode;\n editorInputMode?: EditorInputMode;\n experimental?: boolean;\n debug?: boolean;\n toolbar?: boolean;\n typewriter?: string;\n // TODO(burdon): Per document settings.\n numberedHeadings?: boolean;\n folding?: boolean;\n};\n\n// TODO(Zan): Move this to the plugin-space plugin or another common location when we implement comments in sheets.\ntype ThreadProvides<T> = {\n thread: {\n predicate: (obj: any) => obj is T;\n createSort: (obj: T) => (anchorA: string | undefined, anchorB: string | undefined) => number;\n };\n};\n\nexport type MarkdownPluginProvides = SurfaceProvides &\n IntentResolverProvides &\n GraphBuilderProvides &\n GraphSerializerProvides &\n MetadataRecordsProvides &\n SettingsProvides<MarkdownSettingsProps> &\n TranslationsProvides &\n SchemaProvides &\n SpaceInitProvides &\n StackProvides &\n ThreadProvides<DocumentType>;\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,yBAAoC;AACpC,mBAA2B;AAEpB,IAAMA,WAAN,kBAAuBC,gCAAY;EAAEC,UAAU;EAAsBC,SAAS;AAAQ,CAAA,EAAG;EAC9FC,SAASC,qBAAEC;AACb,CAAA,EAAA;AAAI;AAEG,IAAMC,eAAN,kBAA2BN,gCAAY;EAAEC,UAAU;EAA0BC,SAAS;AAAQ,CAAA,EAAG;EACtGK,MAAMH,qBAAEI,SAASJ,qBAAEC,MAAM;EACzBI,cAAcL,qBAAEI,SAASJ,qBAAEC,MAAM;EACjCF,aAASO,wBAAIX,QAAAA;EACbY,SAASP,qBAAEQ,QAAQR,qBAAES,UAAMH,wBAAII,uBAAAA,CAAAA,CAAAA;AACjC,CAAA,EAAA;AAAI;ACIJ,IAAMC,kBAAkB,GAAGC,qCAAAA;;UAEfC,iBAAAA;8CACD,GAAGF,eAAAA,SAAwB,IAAA;qDACpB,GAAGA,eAAAA,gBAA+B,IAAA;GAFxCE,mBAAAA,iBAAAA,CAAAA,EAAAA;",
|
|
6
6
|
"names": ["TextType", "TypedObject", "typename", "version", "content", "S", "String", "DocumentType", "name", "optional", "fallbackName", "ref", "threads", "mutable", "Array", "ThreadType", "MARKDOWN_ACTION", "MARKDOWN_PLUGIN", "MarkdownAction"]
|
|
7
7
|
}
|