@dxos/plugin-markdown 0.6.10 → 0.6.11-staging.9c4dc38
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-GPWV3VN3.mjs +11 -0
- package/dist/lib/browser/{MarkdownEditor-5DHI4ORZ.mjs → MarkdownEditor-EKJJQEFL.mjs} +2 -2
- package/dist/lib/browser/{chunk-KWE52M7F.mjs → chunk-7AF2JLK4.mjs} +3 -3
- package/dist/lib/browser/{chunk-RETREORA.mjs → chunk-CQJL4G4X.mjs} +1 -1
- package/dist/lib/browser/{chunk-RETREORA.mjs.map → chunk-CQJL4G4X.mjs.map} +1 -1
- package/dist/lib/browser/{chunk-CJO5DJVS.mjs → chunk-VUN4QKTT.mjs} +3 -1
- package/dist/lib/browser/{chunk-CJO5DJVS.mjs.map → chunk-VUN4QKTT.mjs.map} +3 -3
- package/dist/lib/browser/index.mjs +32 -6
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/types/index.mjs +1 -1
- package/dist/lib/node/{DocumentEditor-INTWSBO5.cjs → DocumentEditor-I5GCRBKU.cjs} +8 -8
- package/dist/lib/node/{DocumentEditor-INTWSBO5.cjs.map → DocumentEditor-I5GCRBKU.cjs.map} +2 -2
- package/dist/lib/node/{MarkdownEditor-X3U7B4FU.cjs → MarkdownEditor-UE23H75V.cjs} +7 -7
- package/dist/lib/node/{MarkdownEditor-X3U7B4FU.cjs.map → MarkdownEditor-UE23H75V.cjs.map} +2 -2
- package/dist/lib/node/{chunk-MMYLEP2V.cjs → chunk-7XIBNEI7.cjs} +6 -4
- package/dist/lib/node/{chunk-MMYLEP2V.cjs.map → chunk-7XIBNEI7.cjs.map} +3 -3
- package/dist/lib/node/{chunk-MFMEH5GP.cjs → chunk-RVGN72IX.cjs} +9 -9
- package/dist/lib/node/{chunk-VYLYUDDI.cjs → chunk-VWQH4WC2.cjs} +4 -4
- package/dist/lib/node/{chunk-VYLYUDDI.cjs.map → chunk-VWQH4WC2.cjs.map} +1 -1
- package/dist/lib/node/index.cjs +56 -30
- package/dist/lib/node/index.cjs.map +3 -3
- 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/types/src/MarkdownPlugin.d.ts.map +1 -1
- package/dist/types/src/components/MarkdownEditor.d.ts.map +1 -1
- package/dist/types/src/components/MarkdownEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar.stories.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +7 -1
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/package.json +28 -28
- package/src/MarkdownPlugin.tsx +32 -2
- package/src/components/MarkdownEditor.stories.tsx +5 -8
- package/src/components/MarkdownEditor.tsx +5 -1
- package/src/components/Toolbar.stories.tsx +14 -16
- package/src/types/types.ts +11 -1
- package/dist/lib/browser/DocumentEditor-ZBSGRJRH.mjs +0 -11
- /package/dist/lib/browser/{DocumentEditor-ZBSGRJRH.mjs.map → DocumentEditor-GPWV3VN3.mjs.map} +0 -0
- /package/dist/lib/browser/{MarkdownEditor-5DHI4ORZ.mjs.map → MarkdownEditor-EKJJQEFL.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-KWE52M7F.mjs.map → chunk-7AF2JLK4.mjs.map} +0 -0
- /package/dist/lib/node/{chunk-MFMEH5GP.cjs.map → chunk-RVGN72IX.cjs.map} +0 -0
|
@@ -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":2114,"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}],"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/components/MarkdownEditor.tsx":{"bytes":29664,"imports":[{"path":"@codemirror/search","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/plugin-attention","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-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/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":3789,"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":13847,"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":47181,"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":34266},"packages/plugins/plugin-markdown/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-RL7QY322.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-KWE52M7F.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-RETREORA.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-CJO5DJVS.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-4GGD6YJO.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-2P4EICBA.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/DocumentEditor-ZBSGRJRH.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/MarkdownEditor-5DHI4ORZ.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":12177},"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":19060},"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-4GGD6YJO.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-RETREORA.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-4GGD6YJO.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-2P4EICBA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-markdown/dist/lib/browser/DocumentCard-2P4EICBA.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-RL7QY322.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-4GGD6YJO.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-RL7QY322.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6298},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-RL7QY322.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-4GGD6YJO.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-5DHI4ORZ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-markdown/dist/lib/browser/MarkdownEditor-5DHI4ORZ.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-CJO5DJVS.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-4GGD6YJO.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-ZBSGRJRH.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-markdown/dist/lib/browser/DocumentEditor-ZBSGRJRH.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-KWE52M7F.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-RETREORA.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-CJO5DJVS.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-4GGD6YJO.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-KWE52M7F.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":10577},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-KWE52M7F.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-RETREORA.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-CJO5DJVS.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":2923},"packages/plugins/plugin-markdown/src/util.tsx":{"bytesInOutput":1246}},"bytes":4742},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-RETREORA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3570},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-RETREORA.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-4GGD6YJO.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-CJO5DJVS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":15260},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-CJO5DJVS.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-4GGD6YJO.mjs","kind":"import-statement"},{"path":"@codemirror/search","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/plugin-attention","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-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["MarkdownEditor","MarkdownEditor_default"],"inputs":{"packages/plugins/plugin-markdown/src/components/MarkdownEditor.tsx":{"bytesInOutput":7169}},"bytes":7398},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-4GGD6YJO.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1044},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-4GGD6YJO.mjs":{"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}],"exports":["MARKDOWN_PLUGIN","meta_default"],"inputs":{"packages/plugins/plugin-markdown/src/meta.tsx":{"bytesInOutput":501}},"bytes":641}}}
|
|
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":2114,"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}],"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/components/MarkdownEditor.tsx":{"bytes":29854,"imports":[{"path":"@codemirror/search","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/plugin-attention","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-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/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":4217,"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":13847,"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":50612,"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/log","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":35953},"packages/plugins/plugin-markdown/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-RL7QY322.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-7AF2JLK4.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-CQJL4G4X.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-VUN4QKTT.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-4GGD6YJO.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/log","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-2P4EICBA.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/DocumentEditor-GPWV3VN3.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/MarkdownEditor-EKJJQEFL.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":13248},"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":20131},"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-4GGD6YJO.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-CQJL4G4X.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-4GGD6YJO.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-2P4EICBA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-markdown/dist/lib/browser/DocumentCard-2P4EICBA.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-RL7QY322.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-4GGD6YJO.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-RL7QY322.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6298},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-RL7QY322.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-4GGD6YJO.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-EKJJQEFL.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-markdown/dist/lib/browser/MarkdownEditor-EKJJQEFL.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-VUN4QKTT.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-4GGD6YJO.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-GPWV3VN3.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-markdown/dist/lib/browser/DocumentEditor-GPWV3VN3.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-7AF2JLK4.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-CQJL4G4X.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-VUN4QKTT.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-4GGD6YJO.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-7AF2JLK4.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":10577},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-7AF2JLK4.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-CQJL4G4X.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-VUN4QKTT.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":2923},"packages/plugins/plugin-markdown/src/util.tsx":{"bytesInOutput":1246}},"bytes":4742},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-CQJL4G4X.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3893},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-CQJL4G4X.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-4GGD6YJO.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-VUN4QKTT.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":15367},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-VUN4QKTT.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-4GGD6YJO.mjs","kind":"import-statement"},{"path":"@codemirror/search","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/plugin-attention","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-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["MarkdownEditor","MarkdownEditor_default"],"inputs":{"packages/plugins/plugin-markdown/src/components/MarkdownEditor.tsx":{"bytesInOutput":7262}},"bytes":7491},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-4GGD6YJO.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1044},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-4GGD6YJO.mjs":{"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}],"exports":["MARKDOWN_PLUGIN","meta_default"],"inputs":{"packages/plugins/plugin-markdown/src/meta.tsx":{"bytesInOutput":501}},"bytes":641}}}
|
|
@@ -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_I5GCRBKU_exports = {};
|
|
20
|
+
__export(DocumentEditor_I5GCRBKU_exports, {
|
|
21
|
+
default: () => import_chunk_RVGN72IX.DocumentEditor_default
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
25
|
-
var
|
|
23
|
+
module.exports = __toCommonJS(DocumentEditor_I5GCRBKU_exports);
|
|
24
|
+
var import_chunk_RVGN72IX = require("./chunk-RVGN72IX.cjs");
|
|
25
|
+
var import_chunk_VWQH4WC2 = require("./chunk-VWQH4WC2.cjs");
|
|
26
26
|
var import_chunk_KTYIOXL5 = require("./chunk-KTYIOXL5.cjs");
|
|
27
|
-
var
|
|
27
|
+
var import_chunk_7XIBNEI7 = require("./chunk-7XIBNEI7.cjs");
|
|
28
28
|
var import_chunk_TGMR2CKU = require("./chunk-TGMR2CKU.cjs");
|
|
29
|
-
//# sourceMappingURL=DocumentEditor-
|
|
29
|
+
//# sourceMappingURL=DocumentEditor-I5GCRBKU.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-I5GCRBKU.cjs"],
|
|
4
|
+
"sourcesContent": ["import {\n DocumentEditor_default\n} from \"./chunk-RVGN72IX.cjs\";\nimport \"./chunk-VWQH4WC2.cjs\";\nimport \"./chunk-KTYIOXL5.cjs\";\nimport \"./chunk-7XIBNEI7.cjs\";\nimport \"./chunk-TGMR2CKU.cjs\";\nexport {\n DocumentEditor_default as default\n};\n//# sourceMappingURL=DocumentEditor-I5GCRBKU.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
|
}
|
|
@@ -16,16 +16,16 @@ 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
|
-
MarkdownEditor: () =>
|
|
22
|
-
default: () =>
|
|
19
|
+
var MarkdownEditor_UE23H75V_exports = {};
|
|
20
|
+
__export(MarkdownEditor_UE23H75V_exports, {
|
|
21
|
+
MarkdownEditor: () => import_chunk_7XIBNEI7.MarkdownEditor,
|
|
22
|
+
default: () => import_chunk_7XIBNEI7.MarkdownEditor_default
|
|
23
23
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
25
|
-
var
|
|
24
|
+
module.exports = __toCommonJS(MarkdownEditor_UE23H75V_exports);
|
|
25
|
+
var import_chunk_7XIBNEI7 = require("./chunk-7XIBNEI7.cjs");
|
|
26
26
|
var import_chunk_TGMR2CKU = require("./chunk-TGMR2CKU.cjs");
|
|
27
27
|
// Annotate the CommonJS export names for ESM import in node:
|
|
28
28
|
0 && (module.exports = {
|
|
29
29
|
MarkdownEditor
|
|
30
30
|
});
|
|
31
|
-
//# sourceMappingURL=MarkdownEditor-
|
|
31
|
+
//# sourceMappingURL=MarkdownEditor-UE23H75V.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["MarkdownEditor-
|
|
4
|
-
"sourcesContent": ["import {\n MarkdownEditor,\n MarkdownEditor_default\n} from \"./chunk-
|
|
3
|
+
"sources": ["MarkdownEditor-UE23H75V.cjs"],
|
|
4
|
+
"sourcesContent": ["import {\n MarkdownEditor,\n MarkdownEditor_default\n} from \"./chunk-7XIBNEI7.cjs\";\nimport \"./chunk-TGMR2CKU.cjs\";\nexport {\n MarkdownEditor,\n MarkdownEditor_default as default\n};\n//# sourceMappingURL=MarkdownEditor-UE23H75V.cjs.map\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAGO;AACP,4BAAO;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -26,12 +26,12 @@ 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_7XIBNEI7_exports = {};
|
|
30
|
+
__export(chunk_7XIBNEI7_exports, {
|
|
31
31
|
MarkdownEditor: () => MarkdownEditor,
|
|
32
32
|
MarkdownEditor_default: () => MarkdownEditor_default
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_7XIBNEI7_exports);
|
|
35
35
|
var import_chunk_TGMR2CKU = require("./chunk-TGMR2CKU.cjs");
|
|
36
36
|
var import_search = require("@codemirror/search");
|
|
37
37
|
var import_view = require("@codemirror/view");
|
|
@@ -72,6 +72,7 @@ var MarkdownEditor = ({ id, role = "article", initialValue, extensions, extensio
|
|
|
72
72
|
const commentClickObserver = (0, import_react_ui_editor.useCommentClickListener)(onCommentClick);
|
|
73
73
|
(0, import_app_framework.useIntentResolver)(import_chunk_TGMR2CKU.MARKDOWN_PLUGIN, ({ action, data }) => {
|
|
74
74
|
switch (action) {
|
|
75
|
+
// TODO(burdon): Use fully qualified ids everywhere.
|
|
75
76
|
case import_app_framework.LayoutAction.SCROLL_INTO_VIEW: {
|
|
76
77
|
if (editorView && data?.id === id && data?.cursor) {
|
|
77
78
|
const range = import_react_ui_editor.Cursor.getRangeFromCursor(editorView.state, data.cursor);
|
|
@@ -129,6 +130,7 @@ var MarkdownEditor = ({ id, role = "article", initialValue, extensions, extensio
|
|
|
129
130
|
}),
|
|
130
131
|
(0, import_react_ui_editor.createThemeExtensions)({
|
|
131
132
|
themeMode,
|
|
133
|
+
syntaxHighlighting: true,
|
|
132
134
|
slots: {
|
|
133
135
|
content: {
|
|
134
136
|
className: import_react_ui_editor.editorContent
|
|
@@ -233,4 +235,4 @@ var MarkdownEditor_default = MarkdownEditor;
|
|
|
233
235
|
MarkdownEditor,
|
|
234
236
|
MarkdownEditor_default
|
|
235
237
|
});
|
|
236
|
-
//# sourceMappingURL=chunk-
|
|
238
|
+
//# sourceMappingURL=chunk-7XIBNEI7.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/MarkdownEditor.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { openSearchPanel } from '@codemirror/search';\nimport { EditorView } from '@codemirror/view';\nimport React, { useMemo, useEffect, useCallback } from 'react';\n\nimport {\n type FileInfo,\n LayoutAction,\n type LayoutCoordinate,\n useResolvePlugin,\n useIntentResolver,\n parseLayoutPlugin,\n useIntentDispatcher,\n} from '@dxos/app-framework';\nimport { parseAttentionPlugin } from '@dxos/plugin-attention';\nimport { useThemeContext, useTranslation } from '@dxos/react-ui';\nimport {\n type Action,\n type DNDOptions,\n type EditorViewMode,\n type EditorInputMode,\n type UseTextEditorProps,\n Toolbar,\n createBasicExtensions,\n createMarkdownExtensions,\n createThemeExtensions,\n dropFile,\n processAction,\n useActionHandler,\n useCommentState,\n useCommentClickListener,\n useFormattingState,\n useTextEditor,\n editorContent,\n editorGutter,\n Cursor,\n setSelection,\n} from '@dxos/react-ui-editor';\nimport { sectionToolbarLayout } from '@dxos/react-ui-stack';\nimport { textBlockWidth, focusRing, mx } from '@dxos/react-ui-theme';\nimport { nonNullable } from '@dxos/util';\n\nimport { MARKDOWN_PLUGIN } from '../meta';\nimport type { MarkdownPluginState } from '../types';\n\nconst attentionFragment = mx(\n 'group-focus-within/editor:attention-surface group-[[aria-current]]/editor:attention-surface',\n 'group-focus-within/editor:border-separator',\n);\n\nconst DEFAULT_VIEW_MODE: EditorViewMode = 'preview';\n\nexport type MarkdownEditorProps = {\n id: string;\n coordinate?: LayoutCoordinate;\n inputMode?: EditorInputMode;\n role?: string;\n scrollPastEnd?: boolean;\n toolbar?: boolean;\n viewMode?: EditorViewMode;\n onViewModeChange?: (id: string, mode: EditorViewMode) => void;\n onFileUpload?: (file: File) => Promise<FileInfo | undefined>;\n} & Pick<UseTextEditorProps, 'initialValue' | 'scrollTo' | 'selection' | 'extensions'> &\n Partial<Pick<MarkdownPluginState, 'extensionProviders'>>;\n\nexport const MarkdownEditor = ({\n id,\n role = 'article',\n initialValue,\n extensions,\n extensionProviders,\n scrollPastEnd,\n scrollTo,\n selection,\n toolbar,\n viewMode,\n onFileUpload,\n onViewModeChange,\n}: MarkdownEditorProps) => {\n const { t } = useTranslation(MARKDOWN_PLUGIN);\n const { themeMode } = useThemeContext();\n const dispatch = useIntentDispatcher();\n const attentionPlugin = useResolvePlugin(parseAttentionPlugin);\n const layoutPlugin = useResolvePlugin(parseLayoutPlugin);\n const attended = Array.from(attentionPlugin?.provides.attention?.attended ?? []);\n const isDirectlyAttended = attended.length === 1 && attended[0] === id;\n const [formattingState, formattingObserver] = useFormattingState();\n\n // Extensions from other plugins.\n const providerExtensions = useMemo(() => extensionProviders?.map((provider) => provider({})), [extensionProviders]);\n\n // TODO(Zan): Move these into thread plugin as well?\n const [commentsState, commentObserver] = useCommentState();\n const onCommentClick = useCallback(() => {\n void dispatch({ action: LayoutAction.SET_LAYOUT, data: { element: 'complementary', state: true } });\n }, [dispatch]);\n const commentClickObserver = useCommentClickListener(onCommentClick);\n\n // Focus the space that references the comment.\n useIntentResolver(MARKDOWN_PLUGIN, ({ action, data }) => {\n switch (action) {\n // TODO(burdon): Use fully qualified ids everywhere.\n case LayoutAction.SCROLL_INTO_VIEW: {\n if (editorView && data?.id === id && data?.cursor) {\n // TODO(burdon): We need typed intents.\n const range = Cursor.getRangeFromCursor(editorView.state, data.cursor);\n if (range) {\n const selection = editorView.state.selection.main.from !== range.from ? { anchor: range.from } : undefined;\n const effects = [\n // NOTE: This does not use the DOM scrollIntoView function.\n EditorView.scrollIntoView(range.from, { y: 'start', yMargin: 96 }),\n ];\n if (selection) {\n // Update the editor selection to get bi-directional highlighting.\n effects.push(setSelection.of({ current: id }));\n }\n\n editorView.dispatch({\n effects,\n selection: selection ? { anchor: range.from } : undefined,\n });\n }\n }\n break;\n }\n }\n });\n\n // Drag files.\n const handleDrop: DNDOptions['onDrop'] = async (view, { files }) => {\n const file = files[0];\n const info = file && onFileUpload ? await onFileUpload(file) : undefined;\n if (info) {\n processAction(view, { type: 'image', data: info.url });\n }\n };\n\n const {\n parentRef,\n view: editorView,\n focusAttributes,\n } = useTextEditor(\n () => ({\n initialValue,\n extensions: [\n formattingObserver,\n commentObserver,\n commentClickObserver,\n createBasicExtensions({\n readonly: viewMode === 'readonly',\n placeholder: t('editor placeholder'),\n scrollPastEnd: role === 'section' ? false : scrollPastEnd,\n }),\n createMarkdownExtensions({ themeMode }),\n createThemeExtensions({
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,oBAAgC;AAChC,kBAA2B;AAC3B,mBAAuD;AAEvD,2BAQO;AACP,8BAAqC;AACrC,sBAAgD;AAChD,6BAqBO;AACP,4BAAqC;AACrC,4BAA8C;AAC9C,kBAA4B;AAK5B,IAAMA,wBAAoBC,0BACxB,+FACA,4CAAA;AAGF,IAAMC,oBAAoC;AAenC,IAAMC,iBAAiB,CAAC,EAC7BC,IACAC,OAAO,WACPC,cACAC,YACAC,oBACAC,eACAC,UACAC,WACAC,SACAC,UACAC,cACAC,iBAAgB,MACI;AACpB,QAAM,EAAEC,EAAC,QAAKC,gCAAeC,qCAAAA;AAC7B,QAAM,EAAEC,UAAS,QAAKC,iCAAAA;AACtB,QAAMC,eAAWC,0CAAAA;AACjB,QAAMC,sBAAkBC,uCAAiBC,4CAAAA;AACzC,QAAMC,mBAAeF,uCAAiBG,sCAAAA;AACtC,QAAMC,WAAWC,MAAMC,KAAKP,iBAAiBQ,SAASC,WAAWJ,YAAY,CAAA,CAAE;AAC/E,QAAMK,qBAAqBL,SAASM,WAAW,KAAKN,SAAS,CAAA,MAAOxB;AACpE,QAAM,CAAC+B,iBAAiBC,kBAAAA,QAAsBC,2CAAAA;AAG9C,QAAMC,yBAAqBC,sBAAQ,MAAM/B,oBAAoBgC,IAAI,CAACC,aAAaA,SAAS,CAAC,CAAA,CAAA,GAAK;IAACjC;GAAmB;AAGlH,QAAM,CAACkC,eAAeC,eAAAA,QAAmBC,wCAAAA;AACzC,QAAMC,qBAAiBC,0BAAY,MAAA;AACjC,SAAKzB,SAAS;MAAE0B,QAAQC,kCAAaC;MAAYC,MAAM;QAAEC,SAAS;QAAiBC,OAAO;MAAK;IAAE,CAAA;EACnG,GAAG;IAAC/B;GAAS;AACb,QAAMgC,2BAAuBC,gDAAwBT,cAAAA;AAGrDU,8CAAkBrC,uCAAiB,CAAC,EAAE6B,QAAQG,KAAI,MAAE;AAClD,YAAQH,QAAAA
|
|
6
|
-
"names": ["attentionFragment", "mx", "DEFAULT_VIEW_MODE", "MarkdownEditor", "id", "role", "initialValue", "extensions", "extensionProviders", "scrollPastEnd", "scrollTo", "selection", "toolbar", "viewMode", "onFileUpload", "onViewModeChange", "t", "useTranslation", "MARKDOWN_PLUGIN", "themeMode", "useThemeContext", "dispatch", "useIntentDispatcher", "attentionPlugin", "useResolvePlugin", "parseAttentionPlugin", "layoutPlugin", "parseLayoutPlugin", "attended", "Array", "from", "provides", "attention", "isDirectlyAttended", "length", "formattingState", "formattingObserver", "useFormattingState", "providerExtensions", "useMemo", "map", "provider", "commentsState", "commentObserver", "useCommentState", "onCommentClick", "useCallback", "action", "LayoutAction", "SET_LAYOUT", "data", "element", "state", "commentClickObserver", "useCommentClickListener", "useIntentResolver", "SCROLL_INTO_VIEW", "editorView", "cursor", "range", "Cursor", "getRangeFromCursor", "main", "anchor", "undefined", "effects", "EditorView", "scrollIntoView", "y", "yMargin", "push", "setSelection", "of", "current", "handleDrop", "view", "files", "file", "info", "processAction", "type", "url", "parentRef", "focusAttributes", "useTextEditor", "createBasicExtensions", "readonly", "placeholder", "createMarkdownExtensions", "createThemeExtensions", "slots", "content", "className", "editorContent", "editorGutter", "dropFile", "onDrop", "filter", "nonNullable", "autoFocus", "layout", "moveToEndOfLine", "useTest", "handleToolbarAction", "useActionHandler", "handleAction", "openSearchPanel", "React", "div", "Toolbar", "Root", "classNames", "textBlockWidth", "sectionToolbarLayout", "onAction", "Markdown", "Custom", "onUpload", "Separator", "View", "mode", "Actions", "ref", "data-testid", "data-toolbar", "focusRing", "useEffect", "composer", "window"]
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { openSearchPanel } from '@codemirror/search';\nimport { EditorView } from '@codemirror/view';\nimport React, { useMemo, useEffect, useCallback } from 'react';\n\nimport {\n type FileInfo,\n LayoutAction,\n type LayoutCoordinate,\n useResolvePlugin,\n useIntentResolver,\n parseLayoutPlugin,\n useIntentDispatcher,\n} from '@dxos/app-framework';\nimport { parseAttentionPlugin } from '@dxos/plugin-attention';\nimport { useThemeContext, useTranslation } from '@dxos/react-ui';\nimport {\n type Action,\n type DNDOptions,\n type EditorViewMode,\n type EditorInputMode,\n type UseTextEditorProps,\n Toolbar,\n createBasicExtensions,\n createMarkdownExtensions,\n createThemeExtensions,\n dropFile,\n processAction,\n useActionHandler,\n useCommentState,\n useCommentClickListener,\n useFormattingState,\n useTextEditor,\n editorContent,\n editorGutter,\n Cursor,\n setSelection,\n} from '@dxos/react-ui-editor';\nimport { sectionToolbarLayout } from '@dxos/react-ui-stack';\nimport { textBlockWidth, focusRing, mx } from '@dxos/react-ui-theme';\nimport { nonNullable } from '@dxos/util';\n\nimport { MARKDOWN_PLUGIN } from '../meta';\nimport type { MarkdownPluginState } from '../types';\n\nconst attentionFragment = mx(\n 'group-focus-within/editor:attention-surface group-[[aria-current]]/editor:attention-surface',\n 'group-focus-within/editor:border-separator',\n);\n\nconst DEFAULT_VIEW_MODE: EditorViewMode = 'preview';\n\nexport type MarkdownEditorProps = {\n id: string;\n coordinate?: LayoutCoordinate;\n inputMode?: EditorInputMode;\n role?: string;\n scrollPastEnd?: boolean;\n toolbar?: boolean;\n viewMode?: EditorViewMode;\n onViewModeChange?: (id: string, mode: EditorViewMode) => void;\n onFileUpload?: (file: File) => Promise<FileInfo | undefined>;\n} & Pick<UseTextEditorProps, 'initialValue' | 'scrollTo' | 'selection' | 'extensions'> &\n Partial<Pick<MarkdownPluginState, 'extensionProviders'>>;\n\nexport const MarkdownEditor = ({\n id,\n role = 'article',\n initialValue,\n extensions,\n extensionProviders,\n scrollPastEnd,\n scrollTo,\n selection,\n toolbar,\n viewMode,\n onFileUpload,\n onViewModeChange,\n}: MarkdownEditorProps) => {\n const { t } = useTranslation(MARKDOWN_PLUGIN);\n const { themeMode } = useThemeContext();\n const dispatch = useIntentDispatcher();\n const attentionPlugin = useResolvePlugin(parseAttentionPlugin);\n const layoutPlugin = useResolvePlugin(parseLayoutPlugin);\n const attended = Array.from(attentionPlugin?.provides.attention?.attended ?? []);\n const isDirectlyAttended = attended.length === 1 && attended[0] === id;\n const [formattingState, formattingObserver] = useFormattingState();\n\n // Extensions from other plugins.\n const providerExtensions = useMemo(() => extensionProviders?.map((provider) => provider({})), [extensionProviders]);\n\n // TODO(Zan): Move these into thread plugin as well?\n const [commentsState, commentObserver] = useCommentState();\n const onCommentClick = useCallback(() => {\n void dispatch({ action: LayoutAction.SET_LAYOUT, data: { element: 'complementary', state: true } });\n }, [dispatch]);\n const commentClickObserver = useCommentClickListener(onCommentClick);\n\n // Focus the space that references the comment.\n useIntentResolver(MARKDOWN_PLUGIN, ({ action, data }) => {\n switch (action) {\n // TODO(burdon): Use fully qualified ids everywhere.\n case LayoutAction.SCROLL_INTO_VIEW: {\n if (editorView && data?.id === id && data?.cursor) {\n // TODO(burdon): We need typed intents.\n const range = Cursor.getRangeFromCursor(editorView.state, data.cursor);\n if (range) {\n const selection = editorView.state.selection.main.from !== range.from ? { anchor: range.from } : undefined;\n const effects = [\n // NOTE: This does not use the DOM scrollIntoView function.\n EditorView.scrollIntoView(range.from, { y: 'start', yMargin: 96 }),\n ];\n if (selection) {\n // Update the editor selection to get bi-directional highlighting.\n effects.push(setSelection.of({ current: id }));\n }\n\n editorView.dispatch({\n effects,\n selection: selection ? { anchor: range.from } : undefined,\n });\n }\n }\n break;\n }\n }\n });\n\n // Drag files.\n const handleDrop: DNDOptions['onDrop'] = async (view, { files }) => {\n const file = files[0];\n const info = file && onFileUpload ? await onFileUpload(file) : undefined;\n if (info) {\n processAction(view, { type: 'image', data: info.url });\n }\n };\n\n const {\n parentRef,\n view: editorView,\n focusAttributes,\n } = useTextEditor(\n () => ({\n initialValue,\n extensions: [\n formattingObserver,\n commentObserver,\n commentClickObserver,\n createBasicExtensions({\n readonly: viewMode === 'readonly',\n placeholder: t('editor placeholder'),\n scrollPastEnd: role === 'section' ? false : scrollPastEnd,\n }),\n createMarkdownExtensions({ themeMode }),\n createThemeExtensions({\n themeMode,\n syntaxHighlighting: true,\n slots: { content: { className: editorContent } },\n }),\n editorGutter,\n role !== 'section' && onFileUpload ? dropFile({ onDrop: handleDrop }) : [],\n providerExtensions,\n extensions,\n ].filter(nonNullable),\n ...(role !== 'section' && {\n id,\n scrollTo,\n selection,\n // TODO(wittjosiah): Autofocus based on layout is racy.\n autoFocus: layoutPlugin?.provides.layout ? layoutPlugin?.provides.layout.scrollIntoView === id : true,\n moveToEndOfLine: true,\n }),\n }),\n [id, initialValue, formattingObserver, viewMode, themeMode, extensions, providerExtensions],\n );\n\n useTest(editorView);\n\n // Toolbar handler.\n const handleToolbarAction = useActionHandler(editorView);\n const handleAction = (action: Action) => {\n switch (action.type) {\n case 'search': {\n if (editorView) {\n openSearchPanel(editorView);\n }\n return;\n }\n case 'view-mode': {\n onViewModeChange?.(id, action.data);\n return;\n }\n }\n\n handleToolbarAction?.(action);\n };\n\n return (\n <div\n role='none'\n // TODO(burdon): Move role logic out of here (see sheet, table, sketch, etc.)\n {...(role === 'section'\n ? { className: 'flex flex-col' }\n : {\n className: 'contents group/editor',\n ...(isDirectlyAttended && { 'aria-current': 'location' }),\n })}\n >\n {toolbar && (\n <div role='none' className={mx('flex shrink-0 justify-center overflow-x-auto', attentionFragment)}>\n <Toolbar.Root\n classNames={\n role === 'section'\n ? [\n textBlockWidth,\n 'z-[2] group-focus-within/section:visible',\n !isDirectlyAttended && 'invisible',\n sectionToolbarLayout,\n ]\n : [\n textBlockWidth,\n 'group-focus-within/editor:border-separator group-[[aria-current]]/editor:border-separator',\n ]\n }\n state={formattingState && { ...formattingState, ...commentsState }}\n onAction={handleAction}\n >\n <Toolbar.Markdown />\n {onFileUpload && <Toolbar.Custom onUpload={onFileUpload} />}\n <Toolbar.Separator />\n <Toolbar.View mode={viewMode ?? DEFAULT_VIEW_MODE} />\n <Toolbar.Actions />\n </Toolbar.Root>\n </div>\n )}\n <div\n role='none'\n ref={parentRef}\n data-testid='composer.markdownRoot'\n data-toolbar={toolbar ? 'enabled' : 'disabled'}\n className={\n role === 'section'\n ? mx('flex flex-col flex-1 min-bs-[12rem]', focusRing)\n : mx(\n 'flex is-full bs-full overflow-hidden',\n focusRing,\n attentionFragment,\n 'focus-visible:ring-inset',\n 'data-[toolbar=disabled]:pbs-2 data-[toolbar=disabled]:row-span-2',\n )\n }\n {...focusAttributes}\n />\n </div>\n );\n};\n\n// Expose editor view for playwright tests.\n// TODO(wittjosiah): Find a better way to expose this or find a way to limit it to test runs.\nconst useTest = (view?: EditorView) => {\n useEffect(() => {\n const composer = (window as any).composer;\n if (composer) {\n composer.editorView = view;\n }\n }, [view]);\n};\n\nexport default MarkdownEditor;\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["attentionFragment", "mx", "DEFAULT_VIEW_MODE", "MarkdownEditor", "id", "role", "initialValue", "extensions", "extensionProviders", "scrollPastEnd", "scrollTo", "selection", "toolbar", "viewMode", "onFileUpload", "onViewModeChange", "t", "useTranslation", "MARKDOWN_PLUGIN", "themeMode", "useThemeContext", "dispatch", "useIntentDispatcher", "attentionPlugin", "useResolvePlugin", "parseAttentionPlugin", "layoutPlugin", "parseLayoutPlugin", "attended", "Array", "from", "provides", "attention", "isDirectlyAttended", "length", "formattingState", "formattingObserver", "useFormattingState", "providerExtensions", "useMemo", "map", "provider", "commentsState", "commentObserver", "useCommentState", "onCommentClick", "useCallback", "action", "LayoutAction", "SET_LAYOUT", "data", "element", "state", "commentClickObserver", "useCommentClickListener", "useIntentResolver", "SCROLL_INTO_VIEW", "editorView", "cursor", "range", "Cursor", "getRangeFromCursor", "main", "anchor", "undefined", "effects", "EditorView", "scrollIntoView", "y", "yMargin", "push", "setSelection", "of", "current", "handleDrop", "view", "files", "file", "info", "processAction", "type", "url", "parentRef", "focusAttributes", "useTextEditor", "createBasicExtensions", "readonly", "placeholder", "createMarkdownExtensions", "createThemeExtensions", "syntaxHighlighting", "slots", "content", "className", "editorContent", "editorGutter", "dropFile", "onDrop", "filter", "nonNullable", "autoFocus", "layout", "moveToEndOfLine", "useTest", "handleToolbarAction", "useActionHandler", "handleAction", "openSearchPanel", "React", "div", "Toolbar", "Root", "classNames", "textBlockWidth", "sectionToolbarLayout", "onAction", "Markdown", "Custom", "onUpload", "Separator", "View", "mode", "Actions", "ref", "data-testid", "data-toolbar", "focusRing", "useEffect", "composer", "window"]
|
|
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_RVGN72IX_exports = {};
|
|
30
|
+
__export(chunk_RVGN72IX_exports, {
|
|
31
31
|
DocumentEditor_default: () => DocumentEditor_default,
|
|
32
32
|
getFallbackName: () => getFallbackName,
|
|
33
33
|
isMarkdownProperties: () => isMarkdownProperties,
|
|
@@ -35,10 +35,10 @@ __export(chunk_MFMEH5GP_exports, {
|
|
|
35
35
|
serializer: () => serializer,
|
|
36
36
|
setFallbackName: () => setFallbackName
|
|
37
37
|
});
|
|
38
|
-
module.exports = __toCommonJS(
|
|
39
|
-
var
|
|
38
|
+
module.exports = __toCommonJS(chunk_RVGN72IX_exports);
|
|
39
|
+
var import_chunk_VWQH4WC2 = require("./chunk-VWQH4WC2.cjs");
|
|
40
40
|
var import_chunk_KTYIOXL5 = require("./chunk-KTYIOXL5.cjs");
|
|
41
|
-
var
|
|
41
|
+
var import_chunk_7XIBNEI7 = require("./chunk-7XIBNEI7.cjs");
|
|
42
42
|
var import_react = __toESM(require("react"));
|
|
43
43
|
var import_app_framework = require("@dxos/app-framework");
|
|
44
44
|
var import_echo = require("@dxos/react-client/echo");
|
|
@@ -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_VWQH4WC2.DocumentType, {
|
|
74
74
|
name,
|
|
75
|
-
content: (0, import_echo2.create)(
|
|
75
|
+
content: (0, import_echo2.create)(import_chunk_VWQH4WC2.TextType, {
|
|
76
76
|
content
|
|
77
77
|
}),
|
|
78
78
|
threads: []
|
|
@@ -163,7 +163,7 @@ var DocumentEditor = ({ document: doc, extensionProviders = [], viewMode, settin
|
|
|
163
163
|
fileManagerPlugin,
|
|
164
164
|
space
|
|
165
165
|
]);
|
|
166
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
166
|
+
return /* @__PURE__ */ import_react.default.createElement(import_chunk_7XIBNEI7.MarkdownEditor_default, {
|
|
167
167
|
id,
|
|
168
168
|
initialValue,
|
|
169
169
|
extensions,
|
|
@@ -186,4 +186,4 @@ var DocumentEditor_default = DocumentEditor;
|
|
|
186
186
|
serializer,
|
|
187
187
|
setFallbackName
|
|
188
188
|
});
|
|
189
|
-
//# sourceMappingURL=chunk-
|
|
189
|
+
//# sourceMappingURL=chunk-RVGN72IX.cjs.map
|
|
@@ -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_VWQH4WC2_exports = {};
|
|
20
|
+
__export(chunk_VWQH4WC2_exports, {
|
|
21
21
|
DocumentType: () => DocumentType,
|
|
22
22
|
MarkdownAction: () => MarkdownAction,
|
|
23
23
|
TextType: () => TextType
|
|
24
24
|
});
|
|
25
|
-
module.exports = __toCommonJS(
|
|
25
|
+
module.exports = __toCommonJS(chunk_VWQH4WC2_exports);
|
|
26
26
|
var import_chunk_TGMR2CKU = require("./chunk-TGMR2CKU.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-VWQH4WC2.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 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 ExtensionsProvider = (props: { document?: DocumentType }) => Extension[];\n\nexport type OnChange = (text: string) => void;\n\nexport type MarkdownExtensionProvides = {\n markdown: {\n extensions: ExtensionsProvider;\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<ExtensionsProvider>[];\n\n // TODO(burdon): Extend view mode per document to include scroll position, etc.\n // View mode per document.\n viewMode: { [key: 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\nexport type MarkdownPluginProvides = SurfaceProvides &\n IntentResolverProvides &\n GraphBuilderProvides &\n GraphSerializerProvides &\n MetadataRecordsProvides &\n SettingsProvides<MarkdownSettingsProps> &\n TranslationsProvides &\n SchemaProvides &\n StackProvides
|
|
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 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 ExtensionsProvider = (props: { document?: DocumentType }) => Extension[];\n\nexport type OnChange = (text: string) => void;\n\nexport type MarkdownExtensionProvides = {\n markdown: {\n extensions: ExtensionsProvider;\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<ExtensionsProvider>[];\n\n // TODO(burdon): Extend view mode per document to include scroll position, etc.\n // View mode per document.\n viewMode: { [key: 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\n// when we implement comments in sheets.\ntype ThreadProvides<T> = {\n thread: {\n predicate: (obj: any) => obj is T;\n createSort: (obj: T) => (anchorA: string, anchorB: string) => number;\n };\n};\n\nexport type MarkdownPluginProvides = SurfaceProvides &\n IntentResolverProvides &\n GraphBuilderProvides &\n GraphSerializerProvides &\n MetadataRecordsProvides &\n SettingsProvides<MarkdownSettingsProps> &\n TranslationsProvides &\n SchemaProvides &\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;ACGJ,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
|
}
|