@dxos/plugin-markdown 0.6.12-main.ed7cda7 → 0.6.12-staging.e11e696
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/MarkdownContainer-OWVU5WMN.mjs +467 -0
- package/dist/lib/browser/MarkdownContainer-OWVU5WMN.mjs.map +7 -0
- package/dist/lib/browser/chunk-7WORDTCY.mjs +50 -0
- package/dist/lib/browser/chunk-7WORDTCY.mjs.map +7 -0
- package/dist/lib/browser/{chunk-R6CSLNWW.mjs → chunk-OUZCML5B.mjs} +3 -1
- package/dist/lib/browser/chunk-OUZCML5B.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +54 -101
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/types/index.mjs +5 -3
- package/dist/lib/node/MarkdownContainer-IWMLWI6Z.cjs +482 -0
- package/dist/lib/node/MarkdownContainer-IWMLWI6Z.cjs.map +7 -0
- package/dist/lib/node/{chunk-MCA5BBJR.cjs → chunk-HVDIBL5H.cjs} +9 -6
- package/dist/lib/node/chunk-HVDIBL5H.cjs.map +7 -0
- package/dist/lib/node/chunk-L2FIDO4L.cjs +72 -0
- package/dist/lib/node/chunk-L2FIDO4L.cjs.map +7 -0
- package/dist/lib/node/index.cjs +76 -119
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/types/index.cjs +7 -5
- package/dist/lib/node/types/index.cjs.map +2 -2
- package/dist/lib/node-esm/MarkdownContainer-MLTDWWGB.mjs +468 -0
- package/dist/lib/node-esm/MarkdownContainer-MLTDWWGB.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-W525OVFX.mjs → chunk-4AGP7IJE.mjs} +3 -1
- package/dist/lib/node-esm/chunk-4AGP7IJE.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-YOIARYUO.mjs +51 -0
- package/dist/lib/node-esm/chunk-YOIARYUO.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +54 -101
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/types/index.mjs +5 -3
- package/dist/types/src/MarkdownPlugin.d.ts.map +1 -1
- package/dist/types/src/components/MarkdownContainer.d.ts +15 -0
- package/dist/types/src/components/MarkdownContainer.d.ts.map +1 -0
- package/dist/types/src/components/MarkdownEditor.d.ts +7 -2
- package/dist/types/src/components/MarkdownEditor.d.ts.map +1 -1
- package/dist/types/src/components/MarkdownEditor.stories.d.ts +3 -3
- package/dist/types/src/components/MarkdownEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -11
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/extensions.d.ts +11 -15
- package/dist/types/src/extensions.d.ts.map +1 -1
- package/dist/types/src/types/document.d.ts +8 -1
- package/dist/types/src/types/document.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 +32 -31
- package/src/MarkdownPlugin.tsx +31 -86
- package/src/components/MarkdownContainer.tsx +108 -0
- package/src/components/MarkdownEditor.stories.tsx +11 -5
- package/src/components/MarkdownEditor.tsx +25 -35
- package/src/components/index.ts +2 -14
- package/src/extensions.tsx +124 -67
- package/src/types/document.ts +12 -0
- package/src/types/types.ts +5 -3
- package/dist/lib/browser/DocumentCard-RKENHCNE.mjs +0 -11
- package/dist/lib/browser/DocumentCard-RKENHCNE.mjs.map +0 -7
- package/dist/lib/browser/DocumentEditor-FAXQRX37.mjs +0 -11
- package/dist/lib/browser/DocumentEditor-FAXQRX37.mjs.map +0 -7
- package/dist/lib/browser/MarkdownEditor-5EUT7P66.mjs +0 -10
- package/dist/lib/browser/MarkdownEditor-5EUT7P66.mjs.map +0 -7
- package/dist/lib/browser/chunk-354DCID5.mjs +0 -117
- package/dist/lib/browser/chunk-354DCID5.mjs.map +0 -7
- package/dist/lib/browser/chunk-AFWT6Z7B.mjs +0 -86
- package/dist/lib/browser/chunk-AFWT6Z7B.mjs.map +0 -7
- package/dist/lib/browser/chunk-AVGUYNPR.mjs +0 -220
- package/dist/lib/browser/chunk-AVGUYNPR.mjs.map +0 -7
- package/dist/lib/browser/chunk-JDTH4A4I.mjs +0 -166
- package/dist/lib/browser/chunk-JDTH4A4I.mjs.map +0 -7
- package/dist/lib/browser/chunk-R6CSLNWW.mjs.map +0 -7
- package/dist/lib/node/DocumentCard-ECPKHJT7.cjs +0 -32
- package/dist/lib/node/DocumentCard-ECPKHJT7.cjs.map +0 -7
- package/dist/lib/node/DocumentEditor-YVZTTY5L.cjs +0 -29
- package/dist/lib/node/DocumentEditor-YVZTTY5L.cjs.map +0 -7
- package/dist/lib/node/MarkdownEditor-ZD4W4UJ6.cjs +0 -31
- package/dist/lib/node/MarkdownEditor-ZD4W4UJ6.cjs.map +0 -7
- package/dist/lib/node/chunk-2T7LIVPT.cjs +0 -246
- package/dist/lib/node/chunk-2T7LIVPT.cjs.map +0 -7
- package/dist/lib/node/chunk-5ZWOR7JF.cjs +0 -114
- package/dist/lib/node/chunk-5ZWOR7JF.cjs.map +0 -7
- package/dist/lib/node/chunk-KTYIOXL5.cjs +0 -149
- package/dist/lib/node/chunk-KTYIOXL5.cjs.map +0 -7
- package/dist/lib/node/chunk-MCA5BBJR.cjs.map +0 -7
- package/dist/lib/node/chunk-OEWBZFBF.cjs +0 -191
- package/dist/lib/node/chunk-OEWBZFBF.cjs.map +0 -7
- package/dist/lib/node-esm/DocumentCard-RHVY4Z6L.mjs +0 -12
- package/dist/lib/node-esm/DocumentCard-RHVY4Z6L.mjs.map +0 -7
- package/dist/lib/node-esm/DocumentEditor-JBVVPEYE.mjs +0 -12
- package/dist/lib/node-esm/DocumentEditor-JBVVPEYE.mjs.map +0 -7
- package/dist/lib/node-esm/MarkdownEditor-OS7YG6MA.mjs +0 -11
- package/dist/lib/node-esm/MarkdownEditor-OS7YG6MA.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-OE3CMI5X.mjs +0 -87
- package/dist/lib/node-esm/chunk-OE3CMI5X.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QARGBUBS.mjs +0 -221
- package/dist/lib/node-esm/chunk-QARGBUBS.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-RO5FEVW6.mjs +0 -119
- package/dist/lib/node-esm/chunk-RO5FEVW6.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UG4MIBCA.mjs +0 -167
- package/dist/lib/node-esm/chunk-UG4MIBCA.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-W525OVFX.mjs.map +0 -7
- package/dist/types/src/components/DocumentCard.d.ts +0 -16
- package/dist/types/src/components/DocumentCard.d.ts.map +0 -1
- package/dist/types/src/components/DocumentEditor.d.ts +0 -14
- package/dist/types/src/components/DocumentEditor.d.ts.map +0 -1
- package/dist/types/src/components/HeadingMenu.d.ts +0 -13
- package/dist/types/src/components/HeadingMenu.d.ts.map +0 -1
- package/dist/types/src/components/Layout.d.ts +0 -6
- package/dist/types/src/components/Layout.d.ts.map +0 -1
- package/src/components/DocumentCard.tsx +0 -107
- package/src/components/DocumentEditor.tsx +0 -139
- package/src/components/HeadingMenu.tsx +0 -46
- package/src/components/Layout.tsx +0 -27
|
@@ -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/meta.tsx":{"bytes":1551,"imports":[{"path":"@dxos/app-framework","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/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":24631,"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":3473,"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":4453,"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/extensions.tsx":{"bytes":23896,"imports":[{"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-client/halo","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-editor","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/util.tsx","kind":"import-statement","original":"./util"}],"format":"esm"},"packages/plugins/plugin-markdown/src/components/MarkdownContainer.tsx":{"bytes":10803,"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-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/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/components/index.ts":{"bytes":958,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/src/components/MarkdownSettings.tsx","kind":"import-statement","original":"./MarkdownSettings"},{"path":"packages/plugins/plugin-markdown/src/components/MarkdownContainer.tsx","kind":"dynamic-import","original":"./MarkdownContainer"}],"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":44505,"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":"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":29305},"packages/plugins/plugin-markdown/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-7WORDTCY.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-OUZCML5B.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":"react","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/MarkdownContainer-OWVU5WMN.mjs","kind":"dynamic-import"}],"exports":["DocumentType","MarkdownAction","MarkdownPlugin","TextType","default","getFallbackName","isEditorModel","isMarkdownProperties","markdownExtensionPlugins","serializer","setFallbackName"],"entryPoint":"packages/plugins/plugin-markdown/src/index.ts","inputs":{"packages/plugins/plugin-markdown/src/MarkdownPlugin.tsx":{"bytesInOutput":11576},"packages/plugins/plugin-markdown/src/components/index.ts":{"bytesInOutput":115},"packages/plugins/plugin-markdown/src/components/MarkdownSettings.tsx":{"bytesInOutput":3448},"packages/plugins/plugin-markdown/src/translations.ts":{"bytesInOutput":1463},"packages/plugins/plugin-markdown/src/index.ts":{"bytesInOutput":34}},"bytes":17634},"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-OUZCML5B.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-2SJN46PA.mjs","kind":"import-statement"}],"exports":["DocumentType","MarkdownAction","TextType","isEditorModel"],"entryPoint":"packages/plugins/plugin-markdown/src/types/index.ts","inputs":{},"bytes":244},"packages/plugins/plugin-markdown/dist/lib/browser/MarkdownContainer-OWVU5WMN.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":33617},"packages/plugins/plugin-markdown/dist/lib/browser/MarkdownContainer-OWVU5WMN.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-7WORDTCY.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-OUZCML5B.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/app-framework","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":"@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},{"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-client/halo","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-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":["DocumentEditor","default"],"entryPoint":"packages/plugins/plugin-markdown/src/components/MarkdownContainer.tsx","inputs":{"packages/plugins/plugin-markdown/src/components/MarkdownContainer.tsx":{"bytesInOutput":2232},"packages/plugins/plugin-markdown/src/components/MarkdownEditor.tsx":{"bytesInOutput":5744},"packages/plugins/plugin-markdown/src/hooks/useSelectCurrentThread.tsx":{"bytesInOutput":1356},"packages/plugins/plugin-markdown/src/hooks/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-markdown/src/extensions.tsx":{"bytesInOutput":5517}},"bytes":15584},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-7WORDTCY.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3498},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-7WORDTCY.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/browser/chunk-OUZCML5B.mjs","kind":"import-statement"},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["getFallbackName","isMarkdownProperties","markdownExtensionPlugins","serializer","setFallbackName"],"inputs":{"packages/plugins/plugin-markdown/src/util.tsx":{"bytesInOutput":1246}},"bytes":1523},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-OUZCML5B.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4599},"packages/plugins/plugin-markdown/dist/lib/browser/chunk-OUZCML5B.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","isEditorModel"],"inputs":{"packages/plugins/plugin-markdown/src/types/document.ts":{"bytesInOutput":661},"packages/plugins/plugin-markdown/src/types/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-markdown/src/types/types.ts":{"bytesInOutput":340}},"bytes":1293},"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,12 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DocumentType,
|
|
3
3
|
MarkdownAction,
|
|
4
|
-
TextType
|
|
5
|
-
|
|
4
|
+
TextType,
|
|
5
|
+
isEditorModel
|
|
6
|
+
} from "../chunk-OUZCML5B.mjs";
|
|
6
7
|
import "../chunk-2SJN46PA.mjs";
|
|
7
8
|
export {
|
|
8
9
|
DocumentType,
|
|
9
10
|
MarkdownAction,
|
|
10
|
-
TextType
|
|
11
|
+
TextType,
|
|
12
|
+
isEditorModel
|
|
11
13
|
};
|
|
12
14
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,482 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var MarkdownContainer_IWMLWI6Z_exports = {};
|
|
30
|
+
__export(MarkdownContainer_IWMLWI6Z_exports, {
|
|
31
|
+
DocumentEditor: () => DocumentEditor,
|
|
32
|
+
default: () => MarkdownContainer_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(MarkdownContainer_IWMLWI6Z_exports);
|
|
35
|
+
var import_chunk_L2FIDO4L = require("./chunk-L2FIDO4L.cjs");
|
|
36
|
+
var import_chunk_HVDIBL5H = require("./chunk-HVDIBL5H.cjs");
|
|
37
|
+
var import_chunk_LPD4NOTH = require("./chunk-LPD4NOTH.cjs");
|
|
38
|
+
var import_react = __toESM(require("react"));
|
|
39
|
+
var import_app_framework = require("@dxos/app-framework");
|
|
40
|
+
var import_echo = require("@dxos/react-client/echo");
|
|
41
|
+
var import_react_ui_editor = require("@dxos/react-ui-editor");
|
|
42
|
+
var import_search = require("@codemirror/search");
|
|
43
|
+
var import_react2 = __toESM(require("react"));
|
|
44
|
+
var import_app_framework2 = require("@dxos/app-framework");
|
|
45
|
+
var import_react_ui = require("@dxos/react-ui");
|
|
46
|
+
var import_react_ui_attention = require("@dxos/react-ui-attention");
|
|
47
|
+
var import_react_ui_editor2 = require("@dxos/react-ui-editor");
|
|
48
|
+
var import_react_ui_stack = require("@dxos/react-ui-stack");
|
|
49
|
+
var import_react_ui_theme = require("@dxos/react-ui-theme");
|
|
50
|
+
var import_util = require("@dxos/util");
|
|
51
|
+
var import_view = require("@codemirror/view");
|
|
52
|
+
var import_react3 = require("react");
|
|
53
|
+
var import_app_framework3 = require("@dxos/app-framework");
|
|
54
|
+
var import_react_ui_editor3 = require("@dxos/react-ui-editor");
|
|
55
|
+
var import_react4 = __toESM(require("react"));
|
|
56
|
+
var import_client = require("react-dom/client");
|
|
57
|
+
var import_app_framework4 = require("@dxos/app-framework");
|
|
58
|
+
var import_invariant = require("@dxos/invariant");
|
|
59
|
+
var import_echo2 = require("@dxos/react-client/echo");
|
|
60
|
+
var import_halo = require("@dxos/react-client/halo");
|
|
61
|
+
var import_react_ui2 = require("@dxos/react-ui");
|
|
62
|
+
var import_react_ui_editor4 = require("@dxos/react-ui-editor");
|
|
63
|
+
var import_react_ui_editor5 = require("@dxos/react-ui-editor");
|
|
64
|
+
var import_react_ui_theme2 = require("@dxos/react-ui-theme");
|
|
65
|
+
var import_util2 = require("@dxos/util");
|
|
66
|
+
var useSelectCurrentThread = (editorView, documentId) => {
|
|
67
|
+
const handleScrollIntoView = (0, import_react3.useCallback)(({ action, data }) => {
|
|
68
|
+
if (action === import_app_framework3.LayoutAction.SCROLL_INTO_VIEW) {
|
|
69
|
+
if (editorView && data?.id === documentId && data?.cursor) {
|
|
70
|
+
const range = import_react_ui_editor3.Cursor.getRangeFromCursor(editorView.state, data.cursor);
|
|
71
|
+
if (range) {
|
|
72
|
+
const selection = editorView.state.selection.main.from !== range.from ? {
|
|
73
|
+
anchor: range.from
|
|
74
|
+
} : void 0;
|
|
75
|
+
const effects = [
|
|
76
|
+
// NOTE: This does not use the DOM scrollIntoView function.
|
|
77
|
+
import_view.EditorView.scrollIntoView(range.from, {
|
|
78
|
+
y: "start",
|
|
79
|
+
yMargin: 96
|
|
80
|
+
})
|
|
81
|
+
];
|
|
82
|
+
if (selection) {
|
|
83
|
+
effects.push(import_react_ui_editor3.setSelection.of({
|
|
84
|
+
current: documentId
|
|
85
|
+
}));
|
|
86
|
+
}
|
|
87
|
+
editorView.dispatch({
|
|
88
|
+
effects,
|
|
89
|
+
selection: selection ? {
|
|
90
|
+
anchor: range.from
|
|
91
|
+
} : void 0
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}, [
|
|
97
|
+
documentId,
|
|
98
|
+
editorView
|
|
99
|
+
]);
|
|
100
|
+
(0, import_app_framework3.useIntentResolver)(import_chunk_LPD4NOTH.MARKDOWN_PLUGIN, handleScrollIntoView);
|
|
101
|
+
};
|
|
102
|
+
var DEFAULT_VIEW_MODE = "preview";
|
|
103
|
+
var MarkdownEditor = ({ id, role = "article", initialValue, extensions, extensionProviders, scrollPastEnd, scrollTo, selection, toolbar, viewMode, onFileUpload, onViewModeChange }) => {
|
|
104
|
+
const { t } = (0, import_react_ui.useTranslation)(import_chunk_LPD4NOTH.MARKDOWN_PLUGIN);
|
|
105
|
+
const { themeMode } = (0, import_react_ui.useThemeContext)();
|
|
106
|
+
const dispatch = (0, import_app_framework2.useIntentDispatcher)();
|
|
107
|
+
const [formattingState, formattingObserver] = (0, import_react_ui_editor2.useFormattingState)();
|
|
108
|
+
const attendableAttributes = (0, import_react_ui_attention.useAttendableAttributes)(id);
|
|
109
|
+
const { hasAttention } = (0, import_react_ui_attention.useAttention)(id);
|
|
110
|
+
const providerExtensions = (0, import_react2.useMemo)(() => extensionProviders?.flatMap((provider) => provider({})).filter(import_util.nonNullable), [
|
|
111
|
+
extensionProviders
|
|
112
|
+
]);
|
|
113
|
+
const [commentsState, commentObserver] = (0, import_react_ui_editor2.useCommentState)();
|
|
114
|
+
const onCommentClick = (0, import_react2.useCallback)(() => {
|
|
115
|
+
void dispatch({
|
|
116
|
+
action: import_app_framework2.LayoutAction.SET_LAYOUT,
|
|
117
|
+
data: {
|
|
118
|
+
element: "complementary",
|
|
119
|
+
state: true
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
}, [
|
|
123
|
+
dispatch
|
|
124
|
+
]);
|
|
125
|
+
const commentClickObserver = (0, import_react_ui_editor2.useCommentClickListener)(onCommentClick);
|
|
126
|
+
const handleDrop = async (view, { files }) => {
|
|
127
|
+
const file = files[0];
|
|
128
|
+
const info = file && onFileUpload ? await onFileUpload(file) : void 0;
|
|
129
|
+
if (info) {
|
|
130
|
+
(0, import_react_ui_editor2.processAction)(view, {
|
|
131
|
+
type: "image",
|
|
132
|
+
data: info.url
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
const { parentRef, view: editorView, focusAttributes } = (0, import_react_ui_editor2.useTextEditor)(() => ({
|
|
137
|
+
initialValue,
|
|
138
|
+
extensions: [
|
|
139
|
+
formattingObserver,
|
|
140
|
+
commentObserver,
|
|
141
|
+
commentClickObserver,
|
|
142
|
+
(0, import_react_ui_editor2.createBasicExtensions)({
|
|
143
|
+
readonly: viewMode === "readonly",
|
|
144
|
+
placeholder: t("editor placeholder"),
|
|
145
|
+
scrollPastEnd: role === "section" ? false : scrollPastEnd
|
|
146
|
+
}),
|
|
147
|
+
(0, import_react_ui_editor2.createMarkdownExtensions)({
|
|
148
|
+
themeMode
|
|
149
|
+
}),
|
|
150
|
+
(0, import_react_ui_editor2.createThemeExtensions)({
|
|
151
|
+
themeMode,
|
|
152
|
+
syntaxHighlighting: true,
|
|
153
|
+
slots: {
|
|
154
|
+
content: {
|
|
155
|
+
className: import_react_ui_editor2.editorContent
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}),
|
|
159
|
+
import_react_ui_editor2.editorGutter,
|
|
160
|
+
role !== "section" && onFileUpload && (0, import_react_ui_editor2.dropFile)({
|
|
161
|
+
onDrop: handleDrop
|
|
162
|
+
}),
|
|
163
|
+
providerExtensions,
|
|
164
|
+
extensions
|
|
165
|
+
].filter(import_util.isNotFalsy),
|
|
166
|
+
...role !== "section" && {
|
|
167
|
+
id,
|
|
168
|
+
scrollTo,
|
|
169
|
+
selection,
|
|
170
|
+
// TODO(wittjosiah): Autofocus based on layout is racy.
|
|
171
|
+
// autoFocus: layoutPlugin?.provides.layout ? layoutPlugin?.provides.layout.scrollIntoView === id : true,
|
|
172
|
+
moveToEndOfLine: true
|
|
173
|
+
}
|
|
174
|
+
}), [
|
|
175
|
+
id,
|
|
176
|
+
initialValue,
|
|
177
|
+
formattingObserver,
|
|
178
|
+
viewMode,
|
|
179
|
+
themeMode,
|
|
180
|
+
extensions,
|
|
181
|
+
providerExtensions
|
|
182
|
+
]);
|
|
183
|
+
useTest(editorView);
|
|
184
|
+
useSelectCurrentThread(editorView, id);
|
|
185
|
+
const handleToolbarAction = (0, import_react_ui_editor2.useActionHandler)(editorView);
|
|
186
|
+
const handleAction = (action) => {
|
|
187
|
+
switch (action.type) {
|
|
188
|
+
case "search": {
|
|
189
|
+
if (editorView) {
|
|
190
|
+
(0, import_search.openSearchPanel)(editorView);
|
|
191
|
+
}
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
case "view-mode": {
|
|
195
|
+
onViewModeChange?.(id, action.data);
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
handleToolbarAction?.(action);
|
|
200
|
+
};
|
|
201
|
+
return /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
202
|
+
role: "none",
|
|
203
|
+
...role === "section" ? {
|
|
204
|
+
className: "flex flex-col"
|
|
205
|
+
} : {
|
|
206
|
+
className: "contents",
|
|
207
|
+
// TODO(wittjosiah): Factor out to `useAttendableAttributes`?
|
|
208
|
+
...hasAttention && {
|
|
209
|
+
"aria-current": "location"
|
|
210
|
+
},
|
|
211
|
+
...attendableAttributes
|
|
212
|
+
}
|
|
213
|
+
}, toolbar && /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
214
|
+
role: "none",
|
|
215
|
+
className: "flex shrink-0 justify-center overflow-x-auto attention-surface"
|
|
216
|
+
}, /* @__PURE__ */ import_react2.default.createElement(import_react_ui_editor2.Toolbar.Root, {
|
|
217
|
+
classNames: role === "section" ? [
|
|
218
|
+
import_react_ui_theme.textBlockWidth,
|
|
219
|
+
"z-[2] group-focus-within/section:visible",
|
|
220
|
+
!hasAttention && "invisible",
|
|
221
|
+
import_react_ui_stack.sectionToolbarLayout
|
|
222
|
+
] : [
|
|
223
|
+
import_react_ui_theme.textBlockWidth
|
|
224
|
+
],
|
|
225
|
+
state: formattingState && {
|
|
226
|
+
...formattingState,
|
|
227
|
+
...commentsState
|
|
228
|
+
},
|
|
229
|
+
onAction: handleAction
|
|
230
|
+
}, /* @__PURE__ */ import_react2.default.createElement(import_react_ui_editor2.Toolbar.Markdown, null), onFileUpload && /* @__PURE__ */ import_react2.default.createElement(import_react_ui_editor2.Toolbar.Custom, {
|
|
231
|
+
onUpload: onFileUpload
|
|
232
|
+
}), /* @__PURE__ */ import_react2.default.createElement(import_react_ui_editor2.Toolbar.Separator, null), /* @__PURE__ */ import_react2.default.createElement(import_react_ui_editor2.Toolbar.View, {
|
|
233
|
+
mode: viewMode ?? DEFAULT_VIEW_MODE
|
|
234
|
+
}), /* @__PURE__ */ import_react2.default.createElement(import_react_ui_editor2.Toolbar.Actions, null))), /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
235
|
+
role: "none",
|
|
236
|
+
ref: parentRef,
|
|
237
|
+
"data-testid": "composer.markdownRoot",
|
|
238
|
+
"data-toolbar": toolbar ? "enabled" : "disabled",
|
|
239
|
+
className: role === "section" ? (0, import_react_ui_theme.mx)("flex flex-col flex-1 min-bs-[12rem]", import_react_ui_theme.focusRing) : (0, import_react_ui_theme.mx)("flex is-full bs-full overflow-hidden", import_react_ui_theme.focusRing, "focus-visible:ring-inset attention-surface", "p-0.5", "data-[toolbar=disabled]:pbs-2 data-[toolbar=disabled]:row-span-2"),
|
|
240
|
+
...focusAttributes
|
|
241
|
+
}));
|
|
242
|
+
};
|
|
243
|
+
var useTest = (view) => {
|
|
244
|
+
(0, import_react2.useEffect)(() => {
|
|
245
|
+
const composer = window.composer;
|
|
246
|
+
if (composer) {
|
|
247
|
+
composer.editorView = view;
|
|
248
|
+
}
|
|
249
|
+
}, [
|
|
250
|
+
view
|
|
251
|
+
]);
|
|
252
|
+
};
|
|
253
|
+
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-markdown/src/extensions.tsx";
|
|
254
|
+
var useExtensions = ({ extensionProviders, document, settings, viewMode }) => {
|
|
255
|
+
const dispatch = (0, import_app_framework4.useIntentDispatcher)();
|
|
256
|
+
const identity = (0, import_halo.useIdentity)();
|
|
257
|
+
const space = (0, import_echo2.getSpace)(document);
|
|
258
|
+
const baseExtensions = (0, import_react4.useMemo)(() => createBaseExtensions({
|
|
259
|
+
document,
|
|
260
|
+
settings,
|
|
261
|
+
viewMode,
|
|
262
|
+
dispatch
|
|
263
|
+
}), [
|
|
264
|
+
document,
|
|
265
|
+
viewMode,
|
|
266
|
+
dispatch,
|
|
267
|
+
settings,
|
|
268
|
+
settings.folding,
|
|
269
|
+
settings.numberedHeadings
|
|
270
|
+
]);
|
|
271
|
+
const pluginExtensions = (0, import_react4.useMemo)(() => extensionProviders?.reduce((acc, provider) => {
|
|
272
|
+
const extension = typeof provider === "function" ? provider({
|
|
273
|
+
document
|
|
274
|
+
}) : provider;
|
|
275
|
+
if (extension) {
|
|
276
|
+
acc.push(extension);
|
|
277
|
+
}
|
|
278
|
+
return acc;
|
|
279
|
+
}, []), [
|
|
280
|
+
extensionProviders
|
|
281
|
+
]);
|
|
282
|
+
return (0, import_react4.useMemo)(() => [
|
|
283
|
+
// NOTE: Data extensions must be first so that automerge is updated before other extensions compute their state.
|
|
284
|
+
(0, import_react_ui_editor4.createDataExtensions)({
|
|
285
|
+
id: document.id,
|
|
286
|
+
text: document.content && (0, import_echo2.createDocAccessor)(document.content, [
|
|
287
|
+
"content"
|
|
288
|
+
]),
|
|
289
|
+
space,
|
|
290
|
+
identity
|
|
291
|
+
}),
|
|
292
|
+
(0, import_react_ui_editor4.state)(import_react_ui_editor4.localStorageStateStoreAdapter),
|
|
293
|
+
(0, import_react_ui_editor4.listener)({
|
|
294
|
+
onChange: (text) => (0, import_chunk_L2FIDO4L.setFallbackName)(document, text)
|
|
295
|
+
}),
|
|
296
|
+
baseExtensions,
|
|
297
|
+
pluginExtensions
|
|
298
|
+
].filter(import_util2.isNotFalsy), [
|
|
299
|
+
baseExtensions,
|
|
300
|
+
pluginExtensions,
|
|
301
|
+
document,
|
|
302
|
+
document.content,
|
|
303
|
+
space,
|
|
304
|
+
identity
|
|
305
|
+
]);
|
|
306
|
+
};
|
|
307
|
+
var createBaseExtensions = ({ document, dispatch, settings, query, viewMode }) => {
|
|
308
|
+
const extensions = [
|
|
309
|
+
settings.editorInputMode && import_react_ui_editor5.InputModeExtensions[settings.editorInputMode],
|
|
310
|
+
settings.folding && (0, import_react_ui_editor5.folding)()
|
|
311
|
+
].filter(import_util2.isNotFalsy);
|
|
312
|
+
if (viewMode !== "source") {
|
|
313
|
+
extensions.push(...[
|
|
314
|
+
(0, import_react_ui_editor5.formattingKeymap)(),
|
|
315
|
+
(0, import_react_ui_editor5.decorateMarkdown)({
|
|
316
|
+
selectionChangeDelay: 100,
|
|
317
|
+
numberedHeadings: settings.numberedHeadings ? {
|
|
318
|
+
from: 2
|
|
319
|
+
} : void 0,
|
|
320
|
+
// TODO(wittjosiah): For internal links, consider ignoring the link text and rendering the label of the object being linked to.
|
|
321
|
+
renderLinkButton: dispatch && document ? onRenderLink((id) => {
|
|
322
|
+
void dispatch({
|
|
323
|
+
action: import_app_framework4.NavigationAction.ADD_TO_ACTIVE,
|
|
324
|
+
data: {
|
|
325
|
+
id,
|
|
326
|
+
part: "main",
|
|
327
|
+
pivotId: (0, import_echo2.fullyQualifiedId)(document),
|
|
328
|
+
scrollIntoView: true
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
}) : void 0
|
|
332
|
+
}),
|
|
333
|
+
(0, import_react_ui_editor5.linkTooltip)(renderLinkTooltip)
|
|
334
|
+
]);
|
|
335
|
+
}
|
|
336
|
+
if (query) {
|
|
337
|
+
extensions.push((0, import_react_ui_editor5.autocomplete)({
|
|
338
|
+
onSearch: (text) => {
|
|
339
|
+
return query.objects.map((object) => object.name?.length && object.id !== document?.id ? {
|
|
340
|
+
label: object.name,
|
|
341
|
+
// TODO(burdon): Factor out URL builder.
|
|
342
|
+
apply: `[${object.name}](/${(0, import_echo2.fullyQualifiedId)(object)})`
|
|
343
|
+
} : void 0).filter(import_util2.isNotFalsy);
|
|
344
|
+
}
|
|
345
|
+
}));
|
|
346
|
+
}
|
|
347
|
+
if (settings.debug) {
|
|
348
|
+
const items = settings.typewriter?.split(/[,\n]/) ?? "";
|
|
349
|
+
if (items) {
|
|
350
|
+
extensions.push((0, import_react_ui_editor5.typewriter)({
|
|
351
|
+
items
|
|
352
|
+
}));
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
return extensions;
|
|
356
|
+
};
|
|
357
|
+
var style = {
|
|
358
|
+
hover: "rounded-sm text-primary-500 hover:text-primary-600 dark:text-primary-500 hover:dark:text-primary-400",
|
|
359
|
+
icon: "inline-block leading-none mis-1 cursor-pointer"
|
|
360
|
+
};
|
|
361
|
+
var onRenderLink = (onSelectObject) => (el, url) => {
|
|
362
|
+
const isInternal = url.startsWith("/") || // TODO(wittjosiah): This should probably be parsed out on paste?
|
|
363
|
+
url.startsWith(window.location.origin);
|
|
364
|
+
const options = isInternal ? {
|
|
365
|
+
onClick: () => {
|
|
366
|
+
const qualifiedId = url.split("/").at(-1);
|
|
367
|
+
(0, import_invariant.invariant)(qualifiedId, "Invalid link format.", {
|
|
368
|
+
F: __dxlog_file,
|
|
369
|
+
L: 199,
|
|
370
|
+
S: void 0,
|
|
371
|
+
A: [
|
|
372
|
+
"qualifiedId",
|
|
373
|
+
"'Invalid link format.'"
|
|
374
|
+
]
|
|
375
|
+
});
|
|
376
|
+
onSelectObject(qualifiedId);
|
|
377
|
+
}
|
|
378
|
+
} : {
|
|
379
|
+
href: url,
|
|
380
|
+
rel: "noreferrer",
|
|
381
|
+
target: "_blank"
|
|
382
|
+
};
|
|
383
|
+
renderRoot(el, /* @__PURE__ */ import_react4.default.createElement("a", {
|
|
384
|
+
...options,
|
|
385
|
+
className: style.hover
|
|
386
|
+
}, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Icon, {
|
|
387
|
+
icon: isInternal ? "ph--arrow-square-down--bold" : "ph--arrow-square-out--bold",
|
|
388
|
+
size: 4,
|
|
389
|
+
classNames: style.icon
|
|
390
|
+
})));
|
|
391
|
+
};
|
|
392
|
+
var renderLinkTooltip = (el, url) => {
|
|
393
|
+
const web = new URL(url);
|
|
394
|
+
renderRoot(el, /* @__PURE__ */ import_react4.default.createElement("a", {
|
|
395
|
+
href: url,
|
|
396
|
+
rel: "noreferrer",
|
|
397
|
+
target: "_blank",
|
|
398
|
+
className: style.hover
|
|
399
|
+
}, web.origin, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Icon, {
|
|
400
|
+
icon: "ph--arrow-square-out--bold",
|
|
401
|
+
size: 4,
|
|
402
|
+
classNames: style.icon
|
|
403
|
+
})));
|
|
404
|
+
};
|
|
405
|
+
var renderRoot = (root, node) => {
|
|
406
|
+
(0, import_client.createRoot)(root).render(/* @__PURE__ */ import_react4.default.createElement(import_react_ui2.ThemeProvider, {
|
|
407
|
+
tx: import_react_ui_theme2.defaultTx
|
|
408
|
+
}, node));
|
|
409
|
+
return root;
|
|
410
|
+
};
|
|
411
|
+
var MarkdownContainer = ({ role, id, object, settings, ...props }) => {
|
|
412
|
+
const scrollPastEnd = role === "article";
|
|
413
|
+
if (object instanceof import_chunk_HVDIBL5H.DocumentType) {
|
|
414
|
+
return /* @__PURE__ */ import_react.default.createElement(DocumentEditor, {
|
|
415
|
+
id: (0, import_echo.fullyQualifiedId)(object),
|
|
416
|
+
document: object,
|
|
417
|
+
settings,
|
|
418
|
+
scrollPastEnd,
|
|
419
|
+
...props
|
|
420
|
+
});
|
|
421
|
+
} else {
|
|
422
|
+
return /* @__PURE__ */ import_react.default.createElement(MarkdownEditor, {
|
|
423
|
+
id,
|
|
424
|
+
initialValue: object.text,
|
|
425
|
+
toolbar: settings.toolbar,
|
|
426
|
+
scrollPastEnd,
|
|
427
|
+
...props
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
};
|
|
431
|
+
var DocumentEditor = ({ id, document: doc, extensionProviders, settings, viewMode, ...props }) => {
|
|
432
|
+
const space = (0, import_echo.getSpace)(doc);
|
|
433
|
+
const initialValue = (0, import_react.useMemo)(() => doc.content?.content, [
|
|
434
|
+
doc.content
|
|
435
|
+
]);
|
|
436
|
+
const extensions = useExtensions({
|
|
437
|
+
extensionProviders,
|
|
438
|
+
document: doc,
|
|
439
|
+
settings,
|
|
440
|
+
viewMode
|
|
441
|
+
});
|
|
442
|
+
(0, import_react.useEffect)(() => {
|
|
443
|
+
if (!doc.fallbackName && doc.content?.content) {
|
|
444
|
+
doc.fallbackName = (0, import_chunk_L2FIDO4L.getFallbackName)(doc.content.content);
|
|
445
|
+
}
|
|
446
|
+
}, [
|
|
447
|
+
doc,
|
|
448
|
+
doc.content
|
|
449
|
+
]);
|
|
450
|
+
const { scrollTo, selection } = (0, import_react.useMemo)(() => import_react_ui_editor.localStorageStateStoreAdapter.getState(id) ?? {}, [
|
|
451
|
+
id,
|
|
452
|
+
doc
|
|
453
|
+
]);
|
|
454
|
+
const fileManagerPlugin = (0, import_app_framework.useResolvePlugin)(import_app_framework.parseFileManagerPlugin);
|
|
455
|
+
const handleFileUpload = (0, import_react.useMemo)(() => {
|
|
456
|
+
if (space === void 0 || fileManagerPlugin?.provides.file.upload === void 0) {
|
|
457
|
+
return void 0;
|
|
458
|
+
}
|
|
459
|
+
return async (file) => fileManagerPlugin?.provides?.file?.upload?.(file, space);
|
|
460
|
+
}, [
|
|
461
|
+
space,
|
|
462
|
+
fileManagerPlugin
|
|
463
|
+
]);
|
|
464
|
+
return /* @__PURE__ */ import_react.default.createElement(MarkdownEditor, {
|
|
465
|
+
id,
|
|
466
|
+
initialValue,
|
|
467
|
+
extensions,
|
|
468
|
+
scrollTo,
|
|
469
|
+
selection,
|
|
470
|
+
toolbar: settings.toolbar,
|
|
471
|
+
inputMode: settings.editorInputMode,
|
|
472
|
+
viewMode,
|
|
473
|
+
onFileUpload: handleFileUpload,
|
|
474
|
+
...props
|
|
475
|
+
});
|
|
476
|
+
};
|
|
477
|
+
var MarkdownContainer_default = MarkdownContainer;
|
|
478
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
479
|
+
0 && (module.exports = {
|
|
480
|
+
DocumentEditor
|
|
481
|
+
});
|
|
482
|
+
//# sourceMappingURL=MarkdownContainer-IWMLWI6Z.cjs.map
|