@dxos/plugin-illustrator 0.11.0 → 0.12.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d

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.
Files changed (148) hide show
  1. package/dist/lib/{chunk-Drawing.mjs → Drawing.mjs} +2 -2
  2. package/dist/lib/Drawing.mjs.map +1 -0
  3. package/dist/lib/{chunk-types.mjs → DrawingOperation.mjs} +6 -21
  4. package/dist/lib/DrawingOperation.mjs.map +1 -0
  5. package/dist/lib/{chunk-IllustratorCapabilities.mjs → IllustratorCapabilities.mjs} +5 -5
  6. package/dist/lib/IllustratorCapabilities.mjs.map +1 -0
  7. package/dist/lib/IllustratorEvents.mjs +15 -0
  8. package/dist/lib/IllustratorEvents.mjs.map +1 -0
  9. package/dist/lib/IllustratorPlugin.mjs +5 -9
  10. package/dist/lib/IllustratorPlugin.mjs.map +1 -1
  11. package/dist/lib/IllustratorPlugin.node.mjs +4 -4
  12. package/dist/lib/IllustratorPlugin.node.mjs.map +1 -1
  13. package/dist/lib/IllustratorPlugin.workerd.mjs +4 -4
  14. package/dist/lib/IllustratorPlugin.workerd.mjs.map +1 -1
  15. package/dist/lib/LegacySketch.mjs +21 -0
  16. package/dist/lib/LegacySketch.mjs.map +1 -0
  17. package/dist/lib/capabilities.mjs +17 -7
  18. package/dist/lib/capabilities.mjs.map +1 -1
  19. package/dist/lib/chunk-comment-config.mjs +6 -6
  20. package/dist/lib/chunk-comment-config.mjs.map +1 -1
  21. package/dist/lib/chunk-create-object.mjs +8 -8
  22. package/dist/lib/chunk-create-object.mjs.map +1 -1
  23. package/dist/lib/chunk-create.mjs +5 -5
  24. package/dist/lib/chunk-create.mjs.map +1 -1
  25. package/dist/lib/chunk-edit.mjs +2 -2
  26. package/dist/lib/chunk-edit.mjs.map +1 -1
  27. package/dist/lib/chunk-generate.mjs +2 -2
  28. package/dist/lib/chunk-generate.mjs.map +1 -1
  29. package/dist/lib/chunk-load-drawing.mjs +2 -2
  30. package/dist/lib/chunk-load-drawing.mjs.map +1 -1
  31. package/dist/lib/chunk-meta.mjs +1 -1
  32. package/dist/lib/chunk-meta.mjs.map +1 -1
  33. package/dist/lib/chunk-migrations.mjs +5 -5
  34. package/dist/lib/chunk-migrations.mjs.map +1 -1
  35. package/dist/lib/chunk-model.mjs +1 -1
  36. package/dist/lib/chunk-operation-handler.mjs +3 -2
  37. package/dist/lib/chunk-operation-handler.mjs.map +1 -1
  38. package/dist/lib/chunk-react-surface.mjs +4 -4
  39. package/dist/lib/chunk-react-surface.mjs.map +1 -1
  40. package/dist/lib/chunk-read.mjs +2 -2
  41. package/dist/lib/chunk-read.mjs.map +1 -1
  42. package/dist/lib/chunk-skill-definition.mjs +3 -3
  43. package/dist/lib/chunk-skill-definition.mjs.map +1 -1
  44. package/dist/lib/chunk-skills.mjs +6 -5
  45. package/dist/lib/chunk-skills.mjs.map +1 -1
  46. package/dist/lib/components.mjs +3 -3
  47. package/dist/lib/components.mjs.map +1 -1
  48. package/dist/lib/containers.mjs +3 -3
  49. package/dist/lib/containers.mjs.map +1 -1
  50. package/dist/lib/index.mjs +6 -4
  51. package/dist/lib/operations.mjs +9 -2
  52. package/dist/lib/operations.mjs.map +1 -1
  53. package/dist/lib/plugin.mjs +2 -3
  54. package/dist/lib/plugin.mjs.map +1 -1
  55. package/dist/lib/translations.mjs +2 -2
  56. package/dist/lib/translations.mjs.map +1 -1
  57. package/dist/types/src/IllustratorPlugin.d.ts +1 -1
  58. package/dist/types/src/IllustratorPlugin.d.ts.map +1 -1
  59. package/dist/types/src/IllustratorPlugin.node.d.ts +1 -1
  60. package/dist/types/src/IllustratorPlugin.node.d.ts.map +1 -1
  61. package/dist/types/src/IllustratorPlugin.workerd.d.ts +1 -1
  62. package/dist/types/src/IllustratorPlugin.workerd.d.ts.map +1 -1
  63. package/dist/types/src/capabilities/comment-config.d.ts +2 -2
  64. package/dist/types/src/capabilities/comment-config.d.ts.map +1 -1
  65. package/dist/types/src/capabilities/create-object.d.ts +2 -2
  66. package/dist/types/src/capabilities/create-object.d.ts.map +1 -1
  67. package/dist/types/src/capabilities/index.d.ts +7 -8
  68. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  69. package/dist/types/src/capabilities/migrations.d.ts +2 -2
  70. package/dist/types/src/capabilities/migrations.d.ts.map +1 -1
  71. package/dist/types/src/capabilities/operation-handler.d.ts +2 -3
  72. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -1
  73. package/dist/types/src/capabilities/react-surface.d.ts +2 -2
  74. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  75. package/dist/types/src/capabilities/skill-definition.d.ts +2 -2
  76. package/dist/types/src/capabilities/skill-definition.d.ts.map +1 -1
  77. package/dist/types/src/components/CreateDrawingPanel.d.ts +4 -4
  78. package/dist/types/src/components/CreateDrawingPanel.d.ts.map +1 -1
  79. package/dist/types/src/containers/DrawingArticle/DrawingArticle.d.ts +1 -1
  80. package/dist/types/src/containers/DrawingArticle/DrawingArticle.d.ts.map +1 -1
  81. package/dist/types/src/containers/DrawingCard/DrawingCard.d.ts +1 -1
  82. package/dist/types/src/containers/DrawingCard/DrawingCard.d.ts.map +1 -1
  83. package/dist/types/src/index.d.ts +5 -1
  84. package/dist/types/src/index.d.ts.map +1 -1
  85. package/dist/types/src/operations/create.d.ts +2 -2
  86. package/dist/types/src/operations/create.d.ts.map +1 -1
  87. package/dist/types/src/operations/edit.d.ts +2 -2
  88. package/dist/types/src/operations/edit.d.ts.map +1 -1
  89. package/dist/types/src/operations/generate.d.ts +2 -2
  90. package/dist/types/src/operations/generate.d.ts.map +1 -1
  91. package/dist/types/src/operations/index.d.ts +1 -1
  92. package/dist/types/src/operations/index.d.ts.map +1 -1
  93. package/dist/types/src/operations/read.d.ts +2 -2
  94. package/dist/types/src/operations/read.d.ts.map +1 -1
  95. package/dist/types/src/plugin.d.ts +1 -2
  96. package/dist/types/src/plugin.d.ts.map +1 -1
  97. package/dist/types/src/skills/drawing-skill.d.ts +1 -1
  98. package/dist/types/src/skills/drawing-skill.d.ts.map +1 -1
  99. package/dist/types/src/translations.d.ts.map +1 -1
  100. package/dist/types/src/types/DrawingOperation.d.ts +2 -2
  101. package/dist/types/src/types/DrawingOperation.d.ts.map +1 -1
  102. package/dist/types/src/types/IllustratorCapabilities.d.ts +47 -4
  103. package/dist/types/src/types/IllustratorCapabilities.d.ts.map +1 -1
  104. package/dist/types/src/types/IllustratorEvents.d.ts +8 -0
  105. package/dist/types/src/types/IllustratorEvents.d.ts.map +1 -0
  106. package/dist/types/src/util/load-drawing.d.ts +4 -4
  107. package/dist/types/src/util/load-drawing.d.ts.map +1 -1
  108. package/dist/types/tsconfig.tsbuildinfo +1 -1
  109. package/package.json +64 -31
  110. package/src/IllustratorPlugin.node.tsx +8 -7
  111. package/src/IllustratorPlugin.test.ts +2 -2
  112. package/src/IllustratorPlugin.tsx +19 -18
  113. package/src/IllustratorPlugin.workerd.tsx +5 -4
  114. package/src/capabilities/comment-config.ts +9 -7
  115. package/src/capabilities/create-object.ts +7 -5
  116. package/src/capabilities/index.ts +23 -10
  117. package/src/capabilities/migrations.test.ts +2 -1
  118. package/src/capabilities/migrations.ts +5 -4
  119. package/src/capabilities/operation-handler.ts +4 -4
  120. package/src/capabilities/react-surface.ts +4 -3
  121. package/src/capabilities/skill-definition.ts +3 -3
  122. package/src/components/CreateDrawingPanel.tsx +5 -4
  123. package/src/containers/DrawingArticle/DrawingArticle.tsx +3 -1
  124. package/src/containers/DrawingCard/DrawingCard.tsx +3 -1
  125. package/src/index.ts +5 -1
  126. package/src/meta.ts +1 -1
  127. package/src/operations/create.ts +5 -3
  128. package/src/operations/edit.ts +2 -2
  129. package/src/operations/generate.ts +2 -2
  130. package/src/operations/index.ts +10 -7
  131. package/src/operations/read.ts +2 -2
  132. package/src/plugin.ts +1 -3
  133. package/src/skills/drawing-skill.ts +3 -2
  134. package/src/translations.ts +2 -1
  135. package/src/types/DrawingOperation.ts +2 -2
  136. package/src/types/IllustratorCapabilities.ts +50 -4
  137. package/src/types/IllustratorEvents.ts +16 -0
  138. package/src/util/load-drawing.ts +4 -5
  139. package/dist/lib/chunk-Drawing.mjs.map +0 -1
  140. package/dist/lib/chunk-IllustratorCapabilities.mjs.map +0 -1
  141. package/dist/lib/chunk-types.mjs.map +0 -1
  142. package/dist/lib/types.mjs +0 -4
  143. package/dist/types/src/types/index.d.ts +0 -6
  144. package/dist/types/src/types/index.d.ts.map +0 -1
  145. package/dist/types/src/types/types.d.ts +0 -45
  146. package/dist/types/src/types/types.d.ts.map +0 -1
  147. package/src/types/index.ts +0 -10
  148. package/src/types/types.ts +0 -53
@@ -59,6 +59,6 @@ var make = ({ name, canvas }) => Obj.make(Drawing, {
59
59
  /** Type guard for {@link Drawing} objects. */
60
60
  var isDrawing = (object) => Obj.instanceOf(Drawing, object);
61
61
  //#endregion
62
- export { makeCanvas as a, make as i, Drawing as n, Drawing_exports as r, Canvas as t };
62
+ export { Canvas, Drawing, isCanvas, isDrawing, make, makeCanvas, Drawing_exports as t };
63
63
 
64
- //# sourceMappingURL=chunk-Drawing.mjs.map
64
+ //# sourceMappingURL=Drawing.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Drawing.mjs","names":[],"sources":["../../src/types/Drawing.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\n\nimport { Annotation, DXN, Obj, Ref, Type } from '@dxos/echo';\nimport { FormInputAnnotation, HiddenAnnotation, LabelAnnotation } from '@dxos/echo/Annotation';\nimport { CardAnnotation, CollectionItemAnnotation } from '@dxos/schema';\n\n/**\n * Canvas content shared by every renderer: an opaque map of record id → record, managed by the\n * renderer's store adapter and CRDT-merged by ECHO without knowing its shape. `schema` identifies\n * the renderer dialect (e.g. `tldraw.com/2`, `excalidraw.com/2`) and is how a `Drawing` is matched\n * to the variant that can render it.\n *\n * Hidden: reached through `Drawing.canvas`, never listed on its own.\n */\nexport class Canvas extends Type.makeObject<Canvas>(DXN.make('org.dxos.type.canvas', '0.1.0'))(\n Schema.Struct({\n schema: Schema.String.pipe(Schema.optional),\n content: Schema.Record({ key: Schema.String, value: Schema.Any }),\n }).pipe(HiddenAnnotation.set(true)),\n) {}\n\nexport type MakeCanvasOptions = Omit<Partial<Obj.MakeProps<typeof Canvas>>, 'schema'> & {\n /** Required at construction: matches the canvas to a renderer variant. */\n schema: string;\n};\n\n/** Creates a {@link Canvas} for the given renderer schema. */\nexport const makeCanvas = ({ schema, content = {} }: MakeCanvasOptions): Canvas =>\n Obj.make(Canvas, { schema, content });\n\n/** Type guard for {@link Canvas} objects. */\nexport const isCanvas = (object: unknown): object is Canvas => Obj.instanceOf(Canvas, object);\n\n/**\n * Base Drawing object. Renderer-specific behaviour lives in the variant that claims the canvas's\n * `schema`, so all renderers (tldraw, excalidraw, ...) share one typename, graph node, create\n * flow, and surface scaffolding.\n */\nexport class Drawing extends Type.makeObject<Drawing>(DXN.make('org.dxos.type.drawing', '0.1.0'))(\n Schema.Struct({\n name: Schema.optional(Schema.String),\n canvas: Ref.Ref(Canvas)\n .annotations({ description: 'Reference to the canvas holding the renderer-specific content.' })\n .pipe(FormInputAnnotation.set(false)),\n }).pipe(\n LabelAnnotation.set(['name']),\n Annotation.IconAnnotation.set({ icon: 'ph--compass-tool--regular', hue: 'indigo' }),\n CardAnnotation.set(true),\n CollectionItemAnnotation.set(true),\n ),\n) {}\n\n/**\n * Build a `Drawing` referencing the given canvas.\n *\n * @param name Optional display name shown in the graph node and Properties form.\n * @param canvas Canvas holding the renderer's content.\n */\nexport const make = ({ name, canvas }: { name?: string; canvas: Canvas }): Drawing =>\n Obj.make(Drawing, { name, canvas: Ref.make(canvas) });\n\n/** Type guard for {@link Drawing} objects. */\nexport const isDrawing = (object: unknown): object is Drawing => Obj.instanceOf(Drawing, object);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAoBA,IAAa,SAAb,cAA4B,KAAK,WAAmB,IAAI,KAAK,wBAAwB,OAAO,CAAC,CAAC,CAC5F,OAAO,OAAO;CACZ,QAAQ,OAAO,OAAO,KAAK,OAAO,QAAQ;CAC1C,SAAS,OAAO,OAAO;EAAE,KAAK,OAAO;EAAQ,OAAO,OAAO;CAAI,CAAC;AAClE,CAAC,CAAC,CAAC,KAAK,iBAAiB,IAAI,IAAI,CAAC,CACpC,CAAC,CAAC,CAAC;;AAQH,IAAa,cAAc,EAAE,QAAQ,UAAU,CAAC,QAC9C,IAAI,KAAK,QAAQ;CAAE;CAAQ;AAAQ,CAAC;;AAGtC,IAAa,YAAY,WAAsC,IAAI,WAAW,QAAQ,MAAM;;;;;;AAO5F,IAAa,UAAb,cAA6B,KAAK,WAAoB,IAAI,KAAK,yBAAyB,OAAO,CAAC,CAAC,CAC/F,OAAO,OAAO;CACZ,MAAM,OAAO,SAAS,OAAO,MAAM;CACnC,QAAQ,IAAI,IAAI,MAAM,CAAA,CACnB,YAAY,EAAE,aAAa,iEAAiE,CAAC,CAAA,CAC7F,KAAK,oBAAoB,IAAI,KAAK,CAAC;AACxC,CAAC,CAAC,CAAC,KACD,gBAAgB,IAAI,CAAC,MAAM,CAAC,GAC5B,WAAW,eAAe,IAAI;CAAE,MAAM;CAA6B,KAAK;AAAS,CAAC,GAClF,eAAe,IAAI,IAAI,GACvB,yBAAyB,IAAI,IAAI,CACnC,CACF,CAAC,CAAC,CAAC;;;;;;;AAQH,IAAa,QAAQ,EAAE,MAAM,aAC3B,IAAI,KAAK,SAAS;CAAE;CAAM,QAAQ,IAAI,KAAK,MAAM;AAAE,CAAC;;AAGtD,IAAa,aAAa,WAAuC,IAAI,WAAW,SAAS,MAAM"}
@@ -1,27 +1,12 @@
1
1
  import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
2
- import { n as Drawing, t as Canvas } from "./chunk-Drawing.mjs";
3
- import "./chunk-IllustratorCapabilities.mjs";
4
- import { Capability } from "@dxos/app-framework";
5
- import { DXN, Database, Ref, Type } from "@dxos/echo";
2
+ import { Drawing } from "./Drawing.mjs";
3
+ import { Database, Ref, Type } from "@dxos/echo";
6
4
  import * as Schema from "effect/Schema";
7
- import { Operation } from "@dxos/compute";
5
+ import * as Operation from "@dxos/compute/Operation";
6
+ import * as Capability from "@dxos/app-framework/Capability";
8
7
  import { DXN as DXN$1 } from "@dxos/keys";
9
8
  import { meta } from "#meta";
10
9
  import { Scene } from "#model";
11
- //#region src/types/LegacySketch.ts
12
- var LegacySketch_exports = /* @__PURE__ */ __exportAll({ Sketch: () => Sketch });
13
- /**
14
- * The pre-rename `Sketch` object, kept solely so `Migration.define` can read existing data and
15
- * convert it to {@link Drawing}. Never constructed by this plugin.
16
- *
17
- * Its canvas already points at `org.dxos.type.canvas` carrying `schema: 'tldraw.com/2'`, which is
18
- * exactly the base `Drawing.Canvas` — so only the wrapper needs migrating.
19
- */
20
- var Sketch = class extends Type.makeObject(DXN.make("org.dxos.type.sketch", "0.1.0"))(Schema.Struct({
21
- name: Schema.optional(Schema.String),
22
- canvas: Ref.Ref(Canvas)
23
- })) {};
24
- //#endregion
25
10
  //#region src/types/DrawingOperation.ts
26
11
  var DrawingOperation_exports = /* @__PURE__ */ __exportAll({
27
12
  Create: () => Create,
@@ -95,6 +80,6 @@ var Generate = Operation.make({
95
80
  services: [Capability.Service, Database.Service]
96
81
  });
97
82
  //#endregion
98
- export { Read as a, Generate as i, DrawingOperation_exports as n, LegacySketch_exports as o, Edit as r, Sketch as s, Create as t };
83
+ export { Create, Edit, Generate, Read, DrawingOperation_exports as t };
99
84
 
100
- //# sourceMappingURL=chunk-types.mjs.map
85
+ //# sourceMappingURL=DrawingOperation.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DrawingOperation.mjs","names":[],"sources":["../../src/types/DrawingOperation.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\n\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as Operation from '@dxos/compute/Operation';\nimport { Database, Ref, Type } from '@dxos/echo';\nimport { DXN } from '@dxos/keys';\n\nimport { meta } from '#meta';\nimport { Scene } from '#model';\n\nimport * as Drawing from './Drawing';\n\nconst makeKey = (name: string) => DXN.make(`${meta.profile.key}.operation.${name}`);\n\nexport const Create = Operation.make({\n meta: { key: makeKey('create'), name: 'Create Drawing', icon: 'ph--pencil-simple--regular' },\n input: Schema.Struct({\n name: Schema.optional(Schema.String),\n variant: Schema.optional(Schema.String).annotations({\n description: 'Variant id (canvas typename); defaults to the first registered variant.',\n }),\n }),\n output: Schema.Struct({\n object: Type.getSchema(Drawing.Drawing),\n }),\n services: [Capability.Service, Database.Service],\n});\n\n/** The scene as derived from the live canvas. */\nconst SceneOutput = {\n scene: Scene.Scene.annotations({ description: 'The diagram as world objects with object-local coordinates.' }),\n unmanaged: Schema.Number.annotations({\n description: 'Number of shapes on the canvas not managed by the DSL (drawn by users).',\n }),\n};\n\nexport const Read = Operation.make({\n meta: {\n key: makeKey('read'),\n name: 'Read Drawing',\n description:\n 'Returns the current scene of a drawing: world objects (by id) with their elements in object-local units. Call before editing an existing drawing.',\n icon: 'ph--eye--regular',\n },\n input: Schema.Struct({\n drawing: Ref.Ref(Drawing.Drawing).annotations({ description: 'The drawing to read.' }),\n }),\n output: Schema.Struct(SceneOutput),\n services: [Capability.Service, Database.Service],\n});\n\nexport const Edit = Operation.make({\n meta: {\n key: makeKey('edit'),\n name: 'Edit Drawing',\n description:\n 'Applies scene commands to a drawing: upsert/move/remove world objects or individual elements by id. Returns the resulting scene.',\n icon: 'ph--pencil-simple-line--regular',\n },\n input: Schema.Struct({\n drawing: Ref.Ref(Drawing.Drawing).annotations({ description: 'The drawing to edit.' }),\n commands: Schema.Array(Scene.Command).annotations({ description: 'Commands applied in order, atomically.' }),\n }),\n output: Schema.Struct({\n ...SceneOutput,\n upserted: Schema.Array(Schema.String).annotations({ description: 'Object ids created or modified.' }),\n removed: Schema.Number.annotations({ description: 'Number of shapes removed.' }),\n }),\n services: [Capability.Service, Database.Service],\n});\n\nexport const Generate = Operation.make({\n meta: {\n key: makeKey('generate'),\n name: 'Generate Drawing',\n description:\n 'Replaces a drawing with a diagram compiled from a mermaid flowchart description. The dialect owns layout, so no coordinates are supplied.',\n icon: 'ph--graph--regular',\n },\n input: Schema.Struct({\n drawing: Ref.Ref(Drawing.Drawing).annotations({ description: 'The drawing to generate into.' }),\n source: Schema.String.annotations({ description: 'Mermaid flowchart source.' }),\n }),\n output: Schema.Struct({\n ...SceneOutput,\n upserted: Schema.Array(Schema.String).annotations({ description: 'Object ids created or modified.' }),\n }),\n services: [Capability.Service, Database.Service],\n});\n"],"mappings":";;;;;;;;;;;;;;;;AAkBA,IAAM,WAAW,SAAiB,MAAI,KAAK,GAAG,KAAK,QAAQ,IAAI,aAAa,MAAM;AAElF,IAAa,SAAS,UAAU,KAAK;CACnC,MAAM;EAAE,KAAK,QAAQ,QAAQ;EAAG,MAAM;EAAkB,MAAM;CAA6B;CAC3F,OAAO,OAAO,OAAO;EACnB,MAAM,OAAO,SAAS,OAAO,MAAM;EACnC,SAAS,OAAO,SAAS,OAAO,MAAM,CAAC,CAAC,YAAY,EAClD,aAAa,0EACf,CAAC;CACH,CAAC;CACD,QAAQ,OAAO,OAAO,EACpB,QAAQ,KAAK,UAAU,OAAe,EACxC,CAAC;CACD,UAAU,CAAC,WAAW,SAAS,SAAS,OAAO;AACjD,CAAC;;AAGD,IAAM,cAAc;CAClB,OAAO,MAAM,MAAM,YAAY,EAAE,aAAa,8DAA8D,CAAC;CAC7G,WAAW,OAAO,OAAO,YAAY,EACnC,aAAa,0EACf,CAAC;AACH;AAEA,IAAa,OAAO,UAAU,KAAK;CACjC,MAAM;EACJ,KAAK,QAAQ,MAAM;EACnB,MAAM;EACN,aACE;EACF,MAAM;CACR;CACA,OAAO,OAAO,OAAO,EACnB,SAAS,IAAI,IAAI,OAAe,CAAC,CAAC,YAAY,EAAE,aAAa,uBAAuB,CAAC,EACvF,CAAC;CACD,QAAQ,OAAO,OAAO,WAAW;CACjC,UAAU,CAAC,WAAW,SAAS,SAAS,OAAO;AACjD,CAAC;AAED,IAAa,OAAO,UAAU,KAAK;CACjC,MAAM;EACJ,KAAK,QAAQ,MAAM;EACnB,MAAM;EACN,aACE;EACF,MAAM;CACR;CACA,OAAO,OAAO,OAAO;EACnB,SAAS,IAAI,IAAI,OAAe,CAAC,CAAC,YAAY,EAAE,aAAa,uBAAuB,CAAC;EACrF,UAAU,OAAO,MAAM,MAAM,OAAO,CAAC,CAAC,YAAY,EAAE,aAAa,yCAAyC,CAAC;CAC7G,CAAC;CACD,QAAQ,OAAO,OAAO;EACpB,GAAG;EACH,UAAU,OAAO,MAAM,OAAO,MAAM,CAAC,CAAC,YAAY,EAAE,aAAa,kCAAkC,CAAC;EACpG,SAAS,OAAO,OAAO,YAAY,EAAE,aAAa,4BAA4B,CAAC;CACjF,CAAC;CACD,UAAU,CAAC,WAAW,SAAS,SAAS,OAAO;AACjD,CAAC;AAED,IAAa,WAAW,UAAU,KAAK;CACrC,MAAM;EACJ,KAAK,QAAQ,UAAU;EACvB,MAAM;EACN,aACE;EACF,MAAM;CACR;CACA,OAAO,OAAO,OAAO;EACnB,SAAS,IAAI,IAAI,OAAe,CAAC,CAAC,YAAY,EAAE,aAAa,gCAAgC,CAAC;EAC9F,QAAQ,OAAO,OAAO,YAAY,EAAE,aAAa,4BAA4B,CAAC;CAChF,CAAC;CACD,QAAQ,OAAO,OAAO;EACpB,GAAG;EACH,UAAU,OAAO,MAAM,OAAO,MAAM,CAAC,CAAC,YAAY,EAAE,aAAa,kCAAkC,CAAC;CACtG,CAAC;CACD,UAAU,CAAC,WAAW,SAAS,SAAS,OAAO;AACjD,CAAC"}
@@ -1,16 +1,16 @@
1
1
  import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
2
- import { Capability } from "@dxos/app-framework";
2
+ import * as Capability from "@dxos/app-framework/Capability";
3
3
  import { meta } from "#meta";
4
4
  //#region src/types/IllustratorCapabilities.ts
5
5
  var IllustratorCapabilities_exports = /* @__PURE__ */ __exportAll({ VariantProvider: () => VariantProvider });
6
6
  /**
7
7
  * A drawing variant contribution. Each renderer plugin (tldraw, excalidraw, ...) contributes one
8
- * via `Capability.contributes(IllustratorCapabilities.VariantProvider, variant)`.
8
+ * via `Capability.contribute(IllustratorCapabilities.VariantProvider, variant)`.
9
9
  * Consumers iterate via `Capability.getAll(IllustratorCapabilities.VariantProvider)` (Effect) or
10
10
  * `useCapabilities(IllustratorCapabilities.VariantProvider)` (React).
11
11
  */
12
- var VariantProvider = Capability.make(`${meta.profile.key}.capability.variant`);
12
+ var VariantProvider = Capability.make()(`${meta.profile.key}.capability.variant`);
13
13
  //#endregion
14
- export { VariantProvider as n, IllustratorCapabilities_exports as t };
14
+ export { VariantProvider, IllustratorCapabilities_exports as t };
15
15
 
16
- //# sourceMappingURL=chunk-IllustratorCapabilities.mjs.map
16
+ //# sourceMappingURL=IllustratorCapabilities.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IllustratorCapabilities.mjs","names":[],"sources":["../../src/types/IllustratorCapabilities.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport type * as Effect from 'effect/Effect';\nimport type { ComponentType } from 'react';\n\nimport * as Capability from '@dxos/app-framework/Capability';\nimport type { Database, Obj, Type } from '@dxos/echo';\n\nimport { meta } from '#meta';\nimport { type DrawingBuilder } from '#model';\n\nimport type * as Drawing from './Drawing';\n\n/**\n * A drawing variant contribution. Each renderer plugin (tldraw, excalidraw, ...) contributes one\n * via `Capability.contribute(IllustratorCapabilities.VariantProvider, variant)`.\n * Consumers iterate via `Capability.getAll(IllustratorCapabilities.VariantProvider)` (Effect) or\n * `useCapabilities(IllustratorCapabilities.VariantProvider)` (React).\n */\nexport const VariantProvider = Capability.make<DrawingVariant>()(`${meta.profile.key}.capability.variant`);\n\n/**\n * Contribution from a renderer plugin (e.g. plugin-tldraw, plugin-excalidraw).\n * Defines how a drawing variant is created, rendered, and how the scene DSL maps onto it.\n */\nexport type DrawingVariant = {\n /** Renderer dialect claimed by this variant; matched against `Canvas.schema` (e.g. 'tldraw.com/2'). */\n id: string;\n /** Human-readable variant name (e.g. 'tldraw'). */\n label: string;\n /** Optional Phosphor icon name (e.g. 'ph--compass-tool--regular'). */\n icon?: string;\n /**\n * Canvas type, when the renderer extends the base `Drawing.Canvas` with its own fields.\n * Omit to use the base type — the common case, since `schema` already discriminates.\n */\n canvasType?: Type.AnyObj;\n /** Build an empty canvas. Defaults to a base `Drawing.Canvas` stamped with `id` as its schema. */\n createCanvas?: (input?: Record<string, any>) => Effect.Effect<Drawing.Canvas, Error, Database.Service>;\n /** Maps the scene DSL onto this variant's canvas records. */\n builder: DrawingBuilder;\n /** Optional Card surface component for this variant. */\n card?: ComponentType<DrawingVariantSurfaceProps>;\n /** Optional Article/Section/Slide surface component for this variant. */\n article?: ComponentType<DrawingVariantSurfaceProps>;\n};\n\nexport type DrawingVariantSurfaceProps = {\n /** The base Drawing object (may be a snapshot from useObject/Surface). */\n drawing: Obj.Snapshot<Drawing.Drawing> | Drawing.Drawing;\n /** The resolved LIVE canvas object — variant store adapters need `Doc.createAccessor`. */\n canvas: Drawing.Canvas;\n /** Surface role passed through from the host. */\n role?: string;\n /** Attendable id passed through from the host. */\n attendableId?: string;\n /** Card surfaces: whether the card is editable. */\n editable?: boolean;\n /** Section surfaces: whether the embed is extrinsically sized. */\n extrinsic?: boolean;\n};\n"],"mappings":";;;;;;;;;;;AAuBA,IAAa,kBAAkB,WAAW,KAAqB,CAAC,CAAC,GAAG,KAAK,QAAQ,IAAI,oBAAoB"}
@@ -0,0 +1,15 @@
1
+ import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
2
+ import { meta } from "#meta";
3
+ import * as ActivationEvent from "@dxos/app-framework/ActivationEvent";
4
+ //#region src/types/IllustratorEvents.ts
5
+ var IllustratorEvents_exports = /* @__PURE__ */ __exportAll({ Start: () => Start });
6
+ /**
7
+ * The feature's start event: the plugin's start-gated modules (and cross-plugin
8
+ * contributions consumed by this feature) activate here. Fired on demand and by the
9
+ * host's idle trickle.
10
+ */
11
+ var Start = ActivationEvent.pluginStart(meta.profile.key);
12
+ //#endregion
13
+ export { Start, IllustratorEvents_exports as t };
14
+
15
+ //# sourceMappingURL=IllustratorEvents.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IllustratorEvents.mjs","names":[],"sources":["../../src/types/IllustratorEvents.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as ActivationEvent from '@dxos/app-framework/ActivationEvent';\n\nimport { meta } from '#meta';\n\n/**\n * The feature's start event: the plugin's start-gated modules (and cross-plugin\n * contributions consumed by this feature) activate here. Fired on demand and by the\n * host's idle trickle.\n */\nexport const Start = ActivationEvent.pluginStart(meta.profile.key);\n"],"mappings":";;;;;;;;;;AAeA,IAAa,QAAQ,gBAAgB,YAAY,KAAK,QAAQ,GAAG"}
@@ -1,21 +1,17 @@
1
- import { Plugin } from "@dxos/app-framework";
2
- import { Drawing } from "#types";
1
+ import { Canvas, Drawing } from "./Drawing.mjs";
2
+ import * as Plugin from "@dxos/app-framework/Plugin";
3
3
  import { meta } from "#meta";
4
- import { AppPlugin } from "@dxos/app-toolkit";
5
- import { ClientEvents } from "@dxos/plugin-client";
4
+ import * as AppCapability from "@dxos/app-toolkit/AppCapability";
6
5
  import { CommentConfig, CreateObject, Migrations, OperationHandler, ReactSurface, SkillDefinition } from "#capabilities";
7
6
  import { translations } from "#translations";
8
7
  //#endregion
9
8
  //#region src/IllustratorPlugin.tsx
10
- var IllustratorPlugin = Plugin.define(meta).pipe(Plugin.addModule({
11
- activatesOn: ClientEvents.SetupMigration,
12
- activate: Migrations
13
- }), AppPlugin.addCommentConfigModule({ activate: CommentConfig }), AppPlugin.addCreateObjectModule({ activate: CreateObject }), AppPlugin.addOperationHandlerModule({ activate: OperationHandler }), AppPlugin.addSchemaModule({ schema: [Drawing.Drawing, Drawing.Canvas] }), AppPlugin.addSkillDefinitionModule({ activate: SkillDefinition }), AppPlugin.addSurfaceModule({ activate: ReactSurface }), AppPlugin.addTranslationsModule({ translations }), AppPlugin.addPluginAssetModule({ asset: {
9
+ var IllustratorPlugin = Plugin.define(meta).pipe(Plugin.addModule(Migrations), Plugin.addModule(CommentConfig), Plugin.addModule(CreateObject), Plugin.addModule(OperationHandler), Plugin.addModule(AppCapability.schema([Drawing, Canvas])), Plugin.addModule(SkillDefinition), Plugin.addModule(ReactSurface), Plugin.addModule(AppCapability.translations(translations)), Plugin.addModule(AppCapability.pluginAsset({
14
10
  pluginId: meta.profile.key,
15
11
  path: "PLUGIN.mdl",
16
12
  content: "---\nid: org.dxos.plugin.illustrator\nname: IllustratorPlugin\nversion: 0.1.0\n---\n\nA headless diagramming host plugin for `DXOS` Composer. Owns the base `Sketch` ECHO type, the\nrenderer-neutral scene DSL and dialect registry, and the agent-facing sketch skill/operations.\nCanvas renderers (e.g. plugin-tldraw, plugin-excalidraw) contribute a `SketchVariant` capability\nsupplying their canvas schema, a builder that maps the scene DSL onto their records, and surface\ncomponents; plugin-illustrator resolves the variant at runtime and delegates.\n\n## Extensions\n\nThe following extension dialects are used in this document.\nEach extension is defined in the Appendix or resolved via its URI.\n\n| Term | URI |\n|-------------|--------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `test` | `org.dxos.mdl.test@1.0` |\n| `component` | `org.dxos.mdl.component@1.0` |\n| `op` | `org.dxos.mdl.op@1.0` |\n\n## Types\n\n```mdl\ntype Sketch\n desc: Named handle around a renderer-specific canvas object.\n fields:\n name?: string\n canvas: Ref<Unknown> # reference to the renderer-specific canvas (e.g. Tldraw.Canvas)\n```\n\n## Capabilities\n\n```mdl\ncomponent VariantProvider\n desc: Contributed by renderer plugins; supplies the canvas type, a scene-DSL builder\n (read/apply), a create factory, and Article/Card surface components.\n```\n\n## Operations\n\n```mdl\nop create\n desc: Creates a Sketch with an empty canvas for the requested (or default) variant.\n\nop read\n desc: Returns the current scene of a sketch as world objects with object-local coordinates.\n\nop edit\n desc: Applies scene commands to a sketch via the variant's builder; returns the resulting scene.\n```\n",
17
13
  mimeType: "application/x-mdl"
18
- } }), Plugin.make);
14
+ })), Plugin.make);
19
15
  //#endregion
20
16
  export { IllustratorPlugin, IllustratorPlugin as default };
21
17
 
@@ -1 +1 @@
1
- {"version":3,"file":"IllustratorPlugin.mjs","names":[],"sources":["../../src/IllustratorPlugin.tsx"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { ClientEvents } from '@dxos/plugin-client';\n\nimport {\n CommentConfig,\n CreateObject,\n Migrations,\n OperationHandler,\n ReactSurface,\n SkillDefinition,\n} from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\nimport { Drawing } from '#types';\n\n// eslint-disable-next-line import/no-relative-packages\nimport pluginSpec from '../PLUGIN.mdl?raw';\n\nexport const IllustratorPlugin = Plugin.define(meta).pipe(\n Plugin.addModule({\n activatesOn: ClientEvents.SetupMigration,\n activate: Migrations,\n }),\n AppPlugin.addCommentConfigModule({ activate: CommentConfig }),\n AppPlugin.addCreateObjectModule({ activate: CreateObject }),\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n AppPlugin.addSchemaModule({ schema: [Drawing.Drawing, Drawing.Canvas] }),\n AppPlugin.addSkillDefinitionModule({ activate: SkillDefinition }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n AppPlugin.addPluginAssetModule({\n asset: { pluginId: meta.profile.key, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },\n }),\n Plugin.make,\n);\n\nexport default IllustratorPlugin;\n"],"mappings":";;;;;;;;;AAuBA,IAAa,oBAAoB,OAAO,OAAO,IAAI,CAAC,CAAC,KACnD,OAAO,UAAU;CACf,aAAa,aAAa;CAC1B,UAAU;AACZ,CAAC,GACD,UAAU,uBAAuB,EAAE,UAAU,cAAc,CAAC,GAC5D,UAAU,sBAAsB,EAAE,UAAU,aAAa,CAAC,GAC1D,UAAU,0BAA0B,EAAE,UAAU,iBAAiB,CAAC,GAClE,UAAU,gBAAgB,EAAE,QAAQ,CAAC,QAAQ,SAAS,QAAQ,MAAM,EAAE,CAAC,GACvE,UAAU,yBAAyB,EAAE,UAAU,gBAAgB,CAAC,GAChE,UAAU,iBAAiB,EAAE,UAAU,aAAa,CAAC,GACrD,UAAU,sBAAsB,EAAE,aAAa,CAAC,GAChD,UAAU,qBAAqB,EAC7B,OAAO;CAAE,UAAU,KAAK,QAAQ;CAAK,MAAM;CAAc,SAAS;CAAY,UAAU;AAAoB,EAC9G,CAAC,GACD,OAAO,IACT"}
1
+ {"version":3,"file":"IllustratorPlugin.mjs","names":[],"sources":["../../src/IllustratorPlugin.tsx"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Plugin from '@dxos/app-framework/Plugin';\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\n\nimport {\n CommentConfig,\n CreateObject,\n Migrations,\n OperationHandler,\n ReactSurface,\n SkillDefinition,\n} from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\n// eslint-disable-next-line import/no-relative-packages\nimport pluginSpec from '../PLUGIN.mdl?raw';\nimport * as Drawing from './types/Drawing';\n\nexport const IllustratorPlugin = Plugin.define(meta).pipe(\n Plugin.addModule(Migrations),\n Plugin.addModule(CommentConfig),\n Plugin.addModule(CreateObject),\n Plugin.addModule(OperationHandler),\n Plugin.addModule(AppCapability.schema([Drawing.Drawing, Drawing.Canvas])),\n Plugin.addModule(SkillDefinition),\n Plugin.addModule(ReactSurface),\n Plugin.addModule(AppCapability.translations(translations)),\n Plugin.addModule(\n AppCapability.pluginAsset({\n pluginId: meta.profile.key,\n path: 'PLUGIN.mdl',\n content: pluginSpec,\n mimeType: 'application/x-mdl',\n }),\n ),\n Plugin.make,\n);\n\nexport default IllustratorPlugin;\n"],"mappings":";;;;;;;;AAsBA,IAAa,oBAAoB,OAAO,OAAO,IAAI,CAAC,CAAC,KACnD,OAAO,UAAU,UAAU,GAC3B,OAAO,UAAU,aAAa,GAC9B,OAAO,UAAU,YAAY,GAC7B,OAAO,UAAU,gBAAgB,GACjC,OAAO,UAAU,cAAc,OAAO,CAAC,SAAiB,MAAc,CAAC,CAAC,GACxE,OAAO,UAAU,eAAe,GAChC,OAAO,UAAU,YAAY,GAC7B,OAAO,UAAU,cAAc,aAAa,YAAY,CAAC,GACzD,OAAO,UACL,cAAc,YAAY;CACxB,UAAU,KAAK,QAAQ;CACvB,MAAM;CACN,SAAS;CACT,UAAU;AACZ,CAAC,CACH,GACA,OAAO,IACT"}
@@ -1,7 +1,7 @@
1
- import { Plugin } from "@dxos/app-framework";
2
- import { Drawing } from "#types";
1
+ import { Canvas, Drawing } from "./Drawing.mjs";
2
+ import * as Plugin from "@dxos/app-framework/Plugin";
3
3
  import { meta } from "#meta";
4
- import { AppPlugin } from "@dxos/app-toolkit";
4
+ import * as AppCapability from "@dxos/app-toolkit/AppCapability";
5
5
  import { OperationHandler, SkillDefinition } from "#capabilities";
6
6
  import { translations } from "#translations";
7
7
  //#region src/IllustratorPlugin.node.tsx
@@ -11,7 +11,7 @@ import { translations } from "#translations";
11
11
  * the full variant lazy-loads `CreateDrawingPanel` from `react-ui-search` which
12
12
  * downstream bundlers don't resolve cleanly under nested pnpm symlinks.
13
13
  */
14
- var IllustratorPlugin = Plugin.define(meta).pipe(AppPlugin.addOperationHandlerModule({ activate: OperationHandler }), AppPlugin.addSchemaModule({ schema: [Drawing.Drawing, Drawing.Canvas] }), AppPlugin.addSkillDefinitionModule({ activate: SkillDefinition }), AppPlugin.addTranslationsModule({ translations }), Plugin.make);
14
+ var IllustratorPlugin = Plugin.define(meta).pipe(Plugin.addModule(OperationHandler), Plugin.addModule(AppCapability.schema([Drawing, Canvas])), Plugin.addModule(SkillDefinition), Plugin.addModule(AppCapability.translations(translations)), Plugin.make);
15
15
  //#endregion
16
16
  export { IllustratorPlugin, IllustratorPlugin as default };
17
17
 
@@ -1 +1 @@
1
- {"version":3,"file":"IllustratorPlugin.node.mjs","names":[],"sources":["../../src/IllustratorPlugin.node.tsx"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\n\nimport { OperationHandler, SkillDefinition } from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\nimport { Drawing } from '#types';\n\n/**\n * Headless variant of IllustratorPlugin (no React surfaces / CreateObject panel).\n * Used in node contexts (CLI, agents, tests) where rendering is unavailable —\n * the full variant lazy-loads `CreateDrawingPanel` from `react-ui-search` which\n * downstream bundlers don't resolve cleanly under nested pnpm symlinks.\n */\nexport const IllustratorPlugin = Plugin.define(meta).pipe(\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n AppPlugin.addSchemaModule({ schema: [Drawing.Drawing, Drawing.Canvas] }),\n AppPlugin.addSkillDefinitionModule({ activate: SkillDefinition }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.make,\n);\n\nexport default IllustratorPlugin;\n"],"mappings":";;;;;;;;;;;;;AAkBA,IAAa,oBAAoB,OAAO,OAAO,IAAI,CAAC,CAAC,KACnD,UAAU,0BAA0B,EAAE,UAAU,iBAAiB,CAAC,GAClE,UAAU,gBAAgB,EAAE,QAAQ,CAAC,QAAQ,SAAS,QAAQ,MAAM,EAAE,CAAC,GACvE,UAAU,yBAAyB,EAAE,UAAU,gBAAgB,CAAC,GAChE,UAAU,sBAAsB,EAAE,aAAa,CAAC,GAChD,OAAO,IACT"}
1
+ {"version":3,"file":"IllustratorPlugin.node.mjs","names":[],"sources":["../../src/IllustratorPlugin.node.tsx"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Plugin from '@dxos/app-framework/Plugin';\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\n\nimport { OperationHandler, SkillDefinition } from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\nimport * as Drawing from './types/Drawing';\n\n/**\n * Headless variant of IllustratorPlugin (no React surfaces / CreateObject panel).\n * Used in node contexts (CLI, agents, tests) where rendering is unavailable —\n * the full variant lazy-loads `CreateDrawingPanel` from `react-ui-search` which\n * downstream bundlers don't resolve cleanly under nested pnpm symlinks.\n */\nexport const IllustratorPlugin = Plugin.define(meta).pipe(\n Plugin.addModule(OperationHandler),\n Plugin.addModule(AppCapability.schema([Drawing.Drawing, Drawing.Canvas])),\n Plugin.addModule(SkillDefinition),\n Plugin.addModule(AppCapability.translations(translations)),\n Plugin.make,\n);\n\nexport default IllustratorPlugin;\n"],"mappings":";;;;;;;;;;;;;AAmBA,IAAa,oBAAoB,OAAO,OAAO,IAAI,CAAC,CAAC,KACnD,OAAO,UAAU,gBAAgB,GACjC,OAAO,UAAU,cAAc,OAAO,CAAC,SAAiB,MAAc,CAAC,CAAC,GACxE,OAAO,UAAU,eAAe,GAChC,OAAO,UAAU,cAAc,aAAa,YAAY,CAAC,GACzD,OAAO,IACT"}
@@ -1,9 +1,9 @@
1
- import { Plugin } from "@dxos/app-framework";
2
- import { Drawing } from "#types";
1
+ import { Canvas, Drawing } from "./Drawing.mjs";
2
+ import * as Plugin from "@dxos/app-framework/Plugin";
3
3
  import { meta } from "#meta";
4
- import { AppPlugin } from "@dxos/app-toolkit";
4
+ import * as AppCapability from "@dxos/app-toolkit/AppCapability";
5
5
  //#region src/IllustratorPlugin.workerd.tsx
6
- var IllustratorPlugin = Plugin.define(meta).pipe(AppPlugin.addSchemaModule({ schema: [Drawing.Drawing, Drawing.Canvas] }), Plugin.make);
6
+ var IllustratorPlugin = Plugin.define(meta).pipe(Plugin.addModule(AppCapability.schema([Drawing, Canvas])), Plugin.make);
7
7
  //#endregion
8
8
  export { IllustratorPlugin, IllustratorPlugin as default };
9
9
 
@@ -1 +1 @@
1
- {"version":3,"file":"IllustratorPlugin.workerd.mjs","names":[],"sources":["../../src/IllustratorPlugin.workerd.tsx"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\n\nimport { meta } from '#meta';\nimport { Drawing } from '#types';\n\nexport const IllustratorPlugin = Plugin.define(meta).pipe(\n AppPlugin.addSchemaModule({ schema: [Drawing.Drawing, Drawing.Canvas] }),\n Plugin.make,\n);\n\nexport default IllustratorPlugin;\n"],"mappings":";;;;;AAUA,IAAa,oBAAoB,OAAO,OAAO,IAAI,CAAC,CAAC,KACnD,UAAU,gBAAgB,EAAE,QAAQ,CAAC,QAAQ,SAAS,QAAQ,MAAM,EAAE,CAAC,GACvE,OAAO,IACT"}
1
+ {"version":3,"file":"IllustratorPlugin.workerd.mjs","names":[],"sources":["../../src/IllustratorPlugin.workerd.tsx"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Plugin from '@dxos/app-framework/Plugin';\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\n\nimport { meta } from '#meta';\n\nimport * as Drawing from './types/Drawing';\n\nexport const IllustratorPlugin = Plugin.define(meta).pipe(\n Plugin.addModule(AppCapability.schema([Drawing.Drawing, Drawing.Canvas])),\n Plugin.make,\n);\n\nexport default IllustratorPlugin;\n"],"mappings":";;;;;AAWA,IAAa,oBAAoB,OAAO,OAAO,IAAI,CAAC,CAAC,KACnD,OAAO,UAAU,cAAc,OAAO,CAAC,SAAiB,MAAc,CAAC,CAAC,GACxE,OAAO,IACT"}
@@ -0,0 +1,21 @@
1
+ import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
2
+ import { Canvas } from "./Drawing.mjs";
3
+ import { DXN, Ref, Type } from "@dxos/echo";
4
+ import * as Schema from "effect/Schema";
5
+ //#region src/types/LegacySketch.ts
6
+ var LegacySketch_exports = /* @__PURE__ */ __exportAll({ Sketch: () => Sketch });
7
+ /**
8
+ * The pre-rename `Sketch` object, kept solely so `Migration.define` can read existing data and
9
+ * convert it to {@link Drawing}. Never constructed by this plugin.
10
+ *
11
+ * Its canvas already points at `org.dxos.type.canvas` carrying `schema: 'tldraw.com/2'`, which is
12
+ * exactly the base `Drawing.Canvas` — so only the wrapper needs migrating.
13
+ */
14
+ var Sketch = class extends Type.makeObject(DXN.make("org.dxos.type.sketch", "0.1.0"))(Schema.Struct({
15
+ name: Schema.optional(Schema.String),
16
+ canvas: Ref.Ref(Canvas)
17
+ })) {};
18
+ //#endregion
19
+ export { Sketch, LegacySketch_exports as t };
20
+
21
+ //# sourceMappingURL=LegacySketch.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LegacySketch.mjs","names":[],"sources":["../../src/types/LegacySketch.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\n\nimport { DXN, Ref, Type } from '@dxos/echo';\n\nimport * as Drawing from './Drawing';\n\n/**\n * The pre-rename `Sketch` object, kept solely so `Migration.define` can read existing data and\n * convert it to {@link Drawing}. Never constructed by this plugin.\n *\n * Its canvas already points at `org.dxos.type.canvas` carrying `schema: 'tldraw.com/2'`, which is\n * exactly the base `Drawing.Canvas` — so only the wrapper needs migrating.\n */\nexport class Sketch extends Type.makeObject<Sketch>(DXN.make('org.dxos.type.sketch', '0.1.0'))(\n Schema.Struct({\n name: Schema.optional(Schema.String),\n canvas: Ref.Ref(Drawing.Canvas),\n }),\n) {}\n"],"mappings":";;;;;;;;;;;;;AAmBA,IAAa,SAAb,cAA4B,KAAK,WAAmB,IAAI,KAAK,wBAAwB,OAAO,CAAC,CAAC,CAC5F,OAAO,OAAO;CACZ,MAAM,OAAO,SAAS,OAAO,MAAM;CACnC,QAAQ,IAAI,IAAI,MAAc;AAChC,CAAC,CACH,CAAC,CAAC,CAAC"}
@@ -1,11 +1,21 @@
1
- import { Capability } from "@dxos/app-framework";
1
+ import { Start } from "./IllustratorEvents.mjs";
2
+ import * as Capability from "@dxos/app-framework/Capability";
3
+ import * as AppCapability from "@dxos/app-toolkit/AppCapability";
4
+ import * as ActivationEvents from "@dxos/app-framework/ActivationEvents";
5
+ import * as ClientCapabilities from "@dxos/plugin-client/ClientCapabilities";
6
+ import * as SpaceCapability from "@dxos/plugin-space/SpaceCapability";
2
7
  //#region src/capabilities/index.ts
3
- var CommentConfig = Capability.lazy("CommentConfig", () => import("./chunk-comment-config.mjs"));
4
- var CreateObject = Capability.lazy("CreateObject", () => import("./chunk-create-object.mjs"));
5
- var Migrations = Capability.lazy("IllustratorMigrations", () => import("./chunk-migrations.mjs"));
6
- var OperationHandler = Capability.lazy("OperationHandler", () => import("./chunk-operation-handler.mjs"));
7
- var ReactSurface = Capability.lazy("ReactSurface", () => import("./chunk-react-surface.mjs"));
8
- var SkillDefinition = Capability.lazy("SkillDefinition", () => import("./chunk-skill-definition.mjs"));
8
+ var CommentConfig = AppCapability.commentConfig(() => import("./chunk-comment-config.mjs"), { activatesOn: Start });
9
+ var CreateObject = SpaceCapability.createObject(() => import("./chunk-create-object.mjs"));
10
+ var Migrations = Capability.lazyModule("IllustratorMigrations", { provides: [ClientCapabilities.Migration] }, () => import("./chunk-migrations.mjs"));
11
+ var OperationHandler = AppCapability.operationHandler(() => import("./chunk-operation-handler.mjs"), { activatesOn: ActivationEvents.Idle });
12
+ var ReactSurface = AppCapability.surface(() => import("./chunk-react-surface.mjs"), { roles: [
13
+ "org.dxos.role.article",
14
+ "org.dxos.role.cardContent",
15
+ "org.dxos.role.section",
16
+ "org.dxos.role.slide"
17
+ ] });
18
+ var SkillDefinition = AppCapability.skillDefinition(() => import("./chunk-skill-definition.mjs"));
9
19
  //#endregion
10
20
  export { CommentConfig, CreateObject, Migrations, OperationHandler, ReactSurface, SkillDefinition };
11
21
 
@@ -1 +1 @@
1
- {"version":3,"file":"capabilities.mjs","names":[],"sources":["../../src/capabilities/index.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\nimport { OperationHandlerSet } from '@dxos/compute';\n\nexport const CommentConfig = Capability.lazy('CommentConfig', () => import('./comment-config'));\nexport const CreateObject = Capability.lazy('CreateObject', () => import('./create-object'));\nexport const Migrations = Capability.lazy('IllustratorMigrations', () => import('./migrations'));\nexport const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(\n 'OperationHandler',\n () => import('./operation-handler'),\n);\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\nexport const SkillDefinition = Capability.lazy('SkillDefinition', () => import('./skill-definition'));\n"],"mappings":";;AAOA,IAAa,gBAAgB,WAAW,KAAK,uBAAuB,OAAO,6BAAmB;AAC9F,IAAa,eAAe,WAAW,KAAK,sBAAsB,OAAO,4BAAkB;AAC3F,IAAa,aAAa,WAAW,KAAK,+BAA+B,OAAO,yBAAe;AAC/F,IAAa,mBAAmB,WAAW,KACzC,0BACM,OAAO,gCACf;AACA,IAAa,eAAe,WAAW,KAAK,sBAAsB,OAAO,4BAAkB;AAC3F,IAAa,kBAAkB,WAAW,KAAK,yBAAyB,OAAO,+BAAqB"}
1
+ {"version":3,"file":"capabilities.mjs","names":[],"sources":["../../src/capabilities/index.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as ActivationEvents from '@dxos/app-framework/ActivationEvents';\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\nimport * as ClientCapabilities from '@dxos/plugin-client/ClientCapabilities';\nimport * as SpaceCapability from '@dxos/plugin-space/SpaceCapability';\n\nimport * as IllustratorEvents from '../types/IllustratorEvents';\n\nexport const CommentConfig = AppCapability.commentConfig(() => import('./comment-config'), {\n activatesOn: IllustratorEvents.Start,\n});\nexport const CreateObject = SpaceCapability.createObject(() => import('./create-object'));\n// Migration providers stay eager: a migration missing when a space opens is a data hazard.\nexport const Migrations = Capability.lazyModule(\n 'IllustratorMigrations',\n { provides: [ClientCapabilities.Migration] },\n () => import('./migrations'),\n);\nexport const OperationHandler = AppCapability.operationHandler(() => import('./operation-handler'), {\n activatesOn: ActivationEvents.Idle,\n});\nexport const ReactSurface = AppCapability.surface(() => import('./react-surface'), {\n roles: ['org.dxos.role.article', 'org.dxos.role.cardContent', 'org.dxos.role.section', 'org.dxos.role.slide'],\n});\nexport const SkillDefinition = AppCapability.skillDefinition(() => import('./skill-definition'));\n"],"mappings":";;;;;;;AAYA,IAAa,gBAAgB,cAAc,oBAAoB,OAAO,+BAAqB,EACzF,aAAa,MACf,CAAC;AACD,IAAa,eAAe,gBAAgB,mBAAmB,OAAO,4BAAkB;AAExF,IAAa,aAAa,WAAW,WACnC,yBACA,EAAE,UAAU,CAAC,mBAAmB,SAAS,EAAE,SACrC,OAAO,yBACf;AACA,IAAa,mBAAmB,cAAc,uBAAuB,OAAO,kCAAwB,EAClG,aAAa,iBAAiB,KAChC,CAAC;AACD,IAAa,eAAe,cAAc,cAAc,OAAO,8BAAoB,EACjF,OAAO;CAAC;CAAyB;CAA6B;CAAyB;AAAqB,EAC9G,CAAC;AACD,IAAa,kBAAkB,cAAc,sBAAsB,OAAO,+BAAqB"}
@@ -1,14 +1,14 @@
1
- import { Capability } from "@dxos/app-framework";
1
+ import { Drawing } from "./Drawing.mjs";
2
2
  import { Type } from "@dxos/echo";
3
3
  import * as Effect from "effect/Effect";
4
- import { Drawing } from "#types";
5
- import { AppCapabilities } from "@dxos/app-toolkit";
4
+ import * as Capability from "@dxos/app-framework/Capability";
5
+ import * as AppCapabilities from "@dxos/app-toolkit/AppCapabilities";
6
6
  //#region src/capabilities/comment-config.ts
7
7
  var activate = Effect.fnUntraced(function* () {
8
- return Capability.contributes(AppCapabilities.CommentConfig, {
9
- id: Type.getTypename(Drawing.Drawing),
8
+ return [Capability.contribute(AppCapabilities.CommentConfig, {
9
+ id: Type.getTypename(Drawing),
10
10
  comments: "unanchored"
11
- });
11
+ })];
12
12
  });
13
13
  //#endregion
14
14
  export { activate as default };
@@ -1 +1 @@
1
- {"version":3,"file":"chunk-comment-config.mjs","names":[],"sources":["../../src/capabilities/comment-config.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppCapabilities } from '@dxos/app-toolkit';\nimport { Type } from '@dxos/echo';\n\nimport { Drawing } from '#types';\n\nconst activate = Effect.fnUntraced(function* () {\n return Capability.contributes(AppCapabilities.CommentConfig, {\n id: Type.getTypename(Drawing.Drawing),\n comments: 'unanchored',\n });\n});\n\nexport default activate;\n"],"mappings":";;;;;;AAYA,IAAM,WAAW,OAAO,WAAW,aAAa;CAC9C,OAAO,WAAW,YAAY,gBAAgB,eAAe;EAC3D,IAAI,KAAK,YAAY,QAAQ,OAAO;EACpC,UAAU;CACZ,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"chunk-comment-config.mjs","names":[],"sources":["../../src/capabilities/comment-config.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as AppCapabilities from '@dxos/app-toolkit/AppCapabilities';\nimport { Type } from '@dxos/echo';\n\nimport * as Drawing from '../types/Drawing';\n\nconst activate = Effect.fnUntraced(function* () {\n return [\n Capability.contribute(AppCapabilities.CommentConfig, {\n id: Type.getTypename(Drawing.Drawing),\n comments: 'unanchored',\n }),\n ];\n});\n\nexport default activate;\n"],"mappings":";;;;;;AAYA,IAAM,WAAW,OAAO,WAAW,aAAa;CAC9C,OAAO,CACL,WAAW,WAAW,gBAAgB,eAAe;EACnD,IAAI,KAAK,YAAY,OAAe;EACpC,UAAU;CACZ,CAAC,CACH;AACF,CAAC"}
@@ -1,17 +1,17 @@
1
- import { a as makeCanvas, i as make, n as Drawing } from "./chunk-Drawing.mjs";
2
- import "./chunk-types.mjs";
3
- import { n as VariantProvider } from "./chunk-IllustratorCapabilities.mjs";
4
- import { Capability } from "@dxos/app-framework";
1
+ import { Drawing, make, makeCanvas } from "./Drawing.mjs";
2
+ import { VariantProvider } from "./IllustratorCapabilities.mjs";
5
3
  import { Database, Type } from "@dxos/echo";
6
4
  import { invariant } from "@dxos/invariant";
7
5
  import * as Effect from "effect/Effect";
8
- import { Operation } from "@dxos/compute";
9
- import { SpaceCapabilities, SpaceOperation } from "@dxos/plugin-space";
6
+ import * as Operation from "@dxos/compute/Operation";
7
+ import * as Capability from "@dxos/app-framework/Capability";
8
+ import { SpaceOperation } from "@dxos/plugin-space";
9
+ import * as SpaceCapabilities from "@dxos/plugin-space/SpaceCapabilities";
10
10
  import { CreateDrawingPanel } from "#components";
11
11
  //#region src/capabilities/create-object.ts
12
12
  var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-illustrator/src/capabilities/create-object.ts";
13
13
  var create_object_default = Capability.makeModule(Effect.fnUntraced(function* () {
14
- return Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
14
+ return Capability.contribute(SpaceCapabilities.CreateObjectEntry, {
15
15
  id: Type.getTypename(Drawing),
16
16
  customPanel: CreateDrawingPanel,
17
17
  createObject: ({ variantId, input }, options) => Effect.gen(function* () {
@@ -19,7 +19,7 @@ var create_object_default = Capability.makeModule(Effect.fnUntraced(function* ()
19
19
  invariant(variant, `Unknown drawing variant: ${variantId}`, {
20
20
  "~LogMeta": "~LogMeta",
21
21
  F: __dxlog_file,
22
- L: 31,
22
+ L: 33,
23
23
  S: this,
24
24
  A: ["variant", "`Unknown drawing variant: ${variantId}`"]
25
25
  });
@@ -1 +1 @@
1
- {"version":3,"file":"chunk-create-object.mjs","names":[],"sources":["../../src/capabilities/create-object.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { Operation } from '@dxos/compute';\nimport { Database, Type } from '@dxos/echo';\nimport { invariant } from '@dxos/invariant';\nimport { SpaceCapabilities, SpaceOperation } from '@dxos/plugin-space';\n\nimport { CreateDrawingPanel } from '#components';\n\nimport { Drawing, IllustratorCapabilities } from '../types';\n\ntype CreateOptions = Parameters<SpaceCapabilities.CreateObjectEntry['createObject']>[1];\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n return Capability.contributes(SpaceCapabilities.CreateObjectEntry, {\n id: Type.getTypename(Drawing.Drawing),\n customPanel: CreateDrawingPanel,\n createObject: (\n { variantId, input }: { variantId: string; input?: Record<string, any> },\n options: CreateOptions,\n ) =>\n Effect.gen(function* () {\n const variants = yield* Capability.getAll(IllustratorCapabilities.VariantProvider);\n const variant = variants.find((entry) => entry.id === variantId);\n invariant(variant, `Unknown drawing variant: ${variantId}`);\n\n // Build the canvas: variants only supply a factory when they extend the base type.\n const canvas = variant.createCanvas\n ? yield* variant\n .createCanvas(input ?? {})\n .pipe(Effect.provideService(Database.Service, Database.makeService(options.db)))\n : Drawing.makeCanvas({ schema: variant.id });\n\n // Add the canvas to the database. It carries HiddenAnnotation, so `CollectionModel.add`\n // persists it without filing it into the target collection.\n yield* Operation.invoke(SpaceOperation.AddObject, {\n object: canvas,\n target: options.target,\n targetNodeId: options.targetNodeId,\n });\n\n const drawing = Drawing.make({\n name: typeof input?.name === 'string' ? input.name : undefined,\n canvas,\n });\n\n // Add the user-facing Drawing wrapper. Not hidden — this is the object the user sees\n // and navigates to. If this second write fails, roll back the canvas so we don't\n // leak an orphaned object into the space.\n return yield* Operation.invoke(SpaceOperation.AddObject, {\n object: drawing,\n target: options.target,\n targetNodeId: options.targetNodeId,\n }).pipe(\n Effect.tapError(() =>\n Operation.invoke(SpaceOperation.RemoveObjects, { objects: [canvas] }).pipe(Effect.ignore),\n ),\n );\n }),\n });\n }),\n);\n"],"mappings":";;;;;;;;;;;;AAkBA,IAAA,wBAAe,WAAW,WACxB,OAAO,WAAW,aAAa;CAC7B,OAAO,WAAW,YAAY,kBAAkB,mBAAmB;EACjE,IAAI,KAAK,YAAY,OAAe;EACpC,aAAa;EACb,eACE,EAAE,WAAW,SACb,YAEA,OAAO,IAAI,aAAa;GAEtB,MAAM,WAAU,OADQ,WAAW,OAAO,eAAuC,EAAA,CACxD,MAAM,UAAU,MAAM,OAAO,SAAS;GAC/D,UAAU,SAAS,4BAA4B,aAAU;IAAA,YAAA;IAAA,GAAA;IAAA,GAAA;IAAA,GAAA;IAAA,GAAA,CAAA,WAAA,yCAAA;GAAA,CAAC;GAG1D,MAAM,SAAS,QAAQ,eACnB,OAAO,QACJ,aAAa,SAAS,CAAC,CAAC,CAAA,CACxB,KAAK,OAAO,eAAe,SAAS,SAAS,SAAS,YAAY,QAAQ,EAAE,CAAC,CAAC,IACjF,WAAmB,EAAE,QAAQ,QAAQ,GAAG,CAAC;GAI7C,OAAO,UAAU,OAAO,eAAe,WAAW;IAChD,QAAQ;IACR,QAAQ,QAAQ;IAChB,cAAc,QAAQ;GACxB,CAAC;GAED,MAAM,UAAU,KAAa;IAC3B,MAAM,OAAO,OAAO,SAAS,WAAW,MAAM,OAAO,KAAA;IACrD;GACF,CAAC;GAKD,OAAO,OAAO,UAAU,OAAO,eAAe,WAAW;IACvD,QAAQ;IACR,QAAQ,QAAQ;IAChB,cAAc,QAAQ;GACxB,CAAC,CAAC,CAAC,KACD,OAAO,eACL,UAAU,OAAO,eAAe,eAAe,EAAE,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,KAAK,OAAO,MAAM,CAC1F,CACF;EACF,CAAC;CACL,CAAC;AACH,CAAC,CACH"}
1
+ {"version":3,"file":"chunk-create-object.mjs","names":[],"sources":["../../src/capabilities/create-object.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as Operation from '@dxos/compute/Operation';\nimport { Database, Type } from '@dxos/echo';\nimport { invariant } from '@dxos/invariant';\nimport { SpaceOperation } from '@dxos/plugin-space';\nimport * as SpaceCapabilities from '@dxos/plugin-space/SpaceCapabilities';\n\nimport { CreateDrawingPanel } from '#components';\n\nimport * as Drawing from '../types/Drawing';\nimport * as IllustratorCapabilities from '../types/IllustratorCapabilities';\n\ntype CreateOptions = Parameters<SpaceCapabilities.CreateObjectEntry['createObject']>[1];\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n return Capability.contribute(SpaceCapabilities.CreateObjectEntry, {\n id: Type.getTypename(Drawing.Drawing),\n customPanel: CreateDrawingPanel,\n createObject: (\n { variantId, input }: { variantId: string; input?: Record<string, any> },\n options: CreateOptions,\n ) =>\n Effect.gen(function* () {\n const variants = yield* Capability.getAll(IllustratorCapabilities.VariantProvider);\n const variant = variants.find((entry) => entry.id === variantId);\n invariant(variant, `Unknown drawing variant: ${variantId}`);\n\n // Build the canvas: variants only supply a factory when they extend the base type.\n const canvas = variant.createCanvas\n ? yield* variant\n .createCanvas(input ?? {})\n .pipe(Effect.provideService(Database.Service, Database.makeService(options.db)))\n : Drawing.makeCanvas({ schema: variant.id });\n\n // Add the canvas to the database. It carries HiddenAnnotation, so `CollectionModel.add`\n // persists it without filing it into the target collection.\n yield* Operation.invoke(SpaceOperation.AddObject, {\n object: canvas,\n target: options.target,\n targetNodeId: options.targetNodeId,\n });\n\n const drawing = Drawing.make({\n name: typeof input?.name === 'string' ? input.name : undefined,\n canvas,\n });\n\n // Add the user-facing Drawing wrapper. Not hidden — this is the object the user sees\n // and navigates to. If this second write fails, roll back the canvas so we don't\n // leak an orphaned object into the space.\n return yield* Operation.invoke(SpaceOperation.AddObject, {\n object: drawing,\n target: options.target,\n targetNodeId: options.targetNodeId,\n }).pipe(\n Effect.tapError(() =>\n Operation.invoke(SpaceOperation.RemoveObjects, { objects: [canvas] }).pipe(Effect.ignore),\n ),\n );\n }),\n });\n }),\n);\n"],"mappings":";;;;;;;;;;;;AAoBA,IAAA,wBAAe,WAAW,WACxB,OAAO,WAAW,aAAa;CAC7B,OAAO,WAAW,WAAW,kBAAkB,mBAAmB;EAChE,IAAI,KAAK,YAAY,OAAe;EACpC,aAAa;EACb,eACE,EAAE,WAAW,SACb,YAEA,OAAO,IAAI,aAAa;GAEtB,MAAM,WAAU,OADQ,WAAW,OAAO,eAAuC,EAAA,CACxD,MAAM,UAAU,MAAM,OAAO,SAAS;GAC/D,UAAU,SAAS,4BAA4B,aAAU;IAAA,YAAA;IAAA,GAAA;IAAA,GAAA;IAAA,GAAA;IAAA,GAAA,CAAA,WAAA,yCAAA;GAAA,CAAC;GAG1D,MAAM,SAAS,QAAQ,eACnB,OAAO,QACJ,aAAa,SAAS,CAAC,CAAC,CAAA,CACxB,KAAK,OAAO,eAAe,SAAS,SAAS,SAAS,YAAY,QAAQ,EAAE,CAAC,CAAC,IACjF,WAAmB,EAAE,QAAQ,QAAQ,GAAG,CAAC;GAI7C,OAAO,UAAU,OAAO,eAAe,WAAW;IAChD,QAAQ;IACR,QAAQ,QAAQ;IAChB,cAAc,QAAQ;GACxB,CAAC;GAED,MAAM,UAAU,KAAa;IAC3B,MAAM,OAAO,OAAO,SAAS,WAAW,MAAM,OAAO,KAAA;IACrD;GACF,CAAC;GAKD,OAAO,OAAO,UAAU,OAAO,eAAe,WAAW;IACvD,QAAQ;IACR,QAAQ,QAAQ;IAChB,cAAc,QAAQ;GACxB,CAAC,CAAC,CAAC,KACD,OAAO,eACL,UAAU,OAAO,eAAe,eAAe,EAAE,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,KAAK,OAAO,MAAM,CAC1F,CACF;EACF,CAAC;CACL,CAAC;AACH,CAAC,CACH"}
@@ -1,10 +1,10 @@
1
- import { a as makeCanvas, i as make } from "./chunk-Drawing.mjs";
2
- import { t as Create } from "./chunk-types.mjs";
3
- import { n as VariantProvider } from "./chunk-IllustratorCapabilities.mjs";
1
+ import { make, makeCanvas } from "./Drawing.mjs";
2
+ import { Create } from "./DrawingOperation.mjs";
3
+ import { VariantProvider } from "./IllustratorCapabilities.mjs";
4
4
  import { t as UnknownDrawingVariantError } from "./chunk-load-drawing.mjs";
5
- import { Capability } from "@dxos/app-framework";
6
5
  import * as Effect from "effect/Effect";
7
- import { Operation } from "@dxos/compute";
6
+ import * as Operation from "@dxos/compute/Operation";
7
+ import * as Capability from "@dxos/app-framework/Capability";
8
8
  //#region src/operations/create.ts
9
9
  var handler = Create.pipe(Operation.withHandler(Effect.fn(function* ({ name, variant: variantId }) {
10
10
  const variants = yield* Capability.getAll(VariantProvider);
@@ -1 +1 @@
1
- {"version":3,"file":"chunk-create.mjs","names":[],"sources":["../../src/operations/create.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { Operation } from '@dxos/compute';\n\nimport { Drawing, DrawingOperation, IllustratorCapabilities } from '../types';\nimport { UnknownDrawingVariantError } from '../util/load-drawing';\n\nconst handler: Operation.WithHandler<typeof DrawingOperation.Create> = DrawingOperation.Create.pipe(\n Operation.withHandler(\n Effect.fn(function* ({ name, variant: variantId }) {\n const variants = yield* Capability.getAll(IllustratorCapabilities.VariantProvider);\n const variant = variantId ? variants.find((entry) => entry.id === variantId) : variants[0];\n if (!variant) {\n return yield* Effect.fail(new UnknownDrawingVariantError(variantId ?? '(none registered)'));\n }\n const canvas = variant.createCanvas ? yield* variant.createCanvas() : Drawing.makeCanvas({ schema: variant.id });\n return { object: Drawing.make({ name, canvas }) };\n }),\n ),\n);\n\nexport default handler;\n"],"mappings":";;;;;;;;AAYA,IAAM,UAAA,OAAyF,KAC7F,UAAU,YACR,OAAO,GAAG,WAAW,EAAE,MAAM,SAAS,aAAa;CACjD,MAAM,WAAW,OAAO,WAAW,OAAO,eAAuC;CACjF,MAAM,UAAU,YAAY,SAAS,MAAM,UAAU,MAAM,OAAO,SAAS,IAAI,SAAS;CACxF,IAAI,CAAC,SACH,OAAO,OAAO,OAAO,KAAK,IAAI,2BAA2B,aAAa,mBAAmB,CAAC;CAG5F,OAAO,EAAE,QAAQ,KAAa;EAAE;EAAM,QADvB,QAAQ,eAAe,OAAO,QAAQ,aAAa,IAAI,WAAmB,EAAE,QAAQ,QAAQ,GAAG,CAAC;CAClE,CAAC,EAAE;AAClD,CAAC,CACH,CACF"}
1
+ {"version":3,"file":"chunk-create.mjs","names":[],"sources":["../../src/operations/create.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as Operation from '@dxos/compute/Operation';\n\nimport * as Drawing from '../types/Drawing';\nimport * as DrawingOperation from '../types/DrawingOperation';\nimport * as IllustratorCapabilities from '../types/IllustratorCapabilities';\nimport { UnknownDrawingVariantError } from '../util/load-drawing';\n\nconst handler: Operation.WithHandler<typeof DrawingOperation.Create> = DrawingOperation.Create.pipe(\n Operation.withHandler(\n Effect.fn(function* ({ name, variant: variantId }) {\n const variants = yield* Capability.getAll(IllustratorCapabilities.VariantProvider);\n const variant = variantId ? variants.find((entry) => entry.id === variantId) : variants[0];\n if (!variant) {\n return yield* Effect.fail(new UnknownDrawingVariantError(variantId ?? '(none registered)'));\n }\n const canvas = variant.createCanvas ? yield* variant.createCanvas() : Drawing.makeCanvas({ schema: variant.id });\n return { object: Drawing.make({ name, canvas }) };\n }),\n ),\n);\n\nexport default handler;\n"],"mappings":";;;;;;;;AAcA,IAAM,UAAA,OAAyF,KAC7F,UAAU,YACR,OAAO,GAAG,WAAW,EAAE,MAAM,SAAS,aAAa;CACjD,MAAM,WAAW,OAAO,WAAW,OAAO,eAAuC;CACjF,MAAM,UAAU,YAAY,SAAS,MAAM,UAAU,MAAM,OAAO,SAAS,IAAI,SAAS;CACxF,IAAI,CAAC,SACH,OAAO,OAAO,OAAO,KAAK,IAAI,2BAA2B,aAAa,mBAAmB,CAAC;CAG5F,OAAO,EAAE,QAAQ,KAAa;EAAE;EAAM,QADvB,QAAQ,eAAe,OAAO,QAAQ,aAAa,IAAI,WAAmB,EAAE,QAAQ,QAAQ,GAAG,CAAC;CAClE,CAAC,EAAE;AAClD,CAAC,CACH,CACF"}
@@ -1,7 +1,7 @@
1
- import { r as Edit } from "./chunk-types.mjs";
1
+ import { Edit } from "./DrawingOperation.mjs";
2
2
  import { r as resolveVariant } from "./chunk-load-drawing.mjs";
3
3
  import * as Effect from "effect/Effect";
4
- import { Operation } from "@dxos/compute";
4
+ import * as Operation from "@dxos/compute/Operation";
5
5
  //#region src/operations/edit.ts
6
6
  var handler = Edit.pipe(Operation.withHandler(Effect.fn(function* ({ drawing, commands }) {
7
7
  const { canvas, variant } = yield* resolveVariant(drawing);
@@ -1 +1 @@
1
- {"version":3,"file":"chunk-edit.mjs","names":[],"sources":["../../src/operations/edit.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Operation } from '@dxos/compute';\n\nimport { DrawingOperation } from '../types';\nimport { resolveVariant } from '../util/load-drawing';\n\nconst handler: Operation.WithHandler<typeof DrawingOperation.Edit> = DrawingOperation.Edit.pipe(\n Operation.withHandler(\n Effect.fn(function* ({ drawing, commands }) {\n const { canvas, variant } = yield* resolveVariant(drawing);\n const { upserted, removed } = variant.builder.apply(canvas, commands);\n const { scene, unmanaged } = variant.builder.read(canvas);\n return { scene, unmanaged, upserted, removed };\n }),\n ),\n);\n\nexport default handler;\n"],"mappings":";;;;;AAWA,IAAM,UAAA,KAAqF,KACzF,UAAU,YACR,OAAO,GAAG,WAAW,EAAE,SAAS,YAAY;CAC1C,MAAM,EAAE,QAAQ,YAAY,OAAO,eAAe,OAAO;CACzD,MAAM,EAAE,UAAU,YAAY,QAAQ,QAAQ,MAAM,QAAQ,QAAQ;CACpE,MAAM,EAAE,OAAO,cAAc,QAAQ,QAAQ,KAAK,MAAM;CACxD,OAAO;EAAE;EAAO;EAAW;EAAU;CAAQ;AAC/C,CAAC,CACH,CACF"}
1
+ {"version":3,"file":"chunk-edit.mjs","names":[],"sources":["../../src/operations/edit.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport * as Operation from '@dxos/compute/Operation';\n\nimport * as DrawingOperation from '../types/DrawingOperation';\nimport { resolveVariant } from '../util/load-drawing';\n\nconst handler: Operation.WithHandler<typeof DrawingOperation.Edit> = DrawingOperation.Edit.pipe(\n Operation.withHandler(\n Effect.fn(function* ({ drawing, commands }) {\n const { canvas, variant } = yield* resolveVariant(drawing);\n const { upserted, removed } = variant.builder.apply(canvas, commands);\n const { scene, unmanaged } = variant.builder.read(canvas);\n return { scene, unmanaged, upserted, removed };\n }),\n ),\n);\n\nexport default handler;\n"],"mappings":";;;;;AAWA,IAAM,UAAA,KAAqF,KACzF,UAAU,YACR,OAAO,GAAG,WAAW,EAAE,SAAS,YAAY;CAC1C,MAAM,EAAE,QAAQ,YAAY,OAAO,eAAe,OAAO;CACzD,MAAM,EAAE,UAAU,YAAY,QAAQ,QAAQ,MAAM,QAAQ,QAAQ;CACpE,MAAM,EAAE,OAAO,cAAc,QAAQ,QAAQ,KAAK,MAAM;CACxD,OAAO;EAAE;EAAO;EAAW;EAAU;CAAQ;AAC/C,CAAC,CACH,CACF"}
@@ -1,7 +1,7 @@
1
- import { i as Generate } from "./chunk-types.mjs";
1
+ import { Generate } from "./DrawingOperation.mjs";
2
2
  import { r as resolveVariant } from "./chunk-load-drawing.mjs";
3
3
  import * as Effect from "effect/Effect";
4
- import { Operation } from "@dxos/compute";
4
+ import * as Operation from "@dxos/compute/Operation";
5
5
  import { Mermaid } from "#model";
6
6
  //#region src/operations/generate.ts
7
7
  var handler = Generate.pipe(Operation.withHandler(Effect.fn(function* ({ drawing, source }) {
@@ -1 +1 @@
1
- {"version":3,"file":"chunk-generate.mjs","names":[],"sources":["../../src/operations/generate.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Operation } from '@dxos/compute';\n\nimport { Mermaid } from '#model';\n\nimport { DrawingOperation } from '../types';\nimport { resolveVariant } from '../util/load-drawing';\n\nconst handler: Operation.WithHandler<typeof DrawingOperation.Generate> = DrawingOperation.Generate.pipe(\n Operation.withHandler(\n Effect.fn(function* ({ drawing, source }) {\n const { canvas, variant } = yield* resolveVariant(drawing);\n const { upserted } = variant.builder.apply(canvas, Mermaid.compile(source));\n const { scene, unmanaged } = variant.builder.read(canvas);\n return { scene, unmanaged, upserted };\n }),\n ),\n);\n\nexport default handler;\n"],"mappings":";;;;;;AAaA,IAAM,UAAA,SAA6F,KACjG,UAAU,YACR,OAAO,GAAG,WAAW,EAAE,SAAS,UAAU;CACxC,MAAM,EAAE,QAAQ,YAAY,OAAO,eAAe,OAAO;CACzD,MAAM,EAAE,aAAa,QAAQ,QAAQ,MAAM,QAAQ,QAAQ,QAAQ,MAAM,CAAC;CAC1E,MAAM,EAAE,OAAO,cAAc,QAAQ,QAAQ,KAAK,MAAM;CACxD,OAAO;EAAE;EAAO;EAAW;CAAS;AACtC,CAAC,CACH,CACF"}
1
+ {"version":3,"file":"chunk-generate.mjs","names":[],"sources":["../../src/operations/generate.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport * as Operation from '@dxos/compute/Operation';\n\nimport { Mermaid } from '#model';\n\nimport * as DrawingOperation from '../types/DrawingOperation';\nimport { resolveVariant } from '../util/load-drawing';\n\nconst handler: Operation.WithHandler<typeof DrawingOperation.Generate> = DrawingOperation.Generate.pipe(\n Operation.withHandler(\n Effect.fn(function* ({ drawing, source }) {\n const { canvas, variant } = yield* resolveVariant(drawing);\n const { upserted } = variant.builder.apply(canvas, Mermaid.compile(source));\n const { scene, unmanaged } = variant.builder.read(canvas);\n return { scene, unmanaged, upserted };\n }),\n ),\n);\n\nexport default handler;\n"],"mappings":";;;;;;AAaA,IAAM,UAAA,SAA6F,KACjG,UAAU,YACR,OAAO,GAAG,WAAW,EAAE,SAAS,UAAU;CACxC,MAAM,EAAE,QAAQ,YAAY,OAAO,eAAe,OAAO;CACzD,MAAM,EAAE,aAAa,QAAQ,QAAQ,MAAM,QAAQ,QAAQ,QAAQ,MAAM,CAAC;CAC1E,MAAM,EAAE,OAAO,cAAc,QAAQ,QAAQ,KAAK,MAAM;CACxD,OAAO;EAAE;EAAO;EAAW;CAAS;AACtC,CAAC,CACH,CACF"}
@@ -1,7 +1,7 @@
1
- import { n as VariantProvider } from "./chunk-IllustratorCapabilities.mjs";
2
- import { Capability } from "@dxos/app-framework";
1
+ import { VariantProvider } from "./IllustratorCapabilities.mjs";
3
2
  import { Database } from "@dxos/echo";
4
3
  import * as Effect from "effect/Effect";
4
+ import * as Capability from "@dxos/app-framework/Capability";
5
5
  //#region src/util/load-drawing.ts
6
6
  var UnknownDrawingVariantError = class extends Error {
7
7
  schema;
@@ -1 +1 @@
1
- {"version":3,"file":"chunk-load-drawing.mjs","names":[],"sources":["../../src/util/load-drawing.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { Database, type Ref } from '@dxos/echo';\n\nimport * as Drawing from '../types/Drawing';\nimport * as IllustratorCapabilities from '../types/IllustratorCapabilities';\nimport { type DrawingVariant } from '../types/types';\n\nexport class UnknownDrawingVariantError extends Error {\n readonly _tag = 'UnknownDrawingVariantError';\n constructor(readonly schema: string) {\n super(`No drawing variant registered for canvas schema: ${schema}.`);\n }\n}\n\n/**\n * Loads a Drawing and resolves the variant claiming its canvas `schema`.\n * Used by the renderer-agnostic read/edit operations.\n */\nexport const resolveVariant = (\n ref: Ref.Ref<Drawing.Drawing>,\n): Effect.Effect<\n { drawing: Drawing.Drawing; canvas: Drawing.Canvas; variant: DrawingVariant },\n Error,\n Database.Service | Capability.Service\n> =>\n Effect.gen(function* () {\n const drawing = yield* Database.load(ref);\n const canvas = yield* Database.load(drawing.canvas);\n const schema = canvas.schema ?? '';\n const variants = yield* Capability.getAll(IllustratorCapabilities.VariantProvider);\n const variant = variants.find((entry) => entry.id === schema);\n if (!variant) {\n return yield* Effect.fail(new UnknownDrawingVariantError(schema));\n }\n return { drawing, canvas, variant };\n });\n\n/** Resolve a variant by canvas schema, for callers that already hold the canvas. */\nexport const findVariant = (\n variants: readonly DrawingVariant[],\n canvas: Pick<Drawing.Canvas, 'schema'> | undefined,\n): DrawingVariant | undefined => variants.find((entry) => entry.id === (canvas?.schema ?? ''));\n"],"mappings":";;;;;AAaA,IAAa,6BAAb,cAAgD,MAAM;CAE/B;CADrB,OAAgB;CAChB,YAAY,QAAyB;EACnC,MAAM,oDAAoD,OAAO,EAAE;EADhD,KAAA,SAAA;CAErB;AACF;;;;;AAMA,IAAa,kBACX,QAMA,OAAO,IAAI,aAAa;CACtB,MAAM,UAAU,OAAO,SAAS,KAAK,GAAG;CACxC,MAAM,SAAS,OAAO,SAAS,KAAK,QAAQ,MAAM;CAClD,MAAM,SAAS,OAAO,UAAU;CAEhC,MAAM,WAAU,OADQ,WAAW,OAAO,eAAuC,EAAA,CACxD,MAAM,UAAU,MAAM,OAAO,MAAM;CAC5D,IAAI,CAAC,SACH,OAAO,OAAO,OAAO,KAAK,IAAI,2BAA2B,MAAM,CAAC;CAElE,OAAO;EAAE;EAAS;EAAQ;CAAQ;AACpC,CAAC;;AAGH,IAAa,eACX,UACA,WAC+B,SAAS,MAAM,UAAU,MAAM,QAAQ,QAAQ,UAAU,GAAG"}
1
+ {"version":3,"file":"chunk-load-drawing.mjs","names":[],"sources":["../../src/util/load-drawing.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport * as Capability from '@dxos/app-framework/Capability';\nimport { Database, type Ref } from '@dxos/echo';\n\nimport * as Drawing from '../types/Drawing';\nimport * as IllustratorCapabilities from '../types/IllustratorCapabilities';\n\nexport class UnknownDrawingVariantError extends Error {\n readonly _tag = 'UnknownDrawingVariantError';\n constructor(readonly schema: string) {\n super(`No drawing variant registered for canvas schema: ${schema}.`);\n }\n}\n\n/**\n * Loads a Drawing and resolves the variant claiming its canvas `schema`.\n * Used by the renderer-agnostic read/edit operations.\n */\nexport const resolveVariant = (\n ref: Ref.Ref<Drawing.Drawing>,\n): Effect.Effect<\n { drawing: Drawing.Drawing; canvas: Drawing.Canvas; variant: IllustratorCapabilities.DrawingVariant },\n Error,\n Database.Service | Capability.Service\n> =>\n Effect.gen(function* () {\n const drawing = yield* Database.load(ref);\n const canvas = yield* Database.load(drawing.canvas);\n const schema = canvas.schema ?? '';\n const variants = yield* Capability.getAll(IllustratorCapabilities.VariantProvider);\n const variant = variants.find((entry) => entry.id === schema);\n if (!variant) {\n return yield* Effect.fail(new UnknownDrawingVariantError(schema));\n }\n return { drawing, canvas, variant };\n });\n\n/** Resolve a variant by canvas schema, for callers that already hold the canvas. */\nexport const findVariant = (\n variants: readonly IllustratorCapabilities.DrawingVariant[],\n canvas: Pick<Drawing.Canvas, 'schema'> | undefined,\n): IllustratorCapabilities.DrawingVariant | undefined => variants.find((entry) => entry.id === (canvas?.schema ?? ''));\n"],"mappings":";;;;;AAYA,IAAa,6BAAb,cAAgD,MAAM;CAE/B;CADrB,OAAgB;CAChB,YAAY,QAAyB;EACnC,MAAM,oDAAoD,OAAO,EAAE;EADhD,KAAA,SAAA;CAErB;AACF;;;;;AAMA,IAAa,kBACX,QAMA,OAAO,IAAI,aAAa;CACtB,MAAM,UAAU,OAAO,SAAS,KAAK,GAAG;CACxC,MAAM,SAAS,OAAO,SAAS,KAAK,QAAQ,MAAM;CAClD,MAAM,SAAS,OAAO,UAAU;CAEhC,MAAM,WAAU,OADQ,WAAW,OAAO,eAAuC,EAAA,CACxD,MAAM,UAAU,MAAM,OAAO,MAAM;CAC5D,IAAI,CAAC,SACH,OAAO,OAAO,OAAO,KAAK,IAAI,2BAA2B,MAAM,CAAC;CAElE,OAAO;EAAE;EAAS;EAAQ;CAAQ;AACpC,CAAC;;AAGH,IAAa,eACX,UACA,WACuD,SAAS,MAAM,UAAU,MAAM,QAAQ,QAAQ,UAAU,GAAG"}
@@ -1,4 +1,4 @@
1
- import { Plugin } from "@dxos/app-framework";
1
+ import * as Plugin from "@dxos/app-framework/Plugin";
2
2
  import { Config2 } from "@dxos/app-framework/config";
3
3
  import { trim } from "@dxos/util";
4
4
  //#region dx.config.ts
@@ -1 +1 @@
1
- {"version":3,"file":"chunk-meta.mjs","names":[],"sources":["../../dx.config.ts","../../src/meta.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport { Config2 } from '@dxos/app-framework/config';\nimport { trim } from '@dxos/util';\n\nexport default Config2.make({\n plugin: {\n key: 'org.dxos.plugin.illustrator',\n name: 'Illustrator',\n author: 'DXOS',\n description: trim`\n Headless diagramming host plugin that provides shared infrastructure for local-first\n drawing and diagramming inside DXOS Composer. The plugin owns the base \\`Sketch\\` ECHO\n type — a named handle referencing a renderer-specific canvas object — together with the\n renderer-neutral scene DSL, the diagram dialect registry, and the agent-facing sketch\n skill and operations (create, read, edit).\n\n Canvas renderers (tldraw, excalidraw, and others) are contributed by separate plugins\n via the \\`IllustratorCapabilities.VariantProvider\\` capability. Each variant supplies its\n own canvas schema, a builder that maps the scene DSL onto its records, and surface\n components (Article and Card). Plugin-illustrator resolves the correct variant at\n runtime and delegates rendering and DSL compilation, keeping the host layer fully\n decoupled from renderer internals.\n\n Canvas objects are stored as hidden ECHO objects alongside the top-level \\`Sketch\\`,\n ensuring they replicate to all peers but do not appear as independent items in the\n user's space graph.\n `,\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-illustrator',\n icon: { key: 'ph--compass-tool--regular', hue: 'indigo' },\n spec: 'PLUGIN.mdl',\n tags: ['alpha'],\n },\n});\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport config from '../dx.config';\n\nexport const meta = Plugin.getMetaFromConfig(config);\n"],"mappings":";;;;AAOA,IAAA,oBAAe,QAAQ,KAAK,EAC1B,QAAQ;CACN,KAAK;CACL,MAAM;CACN,QAAQ;CACR,aAAa,IAAI;;;;;;;;;;;;;;;;;;CAkBjB,QAAQ;CACR,MAAM;EAAE,KAAK;EAA6B,KAAK;CAAS;CACxD,MAAM;CACN,MAAM,CAAC,OAAO;AAChB,EACF,CAAC;;;AC3BD,IAAa,OAAO,OAAO,kBAAkB,iBAAM"}
1
+ {"version":3,"file":"chunk-meta.mjs","names":[],"sources":["../../dx.config.ts","../../src/meta.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport { Config2 } from '@dxos/app-framework/config';\nimport { trim } from '@dxos/util';\n\nexport default Config2.make({\n plugin: {\n key: 'org.dxos.plugin.illustrator',\n name: 'Illustrator',\n author: 'DXOS',\n description: trim`\n Headless diagramming host plugin that provides shared infrastructure for local-first\n drawing and diagramming inside DXOS Composer. The plugin owns the base \\`Sketch\\` ECHO\n type — a named handle referencing a renderer-specific canvas object — together with the\n renderer-neutral scene DSL, the diagram dialect registry, and the agent-facing sketch\n skill and operations (create, read, edit).\n\n Canvas renderers (tldraw, excalidraw, and others) are contributed by separate plugins\n via the \\`IllustratorCapabilities.VariantProvider\\` capability. Each variant supplies its\n own canvas schema, a builder that maps the scene DSL onto its records, and surface\n components (Article and Card). Plugin-illustrator resolves the correct variant at\n runtime and delegates rendering and DSL compilation, keeping the host layer fully\n decoupled from renderer internals.\n\n Canvas objects are stored as hidden ECHO objects alongside the top-level \\`Sketch\\`,\n ensuring they replicate to all peers but do not appear as independent items in the\n user's space graph.\n `,\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-illustrator',\n icon: { key: 'ph--compass-tool--regular', hue: 'indigo' },\n spec: 'PLUGIN.mdl',\n tags: ['alpha'],\n },\n});\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Plugin from '@dxos/app-framework/Plugin';\n\nimport config from '../dx.config';\n\nexport const meta = Plugin.getMetaFromConfig(config);\n"],"mappings":";;;;AAOA,IAAA,oBAAe,QAAQ,KAAK,EAC1B,QAAQ;CACN,KAAK;CACL,MAAM;CACN,QAAQ;CACR,aAAa,IAAI;;;;;;;;;;;;;;;;;;CAkBjB,QAAQ;CACR,MAAM;EAAE,KAAK;EAA6B,KAAK;CAAS;CACxD,MAAM;CACN,MAAM,CAAC,OAAO;AAChB,EACF,CAAC;;;AC3BD,IAAa,OAAO,OAAO,kBAAkB,iBAAM"}
@@ -1,9 +1,9 @@
1
- import { n as Drawing } from "./chunk-Drawing.mjs";
2
- import { s as Sketch } from "./chunk-types.mjs";
3
- import { Capability } from "@dxos/app-framework";
1
+ import { Drawing } from "./Drawing.mjs";
2
+ import { Sketch } from "./LegacySketch.mjs";
4
3
  import { Migration } from "@dxos/echo";
5
4
  import * as Effect from "effect/Effect";
6
- import { ClientCapabilities } from "@dxos/plugin-client";
5
+ import * as Capability from "@dxos/app-framework/Capability";
6
+ import * as ClientCapabilities from "@dxos/plugin-client/ClientCapabilities";
7
7
  //#region src/capabilities/migrations.ts
8
8
  var sketchToDrawing = Migration.define({
9
9
  from: Sketch,
@@ -15,7 +15,7 @@ var sketchToDrawing = Migration.define({
15
15
  });
16
16
  var migrations = [sketchToDrawing];
17
17
  var migrations_default = Capability.makeModule(Effect.fnUntraced(function* () {
18
- return Capability.contributes(ClientCapabilities.Migration, migrations);
18
+ return Capability.contribute(ClientCapabilities.Migration, migrations);
19
19
  }));
20
20
  //#endregion
21
21
  export { migrations_default as default, sketchToDrawing };
@@ -1 +1 @@
1
- {"version":3,"file":"chunk-migrations.mjs","names":[],"sources":["../../src/capabilities/migrations.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { Migration } from '@dxos/echo';\nimport { ClientCapabilities } from '@dxos/plugin-client';\n\nimport { Drawing, LegacySketch } from '../types';\n\n// `org.dxos.type.sketch` -> `org.dxos.type.drawing`. The shape is unchanged (name + canvas ref)\n// and the canvas keeps its typename, so the transform is a field copy; the runtime swaps the\n// object's type and retires the old one.\nexport const sketchToDrawing = Migration.define({\n from: LegacySketch.Sketch,\n to: Drawing.Drawing,\n transform: async ({ name, canvas }) => ({ name, canvas }),\n});\n\nconst migrations = [sketchToDrawing];\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n return Capability.contributes(ClientCapabilities.Migration, migrations);\n }),\n);\n"],"mappings":";;;;;;;AAeA,IAAa,kBAAkB,UAAU,OAAO;CAC9C,MAAM;CACN,IAAI;CACJ,WAAW,OAAO,EAAE,MAAM,cAAc;EAAE;EAAM;CAAO;AACzD,CAAC;AAED,IAAM,aAAa,CAAC,eAAe;AAEnC,IAAA,qBAAe,WAAW,WACxB,OAAO,WAAW,aAAa;CAC7B,OAAO,WAAW,YAAY,mBAAmB,WAAW,UAAU;AACxE,CAAC,CACH"}
1
+ {"version":3,"file":"chunk-migrations.mjs","names":[],"sources":["../../src/capabilities/migrations.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport * as Capability from '@dxos/app-framework/Capability';\nimport { Migration } from '@dxos/echo';\nimport * as ClientCapabilities from '@dxos/plugin-client/ClientCapabilities';\n\nimport * as Drawing from '../types/Drawing';\nimport * as LegacySketch from '../types/LegacySketch';\n\n// `org.dxos.type.sketch` -> `org.dxos.type.drawing`. The shape is unchanged (name + canvas ref)\n// and the canvas keeps its typename, so the transform is a field copy; the runtime swaps the\n// object's type and retires the old one.\nexport const sketchToDrawing = Migration.define({\n from: LegacySketch.Sketch,\n to: Drawing.Drawing,\n transform: async ({ name, canvas }) => ({ name, canvas }),\n});\n\nconst migrations = [sketchToDrawing];\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n return Capability.contribute(ClientCapabilities.Migration, migrations);\n }),\n);\n"],"mappings":";;;;;;;AAgBA,IAAa,kBAAkB,UAAU,OAAO;CAC9C,MAAM;CACN,IAAI;CACJ,WAAW,OAAO,EAAE,MAAM,cAAc;EAAE;EAAM;CAAO;AACzD,CAAC;AAED,IAAM,aAAa,CAAC,eAAe;AAEnC,IAAA,qBAAe,WAAW,WACxB,OAAO,WAAW,aAAa;CAC7B,OAAO,WAAW,WAAW,mBAAmB,WAAW,UAAU;AACvE,CAAC,CACH"}
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
2
- import { t as Canvas } from "./chunk-Drawing.mjs";
2
+ import { Canvas } from "./Drawing.mjs";
3
3
  import { Obj } from "@dxos/echo";
4
4
  import { invariant } from "@dxos/invariant";
5
5
  import * as Schema from "effect/Schema";
@@ -1,9 +1,10 @@
1
- import { Capabilities, Capability } from "@dxos/app-framework";
2
1
  import * as Effect from "effect/Effect";
2
+ import * as Capability from "@dxos/app-framework/Capability";
3
+ import * as Capabilities from "@dxos/app-framework/Capabilities";
3
4
  import { IllustratorOperationHandlerSet } from "#operations";
4
5
  //#region src/capabilities/operation-handler.ts
5
6
  var operation_handler_default = Capability.makeModule(Effect.fnUntraced(function* () {
6
- return Capability.contributes(Capabilities.OperationHandler, IllustratorOperationHandlerSet);
7
+ return Capability.contribute(Capabilities.OperationHandler, IllustratorOperationHandlerSet);
7
8
  }));
8
9
  //#endregion
9
10
  export { operation_handler_default as default };