@dxos/plugin-explorer 0.8.4-main.4a85c3132b → 0.8.4-main.51f1e5ca51

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 (108) hide show
  1. package/dist/lib/browser/index.mjs +11306 -60
  2. package/dist/lib/browser/index.mjs.map +4 -4
  3. package/dist/lib/browser/meta.json +1 -1
  4. package/dist/lib/browser/meta.mjs +20 -3
  5. package/dist/lib/browser/meta.mjs.map +4 -4
  6. package/dist/lib/browser/translations.mjs +33 -0
  7. package/dist/lib/browser/translations.mjs.map +7 -0
  8. package/dist/lib/browser/types/index.mjs +66 -4
  9. package/dist/lib/browser/types/index.mjs.map +4 -4
  10. package/dist/lib/node-esm/index.mjs +11306 -60
  11. package/dist/lib/node-esm/index.mjs.map +4 -4
  12. package/dist/lib/node-esm/meta.json +1 -1
  13. package/dist/lib/node-esm/meta.mjs +20 -3
  14. package/dist/lib/node-esm/meta.mjs.map +4 -4
  15. package/dist/lib/node-esm/translations.mjs +34 -0
  16. package/dist/lib/node-esm/translations.mjs.map +7 -0
  17. package/dist/lib/node-esm/types/index.mjs +66 -4
  18. package/dist/lib/node-esm/types/index.mjs.map +4 -4
  19. package/dist/types/data/cities.d.ts +4 -4
  20. package/dist/types/data/cities.d.ts.map +1 -1
  21. package/dist/types/data/countries-110m.d.ts +19 -22
  22. package/dist/types/data/countries-110m.d.ts.map +1 -1
  23. package/dist/types/src/ExplorerPlugin.d.ts.map +1 -1
  24. package/dist/types/src/capabilities/index.d.ts +2 -1
  25. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  26. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  27. package/dist/types/src/components/Chart/Chart.d.ts.map +1 -1
  28. package/dist/types/src/components/Chart/Chart.stories.d.ts.map +1 -1
  29. package/dist/types/src/components/Globe/Globe.d.ts.map +1 -1
  30. package/dist/types/src/components/Globe/Globe.stories.d.ts.map +1 -1
  31. package/dist/types/src/components/Graph/D3ForceGraph.d.ts +5 -4
  32. package/dist/types/src/components/Graph/D3ForceGraph.d.ts.map +1 -1
  33. package/dist/types/src/components/Graph/D3ForceGraph.stories.d.ts +4 -2
  34. package/dist/types/src/components/Graph/D3ForceGraph.stories.d.ts.map +1 -1
  35. package/dist/types/src/components/Graph/ForceGraph.stories.d.ts +1 -1
  36. package/dist/types/src/components/Graph/ForceGraph.stories.d.ts.map +1 -1
  37. package/dist/types/src/components/Graph/adapter.d.ts.map +1 -1
  38. package/dist/types/src/components/Graph/testing.d.ts.map +1 -1
  39. package/dist/types/src/components/Tree/Tree.d.ts.map +1 -1
  40. package/dist/types/src/components/Tree/Tree.stories.d.ts.map +1 -1
  41. package/dist/types/src/components/Tree/layout/HierarchicalEdgeBundling.d.ts.map +1 -1
  42. package/dist/types/src/components/Tree/layout/RadialTree.d.ts.map +1 -1
  43. package/dist/types/src/components/Tree/layout/TidyTree.d.ts.map +1 -1
  44. package/dist/types/src/components/Tree/testing/generator.d.ts.map +1 -1
  45. package/dist/types/src/components/Tree/types/tree.d.ts +6 -6
  46. package/dist/types/src/components/Tree/types/tree.d.ts.map +1 -1
  47. package/dist/types/src/components/Tree/types/types.d.ts.map +1 -1
  48. package/dist/types/src/components/plot.d.ts.map +1 -1
  49. package/dist/types/src/containers/ExplorerContainer/ExplorerContainer.d.ts +3 -3
  50. package/dist/types/src/containers/ExplorerContainer/ExplorerContainer.d.ts.map +1 -1
  51. package/dist/types/src/containers/ExplorerContainer/index.d.ts +1 -2
  52. package/dist/types/src/containers/ExplorerContainer/index.d.ts.map +1 -1
  53. package/dist/types/src/hooks/useGraphModel.d.ts.map +1 -1
  54. package/dist/types/src/index.d.ts +0 -1
  55. package/dist/types/src/index.d.ts.map +1 -1
  56. package/dist/types/src/translations.d.ts +28 -26
  57. package/dist/types/src/translations.d.ts.map +1 -1
  58. package/dist/types/src/types/ExplorerAction.d.ts.map +1 -1
  59. package/dist/types/src/types/Graph.d.ts +2 -9
  60. package/dist/types/src/types/Graph.d.ts.map +1 -1
  61. package/dist/types/tsconfig.tsbuildinfo +1 -1
  62. package/package.json +49 -44
  63. package/src/ExplorerPlugin.tsx +22 -11
  64. package/src/capabilities/index.ts +3 -1
  65. package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +10 -9
  66. package/src/components/Chart/Chart.stories.tsx +0 -1
  67. package/src/components/Globe/Globe.stories.tsx +0 -1
  68. package/src/components/Graph/D3ForceGraph.stories.tsx +9 -10
  69. package/src/components/Graph/D3ForceGraph.tsx +81 -75
  70. package/src/components/Graph/ForceGraph.stories.tsx +9 -10
  71. package/src/components/Tree/Tree.stories.tsx +5 -3
  72. package/src/components/Tree/testing/generator.ts +1 -1
  73. package/src/components/Tree/types/tree.test.ts +3 -4
  74. package/src/components/Tree/types/tree.ts +13 -13
  75. package/src/containers/ExplorerContainer/ExplorerContainer.tsx +6 -6
  76. package/src/containers/ExplorerContainer/index.ts +1 -3
  77. package/src/hooks/useGraphModel.ts +14 -10
  78. package/src/index.ts +0 -1
  79. package/src/meta.ts +1 -1
  80. package/src/translations.ts +14 -13
  81. package/src/types/ExplorerAction.ts +0 -1
  82. package/src/types/Graph.ts +8 -22
  83. package/src/typings.d.ts +8 -0
  84. package/dist/lib/browser/ExplorerContainer-4RB2TY3G.mjs +0 -48
  85. package/dist/lib/browser/ExplorerContainer-4RB2TY3G.mjs.map +0 -7
  86. package/dist/lib/browser/chunk-4NFGHCGO.mjs +0 -84
  87. package/dist/lib/browser/chunk-4NFGHCGO.mjs.map +0 -7
  88. package/dist/lib/browser/chunk-6AZY4CDH.mjs +0 -11278
  89. package/dist/lib/browser/chunk-6AZY4CDH.mjs.map +0 -7
  90. package/dist/lib/browser/chunk-YNQF4CPY.mjs +0 -24
  91. package/dist/lib/browser/chunk-YNQF4CPY.mjs.map +0 -7
  92. package/dist/lib/browser/react-surface-KAHVDMFX.mjs +0 -38
  93. package/dist/lib/browser/react-surface-KAHVDMFX.mjs.map +0 -7
  94. package/dist/lib/node-esm/ExplorerContainer-LCG425I7.mjs +0 -49
  95. package/dist/lib/node-esm/ExplorerContainer-LCG425I7.mjs.map +0 -7
  96. package/dist/lib/node-esm/chunk-DK77RB6M.mjs +0 -26
  97. package/dist/lib/node-esm/chunk-DK77RB6M.mjs.map +0 -7
  98. package/dist/lib/node-esm/chunk-DOXAIJEC.mjs +0 -11280
  99. package/dist/lib/node-esm/chunk-DOXAIJEC.mjs.map +0 -7
  100. package/dist/lib/node-esm/chunk-V42OFY7B.mjs +0 -85
  101. package/dist/lib/node-esm/chunk-V42OFY7B.mjs.map +0 -7
  102. package/dist/lib/node-esm/react-surface-7XILIUI4.mjs +0 -39
  103. package/dist/lib/node-esm/react-surface-7XILIUI4.mjs.map +0 -7
  104. package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
  105. package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
  106. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
  107. package/src/capabilities/react-surface/index.ts +0 -7
  108. /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
@@ -1,85 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
- import {
3
- __export
4
- } from "./chunk-HSLMI22Q.mjs";
5
-
6
- // src/types/ExplorerAction.ts
7
- var ExplorerAction_exports = {};
8
- __export(ExplorerAction_exports, {
9
- GraphProps: () => GraphProps
10
- });
11
- import * as Schema from "effect/Schema";
12
- import { TypeInputOptionsAnnotation } from "@dxos/plugin-space/types";
13
- var GraphProps = Schema.Struct({
14
- name: Schema.optional(Schema.String),
15
- // TODO(wittjosiah): This should be a query input instead.
16
- typename: Schema.String.pipe(Schema.annotations({
17
- title: "Select type"
18
- }), TypeInputOptionsAnnotation.set({
19
- location: [
20
- "database",
21
- "runtime"
22
- ],
23
- kind: [
24
- "user"
25
- ],
26
- registered: [
27
- "registered"
28
- ]
29
- }), Schema.optional)
30
- });
31
-
32
- // src/types/Graph.ts
33
- var Graph_exports = {};
34
- __export(Graph_exports, {
35
- Graph: () => Graph,
36
- GraphV1: () => GraphV1,
37
- make: () => make
38
- });
39
- import * as Schema2 from "effect/Schema";
40
- import { Filter, Obj, Query, QueryAST, Ref, Type } from "@dxos/echo";
41
- import { View } from "@dxos/echo";
42
- import { FormInputAnnotation, LabelAnnotation } from "@dxos/echo/internal";
43
- import { ViewAnnotation } from "@dxos/schema";
44
- var GraphSchema = Schema2.Struct({
45
- name: Schema2.optional(Schema2.String),
46
- view: Ref.Ref(View.View).pipe(FormInputAnnotation.set(false)),
47
- query: Schema2.Struct({
48
- raw: Schema2.optional(Schema2.String),
49
- ast: QueryAST.Query
50
- }).pipe(FormInputAnnotation.set(false))
51
- }).pipe(Type.object({
52
- typename: "dxos.org/type/Graph",
53
- version: "0.2.0"
54
- }), LabelAnnotation.set([
55
- "name"
56
- ]), ViewAnnotation.set(true));
57
- var Graph = GraphSchema;
58
- var make = ({ name, query = {
59
- raw: "",
60
- ast: Query.select(Filter.nothing()).ast
61
- }, view }) => {
62
- return Obj.make(Graph, {
63
- name,
64
- view: Ref.make(view),
65
- query
66
- });
67
- };
68
- var GraphV1 = Schema2.Struct({
69
- name: Schema2.optional(Schema2.String),
70
- query: Schema2.Struct({
71
- raw: Schema2.optional(Schema2.String),
72
- ast: QueryAST.Query
73
- })
74
- }).pipe(Type.object({
75
- typename: "dxos.org/type/Graph",
76
- version: "0.1.0"
77
- }), LabelAnnotation.set([
78
- "name"
79
- ]));
80
-
81
- export {
82
- ExplorerAction_exports,
83
- Graph_exports
84
- };
85
- //# sourceMappingURL=chunk-V42OFY7B.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/types/ExplorerAction.ts", "../../../src/types/Graph.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { TypeInputOptionsAnnotation } from '@dxos/plugin-space/types';\n\nexport const GraphProps = Schema.Struct({\n name: Schema.optional(Schema.String),\n // TODO(wittjosiah): This should be a query input instead.\n typename: Schema.String.pipe(\n Schema.annotations({ title: 'Select type' }),\n TypeInputOptionsAnnotation.set({\n location: ['database', 'runtime'],\n kind: ['user'],\n registered: ['registered'],\n }),\n Schema.optional,\n ),\n});\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Filter, Obj, Query, QueryAST, Ref, Type } from '@dxos/echo';\nimport { View } from '@dxos/echo';\nimport { FormInputAnnotation, LabelAnnotation } from '@dxos/echo/internal';\nimport { ViewAnnotation } from '@dxos/schema';\n\nconst GraphSchema = Schema.Struct({\n name: Schema.optional(Schema.String),\n\n view: Ref.Ref(View.View).pipe(FormInputAnnotation.set(false)),\n\n query: Schema.Struct({\n raw: Schema.optional(Schema.String),\n ast: QueryAST.Query,\n }).pipe(FormInputAnnotation.set(false)),\n}).pipe(\n Type.object({\n typename: 'dxos.org/type/Graph',\n version: '0.2.0',\n }),\n LabelAnnotation.set(['name']),\n ViewAnnotation.set(true),\n);\nexport interface Graph extends Schema.Schema.Type<typeof GraphSchema> {}\nexport const Graph: Type.Obj<Graph> = GraphSchema as any;\n\ntype MakeProps = Omit<Partial<Obj.MakeProps<typeof Graph>>, 'view'> & {\n view: View.View;\n};\n\n/**\n * Make a graph as a view of a data set.\n */\nexport const make = ({\n name,\n query = { raw: '', ast: Query.select(Filter.nothing()).ast },\n view,\n}: MakeProps): Graph => {\n return Obj.make(Graph, { name, view: Ref.make(view), query });\n};\n\n//\n// V1\n//\n\nexport const GraphV1 = Schema.Struct({\n name: Schema.optional(Schema.String),\n query: Schema.Struct({\n raw: Schema.optional(Schema.String),\n ast: QueryAST.Query,\n }),\n}).pipe(\n Type.object({\n typename: 'dxos.org/type/Graph',\n version: '0.1.0',\n }),\n LabelAnnotation.set(['name']),\n);\n"],
5
- "mappings": ";;;;;;AAAA;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,kCAAkC;AAEpC,IAAMC,aA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,EAAGP,KACDQ,KAAKC,OAAO;EACVC,UAAU;EACVC,SAAS;AACX,CAAA,GACAC,gBAAgBV,IAAI;EAAC;CAAO,CAAA;",
6
- "names": ["Schema", "TypeInputOptionsAnnotation", "GraphProps", "Struct", "name", "optional", "String", "typename", "pipe", "annotations", "title", "TypeInputOptionsAnnotation", "set", "location", "kind", "registered", "Schema", "Filter", "Obj", "Query", "QueryAST", "Ref", "Type", "View", "FormInputAnnotation", "LabelAnnotation", "ViewAnnotation", "GraphSchema", "Struct", "name", "optional", "String", "view", "Ref", "View", "pipe", "FormInputAnnotation", "set", "query", "raw", "ast", "QueryAST", "Query", "Type", "object", "typename", "version", "LabelAnnotation", "ViewAnnotation", "Graph", "make", "select", "Filter", "nothing", "Obj", "GraphV1"]
7
- }
@@ -1,39 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
- import {
3
- meta
4
- } from "./chunk-DK77RB6M.mjs";
5
- import {
6
- Graph_exports
7
- } from "./chunk-V42OFY7B.mjs";
8
- import "./chunk-HSLMI22Q.mjs";
9
-
10
- // src/capabilities/react-surface/react-surface.tsx
11
- import * as Effect from "effect/Effect";
12
- import React from "react";
13
- import { Capabilities, Capability } from "@dxos/app-framework";
14
- import { Surface } from "@dxos/app-framework/ui";
15
- import { Obj } from "@dxos/echo";
16
-
17
- // src/containers/index.ts
18
- import { lazy } from "react";
19
- var ExplorerContainer = lazy(() => import("./ExplorerContainer-LCG425I7.mjs"));
20
-
21
- // src/capabilities/react-surface/react-surface.tsx
22
- var react_surface_default = Capability.makeModule(() => Effect.succeed(Capability.contributes(Capabilities.ReactSurface, Surface.create({
23
- id: `${meta.id}/article`,
24
- role: [
25
- "article",
26
- "section"
27
- ],
28
- filter: (data) => Obj.instanceOf(Graph_exports.Graph, data.subject),
29
- component: ({ data, role }) => {
30
- return /* @__PURE__ */ React.createElement(ExplorerContainer, {
31
- role,
32
- subject: data.subject
33
- });
34
- }
35
- }))));
36
- export {
37
- react_surface_default as default
38
- };
39
- //# sourceMappingURL=react-surface-7XILIUI4.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/react-surface/react-surface.tsx", "../../../src/containers/index.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React from 'react';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { Surface } from '@dxos/app-framework/ui';\nimport { Obj } from '@dxos/echo';\nimport { type View } from '@dxos/echo';\n\nimport { ExplorerContainer } from '../../containers';\nimport { meta } from '../../meta';\nimport { Graph } from '../../types';\n\nexport default Capability.makeModule(() =>\n Effect.succeed(\n Capability.contributes(\n Capabilities.ReactSurface,\n Surface.create({\n id: `${meta.id}/article`,\n role: ['article', 'section'],\n filter: (data): data is { subject: View.View } => Obj.instanceOf(Graph.Graph, data.subject),\n component: ({ data, role }) => {\n return <ExplorerContainer role={role} subject={data.subject} />;\n },\n }),\n ),\n ),\n);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type ComponentType, lazy } from 'react';\n\nexport const ExplorerContainer: ComponentType<any> = lazy(() => import('./ExplorerContainer'));\n"],
5
- "mappings": ";;;;;;;;;;AAIA,YAAYA,YAAY;AACxB,OAAOC,WAAW;AAElB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,eAAe;AACxB,SAASC,WAAW;;;ACLpB,SAA6BC,YAAY;AAElC,IAAMC,oBAAwCC,KAAK,MAAM,OAAO,kCAAA,CAAA;;;ADUvE,IAAA,wBAAeC,WAAWC,WAAW,MAC5BC,eACLF,WAAWG,YACTC,aAAaC,cACbC,QAAQC,OAAO;EACbC,IAAI,GAAGC,KAAKD,EAAE;EACdE,MAAM;IAAC;IAAW;;EAClBC,QAAQ,CAACC,SAAyCC,IAAIC,WAAWC,cAAMA,OAAOH,KAAKI,OAAO;EAC1FC,WAAW,CAAC,EAAEL,MAAMF,KAAI,MAAE;AACxB,WAAO,sBAAA,cAACQ,mBAAAA;MAAkBR;MAAYM,SAASJ,KAAKI;;EACtD;AACF,CAAA,CAAA,CAAA,CAAA;",
6
- "names": ["Effect", "React", "Capabilities", "Capability", "Surface", "Obj", "lazy", "ExplorerContainer", "lazy", "Capability", "makeModule", "succeed", "contributes", "Capabilities", "ReactSurface", "Surface", "create", "id", "meta", "role", "filter", "data", "Obj", "instanceOf", "Graph", "subject", "component", "ExplorerContainer"]
7
- }
@@ -1,3 +0,0 @@
1
- import { Capability } from '@dxos/app-framework';
2
- export declare const ReactSurface: Capability.LazyCapability<void, Capability.Capability<Capability.InterfaceDef<import("@dxos/app-framework/Capabilities").ReactSurface>>, Error>;
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/react-surface/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,eAAO,MAAM,YAAY,iJAAmE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/react-surface/react-surface.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;;AAS/D,wBAcE"}
@@ -1,7 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { Capability } from '@dxos/app-framework';
6
-
7
- export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));