@dxos/plugin-markdown 0.6.11 → 0.6.12-main.5cc132e
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-PXYEHGQA.mjs +11 -0
- package/dist/lib/browser/{MarkdownEditor-EKJJQEFL.mjs → MarkdownEditor-IE2ISQQF.mjs} +2 -2
- package/dist/lib/browser/{chunk-7AF2JLK4.mjs → chunk-5FP6MXCU.mjs} +3 -3
- package/dist/lib/browser/{chunk-CQJL4G4X.mjs → chunk-7W37KPH3.mjs} +1 -1
- package/dist/lib/browser/{chunk-CQJL4G4X.mjs.map → chunk-7W37KPH3.mjs.map} +1 -1
- package/dist/lib/browser/{chunk-VUN4QKTT.mjs → chunk-RQLDAFNM.mjs} +53 -45
- package/dist/lib/browser/chunk-RQLDAFNM.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +14 -8
- 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-I5GCRBKU.cjs → DocumentEditor-DZOOGCBM.cjs} +8 -8
- package/dist/lib/node/{DocumentEditor-I5GCRBKU.cjs.map → DocumentEditor-DZOOGCBM.cjs.map} +2 -2
- package/dist/lib/node/{MarkdownEditor-UE23H75V.cjs → MarkdownEditor-IUHHJ532.cjs} +7 -7
- package/dist/lib/node/{MarkdownEditor-UE23H75V.cjs.map → MarkdownEditor-IUHHJ532.cjs.map} +2 -2
- package/dist/lib/node/{chunk-RVGN72IX.cjs → chunk-DFWSVQEA.cjs} +9 -9
- package/dist/lib/node/{chunk-VWQH4WC2.cjs → chunk-EZTJSCMZ.cjs} +4 -4
- package/dist/lib/node/{chunk-VWQH4WC2.cjs.map → chunk-EZTJSCMZ.cjs.map} +1 -1
- package/dist/lib/node/{chunk-7XIBNEI7.cjs → chunk-GRU6YP3J.cjs} +47 -43
- package/dist/lib/node/chunk-GRU6YP3J.cjs.map +7 -0
- package/dist/lib/node/index.cjs +40 -34
- 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/lib/node-esm/DocumentCard-2P4EICBA.mjs +11 -0
- package/dist/lib/node-esm/DocumentCard-2P4EICBA.mjs.map +7 -0
- package/dist/lib/node-esm/DocumentEditor-PXYEHGQA.mjs +11 -0
- package/dist/lib/node-esm/DocumentEditor-PXYEHGQA.mjs.map +7 -0
- package/dist/lib/node-esm/MarkdownEditor-IE2ISQQF.mjs +10 -0
- package/dist/lib/node-esm/MarkdownEditor-IE2ISQQF.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-354DCID5.mjs +117 -0
- package/dist/lib/node-esm/chunk-354DCID5.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-4GGD6YJO.mjs +19 -0
- package/dist/lib/node-esm/chunk-4GGD6YJO.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-5FP6MXCU.mjs +164 -0
- package/dist/lib/node-esm/chunk-5FP6MXCU.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-7W37KPH3.mjs +39 -0
- package/dist/lib/node-esm/chunk-7W37KPH3.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-RL7QY322.mjs +86 -0
- package/dist/lib/node-esm/chunk-RL7QY322.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-RQLDAFNM.mjs +216 -0
- package/dist/lib/node-esm/chunk-RQLDAFNM.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +538 -0
- package/dist/lib/node-esm/index.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -0
- package/dist/lib/node-esm/meta.mjs +9 -0
- package/dist/lib/node-esm/meta.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +12 -0
- package/dist/lib/node-esm/types/index.mjs.map +7 -0
- 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/hooks/index.d.ts +2 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -0
- package/dist/types/src/hooks/useSelectCurrentThread.d.ts +6 -0
- package/dist/types/src/hooks/useSelectCurrentThread.d.ts.map +1 -0
- package/dist/types/src/types/types.d.ts +1 -1
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/package.json +36 -32
- package/src/MarkdownPlugin.tsx +8 -2
- package/src/components/MarkdownEditor.tsx +6 -38
- package/src/hooks/index.ts +5 -0
- package/src/hooks/useSelectCurrentThread.tsx +46 -0
- package/src/types/types.ts +1 -1
- package/dist/lib/browser/DocumentEditor-GPWV3VN3.mjs +0 -11
- package/dist/lib/browser/chunk-VUN4QKTT.mjs.map +0 -7
- package/dist/lib/node/chunk-7XIBNEI7.cjs.map +0 -7
- /package/dist/lib/browser/{DocumentEditor-GPWV3VN3.mjs.map → DocumentEditor-PXYEHGQA.mjs.map} +0 -0
- /package/dist/lib/browser/{MarkdownEditor-EKJJQEFL.mjs.map → MarkdownEditor-IE2ISQQF.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-7AF2JLK4.mjs.map → chunk-5FP6MXCU.mjs.map} +0 -0
- /package/dist/lib/node/{chunk-RVGN72IX.cjs.map → chunk-DFWSVQEA.cjs.map} +0 -0
|
@@ -0,0 +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/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":24697,"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":4249,"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":51210,"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/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":36255},"packages/plugins/plugin-markdown/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/node-esm/chunk-RL7QY322.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node-esm/chunk-5FP6MXCU.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node-esm/chunk-7W37KPH3.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node-esm/chunk-354DCID5.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node-esm/chunk-RQLDAFNM.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node-esm/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/node-esm/DocumentCard-2P4EICBA.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-markdown/dist/lib/node-esm/DocumentEditor-PXYEHGQA.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-markdown/dist/lib/node-esm/MarkdownEditor-IE2ISQQF.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":13380},"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":20263},"packages/plugins/plugin-markdown/dist/lib/node-esm/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-markdown/dist/lib/node-esm/meta.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/node-esm/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/node-esm/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-markdown/dist/lib/node-esm/types/index.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/node-esm/chunk-7W37KPH3.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node-esm/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/node-esm/DocumentCard-2P4EICBA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-markdown/dist/lib/node-esm/DocumentCard-2P4EICBA.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/node-esm/chunk-RL7QY322.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node-esm/chunk-354DCID5.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node-esm/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/node-esm/chunk-RL7QY322.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6298},"packages/plugins/plugin-markdown/dist/lib/node-esm/chunk-RL7QY322.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/node-esm/chunk-354DCID5.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node-esm/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/node-esm/MarkdownEditor-IE2ISQQF.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-markdown/dist/lib/node-esm/MarkdownEditor-IE2ISQQF.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/node-esm/chunk-RQLDAFNM.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node-esm/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/node-esm/DocumentEditor-PXYEHGQA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-markdown/dist/lib/node-esm/DocumentEditor-PXYEHGQA.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/node-esm/chunk-5FP6MXCU.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node-esm/chunk-7W37KPH3.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node-esm/chunk-354DCID5.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node-esm/chunk-RQLDAFNM.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node-esm/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/node-esm/chunk-5FP6MXCU.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":10577},"packages/plugins/plugin-markdown/dist/lib/node-esm/chunk-5FP6MXCU.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/node-esm/chunk-7W37KPH3.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node-esm/chunk-354DCID5.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node-esm/chunk-RQLDAFNM.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/node-esm/chunk-7W37KPH3.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3917},"packages/plugins/plugin-markdown/dist/lib/node-esm/chunk-7W37KPH3.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/node-esm/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/node-esm/chunk-354DCID5.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8511},"packages/plugins/plugin-markdown/dist/lib/node-esm/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/node-esm/chunk-RQLDAFNM.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16094},"packages/plugins/plugin-markdown/dist/lib/node-esm/chunk-RQLDAFNM.mjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/node-esm/chunk-4GGD6YJO.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":5978},"packages/plugins/plugin-markdown/src/hooks/useSelectCurrentThread.tsx":{"bytesInOutput":1356},"packages/plugins/plugin-markdown/src/hooks/index.ts":{"bytesInOutput":0}},"bytes":7708},"packages/plugins/plugin-markdown/dist/lib/node-esm/chunk-4GGD6YJO.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1044},"packages/plugins/plugin-markdown/dist/lib/node-esm/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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownPlugin.d.ts","sourceRoot":"","sources":["../../../src/MarkdownPlugin.tsx"],"names":[],"mappings":"AAOA,OAAO,EAOL,KAAK,gBAAgB,EACtB,MAAM,qBAAqB,CAAC;AA2B7B,OAAO,EACL,KAAK,sBAAsB,EAI5B,MAAM,SAAS,CAAC;AAiBjB,eAAO,MAAM,cAAc,QAAO,gBAAgB,CAAC,sBAAsB,
|
|
1
|
+
{"version":3,"file":"MarkdownPlugin.d.ts","sourceRoot":"","sources":["../../../src/MarkdownPlugin.tsx"],"names":[],"mappings":"AAOA,OAAO,EAOL,KAAK,gBAAgB,EACtB,MAAM,qBAAqB,CAAC;AA2B7B,OAAO,EACL,KAAK,sBAAsB,EAI5B,MAAM,SAAS,CAAC;AAiBjB,eAAO,MAAM,cAAc,QAAO,gBAAgB,CAAC,sBAAsB,CAqTxE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/MarkdownEditor.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAE/D,OAAO,EACL,KAAK,QAAQ,EAEb,KAAK,gBAAgB,
|
|
1
|
+
{"version":3,"file":"MarkdownEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/MarkdownEditor.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAE/D,OAAO,EACL,KAAK,QAAQ,EAEb,KAAK,gBAAgB,EAItB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EAcxB,MAAM,uBAAuB,CAAC;AAO/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAUpD,MAAM,MAAM,mBAAmB,GAAG;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,gBAAgB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,KAAK,IAAI,CAAC;IAC9D,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,CAAC;CAC9D,GAAG,IAAI,CAAC,kBAAkB,EAAE,cAAc,GAAG,UAAU,GAAG,WAAW,GAAG,YAAY,CAAC,GACpF,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,oBAAoB,CAAC,CAAC,CAAC;AAE3D,eAAO,MAAM,cAAc,uJAaxB,mBAAmB,sBAkJrB,CAAC;AAaF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { EditorView } from '@codemirror/view';
|
|
2
|
+
/**
|
|
3
|
+
* Handle scrolling and selection of the current thread in a markdown editor.
|
|
4
|
+
*/
|
|
5
|
+
export declare const useSelectCurrentThread: (editorView: EditorView | undefined, documentId: string) => void;
|
|
6
|
+
//# sourceMappingURL=useSelectCurrentThread.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSelectCurrentThread.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useSelectCurrentThread.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAQ9C;;GAEG;AACH,eAAO,MAAM,sBAAsB,eAAgB,UAAU,GAAG,SAAS,cAAc,MAAM,SA8B5F,CAAC"}
|
|
@@ -40,7 +40,7 @@ export type MarkdownSettingsProps = {
|
|
|
40
40
|
type ThreadProvides<T> = {
|
|
41
41
|
thread: {
|
|
42
42
|
predicate: (obj: any) => obj is T;
|
|
43
|
-
createSort: (obj: T) => (anchorA: string, anchorB: string) => number;
|
|
43
|
+
createSort: (obj: T) => (anchorA: string | undefined, anchorB: string | undefined) => number;
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
46
|
export type MarkdownPluginProvides = SurfaceProvides & IntentResolverProvides & GraphBuilderProvides & GraphSerializerProvides & MetadataRecordsProvides & SettingsProvides<MarkdownSettingsProps> & TranslationsProvides & SchemaProvides & StackProvides & ThreadProvides<DocumentType>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types/types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,oBAAoB,EACpB,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,qB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E,CAAC;KAClC,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAEhC,kBAAkB,EAAE,WAAW,CAAC,kBAAkB,CAAC,EAAE,CAAC;IAItD,QAAQ,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAAA;KAAE,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,eAAe,EAAE,cAAc,CAAC;IAChC,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAIF,KAAK,cAAc,CAAC,CAAC,IAAI;IACvB,MAAM,EAAE;QACN,SAAS,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC;QAClC,UAAU,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,KAAK,MAAM,CAAC;KAC9F,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,eAAe,GAClD,sBAAsB,GACtB,oBAAoB,GACpB,uBAAuB,GACvB,uBAAuB,GACvB,gBAAgB,CAAC,qBAAqB,CAAC,GACvC,oBAAoB,GACpB,cAAc,GACd,aAAa,GACb,cAAc,CAAC,YAAY,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-markdown",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.12-main.5cc132e",
|
|
4
4
|
"description": "DXOS Surface plugin for interacting with Markdown",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -10,21 +10,24 @@
|
|
|
10
10
|
".": {
|
|
11
11
|
"browser": "./dist/lib/browser/index.mjs",
|
|
12
12
|
"node": {
|
|
13
|
-
"
|
|
13
|
+
"require": "./dist/lib/node/index.cjs",
|
|
14
|
+
"default": "./dist/lib/node-esm/index.mjs"
|
|
14
15
|
},
|
|
15
16
|
"types": "./dist/types/src/index.d.ts"
|
|
16
17
|
},
|
|
17
18
|
"./meta": {
|
|
18
19
|
"browser": "./dist/lib/browser/meta.mjs",
|
|
19
20
|
"node": {
|
|
20
|
-
"
|
|
21
|
+
"require": "./dist/lib/node/meta.cjs",
|
|
22
|
+
"default": "./dist/lib/node-esm/meta.mjs"
|
|
21
23
|
},
|
|
22
24
|
"types": "./dist/types/src/meta.d.ts"
|
|
23
25
|
},
|
|
24
26
|
"./types": {
|
|
25
27
|
"browser": "./dist/lib/browser/types/index.mjs",
|
|
26
28
|
"node": {
|
|
27
|
-
"
|
|
29
|
+
"require": "./dist/lib/node/types/index.cjs",
|
|
30
|
+
"default": "./dist/lib/node-esm/types/index.mjs"
|
|
28
31
|
},
|
|
29
32
|
"types": "./dist/types/src/types/index.d.ts"
|
|
30
33
|
}
|
|
@@ -48,27 +51,28 @@
|
|
|
48
51
|
"@codemirror/search": "^6.5.6",
|
|
49
52
|
"@codemirror/view": "^6.29.1",
|
|
50
53
|
"@preact/signals-core": "^1.6.0",
|
|
51
|
-
"@dxos/app-framework": "0.6.
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/plugin-attention": "0.6.
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/plugin-graph": "0.6.
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/plugin-settings": "0.6.
|
|
62
|
-
"@dxos/plugin-
|
|
63
|
-
"@dxos/plugin-
|
|
64
|
-
"@dxos/react-
|
|
65
|
-
"@dxos/react-
|
|
66
|
-
"@dxos/react-ui-card": "0.6.
|
|
67
|
-
"@dxos/react-ui-
|
|
68
|
-
"@dxos/react-ui-
|
|
69
|
-
"@dxos/react-ui-
|
|
70
|
-
"@dxos/react-ui-
|
|
71
|
-
"@dxos/
|
|
54
|
+
"@dxos/app-framework": "0.6.12-main.5cc132e",
|
|
55
|
+
"@dxos/async": "0.6.12-main.5cc132e",
|
|
56
|
+
"@dxos/invariant": "0.6.12-main.5cc132e",
|
|
57
|
+
"@dxos/local-storage": "0.6.12-main.5cc132e",
|
|
58
|
+
"@dxos/echo-schema": "0.6.12-main.5cc132e",
|
|
59
|
+
"@dxos/keys": "0.6.12-main.5cc132e",
|
|
60
|
+
"@dxos/plugin-attention": "0.6.12-main.5cc132e",
|
|
61
|
+
"@dxos/plugin-client": "0.6.12-main.5cc132e",
|
|
62
|
+
"@dxos/plugin-graph": "0.6.12-main.5cc132e",
|
|
63
|
+
"@dxos/log": "0.6.12-main.5cc132e",
|
|
64
|
+
"@dxos/plugin-settings": "0.6.12-main.5cc132e",
|
|
65
|
+
"@dxos/plugin-space": "0.6.12-main.5cc132e",
|
|
66
|
+
"@dxos/plugin-theme": "0.6.12-main.5cc132e",
|
|
67
|
+
"@dxos/react-hooks": "0.6.12-main.5cc132e",
|
|
68
|
+
"@dxos/react-client": "0.6.12-main.5cc132e",
|
|
69
|
+
"@dxos/react-ui-card": "0.6.12-main.5cc132e",
|
|
70
|
+
"@dxos/react-ui-attention": "0.6.12-main.5cc132e",
|
|
71
|
+
"@dxos/react-ui-deck": "0.6.12-main.5cc132e",
|
|
72
|
+
"@dxos/react-ui-editor": "0.6.12-main.5cc132e",
|
|
73
|
+
"@dxos/react-ui-mosaic": "0.6.12-main.5cc132e",
|
|
74
|
+
"@dxos/react-ui-stack": "0.6.12-main.5cc132e",
|
|
75
|
+
"@dxos/util": "0.6.12-main.5cc132e"
|
|
72
76
|
},
|
|
73
77
|
"devDependencies": {
|
|
74
78
|
"@phosphor-icons/react": "^2.1.5",
|
|
@@ -76,18 +80,18 @@
|
|
|
76
80
|
"@types/react-dom": "~18.2.0",
|
|
77
81
|
"react": "~18.2.0",
|
|
78
82
|
"react-dom": "~18.2.0",
|
|
79
|
-
"vite": "
|
|
80
|
-
"@dxos/random": "0.6.
|
|
81
|
-
"@dxos/react-ui": "0.6.
|
|
82
|
-
"@dxos/react-ui
|
|
83
|
-
"@dxos/storybook-utils": "0.6.
|
|
83
|
+
"vite": "5.4.7",
|
|
84
|
+
"@dxos/random": "0.6.12-main.5cc132e",
|
|
85
|
+
"@dxos/react-ui-theme": "0.6.12-main.5cc132e",
|
|
86
|
+
"@dxos/react-ui": "0.6.12-main.5cc132e",
|
|
87
|
+
"@dxos/storybook-utils": "0.6.12-main.5cc132e"
|
|
84
88
|
},
|
|
85
89
|
"optionalDependencies": {
|
|
86
90
|
"@phosphor-icons/react": "^2.1.5",
|
|
87
91
|
"react": "^18.0.0",
|
|
88
92
|
"react-dom": "^18.0.0",
|
|
89
|
-
"@dxos/react-ui": "0.6.
|
|
90
|
-
"@dxos/react-ui
|
|
93
|
+
"@dxos/react-ui-theme": "0.6.12-main.5cc132e",
|
|
94
|
+
"@dxos/react-ui": "0.6.12-main.5cc132e"
|
|
91
95
|
},
|
|
92
96
|
"publishConfig": {
|
|
93
97
|
"access": "public"
|
package/src/MarkdownPlugin.tsx
CHANGED
|
@@ -241,7 +241,6 @@ export const MarkdownPlugin = (): PluginDefinition<MarkdownPluginProvides> => {
|
|
|
241
241
|
],
|
|
242
242
|
},
|
|
243
243
|
thread: {
|
|
244
|
-
// TODO(Zan): How to better handle the type predicate?
|
|
245
244
|
predicate: (obj) => obj instanceof DocumentType,
|
|
246
245
|
createSort: (doc: DocumentType) => {
|
|
247
246
|
const accessor = doc.content ? createDocAccessor(doc.content, ['content']) : undefined;
|
|
@@ -256,7 +255,14 @@ export const MarkdownPlugin = (): PluginDefinition<MarkdownPluginProvides> => {
|
|
|
256
255
|
return range?.start ?? Number.MAX_SAFE_INTEGER;
|
|
257
256
|
};
|
|
258
257
|
|
|
259
|
-
return (anchorA: string, anchorB: string
|
|
258
|
+
return (anchorA: string | undefined, anchorB: string | undefined): number => {
|
|
259
|
+
if (anchorA === undefined || anchorB === undefined) {
|
|
260
|
+
return 0;
|
|
261
|
+
}
|
|
262
|
+
const posA = getStartPosition(anchorA);
|
|
263
|
+
const posB = getStartPosition(anchorB);
|
|
264
|
+
return posA - posB;
|
|
265
|
+
};
|
|
260
266
|
},
|
|
261
267
|
},
|
|
262
268
|
surface: {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { openSearchPanel } from '@codemirror/search';
|
|
6
|
-
import { EditorView } from '@codemirror/view';
|
|
6
|
+
import { type EditorView } from '@codemirror/view';
|
|
7
7
|
import React, { useMemo, useEffect, useCallback } from 'react';
|
|
8
8
|
|
|
9
9
|
import {
|
|
@@ -11,12 +11,11 @@ import {
|
|
|
11
11
|
LayoutAction,
|
|
12
12
|
type LayoutCoordinate,
|
|
13
13
|
useResolvePlugin,
|
|
14
|
-
useIntentResolver,
|
|
15
14
|
parseLayoutPlugin,
|
|
16
15
|
useIntentDispatcher,
|
|
17
16
|
} from '@dxos/app-framework';
|
|
18
|
-
import { parseAttentionPlugin } from '@dxos/plugin-attention';
|
|
19
17
|
import { useThemeContext, useTranslation } from '@dxos/react-ui';
|
|
18
|
+
import { useIsDirectlyAttended } from '@dxos/react-ui-attention';
|
|
20
19
|
import {
|
|
21
20
|
type Action,
|
|
22
21
|
type DNDOptions,
|
|
@@ -36,16 +35,16 @@ import {
|
|
|
36
35
|
useTextEditor,
|
|
37
36
|
editorContent,
|
|
38
37
|
editorGutter,
|
|
39
|
-
Cursor,
|
|
40
|
-
setSelection,
|
|
41
38
|
} from '@dxos/react-ui-editor';
|
|
42
39
|
import { sectionToolbarLayout } from '@dxos/react-ui-stack';
|
|
43
40
|
import { textBlockWidth, focusRing, mx } from '@dxos/react-ui-theme';
|
|
44
41
|
import { nonNullable } from '@dxos/util';
|
|
45
42
|
|
|
43
|
+
import { useSelectCurrentThread } from '../hooks';
|
|
46
44
|
import { MARKDOWN_PLUGIN } from '../meta';
|
|
47
45
|
import type { MarkdownPluginState } from '../types';
|
|
48
46
|
|
|
47
|
+
// TODO(Zan): Factor into a shared location.
|
|
49
48
|
const attentionFragment = mx(
|
|
50
49
|
'group-focus-within/editor:attention-surface group-[[aria-current]]/editor:attention-surface',
|
|
51
50
|
'group-focus-within/editor:border-separator',
|
|
@@ -83,11 +82,9 @@ export const MarkdownEditor = ({
|
|
|
83
82
|
const { t } = useTranslation(MARKDOWN_PLUGIN);
|
|
84
83
|
const { themeMode } = useThemeContext();
|
|
85
84
|
const dispatch = useIntentDispatcher();
|
|
86
|
-
const attentionPlugin = useResolvePlugin(parseAttentionPlugin);
|
|
87
85
|
const layoutPlugin = useResolvePlugin(parseLayoutPlugin);
|
|
88
|
-
const attended = Array.from(attentionPlugin?.provides.attention?.attended ?? []);
|
|
89
|
-
const isDirectlyAttended = attended.length === 1 && attended[0] === id;
|
|
90
86
|
const [formattingState, formattingObserver] = useFormattingState();
|
|
87
|
+
const isDirectlyAttended = useIsDirectlyAttended(id);
|
|
91
88
|
|
|
92
89
|
// Extensions from other plugins.
|
|
93
90
|
const providerExtensions = useMemo(() => extensionProviders?.map((provider) => provider({})), [extensionProviders]);
|
|
@@ -99,36 +96,6 @@ export const MarkdownEditor = ({
|
|
|
99
96
|
}, [dispatch]);
|
|
100
97
|
const commentClickObserver = useCommentClickListener(onCommentClick);
|
|
101
98
|
|
|
102
|
-
// Focus the space that references the comment.
|
|
103
|
-
useIntentResolver(MARKDOWN_PLUGIN, ({ action, data }) => {
|
|
104
|
-
switch (action) {
|
|
105
|
-
// TODO(burdon): Use fully qualified ids everywhere.
|
|
106
|
-
case LayoutAction.SCROLL_INTO_VIEW: {
|
|
107
|
-
if (editorView && data?.id === id && data?.cursor) {
|
|
108
|
-
// TODO(burdon): We need typed intents.
|
|
109
|
-
const range = Cursor.getRangeFromCursor(editorView.state, data.cursor);
|
|
110
|
-
if (range) {
|
|
111
|
-
const selection = editorView.state.selection.main.from !== range.from ? { anchor: range.from } : undefined;
|
|
112
|
-
const effects = [
|
|
113
|
-
// NOTE: This does not use the DOM scrollIntoView function.
|
|
114
|
-
EditorView.scrollIntoView(range.from, { y: 'start', yMargin: 96 }),
|
|
115
|
-
];
|
|
116
|
-
if (selection) {
|
|
117
|
-
// Update the editor selection to get bi-directional highlighting.
|
|
118
|
-
effects.push(setSelection.of({ current: id }));
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
editorView.dispatch({
|
|
122
|
-
effects,
|
|
123
|
-
selection: selection ? { anchor: range.from } : undefined,
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
break;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
});
|
|
131
|
-
|
|
132
99
|
// Drag files.
|
|
133
100
|
const handleDrop: DNDOptions['onDrop'] = async (view, { files }) => {
|
|
134
101
|
const file = files[0];
|
|
@@ -178,6 +145,7 @@ export const MarkdownEditor = ({
|
|
|
178
145
|
);
|
|
179
146
|
|
|
180
147
|
useTest(editorView);
|
|
148
|
+
useSelectCurrentThread(editorView, id);
|
|
181
149
|
|
|
182
150
|
// Toolbar handler.
|
|
183
151
|
const handleToolbarAction = useActionHandler(editorView);
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { EditorView } from '@codemirror/view';
|
|
6
|
+
import { useCallback } from 'react';
|
|
7
|
+
|
|
8
|
+
import { LayoutAction, useIntentResolver } from '@dxos/app-framework';
|
|
9
|
+
import { Cursor, setSelection } from '@dxos/react-ui-editor';
|
|
10
|
+
|
|
11
|
+
import { MARKDOWN_PLUGIN } from '../meta';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Handle scrolling and selection of the current thread in a markdown editor.
|
|
15
|
+
*/
|
|
16
|
+
export const useSelectCurrentThread = (editorView: EditorView | undefined, documentId: string) => {
|
|
17
|
+
const handleScrollIntoView = useCallback(
|
|
18
|
+
({ action, data }: { action: string; data?: any }) => {
|
|
19
|
+
if (action === LayoutAction.SCROLL_INTO_VIEW) {
|
|
20
|
+
if (editorView && data?.id === documentId && data?.cursor) {
|
|
21
|
+
// TODO(burdon): We need typed intents.
|
|
22
|
+
const range = Cursor.getRangeFromCursor(editorView.state, data.cursor);
|
|
23
|
+
if (range) {
|
|
24
|
+
const selection = editorView.state.selection.main.from !== range.from ? { anchor: range.from } : undefined;
|
|
25
|
+
const effects = [
|
|
26
|
+
// NOTE: This does not use the DOM scrollIntoView function.
|
|
27
|
+
EditorView.scrollIntoView(range.from, { y: 'start', yMargin: 96 }),
|
|
28
|
+
];
|
|
29
|
+
if (selection) {
|
|
30
|
+
// Update the editor selection to get bi-directional highlighting.
|
|
31
|
+
effects.push(setSelection.of({ current: documentId }));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
editorView.dispatch({
|
|
35
|
+
effects,
|
|
36
|
+
selection: selection ? { anchor: range.from } : undefined,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
[documentId, editorView],
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
useIntentResolver(MARKDOWN_PLUGIN, handleScrollIntoView);
|
|
46
|
+
};
|
package/src/types/types.ts
CHANGED
|
@@ -69,7 +69,7 @@ export type MarkdownSettingsProps = {
|
|
|
69
69
|
type ThreadProvides<T> = {
|
|
70
70
|
thread: {
|
|
71
71
|
predicate: (obj: any) => obj is T;
|
|
72
|
-
createSort: (obj: T) => (anchorA: string, anchorB: string) => number;
|
|
72
|
+
createSort: (obj: T) => (anchorA: string | undefined, anchorB: string | undefined) => number;
|
|
73
73
|
};
|
|
74
74
|
};
|
|
75
75
|
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DocumentEditor_default
|
|
3
|
-
} from "./chunk-7AF2JLK4.mjs";
|
|
4
|
-
import "./chunk-CQJL4G4X.mjs";
|
|
5
|
-
import "./chunk-354DCID5.mjs";
|
|
6
|
-
import "./chunk-VUN4QKTT.mjs";
|
|
7
|
-
import "./chunk-4GGD6YJO.mjs";
|
|
8
|
-
export {
|
|
9
|
-
DocumentEditor_default as default
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=DocumentEditor-GPWV3VN3.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 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({\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": ";;;;;AAIA,SAASA,uBAAuB;AAChC,SAASC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O;IAAc;IACjEwE,UAAUR;KAEV,sBAAA,cAACG,QAAQM,UAAQ,IAAA,GAChBrG,gBAAgB,sBAAA,cAAC+F,QAAQO,QAAM;IAACC,UAAUvG;MAC3C,sBAAA,cAAC+F,QAAQS,WAAS,IAAA,GAClB,sBAAA,cAACT,QAAQU,MAAI;IAACC,MAAM3G,YAAYX;MAChC,sBAAA,cAAC2G,QAAQY,SAAO,IAAA,CAAA,CAAA,GAItB,sBAAA,cAACb,OAAAA;IACCvG,MAAK;IACLqH,KAAKxC;IACLyC,eAAY;IACZC,gBAAchH,UAAU,YAAY;IACpCiF,WACExF,SAAS,YACLJ,GAAG,uCAAuC4H,SAAAA,IAC1C5H,GACE,wCACA4H,WACA7H,mBACA,4BACA,kEAAA;IAGP,GAAGmF;;AAIZ;AAIA,IAAMoB,UAAU,CAAC5B,SAAAA;AACfmD,YAAU,MAAA;AACR,UAAMC,WAAYC,OAAeD;AACjC,QAAIA,UAAU;AACZA,eAAStE,aAAakB;IACxB;EACF,GAAG;IAACA;GAAK;AACX;AAEA,IAAA,yBAAexE;",
|
|
6
|
-
"names": ["openSearchPanel", "EditorView", "React", "useMemo", "useEffect", "useCallback", "LayoutAction", "useResolvePlugin", "useIntentResolver", "parseLayoutPlugin", "useIntentDispatcher", "parseAttentionPlugin", "useThemeContext", "useTranslation", "Toolbar", "createBasicExtensions", "createMarkdownExtensions", "createThemeExtensions", "dropFile", "processAction", "useActionHandler", "useCommentState", "useCommentClickListener", "useFormattingState", "useTextEditor", "editorContent", "editorGutter", "Cursor", "setSelection", "sectionToolbarLayout", "textBlockWidth", "focusRing", "mx", "nonNullable", "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", "div", "Toolbar", "Root", "classNames", "textBlockWidth", "sectionToolbarLayout", "onAction", "Markdown", "Custom", "onUpload", "Separator", "View", "mode", "Actions", "ref", "data-testid", "data-toolbar", "focusRing", "useEffect", "composer", "window"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 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({\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": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;AAGl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,MAAK;IAAOwF,eAAW5F,0BAAG,gDAAgDD,iBAAAA;KAC7E,6BAAA4G,QAAA,cAACE,+BAAQC,MAAI;IACXC,YACE3G,SAAS,YACL;MACE4G;MACA;MACA,CAAChF,sBAAsB;MACvBiF;QAEF;MACED;MACA;;IAGR7D,OAAOjB,mBAAmB;MAAE,GAAGA;MAAiB,GAAGO;IAAc;IACjEyE,UAAUT;KAEV,6BAAAE,QAAA,cAACE,+BAAQM,UAAQ,IAAA,GAChBtG,gBAAgB,6BAAA8F,QAAA,cAACE,+BAAQO,QAAM;IAACC,UAAUxG;MAC3C,6BAAA8F,QAAA,cAACE,+BAAQS,WAAS,IAAA,GAClB,6BAAAX,QAAA,cAACE,+BAAQU,MAAI;IAACC,MAAM5G,YAAYX;MAChC,6BAAA0G,QAAA,cAACE,+BAAQY,SAAO,IAAA,CAAA,CAAA,GAItB,6BAAAd,QAAA,cAACC,OAAAA;IACCxG,MAAK;IACLsH,KAAKzC;IACL0C,eAAY;IACZC,gBAAcjH,UAAU,YAAY;IACpCiF,WACExF,SAAS,gBACLJ,0BAAG,uCAAuC6H,+BAAAA,QAC1C7H,0BACE,wCACA6H,iCACA9H,mBACA,4BACA,kEAAA;IAGP,GAAGmF;;AAIZ;AAIA,IAAMoB,UAAU,CAAC5B,SAAAA;AACfoD,8BAAU,MAAA;AACR,UAAMC,WAAYC,OAAeD;AACjC,QAAIA,UAAU;AACZA,eAASvE,aAAakB;IACxB;EACF,GAAG;IAACA;GAAK;AACX;AAEA,IAAA,yBAAexE;",
|
|
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
|
-
}
|
/package/dist/lib/browser/{DocumentEditor-GPWV3VN3.mjs.map → DocumentEditor-PXYEHGQA.mjs.map}
RENAMED
|
File without changes
|
/package/dist/lib/browser/{MarkdownEditor-EKJJQEFL.mjs.map → MarkdownEditor-IE2ISQQF.mjs.map}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|