@dxos/plugin-stack 0.8.4-main.c1de068 → 0.8.4-main.c85a9c8dae

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 (84) hide show
  1. package/dist/lib/browser/StackContainer-BIFUBD3Y.mjs +289 -0
  2. package/dist/lib/browser/StackContainer-BIFUBD3Y.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-FVB7LGW7.mjs → chunk-4X7CK6FM.mjs} +7 -5
  4. package/dist/lib/browser/chunk-4X7CK6FM.mjs.map +7 -0
  5. package/dist/lib/browser/{chunk-IRTROCUQ.mjs → chunk-CD32XYEB.mjs} +10 -11
  6. package/dist/lib/browser/chunk-CD32XYEB.mjs.map +7 -0
  7. package/dist/lib/browser/index.mjs +39 -55
  8. package/dist/lib/browser/index.mjs.map +4 -4
  9. package/dist/lib/browser/meta.json +1 -1
  10. package/dist/lib/browser/react-surface-PVND4UCN.mjs +34 -0
  11. package/dist/lib/browser/react-surface-PVND4UCN.mjs.map +7 -0
  12. package/dist/lib/browser/types/index.mjs +1 -1
  13. package/dist/lib/node-esm/StackContainer-7XVJHW4D.mjs +290 -0
  14. package/dist/lib/node-esm/StackContainer-7XVJHW4D.mjs.map +7 -0
  15. package/dist/lib/node-esm/{chunk-LRAZXJ65.mjs → chunk-26XWE7UY.mjs} +10 -11
  16. package/dist/lib/node-esm/chunk-26XWE7UY.mjs.map +7 -0
  17. package/dist/lib/node-esm/{chunk-UN5PA7TK.mjs → chunk-HEEGXPSW.mjs} +7 -5
  18. package/dist/lib/node-esm/chunk-HEEGXPSW.mjs.map +7 -0
  19. package/dist/lib/node-esm/index.mjs +39 -55
  20. package/dist/lib/node-esm/index.mjs.map +4 -4
  21. package/dist/lib/node-esm/meta.json +1 -1
  22. package/dist/lib/node-esm/react-surface-SZETVRAZ.mjs +35 -0
  23. package/dist/lib/node-esm/react-surface-SZETVRAZ.mjs.map +7 -0
  24. package/dist/lib/node-esm/types/index.mjs +1 -1
  25. package/dist/types/src/StackPlugin.d.ts +2 -1
  26. package/dist/types/src/StackPlugin.d.ts.map +1 -1
  27. package/dist/types/src/capabilities/index.d.ts +1 -1
  28. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  29. package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
  30. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
  31. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
  32. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
  33. package/dist/types/src/components/StackSection.d.ts.map +1 -1
  34. package/dist/types/src/components/StackSettings.d.ts.map +1 -1
  35. package/dist/types/src/components/index.d.ts +2 -4
  36. package/dist/types/src/components/index.d.ts.map +1 -1
  37. package/dist/types/src/containers/StackContainer/StackContainer.d.ts +9 -0
  38. package/dist/types/src/containers/StackContainer/StackContainer.d.ts.map +1 -0
  39. package/dist/types/src/containers/StackContainer/index.d.ts +3 -0
  40. package/dist/types/src/containers/StackContainer/index.d.ts.map +1 -0
  41. package/dist/types/src/containers/index.d.ts +3 -0
  42. package/dist/types/src/containers/index.d.ts.map +1 -0
  43. package/dist/types/src/meta.d.ts +2 -3
  44. package/dist/types/src/meta.d.ts.map +1 -1
  45. package/dist/types/src/translations.d.ts +5 -4
  46. package/dist/types/src/translations.d.ts.map +1 -1
  47. package/dist/types/src/types/stack.d.ts +13 -14
  48. package/dist/types/src/types/stack.d.ts.map +1 -1
  49. package/dist/types/src/types/types.d.ts +3 -3
  50. package/dist/types/src/types/types.d.ts.map +1 -1
  51. package/dist/types/tsconfig.tsbuildinfo +1 -1
  52. package/package.json +45 -37
  53. package/src/StackPlugin.ts +26 -42
  54. package/src/capabilities/index.ts +1 -3
  55. package/src/capabilities/react-surface/index.ts +7 -0
  56. package/src/capabilities/react-surface/react-surface.tsx +34 -0
  57. package/src/components/StackSection.tsx +16 -15
  58. package/src/components/StackSettings.tsx +15 -8
  59. package/src/components/index.ts +2 -4
  60. package/src/containers/StackContainer/StackContainer.tsx +169 -0
  61. package/src/containers/StackContainer/index.ts +7 -0
  62. package/src/containers/index.ts +7 -0
  63. package/src/meta.ts +8 -5
  64. package/src/translations.ts +4 -3
  65. package/src/types/stack.ts +12 -8
  66. package/src/types/types.ts +3 -3
  67. package/dist/lib/browser/StackMain-ET24BQFZ.mjs +0 -299
  68. package/dist/lib/browser/StackMain-ET24BQFZ.mjs.map +0 -7
  69. package/dist/lib/browser/chunk-FVB7LGW7.mjs.map +0 -7
  70. package/dist/lib/browser/chunk-IRTROCUQ.mjs.map +0 -7
  71. package/dist/lib/browser/react-surface-KODSQDIY.mjs +0 -46
  72. package/dist/lib/browser/react-surface-KODSQDIY.mjs.map +0 -7
  73. package/dist/lib/node-esm/StackMain-LCMLZ4MS.mjs +0 -300
  74. package/dist/lib/node-esm/StackMain-LCMLZ4MS.mjs.map +0 -7
  75. package/dist/lib/node-esm/chunk-LRAZXJ65.mjs.map +0 -7
  76. package/dist/lib/node-esm/chunk-UN5PA7TK.mjs.map +0 -7
  77. package/dist/lib/node-esm/react-surface-SWMUVIYU.mjs +0 -47
  78. package/dist/lib/node-esm/react-surface-SWMUVIYU.mjs.map +0 -7
  79. package/dist/types/src/capabilities/react-surface.d.ts +0 -4
  80. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  81. package/dist/types/src/components/StackMain.d.ts +0 -9
  82. package/dist/types/src/components/StackMain.d.ts.map +0 -1
  83. package/src/capabilities/react-surface.tsx +0 -34
  84. package/src/components/StackMain.tsx +0 -159
@@ -0,0 +1,289 @@
1
+ import {
2
+ meta
3
+ } from "./chunk-4X7CK6FM.mjs";
4
+
5
+ // src/containers/StackContainer/StackContainer.tsx
6
+ import { Atom, useAtomValue } from "@effect-atom/atom-react";
7
+ import * as Option from "effect/Option";
8
+ import React4, { useCallback, useState as useState2 } from "react";
9
+ import { useCapabilities, useOperationInvoker } from "@dxos/app-framework/ui";
10
+ import { AppCapabilities, LayoutOperation } from "@dxos/app-toolkit";
11
+ import { useAppGraph } from "@dxos/app-toolkit/ui";
12
+ import { Obj } from "@dxos/echo";
13
+ import { AtomObj } from "@dxos/echo-atom";
14
+ import { Graph } from "@dxos/plugin-graph";
15
+ import { SpaceOperation } from "@dxos/plugin-space/types";
16
+ import { Toolbar, toLocalizedString, useTranslation as useTranslation3 } from "@dxos/react-ui";
17
+ import { AttentionProvider } from "@dxos/react-ui-attention";
18
+ import { Stack, StackItem as StackItem2 } from "@dxos/react-ui-stack";
19
+ import { isNonNullable } from "@dxos/util";
20
+
21
+ // src/components/StackContext.tsx
22
+ import { createContext, useContext } from "react";
23
+ var StackContext = /* @__PURE__ */ createContext({
24
+ onCollapse: () => {
25
+ },
26
+ onNavigate: async () => {
27
+ },
28
+ onDelete: async () => {
29
+ },
30
+ onAdd: () => {
31
+ }
32
+ });
33
+ var useStack = () => useContext(StackContext);
34
+
35
+ // src/components/StackSection.tsx
36
+ import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
37
+ import React2, { useMemo, useState } from "react";
38
+ import { Surface } from "@dxos/app-framework/ui";
39
+ import { DropdownMenu, Icon, IconButton, useTranslation } from "@dxos/react-ui";
40
+ import { useAttentionAttributes } from "@dxos/react-ui-attention";
41
+ import { StackItem } from "@dxos/react-ui-stack";
42
+ import { getSize, mx, textBlockWidth } from "@dxos/ui-theme";
43
+
44
+ // src/components/CaretDownUp.tsx
45
+ import React from "react";
46
+ var CaretDownUp = ({ children, ...props }) => {
47
+ return /* @__PURE__ */ React.createElement("svg", {
48
+ xmlns: "http://www.w3.org/2000/svg",
49
+ viewBox: "0 0 256 256",
50
+ ...props
51
+ }, /* @__PURE__ */ React.createElement("rect", {
52
+ width: "256",
53
+ height: "256",
54
+ fill: "none"
55
+ }), /* @__PURE__ */ React.createElement("polyline", {
56
+ points: "80 224 128 176 176 224",
57
+ fill: "none",
58
+ stroke: "currentColor",
59
+ strokeLinecap: "round",
60
+ strokeLinejoin: "round",
61
+ strokeWidth: "16"
62
+ }), /* @__PURE__ */ React.createElement("polyline", {
63
+ points: "80 32 128 80 176 32",
64
+ fill: "none",
65
+ stroke: "currentColor",
66
+ strokeLinecap: "round",
67
+ strokeLinejoin: "round",
68
+ strokeWidth: "16"
69
+ }), children);
70
+ };
71
+
72
+ // src/components/StackSection.tsx
73
+ var sectionActionDimensions = "p-1 my-1 shrink-0 min-h-0 w-(--dx-rail-action) h-min";
74
+ var StackSection = ({ id, view, object, metadata: { icon = "ph--placeholder--regular" } }) => {
75
+ const { t } = useTranslation(meta.id);
76
+ const { onNavigate, onAdd, onCollapse, onDelete } = useStack();
77
+ const [optionsMenuOpen, setOptionsMenuOpen] = useState(false);
78
+ const attentionAttrs = useAttentionAttributes(id);
79
+ const stackItem = useMemo(() => ({
80
+ id
81
+ }), [
82
+ id
83
+ ]);
84
+ return /* @__PURE__ */ React2.createElement(CollapsiblePrimitive.Root, {
85
+ asChild: true,
86
+ open: !view.collapsed,
87
+ onOpenChange: (nextOpen) => onCollapse?.(id, !nextOpen)
88
+ }, /* @__PURE__ */ React2.createElement(StackItem.Root, {
89
+ item: stackItem,
90
+ role: "section",
91
+ ...attentionAttrs
92
+ }, /* @__PURE__ */ React2.createElement(StackItem.Heading, {
93
+ classNames: "dx-attention-surface"
94
+ }, /* @__PURE__ */ React2.createElement("span", {
95
+ className: "sr-only"
96
+ }, view.title), /* @__PURE__ */ React2.createElement(StackItem.HeadingStickyContent, null, /* @__PURE__ */ React2.createElement(DropdownMenu.Root, {
97
+ open: optionsMenuOpen,
98
+ onOpenChange: setOptionsMenuOpen
99
+ }, /* @__PURE__ */ React2.createElement(DropdownMenu.Trigger, {
100
+ asChild: true
101
+ }, /* @__PURE__ */ React2.createElement(StackItem.SigilButton, null, /* @__PURE__ */ React2.createElement(Icon, {
102
+ icon,
103
+ size: 5,
104
+ classNames: "transition-opacity"
105
+ }))), /* @__PURE__ */ React2.createElement(DropdownMenu.Portal, null, /* @__PURE__ */ React2.createElement(DropdownMenu.Content, null, /* @__PURE__ */ React2.createElement(DropdownMenu.Viewport, null, view.collapsed ? /* @__PURE__ */ React2.createElement(DropdownMenu.Item, {
106
+ onClick: () => onNavigate(id),
107
+ "data-testid": "section.navigate-to"
108
+ }, /* @__PURE__ */ React2.createElement(Icon, {
109
+ icon: "ph--arrow-right--regular",
110
+ size: 5
111
+ }), /* @__PURE__ */ React2.createElement("span", {
112
+ className: "ms-2 grow"
113
+ }, t("navigate to section label"))) : /* @__PURE__ */ React2.createElement(CollapsiblePrimitive.Trigger, {
114
+ asChild: true
115
+ }, /* @__PURE__ */ React2.createElement(DropdownMenu.Item, null, /* @__PURE__ */ React2.createElement(CaretDownUp, {
116
+ className: getSize(5)
117
+ }), /* @__PURE__ */ React2.createElement("span", {
118
+ className: "ms-2 grow"
119
+ }, t("collapse label")))), /* @__PURE__ */ React2.createElement(DropdownMenu.Item, {
120
+ onClick: () => onAdd(id, "before"),
121
+ "data-testid": "section.add-before"
122
+ }, /* @__PURE__ */ React2.createElement(Icon, {
123
+ icon: "ph--arrow-line-up--regular",
124
+ size: 5
125
+ }), /* @__PURE__ */ React2.createElement("span", {
126
+ className: "ms-2 grow"
127
+ }, t("add section before label"))), /* @__PURE__ */ React2.createElement(DropdownMenu.Item, {
128
+ onClick: () => onAdd(id, "after"),
129
+ "data-testid": "section.add-after"
130
+ }, /* @__PURE__ */ React2.createElement(Icon, {
131
+ icon: "ph--arrow-line-down--regular",
132
+ size: 5
133
+ }), /* @__PURE__ */ React2.createElement("span", {
134
+ className: "ms-2 grow"
135
+ }, t("add section after label"))), /* @__PURE__ */ React2.createElement(DropdownMenu.Item, {
136
+ onClick: () => onDelete(id),
137
+ "data-testid": "section.remove"
138
+ }, /* @__PURE__ */ React2.createElement(Icon, {
139
+ icon: "ph--trash--regular",
140
+ size: 5
141
+ }), /* @__PURE__ */ React2.createElement("span", {
142
+ className: "ms-2 grow"
143
+ }, t("remove section label")))), /* @__PURE__ */ React2.createElement(DropdownMenu.Arrow, null)))), view.collapsed ? /* @__PURE__ */ React2.createElement(CollapsiblePrimitive.Trigger, {
144
+ asChild: true
145
+ }, /* @__PURE__ */ React2.createElement(IconButton, {
146
+ iconOnly: true,
147
+ variant: "ghost",
148
+ label: t("expand label"),
149
+ icon: "ph--caret-up-down--regular",
150
+ classNames: sectionActionDimensions
151
+ })) : /* @__PURE__ */ React2.createElement(IconButton, {
152
+ iconOnly: true,
153
+ variant: "ghost",
154
+ onClick: () => onNavigate(id),
155
+ label: t("navigate to section label"),
156
+ icon: "ph--arrow-right--regular",
157
+ "data-testid": "section.navigate-to",
158
+ classNames: sectionActionDimensions
159
+ }))), /* @__PURE__ */ React2.createElement(CollapsiblePrimitive.Content, null, /* @__PURE__ */ React2.createElement(Surface.Surface, {
160
+ role: "section",
161
+ data: {
162
+ subject: object
163
+ },
164
+ limit: 1,
165
+ placeholder: /* @__PURE__ */ React2.createElement(React2.Fragment, null)
166
+ })), view.collapsed && /* @__PURE__ */ React2.createElement(StackItem.Content, {
167
+ classNames: "dx-attention-surface"
168
+ }, /* @__PURE__ */ React2.createElement("h2", {
169
+ className: mx("flex items-center p-4 font-medium", textBlockWidth)
170
+ }, view.title))));
171
+ };
172
+
173
+ // src/components/StackSettings.tsx
174
+ import React3 from "react";
175
+ import { Input, useTranslation as useTranslation2 } from "@dxos/react-ui";
176
+ import { Settings } from "@dxos/react-ui-form";
177
+
178
+ // src/containers/StackContainer/StackContainer.tsx
179
+ var collectionObjectsFamily = Atom.family((collection) => Atom.make((get) => {
180
+ const snapshot = get(AtomObj.make(collection));
181
+ return snapshot.objects.map((ref) => get(AtomObj.makeWithReactive(ref))).filter(isNonNullable);
182
+ }));
183
+ var StackContainer = ({ id, subject: collection }) => {
184
+ const { invokePromise } = useOperationInvoker();
185
+ const { graph } = useAppGraph();
186
+ const { t } = useTranslation3(meta.id);
187
+ const allMetadata = useCapabilities(AppCapabilities.Metadata);
188
+ const [collapsedSections, setCollapsedSections] = useState2({});
189
+ const collectionObjects = useAtomValue(collectionObjectsFamily(collection));
190
+ const items = collectionObjects.map((object) => {
191
+ const metadata = allMetadata.find((m) => m.id === (Obj.getTypename(object) ?? "never"))?.metadata;
192
+ const view = {
193
+ // ...stack.sections[object.id],
194
+ collapsed: collapsedSections[Obj.getDXN(object).toString()],
195
+ title: object?.title ?? // TODO(wittjosiah): `getNode` is not reactive.
196
+ toLocalizedString(Graph.getNode(graph, Obj.getDXN(object).toString()).pipe(Option.getOrNull)?.properties.label, t)
197
+ };
198
+ return {
199
+ id: Obj.getDXN(object).toString(),
200
+ object,
201
+ metadata,
202
+ view
203
+ };
204
+ });
205
+ const handleDelete = useCallback(async (id2) => {
206
+ const index = collection.objects.map((object2) => object2.target).filter(isNonNullable).findIndex((section) => Obj.getDXN(section).toString() === id2);
207
+ const object = collection.objects[index].target;
208
+ if (Obj.isObject(object)) {
209
+ await invokePromise(SpaceOperation.RemoveObjects, {
210
+ objects: [
211
+ object
212
+ ],
213
+ target: collection
214
+ });
215
+ }
216
+ }, [
217
+ collection,
218
+ invokePromise
219
+ ]);
220
+ const handleAdd = useCallback(async (id2, position) => {
221
+ await invokePromise(LayoutOperation.UpdateDialog, {
222
+ subject: `${meta.id}/AddSectionDialog`,
223
+ blockAlign: "start",
224
+ props: {
225
+ path: id2,
226
+ position,
227
+ collection
228
+ }
229
+ });
230
+ }, [
231
+ collection,
232
+ invokePromise
233
+ ]);
234
+ const handleNavigate = useCallback(async (id2) => {
235
+ await invokePromise(LayoutOperation.Open, {
236
+ subject: [
237
+ id2
238
+ ]
239
+ });
240
+ }, [
241
+ invokePromise
242
+ ]);
243
+ const handleCollapse = useCallback((id2, collapsed) => setCollapsedSections((prev) => ({
244
+ ...prev,
245
+ [id2]: collapsed
246
+ })), []);
247
+ const handleAddSection = useCallback(() => invokePromise(SpaceOperation.OpenCreateObject, {
248
+ target: collection,
249
+ navigable: false
250
+ }), [
251
+ collection,
252
+ invokePromise
253
+ ]);
254
+ return /* @__PURE__ */ React4.createElement(StackItem2.Content, {
255
+ toolbar: true,
256
+ classNames: "dx-article overflow-hidden border-l border-r border-subdued-separator"
257
+ }, /* @__PURE__ */ React4.createElement(Toolbar.Root, null, /* @__PURE__ */ React4.createElement(Toolbar.IconButton, {
258
+ icon: "ph--plus--regular",
259
+ iconOnly: true,
260
+ label: "Add section",
261
+ "data-testid": "stack.addSection",
262
+ onClick: handleAddSection
263
+ })), /* @__PURE__ */ React4.createElement(AttentionProvider, {
264
+ id
265
+ }, /* @__PURE__ */ React4.createElement(StackContext.Provider, {
266
+ value: {
267
+ onCollapse: handleCollapse,
268
+ onNavigate: handleNavigate,
269
+ onDelete: handleDelete,
270
+ onAdd: handleAdd
271
+ }
272
+ }, /* @__PURE__ */ React4.createElement(Stack, {
273
+ orientation: "vertical",
274
+ size: "intrinsic",
275
+ id,
276
+ "data-testid": "main.stack",
277
+ classNames: "overflow-y-auto"
278
+ }, items.map((item) => /* @__PURE__ */ React4.createElement(StackSection, {
279
+ key: item.id,
280
+ ...item
281
+ }))))));
282
+ };
283
+
284
+ // src/containers/StackContainer/index.ts
285
+ var StackContainer_default = StackContainer;
286
+ export {
287
+ StackContainer_default as default
288
+ };
289
+ //# sourceMappingURL=StackContainer-BIFUBD3Y.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/containers/StackContainer/StackContainer.tsx", "../../../src/components/StackContext.tsx", "../../../src/components/StackSection.tsx", "../../../src/components/CaretDownUp.tsx", "../../../src/components/StackSettings.tsx", "../../../src/containers/StackContainer/index.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Atom, useAtomValue } from '@effect-atom/atom-react';\nimport * as Option from 'effect/Option';\nimport React, { useCallback, useState } from 'react';\n\nimport { useCapabilities, useOperationInvoker } from '@dxos/app-framework/ui';\nimport { AppCapabilities, LayoutOperation } from '@dxos/app-toolkit';\nimport { type SurfaceComponentProps } from '@dxos/app-toolkit/ui';\nimport { useAppGraph } from '@dxos/app-toolkit/ui';\nimport { Obj, type Ref } from '@dxos/echo';\nimport { type Collection } from '@dxos/echo';\nimport { AtomObj } from '@dxos/echo-atom';\nimport { Graph } from '@dxos/plugin-graph';\nimport { SpaceOperation } from '@dxos/plugin-space/types';\nimport { Toolbar, toLocalizedString, useTranslation } from '@dxos/react-ui';\nimport { AttentionProvider } from '@dxos/react-ui-attention';\nimport { Stack, StackItem } from '@dxos/react-ui-stack';\nimport { isNonNullable } from '@dxos/util';\n\nimport { StackContext, StackSection } from '../../components';\nimport { meta } from '../../meta';\nimport {\n type AddSectionPosition,\n type CollapsedSections,\n type StackSectionItem,\n type StackSectionMetadata,\n type StackSectionView,\n} from '../../types';\n\nconst collectionObjectsFamily = Atom.family((collection: Collection.Collection) =>\n Atom.make((get) => {\n const snapshot = get(AtomObj.make(collection));\n return (\n snapshot.objects\n // TODO(wittjosiah): Why isn't this type inferred correctly?\n .map((ref: Ref.Ref<Obj.Unknown>) => get(AtomObj.makeWithReactive(ref)))\n .filter(isNonNullable)\n );\n }),\n);\n\ntype StackContainerProps = SurfaceComponentProps<Collection.Collection> & {\n id: string;\n};\n\nexport const StackContainer = ({ id, subject: collection }: StackContainerProps) => {\n const { invokePromise } = useOperationInvoker();\n const { graph } = useAppGraph();\n const { t } = useTranslation(meta.id);\n const allMetadata = useCapabilities(AppCapabilities.Metadata);\n const [collapsedSections, setCollapsedSections] = useState<CollapsedSections>({});\n\n // TODO(wittjosiah): Re-implement stack views with relations.\n // const defaultStack = useMemo(() => Obj.make(StackViewType, { sections: {} }), [collection]);\n // const stack = (collection.views[StackViewType.typename]?.target as StackViewType | undefined) ?? defaultStack;\n // useEffect(() => {\n // if (!collection.views[StackViewType.typename]) {\n // collection.views[StackViewType.typename] = Ref.make(stack);\n // }\n // }, [collection, stack]);\n\n const collectionObjects = useAtomValue(collectionObjectsFamily(collection));\n const items = collectionObjects.map((object: Obj.Unknown) => {\n const metadata = allMetadata.find((m) => m.id === (Obj.getTypename(object) ?? 'never'))\n ?.metadata as StackSectionMetadata;\n const view = {\n // ...stack.sections[object.id],\n collapsed: collapsedSections[Obj.getDXN(object).toString()],\n title:\n (object as any)?.title ??\n // TODO(wittjosiah): `getNode` is not reactive.\n toLocalizedString(\n Graph.getNode(graph, Obj.getDXN(object).toString()).pipe(Option.getOrNull)?.properties.label,\n t,\n ),\n } as StackSectionView;\n return { id: Obj.getDXN(object).toString(), object, metadata, view } satisfies StackSectionItem;\n });\n\n const handleDelete = useCallback(\n async (id: string) => {\n const index = collection.objects\n .map((object) => object.target)\n .filter(isNonNullable)\n .findIndex((section) => Obj.getDXN(section).toString() === id);\n const object = collection.objects[index].target;\n if (Obj.isObject(object)) {\n await invokePromise(SpaceOperation.RemoveObjects, {\n objects: [object],\n target: collection,\n });\n\n // TODO(wittjosiah): The section should also be removed, but needs to be restored if the action is undone.\n // delete stack.sections[Path.last(path)];\n }\n },\n [collection, invokePromise],\n );\n\n const handleAdd = useCallback(\n async (id: string, position: AddSectionPosition) => {\n // TODO(wittjosiah): Use object creation dialog.\n await invokePromise(LayoutOperation.UpdateDialog, {\n subject: `${meta.id}/AddSectionDialog`,\n blockAlign: 'start',\n props: {\n path: id,\n position,\n collection,\n },\n });\n },\n [collection, invokePromise],\n );\n\n const handleNavigate = useCallback(\n async (id: string) => {\n await invokePromise(LayoutOperation.Open, { subject: [id] });\n },\n [invokePromise],\n );\n\n const handleCollapse = useCallback(\n (id: string, collapsed: boolean) => setCollapsedSections((prev) => ({ ...prev, [id]: collapsed })),\n [],\n );\n\n const handleAddSection = useCallback(\n () =>\n invokePromise(SpaceOperation.OpenCreateObject, {\n target: collection,\n navigable: false,\n }),\n [collection, invokePromise],\n );\n\n return (\n <StackItem.Content toolbar classNames='dx-article overflow-hidden border-l border-r border-subdued-separator'>\n <Toolbar.Root>\n <Toolbar.IconButton\n icon='ph--plus--regular'\n iconOnly\n label='Add section'\n data-testid='stack.addSection'\n onClick={handleAddSection}\n />\n </Toolbar.Root>\n <AttentionProvider id={id}>\n <StackContext.Provider\n value={{\n onCollapse: handleCollapse,\n onNavigate: handleNavigate,\n onDelete: handleDelete,\n onAdd: handleAdd,\n }}\n >\n <Stack orientation='vertical' size='intrinsic' id={id} data-testid='main.stack' classNames='overflow-y-auto'>\n {items.map((item) => (\n <StackSection key={item.id} {...item} />\n ))}\n </Stack>\n </StackContext.Provider>\n </AttentionProvider>\n </StackItem.Content>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { createContext, useContext } from 'react';\n\nimport { type AddSectionPosition } from '../types';\n\nexport type StackContextValue = {\n onCollapse: (id: string, collapsed: boolean) => void;\n onNavigate: (id: string) => Promise<void>;\n onDelete: (id: string) => Promise<void>;\n onAdd: (id: string, position: AddSectionPosition) => void;\n};\n\nexport const StackContext = createContext<StackContextValue>({\n onCollapse: () => {},\n onNavigate: async () => {},\n onDelete: async () => {},\n onAdd: () => {},\n});\n\nexport const useStack = () => useContext(StackContext);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport * as CollapsiblePrimitive from '@radix-ui/react-collapsible';\nimport React, { useMemo, useState } from 'react';\n\nimport { Surface } from '@dxos/app-framework/ui';\nimport { DropdownMenu, Icon, IconButton, useTranslation } from '@dxos/react-ui';\nimport { useAttentionAttributes } from '@dxos/react-ui-attention';\nimport { StackItem } from '@dxos/react-ui-stack';\nimport { getSize, mx, textBlockWidth } from '@dxos/ui-theme';\n\nimport { meta } from '../meta';\nimport { type StackSectionItem } from '../types';\n\nimport { CaretDownUp } from './CaretDownUp';\nimport { useStack } from './StackContext';\n\nconst sectionActionDimensions = 'p-1 my-1 shrink-0 min-h-0 w-(--dx-rail-action) h-min';\n\nexport type StackSectionProps = StackSectionItem;\n\nexport const StackSection = ({\n id,\n view,\n object,\n metadata: { icon = 'ph--placeholder--regular' },\n}: StackSectionProps) => {\n const { t } = useTranslation(meta.id);\n const { onNavigate, onAdd, onCollapse, onDelete } = useStack();\n const [optionsMenuOpen, setOptionsMenuOpen] = useState(false);\n const attentionAttrs = useAttentionAttributes(id);\n const stackItem = useMemo(() => ({ id }), [id]);\n\n return (\n <CollapsiblePrimitive.Root asChild open={!view.collapsed} onOpenChange={(nextOpen) => onCollapse?.(id, !nextOpen)}>\n <StackItem.Root item={stackItem} role='section' {...attentionAttrs}>\n <StackItem.Heading classNames='dx-attention-surface'>\n <span className='sr-only'>{view.title}</span>\n <StackItem.HeadingStickyContent>\n <DropdownMenu.Root\n {...{\n open: optionsMenuOpen,\n onOpenChange: setOptionsMenuOpen,\n }}\n >\n <DropdownMenu.Trigger asChild>\n <StackItem.SigilButton>\n <Icon icon={icon} size={5} classNames='transition-opacity' />\n </StackItem.SigilButton>\n </DropdownMenu.Trigger>\n <DropdownMenu.Portal>\n <DropdownMenu.Content>\n <DropdownMenu.Viewport>\n {view.collapsed ? (\n <DropdownMenu.Item onClick={() => onNavigate(id)} data-testid='section.navigate-to'>\n <Icon icon='ph--arrow-right--regular' size={5} />\n <span className='ms-2 grow'>{t('navigate to section label')}</span>\n </DropdownMenu.Item>\n ) : (\n <CollapsiblePrimitive.Trigger asChild>\n <DropdownMenu.Item>\n <CaretDownUp className={getSize(5)} />\n <span className='ms-2 grow'>{t('collapse label')}</span>\n </DropdownMenu.Item>\n </CollapsiblePrimitive.Trigger>\n )}\n <DropdownMenu.Item onClick={() => onAdd(id, 'before')} data-testid='section.add-before'>\n <Icon icon='ph--arrow-line-up--regular' size={5} />\n <span className='ms-2 grow'>{t('add section before label')}</span>\n </DropdownMenu.Item>\n <DropdownMenu.Item onClick={() => onAdd(id, 'after')} data-testid='section.add-after'>\n <Icon icon='ph--arrow-line-down--regular' size={5} />\n <span className='ms-2 grow'>{t('add section after label')}</span>\n </DropdownMenu.Item>\n <DropdownMenu.Item onClick={() => onDelete(id)} data-testid='section.remove'>\n <Icon icon='ph--trash--regular' size={5} />\n <span className='ms-2 grow'>{t('remove section label')}</span>\n </DropdownMenu.Item>\n </DropdownMenu.Viewport>\n <DropdownMenu.Arrow />\n </DropdownMenu.Content>\n </DropdownMenu.Portal>\n </DropdownMenu.Root>\n {view.collapsed ? (\n <CollapsiblePrimitive.Trigger asChild>\n <IconButton\n iconOnly\n variant='ghost'\n label={t('expand label')}\n icon='ph--caret-up-down--regular'\n classNames={sectionActionDimensions}\n />\n </CollapsiblePrimitive.Trigger>\n ) : (\n <IconButton\n iconOnly\n variant='ghost'\n onClick={() => onNavigate(id)}\n label={t('navigate to section label')}\n icon='ph--arrow-right--regular'\n data-testid='section.navigate-to'\n classNames={sectionActionDimensions}\n />\n )}\n </StackItem.HeadingStickyContent>\n </StackItem.Heading>\n <CollapsiblePrimitive.Content>\n <Surface.Surface role='section' data={{ subject: object }} limit={1} placeholder={<></>} />\n </CollapsiblePrimitive.Content>\n {view.collapsed && (\n <StackItem.Content classNames='dx-attention-surface'>\n <h2 className={mx('flex items-center p-4 font-medium', textBlockWidth)}>{view.title}</h2>\n </StackItem.Content>\n )}\n </StackItem.Root>\n </CollapsiblePrimitive.Root>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { type ComponentPropsWithoutRef } from 'react';\n\nexport const CaretDownUp = ({ children, ...props }: ComponentPropsWithoutRef<'svg'>) => {\n return (\n <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' {...props}>\n <rect width='256' height='256' fill='none' />\n <polyline\n points='80 224 128 176 176 224'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='16'\n />\n <polyline\n points='80 32 128 80 176 32'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='16'\n />\n {children}\n </svg>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Input, useTranslation } from '@dxos/react-ui';\nimport { Settings } from '@dxos/react-ui-form';\n\nimport { meta } from '../meta';\nimport { type StackSettingsProps } from '../types';\n\nexport const StackSettings = ({ settings }: { settings: StackSettingsProps }) => {\n const { t } = useTranslation(meta.id);\n\n return (\n <Settings.Root>\n <Settings.Section title={t('settings title', { ns: meta.id })}>\n <Settings.Group>\n <Settings.ItemInput title={t('settings separation label')}>\n <Input.Switch\n checked={settings.separation}\n onCheckedChange={(checked) => (settings.separation = !!checked)}\n />\n </Settings.ItemInput>\n </Settings.Group>\n </Settings.Section>\n </Settings.Root>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { StackContainer } from './StackContainer';\n\nexport default StackContainer;\n"],
5
+ "mappings": ";;;;;AAIA,SAASA,MAAMC,oBAAoB;AACnC,YAAYC,YAAY;AACxB,OAAOC,UAASC,aAAaC,YAAAA,iBAAgB;AAE7C,SAASC,iBAAiBC,2BAA2B;AACrD,SAASC,iBAAiBC,uBAAuB;AAEjD,SAASC,mBAAmB;AAC5B,SAASC,WAAqB;AAE9B,SAASC,eAAe;AACxB,SAASC,aAAa;AACtB,SAASC,sBAAsB;AAC/B,SAASC,SAASC,mBAAmBC,kBAAAA,uBAAsB;AAC3D,SAASC,yBAAyB;AAClC,SAASC,OAAOC,aAAAA,kBAAiB;AACjC,SAASC,qBAAqB;;;AChB9B,SAASC,eAAeC,kBAAkB;AAWnC,IAAMC,eAAeC,8BAAiC;EAC3DC,YAAY,MAAA;EAAO;EACnBC,YAAY,YAAA;EAAa;EACzBC,UAAU,YAAA;EAAa;EACvBC,OAAO,MAAA;EAAO;AAChB,CAAA;AAEO,IAAMC,WAAW,MAAMC,WAAWP,YAAAA;;;AClBzC,YAAYQ,0BAA0B;AACtC,OAAOC,UAASC,SAASC,gBAAgB;AAEzC,SAASC,eAAe;AACxB,SAASC,cAAcC,MAAMC,YAAYC,sBAAsB;AAC/D,SAASC,8BAA8B;AACvC,SAASC,iBAAiB;AAC1B,SAASC,SAASC,IAAIC,sBAAsB;;;ACP5C,OAAOC,WAA8C;AAE9C,IAAMC,cAAc,CAAC,EAAEC,UAAU,GAAGC,MAAAA,MAAwC;AACjF,SACE,sBAAA,cAACC,OAAAA;IAAIC,OAAM;IAA6BC,SAAQ;IAAe,GAAGH;KAChE,sBAA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V0C,OAAOjC;IACT;KAEA,gBAAAc,OAAA,cAACoB,OAAAA;IAAMC,aAAY;IAAWC,MAAK;IAAYlF;IAAQsE,eAAY;IAAaN,YAAW;KACxF9C,MAAMxB,IAAI,CAACyF,SACV,gBAAAvB,OAAA,cAACwB,cAAAA;IAAaC,KAAKF,KAAKnF;IAAK,GAAGmF;;AAO9C;;;AKlKA,IAAA,yBAAeG;",
6
+ "names": ["Atom", "useAtomValue", "Option", "React", "useCallback", "useState", "useCapabilities", "useOperationInvoker", "AppCapabilities", "LayoutOperation", "useAppGraph", "Obj", "AtomObj", "Graph", "SpaceOperation", "Toolbar", "toLocalizedString", "useTranslation", "AttentionProvider", "Stack", "StackItem", "isNonNullable", "createContext", "useContext", "StackContext", "createContext", "onCollapse", "onNavigate", "onDelete", "onAdd", "useStack", "useContext", "CollapsiblePrimitive", "React", "useMemo", "useState", "Surface", "DropdownMenu", "Icon", "IconButton", "useTranslation", "useAttentionAttributes", "StackItem", "getSize", "mx", "textBlockWidth", "React", "CaretDownUp", "children", "props", "svg", "xmlns", "viewBox", "rect", "width", "height", "fill", "polyline", "points", "stroke", "strokeLinecap", "strokeLinejoin", "strokeWidth", "sectionActionDimensions", "StackSection", "id", "view", "object", "metadata", "icon", "t", "useTranslation", "meta", "onNavigate", "onAdd", "onCollapse", "onDelete", "useStack", "optionsMenuOpen", "setOptionsMenuOpen", "useState", "attentionAttrs", "useAttentionAttributes", "stackItem", "useMemo", "React", "Root", "asChild", "open", "collapsed", "onOpenChange", "nextOpen", "StackItem", "item", "role", "Heading", "classNames", "span", "className", "title", "HeadingStickyContent", "DropdownMenu", "Trigger", "SigilButton", "Icon", "size", "Portal", "Content", "Viewport", "Item", "onClick", "data-testid", "CaretDownUp", "getSize", "Arrow", "IconButton", "iconOnly", "variant", "label", "Surface", "data", "subject", "limit", "placeholder", "h2", "mx", "textBlockWidth", "React", "Input", "useTranslation", "Settings", "collectionObjectsFamily", "Atom", "family", "collection", "make", "get", "snapshot", "AtomObj", "objects", "map", "ref", "makeWithReactive", "filter", "isNonNullable", "StackContainer", "id", "subject", "invokePromise", "useOperationInvoker", "graph", "useAppGraph", "t", "useTranslation", "meta", "allMetadata", "useCapabilities", "AppCapabilities", "Metadata", "collapsedSections", "setCollapsedSections", "useState", "collectionObjects", "useAtomValue", "items", "object", "metadata", "find", "m", "Obj", "getTypename", "view", "collapsed", "getDXN", "toString", "title", "toLocalizedString", "Graph", "getNode", "pipe", "getOrNull", "properties", "label", "handleDelete", "useCallback", "index", "target", "findIndex", "section", "isObject", "SpaceOperation", "RemoveObjects", "handleAdd", "position", "LayoutOperation", "UpdateDialog", "blockAlign", "props", "path", "handleNavigate", "Open", "handleCollapse", "prev", "handleAddSection", "OpenCreateObject", "navigable", "React", "StackItem", "Content", "toolbar", "classNames", "Toolbar", "Root", "IconButton", "icon", "iconOnly", "data-testid", "onClick", "AttentionProvider", "StackContext", "Provider", "value", "onCollapse", "onNavigate", "onDelete", "onAdd", "Stack", "orientation", "size", "item", "StackSection", "key", "StackContainer"]
7
+ }
@@ -1,19 +1,21 @@
1
1
  // src/meta.ts
2
- var STACK_PLUGIN = "dxos.org/plugin/stack";
2
+ import { trim } from "@dxos/util";
3
3
  var SECTION_IDENTIFIER = "dxos.org/type/StackSection";
4
4
  var meta = {
5
- id: STACK_PLUGIN,
5
+ id: "dxos.org/plugin/stack",
6
6
  // TODO(wittjosiah): Prevents "stacks" language from being exposed to users in settings panel.
7
7
  // Conside renaming this to the collection plugin and trying to factor more collections logic from the space plugin.
8
8
  name: "Collections",
9
- description: "View collections of objects within the deck.",
9
+ description: trim`
10
+ Organize and view curated collections of workspace objects in customizable layouts.
11
+ Group related items together and manage collections with sections and filtering.
12
+ `,
10
13
  icon: "ph--stack-simple--regular",
11
14
  source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-stack"
12
15
  };
13
16
 
14
17
  export {
15
- STACK_PLUGIN,
16
18
  SECTION_IDENTIFIER,
17
19
  meta
18
20
  };
19
- //# sourceMappingURL=chunk-FVB7LGW7.mjs.map
21
+ //# sourceMappingURL=chunk-4X7CK6FM.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 Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const SECTION_IDENTIFIER = 'dxos.org/type/StackSection';\n\nexport const meta: Plugin.Meta = {\n id: 'dxos.org/plugin/stack',\n // TODO(wittjosiah): Prevents \"stacks\" language from being exposed to users in settings panel.\n // Conside renaming this to the collection plugin and trying to factor more collections logic from the space plugin.\n name: 'Collections',\n description: trim`\n Organize and view curated collections of workspace objects in customizable layouts.\n Group related items together and manage collections with sections and filtering.\n `,\n icon: 'ph--stack-simple--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-stack',\n};\n"],
5
+ "mappings": ";AAKA,SAASA,YAAY;AAEd,IAAMC,qBAAqB;AAE3B,IAAMC,OAAoB;EAC/BC,IAAI;;;EAGJC,MAAM;EACNC,aAAaC;;;;EAIbC,MAAM;EACNC,QAAQ;AACV;",
6
+ "names": ["trim", "SECTION_IDENTIFIER", "meta", "id", "name", "description", "trim", "icon", "source"]
7
+ }
@@ -1,6 +1,6 @@
1
1
  // src/types/stack.ts
2
- import { Schema } from "effect";
3
- import { TypedObject } from "@dxos/echo-schema";
2
+ import * as Schema from "effect/Schema";
3
+ import { Type } from "@dxos/echo";
4
4
  var SectionSchema = Schema.Struct({
5
5
  height: Schema.optional(Schema.Number),
6
6
  // Space for data that isn't stack-specific but is specific to this view instance.
@@ -10,19 +10,18 @@ var SectionSchema = Schema.Struct({
10
10
  value: Schema.Any
11
11
  }))
12
12
  });
13
- var StackViewType = class extends TypedObject({
14
- typename: "dxos.org/type/StackView",
15
- version: "0.1.0"
16
- })({
17
- sections: Schema.mutable(Schema.Record({
13
+ var StackViewType = Schema.Struct({
14
+ sections: Schema.Record({
18
15
  key: Schema.String,
19
16
  value: SectionSchema
20
- }))
21
- }) {
22
- };
17
+ })
18
+ }).pipe(Type.object({
19
+ typename: "dxos.org/type/StackView",
20
+ version: "0.1.0"
21
+ }));
23
22
 
24
23
  export {
25
24
  SectionSchema,
26
25
  StackViewType
27
26
  };
28
- //# sourceMappingURL=chunk-IRTROCUQ.mjs.map
27
+ //# sourceMappingURL=chunk-CD32XYEB.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/types/stack.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Type } from '@dxos/echo';\n\n// All section metadata needs to be optional/have defaults.\n// Any objects added to the collection will start with the section defaults.\n// If an object is removed from the collection without removing the section metadata this is fine.\n// Stack components should clean-up the superfluous data on future edits.\n\nexport const SectionSchema = Schema.Struct({\n height: Schema.optional(Schema.Number),\n // Space for data that isn't stack-specific but is specific to this view instance.\n // e.g. cover/fill for an image\n custom: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n});\n\n// TODO(wittjosiah): This needs a relation to be connected to a stack.\nexport const StackViewType = Schema.Struct({\n sections: Schema.Record({ key: Schema.String, value: SectionSchema }),\n}).pipe(\n Type.object({\n typename: 'dxos.org/type/StackView',\n version: '0.1.0',\n }),\n);\n\nexport interface StackViewType extends Schema.Schema.Type<typeof StackViewType> {}\n"],
5
+ "mappings": ";AAIA,YAAYA,YAAY;AAExB,SAASC,YAAY;AAOd,IAAMC,gBAAuBC,cAAO;EACzCC,QAAeC,gBAAgBC,aAAM;;;EAGrCC,QAAeF,gBAAgBG,cAAO;IAAEC,KAAYC;IAAQC,OAAcC;EAAI,CAAA,CAAA;AAChF,CAAA;AAGO,IAAMC,gBAAuBV,cAAO;EACzCW,UAAiBN,cAAO;IAAEC,KAAYC;IAAQC,OAAOT;EAAc,CAAA;AACrE,CAAA,EAAGa,KACDC,KAAKC,OAAO;EACVC,UAAU;EACVC,SAAS;AACX,CAAA,CAAA;",
6
+ "names": ["Schema", "Type", "SectionSchema", "Struct", "height", "optional", "Number", "custom", "Record", "key", "String", "value", "Any", "StackViewType", "sections", "pipe", "Type", "object", "typename", "version"]
7
+ }
@@ -1,19 +1,18 @@
1
1
  import {
2
2
  StackViewType
3
- } from "./chunk-IRTROCUQ.mjs";
3
+ } from "./chunk-CD32XYEB.mjs";
4
4
  import {
5
5
  SECTION_IDENTIFIER,
6
- STACK_PLUGIN,
7
6
  meta
8
- } from "./chunk-FVB7LGW7.mjs";
7
+ } from "./chunk-4X7CK6FM.mjs";
9
8
 
10
9
  // src/StackPlugin.ts
11
- import { Capabilities, contributes, defineModule, definePlugin, Events } from "@dxos/app-framework";
12
- import { ClientCapabilities, ClientEvents } from "@dxos/plugin-client";
10
+ import { Plugin } from "@dxos/app-framework";
11
+ import { AppPlugin } from "@dxos/app-toolkit";
13
12
 
14
- // src/capabilities/index.ts
15
- import { lazy } from "@dxos/app-framework";
16
- var ReactSurface = lazy(() => import("./react-surface-KODSQDIY.mjs"));
13
+ // src/capabilities/react-surface/index.ts
14
+ import { Capability } from "@dxos/app-framework";
15
+ var ReactSurface = Capability.lazy("ReactSurface", () => import("./react-surface-PVND4UCN.mjs"));
17
16
 
18
17
  // src/translations.ts
19
18
  import { translations as stackTranslations } from "@dxos/react-ui-stack";
@@ -22,6 +21,7 @@ var translations = [
22
21
  "en-US": {
23
22
  [meta.id]: {
24
23
  "plugin name": "Stacks",
24
+ "settings title": "Stack plugin settings",
25
25
  "settings separation label": "Separate sections",
26
26
  "add section beforeAll dialog title": "Add a section to the start",
27
27
  "add section afterAll dialog title": "Add a section to the end",
@@ -30,16 +30,16 @@ var translations = [
30
30
  "add section input placeholder": "Find the type of section to add",
31
31
  "upload file label": "Add file",
32
32
  "add section label": "Add section",
33
- "empty stack message": "Drag items into the stack.",
33
+ "empty stack message": "Drag objects into the stack.",
34
34
  "remove section label": "Delete",
35
- "navigate to section label": "Navigate to item",
35
+ "navigate to section label": "Navigate to object",
36
36
  "untitled section title": "Untitled section",
37
37
  "add section before label": "Add before",
38
38
  "add section after label": "Add after",
39
39
  "expand label": "Expand",
40
40
  "collapse label": "Collapse",
41
41
  "open chat thread label": "Open chat thread",
42
- "drag handle label": "Press space or enter to begin dragging this item."
42
+ "drag handle label": "Press space or enter to begin dragging this object."
43
43
  }
44
44
  }
45
45
  },
@@ -47,53 +47,37 @@ var translations = [
47
47
  ];
48
48
 
49
49
  // src/StackPlugin.ts
50
- var StackPlugin = () => definePlugin(meta, [
51
- defineModule({
52
- id: `${meta.id}/module/translations`,
53
- activatesOn: Events.SetupTranslations,
54
- activate: () => contributes(Capabilities.Translations, translations)
55
- }),
56
- defineModule({
57
- id: `${meta.id}/module/metadata`,
58
- activatesOn: Events.SetupMetadata,
59
- activate: () => [
60
- contributes(Capabilities.Metadata, {
61
- id: SECTION_IDENTIFIER,
62
- metadata: {
63
- parse: (section, type) => {
64
- switch (type) {
65
- case "node":
66
- return {
67
- id: section.object.id,
68
- label: section.object.title,
69
- data: section.object
70
- };
71
- case "object":
72
- return section.object;
73
- case "view-object":
74
- return section;
75
- }
76
- }
50
+ var StackPlugin = Plugin.define(meta).pipe(AppPlugin.addMetadataModule({
51
+ metadata: {
52
+ id: SECTION_IDENTIFIER,
53
+ metadata: {
54
+ parse: (section, type) => {
55
+ switch (type) {
56
+ case "node":
57
+ return {
58
+ id: section.object.id,
59
+ label: section.object.title,
60
+ data: section.object
61
+ };
62
+ case "object":
63
+ return section.object;
64
+ case "view-object":
65
+ return section;
77
66
  }
78
- })
79
- ]
80
- }),
81
- defineModule({
82
- id: `${meta.id}/module/schema`,
83
- activatesOn: ClientEvents.SetupSchema,
84
- activate: () => contributes(ClientCapabilities.Schema, [
85
- StackViewType
86
- ])
87
- }),
88
- defineModule({
89
- id: `${meta.id}/module/react-surface`,
90
- activatesOn: Events.SetupReactSurface,
91
- activate: ReactSurface
92
- })
93
- ]);
67
+ }
68
+ }
69
+ }
70
+ }), AppPlugin.addSchemaModule({
71
+ schema: [
72
+ StackViewType
73
+ ]
74
+ }), AppPlugin.addSurfaceModule({
75
+ activate: ReactSurface
76
+ }), AppPlugin.addTranslationsModule({
77
+ translations
78
+ }), Plugin.make);
94
79
  export {
95
80
  SECTION_IDENTIFIER,
96
- STACK_PLUGIN,
97
81
  StackPlugin,
98
82
  meta
99
83
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/StackPlugin.ts", "../../../src/capabilities/index.ts", "../../../src/translations.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Capabilities, contributes, defineModule, definePlugin, Events } from '@dxos/app-framework';\nimport { type Obj } from '@dxos/echo';\nimport { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';\n\nimport { ReactSurface } from './capabilities';\nimport { meta, SECTION_IDENTIFIER } from './meta';\nimport { translations } from './translations';\nimport { StackViewType } from './types';\n\nexport const StackPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/metadata`,\n activatesOn: Events.SetupMetadata,\n activate: () => [\n contributes(Capabilities.Metadata, {\n id: SECTION_IDENTIFIER,\n metadata: {\n parse: (section: { object: Obj.Any }, type: string) => {\n switch (type) {\n case 'node':\n return { id: section.object.id, label: (section.object as any).title, data: section.object };\n case 'object':\n return section.object;\n case 'view-object':\n return section;\n }\n },\n },\n }),\n ],\n }),\n defineModule({\n id: `${meta.id}/module/schema`,\n activatesOn: ClientEvents.SetupSchema,\n activate: () => contributes(ClientCapabilities.Schema, [StackViewType]),\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.SetupReactSurface,\n activate: ReactSurface,\n }),\n ]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const ReactSurface = lazy(() => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\nimport { translations as stackTranslations } from '@dxos/react-ui-stack';\n\nimport { meta } from './meta';\n\nexport const translations = [\n {\n 'en-US': {\n [meta.id]: {\n 'plugin name': 'Stacks',\n 'settings separation label': 'Separate sections',\n 'add section beforeAll dialog title': 'Add a section to the start',\n 'add section afterAll dialog title': 'Add a section to the end',\n 'add section before dialog title': 'Add a section',\n 'add section after dialog title': 'Add a section',\n 'add section input placeholder': 'Find the type of section to add',\n 'upload file label': 'Add file',\n 'add section label': 'Add section',\n 'empty stack message': 'Drag items into the stack.',\n 'remove section label': 'Delete',\n 'navigate to section label': 'Navigate to item',\n 'untitled section title': 'Untitled section',\n 'add section before label': 'Add before',\n 'add section after label': 'Add after',\n 'expand label': 'Expand',\n 'collapse label': 'Collapse',\n 'open chat thread label': 'Open chat thread',\n 'drag handle label': 'Press space or enter to begin dragging this item.',\n },\n },\n },\n ...stackTranslations,\n] as const satisfies Resource[];\n"],
5
- "mappings": ";;;;;;;;;;AAIA,SAASA,cAAcC,aAAaC,cAAcC,cAAcC,cAAc;AAE9E,SAASC,oBAAoBC,oBAAoB;;;ACFjD,SAASC,YAAY;AAEd,IAAMC,eAAeC,KAAK,MAAM,OAAO,8BAAA,CAAA;;;ACD9C,SAASC,gBAAgBC,yBAAyB;AAI3C,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACC,KAAKC,EAAE,GAAG;QACT,eAAe;QACf,6BAA6B;QAC7B,sCAAsC;QACtC,qCAAqC;QACrC,mCAAmC;QACnC,kCAAkC;QAClC,iCAAiC;QACjC,qBAAqB;QACrB,qBAAqB;QACrB,uBAAuB;QACvB,wBAAwB;QACxB,6BAA6B;QAC7B,0BAA0B;QAC1B,4BAA4B;QAC5B,2BAA2B;QAC3B,gBAAgB;QAChB,kBAAkB;QAClB,0BAA0B;QAC1B,qBAAqB;MACvB;IACF;EACF;KACGC;;;;AFtBE,IAAMC,cAAc,MACzBC,aAAaC,MAAM;EACjBC,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOC;IACpBC,UAAU,MAAMC,YAAYC,aAAaC,cAAcC,YAAAA;EACzD,CAAA;EACAT,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOO;IACpBL,UAAU,MAAM;MACdC,YAAYC,aAAaI,UAAU;QACjCV,IAAIW;QACJC,UAAU;UACRC,OAAO,CAACC,SAA8BC,SAAAA;AACpC,oBAAQA,MAAAA;cACN,KAAK;AACH,uBAAO;kBAAEf,IAAIc,QAAQE,OAAOhB;kBAAIiB,OAAQH,QAAQE,OAAeE;kBAAOC,MAAML,QAAQE;gBAAO;cAC7F,KAAK;AACH,uBAAOF,QAAQE;cACjB,KAAK;AACH,uBAAOF;YACX;UACF;QACF;MACF,CAAA;;EAEJ,CAAA;EACAf,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAamB,aAAaC;IAC1BjB,UAAU,MAAMC,YAAYiB,mBAAmBC,QAAQ;MAACC;KAAc;EACxE,CAAA;EACAzB,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOuB;IACpBrB,UAAUsB;EACZ,CAAA;CACD;",
6
- "names": ["Capabilities", "contributes", "defineModule", "definePlugin", "Events", "ClientCapabilities", "ClientEvents", "lazy", "ReactSurface", "lazy", "translations", "stackTranslations", "translations", "meta", "id", "stackTranslations", "StackPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "SetupMetadata", "Metadata", "SECTION_IDENTIFIER", "metadata", "parse", "section", "type", "object", "label", "title", "data", "ClientEvents", "SetupSchema", "ClientCapabilities", "Schema", "StackViewType", "SetupReactSurface", "ReactSurface"]
3
+ "sources": ["../../../src/StackPlugin.ts", "../../../src/capabilities/react-surface/index.ts", "../../../src/translations.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { type Obj } from '@dxos/echo';\n\nimport { ReactSurface } from './capabilities';\nimport { SECTION_IDENTIFIER, meta } from './meta';\nimport { translations } from './translations';\nimport { StackViewType } from './types';\n\nexport const StackPlugin = Plugin.define(meta).pipe(\n AppPlugin.addMetadataModule({\n metadata: {\n id: SECTION_IDENTIFIER,\n metadata: {\n parse: (section: { object: Obj.Unknown }, type: string) => {\n switch (type) {\n case 'node':\n return { id: section.object.id, label: (section.object as any).title, data: section.object };\n case 'object':\n return section.object;\n case 'view-object':\n return section;\n }\n },\n },\n },\n }),\n AppPlugin.addSchemaModule({ schema: [StackViewType] }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.make,\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\nimport { translations as stackTranslations } from '@dxos/react-ui-stack';\n\nimport { meta } from './meta';\n\nexport const translations = [\n {\n 'en-US': {\n [meta.id]: {\n 'plugin name': 'Stacks',\n 'settings title': 'Stack plugin settings',\n 'settings separation label': 'Separate sections',\n 'add section beforeAll dialog title': 'Add a section to the start',\n 'add section afterAll dialog title': 'Add a section to the end',\n 'add section before dialog title': 'Add a section',\n 'add section after dialog title': 'Add a section',\n 'add section input placeholder': 'Find the type of section to add',\n 'upload file label': 'Add file',\n 'add section label': 'Add section',\n 'empty stack message': 'Drag objects into the stack.',\n 'remove section label': 'Delete',\n 'navigate to section label': 'Navigate to object',\n 'untitled section title': 'Untitled section',\n 'add section before label': 'Add before',\n 'add section after label': 'Add after',\n 'expand label': 'Expand',\n 'collapse label': 'Collapse',\n 'open chat thread label': 'Open chat thread',\n 'drag handle label': 'Press space or enter to begin dragging this object.',\n },\n },\n },\n ...stackTranslations,\n] as const satisfies Resource[];\n"],
5
+ "mappings": ";;;;;;;;;AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;;;ACD1B,SAASC,kBAAkB;AAEpB,IAAMC,eAAeC,WAAWC,KAAK,gBAAgB,MAAM,OAAO,8BAAA,CAAA;;;ACDzE,SAASC,gBAAgBC,yBAAyB;AAI3C,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACC,KAAKC,EAAE,GAAG;QACT,eAAe;QACf,kBAAkB;QAClB,6BAA6B;QAC7B,sCAAsC;QACtC,qCAAqC;QACrC,mCAAmC;QACnC,kCAAkC;QAClC,iCAAiC;QACjC,qBAAqB;QACrB,qBAAqB;QACrB,uBAAuB;QACvB,wBAAwB;QACxB,6BAA6B;QAC7B,0BAA0B;QAC1B,4BAA4B;QAC5B,2BAA2B;QAC3B,gBAAgB;QAChB,kBAAkB;QAClB,0BAA0B;QAC1B,qBAAqB;MACvB;IACF;EACF;KACGC;;;;AFvBE,IAAMC,cAAcC,OAAOC,OAAOC,IAAAA,EAAMC,KAC7CC,UAAUC,kBAAkB;EAC1BC,UAAU;IACRC,IAAIC;IACJF,UAAU;MACRG,OAAO,CAACC,SAAkCC,SAAAA;AACxC,gBAAQA,MAAAA;UACN,KAAK;AACH,mBAAO;cAAEJ,IAAIG,QAAQE,OAAOL;cAAIM,OAAQH,QAAQE,OAAeE;cAAOC,MAAML,QAAQE;YAAO;UAC7F,KAAK;AACH,mBAAOF,QAAQE;UACjB,KAAK;AACH,mBAAOF;QACX;MACF;IACF;EACF;AACF,CAAA,GACAN,UAAUY,gBAAgB;EAAEC,QAAQ;IAACC;;AAAe,CAAA,GACpDd,UAAUe,iBAAiB;EAAEC,UAAUC;AAAa,CAAA,GACpDjB,UAAUkB,sBAAsB;EAAEC;AAAa,CAAA,GAC/CvB,OAAOwB,IAAI;",
6
+ "names": ["Plugin", "AppPlugin", "Capability", "ReactSurface", "Capability", "lazy", "translations", "stackTranslations", "translations", "meta", "id", "stackTranslations", "StackPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addMetadataModule", "metadata", "id", "SECTION_IDENTIFIER", "parse", "section", "type", "object", "label", "title", "data", "addSchemaModule", "schema", "StackViewType", "addSurfaceModule", "activate", "ReactSurface", "addTranslationsModule", "translations", "make"]
7
7
  }