@dxos/plugin-markdown 0.8.4-main.bc674ce → 0.8.4-main.bcb3aa67d6
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/MarkdownSettings-5AD3X3II.mjs +124 -0
- package/dist/lib/browser/MarkdownSettings-5AD3X3II.mjs.map +7 -0
- package/dist/lib/browser/blueprints/index.mjs +47 -4
- package/dist/lib/browser/blueprints/index.mjs.map +4 -4
- package/dist/lib/browser/chunk-46WIDM4R.mjs +98 -0
- package/dist/lib/browser/chunk-46WIDM4R.mjs.map +7 -0
- package/dist/lib/browser/chunk-GQKARRJU.mjs +158 -0
- package/dist/lib/browser/chunk-GQKARRJU.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/cli/index.mjs +26 -19
- package/dist/lib/browser/cli/index.mjs.map +3 -3
- package/dist/lib/browser/create-I7QWPBMS.mjs +30 -0
- package/dist/lib/browser/create-I7QWPBMS.mjs.map +7 -0
- package/dist/lib/browser/create-markdown-6QQXSF3Q.mjs +22 -0
- package/dist/lib/browser/create-markdown-6QQXSF3Q.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +586 -85
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/open-NSBN4NKR.mjs +21 -0
- package/dist/lib/browser/open-NSBN4NKR.mjs.map +7 -0
- package/dist/lib/browser/operations/index.mjs +14 -0
- package/dist/lib/browser/operations/index.mjs.map +7 -0
- package/dist/lib/browser/scroll-to-anchor-RA5OMQCP.mjs +49 -0
- package/dist/lib/browser/scroll-to-anchor-RA5OMQCP.mjs.map +7 -0
- package/dist/lib/browser/set-view-mode-75MBU6CB.mjs +26 -0
- package/dist/lib/browser/set-view-mode-75MBU6CB.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +6 -7
- package/dist/lib/browser/update-QQJYONAC.mjs +45 -0
- package/dist/lib/browser/update-QQJYONAC.mjs.map +7 -0
- package/dist/lib/node-esm/MarkdownSettings-ODDM67XG.mjs +125 -0
- package/dist/lib/node-esm/MarkdownSettings-ODDM67XG.mjs.map +7 -0
- package/dist/lib/node-esm/blueprints/index.mjs +47 -4
- package/dist/lib/node-esm/blueprints/index.mjs.map +4 -4
- package/dist/lib/node-esm/chunk-4MSJO6IJ.mjs +99 -0
- package/dist/lib/node-esm/chunk-4MSJO6IJ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-QRCQ55W7.mjs +159 -0
- package/dist/lib/node-esm/chunk-QRCQ55W7.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +26 -19
- package/dist/lib/node-esm/cli/index.mjs.map +3 -3
- package/dist/lib/node-esm/create-VJ5SIKYF.mjs +31 -0
- package/dist/lib/node-esm/create-VJ5SIKYF.mjs.map +7 -0
- package/dist/lib/node-esm/create-markdown-P5KNGLZ5.mjs +23 -0
- package/dist/lib/node-esm/create-markdown-P5KNGLZ5.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +586 -85
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/open-U3T6IVHN.mjs +22 -0
- package/dist/lib/node-esm/open-U3T6IVHN.mjs.map +7 -0
- package/dist/lib/node-esm/operations/index.mjs +15 -0
- package/dist/lib/node-esm/operations/index.mjs.map +7 -0
- package/dist/lib/node-esm/scroll-to-anchor-CVM3LVSQ.mjs +50 -0
- package/dist/lib/node-esm/scroll-to-anchor-CVM3LVSQ.mjs.map +7 -0
- package/dist/lib/node-esm/set-view-mode-WQJBCUXY.mjs +27 -0
- package/dist/lib/node-esm/set-view-mode-WQJBCUXY.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +6 -7
- package/dist/lib/node-esm/update-24CQM75C.mjs +46 -0
- package/dist/lib/node-esm/update-24CQM75C.mjs.map +7 -0
- package/dist/types/src/MarkdownPlugin.d.ts.map +1 -1
- package/dist/types/src/blueprints/index.d.ts +1 -1
- package/dist/types/src/blueprints/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/markdown-blueprint.d.ts +3 -20
- package/dist/types/src/blueprints/markdown-blueprint.d.ts.map +1 -1
- package/dist/types/src/capabilities/anchor-sort.d.ts +6 -0
- package/dist/types/src/capabilities/anchor-sort.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-serializer.d.ts +5 -0
- package/dist/types/src/capabilities/app-graph-serializer.d.ts.map +1 -0
- package/dist/types/src/capabilities/artifact-definition.d.ts +5 -0
- package/dist/types/src/capabilities/artifact-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts +6 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +27 -7
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/node.d.ts +4 -0
- package/dist/types/src/capabilities/node.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings.d.ts +24 -0
- package/dist/types/src/capabilities/settings.d.ts.map +1 -0
- package/dist/types/src/capabilities/state.d.ts +6 -0
- package/dist/types/src/capabilities/state.d.ts.map +1 -0
- package/dist/types/src/cli/plugin.d.ts.map +1 -1
- package/dist/types/src/components/MarkdownEditor/FileUpload.d.ts +2 -2
- package/dist/types/src/components/MarkdownEditor/FileUpload.d.ts.map +1 -1
- package/dist/types/src/components/MarkdownEditor/MarkdownEditor.d.ts +14 -9
- package/dist/types/src/components/MarkdownEditor/MarkdownEditor.d.ts.map +1 -1
- package/dist/types/src/components/MarkdownEditor/MarkdownEditor.stories.d.ts +2 -2
- package/dist/types/src/components/MarkdownEditor/MarkdownEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/MarkdownEditor/MarkdownEditorContent.d.ts +4 -2
- package/dist/types/src/components/MarkdownEditor/MarkdownEditorContent.d.ts.map +1 -1
- package/dist/types/src/components/MarkdownEditor/MarkdownEditorToolbar.d.ts +11 -6
- package/dist/types/src/components/MarkdownEditor/MarkdownEditorToolbar.d.ts.map +1 -1
- package/dist/types/src/components/MarkdownSettings/MarkdownSettings.d.ts +4 -6
- package/dist/types/src/components/MarkdownSettings/MarkdownSettings.d.ts.map +1 -1
- package/dist/types/src/components/MarkdownSettings/MarkdownSettings.stories.d.ts +138 -0
- package/dist/types/src/components/MarkdownSettings/MarkdownSettings.stories.d.ts.map +1 -0
- package/dist/types/src/components/MarkdownSettings/index.d.ts +2 -1
- package/dist/types/src/components/MarkdownSettings/index.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +3 -8
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/{components → containers}/MarkdownCard/MarkdownCard.d.ts +1 -1
- package/dist/types/src/containers/MarkdownCard/MarkdownCard.d.ts.map +1 -0
- package/dist/types/src/containers/MarkdownCard/MarkdownCard.stories.d.ts.map +1 -0
- package/dist/types/src/{components → containers}/MarkdownCard/index.d.ts +0 -1
- package/dist/types/src/containers/MarkdownCard/index.d.ts.map +1 -0
- package/dist/types/src/containers/MarkdownCard/snippet.d.ts +15 -0
- package/dist/types/src/containers/MarkdownCard/snippet.d.ts.map +1 -0
- package/dist/types/src/{components → containers/MarkdownContainer}/MarkdownContainer.d.ts +10 -7
- package/dist/types/src/containers/MarkdownContainer/MarkdownContainer.d.ts.map +1 -0
- package/dist/types/src/containers/MarkdownContainer/MarkdownContainer.stories.d.ts +99 -0
- package/dist/types/src/containers/MarkdownContainer/MarkdownContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/MarkdownContainer/index.d.ts +3 -0
- package/dist/types/src/containers/MarkdownContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +5 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +0 -1
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useExtensions.d.ts +7 -5
- package/dist/types/src/hooks/useExtensions.d.ts.map +1 -1
- package/dist/types/src/hooks/useLinkQuery.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/operations/create-markdown.d.ts +5 -0
- package/dist/types/src/operations/create-markdown.d.ts.map +1 -0
- package/dist/types/src/operations/create.d.ts +5 -0
- package/dist/types/src/operations/create.d.ts.map +1 -0
- package/dist/types/src/operations/create.test.d.ts.map +1 -0
- package/dist/types/src/operations/definitions.d.ts +64 -0
- package/dist/types/src/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +4 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/open.d.ts +5 -0
- package/dist/types/src/operations/open.d.ts.map +1 -0
- package/dist/types/src/operations/scroll-to-anchor.d.ts +5 -0
- package/dist/types/src/operations/scroll-to-anchor.d.ts.map +1 -0
- package/dist/types/src/operations/set-view-mode.d.ts +5 -0
- package/dist/types/src/operations/set-view-mode.d.ts.map +1 -0
- package/dist/types/src/operations/update.d.ts +5 -0
- package/dist/types/src/operations/update.d.ts.map +1 -0
- package/dist/types/src/operations/update.test.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +75 -35
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Markdown.d.ts +15 -16
- package/dist/types/src/types/Markdown.d.ts.map +1 -1
- package/dist/types/src/types/Settings.d.ts +16 -0
- package/dist/types/src/types/Settings.d.ts.map +1 -0
- package/dist/types/src/types/capabilities.d.ts +31 -2
- package/dist/types/src/types/capabilities.d.ts.map +1 -1
- package/dist/types/src/types/events.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +2 -3
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +2 -2
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +89 -57
- package/src/MarkdownPlugin.tsx +49 -44
- package/src/blueprints/index.ts +1 -1
- package/src/blueprints/markdown-blueprint.ts +14 -8
- package/src/capabilities/{anchor-sort/anchor-sort.ts → anchor-sort.ts} +4 -3
- package/src/capabilities/{app-graph-serializer/app-graph-serializer.ts → app-graph-serializer.ts} +14 -9
- package/src/capabilities/{artifact-definition/artifact-definition.ts → artifact-definition.ts} +5 -5
- package/src/capabilities/blueprint-definition.ts +17 -0
- package/src/capabilities/index.ts +13 -7
- package/src/capabilities/node.ts +11 -0
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +48 -27
- package/src/capabilities/{settings/settings.ts → settings.ts} +5 -4
- package/src/capabilities/state.ts +47 -0
- package/src/cli/plugin.ts +21 -10
- package/src/components/MarkdownEditor/FileUpload.tsx +2 -2
- package/src/components/MarkdownEditor/MarkdownEditor.stories.tsx +29 -29
- package/src/components/MarkdownEditor/MarkdownEditor.tsx +63 -32
- package/src/components/MarkdownEditor/MarkdownEditorContent.tsx +24 -17
- package/src/components/MarkdownEditor/MarkdownEditorToolbar.tsx +47 -55
- package/src/components/MarkdownSettings/MarkdownSettings.stories.tsx +40 -0
- package/src/components/MarkdownSettings/MarkdownSettings.tsx +114 -98
- package/src/components/MarkdownSettings/index.ts +3 -1
- package/src/components/index.ts +4 -12
- package/src/{components → containers}/MarkdownCard/MarkdownCard.stories.tsx +17 -7
- package/src/{components → containers}/MarkdownCard/MarkdownCard.tsx +23 -30
- package/src/{components → containers}/MarkdownCard/index.ts +0 -2
- package/src/containers/MarkdownCard/snippet.ts +75 -0
- package/src/{components → containers/MarkdownContainer}/MarkdownContainer.stories.tsx +28 -18
- package/src/{components → containers/MarkdownContainer}/MarkdownContainer.tsx +59 -36
- package/src/containers/MarkdownContainer/index.ts +6 -0
- package/src/containers/index.ts +10 -0
- package/src/hooks/index.ts +0 -1
- package/src/hooks/useEditorMenuOptions.ts +2 -2
- package/src/hooks/useExtensions.tsx +80 -93
- package/src/hooks/useLinkQuery.ts +31 -6
- package/src/index.ts +2 -0
- package/src/meta.ts +1 -1
- package/src/operations/create-markdown.ts +21 -0
- package/src/operations/create.conversations.json +1 -0
- package/src/operations/create.test.ts +98 -0
- package/src/operations/create.ts +27 -0
- package/src/operations/definitions.ts +119 -0
- package/src/operations/index.ts +16 -0
- package/src/operations/open.ts +25 -0
- package/src/operations/scroll-to-anchor.ts +40 -0
- package/src/operations/set-view-mode.ts +25 -0
- package/src/operations/update.conversations.json +1 -0
- package/src/operations/update.test.ts +215 -0
- package/src/operations/update.ts +51 -0
- package/src/testing.ts +2 -2
- package/src/translations.ts +49 -35
- package/src/types/Markdown.ts +18 -25
- package/src/types/Settings.ts +28 -0
- package/src/types/capabilities.ts +17 -5
- package/src/types/events.ts +5 -4
- package/src/types/index.ts +3 -4
- package/src/util.tsx +5 -5
- package/dist/lib/browser/MarkdownCard-WHK3ORP7.mjs +0 -12
- package/dist/lib/browser/MarkdownContainer-V7EAADMF.mjs +0 -12
- package/dist/lib/browser/anchor-sort-WQ3TL7ZI.mjs +0 -32
- package/dist/lib/browser/anchor-sort-WQ3TL7ZI.mjs.map +0 -7
- package/dist/lib/browser/app-graph-serializer-ULZUJKOD.mjs +0 -58
- package/dist/lib/browser/app-graph-serializer-ULZUJKOD.mjs.map +0 -7
- package/dist/lib/browser/blueprint-definition-TLV4PNZW.mjs +0 -19
- package/dist/lib/browser/blueprint-definition-TLV4PNZW.mjs.map +0 -7
- package/dist/lib/browser/chunk-BX73DASG.mjs +0 -702
- package/dist/lib/browser/chunk-BX73DASG.mjs.map +0 -7
- package/dist/lib/browser/chunk-CUGDX7KA.mjs +0 -8
- package/dist/lib/browser/chunk-CUGDX7KA.mjs.map +0 -7
- package/dist/lib/browser/chunk-FWQQW6KU.mjs +0 -144
- package/dist/lib/browser/chunk-FWQQW6KU.mjs.map +0 -7
- package/dist/lib/browser/chunk-JOXYQLKH.mjs +0 -55
- package/dist/lib/browser/chunk-JOXYQLKH.mjs.map +0 -7
- package/dist/lib/browser/chunk-KDKXFKDN.mjs +0 -104
- package/dist/lib/browser/chunk-KDKXFKDN.mjs.map +0 -7
- package/dist/lib/browser/chunk-LMO5UVKL.mjs +0 -167
- package/dist/lib/browser/chunk-LMO5UVKL.mjs.map +0 -7
- package/dist/lib/browser/chunk-S45ULIOG.mjs +0 -101
- package/dist/lib/browser/chunk-S45ULIOG.mjs.map +0 -7
- package/dist/lib/browser/chunk-WIPSLZ6L.mjs +0 -60
- package/dist/lib/browser/chunk-WIPSLZ6L.mjs.map +0 -7
- package/dist/lib/browser/operation-resolver-EGCWOQKJ.mjs +0 -53
- package/dist/lib/browser/operation-resolver-EGCWOQKJ.mjs.map +0 -7
- package/dist/lib/browser/react-surface-SRPLD3ED.mjs +0 -213
- package/dist/lib/browser/react-surface-SRPLD3ED.mjs.map +0 -7
- package/dist/lib/browser/settings-JY5JE7MI.mjs +0 -35
- package/dist/lib/browser/settings-JY5JE7MI.mjs.map +0 -7
- package/dist/lib/browser/state-QE7VSJWJ.mjs +0 -29
- package/dist/lib/browser/state-QE7VSJWJ.mjs.map +0 -7
- package/dist/lib/node-esm/MarkdownCard-WJPLQTFS.mjs +0 -13
- package/dist/lib/node-esm/MarkdownCard-WJPLQTFS.mjs.map +0 -7
- package/dist/lib/node-esm/MarkdownContainer-LUSMORP2.mjs +0 -13
- package/dist/lib/node-esm/MarkdownContainer-LUSMORP2.mjs.map +0 -7
- package/dist/lib/node-esm/anchor-sort-G7D5TAI6.mjs +0 -33
- package/dist/lib/node-esm/anchor-sort-G7D5TAI6.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-serializer-W5YMQP7P.mjs +0 -59
- package/dist/lib/node-esm/app-graph-serializer-W5YMQP7P.mjs.map +0 -7
- package/dist/lib/node-esm/blueprint-definition-HYFA7BKQ.mjs +0 -20
- package/dist/lib/node-esm/blueprint-definition-HYFA7BKQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3JYPCC7M.mjs +0 -105
- package/dist/lib/node-esm/chunk-3JYPCC7M.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-44VJC3QF.mjs +0 -56
- package/dist/lib/node-esm/chunk-44VJC3QF.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-D4BCFPKK.mjs +0 -703
- package/dist/lib/node-esm/chunk-D4BCFPKK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-EYAFC4N7.mjs +0 -145
- package/dist/lib/node-esm/chunk-EYAFC4N7.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PRV35A7Z.mjs +0 -168
- package/dist/lib/node-esm/chunk-PRV35A7Z.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-RQP7G7XW.mjs +0 -61
- package/dist/lib/node-esm/chunk-RQP7G7XW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SDTYEGGL.mjs +0 -102
- package/dist/lib/node-esm/chunk-SDTYEGGL.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-W3IIKDV5.mjs +0 -10
- package/dist/lib/node-esm/chunk-W3IIKDV5.mjs.map +0 -7
- package/dist/lib/node-esm/operation-resolver-2HIS2AQZ.mjs +0 -54
- package/dist/lib/node-esm/operation-resolver-2HIS2AQZ.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-RONSOJIQ.mjs +0 -214
- package/dist/lib/node-esm/react-surface-RONSOJIQ.mjs.map +0 -7
- package/dist/lib/node-esm/settings-4UGMPIRY.mjs +0 -36
- package/dist/lib/node-esm/settings-4UGMPIRY.mjs.map +0 -7
- package/dist/lib/node-esm/state-LXE5XIN4.mjs +0 -30
- package/dist/lib/node-esm/state-LXE5XIN4.mjs.map +0 -7
- package/dist/types/src/blueprints/functions/create.d.ts +0 -8
- package/dist/types/src/blueprints/functions/create.d.ts.map +0 -1
- package/dist/types/src/blueprints/functions/create.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/functions/index.d.ts +0 -4
- package/dist/types/src/blueprints/functions/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/functions/open.d.ts +0 -7
- package/dist/types/src/blueprints/functions/open.d.ts.map +0 -1
- package/dist/types/src/blueprints/functions/update.d.ts +0 -6
- package/dist/types/src/blueprints/functions/update.d.ts.map +0 -1
- package/dist/types/src/blueprints/functions/update.test.d.ts.map +0 -1
- package/dist/types/src/capabilities/anchor-sort/anchor-sort.d.ts +0 -5
- package/dist/types/src/capabilities/anchor-sort/anchor-sort.d.ts.map +0 -1
- package/dist/types/src/capabilities/anchor-sort/index.d.ts +0 -3
- package/dist/types/src/capabilities/anchor-sort/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-serializer/app-graph-serializer.d.ts +0 -5
- package/dist/types/src/capabilities/app-graph-serializer/app-graph-serializer.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-serializer/index.d.ts +0 -3
- package/dist/types/src/capabilities/app-graph-serializer/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/artifact-definition/artifact-definition.d.ts +0 -5
- package/dist/types/src/capabilities/artifact-definition/artifact-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/artifact-definition/index.d.ts +0 -3
- package/dist/types/src/capabilities/artifact-definition/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +0 -10
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts +0 -3
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +0 -5
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/index.d.ts +0 -3
- package/dist/types/src/capabilities/settings/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/settings.d.ts +0 -6
- package/dist/types/src/capabilities/settings/settings.d.ts.map +0 -1
- package/dist/types/src/capabilities/state/index.d.ts +0 -3
- package/dist/types/src/capabilities/state/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/state/state.d.ts +0 -5
- package/dist/types/src/capabilities/state/state.d.ts.map +0 -1
- package/dist/types/src/components/MarkdownCard/MarkdownCard.d.ts.map +0 -1
- package/dist/types/src/components/MarkdownCard/MarkdownCard.stories.d.ts.map +0 -1
- package/dist/types/src/components/MarkdownCard/index.d.ts.map +0 -1
- package/dist/types/src/components/MarkdownContainer.d.ts.map +0 -1
- package/dist/types/src/components/MarkdownContainer.stories.d.ts +0 -59
- package/dist/types/src/components/MarkdownContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/Suggestions.stories.d.ts +0 -11
- package/dist/types/src/components/Suggestions.stories.d.ts.map +0 -1
- package/dist/types/src/hooks/useSelectCurrentThread.d.ts +0 -6
- package/dist/types/src/hooks/useSelectCurrentThread.d.ts.map +0 -1
- package/dist/types/src/types/MarkdownAction.d.ts +0 -66
- package/dist/types/src/types/MarkdownAction.d.ts.map +0 -1
- package/src/blueprints/functions/create.conversations.json +0 -1
- package/src/blueprints/functions/create.test.ts +0 -125
- package/src/blueprints/functions/create.ts +0 -34
- package/src/blueprints/functions/index.ts +0 -7
- package/src/blueprints/functions/open.ts +0 -33
- package/src/blueprints/functions/update.conversations.json +0 -1
- package/src/blueprints/functions/update.test.ts +0 -149
- package/src/blueprints/functions/update.ts +0 -38
- package/src/capabilities/anchor-sort/index.ts +0 -7
- package/src/capabilities/app-graph-serializer/index.ts +0 -7
- package/src/capabilities/artifact-definition/index.ts +0 -7
- package/src/capabilities/blueprint-definition/blueprint-definition.ts +0 -25
- package/src/capabilities/blueprint-definition/index.ts +0 -7
- package/src/capabilities/operation-resolver/index.ts +0 -7
- package/src/capabilities/operation-resolver/operation-resolver.ts +0 -45
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/settings/index.ts +0 -7
- package/src/capabilities/state/index.ts +0 -7
- package/src/capabilities/state/state.ts +0 -31
- package/src/components/Suggestions.stories.tsx +0 -215
- package/src/hooks/useSelectCurrentThread.tsx +0 -61
- package/src/types/MarkdownAction.ts +0 -59
- /package/dist/lib/browser/{MarkdownCard-WHK3ORP7.mjs.map → chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/{browser/MarkdownContainer-V7EAADMF.mjs.map → node-esm/chunk-HSLMI22Q.mjs.map} +0 -0
- /package/dist/types/src/{components → containers}/MarkdownCard/MarkdownCard.stories.d.ts +0 -0
- /package/dist/types/src/{blueprints/functions → operations}/create.test.d.ts +0 -0
- /package/dist/types/src/{blueprints/functions → operations}/update.test.d.ts +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-markdown",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.bcb3aa67d6",
|
|
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",
|
|
@@ -12,6 +12,22 @@
|
|
|
12
12
|
"author": "DXOS.org",
|
|
13
13
|
"sideEffects": true,
|
|
14
14
|
"type": "module",
|
|
15
|
+
"imports": {
|
|
16
|
+
"#blueprints": "./src/blueprints/index.ts",
|
|
17
|
+
"#capabilities": {
|
|
18
|
+
"source": "./src/capabilities/index.ts",
|
|
19
|
+
"types": "./src/capabilities/index.ts",
|
|
20
|
+
"browser": "./src/capabilities/index.ts",
|
|
21
|
+
"node": "./src/capabilities/node.ts"
|
|
22
|
+
},
|
|
23
|
+
"#components": "./src/components/index.ts",
|
|
24
|
+
"#containers": "./src/containers/index.ts",
|
|
25
|
+
"#hooks": "./src/hooks/index.ts",
|
|
26
|
+
"#meta": "./src/meta.ts",
|
|
27
|
+
"#operations": "./src/operations/index.ts",
|
|
28
|
+
"#testing": "./src/testing.ts",
|
|
29
|
+
"#types": "./src/types/index.ts"
|
|
30
|
+
},
|
|
15
31
|
"exports": {
|
|
16
32
|
".": {
|
|
17
33
|
"source": "./src/index.ts",
|
|
@@ -31,6 +47,18 @@
|
|
|
31
47
|
"browser": "./dist/lib/browser/cli/index.mjs",
|
|
32
48
|
"node": "./dist/lib/node-esm/cli/index.mjs"
|
|
33
49
|
},
|
|
50
|
+
"./operations": {
|
|
51
|
+
"source": "./src/operations/index.ts",
|
|
52
|
+
"types": "./dist/types/src/operations/index.d.ts",
|
|
53
|
+
"browser": "./dist/lib/browser/operations/index.mjs",
|
|
54
|
+
"node": "./dist/lib/node-esm/operations/index.mjs"
|
|
55
|
+
},
|
|
56
|
+
"./testing": {
|
|
57
|
+
"source": "./src/testing.ts",
|
|
58
|
+
"types": "./dist/types/src/testing.d.ts",
|
|
59
|
+
"browser": "./dist/lib/browser/testing.mjs",
|
|
60
|
+
"node": "./dist/lib/node-esm/testing.mjs"
|
|
61
|
+
},
|
|
34
62
|
"./types": {
|
|
35
63
|
"source": "./src/types/index.ts",
|
|
36
64
|
"types": "./dist/types/src/types/index.d.ts",
|
|
@@ -44,6 +72,9 @@
|
|
|
44
72
|
"blueprints": [
|
|
45
73
|
"dist/types/src/blueprints/index.d.ts"
|
|
46
74
|
],
|
|
75
|
+
"operations": [
|
|
76
|
+
"dist/types/src/operations/index.d.ts"
|
|
77
|
+
],
|
|
47
78
|
"toolkit": [
|
|
48
79
|
"dist/types/src/toolkit.d.ts"
|
|
49
80
|
],
|
|
@@ -61,74 +92,75 @@
|
|
|
61
92
|
"@codemirror/search": "^6.5.11",
|
|
62
93
|
"@codemirror/state": "^6.5.2",
|
|
63
94
|
"@codemirror/view": "^6.38.4",
|
|
64
|
-
"@effect-atom/atom": "^0.
|
|
65
|
-
"@effect-atom/atom-react": "^0.
|
|
66
|
-
"@effect/ai": "0.
|
|
67
|
-
"@effect/experimental": "0.
|
|
95
|
+
"@effect-atom/atom": "^0.5.1",
|
|
96
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
97
|
+
"@effect/ai": "0.33.2",
|
|
98
|
+
"@effect/experimental": "0.58.0",
|
|
68
99
|
"@radix-ui/react-context": "1.1.1",
|
|
69
100
|
"react-dropzone": "^14.2.3",
|
|
70
|
-
"@dxos/ai": "0.8.4-main.
|
|
71
|
-
"@dxos/
|
|
72
|
-
"@dxos/assistant": "0.8.4-main.
|
|
73
|
-
"@dxos/
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/
|
|
76
|
-
"@dxos/echo
|
|
77
|
-
"@dxos/
|
|
78
|
-
"@dxos/
|
|
79
|
-
"@dxos/
|
|
80
|
-
"@dxos/invariant": "0.8.4-main.
|
|
81
|
-
"@dxos/
|
|
82
|
-
"@dxos/
|
|
83
|
-
"@dxos/
|
|
84
|
-
"@dxos/
|
|
85
|
-
"@dxos/
|
|
86
|
-
"@dxos/
|
|
87
|
-
"@dxos/plugin-attention": "0.8.4-main.
|
|
88
|
-
"@dxos/plugin-
|
|
89
|
-
"@dxos/plugin-
|
|
90
|
-
"@dxos/plugin-
|
|
91
|
-
"@dxos/plugin-
|
|
92
|
-
"@dxos/
|
|
93
|
-
"@dxos/
|
|
94
|
-
"@dxos/react-
|
|
95
|
-
"@dxos/react-
|
|
96
|
-
"@dxos/react-ui-
|
|
97
|
-
"@dxos/react-ui-
|
|
98
|
-
"@dxos/react-ui-
|
|
99
|
-
"@dxos/
|
|
100
|
-
"@dxos/
|
|
101
|
-
"@dxos/react-ui-stack": "0.8.4-main.
|
|
102
|
-
"@dxos/
|
|
103
|
-
"@dxos/
|
|
104
|
-
"@dxos/
|
|
105
|
-
"@dxos/
|
|
101
|
+
"@dxos/ai": "0.8.4-main.bcb3aa67d6",
|
|
102
|
+
"@dxos/app-toolkit": "0.8.4-main.bcb3aa67d6",
|
|
103
|
+
"@dxos/assistant": "0.8.4-main.bcb3aa67d6",
|
|
104
|
+
"@dxos/app-framework": "0.8.4-main.bcb3aa67d6",
|
|
105
|
+
"@dxos/async": "0.8.4-main.bcb3aa67d6",
|
|
106
|
+
"@dxos/blueprints": "0.8.4-main.bcb3aa67d6",
|
|
107
|
+
"@dxos/echo": "0.8.4-main.bcb3aa67d6",
|
|
108
|
+
"@dxos/echo-db": "0.8.4-main.bcb3aa67d6",
|
|
109
|
+
"@dxos/client-protocol": "0.8.4-main.bcb3aa67d6",
|
|
110
|
+
"@dxos/effect": "0.8.4-main.bcb3aa67d6",
|
|
111
|
+
"@dxos/invariant": "0.8.4-main.bcb3aa67d6",
|
|
112
|
+
"@dxos/functions-runtime": "0.8.4-main.bcb3aa67d6",
|
|
113
|
+
"@dxos/functions": "0.8.4-main.bcb3aa67d6",
|
|
114
|
+
"@dxos/keys": "0.8.4-main.bcb3aa67d6",
|
|
115
|
+
"@dxos/lit-ui": "0.8.4-main.bcb3aa67d6",
|
|
116
|
+
"@dxos/operation": "0.8.4-main.bcb3aa67d6",
|
|
117
|
+
"@dxos/log": "0.8.4-main.bcb3aa67d6",
|
|
118
|
+
"@dxos/plugin-attention": "0.8.4-main.bcb3aa67d6",
|
|
119
|
+
"@dxos/plugin-client": "0.8.4-main.bcb3aa67d6",
|
|
120
|
+
"@dxos/plugin-deck": "0.8.4-main.bcb3aa67d6",
|
|
121
|
+
"@dxos/plugin-graph": "0.8.4-main.bcb3aa67d6",
|
|
122
|
+
"@dxos/plugin-preview": "0.8.4-main.bcb3aa67d6",
|
|
123
|
+
"@dxos/plugin-space": "0.8.4-main.bcb3aa67d6",
|
|
124
|
+
"@dxos/plugin-theme": "0.8.4-main.bcb3aa67d6",
|
|
125
|
+
"@dxos/react-client": "0.8.4-main.bcb3aa67d6",
|
|
126
|
+
"@dxos/react-hooks": "0.8.4-main.bcb3aa67d6",
|
|
127
|
+
"@dxos/react-ui-attention": "0.8.4-main.bcb3aa67d6",
|
|
128
|
+
"@dxos/react-ui-editor": "0.8.4-main.bcb3aa67d6",
|
|
129
|
+
"@dxos/react-ui-form": "0.8.4-main.bcb3aa67d6",
|
|
130
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.bcb3aa67d6",
|
|
131
|
+
"@dxos/react-ui-menu": "0.8.4-main.bcb3aa67d6",
|
|
132
|
+
"@dxos/react-ui-stack": "0.8.4-main.bcb3aa67d6",
|
|
133
|
+
"@dxos/schema": "0.8.4-main.bcb3aa67d6",
|
|
134
|
+
"@dxos/types": "0.8.4-main.bcb3aa67d6",
|
|
135
|
+
"@dxos/ui": "0.8.4-main.bcb3aa67d6",
|
|
136
|
+
"@dxos/ui-editor": "0.8.4-main.bcb3aa67d6",
|
|
137
|
+
"@dxos/util": "0.8.4-main.bcb3aa67d6"
|
|
106
138
|
},
|
|
107
139
|
"devDependencies": {
|
|
108
|
-
"@effect-atom/atom-react": "^0.
|
|
109
|
-
"@effect/platform": "0.
|
|
140
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
141
|
+
"@effect/platform": "0.94.4",
|
|
110
142
|
"@types/react": "~19.2.7",
|
|
111
143
|
"@types/react-dom": "~19.2.3",
|
|
112
|
-
"effect": "3.
|
|
144
|
+
"effect": "3.20.0",
|
|
113
145
|
"react": "~19.2.3",
|
|
114
146
|
"react-dom": "~19.2.3",
|
|
115
|
-
"vite": "7.1.
|
|
116
|
-
"@dxos/debug": "0.8.4-main.
|
|
117
|
-
"@dxos/plugin-testing": "0.8.4-main.
|
|
118
|
-
"@dxos/plugin-theme": "0.8.4-main.
|
|
119
|
-
"@dxos/
|
|
120
|
-
"@dxos/
|
|
121
|
-
"@dxos/
|
|
122
|
-
"@dxos/ui
|
|
147
|
+
"vite": "^7.1.11",
|
|
148
|
+
"@dxos/debug": "0.8.4-main.bcb3aa67d6",
|
|
149
|
+
"@dxos/plugin-testing": "0.8.4-main.bcb3aa67d6",
|
|
150
|
+
"@dxos/plugin-theme": "0.8.4-main.bcb3aa67d6",
|
|
151
|
+
"@dxos/storybook-utils": "0.8.4-main.bcb3aa67d6",
|
|
152
|
+
"@dxos/random": "0.8.4-main.bcb3aa67d6",
|
|
153
|
+
"@dxos/ui-theme": "0.8.4-main.bcb3aa67d6",
|
|
154
|
+
"@dxos/react-ui": "0.8.4-main.bcb3aa67d6"
|
|
123
155
|
},
|
|
124
156
|
"peerDependencies": {
|
|
125
|
-
"@effect-atom/atom-react": "^0.
|
|
126
|
-
"@effect/platform": "0.
|
|
127
|
-
"effect": "3.
|
|
157
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
158
|
+
"@effect/platform": "0.94.4",
|
|
159
|
+
"effect": "3.20.0",
|
|
128
160
|
"react": "~19.2.3",
|
|
129
161
|
"react-dom": "~19.2.3",
|
|
130
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
131
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
162
|
+
"@dxos/react-ui": "0.8.4-main.bcb3aa67d6",
|
|
163
|
+
"@dxos/ui-theme": "0.8.4-main.bcb3aa67d6"
|
|
132
164
|
},
|
|
133
165
|
"publishConfig": {
|
|
134
166
|
"access": "public"
|
package/src/MarkdownPlugin.tsx
CHANGED
|
@@ -3,53 +3,46 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
|
+
import * as Option from 'effect/Option';
|
|
6
7
|
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
8
|
+
import { Plugin } from '@dxos/app-framework';
|
|
9
|
+
import { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';
|
|
10
|
+
import { Annotation, type Obj, Ref } from '@dxos/echo';
|
|
9
11
|
import { createDocAccessor, getTextInRange } from '@dxos/echo-db';
|
|
10
12
|
import { Operation } from '@dxos/operation';
|
|
11
|
-
import { SpaceCapabilities, SpaceEvents } from '@dxos/plugin-space';
|
|
12
13
|
import { type CreateObject } from '@dxos/plugin-space/types';
|
|
14
|
+
import { SpaceOperation } from '@dxos/plugin-space/operations';
|
|
13
15
|
import { translations as editorTranslations } from '@dxos/react-ui-editor';
|
|
14
16
|
import { Text } from '@dxos/schema';
|
|
15
17
|
|
|
16
|
-
import { MarkdownBlueprint } from '
|
|
18
|
+
import { MarkdownBlueprint } from '#blueprints';
|
|
19
|
+
import { meta } from '#meta';
|
|
20
|
+
import { translations } from './translations';
|
|
21
|
+
import { Markdown, MarkdownEvents } from '#types';
|
|
22
|
+
import { MarkdownOperation } from '#operations';
|
|
23
|
+
import { serializer } from './util';
|
|
24
|
+
|
|
17
25
|
import {
|
|
18
26
|
AnchorSort,
|
|
19
27
|
AppGraphSerializer,
|
|
20
28
|
BlueprintDefinition,
|
|
21
29
|
MarkdownSettings,
|
|
22
30
|
MarkdownState,
|
|
23
|
-
|
|
31
|
+
OperationHandler,
|
|
24
32
|
ReactSurface,
|
|
25
|
-
} from '
|
|
26
|
-
import { meta } from './meta';
|
|
27
|
-
import { translations } from './translations';
|
|
28
|
-
import { Markdown, MarkdownEvents, MarkdownOperation } from './types';
|
|
29
|
-
import { serializer } from './util';
|
|
33
|
+
} from '#capabilities';
|
|
30
34
|
|
|
31
35
|
export const MarkdownPlugin = Plugin.define(meta).pipe(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
activatesOn: Common.ActivationEvent.SetupSettings,
|
|
35
|
-
activate: MarkdownSettings,
|
|
36
|
-
}),
|
|
37
|
-
Plugin.addModule({
|
|
38
|
-
id: 'state',
|
|
39
|
-
// TODO(wittjosiah): Does not integrate with settings store.
|
|
40
|
-
// Should this be a different event?
|
|
41
|
-
// Should settings store be renamed to be more generic?
|
|
42
|
-
activatesOn: Common.ActivationEvent.SetupSettings,
|
|
43
|
-
activate: MarkdownState,
|
|
44
|
-
}),
|
|
45
|
-
Common.Plugin.addMetadataModule({
|
|
36
|
+
AppPlugin.addBlueprintDefinitionModule({ activate: BlueprintDefinition }),
|
|
37
|
+
AppPlugin.addMetadataModule({
|
|
46
38
|
metadata: {
|
|
47
39
|
id: Markdown.Document.typename,
|
|
48
40
|
metadata: {
|
|
41
|
+
// TODO(dmaretskyi): Remove label, icon and iconHue and query them of schema.
|
|
49
42
|
label: (object: Markdown.Document) => object.name || object.fallbackName,
|
|
50
|
-
icon:
|
|
51
|
-
iconHue: '
|
|
52
|
-
blueprints: [MarkdownBlueprint.
|
|
43
|
+
icon: Annotation.IconAnnotation.get(Markdown.Document).pipe(Option.getOrThrow).icon,
|
|
44
|
+
iconHue: Annotation.IconAnnotation.get(Markdown.Document).pipe(Option.getOrThrow).hue ?? 'white',
|
|
45
|
+
blueprints: [MarkdownBlueprint.key],
|
|
53
46
|
graphProps: {
|
|
54
47
|
managesAutofocus: true,
|
|
55
48
|
},
|
|
@@ -65,35 +58,47 @@ export const MarkdownPlugin = Plugin.define(meta).pipe(
|
|
|
65
58
|
return getTextInRange(createDocAccessor(doc.content.target!, ['content']), start, end);
|
|
66
59
|
}
|
|
67
60
|
},
|
|
68
|
-
createObject: ((props
|
|
61
|
+
createObject: ((props, options) =>
|
|
62
|
+
Effect.gen(function* () {
|
|
63
|
+
const object = Markdown.make(props);
|
|
64
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
65
|
+
object,
|
|
66
|
+
target: options.target,
|
|
67
|
+
hidden: true,
|
|
68
|
+
targetNodeId: options.targetNodeId,
|
|
69
|
+
});
|
|
70
|
+
})) satisfies CreateObject,
|
|
71
|
+
scrollToAnchor: MarkdownOperation.ScrollToAnchor,
|
|
69
72
|
},
|
|
70
73
|
},
|
|
71
74
|
}),
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
activatesOn: SpaceEvents.SpaceCreated,
|
|
76
|
-
activate: () =>
|
|
77
|
-
Effect.succeed(
|
|
78
|
-
Capability.contributes(SpaceCapabilities.OnCreateSpace, (params) =>
|
|
79
|
-
Operation.invoke(MarkdownOperation.OnCreateSpace, params),
|
|
80
|
-
),
|
|
81
|
-
),
|
|
82
|
-
}),
|
|
83
|
-
Common.Plugin.addSurfaceModule({
|
|
75
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
76
|
+
AppPlugin.addSchemaModule({ schema: [Markdown.Document, Text.Text] }),
|
|
77
|
+
AppPlugin.addSurfaceModule({
|
|
84
78
|
activate: ReactSurface,
|
|
85
79
|
activatesBefore: [MarkdownEvents.SetupExtensions],
|
|
86
80
|
}),
|
|
87
|
-
|
|
81
|
+
AppPlugin.addTranslationsModule({ translations: [...translations, ...editorTranslations] }),
|
|
82
|
+
Plugin.addModule({
|
|
83
|
+
activatesOn: AppActivationEvents.SetupSettings,
|
|
84
|
+
activate: MarkdownSettings,
|
|
85
|
+
}),
|
|
86
|
+
Plugin.addModule({
|
|
87
|
+
id: 'state',
|
|
88
|
+
// TODO(wittjosiah): Does not integrate with settings store.
|
|
89
|
+
// Should this be a different event?
|
|
90
|
+
// Should settings store be renamed to be more generic?
|
|
91
|
+
activatesOn: AppActivationEvents.SetupSettings,
|
|
92
|
+
activate: MarkdownState,
|
|
93
|
+
}),
|
|
88
94
|
Plugin.addModule({
|
|
89
|
-
activatesOn:
|
|
95
|
+
activatesOn: AppActivationEvents.AppGraphReady,
|
|
90
96
|
activate: AppGraphSerializer,
|
|
91
97
|
}),
|
|
92
98
|
Plugin.addModule({
|
|
93
99
|
// TODO(wittjosiah): More relevant event?
|
|
94
|
-
activatesOn:
|
|
100
|
+
activatesOn: AppActivationEvents.AppGraphReady,
|
|
95
101
|
activate: AnchorSort,
|
|
96
102
|
}),
|
|
97
|
-
Common.Plugin.addBlueprintDefinitionModule({ activate: BlueprintDefinition }),
|
|
98
103
|
Plugin.make,
|
|
99
104
|
);
|
package/src/blueprints/index.ts
CHANGED
|
@@ -2,21 +2,20 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { type AppCapabilities } from '@dxos/app-toolkit';
|
|
5
6
|
import { Blueprint, Template } from '@dxos/blueprints';
|
|
6
|
-
import { type FunctionDefinition } from '@dxos/functions';
|
|
7
7
|
import { trim } from '@dxos/util';
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import { Create, Open, Update } from '../operations/definitions';
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
const BLUEPRINT_KEY = 'org.dxos.blueprint.markdown';
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export const make = () =>
|
|
13
|
+
const make = () =>
|
|
16
14
|
Blueprint.make({
|
|
17
|
-
key:
|
|
15
|
+
key: BLUEPRINT_KEY,
|
|
18
16
|
name: 'Markdown',
|
|
19
|
-
|
|
17
|
+
description: 'Work with markdown documents. Preferred over raw database operations.',
|
|
18
|
+
tools: Blueprint.toolDefinitions({ operations: [Create, Open, Update] }),
|
|
20
19
|
instructions: Template.make({
|
|
21
20
|
// TODO(wittjosiah): Move example to function input schema annotation.
|
|
22
21
|
source: trim`
|
|
@@ -36,3 +35,10 @@ export const make = () =>
|
|
|
36
35
|
`,
|
|
37
36
|
}),
|
|
38
37
|
});
|
|
38
|
+
|
|
39
|
+
const blueprint: AppCapabilities.BlueprintDefinition = {
|
|
40
|
+
key: BLUEPRINT_KEY,
|
|
41
|
+
make,
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export default blueprint;
|
|
@@ -4,16 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
|
-
import { Capability
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
8
9
|
import { Relation } from '@dxos/echo';
|
|
9
10
|
import { createDocAccessor, getRangeFromCursor } from '@dxos/echo-db';
|
|
10
11
|
import { type AnchoredTo } from '@dxos/types';
|
|
11
12
|
|
|
12
|
-
import { Markdown } from '
|
|
13
|
+
import { Markdown } from '#types';
|
|
13
14
|
|
|
14
15
|
export default Capability.makeModule(() =>
|
|
15
16
|
Effect.succeed(
|
|
16
|
-
Capability.contributes(
|
|
17
|
+
Capability.contributes(AppCapabilities.AnchorSort, {
|
|
17
18
|
key: Markdown.Document.typename,
|
|
18
19
|
sort: (anchorA: AnchoredTo.AnchoredTo, anchorB: AnchoredTo.AnchoredTo) => {
|
|
19
20
|
const doc = Relation.getTarget(anchorA) as Markdown.Document;
|
package/src/capabilities/{app-graph-serializer/app-graph-serializer.ts → app-graph-serializer.ts}
RENAMED
|
@@ -4,21 +4,23 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
8
9
|
import { Obj } from '@dxos/echo';
|
|
9
|
-
import {
|
|
10
|
+
import { Collection } from '@dxos/echo';
|
|
11
|
+
import { SpaceOperation } from '@dxos/plugin-space/operations';
|
|
10
12
|
import { isSpace } from '@dxos/react-client/echo';
|
|
11
|
-
import { Collection } from '@dxos/schema';
|
|
12
13
|
|
|
13
|
-
import { translations } from '
|
|
14
|
-
import { Markdown
|
|
14
|
+
import { translations } from '../translations';
|
|
15
|
+
import { Markdown } from '#types';
|
|
16
|
+
import { MarkdownOperation } from '#operations';
|
|
15
17
|
|
|
16
18
|
export default Capability.makeModule(
|
|
17
19
|
Effect.fnUntraced(function* () {
|
|
18
20
|
// Get context for lazy capability access in callbacks.
|
|
19
21
|
const capabilities = yield* Capability.Service;
|
|
20
22
|
|
|
21
|
-
return Capability.contributes(
|
|
23
|
+
return Capability.contributes(AppCapabilities.AppGraphSerializer, [
|
|
22
24
|
{
|
|
23
25
|
inputType: Markdown.Document.typename,
|
|
24
26
|
outputType: 'text/markdown',
|
|
@@ -30,7 +32,7 @@ export default Capability.makeModule(
|
|
|
30
32
|
name:
|
|
31
33
|
doc.name ||
|
|
32
34
|
doc.fallbackName ||
|
|
33
|
-
translations[0]['en-US'][Markdown.Document.typename]['object
|
|
35
|
+
translations[0]['en-US'][Markdown.Document.typename]['object-name.placeholder'],
|
|
34
36
|
data: content.content,
|
|
35
37
|
type: 'text/markdown',
|
|
36
38
|
};
|
|
@@ -44,8 +46,11 @@ export default Capability.makeModule(
|
|
|
44
46
|
return;
|
|
45
47
|
}
|
|
46
48
|
|
|
47
|
-
const { invokePromise } = capabilities.get(
|
|
48
|
-
const createResult = await invokePromise(MarkdownOperation.
|
|
49
|
+
const { invokePromise } = capabilities.get(Capabilities.OperationInvoker);
|
|
50
|
+
const createResult = await invokePromise(MarkdownOperation.CreateMarkdown, {
|
|
51
|
+
name: data.name,
|
|
52
|
+
content: data.data,
|
|
53
|
+
});
|
|
49
54
|
if (!createResult.data?.object) {
|
|
50
55
|
return undefined;
|
|
51
56
|
}
|
package/src/capabilities/{artifact-definition/artifact-definition.ts → artifact-definition.ts}
RENAMED
|
@@ -9,16 +9,16 @@ import * as Effect from 'effect/Effect';
|
|
|
9
9
|
import * as Schema from 'effect/Schema';
|
|
10
10
|
|
|
11
11
|
import { ToolResult, createTool } from '@dxos/ai';
|
|
12
|
-
import {
|
|
12
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
13
13
|
import { ArtifactId, createArtifactElement } from '@dxos/assistant';
|
|
14
14
|
import { defineArtifact } from '@dxos/blueprints';
|
|
15
15
|
import { Obj } from '@dxos/echo';
|
|
16
16
|
import { assertArgument, invariant } from '@dxos/invariant';
|
|
17
|
-
import { SpaceOperation } from '@dxos/plugin-space/
|
|
17
|
+
import { SpaceOperation } from '@dxos/plugin-space/operations';
|
|
18
18
|
import { Filter } from '@dxos/react-client/echo';
|
|
19
19
|
|
|
20
|
-
import { meta } from '
|
|
21
|
-
import { Markdown } from '
|
|
20
|
+
import { meta } from '#meta';
|
|
21
|
+
import { Markdown } from '#types';
|
|
22
22
|
|
|
23
23
|
export default Capability.makeModule(() =>
|
|
24
24
|
Effect.sync(() => {
|
|
@@ -105,6 +105,6 @@ export default Capability.makeModule(() =>
|
|
|
105
105
|
],
|
|
106
106
|
});
|
|
107
107
|
|
|
108
|
-
return Capability.contributes(
|
|
108
|
+
return Capability.contributes(Capabilities.ArtifactDefinition, definition);
|
|
109
109
|
}),
|
|
110
110
|
);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
9
|
+
|
|
10
|
+
import { MarkdownBlueprint } from '#blueprints';
|
|
11
|
+
|
|
12
|
+
const blueprintDefinition = Capability.makeModule<
|
|
13
|
+
[],
|
|
14
|
+
Capability.Capability<typeof AppCapabilities.BlueprintDefinition>[]
|
|
15
|
+
>(() => Effect.succeed([Capability.contributes(AppCapabilities.BlueprintDefinition, MarkdownBlueprint)]));
|
|
16
|
+
|
|
17
|
+
export default blueprintDefinition;
|
|
@@ -2,10 +2,16 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
5
|
+
import { Capability } from '@dxos/app-framework';
|
|
6
|
+
import { OperationHandlerSet } from '@dxos/operation';
|
|
7
|
+
|
|
8
|
+
export const AnchorSort = Capability.lazy('AnchorSort', () => import('./anchor-sort'));
|
|
9
|
+
export const AppGraphSerializer = Capability.lazy('AppGraphSerializer', () => import('./app-graph-serializer'));
|
|
10
|
+
export const BlueprintDefinition = Capability.lazy('BlueprintDefinition', () => import('./blueprint-definition'));
|
|
11
|
+
export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
|
|
12
|
+
'OperationHandler',
|
|
13
|
+
() => import('./operation-handler'),
|
|
14
|
+
);
|
|
15
|
+
export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
|
|
16
|
+
export const MarkdownSettings = Capability.lazy('MarkdownSettings', () => import('./settings'));
|
|
17
|
+
export const MarkdownState = Capability.lazy('MarkdownState', () => import('./state'));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Capability } from '@dxos/app-framework';
|
|
6
|
+
import { OperationHandlerSet } from '@dxos/operation';
|
|
7
|
+
|
|
8
|
+
export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
|
|
9
|
+
'OperationHandler',
|
|
10
|
+
() => import('./operation-handler'),
|
|
11
|
+
);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
+
import type { OperationHandlerSet } from '@dxos/operation';
|
|
9
|
+
|
|
10
|
+
import { MarkdownOperationHandlerSet } from '#operations';
|
|
11
|
+
|
|
12
|
+
export default Capability.makeModule<OperationHandlerSet.OperationHandlerSet>(
|
|
13
|
+
Effect.fnUntraced(function* () {
|
|
14
|
+
return Capability.contributes(Capabilities.OperationHandler, MarkdownOperationHandlerSet);
|
|
15
|
+
}),
|
|
16
|
+
);
|