@dxos/plugin-markdown 0.8.2-staging.7ac8446 → 0.8.3-main.672df60
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-DGPA7SEG.mjs +588 -0
- package/dist/lib/browser/MarkdownContainer-DGPA7SEG.mjs.map +7 -0
- package/dist/lib/browser/MarkdownPreview-KQN2TGK6.mjs +80 -0
- package/dist/lib/browser/MarkdownPreview-KQN2TGK6.mjs.map +7 -0
- package/dist/lib/browser/anchor-sort-VS4OZVPP.mjs +32 -0
- package/dist/lib/browser/anchor-sort-VS4OZVPP.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-serializer-NOXI4IQ5.mjs → app-graph-serializer-V6RLEHVY.mjs} +5 -6
- package/dist/lib/browser/app-graph-serializer-V6RLEHVY.mjs.map +7 -0
- package/dist/lib/browser/{artifact-definition-CE6J6NY4.mjs → artifact-definition-5NAODQLG.mjs} +65 -17
- package/dist/lib/browser/artifact-definition-5NAODQLG.mjs.map +7 -0
- package/dist/lib/browser/{chunk-3ULJ4FIJ.mjs → chunk-77NGW7EO.mjs} +12 -26
- package/dist/lib/browser/chunk-77NGW7EO.mjs.map +7 -0
- package/dist/lib/browser/{chunk-QXDKFACU.mjs → chunk-C5RABVIX.mjs} +6 -5
- package/dist/lib/browser/chunk-C5RABVIX.mjs.map +7 -0
- package/dist/lib/browser/chunk-ECSM56YC.mjs +80 -0
- package/dist/lib/browser/chunk-ECSM56YC.mjs.map +7 -0
- package/dist/lib/browser/chunk-OTOPAFWC.mjs +20 -0
- package/dist/lib/browser/chunk-OTOPAFWC.mjs.map +7 -0
- package/dist/lib/browser/{chunk-NAGMSX77.mjs → chunk-QVJETNGS.mjs} +2 -2
- package/dist/lib/{node-esm/chunk-ETXPC5VP.mjs.map → browser/chunk-QVJETNGS.mjs.map} +1 -1
- package/dist/lib/browser/index.mjs +34 -18
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/intent-resolver-4GDYST4Y.mjs +65 -0
- package/dist/lib/browser/intent-resolver-4GDYST4Y.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-surface-DM6B4UUJ.mjs +200 -0
- package/dist/lib/browser/react-surface-DM6B4UUJ.mjs.map +7 -0
- package/dist/lib/browser/{settings-GCSS3Y4Z.mjs → settings-W5CK4PXP.mjs} +4 -4
- package/dist/lib/browser/settings-W5CK4PXP.mjs.map +7 -0
- package/dist/lib/browser/{state-O7P5JDIH.mjs → state-KI6PJ6DT.mjs} +3 -3
- package/dist/lib/browser/state-KI6PJ6DT.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +3 -1
- package/dist/lib/node/MarkdownContainer-BZK66EQD.cjs +601 -0
- package/dist/lib/node/MarkdownContainer-BZK66EQD.cjs.map +7 -0
- package/dist/lib/node/MarkdownPreview-H7FFIWJH.cjs +103 -0
- package/dist/lib/node/MarkdownPreview-H7FFIWJH.cjs.map +7 -0
- package/dist/lib/node/{thread-42R57L4K.cjs → anchor-sort-NHVF23EU.cjs} +15 -20
- package/dist/lib/node/anchor-sort-NHVF23EU.cjs.map +7 -0
- package/dist/lib/node/{app-graph-serializer-HKK3SEDN.cjs → app-graph-serializer-CLALIYN3.cjs} +10 -11
- package/dist/lib/node/app-graph-serializer-CLALIYN3.cjs.map +7 -0
- package/dist/lib/node/{artifact-definition-XGADFWCQ.cjs → artifact-definition-VEAHK7BX.cjs} +68 -21
- package/dist/lib/node/artifact-definition-VEAHK7BX.cjs.map +7 -0
- package/dist/lib/node/chunk-BBDDZLQH.cjs +58 -0
- package/dist/lib/node/chunk-BBDDZLQH.cjs.map +7 -0
- package/dist/lib/node/{chunk-7QVONRSI.cjs → chunk-G7RBJX22.cjs} +13 -41
- package/dist/lib/node/chunk-G7RBJX22.cjs.map +7 -0
- package/dist/lib/node/{chunk-DZXTXSXX.cjs → chunk-IFYSBQE5.cjs} +5 -5
- package/dist/lib/node/{chunk-DZXTXSXX.cjs.map → chunk-IFYSBQE5.cjs.map} +1 -1
- package/dist/lib/node/{chunk-UEXGNGSS.cjs → chunk-RQS4KBMG.cjs} +45 -39
- package/dist/lib/node/chunk-RQS4KBMG.cjs.map +7 -0
- package/dist/lib/node/{chunk-H5MYVP6F.cjs → chunk-ZDTL47I7.cjs} +9 -8
- package/dist/lib/node/chunk-ZDTL47I7.cjs.map +7 -0
- package/dist/lib/node/index.cjs +43 -28
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/intent-resolver-AUZVK3NZ.cjs +78 -0
- package/dist/lib/node/intent-resolver-AUZVK3NZ.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/react-surface-QBW4FFXF.cjs +213 -0
- package/dist/lib/node/react-surface-QBW4FFXF.cjs.map +7 -0
- package/dist/lib/node/{settings-S2ISUVIH.cjs → settings-IRKU3WPM.cjs} +7 -7
- package/dist/lib/node/settings-IRKU3WPM.cjs.map +7 -0
- package/dist/lib/node/{state-L44SG3ZM.cjs → state-KKDRAG7X.cjs} +7 -7
- package/dist/lib/node/state-KKDRAG7X.cjs.map +7 -0
- package/dist/lib/node/types/index.cjs +8 -6
- package/dist/lib/node/types/index.cjs.map +2 -2
- package/dist/lib/node-esm/MarkdownContainer-2DYVQ6RC.mjs +589 -0
- package/dist/lib/node-esm/MarkdownContainer-2DYVQ6RC.mjs.map +7 -0
- package/dist/lib/node-esm/MarkdownPreview-JUIXYYKF.mjs +81 -0
- package/dist/lib/node-esm/MarkdownPreview-JUIXYYKF.mjs.map +7 -0
- package/dist/lib/node-esm/anchor-sort-G2HLCYFK.mjs +33 -0
- package/dist/lib/node-esm/anchor-sort-G2HLCYFK.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-serializer-QQ2CTHOQ.mjs → app-graph-serializer-C3RNTQGM.mjs} +5 -6
- package/dist/lib/node-esm/app-graph-serializer-C3RNTQGM.mjs.map +7 -0
- package/dist/lib/node-esm/{artifact-definition-WRG5ZRN5.mjs → artifact-definition-7TIJW2CO.mjs} +65 -17
- package/dist/lib/node-esm/artifact-definition-7TIJW2CO.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-F6UHVLH7.mjs → chunk-6RPARLIK.mjs} +12 -26
- package/dist/lib/node-esm/chunk-6RPARLIK.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-ETXPC5VP.mjs → chunk-JXXDCSMW.mjs} +2 -2
- package/dist/lib/{browser/chunk-NAGMSX77.mjs.map → node-esm/chunk-JXXDCSMW.mjs.map} +1 -1
- package/dist/lib/node-esm/chunk-KK7LP3UQ.mjs +22 -0
- package/dist/lib/node-esm/chunk-KK7LP3UQ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-NCMPVEXO.mjs +81 -0
- package/dist/lib/node-esm/chunk-NCMPVEXO.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-JAVD67QP.mjs → chunk-TCFJNUAE.mjs} +6 -5
- package/dist/lib/node-esm/chunk-TCFJNUAE.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +34 -18
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/intent-resolver-FTNXUNI2.mjs +66 -0
- package/dist/lib/node-esm/intent-resolver-FTNXUNI2.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/react-surface-A4VAOQG6.mjs +201 -0
- package/dist/lib/node-esm/react-surface-A4VAOQG6.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-ZDIFTK4N.mjs → settings-MK7D7LHQ.mjs} +4 -4
- package/dist/lib/node-esm/settings-MK7D7LHQ.mjs.map +7 -0
- package/dist/lib/node-esm/{state-DWPOKLEY.mjs → state-LLGVRYKL.mjs} +3 -3
- package/dist/lib/node-esm/state-LLGVRYKL.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +3 -1
- package/dist/types/src/MarkdownPlugin.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 +2 -2
- package/dist/types/src/capabilities/app-graph-serializer.d.ts.map +1 -1
- package/dist/types/src/capabilities/artifact-definition.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +7 -7
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +2 -2
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts +2 -2
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/components/MarkdownContainer.d.ts +5 -3
- package/dist/types/src/components/MarkdownContainer.d.ts.map +1 -1
- package/dist/types/src/components/MarkdownEditor/MarkdownEditor.d.ts +24 -0
- package/dist/types/src/components/MarkdownEditor/MarkdownEditor.d.ts.map +1 -0
- package/dist/types/src/components/{MarkdownEditor.stories.d.ts → MarkdownEditor/MarkdownEditor.stories.d.ts} +3 -3
- package/dist/types/src/components/MarkdownEditor/MarkdownEditor.stories.d.ts.map +1 -0
- package/dist/types/src/components/MarkdownEditor/index.d.ts +2 -0
- package/dist/types/src/components/MarkdownEditor/index.d.ts.map +1 -0
- package/dist/types/src/components/MarkdownPreview/MarkdownPreview.d.ts +6 -0
- package/dist/types/src/components/MarkdownPreview/MarkdownPreview.d.ts.map +1 -0
- package/dist/types/src/components/MarkdownPreview/MarkdownPreview.stories.d.ts +23 -0
- package/dist/types/src/components/MarkdownPreview/MarkdownPreview.stories.d.ts.map +1 -0
- package/dist/types/src/components/MarkdownPreview/index.d.ts +4 -0
- package/dist/types/src/components/MarkdownPreview/index.d.ts.map +1 -0
- package/dist/types/src/components/{MarkdownSettings.d.ts → MarkdownSettings/MarkdownSettings.d.ts} +1 -1
- package/dist/types/src/components/MarkdownSettings/MarkdownSettings.d.ts.map +1 -0
- package/dist/types/src/components/MarkdownSettings/index.d.ts +2 -0
- package/dist/types/src/components/MarkdownSettings/index.d.ts.map +1 -0
- package/dist/types/src/components/Suggestions.stories.d.ts +12 -0
- package/dist/types/src/components/Suggestions.stories.d.ts.map +1 -0
- package/dist/types/src/components/Toolbar.stories.d.ts +2 -2
- package/dist/types/src/components/Toolbar.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/extensions.d.ts +8 -5
- package/dist/types/src/extensions.d.ts.map +1 -1
- package/dist/types/src/hooks/useSelectCurrentThread.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +4 -42
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +29 -129
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +40 -88
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +1 -0
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +47 -34
- package/src/MarkdownPlugin.tsx +22 -12
- package/src/capabilities/anchor-sort.ts +30 -0
- package/src/capabilities/app-graph-serializer.ts +4 -5
- package/src/capabilities/artifact-definition.ts +48 -10
- package/src/capabilities/index.ts +1 -1
- package/src/capabilities/intent-resolver.ts +40 -12
- package/src/capabilities/react-surface.tsx +20 -5
- package/src/capabilities/settings.ts +2 -2
- package/src/capabilities/state.ts +4 -4
- package/src/components/MarkdownContainer.tsx +20 -7
- package/src/components/{MarkdownEditor.stories.tsx → MarkdownEditor/MarkdownEditor.stories.tsx} +22 -35
- package/src/components/{MarkdownEditor.tsx → MarkdownEditor/MarkdownEditor.tsx} +32 -73
- package/src/components/MarkdownEditor/index.ts +5 -0
- package/src/components/MarkdownPreview/MarkdownPreview.stories.tsx +73 -0
- package/src/components/MarkdownPreview/MarkdownPreview.tsx +71 -0
- package/src/components/MarkdownPreview/index.ts +9 -0
- package/src/components/{MarkdownSettings.tsx → MarkdownSettings/MarkdownSettings.tsx} +2 -2
- package/src/components/MarkdownSettings/index.ts +5 -0
- package/src/components/Suggestions.stories.tsx +217 -0
- package/src/components/Toolbar.stories.tsx +29 -29
- package/src/components/index.ts +1 -0
- package/src/extensions.tsx +82 -48
- package/src/hooks/useSelectCurrentThread.tsx +2 -2
- package/src/translations.ts +3 -3
- package/src/types/schema.ts +22 -15
- package/src/types/types.ts +23 -21
- package/src/util.tsx +8 -4
- package/dist/lib/browser/MarkdownContainer-T3HU27RE.mjs +0 -563
- package/dist/lib/browser/MarkdownContainer-T3HU27RE.mjs.map +0 -7
- package/dist/lib/browser/app-graph-serializer-NOXI4IQ5.mjs.map +0 -7
- package/dist/lib/browser/artifact-definition-CE6J6NY4.mjs.map +0 -7
- package/dist/lib/browser/chunk-3ULJ4FIJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-QXDKFACU.mjs.map +0 -7
- package/dist/lib/browser/chunk-YCJNW2RU.mjs +0 -75
- package/dist/lib/browser/chunk-YCJNW2RU.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-42GQ6HNZ.mjs +0 -50
- package/dist/lib/browser/intent-resolver-42GQ6HNZ.mjs.map +0 -7
- package/dist/lib/browser/react-surface-RQX3CPFV.mjs +0 -176
- package/dist/lib/browser/react-surface-RQX3CPFV.mjs.map +0 -7
- package/dist/lib/browser/settings-GCSS3Y4Z.mjs.map +0 -7
- package/dist/lib/browser/state-O7P5JDIH.mjs.map +0 -7
- package/dist/lib/browser/thread-3QGCFNVZ.mjs +0 -37
- package/dist/lib/browser/thread-3QGCFNVZ.mjs.map +0 -7
- package/dist/lib/node/MarkdownContainer-6ZJIFAP6.cjs +0 -576
- package/dist/lib/node/MarkdownContainer-6ZJIFAP6.cjs.map +0 -7
- package/dist/lib/node/app-graph-serializer-HKK3SEDN.cjs.map +0 -7
- package/dist/lib/node/artifact-definition-XGADFWCQ.cjs.map +0 -7
- package/dist/lib/node/chunk-7QVONRSI.cjs.map +0 -7
- package/dist/lib/node/chunk-H5MYVP6F.cjs.map +0 -7
- package/dist/lib/node/chunk-UEXGNGSS.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-NW27BF3W.cjs +0 -63
- package/dist/lib/node/intent-resolver-NW27BF3W.cjs.map +0 -7
- package/dist/lib/node/react-surface-5X3SMHGI.cjs +0 -189
- package/dist/lib/node/react-surface-5X3SMHGI.cjs.map +0 -7
- package/dist/lib/node/settings-S2ISUVIH.cjs.map +0 -7
- package/dist/lib/node/state-L44SG3ZM.cjs.map +0 -7
- package/dist/lib/node/thread-42R57L4K.cjs.map +0 -7
- package/dist/lib/node-esm/MarkdownContainer-URAPTO37.mjs +0 -564
- package/dist/lib/node-esm/MarkdownContainer-URAPTO37.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-serializer-QQ2CTHOQ.mjs.map +0 -7
- package/dist/lib/node-esm/artifact-definition-WRG5ZRN5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-4AM4VU3Y.mjs +0 -76
- package/dist/lib/node-esm/chunk-4AM4VU3Y.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-F6UHVLH7.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JAVD67QP.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-7HOMUVHR.mjs +0 -51
- package/dist/lib/node-esm/intent-resolver-7HOMUVHR.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-6IKC3G46.mjs +0 -177
- package/dist/lib/node-esm/react-surface-6IKC3G46.mjs.map +0 -7
- package/dist/lib/node-esm/settings-ZDIFTK4N.mjs.map +0 -7
- package/dist/lib/node-esm/state-DWPOKLEY.mjs.map +0 -7
- package/dist/lib/node-esm/thread-R2KHZD6V.mjs +0 -38
- package/dist/lib/node-esm/thread-R2KHZD6V.mjs.map +0 -7
- package/dist/types/src/capabilities/thread.d.ts +0 -6
- package/dist/types/src/capabilities/thread.d.ts.map +0 -1
- package/dist/types/src/components/MarkdownEditor.d.ts +0 -39
- package/dist/types/src/components/MarkdownEditor.d.ts.map +0 -1
- package/dist/types/src/components/MarkdownEditor.stories.d.ts.map +0 -1
- package/dist/types/src/components/MarkdownSettings.d.ts.map +0 -1
- package/src/capabilities/thread.ts +0 -35
|
@@ -1,133 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const DocumentSchema:
|
|
3
|
-
name:
|
|
4
|
-
fallbackName:
|
|
5
|
-
content: import("@dxos/echo-schema").Ref$<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
blocks: S.Array$<S.Union<[S.mutable<S.extend<S.Struct<{
|
|
31
|
-
pending: S.optional<typeof S.Boolean>;
|
|
32
|
-
}>, S.Struct<{
|
|
33
|
-
type: S.Literal<["text"]>;
|
|
34
|
-
disposition: S.optional<typeof S.String>;
|
|
35
|
-
text: typeof S.String;
|
|
36
|
-
}>>>, S.mutable<S.extend<S.Struct<{
|
|
37
|
-
pending: S.optional<typeof S.Boolean>;
|
|
38
|
-
}>, S.Struct<{
|
|
39
|
-
type: S.Literal<["json"]>;
|
|
40
|
-
disposition: S.optional<typeof S.String>;
|
|
41
|
-
data: typeof S.String;
|
|
42
|
-
}>>>, S.mutable<S.extend<S.Struct<{
|
|
43
|
-
pending: S.optional<typeof S.Boolean>;
|
|
44
|
-
}>, S.Struct<{
|
|
45
|
-
type: S.Literal<["image"]>;
|
|
46
|
-
id: S.optional<typeof S.String>;
|
|
47
|
-
source: S.optional<S.Union<[S.mutable<S.Struct<{
|
|
48
|
-
type: S.Literal<["base64"]>;
|
|
49
|
-
mediaType: typeof S.String;
|
|
50
|
-
data: typeof S.String;
|
|
51
|
-
}>>, S.mutable<S.Struct<{
|
|
52
|
-
type: S.Literal<["http"]>;
|
|
53
|
-
url: typeof S.String;
|
|
54
|
-
}>>]>>;
|
|
55
|
-
}>>>, S.mutable<S.extend<S.Struct<{
|
|
56
|
-
pending: S.optional<typeof S.Boolean>;
|
|
57
|
-
}>, S.Struct<{
|
|
58
|
-
type: S.Literal<["reference"]>;
|
|
59
|
-
reference: import("@dxos/echo-schema").Ref$<Expando>;
|
|
60
|
-
}>>>]>>;
|
|
61
|
-
properties: S.optional<S.mutable<S.Record$<typeof S.String, typeof S.Any>>>;
|
|
62
|
-
}, import("@dxos/echo-schema").TypedObjectOptions>>>>;
|
|
63
|
-
}, import("@dxos/echo-schema").TypedObjectOptions>>>>;
|
|
64
|
-
assistantChatQueue: S.optional<import("@dxos/echo-schema").Ref$<Expando>>;
|
|
1
|
+
import { Schema } from 'effect';
|
|
2
|
+
export declare const DocumentSchema: Schema.Struct<{
|
|
3
|
+
name: Schema.optional<typeof Schema.String>;
|
|
4
|
+
fallbackName: Schema.optional<typeof Schema.String>;
|
|
5
|
+
content: import("@dxos/echo-schema").Ref$<{
|
|
6
|
+
readonly id: string;
|
|
7
|
+
content: string;
|
|
8
|
+
}>;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const DocumentType: import("@dxos/echo-schema").EchoTypeSchema<Schema.Struct<{
|
|
11
|
+
name: Schema.optional<typeof Schema.String>;
|
|
12
|
+
fallbackName: Schema.optional<typeof Schema.String>;
|
|
13
|
+
content: import("@dxos/echo-schema").Ref$<{
|
|
14
|
+
readonly id: string;
|
|
15
|
+
content: string;
|
|
16
|
+
}>;
|
|
17
|
+
}>, {}>;
|
|
18
|
+
export type DocumentType = Schema.Schema.Type<typeof DocumentType>;
|
|
19
|
+
export declare const createDocument: ({ name, content }: {
|
|
20
|
+
name: string;
|
|
21
|
+
content: string;
|
|
22
|
+
}) => import("@dxos/live-object").Live<{
|
|
23
|
+
readonly id: string;
|
|
24
|
+
name?: string | undefined;
|
|
25
|
+
fallbackName?: string | undefined;
|
|
26
|
+
content: import("@dxos/echo-schema").Ref<{
|
|
27
|
+
readonly id: string;
|
|
28
|
+
content: string;
|
|
29
|
+
}>;
|
|
65
30
|
}>;
|
|
66
|
-
export declare const DocumentType: import("@dxos/echo-schema").EchoObjectSchema<S.Struct<{
|
|
67
|
-
name: S.optional<typeof S.String>;
|
|
68
|
-
fallbackName: S.optional<typeof S.String>;
|
|
69
|
-
content: import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
|
|
70
|
-
content: typeof S.String;
|
|
71
|
-
}, import("@dxos/echo-schema").TypedObjectOptions>>;
|
|
72
|
-
threads: S.mutable<S.Array$<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
|
|
73
|
-
name: S.optional<typeof S.String>;
|
|
74
|
-
anchor: S.optional<typeof S.String>;
|
|
75
|
-
status: S.optional<S.Union<[S.Literal<["staged"]>, S.Literal<["active"]>, S.Literal<["resolved"]>]>>;
|
|
76
|
-
messages: S.mutable<S.Array$<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
|
|
77
|
-
id: import("@dxos/echo-schema").ObjectIdClass;
|
|
78
|
-
created: S.SchemaClass<string, string, never>;
|
|
79
|
-
sender: S.Struct<{
|
|
80
|
-
contact: S.optional<import("@dxos/echo-schema").Ref$<{
|
|
81
|
-
readonly id: string;
|
|
82
|
-
name?: string | undefined;
|
|
83
|
-
identifiers: {
|
|
84
|
-
readonly value: string;
|
|
85
|
-
readonly type: string;
|
|
86
|
-
}[];
|
|
87
|
-
}>>;
|
|
88
|
-
identityDid: S.optional<typeof S.String>;
|
|
89
|
-
identityKey: S.optional<typeof S.String>;
|
|
90
|
-
email: S.optional<typeof S.String>;
|
|
91
|
-
name: S.optional<typeof S.String>;
|
|
92
|
-
role: S.optional<S.Literal<["user", "assistant"]>>;
|
|
93
|
-
}>;
|
|
94
|
-
blocks: S.Array$<S.Union<[S.mutable<S.extend<S.Struct<{
|
|
95
|
-
pending: S.optional<typeof S.Boolean>;
|
|
96
|
-
}>, S.Struct<{
|
|
97
|
-
type: S.Literal<["text"]>;
|
|
98
|
-
disposition: S.optional<typeof S.String>;
|
|
99
|
-
text: typeof S.String;
|
|
100
|
-
}>>>, S.mutable<S.extend<S.Struct<{
|
|
101
|
-
pending: S.optional<typeof S.Boolean>;
|
|
102
|
-
}>, S.Struct<{
|
|
103
|
-
type: S.Literal<["json"]>;
|
|
104
|
-
disposition: S.optional<typeof S.String>;
|
|
105
|
-
data: typeof S.String;
|
|
106
|
-
}>>>, S.mutable<S.extend<S.Struct<{
|
|
107
|
-
pending: S.optional<typeof S.Boolean>;
|
|
108
|
-
}>, S.Struct<{
|
|
109
|
-
type: S.Literal<["image"]>;
|
|
110
|
-
id: S.optional<typeof S.String>;
|
|
111
|
-
source: S.optional<S.Union<[S.mutable<S.Struct<{
|
|
112
|
-
type: S.Literal<["base64"]>;
|
|
113
|
-
mediaType: typeof S.String;
|
|
114
|
-
data: typeof S.String;
|
|
115
|
-
}>>, S.mutable<S.Struct<{
|
|
116
|
-
type: S.Literal<["http"]>;
|
|
117
|
-
url: typeof S.String;
|
|
118
|
-
}>>]>>;
|
|
119
|
-
}>>>, S.mutable<S.extend<S.Struct<{
|
|
120
|
-
pending: S.optional<typeof S.Boolean>;
|
|
121
|
-
}>, S.Struct<{
|
|
122
|
-
type: S.Literal<["reference"]>;
|
|
123
|
-
reference: import("@dxos/echo-schema").Ref$<Expando>;
|
|
124
|
-
}>>>]>>;
|
|
125
|
-
properties: S.optional<S.mutable<S.Record$<typeof S.String, typeof S.Any>>>;
|
|
126
|
-
}, import("@dxos/echo-schema").TypedObjectOptions>>>>;
|
|
127
|
-
}, import("@dxos/echo-schema").TypedObjectOptions>>>>;
|
|
128
|
-
assistantChatQueue: S.optional<import("@dxos/echo-schema").Ref$<Expando>>;
|
|
129
|
-
}>>;
|
|
130
|
-
export type DocumentType = S.Schema.Type<typeof DocumentType>;
|
|
131
31
|
/**
|
|
132
32
|
* Checks if an object conforms to the interface needed to render an editor.
|
|
133
33
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/types/schema.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/types/schema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAOhC,eAAO,MAAM,cAAc;;;;;;;EAI2B,CAAC;AAEvD,eAAO,MAAM,YAAY;;;;;;;OAKxB,CAAC;AACF,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,YAAY,CAAC,CAAC;AAGnE,eAAO,MAAM,cAAc,GAAI,mBAAmB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE;;;;;;;;EACA,CAAC;AAEpF;;GAEG;AAEH,eAAO,MAAM,aAAa,GAAI,MAAM,GAAG,KAAG,IAAI,IAAI;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAM7C,CAAC"}
|
|
@@ -1,92 +1,44 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Schema } from 'effect';
|
|
2
|
+
import { Type } from '@dxos/echo';
|
|
2
3
|
import { type Extension, EditorViewMode } from '@dxos/react-ui-editor';
|
|
3
4
|
import { DocumentType } from './schema';
|
|
4
5
|
export declare namespace MarkdownAction {
|
|
5
|
-
const Create_base:
|
|
6
|
-
readonly _tag:
|
|
6
|
+
const Create_base: Schema.TaggedClass<Create, "dxos.org/plugin/markdown/action", {
|
|
7
|
+
readonly _tag: Schema.tag<"dxos.org/plugin/markdown/action">;
|
|
7
8
|
} & {
|
|
8
|
-
input:
|
|
9
|
-
spaceId:
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
input: Schema.Struct<{
|
|
10
|
+
spaceId: Schema.Schema<Type.SpaceId, string, never> & {
|
|
11
|
+
byteLength: number;
|
|
12
|
+
encode: (value: Uint8Array) => Type.SpaceId;
|
|
13
|
+
decode: (value: Type.SpaceId) => Uint8Array;
|
|
14
|
+
isValid: (value: string) => value is Type.SpaceId;
|
|
15
|
+
make: (value: string) => Type.SpaceId;
|
|
16
|
+
random: () => Type.SpaceId;
|
|
17
|
+
};
|
|
18
|
+
name: Schema.optional<typeof Schema.String>;
|
|
19
|
+
content: Schema.optional<typeof Schema.String>;
|
|
12
20
|
}>;
|
|
13
|
-
output:
|
|
14
|
-
object: import("@dxos/echo-schema").
|
|
15
|
-
name:
|
|
16
|
-
fallbackName:
|
|
17
|
-
content: import("@dxos/echo-schema").Ref$<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
anchor: S.optional<typeof S.String>;
|
|
23
|
-
status: S.optional<S.Union<[S.Literal<["staged"]>, S.Literal<["active"]>, S.Literal<["resolved"]>]>>;
|
|
24
|
-
messages: S.mutable<S.Array$<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
|
|
25
|
-
id: import("@dxos/echo-schema").ObjectIdClass;
|
|
26
|
-
created: S.SchemaClass<string, string, never>;
|
|
27
|
-
sender: S.Struct<{
|
|
28
|
-
contact: S.optional<import("@dxos/echo-schema").Ref$<{
|
|
29
|
-
readonly id: string;
|
|
30
|
-
name?: string | undefined;
|
|
31
|
-
identifiers: {
|
|
32
|
-
readonly value: string;
|
|
33
|
-
readonly type: string;
|
|
34
|
-
}[];
|
|
35
|
-
}>>;
|
|
36
|
-
identityDid: S.optional<typeof S.String>;
|
|
37
|
-
identityKey: S.optional<typeof S.String>;
|
|
38
|
-
email: S.optional<typeof S.String>;
|
|
39
|
-
name: S.optional<typeof S.String>;
|
|
40
|
-
role: S.optional<S.Literal<["user", "assistant"]>>;
|
|
41
|
-
}>;
|
|
42
|
-
blocks: S.Array$<S.Union<[S.mutable<S.extend<S.Struct<{
|
|
43
|
-
pending: S.optional<typeof S.Boolean>;
|
|
44
|
-
}>, S.Struct<{
|
|
45
|
-
type: S.Literal<["text"]>;
|
|
46
|
-
disposition: S.optional<typeof S.String>;
|
|
47
|
-
text: typeof S.String;
|
|
48
|
-
}>>>, S.mutable<S.extend<S.Struct<{
|
|
49
|
-
pending: S.optional<typeof S.Boolean>;
|
|
50
|
-
}>, S.Struct<{
|
|
51
|
-
type: S.Literal<["json"]>;
|
|
52
|
-
disposition: S.optional<typeof S.String>;
|
|
53
|
-
data: typeof S.String;
|
|
54
|
-
}>>>, S.mutable<S.extend<S.Struct<{
|
|
55
|
-
pending: S.optional<typeof S.Boolean>;
|
|
56
|
-
}>, S.Struct<{
|
|
57
|
-
type: S.Literal<["image"]>;
|
|
58
|
-
id: S.optional<typeof S.String>;
|
|
59
|
-
source: S.optional<S.Union<[S.mutable<S.Struct<{
|
|
60
|
-
type: S.Literal<["base64"]>;
|
|
61
|
-
mediaType: typeof S.String;
|
|
62
|
-
data: typeof S.String;
|
|
63
|
-
}>>, S.mutable<S.Struct<{
|
|
64
|
-
type: S.Literal<["http"]>;
|
|
65
|
-
url: typeof S.String;
|
|
66
|
-
}>>]>>;
|
|
67
|
-
}>>>, S.mutable<S.extend<S.Struct<{
|
|
68
|
-
pending: S.optional<typeof S.Boolean>;
|
|
69
|
-
}>, S.Struct<{
|
|
70
|
-
type: S.Literal<["reference"]>;
|
|
71
|
-
reference: import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").Expando>;
|
|
72
|
-
}>>>]>>;
|
|
73
|
-
properties: S.optional<S.mutable<S.Record$<typeof S.String, typeof S.Any>>>;
|
|
74
|
-
}, import("@dxos/echo-schema").TypedObjectOptions>>>>;
|
|
75
|
-
}, import("@dxos/echo-schema").TypedObjectOptions>>>>;
|
|
76
|
-
assistantChatQueue: S.optional<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").Expando>>;
|
|
77
|
-
}>>;
|
|
21
|
+
output: Schema.Struct<{
|
|
22
|
+
object: import("@dxos/echo-schema").EchoTypeSchema<Schema.Struct<{
|
|
23
|
+
name: Schema.optional<typeof Schema.String>;
|
|
24
|
+
fallbackName: Schema.optional<typeof Schema.String>;
|
|
25
|
+
content: import("@dxos/echo-schema").Ref$<{
|
|
26
|
+
readonly id: string;
|
|
27
|
+
content: string;
|
|
28
|
+
}>;
|
|
29
|
+
}>, {}>;
|
|
78
30
|
}>;
|
|
79
31
|
}>;
|
|
80
32
|
export class Create extends Create_base {
|
|
81
33
|
}
|
|
82
|
-
const SetViewMode_base:
|
|
83
|
-
readonly _tag:
|
|
34
|
+
const SetViewMode_base: Schema.TaggedClass<SetViewMode, "dxos.org/plugin/markdown/action/set-view-mode", {
|
|
35
|
+
readonly _tag: Schema.tag<"dxos.org/plugin/markdown/action/set-view-mode">;
|
|
84
36
|
} & {
|
|
85
|
-
input:
|
|
86
|
-
id: typeof
|
|
87
|
-
viewMode:
|
|
37
|
+
input: Schema.Struct<{
|
|
38
|
+
id: typeof Schema.String;
|
|
39
|
+
viewMode: Schema.Schema<"source" | "preview" | "readonly", "source" | "preview" | "readonly", never>;
|
|
88
40
|
}>;
|
|
89
|
-
output: typeof
|
|
41
|
+
output: typeof Schema.Void;
|
|
90
42
|
}>;
|
|
91
43
|
export class SetViewMode extends SetViewMode_base {
|
|
92
44
|
}
|
|
@@ -101,15 +53,15 @@ export type MarkdownPluginState = {
|
|
|
101
53
|
extensionProviders?: MarkdownExtensionProvider[];
|
|
102
54
|
viewMode: Record<string, EditorViewMode>;
|
|
103
55
|
};
|
|
104
|
-
export declare const MarkdownSettingsSchema:
|
|
105
|
-
defaultViewMode:
|
|
106
|
-
editorInputMode:
|
|
107
|
-
experimental:
|
|
108
|
-
debug:
|
|
109
|
-
toolbar:
|
|
110
|
-
typewriter:
|
|
111
|
-
numberedHeadings:
|
|
112
|
-
folding:
|
|
56
|
+
export declare const MarkdownSettingsSchema: Schema.mutable<Schema.Struct<{
|
|
57
|
+
defaultViewMode: Schema.Schema<"source" | "preview" | "readonly", "source" | "preview" | "readonly", never>;
|
|
58
|
+
editorInputMode: Schema.optional<Schema.Schema<"default" | "vim" | "vscode", "default" | "vim" | "vscode", never>>;
|
|
59
|
+
experimental: Schema.optional<typeof Schema.Boolean>;
|
|
60
|
+
debug: Schema.optional<typeof Schema.Boolean>;
|
|
61
|
+
toolbar: Schema.optional<typeof Schema.Boolean>;
|
|
62
|
+
typewriter: Schema.optional<typeof Schema.String>;
|
|
63
|
+
numberedHeadings: Schema.optional<typeof Schema.Boolean>;
|
|
64
|
+
folding: Schema.optional<typeof Schema.Boolean>;
|
|
113
65
|
}>>;
|
|
114
|
-
export type MarkdownSettingsProps =
|
|
66
|
+
export type MarkdownSettingsProps = Schema.Schema.Type<typeof MarkdownSettingsSchema>;
|
|
115
67
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,OAAO,EAAE,KAAK,SAAS,EAAmB,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAExF,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAKxC,yBAAiB,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;IAC9B,MAAM,OAAO,MAAO,SAAQ,WAS1B;KAAG;;;;;;;;;;IAEL,MAAM,OAAO,WAAY,SAAQ,gBAM/B;KAAG;;CACN;AAED,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAGrD,MAAM,MAAM,yBAAyB,GAAG,CAAC,KAAK,EAAE;IAAE,QAAQ,CAAC,EAAE,YAAY,CAAA;CAAE,KAAK,SAAS,GAAG,SAAS,CAAC;AAEtG,MAAM,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;AAE9C,MAAM,MAAM,mBAAmB,GAAG;IAEhC,kBAAkB,CAAC,EAAE,yBAAyB,EAAE,CAAC;IAIjD,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;CAC1C,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;GAYlC,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
package/dist/types/src/util.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { type TypedObjectSerializer } from '@dxos/plugin-space/types';
|
|
|
2
2
|
import { DocumentType, type MarkdownProperties } from './types';
|
|
3
3
|
export declare const isMarkdownProperties: (data: unknown) => data is MarkdownProperties;
|
|
4
4
|
export declare const getFallbackName: (content: string) => string;
|
|
5
|
+
export declare const getAbstract: (content: string) => string;
|
|
5
6
|
export declare const setFallbackName: (...args: any[]) => void;
|
|
6
7
|
export declare const serializer: TypedObjectSerializer<DocumentType>;
|
|
7
8
|
//# sourceMappingURL=util.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/util.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAItE,OAAO,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAEhE,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/util.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAItE,OAAO,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAEhE,eAAO,MAAM,oBAAoB,GAAI,MAAM,OAAO,KAAG,IAAI,IAAI,kBAKhD,CAAC;AAId,eAAO,MAAM,eAAe,GAAI,SAAS,MAAM,WAE9C,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,SAAS,MAAM,WAE1C,CAAC;AAEF,eAAO,MAAM,eAAe,0BAKrB,CAAC;AAER,eAAO,MAAM,UAAU,EAAE,qBAAqB,CAAC,YAAY,CAY1D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"5.
|
|
1
|
+
{"version":"5.8.3"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-markdown",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3-main.672df60",
|
|
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",
|
|
@@ -33,55 +33,68 @@
|
|
|
33
33
|
"src"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
+
"@automerge/automerge": "3.0.0-beta.4",
|
|
36
37
|
"@codemirror/search": "^6.5.6",
|
|
37
38
|
"@codemirror/view": "^6.34.1",
|
|
38
|
-
"@preact/
|
|
39
|
-
"
|
|
39
|
+
"@preact-signals/safe-react": "^0.9.0",
|
|
40
|
+
"@preact/signals-core": "^1.9.0",
|
|
40
41
|
"react-dropzone": "^14.2.3",
|
|
41
|
-
"@dxos/app-framework": "0.8.
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/plugin-
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/plugin-
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/
|
|
60
|
-
"@dxos/react-
|
|
61
|
-
"@dxos/react-
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/
|
|
42
|
+
"@dxos/app-framework": "0.8.3-main.672df60",
|
|
43
|
+
"@dxos/ai": "0.8.3-main.672df60",
|
|
44
|
+
"@dxos/artifact": "0.8.3-main.672df60",
|
|
45
|
+
"@dxos/assistant": "0.8.3-main.672df60",
|
|
46
|
+
"@dxos/async": "0.8.3-main.672df60",
|
|
47
|
+
"@dxos/echo": "0.8.3-main.672df60",
|
|
48
|
+
"@dxos/echo-schema": "0.8.3-main.672df60",
|
|
49
|
+
"@dxos/invariant": "0.8.3-main.672df60",
|
|
50
|
+
"@dxos/keys": "0.8.3-main.672df60",
|
|
51
|
+
"@dxos/lit-ui": "0.8.3-main.672df60",
|
|
52
|
+
"@dxos/live-object": "0.8.3-main.672df60",
|
|
53
|
+
"@dxos/local-storage": "0.8.3-main.672df60",
|
|
54
|
+
"@dxos/log": "0.8.3-main.672df60",
|
|
55
|
+
"@dxos/plugin-attention": "0.8.3-main.672df60",
|
|
56
|
+
"@dxos/plugin-client": "0.8.3-main.672df60",
|
|
57
|
+
"@dxos/plugin-graph": "0.8.3-main.672df60",
|
|
58
|
+
"@dxos/plugin-deck": "0.8.3-main.672df60",
|
|
59
|
+
"@dxos/plugin-preview": "0.8.3-main.672df60",
|
|
60
|
+
"@dxos/plugin-theme": "0.8.3-main.672df60",
|
|
61
|
+
"@dxos/react-client": "0.8.3-main.672df60",
|
|
62
|
+
"@dxos/react-hooks": "0.8.3-main.672df60",
|
|
63
|
+
"@dxos/plugin-space": "0.8.3-main.672df60",
|
|
64
|
+
"@dxos/react-ui-attention": "0.8.3-main.672df60",
|
|
65
|
+
"@dxos/react-ui-editor": "0.8.3-main.672df60",
|
|
66
|
+
"@dxos/react-ui-form": "0.8.3-main.672df60",
|
|
67
|
+
"@dxos/react-ui-stack": "0.8.3-main.672df60",
|
|
68
|
+
"@dxos/schema": "0.8.3-main.672df60",
|
|
69
|
+
"@dxos/util": "0.8.3-main.672df60"
|
|
65
70
|
},
|
|
66
71
|
"devDependencies": {
|
|
72
|
+
"@effect-rx/rx-react": "^0.34.1",
|
|
73
|
+
"@effect/platform": "0.80.12",
|
|
67
74
|
"@phosphor-icons/react": "^2.1.5",
|
|
68
75
|
"@types/react": "~18.2.0",
|
|
69
76
|
"@types/react-dom": "~18.2.0",
|
|
77
|
+
"effect": "3.14.21",
|
|
70
78
|
"react": "~18.2.0",
|
|
71
79
|
"react-dom": "~18.2.0",
|
|
72
80
|
"vite": "5.4.7",
|
|
73
|
-
"@dxos/
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/
|
|
76
|
-
"@dxos/
|
|
77
|
-
"@dxos/
|
|
81
|
+
"@dxos/plugin-storybook-layout": "0.8.3-main.672df60",
|
|
82
|
+
"@dxos/debug": "0.8.3-main.672df60",
|
|
83
|
+
"@dxos/plugin-theme": "0.8.3-main.672df60",
|
|
84
|
+
"@dxos/random": "0.8.3-main.672df60",
|
|
85
|
+
"@dxos/react-ui": "0.8.3-main.672df60",
|
|
86
|
+
"@dxos/react-ui-theme": "0.8.3-main.672df60",
|
|
87
|
+
"@dxos/storybook-utils": "0.8.3-main.672df60"
|
|
78
88
|
},
|
|
79
89
|
"peerDependencies": {
|
|
90
|
+
"@effect-rx/rx-react": "^0.34.1",
|
|
91
|
+
"@effect/platform": "0.80.12",
|
|
80
92
|
"@phosphor-icons/react": "^2.1.5",
|
|
93
|
+
"effect": "^3.13.3",
|
|
81
94
|
"react": "~18.2.0",
|
|
82
95
|
"react-dom": "~18.2.0",
|
|
83
|
-
"@dxos/react-ui": "0.8.
|
|
84
|
-
"@dxos/react-ui-theme": "0.8.
|
|
96
|
+
"@dxos/react-ui": "0.8.3-main.672df60",
|
|
97
|
+
"@dxos/react-ui-theme": "0.8.3-main.672df60"
|
|
85
98
|
},
|
|
86
99
|
"publishConfig": {
|
|
87
100
|
"access": "public"
|
package/src/MarkdownPlugin.tsx
CHANGED
|
@@ -6,19 +6,20 @@ import { Capabilities, contributes, createIntent, defineModule, definePlugin, Ev
|
|
|
6
6
|
import { isInstanceOf, type BaseObject } from '@dxos/echo-schema';
|
|
7
7
|
import { RefArray } from '@dxos/live-object';
|
|
8
8
|
import { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';
|
|
9
|
-
import { SpaceCapabilities
|
|
9
|
+
import { SpaceCapabilities } from '@dxos/plugin-space';
|
|
10
10
|
import { defineObjectForm } from '@dxos/plugin-space/types';
|
|
11
|
+
import { createDocAccessor, getTextInRange } from '@dxos/react-client/echo';
|
|
11
12
|
import { translations as editorTranslations } from '@dxos/react-ui-editor';
|
|
12
|
-
import {
|
|
13
|
+
import { DataType } from '@dxos/schema';
|
|
13
14
|
|
|
14
15
|
import {
|
|
16
|
+
AnchorSort,
|
|
17
|
+
AppGraphSerializer,
|
|
18
|
+
ArtifactDefinition,
|
|
19
|
+
IntentResolver,
|
|
15
20
|
MarkdownState,
|
|
16
21
|
MarkdownSettings,
|
|
17
22
|
ReactSurface,
|
|
18
|
-
IntentResolver,
|
|
19
|
-
AppGraphSerializer,
|
|
20
|
-
Thread,
|
|
21
|
-
ArtifactDefinition,
|
|
22
23
|
} from './capabilities';
|
|
23
24
|
import { MarkdownEvents } from './events';
|
|
24
25
|
import { meta } from './meta';
|
|
@@ -60,9 +61,17 @@ export const MarkdownPlugin = () =>
|
|
|
60
61
|
managesAutofocus: true,
|
|
61
62
|
},
|
|
62
63
|
// TODO(wittjosiah): Move out of metadata.
|
|
63
|
-
loadReferences: async (doc: DocumentType) =>
|
|
64
|
-
await RefArray.loadAll<BaseObject>([doc.content, ...doc.threads]),
|
|
64
|
+
loadReferences: async (doc: DocumentType) => await RefArray.loadAll<BaseObject>([doc.content]),
|
|
65
65
|
serializer,
|
|
66
|
+
// TODO(wittjosiah): Consider how to do generic comments without these.
|
|
67
|
+
comments: 'anchored',
|
|
68
|
+
selectionMode: 'multi-range',
|
|
69
|
+
getAnchorLabel: (doc: DocumentType, anchor: string): string | undefined => {
|
|
70
|
+
if (doc.content) {
|
|
71
|
+
const [start, end] = anchor.split(':');
|
|
72
|
+
return getTextInRange(createDocAccessor(doc.content.target!, ['content']), start, end);
|
|
73
|
+
}
|
|
74
|
+
},
|
|
66
75
|
},
|
|
67
76
|
}),
|
|
68
77
|
}),
|
|
@@ -81,7 +90,7 @@ export const MarkdownPlugin = () =>
|
|
|
81
90
|
defineModule({
|
|
82
91
|
id: `${meta.id}/module/schema`,
|
|
83
92
|
activatesOn: ClientEvents.SetupSchema,
|
|
84
|
-
activate: () => contributes(ClientCapabilities.Schema, [
|
|
93
|
+
activate: () => contributes(ClientCapabilities.Schema, [DataType.Text]),
|
|
85
94
|
}),
|
|
86
95
|
defineModule({
|
|
87
96
|
id: `${meta.id}/module/react-surface`,
|
|
@@ -101,9 +110,10 @@ export const MarkdownPlugin = () =>
|
|
|
101
110
|
activate: AppGraphSerializer,
|
|
102
111
|
}),
|
|
103
112
|
defineModule({
|
|
104
|
-
id: `${meta.id}/module/
|
|
105
|
-
|
|
106
|
-
|
|
113
|
+
id: `${meta.id}/module/anchor-sort`,
|
|
114
|
+
// TODO(wittjosiah): More relevant event?
|
|
115
|
+
activatesOn: Events.AppGraphReady,
|
|
116
|
+
activate: AnchorSort,
|
|
107
117
|
}),
|
|
108
118
|
defineModule({
|
|
109
119
|
id: `${meta.id}/module/artifact-definition`,
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Capabilities, contributes } from '@dxos/app-framework';
|
|
6
|
+
import { getSchemaTypename } from '@dxos/echo-schema';
|
|
7
|
+
import { createDocAccessor, getRangeFromCursor, getTarget } from '@dxos/react-client/echo';
|
|
8
|
+
|
|
9
|
+
import { DocumentType } from '../types';
|
|
10
|
+
|
|
11
|
+
export default () =>
|
|
12
|
+
contributes(Capabilities.AnchorSort, {
|
|
13
|
+
key: getSchemaTypename(DocumentType)!,
|
|
14
|
+
sort: (anchorA, anchorB) => {
|
|
15
|
+
const doc = getTarget(anchorA) as DocumentType;
|
|
16
|
+
const accessor = doc.content.target ? createDocAccessor(doc.content.target, ['content']) : undefined;
|
|
17
|
+
if (doc !== getTarget(anchorB) || !accessor) {
|
|
18
|
+
return 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const getStartPosition = (cursor: string | undefined) => {
|
|
22
|
+
const range = cursor ? getRangeFromCursor(accessor, cursor) : undefined;
|
|
23
|
+
return range?.start ?? Number.MAX_SAFE_INTEGER;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const posA = getStartPosition(anchorA.anchor);
|
|
27
|
+
const posB = getStartPosition(anchorB.anchor);
|
|
28
|
+
return posA - posB;
|
|
29
|
+
},
|
|
30
|
+
});
|
|
@@ -4,18 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
import { pipe } from 'effect';
|
|
6
6
|
|
|
7
|
-
import { contributes, Capabilities, type
|
|
8
|
-
import { getSchemaTypename } from '@dxos/echo-schema';
|
|
7
|
+
import { contributes, Capabilities, type PluginContext, chain, createIntent } from '@dxos/app-framework';
|
|
9
8
|
import { SpaceAction, CollectionType } from '@dxos/plugin-space/types';
|
|
10
9
|
import { isSpace } from '@dxos/react-client/echo';
|
|
11
10
|
|
|
12
11
|
import translations from '../translations';
|
|
13
12
|
import { MarkdownAction, DocumentType } from '../types';
|
|
14
13
|
|
|
15
|
-
export default (context:
|
|
14
|
+
export default (context: PluginContext) =>
|
|
16
15
|
contributes(Capabilities.AppGraphSerializer, [
|
|
17
16
|
{
|
|
18
|
-
inputType:
|
|
17
|
+
inputType: DocumentType.typename,
|
|
19
18
|
outputType: 'text/markdown',
|
|
20
19
|
// Reconcile with metadata serializers.
|
|
21
20
|
serialize: async (node) => {
|
|
@@ -37,7 +36,7 @@ export default (context: PluginsContext) =>
|
|
|
37
36
|
return;
|
|
38
37
|
}
|
|
39
38
|
|
|
40
|
-
const { dispatchPromise: dispatch } = context.
|
|
39
|
+
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
41
40
|
const result = await dispatch(
|
|
42
41
|
pipe(
|
|
43
42
|
createIntent(MarkdownAction.Create, { spaceId: space.id, name: data.name, content: data.data }),
|