@dxos/plugin-graph 0.6.14-main.f49f251 → 0.6.14-staging.77003c1

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.
@@ -0,0 +1,11 @@
1
+ // packages/plugins/plugin-graph/src/meta.ts
2
+ var GRAPH_PLUGIN = "dxos.org/plugin/graph";
3
+ var meta_default = {
4
+ id: GRAPH_PLUGIN
5
+ };
6
+
7
+ export {
8
+ GRAPH_PLUGIN,
9
+ meta_default
10
+ };
11
+ //# sourceMappingURL=chunk-SYPRW7IK.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 GRAPH_PLUGIN = 'dxos.org/plugin/graph';\n\nexport default {\n id: GRAPH_PLUGIN,\n} satisfies PluginMeta;\n"],
5
+ "mappings": ";AAMO,IAAMA,eAAe;AAE5B,IAAA,eAAe;EACbC,IAAID;AACN;",
6
+ "names": ["GRAPH_PLUGIN", "id"]
7
+ }
@@ -1,11 +1,14 @@
1
1
  import {
2
+ GRAPH_PLUGIN,
2
3
  meta_default
3
- } from "./chunk-4OVHWC4C.mjs";
4
+ } from "./chunk-SYPRW7IK.mjs";
4
5
 
5
6
  // packages/plugins/plugin-graph/src/GraphPlugin.tsx
7
+ import { effect } from "@preact/signals-core";
6
8
  import React from "react";
7
9
  import { filterPlugins, parseGraphBuilderPlugin } from "@dxos/app-framework";
8
10
  import { GraphBuilder } from "@dxos/app-graph";
11
+ import { debounce } from "@dxos/async";
9
12
 
10
13
  // packages/plugins/plugin-graph/src/GraphContext.ts
11
14
  import { createContext, useContext } from "react";
@@ -14,12 +17,25 @@ var GraphContext = createContext(null);
14
17
  var useGraph = () => useContext(GraphContext) ?? raise(new Error("Missing GraphContext"));
15
18
 
16
19
  // packages/plugins/plugin-graph/src/GraphPlugin.tsx
20
+ var KEY = `${GRAPH_PLUGIN}/graph`;
17
21
  var GraphPlugin = () => {
18
- const builder = new GraphBuilder();
22
+ const builder = GraphBuilder.from(localStorage.getItem(KEY) ?? void 0);
23
+ let unsubscribe;
19
24
  return {
20
25
  meta: meta_default,
21
26
  ready: async (plugins) => {
22
27
  filterPlugins(plugins, parseGraphBuilderPlugin).forEach((plugin) => builder.addExtension(plugin.provides.graph.builder(plugins)));
28
+ await builder.initialize();
29
+ unsubscribe = effect(debounce(() => {
30
+ localStorage.setItem(`${GRAPH_PLUGIN}/graph`, builder.graph.pickle());
31
+ }, 1e3));
32
+ const composer = window.composer;
33
+ if (typeof composer === "object") {
34
+ composer.graph = builder.graph;
35
+ }
36
+ },
37
+ unload: async () => {
38
+ unsubscribe?.();
23
39
  },
24
40
  provides: {
25
41
  graph: builder.graph,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/GraphPlugin.tsx", "../../../src/GraphContext.ts", "../../../src/index.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { filterPlugins, type GraphProvides, type PluginDefinition, parseGraphBuilderPlugin } from '@dxos/app-framework';\nimport { GraphBuilder } from '@dxos/app-graph';\n\nimport { GraphContext } from './GraphContext';\nimport meta from './meta';\n\n/**\n * Manages the state of the graph for the application.\n * Enables other plugins to register node builders to add nodes to the graph.\n * This includes actions and annotation each other's nodes.\n */\nexport const GraphPlugin = (): PluginDefinition<GraphProvides> => {\n const builder = new GraphBuilder();\n\n return {\n meta,\n ready: async (plugins) => {\n filterPlugins(plugins, parseGraphBuilderPlugin).forEach((plugin) =>\n builder.addExtension(plugin.provides.graph.builder(plugins)),\n );\n },\n provides: {\n graph: builder.graph,\n // TODO(wittjosiah): This is janky.\n explore: (options) => builder.explore(options),\n context: ({ children }) => (\n <GraphContext.Provider value={{ graph: builder.graph }}>{children}</GraphContext.Provider>\n ),\n },\n };\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\n// TODO(wittjosiah): State can be a GraphNode.\nimport { type Context, createContext, useContext } from 'react';\n\nimport { type Graph } from '@dxos/app-graph';\nimport { raise } from '@dxos/debug';\n\nexport type GraphContext = { graph: Graph };\n\nexport const GraphContext: Context<GraphContext | null> = createContext<GraphContext | null>(null);\n\nexport const useGraph = (): GraphContext => useContext(GraphContext) ?? raise(new Error('Missing GraphContext'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { GraphPlugin } from './GraphPlugin';\n\nexport default GraphPlugin;\n\nexport * from '@dxos/app-graph';\n\nexport * from './GraphContext';\nexport * from './GraphPlugin';\n"],
5
- "mappings": ";;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,eAA0DC,+BAA+B;AAClG,SAASC,oBAAoB;;;ACF7B,SAAuBC,eAAeC,kBAAkB;AAGxD,SAASC,aAAa;AAIf,IAAMC,eAA6CC,cAAmC,IAAA;AAEtF,IAAMC,WAAW,MAAoBC,WAAWH,YAAAA,KAAiBI,MAAM,IAAIC,MAAM,sBAAA,CAAA;;;ADGjF,IAAMC,cAAc,MAAA;AACzB,QAAMC,UAAU,IAAIC,aAAAA;AAEpB,SAAO;IACLC;IACAC,OAAO,OAAOC,YAAAA;AACZC,oBAAcD,SAASE,uBAAAA,EAAyBC,QAAQ,CAACC,WACvDR,QAAQS,aAAaD,OAAOE,SAASC,MAAMX,QAAQI,OAAAA,CAAAA,CAAAA;IAEvD;IACAM,UAAU;MACRC,OAAOX,QAAQW;;MAEfC,SAAS,CAACC,YAAYb,QAAQY,QAAQC,OAAAA;MACtCC,SAAS,CAAC,EAAEC,SAAQ,MAClB,sBAAA,cAACC,aAAaC,UAAQ;QAACC,OAAO;UAAEP,OAAOX,QAAQW;QAAM;SAAII,QAAAA;IAE7D;EACF;AACF;;;AE5BA,cAAc;AAFd,IAAA,cAAeI;",
6
- "names": ["React", "filterPlugins", "parseGraphBuilderPlugin", "GraphBuilder", "createContext", "useContext", "raise", "GraphContext", "createContext", "useGraph", "useContext", "raise", "Error", "GraphPlugin", "builder", "GraphBuilder", "meta", "ready", "plugins", "filterPlugins", "parseGraphBuilderPlugin", "forEach", "plugin", "addExtension", "provides", "graph", "explore", "options", "context", "children", "GraphContext", "Provider", "value", "GraphPlugin"]
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { effect } from '@preact/signals-core';\nimport React from 'react';\n\nimport { filterPlugins, type GraphProvides, type PluginDefinition, parseGraphBuilderPlugin } from '@dxos/app-framework';\nimport { GraphBuilder } from '@dxos/app-graph';\nimport { debounce, type UnsubscribeCallback } from '@dxos/async';\n\nimport { GraphContext } from './GraphContext';\nimport meta, { GRAPH_PLUGIN } from './meta';\n\nconst KEY = `${GRAPH_PLUGIN}/graph`;\n\n/**\n * Manages the state of the graph for the application.\n * Enables other plugins to register node builders to add nodes to the graph.\n * This includes actions and annotation each other's nodes.\n */\nexport const GraphPlugin = (): PluginDefinition<GraphProvides> => {\n const builder = GraphBuilder.from(localStorage.getItem(KEY) ?? undefined);\n let unsubscribe: UnsubscribeCallback | undefined;\n\n return {\n meta,\n ready: async (plugins) => {\n filterPlugins(plugins, parseGraphBuilderPlugin).forEach((plugin) =>\n builder.addExtension(plugin.provides.graph.builder(plugins)),\n );\n\n await builder.initialize();\n\n unsubscribe = effect(\n debounce(() => {\n localStorage.setItem(`${GRAPH_PLUGIN}/graph`, builder.graph.pickle());\n }, 1000),\n );\n\n // Expose the graph to the window for debugging.\n const composer = (window as any).composer;\n if (typeof composer === 'object') {\n composer.graph = builder.graph;\n }\n },\n unload: async () => {\n unsubscribe?.();\n },\n provides: {\n graph: builder.graph,\n // TODO(wittjosiah): This is janky.\n explore: (options) => builder.explore(options),\n context: ({ children }) => (\n <GraphContext.Provider value={{ graph: builder.graph }}>{children}</GraphContext.Provider>\n ),\n },\n };\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\n// TODO(wittjosiah): State can be a GraphNode.\nimport { type Context, createContext, useContext } from 'react';\n\nimport { type Graph } from '@dxos/app-graph';\nimport { raise } from '@dxos/debug';\n\nexport type GraphContext = { graph: Graph };\n\nexport const GraphContext: Context<GraphContext | null> = createContext<GraphContext | null>(null);\n\nexport const useGraph = (): GraphContext => useContext(GraphContext) ?? raise(new Error('Missing GraphContext'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { GraphPlugin } from './GraphPlugin';\n\nexport default GraphPlugin;\n\nexport * from '@dxos/app-graph';\n\nexport * from './GraphContext';\nexport * from './GraphPlugin';\n"],
5
+ "mappings": ";;;;;;AAIA,SAASA,cAAc;AACvB,OAAOC,WAAW;AAElB,SAASC,eAA0DC,+BAA+B;AAClG,SAASC,oBAAoB;AAC7B,SAASC,gBAA0C;;;ACJnD,SAAuBC,eAAeC,kBAAkB;AAGxD,SAASC,aAAa;AAIf,IAAMC,eAA6CC,cAAmC,IAAA;AAEtF,IAAMC,WAAW,MAAoBC,WAAWH,YAAAA,KAAiBI,MAAM,IAAIC,MAAM,sBAAA,CAAA;;;ADAxF,IAAMC,MAAM,GAAGC,YAAAA;AAOR,IAAMC,cAAc,MAAA;AACzB,QAAMC,UAAUC,aAAaC,KAAKC,aAAaC,QAAQP,GAAAA,KAAQQ,MAAAA;AAC/D,MAAIC;AAEJ,SAAO;IACLC;IACAC,OAAO,OAAOC,YAAAA;AACZC,oBAAcD,SAASE,uBAAAA,EAAyBC,QAAQ,CAACC,WACvDb,QAAQc,aAAaD,OAAOE,SAASC,MAAMhB,QAAQS,OAAAA,CAAAA,CAAAA;AAGrD,YAAMT,QAAQiB,WAAU;AAExBX,oBAAcY,OACZC,SAAS,MAAA;AACPhB,qBAAaiB,QAAQ,GAAGtB,YAAAA,UAAsBE,QAAQgB,MAAMK,OAAM,CAAA;MACpE,GAAG,GAAA,CAAA;AAIL,YAAMC,WAAYC,OAAeD;AACjC,UAAI,OAAOA,aAAa,UAAU;AAChCA,iBAASN,QAAQhB,QAAQgB;MAC3B;IACF;IACAQ,QAAQ,YAAA;AACNlB,oBAAAA;IACF;IACAS,UAAU;MACRC,OAAOhB,QAAQgB;;MAEfS,SAAS,CAACC,YAAY1B,QAAQyB,QAAQC,OAAAA;MACtCC,SAAS,CAAC,EAAEC,SAAQ,MAClB,sBAAA,cAACC,aAAaC,UAAQ;QAACC,OAAO;UAAEf,OAAOhB,QAAQgB;QAAM;SAAIY,QAAAA;IAE7D;EACF;AACF;;;AElDA,cAAc;AAFd,IAAA,cAAeI;",
6
+ "names": ["effect", "React", "filterPlugins", "parseGraphBuilderPlugin", "GraphBuilder", "debounce", "createContext", "useContext", "raise", "GraphContext", "createContext", "useGraph", "useContext", "raise", "Error", "KEY", "GRAPH_PLUGIN", "GraphPlugin", "builder", "GraphBuilder", "from", "localStorage", "getItem", "undefined", "unsubscribe", "meta", "ready", "plugins", "filterPlugins", "parseGraphBuilderPlugin", "forEach", "plugin", "addExtension", "provides", "graph", "initialize", "effect", "debounce", "setItem", "pickle", "composer", "window", "unload", "explore", "options", "context", "children", "GraphContext", "Provider", "value", "GraphPlugin"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"packages/plugins/plugin-graph/src/GraphContext.ts":{"bytes":1674,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-graph/src/meta.ts":{"bytes":692,"imports":[],"format":"esm"},"packages/plugins/plugin-graph/src/GraphPlugin.tsx":{"bytes":4155,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-graph/src/GraphContext.ts","kind":"import-statement","original":"./GraphContext"},{"path":"packages/plugins/plugin-graph/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-graph/src/index.ts":{"bytes":978,"imports":[{"path":"packages/plugins/plugin-graph/src/GraphPlugin.tsx","kind":"import-statement","original":"./GraphPlugin"},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-graph/src/GraphContext.ts","kind":"import-statement","original":"./GraphContext"},{"path":"packages/plugins/plugin-graph/src/GraphPlugin.tsx","kind":"import-statement","original":"./GraphPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-graph/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3164},"packages/plugins/plugin-graph/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-graph/dist/lib/browser/chunk-4OVHWC4C.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true}],"exports":["GraphContext","GraphPlugin","default","useGraph"],"entryPoint":"packages/plugins/plugin-graph/src/index.ts","inputs":{"packages/plugins/plugin-graph/src/GraphPlugin.tsx":{"bytesInOutput":753},"packages/plugins/plugin-graph/src/GraphContext.ts":{"bytesInOutput":219},"packages/plugins/plugin-graph/src/index.ts":{"bytesInOutput":64}},"bytes":1415},"packages/plugins/plugin-graph/dist/lib/browser/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-graph/dist/lib/browser/meta.mjs":{"imports":[{"path":"packages/plugins/plugin-graph/dist/lib/browser/chunk-4OVHWC4C.mjs","kind":"import-statement"}],"exports":["default"],"entryPoint":"packages/plugins/plugin-graph/src/meta.ts","inputs":{},"bytes":127},"packages/plugins/plugin-graph/dist/lib/browser/chunk-4OVHWC4C.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":324},"packages/plugins/plugin-graph/dist/lib/browser/chunk-4OVHWC4C.mjs":{"imports":[],"exports":["meta_default"],"inputs":{"packages/plugins/plugin-graph/src/meta.ts":{"bytesInOutput":54}},"bytes":171}}}
1
+ {"inputs":{"packages/plugins/plugin-graph/src/GraphContext.ts":{"bytes":1674,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-graph/src/meta.ts":{"bytes":854,"imports":[],"format":"esm"},"packages/plugins/plugin-graph/src/GraphPlugin.tsx":{"bytes":6628,"imports":[{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-graph/src/GraphContext.ts","kind":"import-statement","original":"./GraphContext"},{"path":"packages/plugins/plugin-graph/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-graph/src/index.ts":{"bytes":978,"imports":[{"path":"packages/plugins/plugin-graph/src/GraphPlugin.tsx","kind":"import-statement","original":"./GraphPlugin"},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-graph/src/GraphContext.ts","kind":"import-statement","original":"./GraphContext"},{"path":"packages/plugins/plugin-graph/src/GraphPlugin.tsx","kind":"import-statement","original":"./GraphPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-graph/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4461},"packages/plugins/plugin-graph/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-graph/dist/lib/browser/chunk-SYPRW7IK.mjs","kind":"import-statement"},{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true}],"exports":["GraphContext","GraphPlugin","default","useGraph"],"entryPoint":"packages/plugins/plugin-graph/src/index.ts","inputs":{"packages/plugins/plugin-graph/src/GraphPlugin.tsx":{"bytesInOutput":1289},"packages/plugins/plugin-graph/src/GraphContext.ts":{"bytesInOutput":219},"packages/plugins/plugin-graph/src/index.ts":{"bytesInOutput":64}},"bytes":1967},"packages/plugins/plugin-graph/dist/lib/browser/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-graph/dist/lib/browser/meta.mjs":{"imports":[{"path":"packages/plugins/plugin-graph/dist/lib/browser/chunk-SYPRW7IK.mjs","kind":"import-statement"}],"exports":["GRAPH_PLUGIN","default"],"entryPoint":"packages/plugins/plugin-graph/src/meta.ts","inputs":{},"bytes":159},"packages/plugins/plugin-graph/dist/lib/browser/chunk-SYPRW7IK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":403},"packages/plugins/plugin-graph/dist/lib/browser/chunk-SYPRW7IK.mjs":{"imports":[],"exports":["GRAPH_PLUGIN","meta_default"],"inputs":{"packages/plugins/plugin-graph/src/meta.ts":{"bytesInOutput":87}},"bytes":220}}}
@@ -1,7 +1,9 @@
1
1
  import {
2
+ GRAPH_PLUGIN,
2
3
  meta_default
3
- } from "./chunk-4OVHWC4C.mjs";
4
+ } from "./chunk-SYPRW7IK.mjs";
4
5
  export {
6
+ GRAPH_PLUGIN,
5
7
  meta_default as default
6
8
  };
7
9
  //# sourceMappingURL=meta.mjs.map
@@ -16,16 +16,19 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_JMUG24QZ_exports = {};
20
- __export(chunk_JMUG24QZ_exports, {
19
+ var chunk_PIWXSWR4_exports = {};
20
+ __export(chunk_PIWXSWR4_exports, {
21
+ GRAPH_PLUGIN: () => GRAPH_PLUGIN,
21
22
  meta_default: () => meta_default
22
23
  });
23
- module.exports = __toCommonJS(chunk_JMUG24QZ_exports);
24
+ module.exports = __toCommonJS(chunk_PIWXSWR4_exports);
25
+ var GRAPH_PLUGIN = "dxos.org/plugin/graph";
24
26
  var meta_default = {
25
- id: "dxos.org/plugin/graph"
27
+ id: GRAPH_PLUGIN
26
28
  };
27
29
  // Annotate the CommonJS export names for ESM import in node:
28
30
  0 && (module.exports = {
31
+ GRAPH_PLUGIN,
29
32
  meta_default
30
33
  });
31
- //# sourceMappingURL=chunk-JMUG24QZ.cjs.map
34
+ //# sourceMappingURL=chunk-PIWXSWR4.cjs.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 GRAPH_PLUGIN = 'dxos.org/plugin/graph';\n\nexport default {\n id: GRAPH_PLUGIN,\n} satisfies PluginMeta;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAMO,IAAMA,eAAe;AAE5B,IAAA,eAAe;EACbC,IAAID;AACN;",
6
+ "names": ["GRAPH_PLUGIN", "id"]
7
+ }
@@ -35,21 +35,36 @@ __export(node_exports, {
35
35
  useGraph: () => useGraph
36
36
  });
37
37
  module.exports = __toCommonJS(node_exports);
38
- var import_chunk_JMUG24QZ = require("./chunk-JMUG24QZ.cjs");
38
+ var import_chunk_PIWXSWR4 = require("./chunk-PIWXSWR4.cjs");
39
+ var import_signals_core = require("@preact/signals-core");
39
40
  var import_react = __toESM(require("react"));
40
41
  var import_app_framework = require("@dxos/app-framework");
41
42
  var import_app_graph = require("@dxos/app-graph");
43
+ var import_async = require("@dxos/async");
42
44
  var import_react2 = require("react");
43
45
  var import_debug = require("@dxos/debug");
44
46
  __reExport(node_exports, require("@dxos/app-graph"), module.exports);
45
47
  var GraphContext = (0, import_react2.createContext)(null);
46
48
  var useGraph = () => (0, import_react2.useContext)(GraphContext) ?? (0, import_debug.raise)(new Error("Missing GraphContext"));
49
+ var KEY = `${import_chunk_PIWXSWR4.GRAPH_PLUGIN}/graph`;
47
50
  var GraphPlugin = () => {
48
- const builder = new import_app_graph.GraphBuilder();
51
+ const builder = import_app_graph.GraphBuilder.from(localStorage.getItem(KEY) ?? void 0);
52
+ let unsubscribe;
49
53
  return {
50
- meta: import_chunk_JMUG24QZ.meta_default,
54
+ meta: import_chunk_PIWXSWR4.meta_default,
51
55
  ready: async (plugins) => {
52
56
  (0, import_app_framework.filterPlugins)(plugins, import_app_framework.parseGraphBuilderPlugin).forEach((plugin) => builder.addExtension(plugin.provides.graph.builder(plugins)));
57
+ await builder.initialize();
58
+ unsubscribe = (0, import_signals_core.effect)((0, import_async.debounce)(() => {
59
+ localStorage.setItem(`${import_chunk_PIWXSWR4.GRAPH_PLUGIN}/graph`, builder.graph.pickle());
60
+ }, 1e3));
61
+ const composer = window.composer;
62
+ if (typeof composer === "object") {
63
+ composer.graph = builder.graph;
64
+ }
65
+ },
66
+ unload: async () => {
67
+ unsubscribe?.();
53
68
  },
54
69
  provides: {
55
70
  graph: builder.graph,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/GraphPlugin.tsx", "../../../src/GraphContext.ts", "../../../src/index.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { filterPlugins, type GraphProvides, type PluginDefinition, parseGraphBuilderPlugin } from '@dxos/app-framework';\nimport { GraphBuilder } from '@dxos/app-graph';\n\nimport { GraphContext } from './GraphContext';\nimport meta from './meta';\n\n/**\n * Manages the state of the graph for the application.\n * Enables other plugins to register node builders to add nodes to the graph.\n * This includes actions and annotation each other's nodes.\n */\nexport const GraphPlugin = (): PluginDefinition<GraphProvides> => {\n const builder = new GraphBuilder();\n\n return {\n meta,\n ready: async (plugins) => {\n filterPlugins(plugins, parseGraphBuilderPlugin).forEach((plugin) =>\n builder.addExtension(plugin.provides.graph.builder(plugins)),\n );\n },\n provides: {\n graph: builder.graph,\n // TODO(wittjosiah): This is janky.\n explore: (options) => builder.explore(options),\n context: ({ children }) => (\n <GraphContext.Provider value={{ graph: builder.graph }}>{children}</GraphContext.Provider>\n ),\n },\n };\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\n// TODO(wittjosiah): State can be a GraphNode.\nimport { type Context, createContext, useContext } from 'react';\n\nimport { type Graph } from '@dxos/app-graph';\nimport { raise } from '@dxos/debug';\n\nexport type GraphContext = { graph: Graph };\n\nexport const GraphContext: Context<GraphContext | null> = createContext<GraphContext | null>(null);\n\nexport const useGraph = (): GraphContext => useContext(GraphContext) ?? raise(new Error('Missing GraphContext'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { GraphPlugin } from './GraphPlugin';\n\nexport default GraphPlugin;\n\nexport * from '@dxos/app-graph';\n\nexport * from './GraphContext';\nexport * from './GraphPlugin';\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAkB;AAElB,2BAAkG;AAClG,uBAA6B;ACF7B,IAAAA,gBAAwD;AAGxD,mBAAsB;ACAtB,yBAAc;ADIP,IAAMC,mBAA6CC,6BAAmC,IAAA;AAEtF,IAAMC,WAAW,UAAoBC,0BAAWH,YAAAA,SAAiBI,oBAAM,IAAIC,MAAM,sBAAA,CAAA;ADGjF,IAAMC,cAAc,MAAA;AACzB,QAAMC,UAAU,IAAIC,8BAAAA;AAEpB,SAAO;IACLC,MAAAA;IACAC,OAAO,OAAOC,YAAAA;AACZC,8CAAcD,SAASE,4CAAAA,EAAyBC,QAAQ,CAACC,WACvDR,QAAQS,aAAaD,OAAOE,SAASC,MAAMX,QAAQI,OAAAA,CAAAA,CAAAA;IAEvD;IACAM,UAAU;MACRC,OAAOX,QAAQW;;MAEfC,SAAS,CAACC,YAAYb,QAAQY,QAAQC,OAAAA;MACtCC,SAAS,CAAC,EAAEC,SAAQ,MAClB,6BAAAC,QAAA,cAACvB,aAAawB,UAAQ;QAACC,OAAO;UAAEP,OAAOX,QAAQW;QAAM;SAAII,QAAAA;IAE7D;EACF;AACF;AE9BA,IAAA,cAAehB;",
6
- "names": ["import_react", "GraphContext", "createContext", "useGraph", "useContext", "raise", "Error", "GraphPlugin", "builder", "GraphBuilder", "meta", "ready", "plugins", "filterPlugins", "parseGraphBuilderPlugin", "forEach", "plugin", "addExtension", "provides", "graph", "explore", "options", "context", "children", "React", "Provider", "value"]
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { effect } from '@preact/signals-core';\nimport React from 'react';\n\nimport { filterPlugins, type GraphProvides, type PluginDefinition, parseGraphBuilderPlugin } from '@dxos/app-framework';\nimport { GraphBuilder } from '@dxos/app-graph';\nimport { debounce, type UnsubscribeCallback } from '@dxos/async';\n\nimport { GraphContext } from './GraphContext';\nimport meta, { GRAPH_PLUGIN } from './meta';\n\nconst KEY = `${GRAPH_PLUGIN}/graph`;\n\n/**\n * Manages the state of the graph for the application.\n * Enables other plugins to register node builders to add nodes to the graph.\n * This includes actions and annotation each other's nodes.\n */\nexport const GraphPlugin = (): PluginDefinition<GraphProvides> => {\n const builder = GraphBuilder.from(localStorage.getItem(KEY) ?? undefined);\n let unsubscribe: UnsubscribeCallback | undefined;\n\n return {\n meta,\n ready: async (plugins) => {\n filterPlugins(plugins, parseGraphBuilderPlugin).forEach((plugin) =>\n builder.addExtension(plugin.provides.graph.builder(plugins)),\n );\n\n await builder.initialize();\n\n unsubscribe = effect(\n debounce(() => {\n localStorage.setItem(`${GRAPH_PLUGIN}/graph`, builder.graph.pickle());\n }, 1000),\n );\n\n // Expose the graph to the window for debugging.\n const composer = (window as any).composer;\n if (typeof composer === 'object') {\n composer.graph = builder.graph;\n }\n },\n unload: async () => {\n unsubscribe?.();\n },\n provides: {\n graph: builder.graph,\n // TODO(wittjosiah): This is janky.\n explore: (options) => builder.explore(options),\n context: ({ children }) => (\n <GraphContext.Provider value={{ graph: builder.graph }}>{children}</GraphContext.Provider>\n ),\n },\n };\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\n// TODO(wittjosiah): State can be a GraphNode.\nimport { type Context, createContext, useContext } from 'react';\n\nimport { type Graph } from '@dxos/app-graph';\nimport { raise } from '@dxos/debug';\n\nexport type GraphContext = { graph: Graph };\n\nexport const GraphContext: Context<GraphContext | null> = createContext<GraphContext | null>(null);\n\nexport const useGraph = (): GraphContext => useContext(GraphContext) ?? raise(new Error('Missing GraphContext'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { GraphPlugin } from './GraphPlugin';\n\nexport default GraphPlugin;\n\nexport * from '@dxos/app-graph';\n\nexport * from './GraphContext';\nexport * from './GraphPlugin';\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,0BAAuB;AACvB,mBAAkB;AAElB,2BAAkG;AAClG,uBAA6B;AAC7B,mBAAmD;ACJnD,IAAAA,gBAAwD;AAGxD,mBAAsB;ACAtB,yBAAc;ADIP,IAAMC,mBAA6CC,6BAAmC,IAAA;AAEtF,IAAMC,WAAW,UAAoBC,0BAAWH,YAAAA,SAAiBI,oBAAM,IAAIC,MAAM,sBAAA,CAAA;ADAxF,IAAMC,MAAM,GAAGC,kCAAAA;AAOR,IAAMC,cAAc,MAAA;AACzB,QAAMC,UAAUC,8BAAaC,KAAKC,aAAaC,QAAQP,GAAAA,KAAQQ,MAAAA;AAC/D,MAAIC;AAEJ,SAAO;IACLC,MAAAA;IACAC,OAAO,OAAOC,YAAAA;AACZC,8CAAcD,SAASE,4CAAAA,EAAyBC,QAAQ,CAACC,WACvDb,QAAQc,aAAaD,OAAOE,SAASC,MAAMhB,QAAQS,OAAAA,CAAAA,CAAAA;AAGrD,YAAMT,QAAQiB,WAAU;AAExBX,wBAAcY,gCACZC,uBAAS,MAAA;AACPhB,qBAAaiB,QAAQ,GAAGtB,kCAAAA,UAAsBE,QAAQgB,MAAMK,OAAM,CAAA;MACpE,GAAG,GAAA,CAAA;AAIL,YAAMC,WAAYC,OAAeD;AACjC,UAAI,OAAOA,aAAa,UAAU;AAChCA,iBAASN,QAAQhB,QAAQgB;MAC3B;IACF;IACAQ,QAAQ,YAAA;AACNlB,oBAAAA;IACF;IACAS,UAAU;MACRC,OAAOhB,QAAQgB;;MAEfS,SAAS,CAACC,YAAY1B,QAAQyB,QAAQC,OAAAA;MACtCC,SAAS,CAAC,EAAEC,SAAQ,MAClB,6BAAAC,QAAA,cAACtC,aAAauC,UAAQ;QAACC,OAAO;UAAEf,OAAOhB,QAAQgB;QAAM;SAAIY,QAAAA;IAE7D;EACF;AACF;AEpDA,IAAA,cAAe7B;",
6
+ "names": ["import_react", "GraphContext", "createContext", "useGraph", "useContext", "raise", "Error", "KEY", "GRAPH_PLUGIN", "GraphPlugin", "builder", "GraphBuilder", "from", "localStorage", "getItem", "undefined", "unsubscribe", "meta", "ready", "plugins", "filterPlugins", "parseGraphBuilderPlugin", "forEach", "plugin", "addExtension", "provides", "graph", "initialize", "effect", "debounce", "setItem", "pickle", "composer", "window", "unload", "explore", "options", "context", "children", "React", "Provider", "value"]
7
7
  }
@@ -18,8 +18,13 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var meta_exports = {};
20
20
  __export(meta_exports, {
21
- default: () => import_chunk_JMUG24QZ.meta_default
21
+ GRAPH_PLUGIN: () => import_chunk_PIWXSWR4.GRAPH_PLUGIN,
22
+ default: () => import_chunk_PIWXSWR4.meta_default
22
23
  });
23
24
  module.exports = __toCommonJS(meta_exports);
24
- var import_chunk_JMUG24QZ = require("./chunk-JMUG24QZ.cjs");
25
+ var import_chunk_PIWXSWR4 = require("./chunk-PIWXSWR4.cjs");
26
+ // Annotate the CommonJS export names for ESM import in node:
27
+ 0 && (module.exports = {
28
+ GRAPH_PLUGIN
29
+ });
25
30
  //# sourceMappingURL=meta.cjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["meta.cjs"],
4
- "sourcesContent": ["import {\n meta_default\n} from \"./chunk-JMUG24QZ.cjs\";\nexport {\n meta_default as default\n};\n//# sourceMappingURL=meta.cjs.map\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAEO;",
4
+ "sourcesContent": ["import {\n GRAPH_PLUGIN,\n meta_default\n} from \"./chunk-PIWXSWR4.cjs\";\nexport {\n GRAPH_PLUGIN,\n meta_default as default\n};\n//# sourceMappingURL=meta.cjs.map\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAGO;",
6
6
  "names": []
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"packages/plugins/plugin-graph/src/GraphContext.ts":{"bytes":1674,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-graph/src/meta.ts":{"bytes":692,"imports":[],"format":"esm"},"packages/plugins/plugin-graph/src/GraphPlugin.tsx":{"bytes":4155,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-graph/src/GraphContext.ts","kind":"import-statement","original":"./GraphContext"},{"path":"packages/plugins/plugin-graph/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-graph/src/index.ts":{"bytes":978,"imports":[{"path":"packages/plugins/plugin-graph/src/GraphPlugin.tsx","kind":"import-statement","original":"./GraphPlugin"},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-graph/src/GraphContext.ts","kind":"import-statement","original":"./GraphContext"},{"path":"packages/plugins/plugin-graph/src/GraphPlugin.tsx","kind":"import-statement","original":"./GraphPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-graph/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3164},"packages/plugins/plugin-graph/dist/lib/node/index.cjs":{"imports":[{"path":"packages/plugins/plugin-graph/dist/lib/node/chunk-JMUG24QZ.cjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true}],"exports":["GraphContext","GraphPlugin","default","useGraph"],"entryPoint":"packages/plugins/plugin-graph/src/index.ts","inputs":{"packages/plugins/plugin-graph/src/GraphPlugin.tsx":{"bytesInOutput":753},"packages/plugins/plugin-graph/src/GraphContext.ts":{"bytesInOutput":219},"packages/plugins/plugin-graph/src/index.ts":{"bytesInOutput":64}},"bytes":1415},"packages/plugins/plugin-graph/dist/lib/node/meta.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-graph/dist/lib/node/meta.cjs":{"imports":[{"path":"packages/plugins/plugin-graph/dist/lib/node/chunk-JMUG24QZ.cjs","kind":"import-statement"}],"exports":["default"],"entryPoint":"packages/plugins/plugin-graph/src/meta.ts","inputs":{},"bytes":127},"packages/plugins/plugin-graph/dist/lib/node/chunk-JMUG24QZ.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":324},"packages/plugins/plugin-graph/dist/lib/node/chunk-JMUG24QZ.cjs":{"imports":[],"exports":["meta_default"],"inputs":{"packages/plugins/plugin-graph/src/meta.ts":{"bytesInOutput":54}},"bytes":171}}}
1
+ {"inputs":{"packages/plugins/plugin-graph/src/GraphContext.ts":{"bytes":1674,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-graph/src/meta.ts":{"bytes":854,"imports":[],"format":"esm"},"packages/plugins/plugin-graph/src/GraphPlugin.tsx":{"bytes":6628,"imports":[{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-graph/src/GraphContext.ts","kind":"import-statement","original":"./GraphContext"},{"path":"packages/plugins/plugin-graph/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-graph/src/index.ts":{"bytes":978,"imports":[{"path":"packages/plugins/plugin-graph/src/GraphPlugin.tsx","kind":"import-statement","original":"./GraphPlugin"},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-graph/src/GraphContext.ts","kind":"import-statement","original":"./GraphContext"},{"path":"packages/plugins/plugin-graph/src/GraphPlugin.tsx","kind":"import-statement","original":"./GraphPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-graph/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4461},"packages/plugins/plugin-graph/dist/lib/node/index.cjs":{"imports":[{"path":"packages/plugins/plugin-graph/dist/lib/node/chunk-PIWXSWR4.cjs","kind":"import-statement"},{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true}],"exports":["GraphContext","GraphPlugin","default","useGraph"],"entryPoint":"packages/plugins/plugin-graph/src/index.ts","inputs":{"packages/plugins/plugin-graph/src/GraphPlugin.tsx":{"bytesInOutput":1289},"packages/plugins/plugin-graph/src/GraphContext.ts":{"bytesInOutput":219},"packages/plugins/plugin-graph/src/index.ts":{"bytesInOutput":64}},"bytes":1967},"packages/plugins/plugin-graph/dist/lib/node/meta.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-graph/dist/lib/node/meta.cjs":{"imports":[{"path":"packages/plugins/plugin-graph/dist/lib/node/chunk-PIWXSWR4.cjs","kind":"import-statement"}],"exports":["GRAPH_PLUGIN","default"],"entryPoint":"packages/plugins/plugin-graph/src/meta.ts","inputs":{},"bytes":159},"packages/plugins/plugin-graph/dist/lib/node/chunk-PIWXSWR4.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":403},"packages/plugins/plugin-graph/dist/lib/node/chunk-PIWXSWR4.cjs":{"imports":[],"exports":["GRAPH_PLUGIN","meta_default"],"inputs":{"packages/plugins/plugin-graph/src/meta.ts":{"bytesInOutput":87}},"bytes":220}}}
@@ -1,11 +1,13 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
2
 
3
3
  // packages/plugins/plugin-graph/src/meta.ts
4
+ var GRAPH_PLUGIN = "dxos.org/plugin/graph";
4
5
  var meta_default = {
5
- id: "dxos.org/plugin/graph"
6
+ id: GRAPH_PLUGIN
6
7
  };
7
8
 
8
9
  export {
10
+ GRAPH_PLUGIN,
9
11
  meta_default
10
12
  };
11
- //# sourceMappingURL=chunk-NGPG3UU5.mjs.map
13
+ //# sourceMappingURL=chunk-H3EEX7DI.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 GRAPH_PLUGIN = 'dxos.org/plugin/graph';\n\nexport default {\n id: GRAPH_PLUGIN,\n} satisfies PluginMeta;\n"],
5
+ "mappings": ";;;AAMO,IAAMA,eAAe;AAE5B,IAAA,eAAe;EACbC,IAAID;AACN;",
6
+ "names": ["GRAPH_PLUGIN", "id"]
7
+ }
@@ -1,12 +1,15 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
2
  import {
3
+ GRAPH_PLUGIN,
3
4
  meta_default
4
- } from "./chunk-NGPG3UU5.mjs";
5
+ } from "./chunk-H3EEX7DI.mjs";
5
6
 
6
7
  // packages/plugins/plugin-graph/src/GraphPlugin.tsx
8
+ import { effect } from "@preact/signals-core";
7
9
  import React from "react";
8
10
  import { filterPlugins, parseGraphBuilderPlugin } from "@dxos/app-framework";
9
11
  import { GraphBuilder } from "@dxos/app-graph";
12
+ import { debounce } from "@dxos/async";
10
13
 
11
14
  // packages/plugins/plugin-graph/src/GraphContext.ts
12
15
  import { createContext, useContext } from "react";
@@ -15,12 +18,25 @@ var GraphContext = createContext(null);
15
18
  var useGraph = () => useContext(GraphContext) ?? raise(new Error("Missing GraphContext"));
16
19
 
17
20
  // packages/plugins/plugin-graph/src/GraphPlugin.tsx
21
+ var KEY = `${GRAPH_PLUGIN}/graph`;
18
22
  var GraphPlugin = () => {
19
- const builder = new GraphBuilder();
23
+ const builder = GraphBuilder.from(localStorage.getItem(KEY) ?? void 0);
24
+ let unsubscribe;
20
25
  return {
21
26
  meta: meta_default,
22
27
  ready: async (plugins) => {
23
28
  filterPlugins(plugins, parseGraphBuilderPlugin).forEach((plugin) => builder.addExtension(plugin.provides.graph.builder(plugins)));
29
+ await builder.initialize();
30
+ unsubscribe = effect(debounce(() => {
31
+ localStorage.setItem(`${GRAPH_PLUGIN}/graph`, builder.graph.pickle());
32
+ }, 1e3));
33
+ const composer = window.composer;
34
+ if (typeof composer === "object") {
35
+ composer.graph = builder.graph;
36
+ }
37
+ },
38
+ unload: async () => {
39
+ unsubscribe?.();
24
40
  },
25
41
  provides: {
26
42
  graph: builder.graph,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/GraphPlugin.tsx", "../../../src/GraphContext.ts", "../../../src/index.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { filterPlugins, type GraphProvides, type PluginDefinition, parseGraphBuilderPlugin } from '@dxos/app-framework';\nimport { GraphBuilder } from '@dxos/app-graph';\n\nimport { GraphContext } from './GraphContext';\nimport meta from './meta';\n\n/**\n * Manages the state of the graph for the application.\n * Enables other plugins to register node builders to add nodes to the graph.\n * This includes actions and annotation each other's nodes.\n */\nexport const GraphPlugin = (): PluginDefinition<GraphProvides> => {\n const builder = new GraphBuilder();\n\n return {\n meta,\n ready: async (plugins) => {\n filterPlugins(plugins, parseGraphBuilderPlugin).forEach((plugin) =>\n builder.addExtension(plugin.provides.graph.builder(plugins)),\n );\n },\n provides: {\n graph: builder.graph,\n // TODO(wittjosiah): This is janky.\n explore: (options) => builder.explore(options),\n context: ({ children }) => (\n <GraphContext.Provider value={{ graph: builder.graph }}>{children}</GraphContext.Provider>\n ),\n },\n };\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\n// TODO(wittjosiah): State can be a GraphNode.\nimport { type Context, createContext, useContext } from 'react';\n\nimport { type Graph } from '@dxos/app-graph';\nimport { raise } from '@dxos/debug';\n\nexport type GraphContext = { graph: Graph };\n\nexport const GraphContext: Context<GraphContext | null> = createContext<GraphContext | null>(null);\n\nexport const useGraph = (): GraphContext => useContext(GraphContext) ?? raise(new Error('Missing GraphContext'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { GraphPlugin } from './GraphPlugin';\n\nexport default GraphPlugin;\n\nexport * from '@dxos/app-graph';\n\nexport * from './GraphContext';\nexport * from './GraphPlugin';\n"],
5
- "mappings": ";;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,eAA0DC,+BAA+B;AAClG,SAASC,oBAAoB;;;ACF7B,SAAuBC,eAAeC,kBAAkB;AAGxD,SAASC,aAAa;AAIf,IAAMC,eAA6CC,cAAmC,IAAA;AAEtF,IAAMC,WAAW,MAAoBC,WAAWH,YAAAA,KAAiBI,MAAM,IAAIC,MAAM,sBAAA,CAAA;;;ADGjF,IAAMC,cAAc,MAAA;AACzB,QAAMC,UAAU,IAAIC,aAAAA;AAEpB,SAAO;IACLC;IACAC,OAAO,OAAOC,YAAAA;AACZC,oBAAcD,SAASE,uBAAAA,EAAyBC,QAAQ,CAACC,WACvDR,QAAQS,aAAaD,OAAOE,SAASC,MAAMX,QAAQI,OAAAA,CAAAA,CAAAA;IAEvD;IACAM,UAAU;MACRC,OAAOX,QAAQW;;MAEfC,SAAS,CAACC,YAAYb,QAAQY,QAAQC,OAAAA;MACtCC,SAAS,CAAC,EAAEC,SAAQ,MAClB,sBAAA,cAACC,aAAaC,UAAQ;QAACC,OAAO;UAAEP,OAAOX,QAAQW;QAAM;SAAII,QAAAA;IAE7D;EACF;AACF;;;AE5BA,cAAc;AAFd,IAAA,cAAeI;",
6
- "names": ["React", "filterPlugins", "parseGraphBuilderPlugin", "GraphBuilder", "createContext", "useContext", "raise", "GraphContext", "createContext", "useGraph", "useContext", "raise", "Error", "GraphPlugin", "builder", "GraphBuilder", "meta", "ready", "plugins", "filterPlugins", "parseGraphBuilderPlugin", "forEach", "plugin", "addExtension", "provides", "graph", "explore", "options", "context", "children", "GraphContext", "Provider", "value", "GraphPlugin"]
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { effect } from '@preact/signals-core';\nimport React from 'react';\n\nimport { filterPlugins, type GraphProvides, type PluginDefinition, parseGraphBuilderPlugin } from '@dxos/app-framework';\nimport { GraphBuilder } from '@dxos/app-graph';\nimport { debounce, type UnsubscribeCallback } from '@dxos/async';\n\nimport { GraphContext } from './GraphContext';\nimport meta, { GRAPH_PLUGIN } from './meta';\n\nconst KEY = `${GRAPH_PLUGIN}/graph`;\n\n/**\n * Manages the state of the graph for the application.\n * Enables other plugins to register node builders to add nodes to the graph.\n * This includes actions and annotation each other's nodes.\n */\nexport const GraphPlugin = (): PluginDefinition<GraphProvides> => {\n const builder = GraphBuilder.from(localStorage.getItem(KEY) ?? undefined);\n let unsubscribe: UnsubscribeCallback | undefined;\n\n return {\n meta,\n ready: async (plugins) => {\n filterPlugins(plugins, parseGraphBuilderPlugin).forEach((plugin) =>\n builder.addExtension(plugin.provides.graph.builder(plugins)),\n );\n\n await builder.initialize();\n\n unsubscribe = effect(\n debounce(() => {\n localStorage.setItem(`${GRAPH_PLUGIN}/graph`, builder.graph.pickle());\n }, 1000),\n );\n\n // Expose the graph to the window for debugging.\n const composer = (window as any).composer;\n if (typeof composer === 'object') {\n composer.graph = builder.graph;\n }\n },\n unload: async () => {\n unsubscribe?.();\n },\n provides: {\n graph: builder.graph,\n // TODO(wittjosiah): This is janky.\n explore: (options) => builder.explore(options),\n context: ({ children }) => (\n <GraphContext.Provider value={{ graph: builder.graph }}>{children}</GraphContext.Provider>\n ),\n },\n };\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\n// TODO(wittjosiah): State can be a GraphNode.\nimport { type Context, createContext, useContext } from 'react';\n\nimport { type Graph } from '@dxos/app-graph';\nimport { raise } from '@dxos/debug';\n\nexport type GraphContext = { graph: Graph };\n\nexport const GraphContext: Context<GraphContext | null> = createContext<GraphContext | null>(null);\n\nexport const useGraph = (): GraphContext => useContext(GraphContext) ?? raise(new Error('Missing GraphContext'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { GraphPlugin } from './GraphPlugin';\n\nexport default GraphPlugin;\n\nexport * from '@dxos/app-graph';\n\nexport * from './GraphContext';\nexport * from './GraphPlugin';\n"],
5
+ "mappings": ";;;;;;;AAIA,SAASA,cAAc;AACvB,OAAOC,WAAW;AAElB,SAASC,eAA0DC,+BAA+B;AAClG,SAASC,oBAAoB;AAC7B,SAASC,gBAA0C;;;ACJnD,SAAuBC,eAAeC,kBAAkB;AAGxD,SAASC,aAAa;AAIf,IAAMC,eAA6CC,cAAmC,IAAA;AAEtF,IAAMC,WAAW,MAAoBC,WAAWH,YAAAA,KAAiBI,MAAM,IAAIC,MAAM,sBAAA,CAAA;;;ADAxF,IAAMC,MAAM,GAAGC,YAAAA;AAOR,IAAMC,cAAc,MAAA;AACzB,QAAMC,UAAUC,aAAaC,KAAKC,aAAaC,QAAQP,GAAAA,KAAQQ,MAAAA;AAC/D,MAAIC;AAEJ,SAAO;IACLC;IACAC,OAAO,OAAOC,YAAAA;AACZC,oBAAcD,SAASE,uBAAAA,EAAyBC,QAAQ,CAACC,WACvDb,QAAQc,aAAaD,OAAOE,SAASC,MAAMhB,QAAQS,OAAAA,CAAAA,CAAAA;AAGrD,YAAMT,QAAQiB,WAAU;AAExBX,oBAAcY,OACZC,SAAS,MAAA;AACPhB,qBAAaiB,QAAQ,GAAGtB,YAAAA,UAAsBE,QAAQgB,MAAMK,OAAM,CAAA;MACpE,GAAG,GAAA,CAAA;AAIL,YAAMC,WAAYC,OAAeD;AACjC,UAAI,OAAOA,aAAa,UAAU;AAChCA,iBAASN,QAAQhB,QAAQgB;MAC3B;IACF;IACAQ,QAAQ,YAAA;AACNlB,oBAAAA;IACF;IACAS,UAAU;MACRC,OAAOhB,QAAQgB;;MAEfS,SAAS,CAACC,YAAY1B,QAAQyB,QAAQC,OAAAA;MACtCC,SAAS,CAAC,EAAEC,SAAQ,MAClB,sBAAA,cAACC,aAAaC,UAAQ;QAACC,OAAO;UAAEf,OAAOhB,QAAQgB;QAAM;SAAIY,QAAAA;IAE7D;EACF;AACF;;;AElDA,cAAc;AAFd,IAAA,cAAeI;",
6
+ "names": ["effect", "React", "filterPlugins", "parseGraphBuilderPlugin", "GraphBuilder", "debounce", "createContext", "useContext", "raise", "GraphContext", "createContext", "useGraph", "useContext", "raise", "Error", "KEY", "GRAPH_PLUGIN", "GraphPlugin", "builder", "GraphBuilder", "from", "localStorage", "getItem", "undefined", "unsubscribe", "meta", "ready", "plugins", "filterPlugins", "parseGraphBuilderPlugin", "forEach", "plugin", "addExtension", "provides", "graph", "initialize", "effect", "debounce", "setItem", "pickle", "composer", "window", "unload", "explore", "options", "context", "children", "GraphContext", "Provider", "value", "GraphPlugin"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"packages/plugins/plugin-graph/src/GraphContext.ts":{"bytes":1674,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-graph/src/meta.ts":{"bytes":692,"imports":[],"format":"esm"},"packages/plugins/plugin-graph/src/GraphPlugin.tsx":{"bytes":4155,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-graph/src/GraphContext.ts","kind":"import-statement","original":"./GraphContext"},{"path":"packages/plugins/plugin-graph/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-graph/src/index.ts":{"bytes":978,"imports":[{"path":"packages/plugins/plugin-graph/src/GraphPlugin.tsx","kind":"import-statement","original":"./GraphPlugin"},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-graph/src/GraphContext.ts","kind":"import-statement","original":"./GraphContext"},{"path":"packages/plugins/plugin-graph/src/GraphPlugin.tsx","kind":"import-statement","original":"./GraphPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-graph/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3165},"packages/plugins/plugin-graph/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/plugins/plugin-graph/dist/lib/node-esm/chunk-NGPG3UU5.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true}],"exports":["GraphContext","GraphPlugin","default","useGraph"],"entryPoint":"packages/plugins/plugin-graph/src/index.ts","inputs":{"packages/plugins/plugin-graph/src/GraphPlugin.tsx":{"bytesInOutput":753},"packages/plugins/plugin-graph/src/GraphContext.ts":{"bytesInOutput":219},"packages/plugins/plugin-graph/src/index.ts":{"bytesInOutput":64}},"bytes":1507},"packages/plugins/plugin-graph/dist/lib/node-esm/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-graph/dist/lib/node-esm/meta.mjs":{"imports":[{"path":"packages/plugins/plugin-graph/dist/lib/node-esm/chunk-NGPG3UU5.mjs","kind":"import-statement"}],"exports":["default"],"entryPoint":"packages/plugins/plugin-graph/src/meta.ts","inputs":{},"bytes":219},"packages/plugins/plugin-graph/dist/lib/node-esm/chunk-NGPG3UU5.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":326},"packages/plugins/plugin-graph/dist/lib/node-esm/chunk-NGPG3UU5.mjs":{"imports":[],"exports":["meta_default"],"inputs":{"packages/plugins/plugin-graph/src/meta.ts":{"bytesInOutput":54}},"bytes":264}}}
1
+ {"inputs":{"packages/plugins/plugin-graph/src/GraphContext.ts":{"bytes":1674,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-graph/src/meta.ts":{"bytes":854,"imports":[],"format":"esm"},"packages/plugins/plugin-graph/src/GraphPlugin.tsx":{"bytes":6628,"imports":[{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-graph/src/GraphContext.ts","kind":"import-statement","original":"./GraphContext"},{"path":"packages/plugins/plugin-graph/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-graph/src/index.ts":{"bytes":978,"imports":[{"path":"packages/plugins/plugin-graph/src/GraphPlugin.tsx","kind":"import-statement","original":"./GraphPlugin"},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-graph/src/GraphContext.ts","kind":"import-statement","original":"./GraphContext"},{"path":"packages/plugins/plugin-graph/src/GraphPlugin.tsx","kind":"import-statement","original":"./GraphPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-graph/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4462},"packages/plugins/plugin-graph/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/plugins/plugin-graph/dist/lib/node-esm/chunk-H3EEX7DI.mjs","kind":"import-statement"},{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true}],"exports":["GraphContext","GraphPlugin","default","useGraph"],"entryPoint":"packages/plugins/plugin-graph/src/index.ts","inputs":{"packages/plugins/plugin-graph/src/GraphPlugin.tsx":{"bytesInOutput":1289},"packages/plugins/plugin-graph/src/GraphContext.ts":{"bytesInOutput":219},"packages/plugins/plugin-graph/src/index.ts":{"bytesInOutput":64}},"bytes":2059},"packages/plugins/plugin-graph/dist/lib/node-esm/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-graph/dist/lib/node-esm/meta.mjs":{"imports":[{"path":"packages/plugins/plugin-graph/dist/lib/node-esm/chunk-H3EEX7DI.mjs","kind":"import-statement"}],"exports":["GRAPH_PLUGIN","default"],"entryPoint":"packages/plugins/plugin-graph/src/meta.ts","inputs":{},"bytes":251},"packages/plugins/plugin-graph/dist/lib/node-esm/chunk-H3EEX7DI.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":405},"packages/plugins/plugin-graph/dist/lib/node-esm/chunk-H3EEX7DI.mjs":{"imports":[],"exports":["GRAPH_PLUGIN","meta_default"],"inputs":{"packages/plugins/plugin-graph/src/meta.ts":{"bytesInOutput":87}},"bytes":313}}}
@@ -1,8 +1,10 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
2
  import {
3
+ GRAPH_PLUGIN,
3
4
  meta_default
4
- } from "./chunk-NGPG3UU5.mjs";
5
+ } from "./chunk-H3EEX7DI.mjs";
5
6
  export {
7
+ GRAPH_PLUGIN,
6
8
  meta_default as default
7
9
  };
8
10
  //# sourceMappingURL=meta.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"GraphPlugin.d.ts","sourceRoot":"","sources":["../../../src/GraphPlugin.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAiB,KAAK,aAAa,EAAE,KAAK,gBAAgB,EAA2B,MAAM,qBAAqB,CAAC;AAMxH;;;;GAIG;AACH,eAAO,MAAM,WAAW,QAAO,gBAAgB,CAAC,aAAa,CAmB5D,CAAC"}
1
+ {"version":3,"file":"GraphPlugin.d.ts","sourceRoot":"","sources":["../../../src/GraphPlugin.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAiB,KAAK,aAAa,EAAE,KAAK,gBAAgB,EAA2B,MAAM,qBAAqB,CAAC;AASxH;;;;GAIG;AACH,eAAO,MAAM,WAAW,QAAO,gBAAgB,CAAC,aAAa,CAqC5D,CAAC"}
@@ -1,3 +1,4 @@
1
+ export declare const GRAPH_PLUGIN = "dxos.org/plugin/graph";
1
2
  declare const _default: {
2
3
  id: string;
3
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":";;;AAMA,wBAEuB"}
1
+ {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY,0BAA0B,CAAC;;;;AAEpD,wBAEuB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-graph",
3
- "version": "0.6.14-main.f49f251",
3
+ "version": "0.6.14-staging.77003c1",
4
4
  "description": "DXOS Surface plugin for constructing knowledge graphs",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -32,9 +32,11 @@
32
32
  "src"
33
33
  ],
34
34
  "dependencies": {
35
- "@dxos/app-graph": "0.6.14-main.f49f251",
36
- "@dxos/debug": "0.6.14-main.f49f251",
37
- "@dxos/app-framework": "0.6.14-main.f49f251"
35
+ "@preact/signals-core": "^1.6.0",
36
+ "@dxos/app-graph": "0.6.14-staging.77003c1",
37
+ "@dxos/app-framework": "0.6.14-staging.77003c1",
38
+ "@dxos/async": "0.6.14-staging.77003c1",
39
+ "@dxos/debug": "0.6.14-staging.77003c1"
38
40
  },
39
41
  "devDependencies": {
40
42
  "@types/react": "~18.2.0",
@@ -42,8 +44,8 @@
42
44
  "react": "~18.2.0",
43
45
  "react-dom": "~18.2.0",
44
46
  "vite": "5.4.7",
45
- "@dxos/storybook-utils": "0.6.14-main.f49f251",
46
- "@dxos/react-client": "0.6.14-main.f49f251"
47
+ "@dxos/react-client": "0.6.14-staging.77003c1",
48
+ "@dxos/storybook-utils": "0.6.14-staging.77003c1"
47
49
  },
48
50
  "peerDependencies": {
49
51
  "react": "~18.2.0",
@@ -2,13 +2,17 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
+ import { effect } from '@preact/signals-core';
5
6
  import React from 'react';
6
7
 
7
8
  import { filterPlugins, type GraphProvides, type PluginDefinition, parseGraphBuilderPlugin } from '@dxos/app-framework';
8
9
  import { GraphBuilder } from '@dxos/app-graph';
10
+ import { debounce, type UnsubscribeCallback } from '@dxos/async';
9
11
 
10
12
  import { GraphContext } from './GraphContext';
11
- import meta from './meta';
13
+ import meta, { GRAPH_PLUGIN } from './meta';
14
+
15
+ const KEY = `${GRAPH_PLUGIN}/graph`;
12
16
 
13
17
  /**
14
18
  * Manages the state of the graph for the application.
@@ -16,7 +20,8 @@ import meta from './meta';
16
20
  * This includes actions and annotation each other's nodes.
17
21
  */
18
22
  export const GraphPlugin = (): PluginDefinition<GraphProvides> => {
19
- const builder = new GraphBuilder();
23
+ const builder = GraphBuilder.from(localStorage.getItem(KEY) ?? undefined);
24
+ let unsubscribe: UnsubscribeCallback | undefined;
20
25
 
21
26
  return {
22
27
  meta,
@@ -24,6 +29,23 @@ export const GraphPlugin = (): PluginDefinition<GraphProvides> => {
24
29
  filterPlugins(plugins, parseGraphBuilderPlugin).forEach((plugin) =>
25
30
  builder.addExtension(plugin.provides.graph.builder(plugins)),
26
31
  );
32
+
33
+ await builder.initialize();
34
+
35
+ unsubscribe = effect(
36
+ debounce(() => {
37
+ localStorage.setItem(`${GRAPH_PLUGIN}/graph`, builder.graph.pickle());
38
+ }, 1000),
39
+ );
40
+
41
+ // Expose the graph to the window for debugging.
42
+ const composer = (window as any).composer;
43
+ if (typeof composer === 'object') {
44
+ composer.graph = builder.graph;
45
+ }
46
+ },
47
+ unload: async () => {
48
+ unsubscribe?.();
27
49
  },
28
50
  provides: {
29
51
  graph: builder.graph,
package/src/meta.ts CHANGED
@@ -4,6 +4,8 @@
4
4
 
5
5
  import { type PluginMeta } from '@dxos/app-framework';
6
6
 
7
+ export const GRAPH_PLUGIN = 'dxos.org/plugin/graph';
8
+
7
9
  export default {
8
- id: 'dxos.org/plugin/graph',
10
+ id: GRAPH_PLUGIN,
9
11
  } satisfies PluginMeta;
@@ -1,9 +0,0 @@
1
- // packages/plugins/plugin-graph/src/meta.ts
2
- var meta_default = {
3
- id: "dxos.org/plugin/graph"
4
- };
5
-
6
- export {
7
- meta_default
8
- };
9
- //# sourceMappingURL=chunk-4OVHWC4C.mjs.map
@@ -1,7 +0,0 @@
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 default {\n id: 'dxos.org/plugin/graph',\n} satisfies PluginMeta;\n"],
5
- "mappings": ";AAMA,IAAA,eAAe;EACbA,IAAI;AACN;",
6
- "names": ["id"]
7
- }
@@ -1,7 +0,0 @@
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 default {\n id: 'dxos.org/plugin/graph',\n} satisfies PluginMeta;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAA,eAAe;EACbA,IAAI;AACN;",
6
- "names": ["id"]
7
- }
@@ -1,7 +0,0 @@
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 default {\n id: 'dxos.org/plugin/graph',\n} satisfies PluginMeta;\n"],
5
- "mappings": ";;;AAMA,IAAA,eAAe;EACbA,IAAI;AACN;",
6
- "names": ["id"]
7
- }