@dxos/plugin-navtree 0.9.1-staging.ee54ba693a → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/PLUGIN.mdl +8 -6
- package/dist/lib/NavTreePlugin.mjs +40 -0
- package/dist/lib/NavTreePlugin.mjs.map +1 -0
- package/dist/lib/capabilities.mjs +11 -0
- package/dist/lib/capabilities.mjs.map +1 -0
- package/dist/lib/chunk-CommandsDialogContent.mjs +100 -0
- package/dist/lib/chunk-CommandsDialogContent.mjs.map +1 -0
- package/dist/lib/chunk-CommandsTrigger.mjs +27 -0
- package/dist/lib/chunk-CommandsTrigger.mjs.map +1 -0
- package/dist/lib/chunk-NavTreeDocumentTitle.mjs +17 -0
- package/dist/lib/chunk-NavTreeDocumentTitle.mjs.map +1 -0
- package/dist/lib/chunk-app-graph-builder.mjs +33 -0
- package/dist/lib/chunk-app-graph-builder.mjs.map +1 -0
- package/dist/lib/chunk-expose.mjs +31 -0
- package/dist/lib/chunk-expose.mjs.map +1 -0
- package/dist/lib/chunk-keyboard.mjs +49 -0
- package/dist/lib/chunk-keyboard.mjs.map +1 -0
- package/dist/lib/{neutral/chunk-IRQMJLRY.mjs → chunk-meta.mjs} +14 -23
- package/dist/lib/chunk-meta.mjs.map +1 -0
- package/dist/lib/chunk-operation-handler.mjs +11 -0
- package/dist/lib/chunk-operation-handler.mjs.map +1 -0
- package/dist/lib/chunk-react-surface.mjs +46 -0
- package/dist/lib/chunk-react-surface.mjs.map +1 -0
- package/dist/lib/chunk-state.mjs +106 -0
- package/dist/lib/chunk-state.mjs.map +1 -0
- package/dist/lib/chunk-types.mjs +26 -0
- package/dist/lib/chunk-types.mjs.map +1 -0
- package/dist/lib/chunk-util.mjs +51 -0
- package/dist/lib/chunk-util.mjs.map +1 -0
- package/dist/lib/components.mjs +723 -0
- package/dist/lib/components.mjs.map +1 -0
- package/dist/lib/containers.mjs +231 -0
- package/dist/lib/containers.mjs.map +1 -0
- package/dist/lib/hooks.mjs +162 -0
- package/dist/lib/hooks.mjs.map +1 -0
- package/dist/lib/index.mjs +4 -0
- package/dist/lib/meta.mjs +2 -0
- package/dist/lib/operations.mjs +7 -0
- package/dist/lib/operations.mjs.map +1 -0
- package/dist/lib/plugin.mjs +9 -0
- package/dist/lib/plugin.mjs.map +1 -0
- package/dist/lib/testing.mjs +397 -0
- package/dist/lib/testing.mjs.map +1 -0
- package/dist/lib/translations.mjs +17 -0
- package/dist/lib/translations.mjs.map +1 -0
- package/dist/lib/types.mjs +2 -0
- package/dist/types/src/NavTreePlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/keyboard.d.ts +1 -1
- package/dist/types/src/capabilities/nav-tree-view-state.d.ts +12 -0
- package/dist/types/src/capabilities/nav-tree-view-state.d.ts.map +1 -0
- package/dist/types/src/capabilities/nav-tree-view-state.test.d.ts +2 -0
- package/dist/types/src/capabilities/nav-tree-view-state.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts +1 -1
- package/dist/types/src/components/NavTree/NavTree.d.ts.map +1 -1
- package/dist/types/src/components/NavTree/NavTree.stories.d.ts +3 -0
- package/dist/types/src/components/NavTree/NavTree.stories.d.ts.map +1 -1
- package/dist/types/src/components/NavTreeContext/NavTreeContext.d.ts.map +1 -1
- package/dist/types/src/components/NavTreeItem/NavTreeItemAction.d.ts +1 -1
- package/dist/types/src/components/NavTreeItem/NavTreeItemAction.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L0Menu.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L1Panel.d.ts +5 -2
- package/dist/types/src/components/Sidebar/L1Panel.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L1Tabs.d.ts.map +1 -1
- package/dist/types/src/containers/CommandsDialogContent/CommandsDialogContent.d.ts.map +1 -1
- package/dist/types/src/containers/CommandsDialogContent/CommandsDialogContent.stories.d.ts +2 -0
- package/dist/types/src/containers/CommandsDialogContent/CommandsDialogContent.stories.d.ts.map +1 -1
- package/dist/types/src/containers/CommandsTrigger/CommandsTrigger.d.ts +4 -1
- package/dist/types/src/containers/CommandsTrigger/CommandsTrigger.d.ts.map +1 -1
- package/dist/types/src/containers/NavTreeContainer/NavTreeContainer.d.ts.map +1 -1
- package/dist/types/src/containers/NavTreeDocumentTitle/NavTreeDocumentTitle.d.ts +5 -2
- package/dist/types/src/containers/NavTreeDocumentTitle/NavTreeDocumentTitle.d.ts.map +1 -1
- package/dist/types/src/experimental/Tree.d.ts +0 -1
- package/dist/types/src/experimental/Tree.d.ts.map +1 -1
- package/dist/types/src/experimental/Tree.stories.d.ts.map +1 -1
- package/dist/types/src/experimental/visit-nodes.d.ts +3 -0
- package/dist/types/src/experimental/visit-nodes.d.ts.map +1 -0
- package/dist/types/src/hooks/useActions.d.ts +3 -1
- package/dist/types/src/hooks/useActions.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +2 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/NavTreeCapabilities.d.ts +1 -1
- package/dist/types/src/types/NavTreeCapabilities.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +1 -1
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +47 -52
- package/src/NavTreePlugin.tsx +3 -1
- package/src/capabilities/nav-tree-view-state.test.ts +55 -0
- package/src/capabilities/nav-tree-view-state.ts +19 -0
- package/src/capabilities/{react-surface.tsx → react-surface.ts} +8 -9
- package/src/capabilities/state.ts +47 -38
- package/src/components/NavTree/NavTree.stories.tsx +26 -5
- package/src/components/NavTree/NavTree.tsx +10 -13
- package/src/components/NavTreeItem/NavTreeItemAction.tsx +1 -1
- package/src/components/Sidebar/L0Menu.tsx +9 -3
- package/src/components/Sidebar/L1Panel.tsx +52 -20
- package/src/components/Sidebar/L1Tabs.tsx +6 -0
- package/src/containers/CommandsDialogContent/CommandsDialogContent.tsx +49 -44
- package/src/containers/CommandsTrigger/CommandsTrigger.tsx +2 -0
- package/src/containers/NavTreeContainer/NavTreeContainer.tsx +17 -18
- package/src/containers/NavTreeDocumentTitle/NavTreeDocumentTitle.tsx +2 -0
- package/src/experimental/Tree.stories.tsx +2 -1
- package/src/experimental/Tree.tsx +2 -18
- package/src/experimental/visit-nodes.ts +27 -0
- package/src/hooks/useActions.ts +15 -4
- package/src/hooks/useNavTreeModel.ts +1 -1
- package/src/operations/expose.ts +2 -2
- package/src/testing/app-graph-builder.ts +1 -1
- package/src/translations.ts +3 -0
- package/src/types/NavTreeCapabilities.ts +1 -1
- package/src/types/schema.ts +1 -1
- package/src/util.ts +7 -9
- package/dist/lib/neutral/CommandsDialogContent-TEKBCQ3U.mjs +0 -112
- package/dist/lib/neutral/CommandsDialogContent-TEKBCQ3U.mjs.map +0 -7
- package/dist/lib/neutral/CommandsTrigger-HGCI22SP.mjs +0 -27
- package/dist/lib/neutral/CommandsTrigger-HGCI22SP.mjs.map +0 -7
- package/dist/lib/neutral/NavTreeContainer-ICDKC2GI.mjs +0 -12
- package/dist/lib/neutral/NavTreeContainer-ICDKC2GI.mjs.map +0 -7
- package/dist/lib/neutral/NavTreeDocumentTitle-RMERXZGK.mjs +0 -22
- package/dist/lib/neutral/NavTreeDocumentTitle-RMERXZGK.mjs.map +0 -7
- package/dist/lib/neutral/NavTreePlugin.mjs +0 -68
- package/dist/lib/neutral/NavTreePlugin.mjs.map +0 -7
- package/dist/lib/neutral/NavTreePlugin.node.mjs +0 -18
- package/dist/lib/neutral/NavTreePlugin.node.mjs.map +0 -7
- package/dist/lib/neutral/NavTreePlugin.workerd.mjs +0 -16
- package/dist/lib/neutral/NavTreePlugin.workerd.mjs.map +0 -7
- package/dist/lib/neutral/app-graph-builder-2DYAIROU.mjs +0 -42
- package/dist/lib/neutral/app-graph-builder-2DYAIROU.mjs.map +0 -7
- package/dist/lib/neutral/capabilities/index.mjs +0 -17
- package/dist/lib/neutral/capabilities/index.mjs.map +0 -7
- package/dist/lib/neutral/chunk-4RN6TH36.mjs +0 -292
- package/dist/lib/neutral/chunk-4RN6TH36.mjs.map +0 -7
- package/dist/lib/neutral/chunk-BAVI2K7A.mjs +0 -27
- package/dist/lib/neutral/chunk-BAVI2K7A.mjs.map +0 -7
- package/dist/lib/neutral/chunk-EAN4K6OL.mjs +0 -8
- package/dist/lib/neutral/chunk-EAN4K6OL.mjs.map +0 -7
- package/dist/lib/neutral/chunk-IRQMJLRY.mjs.map +0 -7
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +0 -10
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +0 -7
- package/dist/lib/neutral/chunk-JOSNCOV4.mjs +0 -79
- package/dist/lib/neutral/chunk-JOSNCOV4.mjs.map +0 -7
- package/dist/lib/neutral/components/index.mjs +0 -814
- package/dist/lib/neutral/components/index.mjs.map +0 -7
- package/dist/lib/neutral/containers/index.mjs +0 -20
- package/dist/lib/neutral/containers/index.mjs.map +0 -7
- package/dist/lib/neutral/expose-HIBA2NQG.mjs +0 -38
- package/dist/lib/neutral/expose-HIBA2NQG.mjs.map +0 -7
- package/dist/lib/neutral/hooks/index.mjs +0 -181
- package/dist/lib/neutral/hooks/index.mjs.map +0 -7
- package/dist/lib/neutral/index.mjs +0 -34
- package/dist/lib/neutral/index.mjs.map +0 -7
- package/dist/lib/neutral/keyboard-JM2HCF5N.mjs +0 -58
- package/dist/lib/neutral/keyboard-JM2HCF5N.mjs.map +0 -7
- package/dist/lib/neutral/meta.json +0 -1
- package/dist/lib/neutral/meta.mjs +0 -12
- package/dist/lib/neutral/meta.mjs.map +0 -7
- package/dist/lib/neutral/operation-handler-ORDOJUL2.mjs +0 -13
- package/dist/lib/neutral/operation-handler-ORDOJUL2.mjs.map +0 -7
- package/dist/lib/neutral/operations/index.mjs +0 -8
- package/dist/lib/neutral/operations/index.mjs.map +0 -7
- package/dist/lib/neutral/plugin.mjs +0 -16
- package/dist/lib/neutral/plugin.mjs.map +0 -7
- package/dist/lib/neutral/react-surface-QPMUEDZX.mjs +0 -48
- package/dist/lib/neutral/react-surface-QPMUEDZX.mjs.map +0 -7
- package/dist/lib/neutral/state-PDZU4PIP.mjs +0 -126
- package/dist/lib/neutral/state-PDZU4PIP.mjs.map +0 -7
- package/dist/lib/neutral/testing/index.mjs +0 -439
- package/dist/lib/neutral/testing/index.mjs.map +0 -7
- package/dist/lib/neutral/translations.mjs +0 -23
- package/dist/lib/neutral/translations.mjs.map +0 -7
- package/dist/lib/neutral/types/index.mjs +0 -10
- package/dist/lib/neutral/types/index.mjs.map +0 -7
- package/dist/types/src/NavTreePlugin.node.d.ts +0 -4
- package/dist/types/src/NavTreePlugin.node.d.ts.map +0 -1
- package/dist/types/src/NavTreePlugin.test.d.ts +0 -2
- package/dist/types/src/NavTreePlugin.test.d.ts.map +0 -1
- package/dist/types/src/NavTreePlugin.workerd.d.ts +0 -4
- package/dist/types/src/NavTreePlugin.workerd.d.ts.map +0 -1
- package/src/NavTreePlugin.node.ts +0 -17
- package/src/NavTreePlugin.test.ts +0 -27
- package/src/NavTreePlugin.workerd.ts +0 -16
- /package/src/components/NavTreeContext/{NavTreeContext.tsx → NavTreeContext.ts} +0 -0
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
import { range } from "@dxos/util";
|
|
2
|
+
import { GraphBuilder, Node, NodeMatcher } from "@dxos/plugin-graph";
|
|
3
|
+
import * as Effect from "effect/Effect";
|
|
4
|
+
import { Atom } from "@effect-atom/atom";
|
|
5
|
+
import { log } from "@dxos/log";
|
|
6
|
+
import { random } from "@dxos/random";
|
|
7
|
+
import * as Schema from "effect/Schema";
|
|
8
|
+
import { DXN, Obj, Type } from "@dxos/echo";
|
|
9
|
+
import { TestSchema } from "@dxos/echo/testing";
|
|
10
|
+
//#region src/testing/app-graph-builder.ts
|
|
11
|
+
var __dxlog_file$1 = "/__w/dxos/dxos/packages/plugins/plugin-navtree/src/testing/app-graph-builder.ts";
|
|
12
|
+
var storybookGraphBuilders = () => {
|
|
13
|
+
const propertiesCache = /* @__PURE__ */ new Map();
|
|
14
|
+
const getProperties = (id, defaults) => {
|
|
15
|
+
const cached = propertiesCache.get(id);
|
|
16
|
+
if (cached) return cached;
|
|
17
|
+
propertiesCache.set(id, defaults);
|
|
18
|
+
return defaults;
|
|
19
|
+
};
|
|
20
|
+
return Effect.runSync(Effect.all([
|
|
21
|
+
GraphBuilder.createExtension({
|
|
22
|
+
id: "appMenu",
|
|
23
|
+
match: NodeMatcher.whenRoot,
|
|
24
|
+
actions: () => Effect.succeed(Array.from({ length: 5 }, (_, i) => ({
|
|
25
|
+
id: `action-${i}`,
|
|
26
|
+
data: Effect.fnUntraced(function* () {
|
|
27
|
+
log.info("action", {
|
|
28
|
+
id: "app-menu",
|
|
29
|
+
index: i
|
|
30
|
+
}, {
|
|
31
|
+
"~LogMeta": "~LogMeta",
|
|
32
|
+
F: __dxlog_file$1,
|
|
33
|
+
L: 36,
|
|
34
|
+
S: this
|
|
35
|
+
});
|
|
36
|
+
}),
|
|
37
|
+
properties: {
|
|
38
|
+
label: `Action ${i}`,
|
|
39
|
+
icon: random.properties.icon(),
|
|
40
|
+
disposition: "menu"
|
|
41
|
+
}
|
|
42
|
+
})))
|
|
43
|
+
}),
|
|
44
|
+
GraphBuilder.createExtension({
|
|
45
|
+
id: "userAccount",
|
|
46
|
+
match: NodeMatcher.whenRoot,
|
|
47
|
+
connector: () => Effect.succeed([Node.make({
|
|
48
|
+
id: "user-account",
|
|
49
|
+
type: "user-account",
|
|
50
|
+
properties: {
|
|
51
|
+
label: "User profile",
|
|
52
|
+
icon: "ph--user--regular",
|
|
53
|
+
disposition: "user-account",
|
|
54
|
+
userId: "1234567890ABCDEF",
|
|
55
|
+
hue: random.properties.hue(),
|
|
56
|
+
emoji: random.properties.emoji(),
|
|
57
|
+
status: "active"
|
|
58
|
+
},
|
|
59
|
+
nodes: [
|
|
60
|
+
Node.make({
|
|
61
|
+
id: "profile",
|
|
62
|
+
type: "profile",
|
|
63
|
+
properties: {
|
|
64
|
+
label: "Profile",
|
|
65
|
+
icon: "ph--user--regular"
|
|
66
|
+
}
|
|
67
|
+
}),
|
|
68
|
+
Node.make({
|
|
69
|
+
id: "devices",
|
|
70
|
+
type: "devices",
|
|
71
|
+
properties: {
|
|
72
|
+
label: "Devices",
|
|
73
|
+
icon: "ph--devices--regular"
|
|
74
|
+
}
|
|
75
|
+
}),
|
|
76
|
+
Node.make({
|
|
77
|
+
id: "security",
|
|
78
|
+
type: "security",
|
|
79
|
+
properties: {
|
|
80
|
+
label: "Security",
|
|
81
|
+
icon: "ph--key--regular"
|
|
82
|
+
}
|
|
83
|
+
})
|
|
84
|
+
]
|
|
85
|
+
})])
|
|
86
|
+
}),
|
|
87
|
+
GraphBuilder.createExtension({
|
|
88
|
+
id: "spaces",
|
|
89
|
+
match: NodeMatcher.whenRoot,
|
|
90
|
+
connector: (_, get) => Effect.sync(() => {
|
|
91
|
+
const count = Atom.make((get) => {
|
|
92
|
+
let value = 3;
|
|
93
|
+
const interval = setInterval(() => {
|
|
94
|
+
if (value >= 10) {
|
|
95
|
+
clearInterval(interval);
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
value++;
|
|
99
|
+
get.setSelf(value);
|
|
100
|
+
}, 5e3);
|
|
101
|
+
get.addFinalizer(() => clearInterval(interval));
|
|
102
|
+
return value;
|
|
103
|
+
});
|
|
104
|
+
return Array.from({ length: get(count) }, (_, i) => Node.make({
|
|
105
|
+
id: `space-${i}`,
|
|
106
|
+
type: "space",
|
|
107
|
+
properties: getProperties(`space-${i}`, {
|
|
108
|
+
label: `Space ${i}`,
|
|
109
|
+
icon: random.properties.icon(),
|
|
110
|
+
hue: random.properties.hue(),
|
|
111
|
+
disposition: "workspace"
|
|
112
|
+
})
|
|
113
|
+
}));
|
|
114
|
+
})
|
|
115
|
+
}),
|
|
116
|
+
GraphBuilder.createExtension({
|
|
117
|
+
id: "spaceActions",
|
|
118
|
+
match: NodeMatcher.whenNodeType("space"),
|
|
119
|
+
actions: () => Effect.succeed(Array.from({ length: 5 }, (_, i) => ({
|
|
120
|
+
id: `action-${i}`,
|
|
121
|
+
data: Effect.fnUntraced(function* () {
|
|
122
|
+
log.info("action", {
|
|
123
|
+
id: "space-actions",
|
|
124
|
+
index: i
|
|
125
|
+
}, {
|
|
126
|
+
"~LogMeta": "~LogMeta",
|
|
127
|
+
F: __dxlog_file$1,
|
|
128
|
+
L: 137,
|
|
129
|
+
S: this
|
|
130
|
+
});
|
|
131
|
+
}),
|
|
132
|
+
properties: getProperties(`action-${i}`, {
|
|
133
|
+
label: `Action ${i}`,
|
|
134
|
+
icon: random.properties.icon()
|
|
135
|
+
})
|
|
136
|
+
})))
|
|
137
|
+
}),
|
|
138
|
+
GraphBuilder.createExtension({
|
|
139
|
+
id: "objects",
|
|
140
|
+
match: NodeMatcher.whenNodeType("space"),
|
|
141
|
+
connector: (_, get) => Effect.sync(() => {
|
|
142
|
+
const count = Atom.make((get) => {
|
|
143
|
+
let value = 3;
|
|
144
|
+
const interval = setInterval(() => {
|
|
145
|
+
if (value >= 20) {
|
|
146
|
+
clearInterval(interval);
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
value++;
|
|
150
|
+
get.setSelf(value);
|
|
151
|
+
}, 5e3);
|
|
152
|
+
get.addFinalizer(() => clearInterval(interval));
|
|
153
|
+
return value;
|
|
154
|
+
});
|
|
155
|
+
return Array.from({ length: get(count) }, (_, i) => Node.make({
|
|
156
|
+
id: `object-${i}`,
|
|
157
|
+
type: "object",
|
|
158
|
+
properties: getProperties(`object-${i}`, {
|
|
159
|
+
label: `Object ${i}`,
|
|
160
|
+
icon: random.properties.icon(),
|
|
161
|
+
...i % 3 === 0 && { count: (i + 1) * 2 },
|
|
162
|
+
...i % 3 === 1 && { modifiedCount: i + 1 }
|
|
163
|
+
})
|
|
164
|
+
}));
|
|
165
|
+
})
|
|
166
|
+
}),
|
|
167
|
+
GraphBuilder.createExtension({
|
|
168
|
+
id: "objectActions",
|
|
169
|
+
match: NodeMatcher.whenNodeType("object"),
|
|
170
|
+
actions: () => Effect.succeed(Array.from({ length: 5 }, (_, i) => ({
|
|
171
|
+
id: `action-${i}`,
|
|
172
|
+
data: Effect.fnUntraced(function* () {
|
|
173
|
+
log.info("action", {
|
|
174
|
+
id: "objectActions",
|
|
175
|
+
index: i
|
|
176
|
+
}, {
|
|
177
|
+
"~LogMeta": "~LogMeta",
|
|
178
|
+
F: __dxlog_file$1,
|
|
179
|
+
L: 190,
|
|
180
|
+
S: this
|
|
181
|
+
});
|
|
182
|
+
}),
|
|
183
|
+
properties: getProperties(`action-${i}`, {
|
|
184
|
+
label: `Action ${i}`,
|
|
185
|
+
icon: random.properties.icon()
|
|
186
|
+
})
|
|
187
|
+
})))
|
|
188
|
+
})
|
|
189
|
+
]));
|
|
190
|
+
};
|
|
191
|
+
//#endregion
|
|
192
|
+
//#region src/testing/generator.ts
|
|
193
|
+
var createFactory = ({ createSchema, createData }) => {
|
|
194
|
+
const schema = createSchema?.();
|
|
195
|
+
return {
|
|
196
|
+
schema,
|
|
197
|
+
createObject: () => schema ? Obj.make(schema, createData()) : Obj.make(TestSchema.Expando, createData())
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
var Status = [
|
|
201
|
+
"pending",
|
|
202
|
+
"active",
|
|
203
|
+
"done"
|
|
204
|
+
];
|
|
205
|
+
var Priority = [
|
|
206
|
+
1,
|
|
207
|
+
2,
|
|
208
|
+
3,
|
|
209
|
+
4,
|
|
210
|
+
5
|
|
211
|
+
];
|
|
212
|
+
var defaultGenerators = {
|
|
213
|
+
document: { createData: () => ({
|
|
214
|
+
title: random.lorem.sentence(3),
|
|
215
|
+
body: random.lorem.sentences({
|
|
216
|
+
min: 1,
|
|
217
|
+
max: random.number.int({
|
|
218
|
+
min: 1,
|
|
219
|
+
max: 3
|
|
220
|
+
})
|
|
221
|
+
})
|
|
222
|
+
}) },
|
|
223
|
+
image: { createData: () => ({
|
|
224
|
+
title: random.lorem.sentence(3),
|
|
225
|
+
image: random.helpers.arrayElement(data.images),
|
|
226
|
+
body: random.datatype.boolean() ? random.lorem.sentences() : void 0
|
|
227
|
+
}) },
|
|
228
|
+
project: {
|
|
229
|
+
createSchema: () => Type.makeObject(DXN.make("com.example.type.project", "0.1.0"))(Schema.Struct({
|
|
230
|
+
title: Schema.String,
|
|
231
|
+
repo: Schema.String,
|
|
232
|
+
status: Schema.String,
|
|
233
|
+
priority: Schema.Number
|
|
234
|
+
})),
|
|
235
|
+
createData: () => ({
|
|
236
|
+
title: random.commerce.productName(),
|
|
237
|
+
repo: random.datatype.boolean({ probability: .3 }) ? random.internet.url() : void 0,
|
|
238
|
+
status: random.helpers.arrayElement(Status),
|
|
239
|
+
priority: random.helpers.arrayElement(Priority)
|
|
240
|
+
})
|
|
241
|
+
}
|
|
242
|
+
};
|
|
243
|
+
/**
|
|
244
|
+
* Typed object generator.
|
|
245
|
+
*/
|
|
246
|
+
var TestObjectGenerator = class {
|
|
247
|
+
factories;
|
|
248
|
+
constructor({ types, factories } = {}) {
|
|
249
|
+
this.factories = factories ?? (types ?? Object.keys(defaultGenerators)).reduce((acc, type) => {
|
|
250
|
+
acc[type] = createFactory(defaultGenerators[type]);
|
|
251
|
+
return acc;
|
|
252
|
+
}, {});
|
|
253
|
+
}
|
|
254
|
+
get schema() {
|
|
255
|
+
return Object.values(this.factories).map((f) => f.schema);
|
|
256
|
+
}
|
|
257
|
+
createObject({ types } = {}) {
|
|
258
|
+
const type = random.helpers.arrayElement(types ?? Object.keys(this.factories));
|
|
259
|
+
return this.factories[type]?.createObject();
|
|
260
|
+
}
|
|
261
|
+
createObjects({ types, length }) {
|
|
262
|
+
return range(length, () => this.createObject({ types }));
|
|
263
|
+
}
|
|
264
|
+
};
|
|
265
|
+
var data = { images: [
|
|
266
|
+
"/images/image-1.png",
|
|
267
|
+
"/images/image-2.png",
|
|
268
|
+
"/images/image-3.png",
|
|
269
|
+
"/images/image-4.png",
|
|
270
|
+
"/images/image-5.png",
|
|
271
|
+
"/images/image-6.png"
|
|
272
|
+
] };
|
|
273
|
+
var createTree = () => {
|
|
274
|
+
const generator = new TestObjectGenerator({ types: ["document"] });
|
|
275
|
+
return {
|
|
276
|
+
id: "root",
|
|
277
|
+
data: null,
|
|
278
|
+
type: "root",
|
|
279
|
+
properties: {
|
|
280
|
+
label: "Root",
|
|
281
|
+
icon: "ph--circle--regular"
|
|
282
|
+
},
|
|
283
|
+
nodes: [...Array(4)].map(() => {
|
|
284
|
+
const l0 = generator.createObject();
|
|
285
|
+
return {
|
|
286
|
+
id: random.string.uuid(),
|
|
287
|
+
data: null,
|
|
288
|
+
type: "category",
|
|
289
|
+
properties: {
|
|
290
|
+
label: l0.title,
|
|
291
|
+
icon: "ph--horse--regular",
|
|
292
|
+
disposition: "workspace"
|
|
293
|
+
},
|
|
294
|
+
nodes: [
|
|
295
|
+
...[...Array(4)].map(() => {
|
|
296
|
+
const l1 = generator.createObject();
|
|
297
|
+
return {
|
|
298
|
+
id: random.string.uuid(),
|
|
299
|
+
data: null,
|
|
300
|
+
type: "document",
|
|
301
|
+
properties: {
|
|
302
|
+
label: l1.title,
|
|
303
|
+
icon: "ph--butterfly--regular"
|
|
304
|
+
},
|
|
305
|
+
nodes: [{
|
|
306
|
+
id: `${random.string.uuid()}__a1`,
|
|
307
|
+
data: () => {},
|
|
308
|
+
type: "action",
|
|
309
|
+
properties: {
|
|
310
|
+
label: random.lorem.words(2),
|
|
311
|
+
icon: "ph--boat--regular"
|
|
312
|
+
}
|
|
313
|
+
}, {
|
|
314
|
+
id: `${random.string.uuid()}__a2`,
|
|
315
|
+
data: () => {},
|
|
316
|
+
type: "action",
|
|
317
|
+
properties: {
|
|
318
|
+
label: random.lorem.words(2),
|
|
319
|
+
icon: "ph--train-simple--regular"
|
|
320
|
+
}
|
|
321
|
+
}]
|
|
322
|
+
};
|
|
323
|
+
}),
|
|
324
|
+
{
|
|
325
|
+
id: `${random.string.uuid()}__a1`,
|
|
326
|
+
data: () => {},
|
|
327
|
+
type: "action",
|
|
328
|
+
properties: {
|
|
329
|
+
label: random.lorem.words(2),
|
|
330
|
+
icon: "ph--boat--regular"
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
id: `${random.string.uuid()}__a2`,
|
|
335
|
+
data: () => {},
|
|
336
|
+
type: "action",
|
|
337
|
+
properties: {
|
|
338
|
+
label: random.lorem.words(2),
|
|
339
|
+
icon: "ph--train-simple--regular"
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
]
|
|
343
|
+
};
|
|
344
|
+
})
|
|
345
|
+
};
|
|
346
|
+
};
|
|
347
|
+
//#endregion
|
|
348
|
+
//#region src/testing/update-state.ts
|
|
349
|
+
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-navtree/src/testing/update-state.ts";
|
|
350
|
+
var removeItem = (tree, source) => {
|
|
351
|
+
const parent = getNode(tree, source.path.slice(1, -1));
|
|
352
|
+
const index = parent.nodes.findIndex((node) => node.id === source.id);
|
|
353
|
+
const item = parent.nodes[index];
|
|
354
|
+
parent.nodes.splice(index, 1);
|
|
355
|
+
return item;
|
|
356
|
+
};
|
|
357
|
+
var getNode = (tree, path) => {
|
|
358
|
+
let node = tree;
|
|
359
|
+
for (const part of path) node = node.nodes.find((n) => n.id === part);
|
|
360
|
+
return node;
|
|
361
|
+
};
|
|
362
|
+
var updateState = ({ state, instruction, source, target }) => {
|
|
363
|
+
switch (instruction.type) {
|
|
364
|
+
case "reorder-above": {
|
|
365
|
+
const item = removeItem(state, source);
|
|
366
|
+
const parent = getNode(state, target.path.slice(1, -1));
|
|
367
|
+
const index = parent.nodes.findIndex(({ id }) => id === target.id);
|
|
368
|
+
parent.nodes.splice(index, 0, item);
|
|
369
|
+
break;
|
|
370
|
+
}
|
|
371
|
+
case "reorder-below": {
|
|
372
|
+
const item = removeItem(state, source);
|
|
373
|
+
const parent = getNode(state, target.path.slice(1, -1));
|
|
374
|
+
const index = parent.nodes.findIndex(({ id }) => id === target.id);
|
|
375
|
+
parent.nodes.splice(index + 1, 0, item);
|
|
376
|
+
break;
|
|
377
|
+
}
|
|
378
|
+
case "make-child": {
|
|
379
|
+
const item = removeItem(state, source);
|
|
380
|
+
getNode(state, target.path.slice(1)).nodes.push(item);
|
|
381
|
+
break;
|
|
382
|
+
}
|
|
383
|
+
case "instruction-blocked": break;
|
|
384
|
+
default:
|
|
385
|
+
log.warn("Unsupported instruction", instruction, {
|
|
386
|
+
"~LogMeta": "~LogMeta",
|
|
387
|
+
F: __dxlog_file,
|
|
388
|
+
L: 67,
|
|
389
|
+
S: void 0
|
|
390
|
+
});
|
|
391
|
+
break;
|
|
392
|
+
}
|
|
393
|
+
};
|
|
394
|
+
//#endregion
|
|
395
|
+
export { Priority, Status, TestObjectGenerator, createTree, defaultGenerators, storybookGraphBuilders, updateState };
|
|
396
|
+
|
|
397
|
+
//# sourceMappingURL=testing.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testing.mjs","names":[],"sources":["../../src/testing/app-graph-builder.ts","../../src/testing/generator.ts","../../src/testing/update-state.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Atom } from '@effect-atom/atom';\nimport * as Effect from 'effect/Effect';\n\nimport { type BuilderExtensions } from '@dxos/app-graph';\nimport { log } from '@dxos/log';\nimport { GraphBuilder, Node, NodeMatcher } from '@dxos/plugin-graph';\nimport { random } from '@dxos/random';\n\nexport const storybookGraphBuilders = (): BuilderExtensions => {\n const propertiesCache = new Map<string, Record<string, unknown>>();\n const getProperties = (id: string, defaults: Record<string, unknown>) => {\n const cached = propertiesCache.get(id);\n if (cached) {\n return cached;\n }\n\n propertiesCache.set(id, defaults);\n return defaults;\n };\n\n return Effect.runSync(\n Effect.all([\n // Create app menu actions.\n GraphBuilder.createExtension({\n id: 'appMenu',\n match: NodeMatcher.whenRoot,\n actions: () =>\n Effect.succeed(\n Array.from({ length: 5 }, (_, i) => ({\n id: `action-${i}`,\n data: Effect.fnUntraced(function* () {\n log.info('action', { id: 'app-menu', index: i });\n }),\n properties: {\n label: `Action ${i}`,\n icon: random.properties.icon(),\n disposition: 'menu',\n },\n })),\n ),\n }),\n // Create user account node.\n GraphBuilder.createExtension({\n id: 'userAccount',\n match: NodeMatcher.whenRoot,\n connector: () =>\n Effect.succeed([\n Node.make({\n id: 'user-account',\n type: 'user-account',\n properties: {\n label: 'User profile',\n icon: 'ph--user--regular',\n disposition: 'user-account',\n userId: '1234567890ABCDEF',\n hue: random.properties.hue(),\n emoji: random.properties.emoji(),\n status: 'active',\n },\n nodes: [\n Node.make({\n id: 'profile',\n type: 'profile',\n properties: {\n label: 'Profile',\n icon: 'ph--user--regular',\n },\n }),\n Node.make({\n id: 'devices',\n type: 'devices',\n properties: {\n label: 'Devices',\n icon: 'ph--devices--regular',\n },\n }),\n Node.make({\n id: 'security',\n type: 'security',\n properties: {\n label: 'Security',\n icon: 'ph--key--regular',\n },\n }),\n ],\n }),\n ]),\n }),\n // Create space (workspace) nodes directly under root.\n GraphBuilder.createExtension({\n id: 'spaces',\n match: NodeMatcher.whenRoot,\n connector: (_, get) =>\n Effect.sync(() => {\n const count = Atom.make((get) => {\n let value = 3;\n const interval = setInterval(() => {\n if (value >= 10) {\n clearInterval(interval);\n return;\n }\n\n value++;\n get.setSelf(value);\n }, 5000);\n get.addFinalizer(() => clearInterval(interval));\n return value;\n });\n\n return Array.from({ length: get(count) }, (_, i) =>\n Node.make({\n id: `space-${i}`,\n type: 'space',\n properties: getProperties(`space-${i}`, {\n label: `Space ${i}`,\n icon: random.properties.icon(),\n hue: random.properties.hue(),\n disposition: 'workspace',\n }),\n }),\n );\n }),\n }),\n // Create space actions.\n GraphBuilder.createExtension({\n id: 'spaceActions',\n match: NodeMatcher.whenNodeType('space'),\n actions: () =>\n Effect.succeed(\n Array.from({ length: 5 }, (_, i) => ({\n id: `action-${i}`,\n data: Effect.fnUntraced(function* () {\n log.info('action', { id: 'space-actions', index: i });\n }),\n properties: getProperties(`action-${i}`, {\n label: `Action ${i}`,\n icon: random.properties.icon(),\n }),\n })),\n ),\n }),\n // Create object nodes.\n GraphBuilder.createExtension({\n id: 'objects',\n match: NodeMatcher.whenNodeType('space'),\n connector: (_, get) =>\n Effect.sync(() => {\n const count = Atom.make((get) => {\n let value = 3;\n const interval = setInterval(() => {\n if (value >= 20) {\n clearInterval(interval);\n return;\n }\n\n value++;\n get.setSelf(value);\n }, 5000);\n get.addFinalizer(() => clearInterval(interval));\n return value;\n });\n\n return Array.from({ length: get(count) }, (_, i) =>\n Node.make({\n id: `object-${i}`,\n type: 'object',\n properties: getProperties(`object-${i}`, {\n label: `Object ${i}`,\n icon: random.properties.icon(),\n ...(i % 3 === 0 && { count: (i + 1) * 2 }),\n ...(i % 3 === 1 && { modifiedCount: i + 1 }),\n }),\n }),\n );\n }),\n }),\n // Create object actions.\n GraphBuilder.createExtension({\n id: 'objectActions',\n match: NodeMatcher.whenNodeType('object'),\n actions: () =>\n Effect.succeed(\n Array.from({ length: 5 }, (_, i) => ({\n id: `action-${i}`,\n data: Effect.fnUntraced(function* () {\n log.info('action', { id: 'objectActions', index: i });\n }),\n properties: getProperties(`action-${i}`, {\n label: `Action ${i}`,\n icon: random.properties.icon(),\n }),\n })),\n ),\n }),\n ]),\n );\n};\n","//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { type Node } from '@dxos/app-graph';\nimport { DXN, Obj, Type } from '@dxos/echo';\nimport { TestSchema } from '@dxos/echo/testing';\nimport { random } from '@dxos/random';\nimport { range } from '@dxos/util';\n\n// TODO(burdon): Reconcile with @dxos/plugin-debug, @dxos/react-ui/testing.\n// TODO(burdon): Bug when adding stale objects to space (e.g., static objects already added in previous story invocation).\n\n// TODO(burdon): Commit to using ECHO to generate all test data? Or convert from raw data?\nexport type TestItem = { id: string; type: string } & Record<string, any>;\n\ntype ObjectDataGenerator = {\n createSchema?: () => Type.AnyObj;\n createData: () => any;\n};\n\ntype ObjectFactory<T> = {\n schema?: Type.AnyObj; // TODO(burdon): Support both typed and expando schema.\n createObject: () => T;\n};\n\ntype ObjectFactoryMap = { [type: string]: ObjectFactory<any> };\n\nconst createFactory = ({ createSchema, createData }: ObjectDataGenerator) => {\n const schema = createSchema?.();\n return {\n schema,\n createObject: () => (schema ? Obj.make(schema, createData()) : Obj.make(TestSchema.Expando, createData())),\n };\n};\n\n// TODO(burdon): Handle restricted values.\nexport const Status = ['pending', 'active', 'done'];\nexport const Priority = [1, 2, 3, 4, 5];\n\nexport const defaultGenerators: { [type: string]: ObjectDataGenerator } = {\n document: {\n createData: () => ({\n title: random.lorem.sentence(3),\n body: random.lorem.sentences({ min: 1, max: random.number.int({ min: 1, max: 3 }) }),\n }),\n },\n\n image: {\n createData: () => ({\n title: random.lorem.sentence(3),\n image: random.helpers.arrayElement(data.images),\n body: random.datatype.boolean() ? random.lorem.sentences() : undefined,\n }),\n },\n\n project: {\n createSchema: () =>\n Type.makeObject(DXN.make('com.example.type.project', '0.1.0'))(\n Schema.Struct({\n title: Schema.String,\n repo: Schema.String,\n status: Schema.String,\n priority: Schema.Number,\n }),\n ),\n\n createData: () => ({\n title: random.commerce.productName(),\n repo: random.datatype.boolean({ probability: 0.3 }) ? random.internet.url() : undefined,\n status: random.helpers.arrayElement(Status),\n priority: random.helpers.arrayElement(Priority),\n }),\n },\n};\n\n/**\n * Typed object generator.\n */\nexport class TestObjectGenerator {\n public readonly factories: ObjectFactoryMap;\n\n constructor({ types, factories }: { types?: string[]; factories?: ObjectFactoryMap } = {}) {\n this.factories =\n factories ??\n (types ?? Object.keys(defaultGenerators)).reduce<ObjectFactoryMap>((acc, type) => {\n acc[type] = createFactory(defaultGenerators[type]);\n return acc;\n }, {});\n }\n\n get schema(): Type.AnyObj[] {\n return Object.values(this.factories).map((f) => f.schema!);\n }\n\n createObject({ types }: { types?: string[] } = {}) {\n const type = random.helpers.arrayElement(types ?? Object.keys(this.factories));\n const factory = this.factories[type];\n return factory?.createObject();\n }\n\n createObjects({ types, length }: { types?: string[]; length: number }) {\n return range(length, () => this.createObject({ types }));\n }\n}\n\n// https://unsplash.com\n// TODO(burdon): Use https://picsum.photos?\nconst data = {\n images: [\n '/images/image-1.png',\n '/images/image-2.png',\n '/images/image-3.png',\n '/images/image-4.png',\n '/images/image-5.png',\n '/images/image-6.png',\n ],\n};\n\nexport const createTree = () => {\n const generator = new TestObjectGenerator({ types: ['document'] });\n\n const initialContent = {\n id: 'root',\n data: null,\n type: 'root',\n properties: {\n label: 'Root',\n icon: 'ph--circle--regular',\n },\n nodes: [...Array(4)].map(() => {\n const l0 = generator.createObject();\n return {\n id: random.string.uuid(),\n data: null,\n type: 'category',\n properties: {\n label: l0.title,\n icon: 'ph--horse--regular',\n disposition: 'workspace',\n },\n nodes: [\n ...[...Array(4)].map(() => {\n const l1 = generator.createObject();\n return {\n id: random.string.uuid(),\n data: null,\n type: 'document',\n properties: {\n label: l1.title,\n icon: 'ph--butterfly--regular',\n },\n nodes: [\n {\n id: `${random.string.uuid()}__a1`,\n data: () => {},\n type: 'action',\n properties: {\n label: random.lorem.words(2),\n icon: 'ph--boat--regular',\n },\n },\n {\n id: `${random.string.uuid()}__a2`,\n data: () => {},\n type: 'action',\n properties: {\n label: random.lorem.words(2),\n icon: 'ph--train-simple--regular',\n },\n },\n ],\n } satisfies Node.NodeArg<any>;\n }),\n {\n id: `${random.string.uuid()}__a1`,\n data: () => {},\n type: 'action',\n properties: {\n label: random.lorem.words(2),\n icon: 'ph--boat--regular',\n },\n },\n {\n id: `${random.string.uuid()}__a2`,\n data: () => {},\n type: 'action',\n properties: {\n label: random.lorem.words(2),\n icon: 'ph--train-simple--regular',\n },\n },\n ],\n } satisfies Node.NodeArg<any>;\n }),\n } satisfies Node.NodeArg<any>;\n\n return initialContent;\n};\n","//\n// Copyright 2024 DXOS.org\n//\n\nimport { type Instruction } from '@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item';\n\nimport { type Node } from '@dxos/app-graph';\nimport { log } from '@dxos/log';\nimport { type TreeData } from '@dxos/react-ui-list';\n\nconst removeItem = (tree: Node.NodeArg<any>, source: TreeData) => {\n const parent = getNode(tree, source.path.slice(1, -1));\n const index = parent.nodes!.findIndex((node: Node.NodeArg<any>) => node.id === source.id);\n const item = parent.nodes![index];\n parent.nodes!.splice(index, 1);\n return item;\n};\n\nconst getNode = (tree: Node.NodeArg<any>, path: string[]) => {\n let node = tree;\n for (const part of path) {\n node = node.nodes!.find((n: Node.NodeArg<any>) => n.id === part)!;\n }\n return node;\n};\n\n// TODO(wittjosiah): Reconcile with react-ui-list/Tree/testing.\nexport const updateState = ({\n state,\n instruction,\n source,\n target,\n}: {\n state: Node.NodeArg<any>;\n instruction: Instruction;\n source: TreeData;\n target: TreeData;\n}) => {\n switch (instruction.type) {\n case 'reorder-above': {\n const item = removeItem(state, source);\n const parent = getNode(state, target.path.slice(1, -1));\n const index = parent.nodes!.findIndex(({ id }) => id === target.id);\n parent.nodes!.splice(index, 0, item);\n break;\n }\n\n case 'reorder-below': {\n const item = removeItem(state, source);\n const parent = getNode(state, target.path.slice(1, -1));\n const index = parent.nodes!.findIndex(({ id }) => id === target.id);\n parent.nodes!.splice(index + 1, 0, item);\n break;\n }\n\n case 'make-child': {\n const item = removeItem(state, source);\n const parent = getNode(state, target.path.slice(1));\n parent.nodes!.push(item);\n break;\n }\n\n case 'instruction-blocked':\n break;\n\n default:\n log.warn('Unsupported instruction', instruction);\n break;\n }\n};\n"],"mappings":";;;;;;;;;;;AAYA,IAAa,+BAAkD;CAC7D,MAAM,kCAAkB,IAAI,IAAqC;CACjE,MAAM,iBAAiB,IAAY,aAAsC;EACvE,MAAM,SAAS,gBAAgB,IAAI,EAAE;EACrC,IAAI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EACF;EAEA,KAAK,uBACH;EAEF;GACE,IAAI,KAAK,2BAA2B,aAAU;IAAA,YAAA;IAAA,GAAA;IAAA,GAAA;IAAA,GAAA,KAAA;GAAA,CAAC;GAC/C;CACJ;AACF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { meta } from "#meta";
|
|
2
|
+
//#region src/translations.ts
|
|
3
|
+
var translations = [{ "en-US": { [meta.profile.key]: {
|
|
4
|
+
"app-menu.label": "App menu",
|
|
5
|
+
"open-commands.label": "Search commands",
|
|
6
|
+
"commands-dialog.title": "Commands",
|
|
7
|
+
"command-list-input.placeholder": "Search for commands…",
|
|
8
|
+
"node-actions-menu-invoker.label": "More options",
|
|
9
|
+
"tree-item-actions.label": "More actions",
|
|
10
|
+
"button-back.button": "Back to Space",
|
|
11
|
+
"workspace-unavailable.heading": "Workspace unavailable",
|
|
12
|
+
"workspace-unavailable.description": "You don’t have this workspace, or it no longer exists. Select one of your workspaces to continue."
|
|
13
|
+
} } }];
|
|
14
|
+
//#endregion
|
|
15
|
+
export { translations };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=translations.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"translations.mjs","names":[],"sources":["../../src/translations.ts"],"sourcesContent":["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nimport { meta } from '#meta';\n\nexport const translations = [\n {\n 'en-US': {\n [meta.profile.key]: {\n 'app-menu.label': 'App menu',\n 'open-commands.label': 'Search commands',\n 'commands-dialog.title': 'Commands',\n 'command-list-input.placeholder': 'Search for commands…',\n 'node-actions-menu-invoker.label': 'More options',\n 'tree-item-actions.label': 'More actions',\n 'button-back.button': 'Back to Space',\n 'workspace-unavailable.heading': 'Workspace unavailable',\n 'workspace-unavailable.description':\n 'You don’t have this workspace, or it no longer exists. Select one of your workspaces to continue.',\n },\n },\n },\n] as const satisfies Resource[];\n"],"mappings":";;AAQA,IAAa,eAAe,CAC1B,EACE,SAAS,GACN,KAAK,QAAQ,MAAM;CAClB,kBAAkB;CAClB,uBAAuB;CACvB,yBAAyB;CACzB,kCAAkC;CAClC,mCAAmC;CACnC,2BAA2B;CAC3B,sBAAsB;CACtB,iCAAiC;CACjC,qCACE;AACJ,EACF,EACF,CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavTreePlugin.d.ts","sourceRoot":"","sources":["../../../src/NavTreePlugin.tsx"],"names":[],"mappings":"AAMA,OAAO,EAA+D,MAAM,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"NavTreePlugin.d.ts","sourceRoot":"","sources":["../../../src/NavTreePlugin.tsx"],"names":[],"mappings":"AAMA,OAAO,EAA+D,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAa1G,eAAO,MAAM,aAAa,4BA4CzB,CAAC;eAEa,aAAa"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Effect from 'effect/Effect';
|
|
2
2
|
import { Capability } from '@dxos/app-framework';
|
|
3
|
-
declare const _default: (props: void) => Effect.Effect<Capability.Any, never,
|
|
3
|
+
declare const _default: (props: void) => Effect.Effect<Capability.Any, never, import("effect/Scope").Scope>;
|
|
4
4
|
export default _default;
|
|
5
5
|
//# sourceMappingURL=app-graph-builder.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Effect from 'effect/Effect';
|
|
2
2
|
import { Capability } from '@dxos/app-framework';
|
|
3
|
-
declare const _default: (props: void) => Effect.Effect<Capability.Any, Error, Capability.Service>;
|
|
3
|
+
declare const _default: (props: void) => Effect.Effect<Capability.Any, Error, import("effect/Scope").Scope | Capability.Service>;
|
|
4
4
|
export default _default;
|
|
5
5
|
//# sourceMappingURL=keyboard.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ViewState } from '@dxos/react-ui-attention/types';
|
|
2
|
+
/**
|
|
3
|
+
* Per-path navtree expansion, persisted (localStorage) via the ViewState `local` backend keyed by
|
|
4
|
+
* tree path — replaces the hand-rolled single-blob localStorage store. Only `open` is durable; the
|
|
5
|
+
* `current` highlight is ephemeral (driven by the active layout) and never persisted.
|
|
6
|
+
*/
|
|
7
|
+
export declare const navTreeOpenAspect: ViewState.Aspect<{
|
|
8
|
+
readonly open: boolean;
|
|
9
|
+
}, {
|
|
10
|
+
readonly open: boolean;
|
|
11
|
+
}>;
|
|
12
|
+
//# sourceMappingURL=nav-tree-view-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nav-tree-view-state.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/nav-tree-view-state.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAE3D;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;;;;EAK5B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nav-tree-view-state.test.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/nav-tree-view-state.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Effect from 'effect/Effect';
|
|
2
2
|
import { Capability } from '@dxos/app-framework';
|
|
3
3
|
import type { OperationHandlerSet } from '@dxos/compute';
|
|
4
|
-
declare const _default: (props: OperationHandlerSet.OperationHandlerSet) => Effect.Effect<Capability.ModuleReturn, Error, Capability.Service>;
|
|
4
|
+
declare const _default: (props: OperationHandlerSet.OperationHandlerSet) => Effect.Effect<Capability.ModuleReturn, Error, import("effect/Scope").Scope | Capability.Service>;
|
|
5
5
|
export default _default;
|
|
6
6
|
//# sourceMappingURL=operation-handler.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Effect from 'effect/Effect';
|
|
2
2
|
import { Capability } from '@dxos/app-framework';
|
|
3
|
-
declare const _default: (props: void) => Effect.Effect<Capability.Any, never,
|
|
3
|
+
declare const _default: (props: void) => Effect.Effect<Capability.Any, never, import("effect/Scope").Scope>;
|
|
4
4
|
export default _default;
|
|
5
5
|
//# sourceMappingURL=react-surface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.
|
|
1
|
+
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAgB,UAAU,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Effect from 'effect/Effect';
|
|
2
2
|
import { Capability } from '@dxos/app-framework';
|
|
3
|
-
declare const _default: (props: void) => Effect.Effect<Capability.Any, Error, Capability.Service>;
|
|
3
|
+
declare const _default: (props: void) => Effect.Effect<Capability.Any, Error, import("effect/Scope").Scope | Capability.Service>;
|
|
4
4
|
export default _default;
|
|
5
5
|
//# sourceMappingURL=state.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavTree.d.ts","sourceRoot":"","sources":["../../../../../src/components/NavTree/NavTree.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,OAAO,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"NavTree.d.ts","sourceRoot":"","sources":["../../../../../src/components/NavTree/NavTree.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAS1C,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9D,eAAO,MAAM,aAAa,gBAAgB,CAAC;AAE3C,MAAM,MAAM,YAAY,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;AAGrG,eAAO,MAAM,OAAO;QAHa,MAAM;WAAS,IAAI,CAAC,IAAI;SAAO,MAAM;oEA4BpE,CAAC"}
|
|
@@ -18,6 +18,8 @@ declare const meta: {
|
|
|
18
18
|
readonly 'node-actions-menu-invoker.label': 'More options';
|
|
19
19
|
readonly 'tree-item-actions.label': 'More actions';
|
|
20
20
|
readonly 'button-back.button': 'Back to Space';
|
|
21
|
+
readonly 'workspace-unavailable.heading': 'Workspace unavailable';
|
|
22
|
+
readonly 'workspace-unavailable.description': 'You don\u2019t have this workspace, or it no longer exists. Select one of your workspaces to continue.';
|
|
21
23
|
};
|
|
22
24
|
};
|
|
23
25
|
}];
|
|
@@ -26,4 +28,5 @@ declare const meta: {
|
|
|
26
28
|
export default meta;
|
|
27
29
|
type Story = StoryObj<typeof NavTreeContainer>;
|
|
28
30
|
export declare const Default: Story;
|
|
31
|
+
export declare const UnavailableWorkspace: Story;
|
|
29
32
|
//# sourceMappingURL=NavTree.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavTree.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/NavTree/NavTree.stories.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAA4B,MAAM,OAAO,CAAC;AAejD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"NavTree.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/NavTree/NavTree.stories.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAA4B,MAAM,OAAO,CAAC;AAejD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AA+G/C,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;CAuC+B,CAAC;eAE3B,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE/C,eAAO,MAAM,OAAO,EAAE,KA8CrB,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAOlC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavTreeContext.d.ts","sourceRoot":"","sources":["../../../../../src/components/NavTreeContext/NavTreeContext.
|
|
1
|
+
{"version":3,"file":"NavTreeContext.d.ts","sourceRoot":"","sources":["../../../../../src/components/NavTreeContext/NavTreeContext.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD,eAAO,MAAM,cAAc,qDAAkD,CAAC;AAE9E,eAAO,MAAM,iBAAiB,2BAAiF,CAAC"}
|
|
@@ -10,7 +10,7 @@ export type NavTreeItemActionMenuProps = ActionProperties & {
|
|
|
10
10
|
};
|
|
11
11
|
export declare const NavTreeItemActionDropdownMenu: React.ForwardRefExoticComponent<Omit<NavTreeItemActionMenuProps, "className"> & {
|
|
12
12
|
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
13
|
-
} & Pick<React.HTMLAttributes<Element>, "children" | "
|
|
13
|
+
} & Pick<React.HTMLAttributes<Element>, "children" | "role" | "style"> & React.RefAttributes<HTMLButtonElement>>;
|
|
14
14
|
export declare const NavTreeItemMonolithicAction: (props: Node.Action & {
|
|
15
15
|
parent: Node.Node;
|
|
16
16
|
path?: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavTreeItemAction.d.ts","sourceRoot":"","sources":["../../../../../src/components/NavTreeItem/NavTreeItemAction.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAQ5C,O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kEAO3B,0BAA0B,sBAU5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"L0Menu.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sidebar/L0Menu.tsx"],"names":[],"mappings":"AAcA,OAAO,KAUN,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAIL,KAAK,eAAe,EAKrB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAQ,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"L0Menu.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sidebar/L0Menu.tsx"],"names":[],"mappings":"AAcA,OAAO,KAUN,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAIL,KAAK,eAAe,EAKrB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAQ,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAmH1D,eAAO,MAAM,wBAAwB,mBAAoB,eAAe,CAAC,EAAE,CAAC,sBAO3E,CAAC;AAkHF,MAAM,MAAM,WAAW,GAAG;IACxB,WAAW,EAAE,QAAQ,EAAE,CAAC;IACxB,aAAa,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;IAC3B,WAAW,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;IACzB,eAAe,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC;IAC5B,MAAM,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC;IACnB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAA;KAAE,KAAK,IAAI,CAAC;CACrD,CAAC;AAEF,eAAO,MAAM,MAAM,6FAQhB,WAAW,sBAoGb,CAAC"}
|
|
@@ -3,9 +3,12 @@ import { Node } from '@dxos/app-graph';
|
|
|
3
3
|
export type L1PanelProps = {
|
|
4
4
|
open?: boolean;
|
|
5
5
|
path: string[];
|
|
6
|
-
|
|
6
|
+
/** The tab's workspace id, which may name a workspace that has no graph node. */
|
|
7
|
+
id: string;
|
|
8
|
+
/** Absent when the workspace is not in the graph; the panel then renders the unavailable message. */
|
|
9
|
+
item?: Node.Node;
|
|
7
10
|
isCurrent: boolean;
|
|
8
11
|
onBack?: () => void;
|
|
9
12
|
};
|
|
10
|
-
export declare const L1Panel: React.MemoExoticComponent<({ open, path, item, isCurrent, onBack }: L1PanelProps) => React.JSX.Element>;
|
|
13
|
+
export declare const L1Panel: React.MemoExoticComponent<({ open, path, id, item, isCurrent, onBack }: L1PanelProps) => React.JSX.Element>;
|
|
11
14
|
//# sourceMappingURL=L1Panel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"L1Panel.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sidebar/L1Panel.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAE1D,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"L1Panel.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sidebar/L1Panel.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAE1D,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAwBvC,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,iFAAiF;IACjF,EAAE,EAAE,MAAM,CAAC;IACX,qGAAqG;IACrG,IAAI,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AA4NF,eAAO,MAAM,OAAO,0EArN+C,YAAY,uBAqNtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"L1Tabs.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sidebar/L1Tabs.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAEvD,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,QAAQ,CAAC,GAAG;IAChE,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,aAAa,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,MAAM,yDAA0D,WAAW,
|
|
1
|
+
{"version":3,"file":"L1Tabs.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sidebar/L1Tabs.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAEvD,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,QAAQ,CAAC,GAAG;IAChE,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,aAAa,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,MAAM,yDAA0D,WAAW,sBA2BvF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandsDialogContent.d.ts","sourceRoot":"","sources":["../../../../../src/containers/CommandsDialogContent/CommandsDialogContent.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAwC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CommandsDialogContent.d.ts","sourceRoot":"","sources":["../../../../../src/containers/CommandsDialogContent/CommandsDialogContent.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAgB7D,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAGF,eAAO,MAAM,qBAAqB,mGAwGjC,CAAC"}
|