@dxos/plugin-explorer 0.7.5-main.9d2a38b → 0.7.5-main.b19bfc8

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 (99) hide show
  1. package/dist/lib/browser/{ExplorerContainer-A7UBZ3QP.mjs → ExplorerContainer-THLT3CQZ.mjs} +2 -2
  2. package/dist/lib/browser/{chunk-Q4MVJ6YE.mjs → chunk-PMHCTMKT.mjs} +3 -3
  3. package/dist/lib/browser/{chunk-Q4MVJ6YE.mjs.map → chunk-PMHCTMKT.mjs.map} +1 -1
  4. package/dist/lib/browser/{chunk-D67EYME2.mjs → chunk-QOKAZK4V.mjs} +5 -2
  5. package/dist/lib/browser/chunk-QOKAZK4V.mjs.map +7 -0
  6. package/dist/lib/browser/{chunk-5GTLMW4Q.mjs → chunk-TDUEJNAN.mjs} +21 -22
  7. package/dist/lib/browser/chunk-TDUEJNAN.mjs.map +7 -0
  8. package/dist/lib/browser/{chunk-DTAFIUA7.mjs → chunk-YN4YVXVL.mjs} +2 -2
  9. package/dist/lib/browser/index.mjs +24 -12
  10. package/dist/lib/browser/index.mjs.map +3 -3
  11. package/dist/lib/browser/{intent-resolver-DADUM6T5.mjs → intent-resolver-UJNDAIDZ.mjs} +14 -11
  12. package/dist/lib/browser/{intent-resolver-DADUM6T5.mjs.map → intent-resolver-UJNDAIDZ.mjs.map} +3 -3
  13. package/dist/lib/browser/meta.json +1 -1
  14. package/dist/lib/browser/meta.mjs +1 -1
  15. package/dist/lib/browser/{react-surface-FW4Q2UQM.mjs → react-surface-UMUN6CTH.mjs} +5 -5
  16. package/dist/lib/browser/types/index.mjs +2 -2
  17. package/dist/lib/node/{ExplorerContainer-ZV2YKOUE.cjs → ExplorerContainer-EJPGD4WR.cjs} +6 -6
  18. package/dist/lib/node/{chunk-34MGVWOY.cjs → chunk-5MTMJYC4.cjs} +8 -5
  19. package/dist/lib/node/{chunk-34MGVWOY.cjs.map → chunk-5MTMJYC4.cjs.map} +3 -3
  20. package/dist/lib/node/{chunk-4H2Y5RER.cjs → chunk-H5CHI722.cjs} +5 -5
  21. package/dist/lib/node/{chunk-WHMJ2VQ2.cjs → chunk-QASZ24JS.cjs} +23 -24
  22. package/dist/lib/node/chunk-QASZ24JS.cjs.map +7 -0
  23. package/dist/lib/node/{chunk-SFG2GX7G.cjs → chunk-YUY7P7R2.cjs} +7 -7
  24. package/dist/lib/node/{chunk-SFG2GX7G.cjs.map → chunk-YUY7P7R2.cjs.map} +1 -1
  25. package/dist/lib/node/index.cjs +42 -30
  26. package/dist/lib/node/index.cjs.map +3 -3
  27. package/dist/lib/node/{intent-resolver-2V3P4L25.cjs → intent-resolver-XQV24IAA.cjs} +17 -14
  28. package/dist/lib/node/{intent-resolver-2V3P4L25.cjs.map → intent-resolver-XQV24IAA.cjs.map} +3 -3
  29. package/dist/lib/node/meta.cjs +3 -3
  30. package/dist/lib/node/meta.cjs.map +1 -1
  31. package/dist/lib/node/meta.json +1 -1
  32. package/dist/lib/node/{react-surface-7J4K5DDX.cjs → react-surface-UVMGNAA6.cjs} +11 -11
  33. package/dist/lib/node/types/index.cjs +4 -4
  34. package/dist/lib/node/types/index.cjs.map +1 -1
  35. package/dist/lib/node-esm/{ExplorerContainer-JXY6XN2D.mjs → ExplorerContainer-MEZP34AY.mjs} +2 -2
  36. package/dist/lib/node-esm/{chunk-WTGQFG6L.mjs → chunk-45DTVHHL.mjs} +21 -22
  37. package/dist/lib/node-esm/chunk-45DTVHHL.mjs.map +7 -0
  38. package/dist/lib/node-esm/{chunk-7NVKKFPI.mjs → chunk-57K7ORAW.mjs} +3 -3
  39. package/dist/lib/node-esm/{chunk-7NVKKFPI.mjs.map → chunk-57K7ORAW.mjs.map} +1 -1
  40. package/dist/lib/node-esm/{chunk-HIMBUOZ3.mjs → chunk-JYW3CDBT.mjs} +2 -2
  41. package/dist/lib/node-esm/{chunk-ZEM6ZU5V.mjs → chunk-UHJZUVRI.mjs} +5 -2
  42. package/dist/lib/node-esm/chunk-UHJZUVRI.mjs.map +7 -0
  43. package/dist/lib/node-esm/index.mjs +24 -12
  44. package/dist/lib/node-esm/index.mjs.map +3 -3
  45. package/dist/lib/node-esm/{intent-resolver-3BG74H5K.mjs → intent-resolver-RZQ3EEOE.mjs} +14 -11
  46. package/dist/lib/node-esm/{intent-resolver-3BG74H5K.mjs.map → intent-resolver-RZQ3EEOE.mjs.map} +3 -3
  47. package/dist/lib/node-esm/meta.json +1 -1
  48. package/dist/lib/node-esm/meta.mjs +1 -1
  49. package/dist/lib/node-esm/{react-surface-7ZTSGXJO.mjs → react-surface-5BTZOU3H.mjs} +5 -5
  50. package/dist/lib/node-esm/types/index.mjs +2 -2
  51. package/dist/types/src/ExplorerPlugin.d.ts.map +1 -1
  52. package/dist/types/src/capabilities/index.d.ts +2 -2
  53. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  54. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
  55. package/dist/types/src/components/Chart/Chart.d.ts +1 -2
  56. package/dist/types/src/components/Chart/Chart.d.ts.map +1 -1
  57. package/dist/types/src/components/Chart/Chart.stories.d.ts +1 -2
  58. package/dist/types/src/components/Chart/Chart.stories.d.ts.map +1 -1
  59. package/dist/types/src/components/ExplorerContainer.d.ts +1 -2
  60. package/dist/types/src/components/ExplorerContainer.d.ts.map +1 -1
  61. package/dist/types/src/components/Globe/Globe.d.ts +1 -2
  62. package/dist/types/src/components/Globe/Globe.d.ts.map +1 -1
  63. package/dist/types/src/components/Globe/Globe.stories.d.ts +2 -3
  64. package/dist/types/src/components/Globe/Globe.stories.d.ts.map +1 -1
  65. package/dist/types/src/components/Graph/Graph.d.ts +1 -0
  66. package/dist/types/src/components/Graph/Graph.d.ts.map +1 -1
  67. package/dist/types/src/components/Graph/graph-model.d.ts +6 -6
  68. package/dist/types/src/components/Graph/graph-model.d.ts.map +1 -1
  69. package/dist/types/src/components/Tree/Tree.d.ts +1 -2
  70. package/dist/types/src/components/Tree/Tree.d.ts.map +1 -1
  71. package/dist/types/src/components/index.d.ts +1 -1
  72. package/dist/types/src/components/index.d.ts.map +1 -1
  73. package/dist/types/src/meta.d.ts +1 -0
  74. package/dist/types/src/meta.d.ts.map +1 -1
  75. package/dist/types/src/translations.d.ts +13 -0
  76. package/dist/types/src/translations.d.ts.map +1 -1
  77. package/dist/types/src/types/schema.d.ts +2 -2
  78. package/package.json +25 -24
  79. package/src/ExplorerPlugin.tsx +19 -14
  80. package/src/capabilities/intent-resolver.ts +6 -3
  81. package/src/components/Graph/Graph.tsx +19 -20
  82. package/src/components/Graph/graph-model.ts +13 -9
  83. package/src/meta.ts +2 -1
  84. package/src/translations.ts +4 -0
  85. package/src/types/schema.ts +1 -1
  86. package/dist/lib/browser/chunk-5GTLMW4Q.mjs.map +0 -7
  87. package/dist/lib/browser/chunk-D67EYME2.mjs.map +0 -7
  88. package/dist/lib/node/chunk-WHMJ2VQ2.cjs.map +0 -7
  89. package/dist/lib/node-esm/chunk-WTGQFG6L.mjs.map +0 -7
  90. package/dist/lib/node-esm/chunk-ZEM6ZU5V.mjs.map +0 -7
  91. /package/dist/lib/browser/{ExplorerContainer-A7UBZ3QP.mjs.map → ExplorerContainer-THLT3CQZ.mjs.map} +0 -0
  92. /package/dist/lib/browser/{chunk-DTAFIUA7.mjs.map → chunk-YN4YVXVL.mjs.map} +0 -0
  93. /package/dist/lib/browser/{react-surface-FW4Q2UQM.mjs.map → react-surface-UMUN6CTH.mjs.map} +0 -0
  94. /package/dist/lib/node/{ExplorerContainer-ZV2YKOUE.cjs.map → ExplorerContainer-EJPGD4WR.cjs.map} +0 -0
  95. /package/dist/lib/node/{chunk-4H2Y5RER.cjs.map → chunk-H5CHI722.cjs.map} +0 -0
  96. /package/dist/lib/node/{react-surface-7J4K5DDX.cjs.map → react-surface-UVMGNAA6.cjs.map} +0 -0
  97. /package/dist/lib/node-esm/{ExplorerContainer-JXY6XN2D.mjs.map → ExplorerContainer-MEZP34AY.mjs.map} +0 -0
  98. /package/dist/lib/node-esm/{chunk-HIMBUOZ3.mjs.map → chunk-JYW3CDBT.mjs.map} +0 -0
  99. /package/dist/lib/node-esm/{react-surface-7ZTSGXJO.mjs.map → react-surface-5BTZOU3H.mjs.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Graph
3
- } from "./chunk-5GTLMW4Q.mjs";
3
+ } from "./chunk-TDUEJNAN.mjs";
4
4
 
5
5
  // packages/plugins/experimental/plugin-explorer/src/components/ExplorerContainer.tsx
6
6
  import React from "react";
@@ -25,4 +25,4 @@ var ExplorerContainer_default = ExplorerContainer;
25
25
  export {
26
26
  ExplorerContainer_default as default
27
27
  };
28
- //# sourceMappingURL=ExplorerContainer-A7UBZ3QP.mjs.map
28
+ //# sourceMappingURL=ExplorerContainer-THLT3CQZ.mjs.map
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  EXPLORER_PLUGIN
3
- } from "./chunk-D67EYME2.mjs";
3
+ } from "./chunk-QOKAZK4V.mjs";
4
4
 
5
5
  // packages/plugins/experimental/plugin-explorer/src/types/schema.ts
6
6
  import { S, TypedObject } from "@dxos/echo-schema";
7
7
  var ViewType = class extends TypedObject({
8
- typename: "dxos.org/type/View",
8
+ typename: "dxos.org/type/ExplorerView",
9
9
  version: "0.1.0"
10
10
  })({
11
11
  name: S.optional(S.String),
@@ -34,4 +34,4 @@ export {
34
34
  ViewType,
35
35
  ExplorerAction
36
36
  };
37
- //# sourceMappingURL=chunk-Q4MVJ6YE.mjs.map
37
+ //# sourceMappingURL=chunk-PMHCTMKT.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/types/schema.ts", "../../../src/types/types.ts"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { S, TypedObject } from '@dxos/echo-schema';\n\n// TODO(burdon): Clashes with sdk/view.\nexport class ViewType extends TypedObject({\n typename: 'dxos.org/type/View',\n version: '0.1.0',\n})({\n name: S.optional(S.String),\n type: S.String,\n}) {}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { S } from '@dxos/echo-schema';\n\nimport { ViewType } from './schema';\nimport { EXPLORER_PLUGIN } from '../meta';\n\nexport namespace ExplorerAction {\n const EXPLORER_ACTION = `${EXPLORER_PLUGIN}/action`;\n\n export class Create extends S.TaggedClass<Create>()(`${EXPLORER_ACTION}/create`, {\n input: S.Struct({\n name: S.optional(S.String),\n }),\n output: S.Struct({\n object: ViewType,\n }),\n }) {}\n}\n"],
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { S, TypedObject } from '@dxos/echo-schema';\n\n// TODO(burdon): Clashes with sdk/view.\nexport class ViewType extends TypedObject({\n typename: 'dxos.org/type/ExplorerView',\n version: '0.1.0',\n})({\n name: S.optional(S.String),\n type: S.String,\n}) {}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { S } from '@dxos/echo-schema';\n\nimport { ViewType } from './schema';\nimport { EXPLORER_PLUGIN } from '../meta';\n\nexport namespace ExplorerAction {\n const EXPLORER_ACTION = `${EXPLORER_PLUGIN}/action`;\n\n export class Create extends S.TaggedClass<Create>()(`${EXPLORER_ACTION}/create`, {\n input: S.Struct({\n name: S.optional(S.String),\n }),\n output: S.Struct({\n object: ViewType,\n }),\n }) {}\n}\n"],
5
5
  "mappings": ";;;;;AAIA,SAASA,GAAGC,mBAAmB;AAGxB,IAAMC,WAAN,cAAuBC,YAAY;EACxCC,UAAU;EACVC,SAAS;AACX,CAAA,EAAG;EACDC,MAAMC,EAAEC,SAASD,EAAEE,MAAM;EACzBC,MAAMH,EAAEE;AACV,CAAA,EAAA;AAAI;;;ACTJ,SAASE,KAAAA,UAAS;;UAKDC,iBAAAA;AACf,QAAMC,kBAAkB,GAAGC,eAAAA;EAEpB,MAAMC,eAAeC,GAAEC,YAAW,EAAW,GAAGJ,eAAAA,WAA0B;IAC/EK,OAAOF,GAAEG,OAAO;MACdC,MAAMJ,GAAEK,SAASL,GAAEM,MAAM;IAC3B,CAAA;IACAC,QAAQP,GAAEG,OAAO;MACfK,QAAQC;IACV,CAAA;EACF,CAAA,EAAA;EAAI;kBAPSV,SAAAA;AAQf,GAXiBH,mBAAAA,iBAAAA,CAAAA,EAAAA;",
6
6
  "names": ["S", "TypedObject", "ViewType", "TypedObject", "typename", "version", "name", "S", "optional", "String", "type", "S", "ExplorerAction", "EXPLORER_ACTION", "EXPLORER_PLUGIN", "Create", "S", "TaggedClass", "input", "Struct", "name", "optional", "String", "output", "object", "ViewType"]
7
7
  }
@@ -3,11 +3,14 @@ var EXPLORER_PLUGIN = "dxos.org/plugin/explorer";
3
3
  var meta = {
4
4
  id: EXPLORER_PLUGIN,
5
5
  name: "Explorer",
6
- description: "Explore the ECHO hypergraph.",
6
+ description: "Install this plugin to view a hypergraph of all objects inside of your Space.",
7
7
  icon: "ph--graph--regular",
8
8
  source: "https://github.com/dxos/dxos/tree/main/packages/plugins/experimental/plugin-explorer",
9
9
  tags: [
10
10
  "experimental"
11
+ ],
12
+ screenshots: [
13
+ "https://dxos.network/plugin-details-explorer-dark.png"
11
14
  ]
12
15
  };
13
16
 
@@ -15,4 +18,4 @@ export {
15
18
  EXPLORER_PLUGIN,
16
19
  meta
17
20
  };
18
- //# sourceMappingURL=chunk-D67EYME2.mjs.map
21
+ //# sourceMappingURL=chunk-QOKAZK4V.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/meta.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const EXPLORER_PLUGIN = 'dxos.org/plugin/explorer';\n\nexport const meta = {\n id: EXPLORER_PLUGIN,\n name: 'Explorer',\n description: 'Install this plugin to view a hypergraph of all objects inside of your Space.',\n icon: 'ph--graph--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/experimental/plugin-explorer',\n tags: ['experimental'],\n screenshots: ['https://dxos.network/plugin-details-explorer-dark.png'],\n} satisfies PluginMeta;\n"],
5
+ "mappings": ";AAMO,IAAMA,kBAAkB;AAExB,IAAMC,OAAO;EAClBC,IAAIF;EACJG,MAAM;EACNC,aAAa;EACbC,MAAM;EACNC,QAAQ;EACRC,MAAM;IAAC;;EACPC,aAAa;IAAC;;AAChB;",
6
+ "names": ["EXPLORER_PLUGIN", "meta", "id", "name", "description", "icon", "source", "tags", "screenshots"]
7
+ }
@@ -35,7 +35,7 @@ var SpaceGraphModel = class extends GraphModel {
35
35
  };
36
36
  }
37
37
  return {
38
- type: "echo-object",
38
+ type: "object",
39
39
  id: object.id,
40
40
  object
41
41
  };
@@ -48,7 +48,7 @@ var SpaceGraphModel = class extends GraphModel {
48
48
  id: object.id.slice(0, 8)
49
49
  }, {
50
50
  F: __dxlog_file,
51
- L: 72,
51
+ L: 76,
52
52
  S: this,
53
53
  C: (f, a) => f(...a)
54
54
  });
@@ -273,7 +273,7 @@ var mapGraphToTreeData = (model, maxDepth = 8) => {
273
273
 
274
274
  // packages/plugins/experimental/plugin-explorer/src/components/Graph/Graph.tsx
275
275
  import React, { useEffect, useMemo, useRef, useState } from "react";
276
- import { getType as getType2 } from "@dxos/client/echo";
276
+ import { getTypename } from "@dxos/client/echo";
277
277
  import { createSvgContext, defaultGridStyles, Grid, SVG, SVGRoot, Zoom } from "@dxos/gem-core";
278
278
  import { defaultStyles, Graph as GraphComponent, GraphForceProjector, Markers } from "@dxos/gem-spore";
279
279
  import { filterObjectsSync } from "@dxos/plugin-search";
@@ -293,7 +293,7 @@ var colors = [
293
293
  "[&>circle]:!fill-teal-300 [&>circle]:!stroke-teal-600",
294
294
  "[&>circle]:!fill-indigo-300 [&>circle]:!stroke-indigo-600"
295
295
  ];
296
- var Graph = ({ space, match }) => {
296
+ var Graph = ({ space, match, grid }) => {
297
297
  const model = useMemo(() => space ? new SpaceGraphModel({
298
298
  schema: true
299
299
  }).open(space) : void 0, [
@@ -308,15 +308,15 @@ var Graph = ({ space, match }) => {
308
308
  strength: -100
309
309
  },
310
310
  link: {
311
- distance: 180
311
+ distance: 120
312
312
  },
313
313
  radial: {
314
- radius: 200,
314
+ radius: 150,
315
315
  strength: 0.05
316
316
  }
317
317
  },
318
318
  attributes: {
319
- radius: (node) => node.data?.type === "schema" ? 24 : 12
319
+ radius: (node) => node.data?.type === "schema" ? 12 : 8
320
320
  }
321
321
  }), []);
322
322
  const filteredRef = useRef();
@@ -344,7 +344,7 @@ var Graph = ({ space, match }) => {
344
344
  className: mx(defaultStyles, slots?.root?.className)
345
345
  }, /* @__PURE__ */ React.createElement(Markers, {
346
346
  arrowSize: 6
347
- }), /* @__PURE__ */ React.createElement(Grid, {
347
+ }), grid && /* @__PURE__ */ React.createElement(Grid, {
348
348
  className: slots?.grid?.className ?? defaultGridStyles(themeMode)
349
349
  }), /* @__PURE__ */ React.createElement(Zoom, {
350
350
  extent: [
@@ -369,27 +369,26 @@ var Graph = ({ space, match }) => {
369
369
  node: (node) => {
370
370
  let className;
371
371
  if (node.data) {
372
- const typename = getType2(node.data)?.objectId;
373
- if (typename) {
374
- className = colorMap.get(typename);
375
- if (!className) {
376
- className = colors[colorMap.size % colors.length];
377
- colorMap.set(typename, className);
372
+ const { object } = node.data;
373
+ if (object) {
374
+ const typename = getTypename(object);
375
+ if (typename) {
376
+ className = colorMap.get(typename);
377
+ if (!className) {
378
+ className = colors[colorMap.size % colors.length];
379
+ colorMap.set(typename, className);
380
+ }
378
381
  }
379
382
  }
380
383
  }
381
384
  const selected2 = filteredRef.current?.some((object) => object.id === node.data?.id);
385
+ const blur = !selected2 && !!filteredRef.current?.length;
382
386
  return {
383
- class: mx(filteredRef.current?.length ? selected2 ? [
384
- className
385
- ] : "[&>text]:!fill-neutral-300" : [
386
- "[&>text]:!fill-neutral-700",
387
- className
388
- ])
387
+ class: mx(className, blur && "opacity-70")
389
388
  };
390
389
  },
391
390
  link: () => ({
392
- class: "[&>path]:!stroke-neutral-300"
391
+ class: "[&>path]:!stroke-neutral-300 dark:[&>path]:!stroke-neutral-700"
393
392
  })
394
393
  }
395
394
  }))));
@@ -472,4 +471,4 @@ export {
472
471
  Tree,
473
472
  Graph
474
473
  };
475
- //# sourceMappingURL=chunk-5GTLMW4Q.mjs.map
474
+ //# sourceMappingURL=chunk-TDUEJNAN.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/Graph/graph-model.ts", "../../../src/components/Tree/Tree.tsx", "../../../src/components/Tree/layout/HierarchicalEdgeBundling.ts", "../../../src/components/Tree/layout/RadialTree.ts", "../../../src/components/Tree/layout/TidyTree.ts", "../../../src/components/Tree/types.ts", "../../../src/components/Graph/Graph.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { AST, EchoSchema, ReferenceAnnotationId, type S, SchemaValidator, StoredSchema } from '@dxos/echo-schema';\nimport { type GraphData, type GraphLink, GraphModel } from '@dxos/gem-spore';\nimport { log } from '@dxos/log';\nimport { CollectionType } from '@dxos/plugin-space/types';\nimport { type ReactiveEchoObject, type Space, type Subscription, getSchema, getType } from '@dxos/react-client/echo';\n\nexport type SpaceGraphModelOptions = {\n schema?: boolean;\n};\n\ntype SchemaGraphNode = {\n id: string;\n type: 'schema';\n schema: S.Schema<any>;\n};\n\ntype ObjectGraphNode = {\n id: string;\n type: 'object';\n object: ReactiveEchoObject<any>;\n};\n\nexport type EchoGraphNode = SchemaGraphNode | ObjectGraphNode;\n\n/**\n * Converts ECHO objects to a graph.\n */\nexport class SpaceGraphModel extends GraphModel<EchoGraphNode> {\n private readonly _graph: GraphData<EchoGraphNode> = {\n nodes: [],\n links: [],\n };\n\n private _subscription?: Subscription;\n private _objects?: ReactiveEchoObject<any>[];\n\n constructor(private readonly _options: SpaceGraphModelOptions = {}) {\n super();\n }\n\n override get graph(): GraphData<EchoGraphNode> {\n return this._graph;\n }\n\n get objects(): ReactiveEchoObject<any>[] {\n return this._objects ?? [];\n }\n\n open(space: Space, objectId?: string) {\n if (!this._subscription) {\n // TODO(burdon): Filter.\n const query = space.db.query((object: ReactiveEchoObject<any>) => !(object instanceof CollectionType));\n\n this._subscription = query.subscribe(\n ({ objects }) => {\n this._objects = objects;\n\n // TODO(burdon): Normalize schema.\n this._graph.nodes = objects.map((object) => {\n if (object instanceof StoredSchema) {\n const effectSchema = space.db.schemaRegistry.getSchemaById(object.id)!;\n return { type: 'schema', id: object.id, schema: effectSchema.schema };\n }\n\n return { type: 'object', id: object.id, object };\n });\n\n this._graph.links = objects.reduce<GraphLink[]>((links, object) => {\n const objectSchema = getSchema(object);\n const typename = getType(object)?.objectId;\n if (objectSchema == null || typename == null) {\n log.info('no schema for object:', { id: object.id.slice(0, 8) });\n return links;\n }\n\n if (!(objectSchema instanceof EchoSchema)) {\n const idx = objects.findIndex((obj) => obj.id === typename);\n if (idx === -1) {\n this._graph.nodes.push({\n id: typename,\n type: 'schema',\n schema: objectSchema,\n });\n }\n }\n\n // Link to schema.\n if (this._options.schema) {\n links.push({\n id: `${object.id}-${typename}`,\n source: object.id,\n target: typename,\n });\n }\n\n // Parse schema to follow referenced objects.\n AST.getPropertySignatures(objectSchema.ast).forEach((prop) => {\n if (!SchemaValidator.hasTypeAnnotation(objectSchema, prop.name.toString(), ReferenceAnnotationId)) {\n return;\n }\n const value = object[String(prop.name)];\n if (value) {\n const refs = Array.isArray(value) ? value : [value];\n for (const ref of refs) {\n if (objects.findIndex((obj) => obj.id === ref.id) !== -1) {\n links.push({\n id: `${object.id}-${String(prop.name)}-${ref.id}`,\n source: object.id,\n target: ref.id,\n });\n }\n }\n }\n });\n\n return links;\n }, []);\n\n this.triggerUpdate();\n },\n { fire: true },\n );\n }\n\n this.setSelected(objectId);\n return this;\n }\n\n close() {\n if (this._subscription) {\n this._subscription();\n this._subscription = undefined;\n }\n\n return this;\n }\n}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useEffect, useMemo, useState } from 'react';\nimport { useResizeDetector } from 'react-resize-detector';\n\nimport { type Space } from '@dxos/client/echo';\nimport { createSvgContext, SVG, SVGRoot } from '@dxos/gem-core';\n\nimport { HierarchicalEdgeBundling, RadialTree, TidyTree } from './layout';\nimport { mapGraphToTreeData, type TreeNode } from './types';\nimport { SpaceGraphModel } from '../Graph';\n\n// TODO(burdon): Create dge bundling graph using d3.hierarchy.\n// https://observablehq.com/@d3/hierarchical-edge-bundling?intent=fork\n\ntype Renderer = (svg: SVGSVGElement, data: any, options: any) => void;\n\nexport type LayoutVariant = 'tidy' | 'radial' | 'edge';\n\n// TODO(burdon): Remove slots?\nexport type TreeLayoutSlots = {\n node?: string;\n path?: string;\n text?: string;\n};\n\nexport type TreeOptions = {\n label: (d: any) => string;\n\n slots?: TreeLayoutSlots;\n radius?: number;\n\n width: number;\n height: number;\n margin?: number;\n\n padding?: number;\n // Radius of nodes.\n r?: number;\n};\n\nexport const defaultTreeLayoutSlots: TreeLayoutSlots = {\n node: 'fill-blue-600',\n path: 'fill-none stroke-blue-400 stroke-[0.5px]',\n text: 'stroke-[0.5px] stroke-neutral-700 text-xs', // TODO(burdon): Create box instead of halo.\n};\n\nconst renderers = new Map<LayoutVariant, Renderer>([\n ['tidy', TidyTree],\n ['radial', RadialTree],\n ['edge', HierarchicalEdgeBundling],\n]);\n\nexport type TreeComponentProps<N = unknown> = {\n space: Space;\n selected?: string;\n variant?: LayoutVariant;\n onNodeClick?: (node?: N) => void;\n};\n\n// TODO(burdon): Label accessor.\nexport const Tree = <N,>({ space, selected, variant = 'tidy', onNodeClick }: TreeComponentProps<N>) => {\n const model = useMemo(() => (space ? new SpaceGraphModel().open(space, selected) : undefined), [space, selected]);\n const [tree, setTree] = useState<TreeNode>();\n useEffect(() => {\n return model?.subscribe(() => {\n const tree = mapGraphToTreeData(model);\n setTree(tree);\n }, true);\n }, [model]);\n\n const context = createSvgContext();\n const { ref, width = 0, height = 0 } = useResizeDetector();\n\n useEffect(() => {\n if (width && height) {\n const size = Math.min(width, height);\n const radius = size * 0.4;\n const options = {\n // TODO(burdon): Type.\n label: (d: any) => d.label ?? d.id,\n width,\n height,\n radius,\n marginLeft: (width - radius * 2) / 2,\n marginRight: (width - radius * 2) / 2,\n marginTop: (height - radius * 2) / 2,\n marginBottom: (height - radius * 2) / 2,\n slots: defaultTreeLayoutSlots,\n };\n\n if (tree) {\n const renderer = renderers.get(variant);\n renderer?.(context.ref.current!, tree, options);\n }\n }\n }, [tree, width, height]);\n\n // TODO(burdon): Provider should expand.\n return (\n <div ref={ref} className='flex grow overflow-hidden' onClick={() => onNodeClick?.()}>\n <SVGRoot context={context}>\n <SVG />\n </SVGRoot>\n </div>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n// Copyright 2022 Observable, Inc.\n//\n\nimport * as d3 from 'd3';\nimport { type HierarchyNode } from 'd3-hierarchy';\n\nimport { type TreeOptions } from '../Tree';\nimport { type TreeNode } from '../types';\n\n// Create hierarchical ID.\n// eslint-disable-next-line unused-imports/no-unused-vars\nconst getId = (node: HierarchyNode<TreeNode>): string =>\n `${node.parent ? getId(node.parent) + '/' : ''}${node.data.id.slice(0, 4)}`;\n\n// https://github.com/d3/d3-hierarchy\n// https://observablehq.com/@d3/hierarchical-edge-bundling?intent=fork\nconst HierarchicalEdgeBundling = (s: SVGSVGElement, data: TreeNode, options: TreeOptions) => {\n const svg = d3.select(s);\n svg.selectAll('*').remove();\n\n const { radius = 600, padding = 100, slots } = options;\n\n // https://d3js.org/d3-hierarchy/hierarchy\n const root = d3.hierarchy(flatten(data));\n // .sort((a, b) => d3.ascending(a.height, b.height) || d3.ascending(getName(a.data), getName(b.data)));\n\n const tree = d3.cluster<TreeNode>().size([2 * Math.PI, radius - padding]);\n const layout = tree(addLinks(root));\n\n // eslint-disable-next-line unused-imports/no-unused-vars\n const node = svg\n .append('g')\n .selectAll()\n .data(layout.leaves())\n .join('g')\n .attr('transform', (d) => `rotate(${d.x * (180 / Math.PI) - 90}) translate(${d.y},0)`)\n .append('text')\n .attr('class', slots?.text ?? '')\n .attr('dy', '0.31em') // TODO(burdon): Based on font size.\n .attr('x', (d) => (d.x < Math.PI ? 6 : -6))\n .attr('text-anchor', (d) => (d.x < Math.PI ? 'start' : 'end'))\n .attr('transform', (d) => (d.x >= Math.PI ? 'rotate(180)' : null))\n // .text((d: any) => d.data.id)\n // .each(function (d: any) {\n // d.text = this;\n // })\n // .on('mouseover', overed)\n // .on('mouseout', outed)\n .call(\n (text) => text.text((d: any) => d.data.id.slice(0, 8)),\n // .text((d: any) => `${getId(d)} [${[(d as any).outgoing?.length ?? 0]}]`),\n );\n\n // https://d3js.org/d3-shape/radial-line\n const line = d3\n .lineRadial()\n .curve(d3.curveBundle.beta(0.85))\n .radius((d: any) => d.y)\n .angle((d: any) => d.x);\n\n // eslint-disable-next-line unused-imports/no-unused-vars\n const links = svg\n .append('g')\n .selectAll()\n .data(layout.leaves().flatMap((leaf: any) => leaf.outgoing))\n .join('path')\n .style('mix-blend-mode', 'multiply')\n .attr('class', slots?.path ?? '')\n .attr('d', ([i, o]) => {\n return line(i.path(o));\n })\n .each(function (d) {\n d.path = this;\n });\n\n // function overed(event: any, d: X) {\n // link.style('mix-blend-mode', null);\n // d3.select(this).attr('font-weight', 'bold');\n // d3.selectAll(d.incoming.map((d) => d.path))\n // .attr('stroke', color.in)\n // .raise();\n // d3.selectAll((d as any).incoming.map(([d]) => d.text))\n // .attr('fill', color.in)\n // .attr('font-weight', 'bold');\n // d3.selectAll(d.outgoing.map((d) => d.path))\n // .attr('stroke', color.out)\n // .raise();\n // d3.selectAll(d.outgoing.map(([, d]) => d.text))\n // .attr('fill', color.out)\n // .attr('font-weight', 'bold');\n // }\n\n // function outed(event: any, d: HierarchyNode<Datum>) {\n // // @ts-ignore\n // d3.select(this).attr('font-weight', null);\n // d3.selectAll(d.incoming.map((d) => d.path)).attr('stroke', null);\n // d3.selectAll(d.incoming.map(([d]) => d.text))\n // .attr('fill', null)\n // .attr('font-weight', null);\n // d3.selectAll(d.outgoing.map((d) => d.path)).attr('stroke', null);\n // d3.selectAll(d.outgoing.map(([, d]) => d.text))\n // .attr('fill', null)\n // .attr('font-weight', null);\n // }\n};\n\n// Monkey-patch with incoming/outgoing nodes.\nconst addLinks = (root: HierarchyNode<TreeNode>) => {\n // Map of nodes indexed by ID.\n const nodes = new Map(root.descendants().map((d) => [d.data.id, d]));\n const parents = root.descendants().reduce((map, d) => {\n if (d.children?.length) {\n map.set(d.data.id, d);\n }\n return map;\n }, new Map<string, HierarchyNode<TreeNode>>());\n\n for (const d of root.leaves()) {\n // (d as any).incoming = [];\n\n const parent = parents.get(d.data.id);\n if (parent) {\n // Skip the first node which is a placeholder created by flatten().\n (d as any).outgoing =\n parent.data.children?.slice(1).map((child) => {\n return [d, nodes.get(child.id)!];\n }) ?? [];\n } else {\n (d as any).outgoing = [];\n }\n }\n\n // for (const d of root.leaves()) {\n // for (const [_, o] of (d as any).outgoing) {\n // o.incoming.push(o);\n // }\n // }\n\n return root;\n};\n\n/**\n * We are using a hierarchy in order to group nodes by parent, but we want the parent\n * nodes to be positioned at the first level along with all descendents.\n * So we add a placeholder for all parents at the head of each group.\n * @param node\n */\nconst flatten = (node: TreeNode) => {\n const clone: TreeNode = {\n id: node.id,\n };\n\n // TODO(burdon): NOTE: Should exclude schema (since requires a tree).\n if (node.children?.length) {\n const children = node.children.map((child) => flatten(child));\n clone.children = [{ id: node.id }, ...children];\n }\n\n return clone;\n};\n\nexport default HierarchicalEdgeBundling;\n", "//\n// Copyright 2023 DXOS.org\n// Copyright 2022 Observable, Inc.\n//\n\nimport * as d3 from 'd3';\n\nimport { type TreeOptions } from '../Tree';\n\n// Released under the ISC license.\n// https://observablehq.com/@d3/radial-tree\n// https://observablehq.com/@d3/tree\nconst RadialTree = (s: SVGSVGElement, data: any, options: TreeOptions) => {\n const svg = d3.select(s);\n svg.selectAll('*').remove();\n\n const {\n label, // given a node d, returns the display name\n radius = 400,\n r = 4, // radius of nodes\n slots,\n } = options;\n\n const arc = 2 * Math.PI;\n\n const root = d3.hierarchy(data);\n\n // Sort the nodes.\n // if (sort) {\n // root.sort(sort);\n // }\n\n // Compute labels and titles.\n const descendants = root.descendants();\n const getLabel = label === null ? null : descendants.map((d) => label(d.data));\n\n // Compute the layout.\n const layout = d3\n .tree()\n .size([arc, radius])\n .separation((a: any, b: any) => (a.parent === b.parent ? 1 : 2) / a.depth);\n layout(root);\n\n // Links.\n svg\n .append('g')\n .selectAll('path')\n .data(root.links())\n .join('path')\n .attr('class', slots?.path ?? '')\n .attr(\n 'd',\n d3\n .linkRadial()\n .angle((d: any) => d.x + Math.PI / 2)\n .radius((d: any) => d.y) as any,\n );\n\n // Nodes.\n const node = svg\n .append('g')\n .selectAll('a')\n .data(root.descendants())\n .join('a')\n // .attr('xlink:href', link == null ? null : (d) => link(d.data, d))\n // .attr('target', link == null ? null : linkTarget)\n .attr('transform', (d: any) => `rotate(${(d.x * 180) / Math.PI}) translate(${d.y},0)`);\n\n node\n .append('circle')\n .attr('class', slots?.node ?? '')\n .attr('r', r);\n\n // if (title != null) {\n // node.append('title').text((d) => title(d.data, d));\n // }\n\n // Text.\n if (getLabel) {\n node\n .append('text')\n .attr('transform', (d: any) => `rotate(${d.x >= Math.PI ? 180 : 0})`)\n .attr('dy', '0.32em')\n // eslint-disable-next-line no-mixed-operators\n .attr('x', (d: any) => (d.x < Math.PI === !d.children ? 6 : -6))\n // eslint-disable-next-line no-mixed-operators\n .attr('text-anchor', (d: any) => (d.x < Math.PI === !d.children ? 'start' : 'end'))\n // .attr('paint-order', 'stroke')\n .attr('class', slots?.text ?? '')\n .text((d, i) => getLabel[i]);\n }\n\n return svg.node();\n};\n\nexport default RadialTree;\n", "//\n// Copyright 2023 DXOS.org\n// Copyright 2021 Observable, Inc.\n//\n\nimport * as d3 from 'd3';\n\nimport { type TreeOptions } from '../Tree';\n\n// Released under the ISC license.\n// https://observablehq.com/@d3/tree\nconst TidyTree = (s: SVGSVGElement, data: any, options: TreeOptions) => {\n const svg = d3.select(s);\n svg.selectAll('*').remove();\n\n const { label, width, height, r = 4, padding = 4, margin = 60, slots } = options;\n\n const root = d3.hierarchy(data);\n\n // Compute labels and titles.\n const descendants = root.descendants();\n const getLabel = label == null ? null : descendants.map((d) => label(d.data));\n\n // Compute the layout.\n const dx = 16;\n const dy = width / (root.height + padding);\n const layout = d3.tree().nodeSize([dx, dy]);\n layout(root);\n\n // Center the tree.\n let x0 = Infinity;\n let x1 = -x0;\n let y0 = Infinity;\n let y1 = -y0;\n root.each((d: any) => {\n if (d.x > x1) {\n x1 = d.x;\n }\n if (d.x < x0) {\n x0 = d.x;\n }\n if (d.y > y1) {\n y1 = d.y;\n }\n if (d.y < y0) {\n y0 = d.y;\n }\n });\n\n // TODO(burdon): Option to expand.\n // NOTE: x and y are flipped.\n const sx = Math.min(2, Math.max(1, (height - margin * 2) / (x1 - x0)));\n const oy = -(width - (y1 - y0)) / 2;\n\n // Links.\n svg\n .append('g')\n .selectAll('path')\n .data(root.links())\n .join('path')\n .attr('class', slots?.path ?? '')\n .attr(\n 'd',\n d3\n .link(d3.curveBumpX)\n .x((d: any) => d.y + oy)\n .y((d: any) => d.x * sx) as any,\n );\n\n // Nodes.\n const node = svg\n .append('g')\n .selectAll('a')\n .data(root.descendants())\n .join('a')\n // .attr('xlink:href', link == null ? null : (d) => link(d.data, d))\n // .attr('target', link == null ? null : linkTarget)\n .attr('transform', (d: any) => `translate(${d.y + oy},${d.x * sx})`);\n\n node\n .append('circle')\n .attr('class', slots?.node ?? '')\n .attr('r', r);\n\n // if (title != null) {\n // node.append('title').text((d) => title(d.data, d));\n // }\n\n if (getLabel) {\n node\n .append('text')\n\n .attr('dy', '0.32em')\n .attr('x', (d) => (d.children ? -6 : 6))\n .attr('text-anchor', (d) => (d.children ? 'end' : 'start'))\n // .attr('paint-order', 'stroke')\n .attr('class', slots?.text ?? '')\n .text((d, i) => getLabel[i]);\n }\n};\n\nexport default TidyTree;\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport type { GraphModel } from '@dxos/gem-spore';\n\nexport type TreeNode = {\n id: string;\n label?: string;\n children?: TreeNode[];\n};\n\nexport const mapGraphToTreeData = <N>(model: GraphModel<N>, maxDepth = 8): TreeNode | undefined => {\n const mapNode = (node: N, depth = 0): TreeNode => {\n const treeNode: TreeNode = {\n id: model.idAccessor(node),\n label: model.idAccessor(node).slice(0, 8),\n };\n\n const links = model.graph.links.filter((link) => link.source === treeNode.id);\n if (depth < maxDepth) {\n treeNode.children = links.map((link) =>\n mapNode(model.graph.nodes.find((node) => model.idAccessor(node) === link.target)!, depth + 1),\n );\n }\n\n return treeNode;\n };\n\n let data: TreeNode | undefined;\n if (model.selected) {\n const node = model.graph.nodes.find((node) => model.idAccessor(node) === model.selected);\n if (node) {\n data = mapNode(node);\n }\n }\n\n return data;\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { type FC, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { getTypename, type ReactiveEchoObject, type Space } from '@dxos/client/echo';\nimport { createSvgContext, defaultGridStyles, Grid, SVG, SVGRoot, Zoom } from '@dxos/gem-core';\nimport {\n defaultStyles,\n Graph as GraphComponent,\n GraphForceProjector,\n type GraphLayoutNode,\n Markers,\n} from '@dxos/gem-spore';\nimport { filterObjectsSync, type SearchResult } from '@dxos/plugin-search';\nimport { useThemeContext } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport '@dxos/gem-spore/styles';\n\nimport { type EchoGraphNode, SpaceGraphModel } from './graph-model';\nimport { Tree } from '../Tree';\n\ntype Slots = {\n root?: { className?: string };\n grid?: { className?: string };\n};\n\nconst slots: Slots = {};\n\nconst colors = [\n '[&>circle]:!fill-black-300 [&>circle]:!stroke-black-600',\n '[&>circle]:!fill-slate-300 [&>circle]:!stroke-slate-600',\n '[&>circle]:!fill-green-300 [&>circle]:!stroke-green-600',\n '[&>circle]:!fill-sky-300 [&>circle]:!stroke-sky-600',\n '[&>circle]:!fill-cyan-300 [&>circle]:!stroke-cyan-600',\n '[&>circle]:!fill-rose-300 [&>circle]:!stroke-rose-600',\n '[&>circle]:!fill-purple-300 [&>circle]:!stroke-purple-600',\n '[&>circle]:!fill-orange-300 [&>circle]:!stroke-orange-600',\n '[&>circle]:!fill-teal-300 [&>circle]:!stroke-teal-600',\n '[&>circle]:!fill-indigo-300 [&>circle]:!stroke-indigo-600',\n];\n\nexport type GraphProps = {\n space: Space;\n match?: RegExp;\n grid?: boolean;\n};\n\nexport const Graph: FC<GraphProps> = ({ space, match, grid }) => {\n const model = useMemo(() => (space ? new SpaceGraphModel({ schema: true }).open(space) : undefined), [space]);\n const [selected, setSelected] = useState<string>();\n const { themeMode } = useThemeContext();\n\n const context = createSvgContext();\n const projector = useMemo(\n () =>\n new GraphForceProjector<EchoGraphNode>(context, {\n forces: {\n manyBody: {\n strength: -100,\n },\n link: {\n distance: 120,\n },\n radial: {\n radius: 150,\n strength: 0.05,\n },\n },\n attributes: {\n radius: (node: GraphLayoutNode<EchoGraphNode>) => (node.data?.type === 'schema' ? 12 : 8),\n },\n }),\n [],\n );\n\n const filteredRef = useRef<SearchResult[]>();\n filteredRef.current = filterObjectsSync(model?.objects ?? [], match);\n useEffect(() => {\n void projector.start();\n }, [match]);\n\n const [colorMap] = useState(new Map<string, string>());\n\n if (!model) {\n return null;\n }\n\n if (selected) {\n return <Tree space={space} selected={selected} variant='tidy' onNodeClick={() => setSelected(undefined)} />;\n }\n\n return (\n <SVGRoot context={context}>\n <SVG className={mx(defaultStyles, slots?.root?.className)}>\n <Markers arrowSize={6} />\n {grid && <Grid className={slots?.grid?.className ?? defaultGridStyles(themeMode)} />}\n <Zoom extent={[1 / 2, 4]}>\n <GraphComponent\n model={model}\n projector={projector}\n drag\n arrows\n onSelect={(node) => setSelected(node?.data?.id)}\n labels={{\n text: (node: GraphLayoutNode<ReactiveEchoObject<any>>) => {\n if (filteredRef.current?.length && !filteredRef.current.some((object) => object.id === node.data?.id)) {\n return undefined;\n }\n\n // TODO(burdon): Use schema.\n return node.data?.label ?? node.data?.title ?? node.data?.name ?? node.data?.id.slice(0, 8);\n },\n }}\n attributes={{\n node: (node: GraphLayoutNode<ReactiveEchoObject<any>>) => {\n let className: string | undefined;\n if (node.data) {\n const { object } = node.data;\n if (object) {\n const typename = getTypename(object);\n if (typename) {\n className = colorMap.get(typename);\n if (!className) {\n className = colors[colorMap.size % colors.length];\n colorMap.set(typename, className);\n }\n }\n }\n }\n\n const selected = filteredRef.current?.some((object) => object.id === node.data?.id);\n const blur = !selected && !!filteredRef.current?.length;\n return {\n class: mx(className, blur && 'opacity-70'),\n };\n },\n link: () => ({\n class: '[&>path]:!stroke-neutral-300 dark:[&>path]:!stroke-neutral-700',\n }),\n }}\n />\n </Zoom>\n </SVG>\n </SVGRoot>\n );\n};\n"],
5
+ "mappings": ";AAIA,SAASA,KAAKC,YAAYC,uBAA+BC,iBAAiBC,oBAAoB;AAC9F,SAAyCC,kBAAkB;AAC3D,SAASC,WAAW;AACpB,SAASC,sBAAsB;AAC/B,SAAiEC,WAAWC,eAAe;;AAuBpF,IAAMC,kBAAN,cAA8BL,WAAAA;EASnCM,YAA6BC,WAAmC,CAAC,GAAG;AAClE,UAAK;SADsBA,WAAAA;SARZC,SAAmC;MAClDC,OAAO,CAAA;MACPC,OAAO,CAAA;IACT;EAOA;EAEA,IAAaC,QAAkC;AAC7C,WAAO,KAAKH;EACd;EAEA,IAAII,UAAqC;AACvC,WAAO,KAAKC,YAAY,CAAA;EAC1B;EAEAC,KAAKC,OAAcC,UAAmB;AACpC,QAAI,CAAC,KAAKC,eAAe;AAEvB,YAAMC,QAAQH,MAAMI,GAAGD,MAAM,CAACE,WAAoC,EAAEA,kBAAkBlB,eAAa;AAEnG,WAAKe,gBAAgBC,MAAMG,UACzB,CAAC,EAAET,QAAO,MAAE;AACV,aAAKC,WAAWD;AAGhB,aAAKJ,OAAOC,QAAQG,QAAQU,IAAI,CAACF,WAAAA;AAC/B,cAAIA,kBAAkBrB,cAAc;AAClC,kBAAMwB,eAAeR,MAAMI,GAAGK,e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G;IAACL;GAAM;AAEV,QAAMW,UAAUC,kBAAAA;AAChB,QAAM,EAAEC,KAAKC,QAAQ,GAAGC,SAAS,EAAC,IAAKC,kBAAAA;AAEvCR,EAAAA,WAAU,MAAA;AACR,QAAIM,SAASC,QAAQ;AACnB,YAAME,OAAOC,KAAKC,IAAIL,OAAOC,MAAAA;AAC7B,YAAMK,SAASH,OAAO;AACtB,YAAMI,UAAU;;QAEdC,OAAO,CAACC,MAAWA,EAAED,SAASC,EAAEC;QAChCV;QACAC;QACAK;QACAK,aAAaX,QAAQM,SAAS,KAAK;QACnCM,cAAcZ,QAAQM,SAAS,KAAK;QACpCO,YAAYZ,SAASK,SAAS,KAAK;QACnCQ,eAAeb,SAASK,SAAS,KAAK;QACtCS,OAAO3C;MACT;AAEA,UAAImB,OAAM;AACR,cAAMyB,WAAWxC,UAAUyC,IAAIjC,OAAAA;AAC/BgC,mBAAWnB,QAAQE,IAAImB,SAAU3B,OAAMgB,OAAAA;MACzC;IACF;EACF,GAAG;IAAChB;IAAMS;IAAOC;GAAO;AAGxB,SACE,gBAAAkB,OAAA,cAACC,OAAAA;IAAIrB;IAAUsB,WAAU;IAA4BC,SAAS,MAAMrC,cAAAA;KAClE,gBAAAkC,OAAA,cAACI,UAAAA;IAAQ1B;KACP,gBAAAsB,OAAA,cAACK,MAAAA,IAAAA,CAAAA,CAAAA;AAIT;",
6
+ "names": ["AST", "EchoSchema", "ReferenceAnnotationId", "SchemaValidator", "StoredSchema", "GraphModel", "log", "CollectionType", "getSchema", "getType", "SpaceGraphModel", "constructor", "_options", "_graph", "nodes", "links", "graph", "objects", "_objects", "open", "space", "objectId", "_subscription", "query", "db", "object", "subscribe", "map", "effectSchema", "schemaRegistry", "getSchemaById", "id", "type", "schema", "reduce", "objectSchema", "typename", "info", "slice", "idx", "findIndex", "obj", "push", "source", "target", "getPropertySignatures", "ast", "forEach", "prop", "hasTypeAnnotation", "name", "toString", "value", "String", "refs", "Array", "isArray", "ref", "triggerUpdate", "fire", "setSelected", "close", "undefined", "React", "useEffect", "useMemo", "useState", "useResizeDetector", "createSvgContext", "SVG", "SVGRoot", "d3", "HierarchicalEdgeBundling", "s", "data", "options", "svg", "select", "selectAll", "remove", "radius", "padding", "slots", "root", "hierarchy", "flatten", "tree", "cluster", "size", "Math", "PI", "layout", "addLinks", "node", "append", "leaves", "join", "attr", "d", "x", "y", "text", "call", "id", "slice", "line", "lineRadial", "curve", "curveBundle", "beta", "angle", "links", "flatMap", "leaf", "outgoing", "style", "path", "i", "o", "each", "nodes", "Map", "descendants", "map", "parents", "reduce", "children", "length", "set", "parent", "get", "child", "clone", "d3", "RadialTree", "s", "data", "options", "svg", "select", "selectAll", "remove", "label", "radius", "r", "slots", "arc", "Math", "PI", "root", "hierarchy", "descendants", "getLabel", "map", "d", "layout", "tree", "size", "separation", "a", "b", "parent", "depth", "append", "links", "join", "attr", "path", "linkRadial", "angle", "x", "y", "node", "children", "text", "i", "d3", "TidyTree", "s", "data", "options", "svg", "select", "selectAll", "remove", "label", "width", "height", "r", "padding", "margin", "slots", "root", "hierarchy", "descendants", "getLabel", "map", "d", "dx", "dy", "layout", "tree", "nodeSize", "x0", "Infinity", "x1", "y0", "y1", "each", "x", "y", "sx", "Math", "min", "max", "oy", "append", "links", "join", "attr", "path", "link", "curveBumpX", "node", "children", "text", "i", "mapGraphToTreeData", "model", "maxDepth", "mapNode", "node", "depth", "treeNode", "id", "idAccessor", "label", "slice", "links", "graph", "filter", "link", "source", "children", "map", "nodes", "find", "target", "data", "selected", "React", "useEffect", "useMemo", "useRef", "useState", "getTypename", "createSvgContext", "defaultGridStyles", "Grid", "SVG", "SVGRoot", "Zoom", "defaultStyles", "Graph", "GraphComponent", "GraphForceProjector", "Markers", "filterObjectsSync", "useThemeContext", "mx", "slots", "colors", "Graph", "space", "match", "grid", "model", "useMemo", "SpaceGraphModel", "schema", "open", "undefined", "selected", "setSelected", "useState", "themeMode", "useThemeContext", "context", "createSvgContext", "projector", "GraphForceProjector", "forces", "manyBody", "strength", "link", "distance", "radial", "radius", "attributes", "node", "data", "type", "filteredRef", "useRef", "current", "filterObjectsSync", "objects", "useEffect", "start", "colorMap", "Map", "Tree", "variant", "onNodeClick", "SVGRoot", "SVG", "className", "mx", "defaultStyles", "root", "Markers", "arrowSize", "Grid", "defaultGridStyles", "Zoom", "extent", "GraphComponent", "drag", "arrows", "onSelect", "id", "labels", "text", "length", "some", "object", "label", "title", "name", "slice", "typename", "getTypename", "get", "size", "set", "blur", "class", "defaultTreeLayoutSlots", "node", "path", "text", "renderers", "Map", "TidyTree", "RadialTree", "HierarchicalEdgeBundling", "Tree", "space", "selected", "variant", "onNodeClick", "model", "useMemo", "SpaceGraphModel", "open", "undefined", "tree", "setTree", "useState", "useEffect", "subscribe", "mapGraphToTreeData", "context", "createSvgContext", "ref", "width", "height", "useResizeDetector", "size", "Math", "min", "radius", "options", "label", "d", "id", "marginLeft", "marginRight", "marginTop", "marginBottom", "slots", "renderer", "get", "current", "React", "div", "className", "onClick", "SVGRoot", "SVG"]
7
+ }
@@ -10822,11 +10822,11 @@ var Globe = ({ items = [], accessor, projection = "orthographic", options = defa
10822
10822
 
10823
10823
  // packages/plugins/experimental/plugin-explorer/src/components/index.ts
10824
10824
  import { lazy } from "react";
10825
- var ExplorerContainer = lazy(() => import("./ExplorerContainer-A7UBZ3QP.mjs"));
10825
+ var ExplorerContainer = lazy(() => import("./ExplorerContainer-THLT3CQZ.mjs"));
10826
10826
 
10827
10827
  export {
10828
10828
  Chart,
10829
10829
  Globe,
10830
10830
  ExplorerContainer
10831
10831
  };
10832
- //# sourceMappingURL=chunk-DTAFIUA7.mjs.map
10832
+ //# sourceMappingURL=chunk-YN4YVXVL.mjs.map
@@ -2,35 +2,40 @@ import {
2
2
  Chart,
3
3
  ExplorerContainer,
4
4
  Globe
5
- } from "./chunk-DTAFIUA7.mjs";
5
+ } from "./chunk-YN4YVXVL.mjs";
6
6
  import {
7
7
  Graph,
8
8
  SpaceGraphModel,
9
9
  Tree,
10
10
  defaultTreeLayoutSlots
11
- } from "./chunk-5GTLMW4Q.mjs";
11
+ } from "./chunk-TDUEJNAN.mjs";
12
12
  import {
13
13
  ExplorerAction,
14
14
  ViewType
15
- } from "./chunk-Q4MVJ6YE.mjs";
15
+ } from "./chunk-PMHCTMKT.mjs";
16
16
  import {
17
17
  EXPLORER_PLUGIN,
18
18
  meta
19
- } from "./chunk-D67EYME2.mjs";
19
+ } from "./chunk-QOKAZK4V.mjs";
20
20
 
21
21
  // packages/plugins/experimental/plugin-explorer/src/ExplorerPlugin.tsx
22
- import { Capabilities, contributes, createIntent, defineModule, definePlugin, Events, oneOf } from "@dxos/app-framework";
22
+ import { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from "@dxos/app-framework";
23
23
  import { ClientCapabilities, ClientEvents } from "@dxos/plugin-client";
24
+ import { SpaceCapabilities } from "@dxos/plugin-space";
25
+ import { defineObjectForm } from "@dxos/plugin-space/types";
24
26
 
25
27
  // packages/plugins/experimental/plugin-explorer/src/capabilities/index.ts
26
28
  import { lazy } from "@dxos/app-framework";
27
- var IntentResolver = lazy(() => import("./intent-resolver-DADUM6T5.mjs"));
28
- var ReactSurface = lazy(() => import("./react-surface-FW4Q2UQM.mjs"));
29
+ var IntentResolver = lazy(() => import("./intent-resolver-UJNDAIDZ.mjs"));
30
+ var ReactSurface = lazy(() => import("./react-surface-UMUN6CTH.mjs"));
29
31
 
30
32
  // packages/plugins/experimental/plugin-explorer/src/translations.ts
31
33
  var translations_default = [
32
34
  {
33
35
  "en-US": {
36
+ [ViewType.typename]: {
37
+ "typename label": "Explorer"
38
+ },
34
39
  [EXPLORER_PLUGIN]: {
35
40
  "plugin name": "Explorer",
36
41
  "object title label": "Title",
@@ -50,11 +55,10 @@ var ExplorerPlugin = () => definePlugin(meta, [
50
55
  }),
51
56
  defineModule({
52
57
  id: `${meta.id}/module/metadata`,
53
- activatesOn: oneOf(Events.Startup, Events.SetupAppGraph),
58
+ activatesOn: Events.SetupMetadata,
54
59
  activate: () => contributes(Capabilities.Metadata, {
55
60
  id: ViewType.typename,
56
61
  metadata: {
57
- createObject: (props) => createIntent(ExplorerAction.Create, props),
58
62
  placeholder: [
59
63
  "object title placeholder",
60
64
  {
@@ -65,21 +69,29 @@ var ExplorerPlugin = () => definePlugin(meta, [
65
69
  }
66
70
  })
67
71
  }),
72
+ defineModule({
73
+ id: `${meta.id}/module/object-form`,
74
+ activatesOn: ClientEvents.SetupSchema,
75
+ activate: () => contributes(SpaceCapabilities.ObjectForm, defineObjectForm({
76
+ objectSchema: ViewType,
77
+ getIntent: () => createIntent(ExplorerAction.Create)
78
+ }))
79
+ }),
68
80
  defineModule({
69
81
  id: `${meta.id}/module/schema`,
70
- activatesOn: ClientEvents.SetupClient,
82
+ activatesOn: ClientEvents.SetupSchema,
71
83
  activate: () => contributes(ClientCapabilities.Schema, [
72
84
  ViewType
73
85
  ])
74
86
  }),
75
87
  defineModule({
76
88
  id: `${meta.id}/module/react-surface`,
77
- activatesOn: Events.Startup,
89
+ activatesOn: Events.SetupReactSurface,
78
90
  activate: ReactSurface
79
91
  }),
80
92
  defineModule({
81
93
  id: `${meta.id}/module/intent-resolver`,
82
- activatesOn: Events.SetupIntents,
94
+ activatesOn: Events.SetupIntentResolver,
83
95
  activate: IntentResolver
84
96
  })
85
97
  ]);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/ExplorerPlugin.tsx", "../../../src/capabilities/index.ts", "../../../src/translations.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport {\n Capabilities,\n contributes,\n createIntent,\n defineModule,\n definePlugin,\n Events,\n oneOf,\n} from '@dxos/app-framework';\nimport { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';\n\nimport { IntentResolver, ReactSurface } from './capabilities';\nimport { EXPLORER_PLUGIN, meta } from './meta';\nimport translations from './translations';\nimport { ViewType, ExplorerAction } from './types';\n\nexport const ExplorerPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/metadata`,\n activatesOn: oneOf(Events.Startup, Events.SetupAppGraph),\n activate: () =>\n contributes(Capabilities.Metadata, {\n id: ViewType.typename,\n metadata: {\n createObject: (props: { name?: string }) => createIntent(ExplorerAction.Create, props),\n placeholder: ['object title placeholder', { ns: EXPLORER_PLUGIN }],\n icon: 'ph--graph--regular',\n },\n }),\n }),\n defineModule({\n id: `${meta.id}/module/schema`,\n activatesOn: ClientEvents.SetupClient,\n activate: () => contributes(ClientCapabilities.Schema, [ViewType]),\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.Startup,\n activate: ReactSurface,\n }),\n defineModule({\n id: `${meta.id}/module/intent-resolver`,\n activatesOn: Events.SetupIntents,\n activate: IntentResolver,\n }),\n ]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const IntentResolver = lazy(() => import('./intent-resolver'));\nexport const ReactSurface = lazy(() => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { EXPLORER_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [EXPLORER_PLUGIN]: {\n 'plugin name': 'Explorer',\n 'object title label': 'Title',\n 'object title placeholder': 'New explorer',\n 'create object label': 'Create explorer',\n },\n },\n },\n];\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;AAIA,SACEA,cACAC,aACAC,cACAC,cACAC,cACAC,QACAC,aACK;AACP,SAASC,oBAAoBC,oBAAoB;;;ACTjD,SAASC,YAAY;AAEd,IAAMC,iBAAiBC,KAAK,MAAM,OAAO,gCAAA,CAAA;AACzC,IAAMC,eAAeD,KAAK,MAAM,OAAO,8BAAA,CAAA;;;ACD9C,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACE,eAAAA,GAAkB;QACjB,eAAe;QACf,sBAAsB;QACtB,4BAA4B;QAC5B,uBAAuB;MACzB;IACF;EACF;;;;AFIK,IAAMC,iBAAiB,MAC5BC,aAAaC,MAAM;EACjBC,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOC;IACpBC,UAAU,MAAMC,YAAYC,aAAaC,cAAcC,oBAAAA;EACzD,CAAA;EACAT,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaQ,MAAMP,OAAOQ,SAASR,OAAOS,aAAa;IACvDP,UAAU,MACRC,YAAYC,aAAaM,UAAU;MACjCZ,IAAIa,SAASC;MACbC,UAAU;QACRC,cAAc,CAACC,UAA6BC,aAAaC,eAAeC,QAAQH,KAAAA;QAChFI,aAAa;UAAC;UAA4B;YAAEC,IAAIC;UAAgB;;QAChEC,MAAM;MACR;IACF,CAAA;EACJ,CAAA;EACAzB,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAawB,aAAaC;IAC1BtB,UAAU,MAAMC,YAAYsB,mBAAmBC,QAAQ;MAACf;KAAS;EACnE,CAAA;EACAd,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOQ;IACpBN,UAAUyB;EACZ,CAAA;EACA9B,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAO4B;IACpB1B,UAAU2B;EACZ,CAAA;CACD;",
6
- "names": ["Capabilities", "contributes", "createIntent", "defineModule", "definePlugin", "Events", "oneOf", "ClientCapabilities", "ClientEvents", "lazy", "IntentResolver", "lazy", "ReactSurface", "EXPLORER_PLUGIN", "ExplorerPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "oneOf", "Startup", "SetupAppGraph", "Metadata", "ViewType", "typename", "metadata", "createObject", "props", "createIntent", "ExplorerAction", "Create", "placeholder", "ns", "EXPLORER_PLUGIN", "icon", "ClientEvents", "SetupClient", "ClientCapabilities", "Schema", "ReactSurface", "SetupIntents", "IntentResolver"]
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from '@dxos/app-framework';\nimport { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';\nimport { SpaceCapabilities } from '@dxos/plugin-space';\nimport { defineObjectForm } from '@dxos/plugin-space/types';\n\nimport { IntentResolver, ReactSurface } from './capabilities';\nimport { EXPLORER_PLUGIN, meta } from './meta';\nimport translations from './translations';\nimport { ViewType, ExplorerAction } from './types';\n\nexport const ExplorerPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/metadata`,\n activatesOn: Events.SetupMetadata,\n activate: () =>\n contributes(Capabilities.Metadata, {\n id: ViewType.typename,\n metadata: {\n placeholder: ['object title placeholder', { ns: EXPLORER_PLUGIN }],\n icon: 'ph--graph--regular',\n },\n }),\n }),\n defineModule({\n id: `${meta.id}/module/object-form`,\n activatesOn: ClientEvents.SetupSchema,\n activate: () =>\n contributes(\n SpaceCapabilities.ObjectForm,\n defineObjectForm({\n objectSchema: ViewType,\n getIntent: () => createIntent(ExplorerAction.Create),\n }),\n ),\n }),\n defineModule({\n id: `${meta.id}/module/schema`,\n activatesOn: ClientEvents.SetupSchema,\n activate: () => contributes(ClientCapabilities.Schema, [ViewType]),\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.SetupReactSurface,\n activate: ReactSurface,\n }),\n defineModule({\n id: `${meta.id}/module/intent-resolver`,\n activatesOn: Events.SetupIntentResolver,\n activate: IntentResolver,\n }),\n ]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const IntentResolver = lazy(() => import('./intent-resolver'));\nexport const ReactSurface = lazy(() => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { EXPLORER_PLUGIN } from './meta';\nimport { ViewType } from './types';\n\nexport default [\n {\n 'en-US': {\n [ViewType.typename]: {\n 'typename label': 'Explorer',\n },\n [EXPLORER_PLUGIN]: {\n 'plugin name': 'Explorer',\n 'object title label': 'Title',\n 'object title placeholder': 'New explorer',\n 'create object label': 'Create explorer',\n },\n },\n },\n];\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;AAIA,SAASA,cAAcC,aAAaC,cAAcC,cAAcC,cAAcC,cAAc;AAC5F,SAASC,oBAAoBC,oBAAoB;AACjD,SAASC,yBAAyB;AAClC,SAASC,wBAAwB;;;ACHjC,SAASC,YAAY;AAEd,IAAMC,iBAAiBC,KAAK,MAAM,OAAO,gCAAA,CAAA;AACzC,IAAMC,eAAeD,KAAK,MAAM,OAAO,8BAAA,CAAA;;;ACA9C,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACE,SAASC,QAAQ,GAAG;QACnB,kBAAkB;MACpB;MACA,CAACC,eAAAA,GAAkB;QACjB,eAAe;QACf,sBAAsB;QACtB,4BAA4B;QAC5B,uBAAuB;MACzB;IACF;EACF;;;;AFNK,IAAMC,iBAAiB,MAC5BC,aAAaC,MAAM;EACjBC,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOC;IACpBC,UAAU,MAAMC,YAAYC,aAAaC,cAAcC,oBAAAA;EACzD,CAAA;EACAT,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOO;IACpBL,UAAU,MACRC,YAAYC,aAAaI,UAAU;MACjCV,IAAIW,SAASC;MACbC,UAAU;QACRC,aAAa;UAAC;UAA4B;YAAEC,IAAIC;UAAgB;;QAChEC,MAAM;MACR;IACF,CAAA;EACJ,CAAA;EACAlB,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaiB,aAAaC;IAC1Bf,UAAU,MACRC,YACEe,kBAAkBC,YAClBC,iBAAiB;MACfC,cAAcZ;MACda,WAAW,MAAMC,aAAaC,eAAeC,MAAM;IACrD,CAAA,CAAA;EAEN,CAAA;EACA5B,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaiB,aAAaC;IAC1Bf,UAAU,MAAMC,YAAYuB,mBAAmBC,QAAQ;MAAClB;KAAS;EACnE,CAAA;EACAZ,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAO4B;IACpB1B,UAAU2B;EACZ,CAAA;EACAhC,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAO8B;IACpB5B,UAAU6B;EACZ,CAAA;CACD;",
6
+ "names": ["Capabilities", "contributes", "createIntent", "defineModule", "definePlugin", "Events", "ClientCapabilities", "ClientEvents", "SpaceCapabilities", "defineObjectForm", "lazy", "IntentResolver", "lazy", "ReactSurface", "ViewType", "typename", "EXPLORER_PLUGIN", "ExplorerPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "SetupMetadata", "Metadata", "ViewType", "typename", "metadata", "placeholder", "ns", "EXPLORER_PLUGIN", "icon", "ClientEvents", "SetupSchema", "SpaceCapabilities", "ObjectForm", "defineObjectForm", "objectSchema", "getIntent", "createIntent", "ExplorerAction", "Create", "ClientCapabilities", "Schema", "SetupReactSurface", "ReactSurface", "SetupIntentResolver", "IntentResolver"]
7
7
  }
@@ -1,21 +1,24 @@
1
1
  import {
2
2
  ExplorerAction,
3
3
  ViewType
4
- } from "./chunk-Q4MVJ6YE.mjs";
5
- import "./chunk-D67EYME2.mjs";
4
+ } from "./chunk-PMHCTMKT.mjs";
5
+ import "./chunk-QOKAZK4V.mjs";
6
6
 
7
7
  // packages/plugins/experimental/plugin-explorer/src/capabilities/intent-resolver.ts
8
8
  import { contributes, Capabilities, createResolver } from "@dxos/app-framework";
9
9
  import { create } from "@dxos/live-object";
10
- var intent_resolver_default = () => contributes(Capabilities.IntentResolver, createResolver(ExplorerAction.Create, ({ name }) => ({
11
- data: {
12
- object: create(ViewType, {
13
- name,
14
- type: ""
15
- })
16
- }
17
- })));
10
+ var intent_resolver_default = () => contributes(Capabilities.IntentResolver, createResolver({
11
+ intent: ExplorerAction.Create,
12
+ resolve: ({ name }) => ({
13
+ data: {
14
+ object: create(ViewType, {
15
+ name,
16
+ type: ""
17
+ })
18
+ }
19
+ })
20
+ }));
18
21
  export {
19
22
  intent_resolver_default as default
20
23
  };
21
- //# sourceMappingURL=intent-resolver-DADUM6T5.mjs.map
24
+ //# sourceMappingURL=intent-resolver-UJNDAIDZ.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/capabilities/intent-resolver.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { contributes, Capabilities, createResolver } from '@dxos/app-framework';\nimport { create } from '@dxos/live-object';\n\nimport { ExplorerAction, ViewType } from '../types';\n\nexport default () =>\n contributes(\n Capabilities.IntentResolver,\n createResolver(ExplorerAction.Create, ({ name }) => ({\n data: { object: create(ViewType, { name, type: '' }) },\n })),\n );\n"],
5
- "mappings": ";;;;;;;AAIA,SAASA,aAAaC,cAAcC,sBAAsB;AAC1D,SAASC,cAAc;AAIvB,IAAA,0BAAe,MACbC,YACEC,aAAaC,gBACbC,eAAeC,eAAeC,QAAQ,CAAC,EAAEC,KAAI,OAAQ;EACnDC,MAAM;IAAEC,QAAQC,OAAOC,UAAU;MAAEJ;MAAMK,MAAM;IAAG,CAAA;EAAG;AACvD,EAAA,CAAA;",
6
- "names": ["contributes", "Capabilities", "createResolver", "create", "contributes", "Capabilities", "IntentResolver", "createResolver", "ExplorerAction", "Create", "name", "data", "object", "create", "ViewType", "type"]
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { contributes, Capabilities, createResolver } from '@dxos/app-framework';\nimport { create } from '@dxos/live-object';\n\nimport { ExplorerAction, ViewType } from '../types';\n\nexport default () =>\n contributes(\n Capabilities.IntentResolver,\n createResolver({\n intent: ExplorerAction.Create,\n resolve: ({ name }) => ({\n data: { object: create(ViewType, { name, type: '' }) },\n }),\n }),\n );\n"],
5
+ "mappings": ";;;;;;;AAIA,SAASA,aAAaC,cAAcC,sBAAsB;AAC1D,SAASC,cAAc;AAIvB,IAAA,0BAAe,MACbC,YACEC,aAAaC,gBACbC,eAAe;EACbC,QAAQC,eAAeC;EACvBC,SAAS,CAAC,EAAEC,KAAI,OAAQ;IACtBC,MAAM;MAAEC,QAAQC,OAAOC,UAAU;QAAEJ;QAAMK,MAAM;MAAG,CAAA;IAAG;EACvD;AACF,CAAA,CAAA;",
6
+ "names": ["contributes", "Capabilities", "createResolver", "create", "contributes", "Capabilities", "IntentResolver", "createResolver", "intent", "ExplorerAction", "Create", "resolve", "name", "data", "object", "create", "ViewType", "type"]
7
7
  }