@dxos/plugin-markdown 0.8.3-staging.0fa589b → 0.8.4-main.f9ba587
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/{MarkdownContainer-EFWQ6DHD.mjs → MarkdownContainer-BO5MZWA4.mjs} +19 -18
- package/dist/lib/browser/{MarkdownContainer-EFWQ6DHD.mjs.map → MarkdownContainer-BO5MZWA4.mjs.map} +3 -3
- package/dist/lib/browser/{MarkdownPreview-F4PYFW5L.mjs → MarkdownPreview-XYP2VXI2.mjs} +7 -7
- package/dist/lib/browser/{MarkdownPreview-F4PYFW5L.mjs.map → MarkdownPreview-XYP2VXI2.mjs.map} +3 -3
- package/dist/lib/browser/{anchor-sort-BMAN2ABT.mjs → anchor-sort-UKJJ7ZNP.mjs} +4 -4
- package/dist/lib/browser/{app-graph-serializer-EI6TEHRQ.mjs → app-graph-serializer-7DKUUZSJ.mjs} +9 -9
- package/dist/lib/browser/app-graph-serializer-7DKUUZSJ.mjs.map +7 -0
- package/dist/lib/browser/{artifact-definition-FQ2R6KPT.mjs → artifact-definition-JSUG6XPF.mjs} +5 -5
- package/dist/lib/browser/{chunk-D767LUGU.mjs → chunk-5JRBJCZM.mjs} +9 -10
- package/dist/lib/browser/chunk-5JRBJCZM.mjs.map +7 -0
- package/dist/lib/browser/{chunk-QVJETNGS.mjs → chunk-777RIED6.mjs} +3 -3
- package/dist/lib/browser/{chunk-JX6XNEHE.mjs → chunk-EPTSAJZM.mjs} +2 -2
- package/dist/lib/browser/chunk-IZLATPXQ.mjs +20 -0
- package/dist/lib/browser/{chunk-LXSRQPEP.mjs → chunk-LFML7LC6.mjs} +3 -3
- package/dist/lib/browser/{chunk-N2D26K6W.mjs → chunk-UANWRJZU.mjs} +5 -5
- package/dist/lib/browser/chunk-UANWRJZU.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +10 -10
- package/dist/lib/browser/index.mjs.map +1 -1
- package/dist/lib/browser/{intent-resolver-6ZOABX2J.mjs → intent-resolver-3MXYO3MW.mjs} +5 -5
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-4B5ELMEW.mjs → react-surface-NAXBGUR3.mjs} +11 -11
- package/dist/lib/browser/{settings-PLH54VC7.mjs → settings-KN75ZQY6.mjs} +4 -4
- package/dist/lib/browser/{state-KI6PJ6DT.mjs → state-LZWTAS65.mjs} +4 -4
- package/dist/lib/browser/types/index.mjs +2 -2
- package/dist/lib/node-esm/{MarkdownContainer-O3SGMH4G.mjs → MarkdownContainer-J2NVCX2H.mjs} +19 -18
- package/dist/lib/node-esm/{MarkdownContainer-O3SGMH4G.mjs.map → MarkdownContainer-J2NVCX2H.mjs.map} +3 -3
- package/dist/lib/node-esm/{MarkdownPreview-KFDRV4GC.mjs → MarkdownPreview-JEXD3KSQ.mjs} +7 -7
- package/dist/lib/node-esm/{MarkdownPreview-KFDRV4GC.mjs.map → MarkdownPreview-JEXD3KSQ.mjs.map} +3 -3
- package/dist/lib/node-esm/{anchor-sort-BXL7BE67.mjs → anchor-sort-IPIS5D5B.mjs} +4 -4
- package/dist/lib/node-esm/{app-graph-serializer-F7DGNF3G.mjs → app-graph-serializer-YRMRPW7A.mjs} +9 -9
- package/dist/lib/node-esm/app-graph-serializer-YRMRPW7A.mjs.map +7 -0
- package/dist/lib/node-esm/{artifact-definition-NQOHB6S5.mjs → artifact-definition-6C2MOHGP.mjs} +5 -5
- package/dist/lib/node-esm/{chunk-JXXDCSMW.mjs → chunk-ACFGXH2K.mjs} +3 -3
- package/dist/lib/node-esm/{chunk-K26TX5V4.mjs → chunk-CWTFQSN7.mjs} +3 -3
- package/dist/lib/node-esm/{chunk-RX63ZNML.mjs → chunk-CXG7GMYP.mjs} +2 -2
- package/dist/lib/node-esm/chunk-FWKOJW6J.mjs +22 -0
- package/dist/lib/node-esm/{chunk-T2Y2BT53.mjs → chunk-JEEQLO7C.mjs} +5 -5
- package/dist/lib/{browser/chunk-N2D26K6W.mjs.map → node-esm/chunk-JEEQLO7C.mjs.map} +2 -2
- package/dist/lib/node-esm/{chunk-BWDDFDJY.mjs → chunk-Q5DIKLN5.mjs} +9 -10
- package/dist/lib/node-esm/chunk-Q5DIKLN5.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +10 -10
- package/dist/lib/node-esm/index.mjs.map +1 -1
- package/dist/lib/node-esm/{intent-resolver-CLMSVF2K.mjs → intent-resolver-BZYWV53A.mjs} +5 -5
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-YHFOQTVO.mjs → react-surface-BSAGEIN6.mjs} +11 -11
- package/dist/lib/node-esm/{settings-SIY33P3F.mjs → settings-KVP7TVX7.mjs} +4 -4
- package/dist/lib/node-esm/{state-LLGVRYKL.mjs → state-NW3W4JCQ.mjs} +4 -4
- package/dist/lib/node-esm/types/index.mjs +2 -2
- package/dist/types/src/components/MarkdownContainer.stories.d.ts +1 -1
- package/dist/types/src/components/MarkdownContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/MarkdownEditor/MarkdownEditor.stories.d.ts +1 -1
- package/dist/types/src/components/MarkdownEditor/MarkdownEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/MarkdownPreview/MarkdownPreview.stories.d.ts +1 -1
- package/dist/types/src/components/MarkdownPreview/MarkdownPreview.stories.d.ts.map +1 -1
- package/dist/types/src/components/Suggestions.stories.d.ts +1 -1
- package/dist/types/src/components/Suggestions.stories.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar.stories.d.ts +1 -1
- package/dist/types/src/components/Toolbar.stories.d.ts.map +1 -1
- package/dist/types/src/extensions.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +33 -80
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +2 -2
- package/dist/types/src/types/types.d.ts +4 -3
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +43 -45
- package/src/MarkdownPlugin.tsx +1 -1
- package/src/capabilities/app-graph-serializer.ts +3 -3
- package/src/components/MarkdownContainer.stories.tsx +2 -2
- package/src/components/MarkdownEditor/MarkdownEditor.stories.tsx +2 -2
- package/src/components/MarkdownPreview/MarkdownPreview.stories.tsx +2 -2
- package/src/components/MarkdownPreview/MarkdownPreview.tsx +2 -2
- package/src/components/Suggestions.stories.tsx +2 -2
- package/src/components/Toolbar.stories.tsx +1 -1
- package/src/extensions.tsx +18 -14
- package/src/translations.ts +6 -6
- package/src/types/types.ts +2 -2
- package/dist/lib/browser/app-graph-serializer-EI6TEHRQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-354IBM5X.mjs +0 -20
- package/dist/lib/browser/chunk-D767LUGU.mjs.map +0 -7
- package/dist/lib/node/MarkdownContainer-KYGUEZIL.cjs +0 -783
- package/dist/lib/node/MarkdownContainer-KYGUEZIL.cjs.map +0 -7
- package/dist/lib/node/MarkdownPreview-GCJJCXY6.cjs +0 -103
- package/dist/lib/node/MarkdownPreview-GCJJCXY6.cjs.map +0 -7
- package/dist/lib/node/anchor-sort-V3T4SFFI.cjs +0 -48
- package/dist/lib/node/anchor-sort-V3T4SFFI.cjs.map +0 -7
- package/dist/lib/node/app-graph-serializer-E6BXEDEL.cjs +0 -65
- package/dist/lib/node/app-graph-serializer-E6BXEDEL.cjs.map +0 -7
- package/dist/lib/node/artifact-definition-U27MH5SC.cjs +0 -158
- package/dist/lib/node/artifact-definition-U27MH5SC.cjs.map +0 -7
- package/dist/lib/node/chunk-3HHV4MM6.cjs +0 -101
- package/dist/lib/node/chunk-3HHV4MM6.cjs.map +0 -7
- package/dist/lib/node/chunk-CJLYFGPI.cjs +0 -74
- package/dist/lib/node/chunk-CJLYFGPI.cjs.map +0 -7
- package/dist/lib/node/chunk-FU3XZZCO.cjs +0 -58
- package/dist/lib/node/chunk-FU3XZZCO.cjs.map +0 -7
- package/dist/lib/node/chunk-IFYSBQE5.cjs +0 -35
- package/dist/lib/node/chunk-IFYSBQE5.cjs.map +0 -7
- package/dist/lib/node/chunk-LQAC5HL7.cjs +0 -68
- package/dist/lib/node/chunk-LQAC5HL7.cjs.map +0 -7
- package/dist/lib/node/chunk-ZU5OIHCY.cjs +0 -45
- package/dist/lib/node/chunk-ZU5OIHCY.cjs.map +0 -7
- package/dist/lib/node/index.cjs +0 -165
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-OEFLRNEJ.cjs +0 -77
- package/dist/lib/node/intent-resolver-OEFLRNEJ.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/lib/node/react-surface-456HQ4KZ.cjs +0 -218
- package/dist/lib/node/react-surface-456HQ4KZ.cjs.map +0 -7
- package/dist/lib/node/settings-E3NUTXJ4.cjs +0 -42
- package/dist/lib/node/settings-E3NUTXJ4.cjs.map +0 -7
- package/dist/lib/node/state-KKDRAG7X.cjs +0 -51
- package/dist/lib/node/state-KKDRAG7X.cjs.map +0 -7
- package/dist/lib/node/types/index.cjs +0 -40
- package/dist/lib/node/types/index.cjs.map +0 -7
- package/dist/lib/node-esm/app-graph-serializer-F7DGNF3G.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BWDDFDJY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-T2Y2BT53.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YOABAQ7A.mjs +0 -22
- /package/dist/lib/browser/{anchor-sort-BMAN2ABT.mjs.map → anchor-sort-UKJJ7ZNP.mjs.map} +0 -0
- /package/dist/lib/browser/{artifact-definition-FQ2R6KPT.mjs.map → artifact-definition-JSUG6XPF.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-QVJETNGS.mjs.map → chunk-777RIED6.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-JX6XNEHE.mjs.map → chunk-EPTSAJZM.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-354IBM5X.mjs.map → chunk-IZLATPXQ.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-LXSRQPEP.mjs.map → chunk-LFML7LC6.mjs.map} +0 -0
- /package/dist/lib/browser/{intent-resolver-6ZOABX2J.mjs.map → intent-resolver-3MXYO3MW.mjs.map} +0 -0
- /package/dist/lib/browser/{react-surface-4B5ELMEW.mjs.map → react-surface-NAXBGUR3.mjs.map} +0 -0
- /package/dist/lib/browser/{settings-PLH54VC7.mjs.map → settings-KN75ZQY6.mjs.map} +0 -0
- /package/dist/lib/browser/{state-KI6PJ6DT.mjs.map → state-LZWTAS65.mjs.map} +0 -0
- /package/dist/lib/node-esm/{anchor-sort-BXL7BE67.mjs.map → anchor-sort-IPIS5D5B.mjs.map} +0 -0
- /package/dist/lib/node-esm/{artifact-definition-NQOHB6S5.mjs.map → artifact-definition-6C2MOHGP.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-JXXDCSMW.mjs.map → chunk-ACFGXH2K.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-K26TX5V4.mjs.map → chunk-CWTFQSN7.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-RX63ZNML.mjs.map → chunk-CXG7GMYP.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-YOABAQ7A.mjs.map → chunk-FWKOJW6J.mjs.map} +0 -0
- /package/dist/lib/node-esm/{intent-resolver-CLMSVF2K.mjs.map → intent-resolver-BZYWV53A.mjs.map} +0 -0
- /package/dist/lib/node-esm/{react-surface-YHFOQTVO.mjs.map → react-surface-BSAGEIN6.mjs.map} +0 -0
- /package/dist/lib/node-esm/{settings-SIY33P3F.mjs.map → settings-KVP7TVX7.mjs.map} +0 -0
- /package/dist/lib/node-esm/{state-LLGVRYKL.mjs.map → state-NW3W4JCQ.mjs.map} +0 -0
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/events.ts", "../../../src/MarkdownPlugin.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Events } from '@dxos/app-framework';\n\nimport { MARKDOWN_PLUGIN } from './meta';\n\nexport namespace MarkdownEvents {\n export const SetupExtensions = Events.createStateEvent(`${MARKDOWN_PLUGIN}/setup-extensions`);\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from '@dxos/app-framework';\nimport { type Obj, Ref } from '@dxos/echo';\nimport { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';\nimport { SpaceCapabilities } from '@dxos/plugin-space';\nimport { defineObjectForm } from '@dxos/plugin-space/types';\nimport { createDocAccessor, getTextInRange } from '@dxos/react-client/echo';\nimport { translations as editorTranslations } from '@dxos/react-ui-editor';\nimport { DataType } from '@dxos/schema';\n\nimport {\n AnchorSort,\n AppGraphSerializer,\n ArtifactDefinition,\n IntentResolver,\n MarkdownState,\n MarkdownSettings,\n ReactSurface,\n} from './capabilities';\nimport { MarkdownEvents } from './events';\nimport { meta } from './meta';\nimport translations from './translations';\nimport { DocumentType, MarkdownAction } from './types';\nimport { serializer } from './util';\n\nexport const MarkdownPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, [...translations, ...editorTranslations]),\n }),\n defineModule({\n id: `${meta.id}/module/settings`,\n activatesOn: Events.SetupSettings,\n activate: MarkdownSettings,\n }),\n defineModule({\n id: `${meta.id}/module/state`,\n // TODO(wittjosiah): Does not integrate with settings store.\n // Should this be a different event?\n // Should settings store be renamed to be more generic?\n activatesOn: Events.SetupSettings,\n activate: MarkdownState,\n }),\n defineModule({\n id: `${meta.id}/module/metadata`,\n activatesOn: Events.SetupMetadata,\n activate: () =>\n contributes(Capabilities.Metadata, {\n id: DocumentType.typename,\n metadata: {\n label: (object: DocumentType) => object.name || object.fallbackName,\n icon: 'ph--text-aa--regular',\n graphProps: {\n managesAutofocus: true,\n },\n // TODO(wittjosiah): Move out of metadata.\n loadReferences: async (doc: DocumentType) => await Ref.Array.loadAll<Obj.Any>([doc.content]),\n serializer,\n // TODO(wittjosiah): Consider how to do generic comments without these.\n comments: 'anchored',\n selectionMode: 'multi-range',\n getAnchorLabel: (doc: DocumentType, anchor: string): string | undefined => {\n if (doc.content) {\n const [start, end] = anchor.split(':');\n return getTextInRange(createDocAccessor(doc.content.target!, ['content']), start, end);\n }\n },\n },\n }),\n }),\n defineModule({\n id: `${meta.id}/module/object-form`,\n activatesOn: ClientEvents.SetupSchema,\n activate: () =>\n contributes(\n SpaceCapabilities.ObjectForm,\n defineObjectForm({\n objectSchema: DocumentType,\n getIntent: (_, { space }) => createIntent(MarkdownAction.Create, { spaceId: space.id }),\n }),\n ),\n }),\n defineModule({\n id: `${meta.id}/module/schema`,\n activatesOn: ClientEvents.SetupSchema,\n activate: () => contributes(ClientCapabilities.Schema, [DataType.Text]),\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.SetupReactSurface,\n // TODO(wittjosiah): Should occur before the editor is loaded when surfaces activation is more granular.\n activatesBefore: [MarkdownEvents.SetupExtensions],\n activate: ReactSurface,\n }),\n defineModule({\n id: `${meta.id}/module/intent-resolver`,\n activatesOn: Events.SetupIntentResolver,\n activate: IntentResolver,\n }),\n defineModule({\n id: `${meta.id}/module/app-graph-serializer`,\n activatesOn: Events.AppGraphReady,\n activate: AppGraphSerializer,\n }),\n defineModule({\n id: `${meta.id}/module/anchor-sort`,\n // TODO(wittjosiah): More relevant event?\n activatesOn: Events.AppGraphReady,\n activate: AnchorSort,\n }),\n defineModule({\n id: `${meta.id}/module/artifact-definition`,\n activatesOn: Events.SetupArtifactDefinition,\n activate: ArtifactDefinition,\n }),\n ]);\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,2BAAuB;ACAvB,IAAAA,wBAA4F;AAC5F,kBAA8B;AAC9B,2BAAiD;AACjD,0BAAkC;AAClC,mBAAiC;AACjC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F,2BAAKE,EAAE;IACdC,aAAawC,kCAAaC;IAC1BvC,UAAU,UACRC,mCACEuC,sCAAkBC,gBAClBC,+BAAiB;MACfC,cAAchC;MACdiC,WAAW,CAACC,GAAG,EAAEC,MAAK,UAAOC,oCAAaC,qCAAeC,QAAQ;QAAEC,SAASJ,MAAMjD;MAAG,CAAA;IACvF,CAAA,CAAA;EAEN,CAAA;MACAD,oCAAa;IACXC,IAAI,GAAGF,2BAAKE,EAAE;IACdC,aAAawC,kCAAaC;IAC1BvC,UAAU,UAAMC,mCAAYkD,wCAAmBC,QAAQ;MAACC,uBAASC;KAAK;EACxE,CAAA;MACA1D,oCAAa;IACXC,IAAI,GAAGF,2BAAKE,EAAE;IACdC,aAAaR,sBAAAA,OAAOiE;;IAEpBC,iBAAiB;MAACpE,eAAeC;;IACjCW,UAAUyD;EACZ,CAAA;MACA7D,oCAAa;IACXC,IAAI,GAAGF,2BAAKE,EAAE;IACdC,aAAaR,sBAAAA,OAAOoE;IACpB1D,UAAU2D;EACZ,CAAA;MACA/D,oCAAa;IACXC,IAAI,GAAGF,2BAAKE,EAAE;IACdC,aAAaR,sBAAAA,OAAOsE;IACpB5D,UAAU6D;EACZ,CAAA;MACAjE,oCAAa;IACXC,IAAI,GAAGF,2BAAKE,EAAE;;IAEdC,aAAaR,sBAAAA,OAAOsE;IACpB5D,UAAU8D;EACZ,CAAA;MACAlE,oCAAa;IACXC,IAAI,GAAGF,2BAAKE,EAAE;IACdC,aAAaR,sBAAAA,OAAOyE;IACpB/D,UAAUgE;EACZ,CAAA;CACD;",
|
|
6
|
-
"names": ["import_app_framework", "import_echo", "MarkdownEvents", "SetupExtensions", "Events", "createStateEvent", "MARKDOWN_PLUGIN", "MarkdownPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "editorTranslations", "SetupSettings", "MarkdownSettings", "MarkdownState", "SetupMetadata", "Metadata", "DocumentType", "typename", "metadata", "label", "object", "name", "fallbackName", "icon", "graphProps", "managesAutofocus", "loadReferences", "doc", "Ref", "Array", "loadAll", "content", "serializer", "comments", "selectionMode", "getAnchorLabel", "anchor", "start", "end", "split", "getTextInRange", "createDocAccessor", "target", "ClientEvents", "SetupSchema", "SpaceCapabilities", "ObjectForm", "defineObjectForm", "objectSchema", "getIntent", "_", "space", "createIntent", "MarkdownAction", "Create", "spaceId", "ClientCapabilities", "Schema", "DataType", "Text", "SetupReactSurface", "activatesBefore", "ReactSurface", "SetupIntentResolver", "IntentResolver", "AppGraphReady", "AppGraphSerializer", "AnchorSort", "SetupArtifactDefinition", "ArtifactDefinition"]
|
|
7
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var intent_resolver_OEFLRNEJ_exports = {};
|
|
20
|
-
__export(intent_resolver_OEFLRNEJ_exports, {
|
|
21
|
-
default: () => intent_resolver_default
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(intent_resolver_OEFLRNEJ_exports);
|
|
24
|
-
var import_chunk_IFYSBQE5 = require("./chunk-IFYSBQE5.cjs");
|
|
25
|
-
var import_chunk_3HHV4MM6 = require("./chunk-3HHV4MM6.cjs");
|
|
26
|
-
var import_chunk_ZU5OIHCY = require("./chunk-ZU5OIHCY.cjs");
|
|
27
|
-
var import_automerge = require("@automerge/automerge");
|
|
28
|
-
var import_effect = require("effect");
|
|
29
|
-
var import_app_framework = require("@dxos/app-framework");
|
|
30
|
-
var import_echo = require("@dxos/echo");
|
|
31
|
-
var import_echo2 = require("@dxos/react-client/echo");
|
|
32
|
-
var import_schema = require("@dxos/schema");
|
|
33
|
-
var intent_resolver_default = (context) => (0, import_app_framework.contributes)(import_app_framework.Capabilities.IntentResolver, [
|
|
34
|
-
(0, import_app_framework.createResolver)({
|
|
35
|
-
intent: import_chunk_3HHV4MM6.MarkdownAction.Create,
|
|
36
|
-
resolve: ({ name, content }) => {
|
|
37
|
-
const doc = import_echo.Obj.make(import_chunk_3HHV4MM6.DocumentType, {
|
|
38
|
-
name,
|
|
39
|
-
content: import_echo2.Ref.make(import_echo.Obj.make(import_schema.DataType.Text, {
|
|
40
|
-
content: content ?? ""
|
|
41
|
-
}))
|
|
42
|
-
});
|
|
43
|
-
return {
|
|
44
|
-
data: {
|
|
45
|
-
object: doc
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
}),
|
|
50
|
-
(0, import_app_framework.createResolver)({
|
|
51
|
-
intent: import_chunk_3HHV4MM6.MarkdownAction.SetViewMode,
|
|
52
|
-
resolve: ({ id, viewMode }) => {
|
|
53
|
-
const { state } = context.getCapability(import_chunk_IFYSBQE5.MarkdownCapabilities.State);
|
|
54
|
-
state.viewMode[id] = viewMode;
|
|
55
|
-
}
|
|
56
|
-
}),
|
|
57
|
-
(0, import_app_framework.createResolver)({
|
|
58
|
-
intent: import_app_framework.CollaborationActions.InsertContent,
|
|
59
|
-
filter: (data) => import_echo.Obj.instanceOf(import_chunk_3HHV4MM6.DocumentType, data.target),
|
|
60
|
-
resolve: async ({ target, object: objectRef, at, label }) => {
|
|
61
|
-
const text = await target.content.load();
|
|
62
|
-
const accessor = (0, import_echo2.createDocAccessor)(text, [
|
|
63
|
-
"content"
|
|
64
|
-
]);
|
|
65
|
-
const { start, end } = (0, import_effect.pipe)(import_effect.Option.fromNullable(at), import_effect.Option.flatMap((at2) => import_effect.Option.fromNullable((0, import_echo2.getRangeFromCursor)(accessor, at2))), import_effect.Option.getOrElse(() => ({
|
|
66
|
-
start: text.content.length - 1,
|
|
67
|
-
end: text.content.length - 1
|
|
68
|
-
})));
|
|
69
|
-
accessor.handle.change((doc) => {
|
|
70
|
-
const ref = `[${label ?? "Generated content"}]](${objectRef.dxn.toString()})
|
|
71
|
-
`;
|
|
72
|
-
import_automerge.next.splice(doc, accessor.path.slice(), start, end - start, ref);
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
})
|
|
76
|
-
]);
|
|
77
|
-
//# sourceMappingURL=intent-resolver-OEFLRNEJ.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/intent-resolver.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { next as A } from '@automerge/automerge';\nimport { Option, pipe, type Schema } from 'effect';\n\nimport {\n Capabilities,\n CollaborationActions,\n contributes,\n createResolver,\n type PluginContext,\n} from '@dxos/app-framework';\nimport { Obj } from '@dxos/echo';\nimport { createDocAccessor, getRangeFromCursor, Ref } from '@dxos/react-client/echo';\nimport { DataType } from '@dxos/schema';\n\nimport { MarkdownCapabilities } from './capabilities';\nimport { DocumentType, MarkdownAction } from '../types';\n\nexport default (context: PluginContext) =>\n contributes(Capabilities.IntentResolver, [\n createResolver({\n intent: MarkdownAction.Create,\n resolve: ({ name, content }) => {\n const doc = Obj.make(DocumentType, {\n name,\n content: Ref.make(Obj.make(DataType.Text, { content: content ?? '' })),\n });\n\n return { data: { object: doc } };\n },\n }),\n createResolver({\n intent: MarkdownAction.SetViewMode,\n resolve: ({ id, viewMode }) => {\n const { state } = context.getCapability(MarkdownCapabilities.State);\n state.viewMode[id] = viewMode;\n },\n }),\n createResolver({\n intent: CollaborationActions.InsertContent,\n filter: (\n data,\n ): data is Omit<Schema.Schema.Type<typeof CollaborationActions.InsertContent.fields.input>, 'target'> & {\n target: DocumentType;\n } => Obj.instanceOf(DocumentType, data.target),\n resolve: async ({ target, object: objectRef, at, label }) => {\n const text = await target.content.load();\n const accessor = createDocAccessor(text, ['content']);\n const { start, end } = pipe(\n Option.fromNullable(at),\n Option.flatMap((at) => Option.fromNullable(getRangeFromCursor(accessor, at))),\n Option.getOrElse(() => ({ start: text.content.length - 1, end: text.content.length - 1 })),\n );\n accessor.handle.change((doc) => {\n const ref = `[${label ?? 'Generated content'}]](${objectRef.dxn.toString()})\\n`;\n A.splice(doc, accessor.path.slice(), start, end - start, ref);\n });\n },\n }),\n ]);\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,uBAA0B;AAC1B,oBAA0C;AAE1C,2BAMO;AACP,kBAAoB;AACpB,IAAAA,eAA2D;AAC3D,oBAAyB;AAKzB,IAAA,0BAAe,CAACC,gBACdC,kCAAYC,kCAAaC,gBAAgB;MACvCC,qCAAe;IACbC,QAAQC,qCAAeC;IACvBC,SAAS,CAAC,EAAEC,MAAMC,QAAO,MAAE;AACzB,YAAMC,MAAMC,gBAAIC,KAAKC,oCAAc;QACjCL;QACAC,SAASK,iBAAIF,KAAKD,gBAAIC,KAAKG,uBAASC,MAAM;UAAEP,SAASA,WAAW;QAAG,CAAA,CAAA;MACrE,CAAA;AAEA,aAAO;QAAEQ,MAAM;UAAEC,QAAQR;QAAI;MAAE;IACjC;EACF,CAAA;MACAP,qCAAe;IACbC,QAAQC,qCAAec;IACvBZ,SAAS,CAAC,EAAEa,IAAIC,SAAQ,MAAE;AACxB,YAAM,EAAEC,MAAK,IAAKvB,QAAQwB,cAAcC,2CAAqBC,KAAK;AAClEH,YAAMD,SAASD,EAAAA,IAAMC;IACvB;EACF,CAAA;MACAlB,qCAAe;IACbC,QAAQsB,0CAAqBC;IAC7BC,QAAQ,CACNX,SAGGN,gBAAIkB,WAAWhB,oCAAcI,KAAKa,MAAM;IAC7CvB,SAAS,OAAO,EAAEuB,QAAQZ,QAAQa,WAAWC,IAAIC,MAAK,MAAE;AACtD,YAAMC,OAAO,MAAMJ,OAAOrB,QAAQ0B,KAAI;AACtC,YAAMC,eAAWC,gCAAkBH,MAAM;QAAC;OAAU;AACpD,YAAM,EAAEI,OAAOC,IAAG,QAAKC,oBACrBC,qBAAOC,aAAaV,EAAAA,GACpBS,qBAAOE,QAAQ,CAACX,QAAOS,qBAAOC,iBAAaE,iCAAmBR,UAAUJ,GAAAA,CAAAA,CAAAA,GACxES,qBAAOI,UAAU,OAAO;QAAEP,OAAOJ,KAAKzB,QAAQqC,SAAS;QAAGP,KAAKL,KAAKzB,QAAQqC,SAAS;MAAE,EAAA,CAAA;AAEzFV,eAASW,OAAOC,OAAO,CAACtC,QAAAA;AACtB,cAAMuC,MAAM,IAAIhB,SAAS,mBAAA,MAAyBF,UAAUmB,IAAIC,SAAQ,CAAA;;AACxEC,yBAAAA,KAAEC,OAAO3C,KAAK0B,SAASkB,KAAKC,MAAK,GAAIjB,OAAOC,MAAMD,OAAOW,GAAAA;MAC3D,CAAA;IACF;EACF,CAAA;CACD;",
|
|
6
|
-
"names": ["import_echo", "context", "contributes", "Capabilities", "IntentResolver", "createResolver", "intent", "MarkdownAction", "Create", "resolve", "name", "content", "doc", "Obj", "make", "DocumentType", "Ref", "DataType", "Text", "data", "object", "SetViewMode", "id", "viewMode", "state", "getCapability", "MarkdownCapabilities", "State", "CollaborationActions", "InsertContent", "filter", "instanceOf", "target", "objectRef", "at", "label", "text", "load", "accessor", "createDocAccessor", "start", "end", "pipe", "Option", "fromNullable", "flatMap", "getRangeFromCursor", "getOrElse", "length", "handle", "change", "ref", "dxn", "toString", "A", "splice", "path", "slice"]
|
|
7
|
-
}
|
package/dist/lib/node/meta.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"inputs":{"packages/plugins/plugin-markdown/src/meta.ts":{"bytes":2798,"imports":[],"format":"esm"},"packages/plugins/plugin-markdown/src/capabilities/capabilities.ts":{"bytes":2125,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-markdown/src/types/schema.ts":{"bytes":4520,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-markdown/src/types/types.ts":{"bytes":6842,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/plugin-markdown/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-markdown/src/types/index.ts":{"bytes":557,"imports":[{"path":"packages/plugins/plugin-markdown/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/plugin-markdown/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-markdown/src/capabilities/anchor-sort.ts":{"bytes":4065,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","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/translations.ts":{"bytes":5754,"imports":[{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-markdown/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-markdown/src/capabilities/app-graph-serializer.ts":{"bytes":7088,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","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/schema","kind":"import-statement","external":true},{"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"}],"format":"esm"},"packages/plugins/plugin-markdown/src/capabilities/artifact-definition.ts":{"bytes":16442,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/artifact","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/invariant","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":"packages/plugins/plugin-markdown/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-markdown/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-markdown/src/capabilities/intent-resolver.ts":{"bytes":8637,"imports":[{"path":"@automerge/automerge","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-markdown/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-markdown/src/components/MarkdownSettings/MarkdownSettings.tsx":{"bytes":13220,"imports":[{"path":"@preact-signals/safe-react/tracking","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-form","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/plugin-markdown/src/components/MarkdownSettings/index.ts":{"bytes":524,"imports":[{"path":"packages/plugins/plugin-markdown/src/components/MarkdownSettings/MarkdownSettings.tsx","kind":"import-statement","original":"./MarkdownSettings"}],"format":"esm"},"packages/plugins/plugin-markdown/src/hooks/useSelectCurrentThread.tsx":{"bytes":8023,"imports":[{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"react","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-ui-editor","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-markdown/src/hooks/index.ts":{"bytes":516,"imports":[{"path":"packages/plugins/plugin-markdown/src/hooks/useSelectCurrentThread.tsx","kind":"import-statement","original":"./useSelectCurrentThread"}],"format":"esm"},"packages/plugins/plugin-markdown/src/components/MarkdownEditor/MarkdownEditor.tsx":{"bytes":32101,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-dropzone","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/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.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/plugin-markdown/src/components/MarkdownEditor/index.ts":{"bytes":516,"imports":[{"path":"packages/plugins/plugin-markdown/src/components/MarkdownEditor/MarkdownEditor.tsx","kind":"import-statement","original":"./MarkdownEditor"}],"format":"esm"},"packages/plugins/plugin-markdown/src/util.tsx":{"bytes":5926,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-markdown/src/extensions.tsx":{"bytes":30076,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"react-dom/client","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-markdown/src/util.tsx","kind":"import-statement","original":"./util"}],"format":"esm"},"packages/plugins/plugin-markdown/src/components/MarkdownContainer.tsx":{"bytes":29357,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@effect-rx/rx-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-dom","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","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-editor","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/src/components/MarkdownEditor/index.ts","kind":"import-statement","original":"./MarkdownEditor"},{"path":"packages/plugins/plugin-markdown/src/extensions.tsx","kind":"import-statement","original":"../extensions"},{"path":"packages/plugins/plugin-markdown/src/types/index.ts","kind":"import-statement","original":"../types"},{"path":"packages/plugins/plugin-markdown/src/util.tsx","kind":"import-statement","original":"../util"}],"format":"esm"},"packages/plugins/plugin-markdown/src/components/MarkdownPreview/MarkdownPreview.tsx":{"bytes":9767,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","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-stack","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/src/meta.ts","kind":"import-statement","original":"../../meta"},{"path":"packages/plugins/plugin-markdown/src/types/index.ts","kind":"import-statement","original":"../../types"},{"path":"packages/plugins/plugin-markdown/src/util.tsx","kind":"import-statement","original":"../../util"}],"format":"esm"},"packages/plugins/plugin-markdown/src/components/MarkdownPreview/index.ts":{"bytes":811,"imports":[{"path":"packages/plugins/plugin-markdown/src/components/MarkdownPreview/MarkdownPreview.tsx","kind":"import-statement","original":"./MarkdownPreview"},{"path":"packages/plugins/plugin-markdown/src/components/MarkdownPreview/MarkdownPreview.tsx","kind":"import-statement","original":"./MarkdownPreview"}],"format":"esm"},"packages/plugins/plugin-markdown/src/components/index.ts":{"bytes":1161,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/src/components/MarkdownSettings/index.ts","kind":"import-statement","original":"./MarkdownSettings"},{"path":"packages/plugins/plugin-markdown/src/components/MarkdownContainer.tsx","kind":"dynamic-import","original":"./MarkdownContainer"},{"path":"packages/plugins/plugin-markdown/src/components/MarkdownPreview/index.ts","kind":"dynamic-import","original":"./MarkdownPreview"}],"format":"esm"},"packages/plugins/plugin-markdown/src/capabilities/react-surface.tsx":{"bytes":17015,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/plugin-attention","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-markdown/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-markdown/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-markdown/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-markdown/src/capabilities/settings.ts":{"bytes":2415,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-markdown/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-markdown/src/capabilities/state.ts":{"bytes":4788,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-markdown/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-markdown/src/capabilities/index.ts":{"bytes":2421,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-markdown/src/capabilities/anchor-sort.ts","kind":"dynamic-import","original":"./anchor-sort"},{"path":"packages/plugins/plugin-markdown/src/capabilities/app-graph-serializer.ts","kind":"dynamic-import","original":"./app-graph-serializer"},{"path":"packages/plugins/plugin-markdown/src/capabilities/artifact-definition.ts","kind":"dynamic-import","original":"./artifact-definition"},{"path":"packages/plugins/plugin-markdown/src/capabilities/intent-resolver.ts","kind":"dynamic-import","original":"./intent-resolver"},{"path":"packages/plugins/plugin-markdown/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"},{"path":"packages/plugins/plugin-markdown/src/capabilities/settings.ts","kind":"dynamic-import","original":"./settings"},{"path":"packages/plugins/plugin-markdown/src/capabilities/state.ts","kind":"dynamic-import","original":"./state"}],"format":"esm"},"packages/plugins/plugin-markdown/src/events.ts":{"bytes":1278,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-markdown/src/MarkdownPlugin.tsx":{"bytes":16305,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","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/schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-markdown/src/events.ts","kind":"import-statement","original":"./events"},{"path":"packages/plugins/plugin-markdown/src/meta.ts","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/util.tsx","kind":"import-statement","original":"./util"}],"format":"esm"},"packages/plugins/plugin-markdown/src/index.ts":{"bytes":1008,"imports":[{"path":"packages/plugins/plugin-markdown/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-markdown/src/events.ts","kind":"import-statement","original":"./events"},{"path":"packages/plugins/plugin-markdown/src/MarkdownPlugin.tsx","kind":"import-statement","original":"./MarkdownPlugin"},{"path":"packages/plugins/plugin-markdown/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-markdown/src/util.tsx","kind":"import-statement","original":"./util"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-markdown/dist/lib/node/react-surface-456HQ4KZ.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":15470},"packages/plugins/plugin-markdown/dist/lib/node/react-surface-456HQ4KZ.cjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-IFYSBQE5.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-3HHV4MM6.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-ZU5OIHCY.cjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/plugin-attention","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","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-form","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/dist/lib/node/MarkdownContainer-KYGUEZIL.cjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-markdown/dist/lib/node/MarkdownPreview-GCJJCXY6.cjs","kind":"dynamic-import"}],"exports":["default"],"entryPoint":"packages/plugins/plugin-markdown/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-markdown/src/capabilities/react-surface.tsx":{"bytesInOutput":4060},"packages/plugins/plugin-markdown/src/components/index.ts":{"bytesInOutput":186},"packages/plugins/plugin-markdown/src/components/MarkdownSettings/MarkdownSettings.tsx":{"bytesInOutput":3797},"packages/plugins/plugin-markdown/src/components/MarkdownSettings/index.ts":{"bytesInOutput":0}},"bytes":8691},"packages/plugins/plugin-markdown/dist/lib/node/settings-E3NUTXJ4.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1247},"packages/plugins/plugin-markdown/dist/lib/node/settings-E3NUTXJ4.cjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-3HHV4MM6.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-ZU5OIHCY.cjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-markdown/src/capabilities/settings.ts","inputs":{"packages/plugins/plugin-markdown/src/capabilities/settings.ts":{"bytesInOutput":424}},"bytes":691},"packages/plugins/plugin-markdown/dist/lib/node/state-KKDRAG7X.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2547},"packages/plugins/plugin-markdown/dist/lib/node/state-KKDRAG7X.cjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-IFYSBQE5.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-ZU5OIHCY.cjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-markdown/src/capabilities/state.ts","inputs":{"packages/plugins/plugin-markdown/src/capabilities/state.ts":{"bytesInOutput":921}},"bytes":1188},"packages/plugins/plugin-markdown/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8379},"packages/plugins/plugin-markdown/dist/lib/node/index.cjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-LQAC5HL7.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-FU3XZZCO.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-IFYSBQE5.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-CJLYFGPI.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-3HHV4MM6.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-ZU5OIHCY.cjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","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/schema","kind":"import-statement","external":true}],"exports":["MARKDOWN_PLUGIN","MarkdownCapabilities","MarkdownEvents","MarkdownPlugin","getAbstract","getFallbackName","isMarkdownProperties","meta","serializer","setFallbackName"],"entryPoint":"packages/plugins/plugin-markdown/src/index.ts","inputs":{"packages/plugins/plugin-markdown/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-markdown/src/events.ts":{"bytesInOutput":240},"packages/plugins/plugin-markdown/src/MarkdownPlugin.tsx":{"bytesInOutput":3700}},"bytes":4838},"packages/plugins/plugin-markdown/dist/lib/node/types/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-markdown/dist/lib/node/types/index.cjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-3HHV4MM6.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-ZU5OIHCY.cjs","kind":"import-statement"}],"exports":["DocumentSchema","DocumentType","MarkdownAction","MarkdownSettingsSchema","createDocument","isEditorModel"],"entryPoint":"packages/plugins/plugin-markdown/src/types/index.ts","inputs":{},"bytes":344},"packages/plugins/plugin-markdown/dist/lib/node/anchor-sort-V3T4SFFI.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2176},"packages/plugins/plugin-markdown/dist/lib/node/anchor-sort-V3T4SFFI.cjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-3HHV4MM6.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-ZU5OIHCY.cjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-markdown/src/capabilities/anchor-sort.ts","inputs":{"packages/plugins/plugin-markdown/src/capabilities/anchor-sort.ts":{"bytesInOutput":872}},"bytes":1122},"packages/plugins/plugin-markdown/dist/lib/node/app-graph-serializer-E6BXEDEL.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3659},"packages/plugins/plugin-markdown/dist/lib/node/app-graph-serializer-E6BXEDEL.cjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-LQAC5HL7.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-3HHV4MM6.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-ZU5OIHCY.cjs","kind":"import-statement"},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","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/schema","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-markdown/src/capabilities/app-graph-serializer.ts","inputs":{"packages/plugins/plugin-markdown/src/capabilities/app-graph-serializer.ts":{"bytesInOutput":1539}},"bytes":1897},"packages/plugins/plugin-markdown/dist/lib/node/chunk-LQAC5HL7.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2554},"packages/plugins/plugin-markdown/dist/lib/node/chunk-LQAC5HL7.cjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-3HHV4MM6.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-ZU5OIHCY.cjs","kind":"import-statement"},{"path":"@dxos/echo","kind":"import-statement","external":true}],"exports":["translations_default"],"inputs":{"packages/plugins/plugin-markdown/src/translations.ts":{"bytesInOutput":1732}},"bytes":1982},"packages/plugins/plugin-markdown/dist/lib/node/artifact-definition-U27MH5SC.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7677},"packages/plugins/plugin-markdown/dist/lib/node/artifact-definition-U27MH5SC.cjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-3HHV4MM6.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-ZU5OIHCY.cjs","kind":"import-statement"},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/artifact","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/invariant","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}],"exports":["default"],"entryPoint":"packages/plugins/plugin-markdown/src/capabilities/artifact-definition.ts","inputs":{"packages/plugins/plugin-markdown/src/capabilities/artifact-definition.ts":{"bytesInOutput":4886}},"bytes":5194},"packages/plugins/plugin-markdown/dist/lib/node/intent-resolver-OEFLRNEJ.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4522},"packages/plugins/plugin-markdown/dist/lib/node/intent-resolver-OEFLRNEJ.cjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-IFYSBQE5.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-3HHV4MM6.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-ZU5OIHCY.cjs","kind":"import-statement"},{"path":"@automerge/automerge","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-markdown/src/capabilities/intent-resolver.ts","inputs":{"packages/plugins/plugin-markdown/src/capabilities/intent-resolver.ts":{"bytesInOutput":1802}},"bytes":2145},"packages/plugins/plugin-markdown/dist/lib/node/MarkdownContainer-KYGUEZIL.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":50848},"packages/plugins/plugin-markdown/dist/lib/node/MarkdownContainer-KYGUEZIL.cjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-FU3XZZCO.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-IFYSBQE5.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-CJLYFGPI.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-3HHV4MM6.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-ZU5OIHCY.cjs","kind":"import-statement"},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@effect-rx/rx-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-dom","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","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-editor","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-dropzone","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"react","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-ui-editor","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-dom/client","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["DocumentEditor","default"],"entryPoint":"packages/plugins/plugin-markdown/src/components/MarkdownContainer.tsx","inputs":{"packages/plugins/plugin-markdown/src/components/MarkdownContainer.tsx":{"bytesInOutput":7236},"packages/plugins/plugin-markdown/src/components/MarkdownEditor/MarkdownEditor.tsx":{"bytesInOutput":7929},"packages/plugins/plugin-markdown/src/hooks/useSelectCurrentThread.tsx":{"bytesInOutput":1932},"packages/plugins/plugin-markdown/src/hooks/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-markdown/src/components/MarkdownEditor/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-markdown/src/extensions.tsx":{"bytesInOutput":6952}},"bytes":24908},"packages/plugins/plugin-markdown/dist/lib/node/chunk-FU3XZZCO.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1221},"packages/plugins/plugin-markdown/dist/lib/node/chunk-FU3XZZCO.cjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-markdown/dist/lib/node/anchor-sort-V3T4SFFI.cjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-markdown/dist/lib/node/app-graph-serializer-E6BXEDEL.cjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-markdown/dist/lib/node/artifact-definition-U27MH5SC.cjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-markdown/dist/lib/node/intent-resolver-OEFLRNEJ.cjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-markdown/dist/lib/node/react-surface-456HQ4KZ.cjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-markdown/dist/lib/node/settings-E3NUTXJ4.cjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-markdown/dist/lib/node/state-KKDRAG7X.cjs","kind":"dynamic-import"}],"exports":["AnchorSort","AppGraphSerializer","ArtifactDefinition","IntentResolver","MarkdownSettings","MarkdownState","ReactSurface"],"inputs":{"packages/plugins/plugin-markdown/src/capabilities/index.ts":{"bytesInOutput":558}},"bytes":805},"packages/plugins/plugin-markdown/dist/lib/node/chunk-IFYSBQE5.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1152},"packages/plugins/plugin-markdown/dist/lib/node/chunk-IFYSBQE5.cjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-ZU5OIHCY.cjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["MarkdownCapabilities"],"inputs":{"packages/plugins/plugin-markdown/src/capabilities/capabilities.ts":{"bytesInOutput":362}},"bytes":570},"packages/plugins/plugin-markdown/dist/lib/node/MarkdownPreview-GCJJCXY6.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5287},"packages/plugins/plugin-markdown/dist/lib/node/MarkdownPreview-GCJJCXY6.cjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-CJLYFGPI.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-3HHV4MM6.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-ZU5OIHCY.cjs","kind":"import-statement"},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","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-stack","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"exports":["MarkdownPreview","default"],"entryPoint":"packages/plugins/plugin-markdown/src/components/MarkdownPreview/index.ts","inputs":{"packages/plugins/plugin-markdown/src/components/MarkdownPreview/MarkdownPreview.tsx":{"bytesInOutput":2402},"packages/plugins/plugin-markdown/src/components/MarkdownPreview/index.ts":{"bytesInOutput":47}},"bytes":2922},"packages/plugins/plugin-markdown/dist/lib/node/chunk-CJLYFGPI.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3173},"packages/plugins/plugin-markdown/dist/lib/node/chunk-CJLYFGPI.cjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-3HHV4MM6.cjs","kind":"import-statement"},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"exports":["getAbstract","getFallbackName","isMarkdownProperties","serializer","setFallbackName"],"inputs":{"packages/plugins/plugin-markdown/src/util.tsx":{"bytesInOutput":1239}},"bytes":1491},"packages/plugins/plugin-markdown/dist/lib/node/chunk-3HHV4MM6.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6012},"packages/plugins/plugin-markdown/dist/lib/node/chunk-3HHV4MM6.cjs":{"imports":[{"path":"packages/plugins/plugin-markdown/dist/lib/node/chunk-ZU5OIHCY.cjs","kind":"import-statement"},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true}],"exports":["DocumentSchema","DocumentType","MarkdownAction","MarkdownSettingsSchema","createDocument","isEditorModel"],"inputs":{"packages/plugins/plugin-markdown/src/types/schema.ts":{"bytesInOutput":813},"packages/plugins/plugin-markdown/src/types/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-markdown/src/types/types.ts":{"bytesInOutput":1388}},"bytes":2541},"packages/plugins/plugin-markdown/dist/lib/node/chunk-ZU5OIHCY.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1286},"packages/plugins/plugin-markdown/dist/lib/node/chunk-ZU5OIHCY.cjs":{"imports":[],"exports":["MARKDOWN_PLUGIN","meta"],"inputs":{"packages/plugins/plugin-markdown/src/meta.ts":{"bytesInOutput":827}},"bytes":958}}}
|
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var react_surface_456HQ4KZ_exports = {};
|
|
30
|
-
__export(react_surface_456HQ4KZ_exports, {
|
|
31
|
-
default: () => react_surface_default
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(react_surface_456HQ4KZ_exports);
|
|
34
|
-
var import_chunk_IFYSBQE5 = require("./chunk-IFYSBQE5.cjs");
|
|
35
|
-
var import_chunk_3HHV4MM6 = require("./chunk-3HHV4MM6.cjs");
|
|
36
|
-
var import_chunk_ZU5OIHCY = require("./chunk-ZU5OIHCY.cjs");
|
|
37
|
-
var import_react = __toESM(require("react"));
|
|
38
|
-
var import_app_framework = require("@dxos/app-framework");
|
|
39
|
-
var import_echo = require("@dxos/echo");
|
|
40
|
-
var import_local_storage = require("@dxos/local-storage");
|
|
41
|
-
var import_plugin_attention = require("@dxos/plugin-attention");
|
|
42
|
-
var import_echo2 = require("@dxos/react-client/echo");
|
|
43
|
-
var import_schema = require("@dxos/schema");
|
|
44
|
-
var import_react2 = require("react");
|
|
45
|
-
var import_tracking = require("@preact-signals/safe-react/tracking");
|
|
46
|
-
var import_react3 = __toESM(require("react"));
|
|
47
|
-
var import_react_ui = require("@dxos/react-ui");
|
|
48
|
-
var import_react_ui_editor = require("@dxos/react-ui-editor");
|
|
49
|
-
var import_react_ui_form = require("@dxos/react-ui-form");
|
|
50
|
-
var MarkdownSettings = ({ settings }) => {
|
|
51
|
-
var _effect = (0, import_tracking.useSignals)();
|
|
52
|
-
try {
|
|
53
|
-
const { t } = (0, import_react_ui.useTranslation)(import_chunk_ZU5OIHCY.MARKDOWN_PLUGIN);
|
|
54
|
-
return /* @__PURE__ */ import_react3.default.createElement(import_react_ui_form.DeprecatedFormContainer, null, /* @__PURE__ */ import_react3.default.createElement(import_react_ui_form.DeprecatedFormInput, {
|
|
55
|
-
label: t("default view mode label")
|
|
56
|
-
}, /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Select.Root, {
|
|
57
|
-
value: settings.defaultViewMode,
|
|
58
|
-
onValueChange: (value) => {
|
|
59
|
-
settings.defaultViewMode = value;
|
|
60
|
-
}
|
|
61
|
-
}, /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Select.TriggerButton, null), /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Select.Portal, null, /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Select.Content, null, /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Select.Viewport, null, import_react_ui_editor.EditorViewModes.map((mode) => /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Select.Option, {
|
|
62
|
-
key: mode,
|
|
63
|
-
value: mode
|
|
64
|
-
}, t(`${mode} mode label`, {
|
|
65
|
-
ns: "react-ui-editor"
|
|
66
|
-
})))))))), /* @__PURE__ */ import_react3.default.createElement(import_react_ui_form.DeprecatedFormInput, {
|
|
67
|
-
label: t("editor input mode label")
|
|
68
|
-
}, /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Select.Root, {
|
|
69
|
-
value: settings.editorInputMode ?? "default",
|
|
70
|
-
onValueChange: (value) => {
|
|
71
|
-
settings.editorInputMode = value;
|
|
72
|
-
}
|
|
73
|
-
}, /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Select.TriggerButton, {
|
|
74
|
-
placeholder: t("select editor input mode placeholder")
|
|
75
|
-
}), /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Select.Portal, null, /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Select.Content, null, /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Select.Viewport, null, import_react_ui_editor.EditorInputModes.map((mode) => /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Select.Option, {
|
|
76
|
-
key: mode,
|
|
77
|
-
value: mode
|
|
78
|
-
}, t(`settings editor input mode ${mode} label`)))))))), /* @__PURE__ */ import_react3.default.createElement(import_react_ui_form.DeprecatedFormInput, {
|
|
79
|
-
label: t("settings toolbar label")
|
|
80
|
-
}, /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Input.Switch, {
|
|
81
|
-
checked: settings.toolbar,
|
|
82
|
-
onCheckedChange: (checked) => settings.toolbar = !!checked
|
|
83
|
-
})), /* @__PURE__ */ import_react3.default.createElement(import_react_ui_form.DeprecatedFormInput, {
|
|
84
|
-
label: t("settings numbered headings label")
|
|
85
|
-
}, /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Input.Switch, {
|
|
86
|
-
checked: settings.numberedHeadings,
|
|
87
|
-
onCheckedChange: (checked) => settings.numberedHeadings = !!checked
|
|
88
|
-
})), /* @__PURE__ */ import_react3.default.createElement(import_react_ui_form.DeprecatedFormInput, {
|
|
89
|
-
label: t("settings folding label")
|
|
90
|
-
}, /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Input.Switch, {
|
|
91
|
-
checked: settings.folding,
|
|
92
|
-
onCheckedChange: (checked) => settings.folding = !!checked
|
|
93
|
-
})), /* @__PURE__ */ import_react3.default.createElement(import_react_ui_form.DeprecatedFormInput, {
|
|
94
|
-
label: t("settings experimental label")
|
|
95
|
-
}, /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Input.Switch, {
|
|
96
|
-
checked: settings.experimental,
|
|
97
|
-
onCheckedChange: (checked) => settings.experimental = !!checked
|
|
98
|
-
})), /* @__PURE__ */ import_react3.default.createElement(import_react_ui_form.DeprecatedFormInput, {
|
|
99
|
-
label: t("settings debug label"),
|
|
100
|
-
secondary: settings.debug ? /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Input.Root, null, /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Input.TextArea, {
|
|
101
|
-
rows: 5,
|
|
102
|
-
value: settings.typewriter,
|
|
103
|
-
onChange: ({ target: { value } }) => settings.typewriter = value,
|
|
104
|
-
placeholder: t("settings debug placeholder")
|
|
105
|
-
})) : void 0
|
|
106
|
-
}, /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Input.Switch, {
|
|
107
|
-
checked: settings.debug,
|
|
108
|
-
onCheckedChange: (checked) => settings.debug = !!checked
|
|
109
|
-
})));
|
|
110
|
-
} finally {
|
|
111
|
-
_effect.f();
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
var MarkdownContainer = (0, import_react2.lazy)(() => import("./MarkdownContainer-KYGUEZIL.cjs"));
|
|
115
|
-
var MarkdownPreview = (0, import_react2.lazy)(() => import("./MarkdownPreview-GCJJCXY6.cjs"));
|
|
116
|
-
var react_surface_default = () => (0, import_app_framework.contributes)(import_app_framework.Capabilities.ReactSurface, [
|
|
117
|
-
(0, import_app_framework.createSurface)({
|
|
118
|
-
id: `${import_chunk_ZU5OIHCY.MARKDOWN_PLUGIN}/document`,
|
|
119
|
-
role: [
|
|
120
|
-
"article",
|
|
121
|
-
"section",
|
|
122
|
-
"tabpanel"
|
|
123
|
-
],
|
|
124
|
-
filter: (data) => import_echo.Obj.instanceOf(import_chunk_3HHV4MM6.DocumentType, data.subject) && !data.variant,
|
|
125
|
-
component: ({ data, role }) => {
|
|
126
|
-
const selectionManager = (0, import_app_framework.useCapability)(import_plugin_attention.AttentionCapabilities.Selection);
|
|
127
|
-
const settingsStore = (0, import_app_framework.useCapability)(import_app_framework.Capabilities.SettingsStore);
|
|
128
|
-
const settings = settingsStore.getStore(import_chunk_ZU5OIHCY.MARKDOWN_PLUGIN).value;
|
|
129
|
-
const { state, editorState, getViewMode, setViewMode } = (0, import_app_framework.useCapability)(import_chunk_IFYSBQE5.MarkdownCapabilities.State);
|
|
130
|
-
const viewMode = getViewMode((0, import_echo2.fullyQualifiedId)(data.subject));
|
|
131
|
-
return /* @__PURE__ */ import_react.default.createElement(MarkdownContainer, {
|
|
132
|
-
id: (0, import_echo2.fullyQualifiedId)(data.subject),
|
|
133
|
-
object: data.subject,
|
|
134
|
-
role,
|
|
135
|
-
settings,
|
|
136
|
-
selectionManager,
|
|
137
|
-
extensionProviders: state.extensionProviders,
|
|
138
|
-
viewMode,
|
|
139
|
-
editorStateStore: editorState,
|
|
140
|
-
onViewModeChange: setViewMode
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
}),
|
|
144
|
-
(0, import_app_framework.createSurface)({
|
|
145
|
-
id: `${import_chunk_ZU5OIHCY.MARKDOWN_PLUGIN}/text`,
|
|
146
|
-
role: [
|
|
147
|
-
"article",
|
|
148
|
-
"section",
|
|
149
|
-
"tabpanel"
|
|
150
|
-
],
|
|
151
|
-
filter: (data) => typeof data.id === "string" && import_echo.Obj.instanceOf(import_schema.DataType.Text, data.subject),
|
|
152
|
-
component: ({ data, role }) => {
|
|
153
|
-
const selectionManager = (0, import_app_framework.useCapability)(import_plugin_attention.AttentionCapabilities.Selection);
|
|
154
|
-
const settingsStore = (0, import_app_framework.useCapability)(import_app_framework.Capabilities.SettingsStore);
|
|
155
|
-
const settings = settingsStore.getStore(import_chunk_ZU5OIHCY.MARKDOWN_PLUGIN).value;
|
|
156
|
-
const { state, editorState, getViewMode, setViewMode } = (0, import_app_framework.useCapability)(import_chunk_IFYSBQE5.MarkdownCapabilities.State);
|
|
157
|
-
return /* @__PURE__ */ import_react.default.createElement(MarkdownContainer, {
|
|
158
|
-
id: data.id,
|
|
159
|
-
object: data.subject,
|
|
160
|
-
role,
|
|
161
|
-
settings,
|
|
162
|
-
selectionManager,
|
|
163
|
-
extensionProviders: state.extensionProviders,
|
|
164
|
-
viewMode: getViewMode(data.id),
|
|
165
|
-
editorStateStore: editorState,
|
|
166
|
-
onViewModeChange: setViewMode
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
}),
|
|
170
|
-
(0, import_app_framework.createSurface)({
|
|
171
|
-
id: `${import_chunk_ZU5OIHCY.MARKDOWN_PLUGIN}/editor`,
|
|
172
|
-
role: [
|
|
173
|
-
"article",
|
|
174
|
-
"section"
|
|
175
|
-
],
|
|
176
|
-
filter: (data) => (0, import_chunk_3HHV4MM6.isEditorModel)(data.subject),
|
|
177
|
-
component: ({ data, role }) => {
|
|
178
|
-
const selectionManager = (0, import_app_framework.useCapability)(import_plugin_attention.AttentionCapabilities.Selection);
|
|
179
|
-
const settingsStore = (0, import_app_framework.useCapability)(import_app_framework.Capabilities.SettingsStore);
|
|
180
|
-
const settings = settingsStore.getStore(import_chunk_ZU5OIHCY.MARKDOWN_PLUGIN).value;
|
|
181
|
-
const { state, editorState, getViewMode, setViewMode } = (0, import_app_framework.useCapability)(import_chunk_IFYSBQE5.MarkdownCapabilities.State);
|
|
182
|
-
return /* @__PURE__ */ import_react.default.createElement(MarkdownContainer, {
|
|
183
|
-
id: data.subject.id,
|
|
184
|
-
object: data.subject,
|
|
185
|
-
role,
|
|
186
|
-
settings,
|
|
187
|
-
selectionManager,
|
|
188
|
-
extensionProviders: state.extensionProviders,
|
|
189
|
-
viewMode: getViewMode(data.subject.id),
|
|
190
|
-
editorStateStore: editorState,
|
|
191
|
-
onViewModeChange: setViewMode
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
}),
|
|
195
|
-
(0, import_app_framework.createSurface)({
|
|
196
|
-
id: `${import_chunk_ZU5OIHCY.MARKDOWN_PLUGIN}/plugin-settings`,
|
|
197
|
-
role: "article",
|
|
198
|
-
filter: (data) => data.subject instanceof import_local_storage.SettingsStore && data.subject.prefix === import_chunk_ZU5OIHCY.MARKDOWN_PLUGIN,
|
|
199
|
-
component: ({ data: { subject } }) => /* @__PURE__ */ import_react.default.createElement(MarkdownSettings, {
|
|
200
|
-
settings: subject.value
|
|
201
|
-
})
|
|
202
|
-
}),
|
|
203
|
-
(0, import_app_framework.createSurface)({
|
|
204
|
-
id: `${import_chunk_ZU5OIHCY.MARKDOWN_PLUGIN}/preview`,
|
|
205
|
-
role: [
|
|
206
|
-
"popover",
|
|
207
|
-
"card--kanban",
|
|
208
|
-
"card--document",
|
|
209
|
-
"card"
|
|
210
|
-
],
|
|
211
|
-
filter: (data) => import_echo.Obj.instanceOf(import_chunk_3HHV4MM6.DocumentType, data.subject) || import_echo.Obj.instanceOf(import_schema.DataType.Text, data.subject),
|
|
212
|
-
component: ({ data, role }) => /* @__PURE__ */ import_react.default.createElement(MarkdownPreview, {
|
|
213
|
-
...data,
|
|
214
|
-
role
|
|
215
|
-
})
|
|
216
|
-
})
|
|
217
|
-
]);
|
|
218
|
-
//# sourceMappingURL=react-surface-456HQ4KZ.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/react-surface.tsx", "../../../src/components/index.ts", "../../../src/components/MarkdownSettings/MarkdownSettings.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { createSurface, contributes, Capabilities, useCapability } from '@dxos/app-framework';\nimport { Obj } from '@dxos/echo';\nimport { SettingsStore } from '@dxos/local-storage';\nimport { AttentionCapabilities } from '@dxos/plugin-attention';\nimport { fullyQualifiedId } from '@dxos/react-client/echo';\nimport { DataType } from '@dxos/schema';\n\nimport { MarkdownCapabilities } from './capabilities';\nimport { MarkdownContainer, MarkdownSettings, MarkdownPreview } from '../components';\nimport { MARKDOWN_PLUGIN } from '../meta';\nimport { DocumentType, isEditorModel, type MarkdownSettingsProps } from '../types';\n\nexport default () =>\n contributes(Capabilities.ReactSurface, [\n createSurface({\n id: `${MARKDOWN_PLUGIN}/document`,\n role: ['article', 'section', 'tabpanel'],\n filter: (data): data is { subject: DocumentType; variant: undefined } =>\n Obj.instanceOf(DocumentType, data.subject) && !data.variant,\n component: ({ data, role }) => {\n const selectionManager = useCapability(AttentionCapabilities.Selection);\n const settingsStore = useCapability(Capabilities.SettingsStore);\n const settings = settingsStore.getStore<MarkdownSettingsProps>(MARKDOWN_PLUGIN)!.value;\n const { state, editorState, getViewMode, setViewMode } = useCapability(MarkdownCapabilities.State);\n const viewMode = getViewMode(fullyQualifiedId(data.subject));\n\n return (\n <MarkdownContainer\n id={fullyQualifiedId(data.subject)}\n object={data.subject}\n role={role}\n settings={settings}\n selectionManager={selectionManager}\n extensionProviders={state.extensionProviders}\n viewMode={viewMode}\n editorStateStore={editorState}\n onViewModeChange={setViewMode}\n />\n );\n },\n }),\n createSurface({\n id: `${MARKDOWN_PLUGIN}/text`,\n role: ['article', 'section', 'tabpanel'],\n filter: (data): data is { id: string; subject: DataType.Text } =>\n typeof data.id === 'string' && Obj.instanceOf(DataType.Text, data.subject),\n component: ({ data, role }) => {\n const selectionManager = useCapability(AttentionCapabilities.Selection);\n const settingsStore = useCapability(Capabilities.SettingsStore);\n const settings = settingsStore.getStore<MarkdownSettingsProps>(MARKDOWN_PLUGIN)!.value;\n const { state, editorState, getViewMode, setViewMode } = useCapability(MarkdownCapabilities.State);\n\n return (\n <MarkdownContainer\n id={data.id}\n object={data.subject}\n role={role}\n settings={settings}\n selectionManager={selectionManager}\n extensionProviders={state.extensionProviders}\n viewMode={getViewMode(data.id)}\n editorStateStore={editorState}\n onViewModeChange={setViewMode}\n />\n );\n },\n }),\n createSurface({\n id: `${MARKDOWN_PLUGIN}/editor`,\n role: ['article', 'section'],\n filter: (data): data is { subject: { id: string; text: string } } => isEditorModel(data.subject),\n component: ({ data, role }) => {\n const selectionManager = useCapability(AttentionCapabilities.Selection);\n const settingsStore = useCapability(Capabilities.SettingsStore);\n const settings = settingsStore.getStore<MarkdownSettingsProps>(MARKDOWN_PLUGIN)!.value;\n const { state, editorState, getViewMode, setViewMode } = useCapability(MarkdownCapabilities.State);\n\n return (\n <MarkdownContainer\n id={data.subject.id}\n object={data.subject}\n role={role}\n settings={settings}\n selectionManager={selectionManager}\n extensionProviders={state.extensionProviders}\n viewMode={getViewMode(data.subject.id)}\n editorStateStore={editorState}\n onViewModeChange={setViewMode}\n />\n );\n },\n }),\n createSurface({\n id: `${MARKDOWN_PLUGIN}/plugin-settings`,\n role: 'article',\n filter: (data): data is { subject: SettingsStore<MarkdownSettingsProps> } =>\n data.subject instanceof SettingsStore && data.subject.prefix === MARKDOWN_PLUGIN,\n component: ({ data: { subject } }) => <MarkdownSettings settings={subject.value} />,\n }),\n createSurface({\n id: `${MARKDOWN_PLUGIN}/preview`,\n role: ['popover', 'card--kanban', 'card--document', 'card'],\n filter: (data): data is { subject: DocumentType | DataType.Text } =>\n Obj.instanceOf(DocumentType, data.subject) || Obj.instanceOf(DataType.Text, data.subject),\n component: ({ data, role }) => <MarkdownPreview {...data} role={role} />,\n }),\n ]);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { lazy } from 'react';\n\nexport * from './MarkdownSettings';\n\nexport const MarkdownContainer = lazy(() => import('./MarkdownContainer'));\nexport const MarkdownPreview = lazy(() => import('./MarkdownPreview'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Input, Select, useTranslation } from '@dxos/react-ui';\nimport { type EditorInputMode, EditorInputModes, type EditorViewMode, EditorViewModes } from '@dxos/react-ui-editor';\nimport { DeprecatedFormContainer, DeprecatedFormInput } from '@dxos/react-ui-form';\n\nimport { MARKDOWN_PLUGIN } from '../../meta';\nimport { type MarkdownSettingsProps } from '../../types';\n\nexport const MarkdownSettings = ({ settings }: { settings: MarkdownSettingsProps }) => {\n const { t } = useTranslation(MARKDOWN_PLUGIN);\n\n // TODO(wittjosiah): Add skill test confirmation for entering vim mode.\n return (\n <DeprecatedFormContainer>\n <DeprecatedFormInput label={t('default view mode label')}>\n <Select.Root\n value={settings.defaultViewMode}\n onValueChange={(value) => {\n settings.defaultViewMode = value as EditorViewMode;\n }}\n >\n <Select.TriggerButton />\n <Select.Portal>\n <Select.Content>\n <Select.Viewport>\n {EditorViewModes.map((mode) => (\n <Select.Option key={mode} value={mode}>\n {t(`${mode} mode label`, { ns: 'react-ui-editor' })}\n </Select.Option>\n ))}\n </Select.Viewport>\n </Select.Content>\n </Select.Portal>\n </Select.Root>\n </DeprecatedFormInput>\n\n <DeprecatedFormInput label={t('editor input mode label')}>\n <Select.Root\n value={settings.editorInputMode ?? 'default'}\n onValueChange={(value) => {\n settings.editorInputMode = value as EditorInputMode;\n }}\n >\n <Select.TriggerButton placeholder={t('select editor input mode placeholder')} />\n <Select.Portal>\n <Select.Content>\n <Select.Viewport>\n {EditorInputModes.map((mode) => (\n <Select.Option key={mode} value={mode}>\n {t(`settings editor input mode ${mode} label`)}\n </Select.Option>\n ))}\n </Select.Viewport>\n </Select.Content>\n </Select.Portal>\n </Select.Root>\n </DeprecatedFormInput>\n\n <DeprecatedFormInput label={t('settings toolbar label')}>\n <Input.Switch checked={settings.toolbar} onCheckedChange={(checked) => (settings.toolbar = !!checked)} />\n </DeprecatedFormInput>\n\n <DeprecatedFormInput label={t('settings numbered headings label')}>\n <Input.Switch\n checked={settings.numberedHeadings}\n onCheckedChange={(checked) => (settings.numberedHeadings = !!checked)}\n />\n </DeprecatedFormInput>\n\n <DeprecatedFormInput label={t('settings folding label')}>\n <Input.Switch checked={settings.folding} onCheckedChange={(checked) => (settings.folding = !!checked)} />\n </DeprecatedFormInput>\n\n <DeprecatedFormInput label={t('settings experimental label')}>\n <Input.Switch\n checked={settings.experimental}\n onCheckedChange={(checked) => (settings.experimental = !!checked)}\n />\n </DeprecatedFormInput>\n\n <DeprecatedFormInput\n label={t('settings debug label')}\n secondary={\n settings.debug ? (\n <Input.Root>\n <Input.TextArea\n rows={5}\n value={settings.typewriter}\n onChange={({ target: { value } }) => (settings.typewriter = value)}\n placeholder={t('settings debug placeholder')}\n />\n </Input.Root>\n ) : undefined\n }\n >\n <Input.Switch checked={settings.debug} onCheckedChange={(checked) => (settings.debug = !!checked)} />\n </DeprecatedFormInput>\n </DeprecatedFormContainer>\n );\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;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QAAQ,CAACC,SACPA,KAAKI,mBAAmBQ,sCAAiBZ,KAAKI,QAAQyB,WAAW9E;IACnEuD,WAAW,CAAC,EAAEN,MAAM,EAAEI,QAAO,EAAE,MAAOpD,6BAAAA,QAAA,cAACL,kBAAAA;MAAiBC,UAAUwD,QAAQ9C;;EAC5E,CAAA;MACAsC,oCAAc;IACZC,IAAI,GAAG9C,qCAAAA;IACP+C,MAAM;MAAC;MAAW;MAAgB;MAAkB;;IACpDC,QAAQ,CAACC,SACPC,gBAAIC,WAAWC,oCAAcH,KAAKI,OAAO,KAAKH,gBAAIC,WAAWwB,uBAASC,MAAM3B,KAAKI,OAAO;IAC1FE,WAAW,CAAC,EAAEN,MAAMF,KAAI,MAAO9C,6BAAAA,QAAA,cAACwC,iBAAAA;MAAiB,GAAGQ;MAAMF;;EAC5D,CAAA;CACD;",
|
|
6
|
-
"names": ["import_echo", "import_react", "MarkdownSettings", "settings", "t", "useTranslation", "MARKDOWN_PLUGIN", "React", "DeprecatedFormContainer", "DeprecatedFormInput", "label", "Select", "Root", "value", "defaultViewMode", "onValueChange", "TriggerButton", "Portal", "Content", "Viewport", "EditorViewModes", "map", "mode", "Option", "key", "ns", "editorInputMode", "placeholder", "EditorInputModes", "Input", "Switch", "checked", "toolbar", "onCheckedChange", "numberedHeadings", "folding", "experimental", "secondary", "debug", "TextArea", "rows", "typewriter", "onChange", "target", "undefined", "MarkdownContainer", "lazy", "MarkdownPreview", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "role", "filter", "data", "Obj", "instanceOf", "DocumentType", "subject", "variant", "component", "selectionManager", "useCapability", "AttentionCapabilities", "Selection", "settingsStore", "SettingsStore", "getStore", "state", "editorState", "getViewMode", "setViewMode", "MarkdownCapabilities", "State", "viewMode", "fullyQualifiedId", "object", "extensionProviders", "editorStateStore", "onViewModeChange", "DataType", "Text", "isEditorModel", "prefix"]
|
|
7
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var settings_E3NUTXJ4_exports = {};
|
|
20
|
-
__export(settings_E3NUTXJ4_exports, {
|
|
21
|
-
default: () => settings_default
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(settings_E3NUTXJ4_exports);
|
|
24
|
-
var import_chunk_3HHV4MM6 = require("./chunk-3HHV4MM6.cjs");
|
|
25
|
-
var import_chunk_ZU5OIHCY = require("./chunk-ZU5OIHCY.cjs");
|
|
26
|
-
var import_app_framework = require("@dxos/app-framework");
|
|
27
|
-
var import_live_object = require("@dxos/live-object");
|
|
28
|
-
var settings_default = () => {
|
|
29
|
-
const settings = (0, import_live_object.live)({
|
|
30
|
-
defaultViewMode: "preview",
|
|
31
|
-
toolbar: true,
|
|
32
|
-
numberedHeadings: true,
|
|
33
|
-
folding: true,
|
|
34
|
-
experimental: false
|
|
35
|
-
});
|
|
36
|
-
return (0, import_app_framework.contributes)(import_app_framework.Capabilities.Settings, {
|
|
37
|
-
prefix: import_chunk_ZU5OIHCY.meta.id,
|
|
38
|
-
schema: import_chunk_3HHV4MM6.MarkdownSettingsSchema,
|
|
39
|
-
value: settings
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
//# sourceMappingURL=settings-E3NUTXJ4.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/settings.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes } from '@dxos/app-framework';\nimport { live } from '@dxos/live-object';\n\nimport { meta } from '../meta';\nimport { type MarkdownSettingsProps, MarkdownSettingsSchema } from '../types';\n\nexport default () => {\n const settings = live<MarkdownSettingsProps>({\n defaultViewMode: 'preview',\n toolbar: true,\n numberedHeadings: true,\n folding: true,\n experimental: false,\n });\n\n return contributes(Capabilities.Settings, {\n prefix: meta.id,\n schema: MarkdownSettingsSchema,\n value: settings,\n });\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAIA,2BAA0C;AAC1C,yBAAqB;AAKrB,IAAA,mBAAe,MAAA;AACb,QAAMA,eAAWC,yBAA4B;IAC3CC,iBAAiB;IACjBC,SAAS;IACTC,kBAAkB;IAClBC,SAAS;IACTC,cAAc;EAChB,CAAA;AAEA,aAAOC,kCAAYC,kCAAaC,UAAU;IACxCC,QAAQC,2BAAKC;IACbC,QAAQC;IACRC,OAAOf;EACT,CAAA;AACF;",
|
|
6
|
-
"names": ["settings", "live", "defaultViewMode", "toolbar", "numberedHeadings", "folding", "experimental", "contributes", "Capabilities", "Settings", "prefix", "meta", "id", "schema", "MarkdownSettingsSchema", "value"]
|
|
7
|
-
}
|