@dxos/plugin-stack 0.8.2-staging.7ac8446 → 0.8.3-main.672df60

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 (66) hide show
  1. package/dist/lib/browser/StackMain-HZI5H2RA.mjs +315 -0
  2. package/dist/lib/browser/StackMain-HZI5H2RA.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-L34RFJ2L.mjs → chunk-XOUJQIK6.mjs} +10 -9
  4. package/dist/lib/browser/chunk-XOUJQIK6.mjs.map +7 -0
  5. package/dist/lib/browser/index.mjs +10 -38
  6. package/dist/lib/browser/index.mjs.map +4 -4
  7. package/dist/lib/browser/meta.json +1 -1
  8. package/dist/lib/browser/react-surface-FIWIAQRE.mjs +46 -0
  9. package/dist/lib/browser/react-surface-FIWIAQRE.mjs.map +7 -0
  10. package/dist/lib/browser/types/index.mjs +1 -1
  11. package/dist/lib/node/StackMain-NPXLFG5C.cjs +329 -0
  12. package/dist/lib/node/StackMain-NPXLFG5C.cjs.map +7 -0
  13. package/dist/lib/node/{chunk-6IPBX635.cjs → chunk-5QWZH22T.cjs} +12 -11
  14. package/dist/lib/node/chunk-5QWZH22T.cjs.map +7 -0
  15. package/dist/lib/node/index.cjs +5 -29
  16. package/dist/lib/node/index.cjs.map +4 -4
  17. package/dist/lib/node/meta.json +1 -1
  18. package/dist/lib/node/react-surface-73G6PBCV.cjs +64 -0
  19. package/dist/lib/node/react-surface-73G6PBCV.cjs.map +7 -0
  20. package/dist/lib/node/types/index.cjs +3 -3
  21. package/dist/lib/node/types/index.cjs.map +1 -1
  22. package/dist/lib/node-esm/StackMain-QH6CGYPK.mjs +316 -0
  23. package/dist/lib/node-esm/StackMain-QH6CGYPK.mjs.map +7 -0
  24. package/dist/lib/node-esm/{chunk-3ZYHKSIS.mjs → chunk-3R62SZZT.mjs} +10 -9
  25. package/dist/lib/node-esm/chunk-3R62SZZT.mjs.map +7 -0
  26. package/dist/lib/node-esm/index.mjs +10 -38
  27. package/dist/lib/node-esm/index.mjs.map +4 -4
  28. package/dist/lib/node-esm/meta.json +1 -1
  29. package/dist/lib/node-esm/react-surface-SCL5YFJ5.mjs +47 -0
  30. package/dist/lib/node-esm/react-surface-SCL5YFJ5.mjs.map +7 -0
  31. package/dist/lib/node-esm/types/index.mjs +1 -1
  32. package/dist/types/src/StackPlugin.d.ts.map +1 -1
  33. package/dist/types/src/capabilities/index.d.ts +2 -0
  34. package/dist/types/src/capabilities/index.d.ts.map +1 -0
  35. package/dist/types/src/capabilities/react-surface.d.ts +4 -0
  36. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  37. package/dist/types/src/components/CaretDownUp.d.ts.map +1 -1
  38. package/dist/types/src/components/StackMain.d.ts.map +1 -1
  39. package/dist/types/src/components/StackSection.d.ts +2 -1
  40. package/dist/types/src/components/StackSection.d.ts.map +1 -1
  41. package/dist/types/src/components/StackSettings.d.ts.map +1 -1
  42. package/dist/types/src/translations.d.ts +1 -0
  43. package/dist/types/src/translations.d.ts.map +1 -1
  44. package/dist/types/src/types/stack.d.ts +11 -11
  45. package/dist/types/src/types/stack.d.ts.map +1 -1
  46. package/dist/types/src/types/types.d.ts +2 -2
  47. package/dist/types/src/types/types.d.ts.map +1 -1
  48. package/dist/types/tsconfig.tsbuildinfo +1 -1
  49. package/package.json +27 -23
  50. package/src/StackPlugin.ts +53 -0
  51. package/src/capabilities/index.ts +7 -0
  52. package/src/capabilities/react-surface.tsx +33 -0
  53. package/src/components/StackMain.tsx +11 -9
  54. package/src/components/StackSection.tsx +8 -6
  55. package/src/types/stack.ts +7 -5
  56. package/src/types/types.ts +2 -2
  57. package/dist/lib/browser/StackMain-E42SHTS6.mjs +0 -295
  58. package/dist/lib/browser/StackMain-E42SHTS6.mjs.map +0 -7
  59. package/dist/lib/browser/chunk-L34RFJ2L.mjs.map +0 -7
  60. package/dist/lib/node/StackMain-4N6IFLMF.cjs +0 -309
  61. package/dist/lib/node/StackMain-4N6IFLMF.cjs.map +0 -7
  62. package/dist/lib/node/chunk-6IPBX635.cjs.map +0 -7
  63. package/dist/lib/node-esm/StackMain-QFKYWI2J.mjs +0 -296
  64. package/dist/lib/node-esm/StackMain-QFKYWI2J.mjs.map +0 -7
  65. package/dist/lib/node-esm/chunk-3ZYHKSIS.mjs.map +0 -7
  66. package/src/StackPlugin.tsx +0 -76
@@ -0,0 +1,315 @@
1
+ import {
2
+ StackViewType
3
+ } from "./chunk-XOUJQIK6.mjs";
4
+ import {
5
+ STACK_PLUGIN
6
+ } from "./chunk-XHZTILS3.mjs";
7
+
8
+ // packages/plugins/plugin-stack/src/components/StackMain.tsx
9
+ import { useSignals as _useSignals3 } from "@preact-signals/safe-react/tracking";
10
+ import { Plus } from "@phosphor-icons/react";
11
+ import { Option } from "effect";
12
+ import React3, { useCallback, useEffect, useMemo, useState as useState2 } from "react";
13
+ import { Capabilities, createIntent, LayoutAction, useAppGraph, useCapabilities, useIntentDispatcher } from "@dxos/app-framework";
14
+ import { fullyQualifiedId, getTypename, isLiveObject, live, makeRef } from "@dxos/client/echo";
15
+ import { SpaceAction } from "@dxos/plugin-space/types";
16
+ import { Button, toLocalizedString, useTranslation as useTranslation2 } from "@dxos/react-ui";
17
+ import { AttentionProvider } from "@dxos/react-ui-attention";
18
+ import { Stack } from "@dxos/react-ui-stack";
19
+ import { isNonNullable } from "@dxos/util";
20
+
21
+ // packages/plugins/plugin-stack/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
+ // packages/plugins/plugin-stack/src/components/StackSection.tsx
36
+ import { useSignals as _useSignals2 } from "@preact-signals/safe-react/tracking";
37
+ import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
38
+ import React2, { useState } from "react";
39
+ import { Surface } from "@dxos/app-framework";
40
+ import { DropdownMenu, Icon, useTranslation, IconButton } from "@dxos/react-ui";
41
+ import { useAttentionAttributes } from "@dxos/react-ui-attention";
42
+ import { StackItem } from "@dxos/react-ui-stack";
43
+ import { mx, getSize, textBlockWidth } from "@dxos/react-ui-theme";
44
+
45
+ // packages/plugins/plugin-stack/src/components/CaretDownUp.tsx
46
+ import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
47
+ import React from "react";
48
+ var CaretDownUp = ({ children, ...props }) => {
49
+ var _effect = _useSignals();
50
+ try {
51
+ return /* @__PURE__ */ React.createElement("svg", {
52
+ xmlns: "http://www.w3.org/2000/svg",
53
+ viewBox: "0 0 256 256",
54
+ ...props
55
+ }, /* @__PURE__ */ React.createElement("rect", {
56
+ width: "256",
57
+ height: "256",
58
+ fill: "none"
59
+ }), /* @__PURE__ */ React.createElement("polyline", {
60
+ points: "80 224 128 176 176 224",
61
+ fill: "none",
62
+ stroke: "currentColor",
63
+ strokeLinecap: "round",
64
+ strokeLinejoin: "round",
65
+ strokeWidth: "16"
66
+ }), /* @__PURE__ */ React.createElement("polyline", {
67
+ points: "80 32 128 80 176 32",
68
+ fill: "none",
69
+ stroke: "currentColor",
70
+ strokeLinecap: "round",
71
+ strokeLinejoin: "round",
72
+ strokeWidth: "16"
73
+ }), children);
74
+ } finally {
75
+ _effect.f();
76
+ }
77
+ };
78
+
79
+ // packages/plugins/plugin-stack/src/components/StackSection.tsx
80
+ var sectionActionDimensions = "p-1 mlb-1 shrink-0 min-bs-0 is-[--rail-action] bs-min";
81
+ var StackSection = ({ id, view, object, metadata: { icon = "ph--placeholder--regular" } }) => {
82
+ var _effect = _useSignals2();
83
+ try {
84
+ const { t } = useTranslation(STACK_PLUGIN);
85
+ const { onNavigate, onAdd, onCollapse, onDelete } = useStack();
86
+ const [optionsMenuOpen, setOptionsMenuOpen] = useState(false);
87
+ const attentionAttrs = useAttentionAttributes(id);
88
+ return /* @__PURE__ */ React2.createElement(CollapsiblePrimitive.Root, {
89
+ asChild: true,
90
+ open: !view.collapsed,
91
+ onOpenChange: (nextOpen) => onCollapse?.(id, !nextOpen)
92
+ }, /* @__PURE__ */ React2.createElement(StackItem.Root, {
93
+ item: {
94
+ id
95
+ },
96
+ role: "section",
97
+ ...attentionAttrs,
98
+ classNames: "border-be border-separator"
99
+ }, /* @__PURE__ */ React2.createElement(StackItem.Heading, {
100
+ classNames: "attention-surface border-ie !border-separator"
101
+ }, /* @__PURE__ */ React2.createElement("span", {
102
+ className: "sr-only"
103
+ }, view.title), /* @__PURE__ */ React2.createElement("div", {
104
+ role: "none",
105
+ className: "sticky -block-start-px bg-[--sticky-bg] p-1 is-full"
106
+ }, /* @__PURE__ */ React2.createElement(DropdownMenu.Root, {
107
+ open: optionsMenuOpen,
108
+ onOpenChange: setOptionsMenuOpen
109
+ }, /* @__PURE__ */ React2.createElement(DropdownMenu.Trigger, {
110
+ asChild: true
111
+ }, /* @__PURE__ */ React2.createElement(StackItem.SigilButton, null, /* @__PURE__ */ React2.createElement(Icon, {
112
+ icon,
113
+ size: 5,
114
+ classNames: "transition-opacity"
115
+ }))), /* @__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, {
116
+ onClick: () => onNavigate(id),
117
+ "data-testid": "section.navigate-to"
118
+ }, /* @__PURE__ */ React2.createElement(Icon, {
119
+ icon: "ph--arrow-right--regular",
120
+ size: 5
121
+ }), /* @__PURE__ */ React2.createElement("span", {
122
+ className: "mis-2 grow"
123
+ }, t("navigate to section label"))) : /* @__PURE__ */ React2.createElement(CollapsiblePrimitive.Trigger, {
124
+ asChild: true
125
+ }, /* @__PURE__ */ React2.createElement(DropdownMenu.Item, null, /* @__PURE__ */ React2.createElement(CaretDownUp, {
126
+ className: getSize(5)
127
+ }), /* @__PURE__ */ React2.createElement("span", {
128
+ className: "mis-2 grow"
129
+ }, t("collapse label")))), /* @__PURE__ */ React2.createElement(DropdownMenu.Item, {
130
+ onClick: () => onAdd(id, "before"),
131
+ "data-testid": "section.add-before"
132
+ }, /* @__PURE__ */ React2.createElement(Icon, {
133
+ icon: "ph--arrow-line-up--regular",
134
+ size: 5
135
+ }), /* @__PURE__ */ React2.createElement("span", {
136
+ className: "mis-2 grow"
137
+ }, t("add section before label"))), /* @__PURE__ */ React2.createElement(DropdownMenu.Item, {
138
+ onClick: () => onAdd(id, "after"),
139
+ "data-testid": "section.add-after"
140
+ }, /* @__PURE__ */ React2.createElement(Icon, {
141
+ icon: "ph--arrow-line-down--regular",
142
+ size: 5
143
+ }), /* @__PURE__ */ React2.createElement("span", {
144
+ className: "mis-2 grow"
145
+ }, t("add section after label"))), /* @__PURE__ */ React2.createElement(DropdownMenu.Item, {
146
+ onClick: () => onDelete(id),
147
+ "data-testid": "section.remove"
148
+ }, /* @__PURE__ */ React2.createElement(Icon, {
149
+ icon: "ph--trash--regular",
150
+ size: 5
151
+ }), /* @__PURE__ */ React2.createElement("span", {
152
+ className: "mis-2 grow"
153
+ }, t("remove section label")))), /* @__PURE__ */ React2.createElement(DropdownMenu.Arrow, null)))), view.collapsed ? /* @__PURE__ */ React2.createElement(CollapsiblePrimitive.Trigger, {
154
+ asChild: true
155
+ }, /* @__PURE__ */ React2.createElement(IconButton, {
156
+ iconOnly: true,
157
+ variant: "ghost",
158
+ label: t("expand label"),
159
+ icon: "ph--caret-up-down--regular",
160
+ classNames: sectionActionDimensions
161
+ })) : /* @__PURE__ */ React2.createElement(IconButton, {
162
+ iconOnly: true,
163
+ variant: "ghost",
164
+ onClick: () => onNavigate(id),
165
+ label: t("navigate to section label"),
166
+ icon: "ph--arrow-right--regular",
167
+ "data-testid": "section.navigate-to",
168
+ classNames: sectionActionDimensions
169
+ }))), /* @__PURE__ */ React2.createElement(CollapsiblePrimitive.Content, null, /* @__PURE__ */ React2.createElement(Surface, {
170
+ role: "section",
171
+ data: {
172
+ subject: object
173
+ },
174
+ limit: 1,
175
+ placeholder: /* @__PURE__ */ React2.createElement(React2.Fragment, null)
176
+ })), view.collapsed && /* @__PURE__ */ React2.createElement(StackItem.Content, {
177
+ classNames: "attention-surface"
178
+ }, /* @__PURE__ */ React2.createElement("h2", {
179
+ className: mx("flex items-center p-4 font-medium", textBlockWidth)
180
+ }, view.title))));
181
+ } finally {
182
+ _effect.f();
183
+ }
184
+ };
185
+
186
+ // packages/plugins/plugin-stack/src/components/StackMain.tsx
187
+ var StackMain = ({ id, collection }) => {
188
+ var _effect = _useSignals3();
189
+ try {
190
+ const { dispatchPromise: dispatch } = useIntentDispatcher();
191
+ const { graph } = useAppGraph();
192
+ const { t } = useTranslation2(STACK_PLUGIN);
193
+ const allMetadata = useCapabilities(Capabilities.Metadata);
194
+ const defaultStack = useMemo(() => live(StackViewType, {
195
+ sections: {}
196
+ }), [
197
+ collection
198
+ ]);
199
+ const stack = collection.views[StackViewType.typename]?.target ?? defaultStack;
200
+ const [collapsedSections, setCollapsedSections] = useState2({});
201
+ useEffect(() => {
202
+ if (!collection.views[StackViewType.typename]) {
203
+ collection.views[StackViewType.typename] = makeRef(stack);
204
+ }
205
+ }, [
206
+ collection,
207
+ stack
208
+ ]);
209
+ const items = collection.objects.map((object) => object.target).filter(isNonNullable).map((object) => {
210
+ const metadata = allMetadata.find((m) => m.id === (getTypename(object) ?? "never"))?.metadata;
211
+ const view = {
212
+ ...stack.sections[object.id],
213
+ collapsed: collapsedSections[fullyQualifiedId(object)],
214
+ title: object?.title ?? // TODO(wittjosiah): `getNode` is not reactive.
215
+ toLocalizedString(graph.getNode(fullyQualifiedId(object)).pipe(Option.getOrNull)?.properties.label, t)
216
+ };
217
+ return {
218
+ id: fullyQualifiedId(object),
219
+ object,
220
+ metadata,
221
+ view
222
+ };
223
+ }) ?? [];
224
+ const handleDelete = useCallback(async (id2) => {
225
+ const index = collection.objects.map((object2) => object2.target).filter(isNonNullable).findIndex((section) => fullyQualifiedId(section) === id2);
226
+ const object = collection.objects[index].target;
227
+ if (isLiveObject(object)) {
228
+ await dispatch(createIntent(SpaceAction.RemoveObjects, {
229
+ objects: [
230
+ object
231
+ ],
232
+ target: collection
233
+ }));
234
+ }
235
+ }, [
236
+ collection,
237
+ dispatch
238
+ ]);
239
+ const handleAdd = useCallback(async (id2, position) => {
240
+ await dispatch?.(
241
+ // TODO(wittjosiah): Use object creation dialog.
242
+ createIntent(LayoutAction.UpdateDialog, {
243
+ part: "dialog",
244
+ subject: `${STACK_PLUGIN}/AddSectionDialog`,
245
+ options: {
246
+ blockAlign: "start",
247
+ props: {
248
+ path: id2,
249
+ position,
250
+ collection
251
+ }
252
+ }
253
+ })
254
+ );
255
+ }, [
256
+ collection,
257
+ dispatch
258
+ ]);
259
+ const handleNavigate = useCallback(async (id2) => {
260
+ await dispatch(createIntent(LayoutAction.Open, {
261
+ part: "main",
262
+ subject: [
263
+ id2
264
+ ]
265
+ }));
266
+ }, [
267
+ dispatch
268
+ ]);
269
+ const handleCollapse = useCallback((id2, collapsed) => setCollapsedSections((prev) => ({
270
+ ...prev,
271
+ [id2]: collapsed
272
+ })), []);
273
+ const handleAddSection = useCallback(() => dispatch?.(createIntent(SpaceAction.OpenCreateObject, {
274
+ target: collection,
275
+ navigable: false
276
+ })), [
277
+ collection,
278
+ dispatch
279
+ ]);
280
+ return /* @__PURE__ */ React3.createElement(AttentionProvider, {
281
+ id
282
+ }, /* @__PURE__ */ React3.createElement(StackContext.Provider, {
283
+ value: {
284
+ onCollapse: handleCollapse,
285
+ onNavigate: handleNavigate,
286
+ onDelete: handleDelete,
287
+ onAdd: handleAdd
288
+ }
289
+ }, /* @__PURE__ */ React3.createElement(Stack, {
290
+ orientation: "vertical",
291
+ size: "intrinsic",
292
+ id,
293
+ "data-testid": "main.stack"
294
+ }, items.map((item) => /* @__PURE__ */ React3.createElement(StackSection, {
295
+ key: item.id,
296
+ ...item
297
+ }))), /* @__PURE__ */ React3.createElement("div", {
298
+ role: "none",
299
+ className: "flex mlb-2 pli-2 justify-center"
300
+ }, /* @__PURE__ */ React3.createElement(Button, {
301
+ "data-testid": "stack.createSection",
302
+ classNames: "gap-2",
303
+ onClick: handleAddSection
304
+ }, /* @__PURE__ */ React3.createElement(Plus, null), /* @__PURE__ */ React3.createElement("span", {
305
+ className: "sr-only"
306
+ }, t("add section label"))))));
307
+ } finally {
308
+ _effect.f();
309
+ }
310
+ };
311
+ var StackMain_default = StackMain;
312
+ export {
313
+ StackMain_default as default
314
+ };
315
+ //# sourceMappingURL=StackMain-HZI5H2RA.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/StackMain.tsx", "../../../src/components/StackContext.tsx", "../../../src/components/StackSection.tsx", "../../../src/components/CaretDownUp.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plus } from '@phosphor-icons/react';\nimport { Option } from 'effect';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport {\n Capabilities,\n createIntent,\n LayoutAction,\n useAppGraph,\n useCapabilities,\n useIntentDispatcher,\n} from '@dxos/app-framework';\nimport { fullyQualifiedId, getTypename, isLiveObject, live, makeRef } from '@dxos/client/echo';\nimport { SpaceAction, type CollectionType } from '@dxos/plugin-space/types';\nimport { Button, toLocalizedString, useTranslation } from '@dxos/react-ui';\nimport { AttentionProvider } from '@dxos/react-ui-attention';\nimport { Stack } from '@dxos/react-ui-stack';\nimport { isNonNullable } from '@dxos/util';\n\nimport { StackContext } from './StackContext';\nimport { StackSection } from './StackSection';\nimport { STACK_PLUGIN } from '../meta';\nimport {\n StackViewType,\n type AddSectionPosition,\n type CollapsedSections,\n type StackSectionItem,\n type StackSectionMetadata,\n type StackSectionView,\n} from '../types';\n\ntype StackMainProps = {\n id: string;\n collection: CollectionType;\n};\n\nconst StackMain = ({ id, collection }: StackMainProps) => {\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n const { graph } = useAppGraph();\n const { t } = useTranslation(STACK_PLUGIN);\n const allMetadata = useCapabilities(Capabilities.Metadata);\n const defaultStack = useMemo(() => live(StackViewType, { sections: {} }), [collection]);\n const stack = (collection.views[StackViewType.typename]?.target as StackViewType | undefined) ?? defaultStack;\n const [collapsedSections, setCollapsedSections] = useState<CollapsedSections>({});\n\n useEffect(() => {\n if (!collection.views[StackViewType.typename]) {\n collection.views[StackViewType.typename] = makeRef(stack);\n }\n }, [collection, stack]);\n\n const items =\n collection.objects\n // TODO(wittjosiah): Should the database handle this differently?\n // TODO(wittjosiah): Render placeholders for missing objects so they can be removed from the stack?\n .map((object) => object.target)\n .filter(isNonNullable)\n .map((object) => {\n const metadata = allMetadata.find((m) => m.id === (getTypename(object) ?? 'never'))\n ?.metadata as StackSectionMetadata;\n const view = {\n ...stack.sections[object.id],\n collapsed: collapsedSections[fullyQualifiedId(object)],\n title:\n (object as any)?.title ??\n // TODO(wittjosiah): `getNode` is not reactive.\n toLocalizedString(graph.getNode(fullyQualifiedId(object)).pipe(Option.getOrNull)?.properties.label, t),\n } as StackSectionView;\n return { id: fullyQualifiedId(object), 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) => fullyQualifiedId(section) === id);\n const object = collection.objects[index].target;\n if (isLiveObject(object)) {\n await dispatch(createIntent(SpaceAction.RemoveObjects, { objects: [object], target: collection }));\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, dispatch],\n );\n\n const handleAdd = useCallback(\n async (id: string, position: AddSectionPosition) => {\n await dispatch?.(\n // TODO(wittjosiah): Use object creation dialog.\n createIntent(LayoutAction.UpdateDialog, {\n part: 'dialog',\n subject: `${STACK_PLUGIN}/AddSectionDialog`,\n options: {\n blockAlign: 'start',\n props: {\n path: id,\n position,\n collection,\n },\n },\n }),\n );\n },\n [collection, dispatch],\n );\n\n const handleNavigate = useCallback(\n async (id: string) => {\n await dispatch(createIntent(LayoutAction.Open, { part: 'main', subject: [id] }));\n },\n [dispatch],\n );\n\n const handleCollapse = useCallback(\n (id: string, collapsed: boolean) => setCollapsedSections((prev) => ({ ...prev, [id]: collapsed })),\n [],\n );\n\n const handleAddSection = useCallback(\n () => dispatch?.(createIntent(SpaceAction.OpenCreateObject, { target: collection, navigable: false })),\n [collection, dispatch],\n );\n\n return (\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'>\n {items.map((item) => (\n <StackSection key={item.id} {...item} />\n ))}\n </Stack>\n\n <div role='none' className='flex mlb-2 pli-2 justify-center'>\n <Button data-testid='stack.createSection' classNames='gap-2' onClick={handleAddSection}>\n <Plus />\n <span className='sr-only'>{t('add section label')}</span>\n </Button>\n </div>\n </StackContext.Provider>\n </AttentionProvider>\n );\n};\n\nexport default StackMain;\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, { useState } from 'react';\n\nimport { Surface } from '@dxos/app-framework';\nimport { DropdownMenu, Icon, useTranslation, IconButton } from '@dxos/react-ui';\nimport { useAttentionAttributes } from '@dxos/react-ui-attention';\nimport { StackItem } from '@dxos/react-ui-stack';\nimport { mx, getSize, textBlockWidth } from '@dxos/react-ui-theme';\n\nimport { CaretDownUp } from './CaretDownUp';\nimport { useStack } from './StackContext';\nimport { STACK_PLUGIN } from '../meta';\nimport { type StackSectionItem } from '../types';\n\nconst sectionActionDimensions = 'p-1 mlb-1 shrink-0 min-bs-0 is-[--rail-action] bs-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(STACK_PLUGIN);\n const { onNavigate, onAdd, onCollapse, onDelete } = useStack();\n const [optionsMenuOpen, setOptionsMenuOpen] = useState(false);\n const attentionAttrs = useAttentionAttributes(id);\n\n return (\n <CollapsiblePrimitive.Root asChild open={!view.collapsed} onOpenChange={(nextOpen) => onCollapse?.(id, !nextOpen)}>\n <StackItem.Root item={{ id }} role='section' {...attentionAttrs} classNames='border-be border-separator'>\n <StackItem.Heading classNames='attention-surface border-ie !border-separator'>\n <span className='sr-only'>{view.title}</span>\n <div role='none' className='sticky -block-start-px bg-[--sticky-bg] p-1 is-full'>\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='mis-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='mis-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='mis-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='mis-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='mis-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 </div>\n </StackItem.Heading>\n <CollapsiblePrimitive.Content>\n <Surface role='section' data={{ subject: object }} limit={1} placeholder={<></>} />\n </CollapsiblePrimitive.Content>\n {view.collapsed && (\n <StackItem.Content classNames='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"],
5
+ "mappings": ";;;;;;;;;AAIA,SAASA,YAAY;AACrB,SAASC,cAAc;AACvB,OAAOC,UAASC,aAAaC,WAAWC,SAASC,YAAAA,iBAAgB;AAEjE,SACEC,cACAC,cACAC,cACAC,aACAC,iBACAC,2BACK;AACP,SAASC,kBAAkBC,aAAaC,cAAcC,MAAMC,eAAe;AAC3E,SAASC,mBAAwC;AACjD,SAASC,QAAQC,mBAAmBC,kBAAAA,uBAAsB;AAC1D,SAASC,yBAAyB;AAClC,SAASC,aAAa;AACtB,SAASC,qBAAqB;;;ACjB9B,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,gBAAgB;AAEhC,SAASC,eAAe;AACxB,SAASC,cAAcC,MAAMC,gBAAgBC,kBAAkB;AAC/D,SAASC,8BAA8B;AACvC,SAASC,iBAAiB;AAC1B,SAASC,IAAIC,SAASC,sBAAsB;;;;ACP5C,OAAOC,WAA8C;AAE9C,IAAMC,cAAc,CAAC,EAAEC,UAAU,GAAGC,MAAAA,MAAwC;;;AACjF,WACE,sBAAA,cAACC,OAAAA;MAAIC,OAAM;MAA6BC,SAAQ;MAAe,GAAGH;OAChE,sBAAA,cAACI,QAAAA;MAAKC,OAAM;MAAMC,QAAO;MAAMC,MAAK;QACpC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AIC,MAAK;MAAOC,WAAU;OACzB,gBAAAlB,OAAA,cAACmB,QAAAA;MAAOP,eAAY;MAAsBQ,YAAW;MAAQC,SAASxB;OACpE,gBAAAG,OAAA,cAACsB,MAAAA,IAAAA,GACD,gBAAAtB,OAAA,cAACuB,QAAAA;MAAKL,WAAU;OAAWtF,EAAE,mBAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;;;AAMzC;AAEA,IAAA,oBAAeR;",
6
+ "names": ["Plus", "Option", "React", "useCallback", "useEffect", "useMemo", "useState", "Capabilities", "createIntent", "LayoutAction", "useAppGraph", "useCapabilities", "useIntentDispatcher", "fullyQualifiedId", "getTypename", "isLiveObject", "live", "makeRef", "SpaceAction", "Button", "toLocalizedString", "useTranslation", "AttentionProvider", "Stack", "isNonNullable", "createContext", "useContext", "StackContext", "createContext", "onCollapse", "onNavigate", "onDelete", "onAdd", "useStack", "useContext", "CollapsiblePrimitive", "React", "useState", "Surface", "DropdownMenu", "Icon", "useTranslation", "IconButton", "useAttentionAttributes", "StackItem", "mx", "getSize", "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", "STACK_PLUGIN", "onNavigate", "onAdd", "onCollapse", "onDelete", "useStack", "optionsMenuOpen", "setOptionsMenuOpen", "useState", "attentionAttrs", "useAttentionAttributes", "React", "Root", "asChild", "open", "collapsed", "onOpenChange", "nextOpen", "StackItem", "item", "role", "classNames", "Heading", "span", "className", "title", "div", "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", "StackMain", "id", "collection", "dispatchPromise", "dispatch", "useIntentDispatcher", "graph", "useAppGraph", "t", "useTranslation", "STACK_PLUGIN", "allMetadata", "useCapabilities", "Capabilities", "Metadata", "defaultStack", "useMemo", "live", "StackViewType", "sections", "stack", "views", "typename", "target", "collapsedSections", "setCollapsedSections", "useState", "useEffect", "makeRef", "items", "objects", "map", "object", "filter", "isNonNullable", "metadata", "find", "m", "getTypename", "view", "collapsed", "fullyQualifiedId", "title", "toLocalizedString", "getNode", "pipe", "Option", "getOrNull", "properties", "label", "handleDelete", "useCallback", "index", "findIndex", "section", "isLiveObject", "createIntent", "SpaceAction", "RemoveObjects", "handleAdd", "position", "LayoutAction", "UpdateDialog", "part", "subject", "options", "blockAlign", "props", "path", "handleNavigate", "Open", "handleCollapse", "prev", "handleAddSection", "OpenCreateObject", "navigable", "React", "AttentionProvider", "StackContext", "Provider", "value", "onCollapse", "onNavigate", "onDelete", "onAdd", "Stack", "orientation", "size", "data-testid", "item", "StackSection", "key", "div", "role", "className", "Button", "classNames", "onClick", "Plus", "span"]
7
+ }
@@ -1,20 +1,21 @@
1
1
  // packages/plugins/plugin-stack/src/types/stack.ts
2
- import { S, TypedObject } from "@dxos/echo-schema";
3
- var SectionSchema = S.Struct({
4
- height: S.optional(S.Number),
2
+ import { Schema } from "effect";
3
+ import { TypedObject } from "@dxos/echo-schema";
4
+ var SectionSchema = Schema.Struct({
5
+ height: Schema.optional(Schema.Number),
5
6
  // Space for data that isn't stack-specific but is specific to this view instance.
6
7
  // e.g. cover/fill for an image
7
- custom: S.optional(S.Record({
8
- key: S.String,
9
- value: S.Any
8
+ custom: Schema.optional(Schema.Record({
9
+ key: Schema.String,
10
+ value: Schema.Any
10
11
  }))
11
12
  });
12
13
  var StackViewType = class extends TypedObject({
13
14
  typename: "dxos.org/type/StackView",
14
15
  version: "0.1.0"
15
16
  })({
16
- sections: S.mutable(S.Record({
17
- key: S.String,
17
+ sections: Schema.mutable(Schema.Record({
18
+ key: Schema.String,
18
19
  value: SectionSchema
19
20
  }))
20
21
  }) {
@@ -24,4 +25,4 @@ export {
24
25
  SectionSchema,
25
26
  StackViewType
26
27
  };
27
- //# sourceMappingURL=chunk-L34RFJ2L.mjs.map
28
+ //# sourceMappingURL=chunk-XOUJQIK6.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 { Schema } from 'effect';\n\nimport { TypedObject } from '@dxos/echo-schema';\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(burdon): Should be just type/Stack?\nexport class StackViewType extends TypedObject({ typename: 'dxos.org/type/StackView', version: '0.1.0' })({\n sections: Schema.mutable(Schema.Record({ key: Schema.String, value: SectionSchema })),\n}) {}\n"],
5
+ "mappings": ";AAIA,SAASA,cAAc;AAEvB,SAASC,mBAAmB;AAOrB,IAAMC,gBAAgBC,OAAOC,OAAO;EACzCC,QAAQF,OAAOG,SAASH,OAAOI,MAAM;;;EAGrCC,QAAQL,OAAOG,SAASH,OAAOM,OAAO;IAAEC,KAAKP,OAAOQ;IAAQC,OAAOT,OAAOU;EAAI,CAAA,CAAA;AAChF,CAAA;AAGO,IAAMC,gBAAN,cAA4BC,YAAY;EAAEC,UAAU;EAA2BC,SAAS;AAAQ,CAAA,EAAG;EACxGC,UAAUf,OAAOgB,QAAQhB,OAAOM,OAAO;IAAEC,KAAKP,OAAOQ;IAAQC,OAAOV;EAAc,CAAA,CAAA;AACpF,CAAA,EAAA;AAAI;",
6
+ "names": ["Schema", "TypedObject", "SectionSchema", "Schema", "Struct", "height", "optional", "Number", "custom", "Record", "key", "String", "value", "Any", "StackViewType", "TypedObject", "typename", "version", "sections", "mutable"]
7
+ }
@@ -1,30 +1,19 @@
1
+ import {
2
+ StackViewType
3
+ } from "./chunk-XOUJQIK6.mjs";
1
4
  import {
2
5
  SECTION_IDENTIFIER,
3
6
  STACK_PLUGIN,
4
7
  meta
5
8
  } from "./chunk-XHZTILS3.mjs";
6
- import {
7
- StackViewType
8
- } from "./chunk-L34RFJ2L.mjs";
9
9
 
10
- // packages/plugins/plugin-stack/src/StackPlugin.tsx
11
- import React2 from "react";
12
- import { Capabilities, contributes, createSurface, defineModule, definePlugin, Events } from "@dxos/app-framework";
13
- import { fullyQualifiedId } from "@dxos/client/echo";
14
- import { isInstanceOf } from "@dxos/echo-schema";
10
+ // packages/plugins/plugin-stack/src/StackPlugin.ts
11
+ import { Capabilities, contributes, defineModule, definePlugin, Events } from "@dxos/app-framework";
15
12
  import { ClientCapabilities, ClientEvents } from "@dxos/plugin-client";
16
- import { CollectionType } from "@dxos/plugin-space/types";
17
13
 
18
- // packages/plugins/plugin-stack/src/components/index.ts
19
- import { lazy } from "react";
20
-
21
- // packages/plugins/plugin-stack/src/components/StackSettings.tsx
22
- import React from "react";
23
- import { Input, useTranslation } from "@dxos/react-ui";
24
- import { DeprecatedFormContainer, DeprecatedFormInput } from "@dxos/react-ui-form";
25
-
26
- // packages/plugins/plugin-stack/src/components/index.ts
27
- var StackMain = lazy(() => import("./StackMain-E42SHTS6.mjs"));
14
+ // packages/plugins/plugin-stack/src/capabilities/index.ts
15
+ import { lazy } from "@dxos/app-framework";
16
+ var ReactSurface = lazy(() => import("./react-surface-FIWIAQRE.mjs"));
28
17
 
29
18
  // packages/plugins/plugin-stack/src/translations.ts
30
19
  import { translations as stackTranslations } from "@dxos/react-ui-stack";
@@ -57,7 +46,7 @@ var translations_default = [
57
46
  ...stackTranslations
58
47
  ];
59
48
 
60
- // packages/plugins/plugin-stack/src/StackPlugin.tsx
49
+ // packages/plugins/plugin-stack/src/StackPlugin.ts
61
50
  var StackPlugin = () => definePlugin(meta, [
62
51
  defineModule({
63
52
  id: `${meta.id}/module/translations`,
@@ -99,24 +88,7 @@ var StackPlugin = () => definePlugin(meta, [
99
88
  defineModule({
100
89
  id: `${meta.id}/module/react-surface`,
101
90
  activatesOn: Events.SetupReactSurface,
102
- activate: () => contributes(Capabilities.ReactSurface, createSurface({
103
- id: `${STACK_PLUGIN}/article`,
104
- role: "article",
105
- filter: (data) => isInstanceOf(CollectionType, data.subject),
106
- component: ({ data }) => {
107
- const id = typeof data.id === "string" ? data.id : void 0;
108
- return /* @__PURE__ */ React2.createElement("div", {
109
- role: "none",
110
- className: "overflow-auto",
111
- style: {
112
- contain: "layout"
113
- }
114
- }, /* @__PURE__ */ React2.createElement(StackMain, {
115
- id: id ?? fullyQualifiedId(data.subject),
116
- collection: data.subject
117
- }));
118
- }
119
- }))
91
+ activate: ReactSurface
120
92
  })
121
93
  ]);
122
94
  export {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/StackPlugin.tsx", "../../../src/components/index.ts", "../../../src/components/StackSettings.tsx", "../../../src/translations.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Capabilities, contributes, createSurface, defineModule, definePlugin, Events } from '@dxos/app-framework';\nimport { type ReactiveEchoObject, fullyQualifiedId } from '@dxos/client/echo';\nimport { isInstanceOf } from '@dxos/echo-schema';\nimport { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';\nimport { CollectionType } from '@dxos/plugin-space/types';\n\nimport { StackMain } from './components';\nimport { meta, SECTION_IDENTIFIER, STACK_PLUGIN } 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: ReactiveEchoObject<any> }, type: string) => {\n switch (type) {\n case 'node':\n // TODO(wittjosiah): Remove cast.\n return { id: section.object.id, label: section.object.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: () =>\n contributes(\n Capabilities.ReactSurface,\n createSurface({\n id: `${STACK_PLUGIN}/article`,\n role: 'article',\n filter: (data): data is { id?: string; subject: CollectionType } =>\n isInstanceOf(CollectionType, data.subject),\n component: ({ data }) => {\n // This allows the id to be overridden by the surface for situations where the id of the collection\n // is not the same as the id of what is being represented (e.g., a space with a root collection).\n const id = typeof data.id === 'string' ? data.id : undefined;\n return (\n <div role='none' className='overflow-auto' style={{ contain: 'layout' }}>\n <StackMain id={id ?? fullyQualifiedId(data.subject)} collection={data.subject} />\n </div>\n );\n },\n }),\n ),\n }),\n ]);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { lazy } from 'react';\n\nexport const StackMain = lazy(() => import('./StackMain'));\n\nexport * from './StackSettings';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Input, useTranslation } from '@dxos/react-ui';\nimport { DeprecatedFormContainer, DeprecatedFormInput } from '@dxos/react-ui-form';\n\nimport { STACK_PLUGIN } from '../meta';\nimport { type StackSettingsProps } from '../types';\n\nexport const StackSettings = ({ settings }: { settings: StackSettingsProps }) => {\n const { t } = useTranslation(STACK_PLUGIN);\n\n return (\n <DeprecatedFormContainer>\n <DeprecatedFormInput label={t('settings separation label')}>\n <Input.Switch checked={settings.separation} onCheckedChange={(checked) => (settings.separation = !!checked)} />\n </DeprecatedFormInput>\n </DeprecatedFormContainer>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { translations as stackTranslations } from '@dxos/react-ui-stack';\n\nimport { STACK_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [STACK_PLUGIN]: {\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];\n"],
5
- "mappings": ";;;;;;;;;;AAIA,OAAOA,YAAW;AAElB,SAASC,cAAcC,aAAaC,eAAeC,cAAcC,cAAcC,cAAc;AAC7F,SAAkCC,wBAAwB;AAC1D,SAASC,oBAAoB;AAC7B,SAASC,oBAAoBC,oBAAoB;AACjD,SAASC,sBAAsB;;;ACN/B,SAASC,YAAY;;;ACArB,OAAOC,WAAW;AAElB,SAASC,OAAOC,sBAAsB;AACtC,SAASC,yBAAyBC,2BAA2B;;;ADDtD,IAAMC,YAAYC,KAAK,MAAM,OAAO,0BAAA,CAAA;;;AEF3C,SAASC,gBAAgBC,yBAAyB;AAIlD,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACC,YAAAA,GAAe;QACd,eAAe;QACf,6BAA6B;QAC7B,sCAAsC;QACtC,qCAAqC;QACrC,mCAAmC;QACnC,kCAAkC;QAClC,iCAAiC;QACjC,qBAAqB;QACrB,qBAAqB;QACrB,uBAAuB;QACvB,wBA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AAK;UAAOS,WAAU;UAAgBC,OAAO;YAAEC,SAAS;UAAS;WACpE,gBAAAJ,OAAA,cAACK,WAAAA;UAAUzC,IAAIA,MAAM0C,iBAAiBvB,KAAKc,OAAO;UAAGU,YAAYxB,KAAKc;;MAG5E;IACF,CAAA,CAAA;EAEN,CAAA;CACD;",
6
- "names": ["React", "Capabilities", "contributes", "createSurface", "defineModule", "definePlugin", "Events", "fullyQualifiedId", "isInstanceOf", "ClientCapabilities", "ClientEvents", "CollectionType", "lazy", "React", "Input", "useTranslation", "DeprecatedFormContainer", "DeprecatedFormInput", "StackMain", "lazy", "translations", "stackTranslations", "STACK_PLUGIN", "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", "createSurface", "STACK_PLUGIN", "role", "filter", "isInstanceOf", "CollectionType", "subject", "component", "undefined", "React", "div", "className", "style", "contain", "StackMain", "fullyQualifiedId", "collection"]
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 AnyLiveObject } from '@dxos/client/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: AnyLiveObject<any> }, type: string) => {\n switch (type) {\n case 'node':\n // TODO(wittjosiah): Remove cast.\n return { id: section.object.id, label: section.object.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 { translations as stackTranslations } from '@dxos/react-ui-stack';\n\nimport { STACK_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [STACK_PLUGIN]: {\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];\n"],
5
+ "mappings": ";;;;;;;;;;AAIA,SAASA,cAAcC,aAAaC,cAAcC,cAAcC,cAAc;AAE9E,SAASC,oBAAoBC,oBAAoB;;;ACF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aC,OAAOuB;IACpBrB,UAAUsB;EACZ,CAAA;CACD;",
6
+ "names": ["Capabilities", "contributes", "defineModule", "definePlugin", "Events", "ClientCapabilities", "ClientEvents", "lazy", "ReactSurface", "lazy", "translations", "stackTranslations", "STACK_PLUGIN", "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"]
7
7
  }