@dxos/plugin-stack 0.8.4-main.84f28bd → 0.8.4-main.8baae0fced

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 (123) hide show
  1. package/LICENSE +102 -5
  2. package/README.md +1 -1
  3. package/dist/lib/neutral/StackArticle-3FE52PUH.mjs +126 -0
  4. package/dist/lib/neutral/StackArticle-3FE52PUH.mjs.map +7 -0
  5. package/dist/lib/neutral/StackPlugin.mjs +22 -0
  6. package/dist/lib/neutral/StackPlugin.mjs.map +7 -0
  7. package/dist/lib/neutral/capabilities/index.mjs +7 -0
  8. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  9. package/dist/lib/{browser/chunk-VDSBIEAC.mjs → neutral/chunk-IPU3C6TT.mjs} +10 -11
  10. package/dist/lib/neutral/chunk-IPU3C6TT.mjs.map +7 -0
  11. package/dist/lib/{node-esm/chunk-UN5PA7TK.mjs → neutral/chunk-LAZU5N5N.mjs} +9 -8
  12. package/dist/lib/neutral/chunk-LAZU5N5N.mjs.map +7 -0
  13. package/dist/lib/neutral/components/index.mjs +182 -0
  14. package/dist/lib/neutral/components/index.mjs.map +7 -0
  15. package/dist/lib/neutral/containers/index.mjs +7 -0
  16. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  17. package/dist/lib/neutral/index.mjs +15 -0
  18. package/dist/lib/neutral/meta.json +1 -0
  19. package/dist/lib/neutral/meta.mjs +9 -0
  20. package/dist/lib/neutral/plugin.mjs +11 -0
  21. package/dist/lib/neutral/plugin.mjs.map +7 -0
  22. package/dist/lib/neutral/react-surface-MD3CVY2N.mjs +23 -0
  23. package/dist/lib/neutral/react-surface-MD3CVY2N.mjs.map +7 -0
  24. package/dist/lib/neutral/translations.mjs +37 -0
  25. package/dist/lib/neutral/translations.mjs.map +7 -0
  26. package/dist/lib/{browser → neutral}/types/index.mjs +1 -1
  27. package/dist/lib/neutral/types/index.mjs.map +7 -0
  28. package/dist/types/src/StackPlugin.d.ts +3 -1
  29. package/dist/types/src/StackPlugin.d.ts.map +1 -1
  30. package/dist/types/src/capabilities/index.d.ts +2 -1
  31. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  32. package/dist/types/src/capabilities/react-surface.d.ts +3 -2
  33. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  34. package/dist/types/src/components/{StackContext.d.ts → StackContext/StackContext.d.ts} +2 -1
  35. package/dist/types/src/components/StackContext/StackContext.d.ts.map +1 -0
  36. package/dist/types/src/components/StackContext/index.d.ts +2 -0
  37. package/dist/types/src/components/StackContext/index.d.ts.map +1 -0
  38. package/dist/types/src/components/{CaretDownUp.d.ts → StackSection/CaretDownUp.d.ts} +1 -1
  39. package/dist/types/src/components/StackSection/CaretDownUp.d.ts.map +1 -0
  40. package/dist/types/src/components/{StackSection.d.ts → StackSection/StackSection.d.ts} +1 -1
  41. package/dist/types/src/components/StackSection/StackSection.d.ts.map +1 -0
  42. package/dist/types/src/components/StackSection/index.d.ts +2 -0
  43. package/dist/types/src/components/StackSection/index.d.ts.map +1 -0
  44. package/dist/types/src/components/{StackSettings.d.ts → StackSettings/StackSettings.d.ts} +1 -1
  45. package/dist/types/src/components/StackSettings/StackSettings.d.ts.map +1 -0
  46. package/dist/types/src/components/StackSettings/index.d.ts +2 -0
  47. package/dist/types/src/components/StackSettings/index.d.ts.map +1 -0
  48. package/dist/types/src/components/index.d.ts +2 -4
  49. package/dist/types/src/components/index.d.ts.map +1 -1
  50. package/dist/types/src/containers/StackArticle/StackArticle.d.ts +7 -0
  51. package/dist/types/src/containers/StackArticle/StackArticle.d.ts.map +1 -0
  52. package/dist/types/src/containers/StackArticle/index.d.ts +2 -0
  53. package/dist/types/src/containers/StackArticle/index.d.ts.map +1 -0
  54. package/dist/types/src/containers/index.d.ts +3 -0
  55. package/dist/types/src/containers/index.d.ts.map +1 -0
  56. package/dist/types/src/index.d.ts +1 -1
  57. package/dist/types/src/index.d.ts.map +1 -1
  58. package/dist/types/src/meta.d.ts +3 -4
  59. package/dist/types/src/meta.d.ts.map +1 -1
  60. package/dist/types/src/plugin.d.ts +3 -0
  61. package/dist/types/src/plugin.d.ts.map +1 -0
  62. package/dist/types/src/translations.d.ts +31 -30
  63. package/dist/types/src/translations.d.ts.map +1 -1
  64. package/dist/types/src/types/index.d.ts +1 -1
  65. package/dist/types/src/types/index.d.ts.map +1 -1
  66. package/dist/types/src/types/stack.d.ts +13 -14
  67. package/dist/types/src/types/stack.d.ts.map +1 -1
  68. package/dist/types/src/types/types.d.ts +7 -6
  69. package/dist/types/src/types/types.d.ts.map +1 -1
  70. package/dist/types/tsconfig.tsbuildinfo +1 -1
  71. package/package.json +93 -53
  72. package/src/StackPlugin.ts +14 -46
  73. package/src/capabilities/index.ts +2 -2
  74. package/src/capabilities/react-surface.tsx +20 -26
  75. package/src/components/{StackContext.tsx → StackContext/StackContext.tsx} +3 -1
  76. package/src/components/StackContext/index.ts +5 -0
  77. package/src/components/{StackSection.tsx → StackSection/StackSection.tsx} +30 -26
  78. package/src/components/StackSection/index.ts +5 -0
  79. package/src/components/StackSettings/StackSettings.tsx +28 -0
  80. package/src/components/StackSettings/index.ts +5 -0
  81. package/src/components/index.ts +2 -4
  82. package/src/containers/StackArticle/StackArticle.tsx +169 -0
  83. package/src/containers/StackArticle/index.ts +5 -0
  84. package/src/containers/index.ts +7 -0
  85. package/src/index.ts +1 -1
  86. package/src/meta.ts +10 -6
  87. package/src/plugin.ts +9 -0
  88. package/src/translations.ts +23 -21
  89. package/src/types/index.ts +1 -1
  90. package/src/types/stack.ts +12 -8
  91. package/src/types/types.ts +4 -6
  92. package/dist/lib/browser/StackMain-6EC3A3IC.mjs +0 -298
  93. package/dist/lib/browser/StackMain-6EC3A3IC.mjs.map +0 -7
  94. package/dist/lib/browser/chunk-FVB7LGW7.mjs +0 -19
  95. package/dist/lib/browser/chunk-FVB7LGW7.mjs.map +0 -7
  96. package/dist/lib/browser/chunk-VDSBIEAC.mjs.map +0 -7
  97. package/dist/lib/browser/index.mjs +0 -100
  98. package/dist/lib/browser/index.mjs.map +0 -7
  99. package/dist/lib/browser/meta.json +0 -1
  100. package/dist/lib/browser/react-surface-KLOW5O2E.mjs +0 -46
  101. package/dist/lib/browser/react-surface-KLOW5O2E.mjs.map +0 -7
  102. package/dist/lib/node-esm/StackMain-G55P33OY.mjs +0 -299
  103. package/dist/lib/node-esm/StackMain-G55P33OY.mjs.map +0 -7
  104. package/dist/lib/node-esm/chunk-GOXSWCA4.mjs +0 -30
  105. package/dist/lib/node-esm/chunk-GOXSWCA4.mjs.map +0 -7
  106. package/dist/lib/node-esm/chunk-UN5PA7TK.mjs.map +0 -7
  107. package/dist/lib/node-esm/index.mjs +0 -101
  108. package/dist/lib/node-esm/index.mjs.map +0 -7
  109. package/dist/lib/node-esm/meta.json +0 -1
  110. package/dist/lib/node-esm/react-surface-H33L4IMD.mjs +0 -47
  111. package/dist/lib/node-esm/react-surface-H33L4IMD.mjs.map +0 -7
  112. package/dist/lib/node-esm/types/index.mjs +0 -10
  113. package/dist/types/src/components/CaretDownUp.d.ts.map +0 -1
  114. package/dist/types/src/components/StackContext.d.ts.map +0 -1
  115. package/dist/types/src/components/StackMain.d.ts +0 -9
  116. package/dist/types/src/components/StackMain.d.ts.map +0 -1
  117. package/dist/types/src/components/StackSection.d.ts.map +0 -1
  118. package/dist/types/src/components/StackSettings.d.ts.map +0 -1
  119. package/src/components/StackMain.tsx +0 -160
  120. package/src/components/StackSettings.tsx +0 -23
  121. /package/dist/lib/{browser/types → neutral}/index.mjs.map +0 -0
  122. /package/dist/lib/{node-esm/types/index.mjs.map → neutral/meta.mjs.map} +0 -0
  123. /package/src/components/{CaretDownUp.tsx → StackSection/CaretDownUp.tsx} +0 -0
package/LICENSE CHANGED
@@ -1,8 +1,105 @@
1
- MIT License
2
- Copyright (c) 2022 DXOS
1
+ # Functional Source License, Version 1.1, ALv2 Future License
3
2
 
4
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3
+ ## Abbreviation
5
4
 
6
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
5
+ FSL-1.1-Apache-2.0
7
6
 
8
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
7
+ ## Notice
8
+
9
+ Copyright 2026 DXOS
10
+
11
+ ## Terms and Conditions
12
+
13
+ ### Licensor ("We")
14
+
15
+ The party offering the Software under these Terms and Conditions.
16
+
17
+ ### The Software
18
+
19
+ The "Software" is each version of the software that we make available under
20
+ these Terms and Conditions, as indicated by our inclusion of these Terms and
21
+ Conditions with the Software.
22
+
23
+ ### License Grant
24
+
25
+ Subject to your compliance with this License Grant and the Patents,
26
+ Redistribution and Trademark clauses below, we hereby grant you the right to
27
+ use, copy, modify, create derivative works, publicly perform, publicly display
28
+ and redistribute the Software for any Permitted Purpose identified below.
29
+
30
+ ### Permitted Purpose
31
+
32
+ A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
33
+ means making the Software available to others in a commercial product or
34
+ service that:
35
+
36
+ 1. substitutes for the Software;
37
+
38
+ 2. substitutes for any other product or service we offer using the Software
39
+ that exists as of the date we make the Software available; or
40
+
41
+ 3. offers the same or substantially similar functionality as the Software.
42
+
43
+ Permitted Purposes specifically include using the Software:
44
+
45
+ 1. for your internal use and access;
46
+
47
+ 2. for non-commercial education;
48
+
49
+ 3. for non-commercial research; and
50
+
51
+ 4. in connection with professional services that you provide to a licensee
52
+ using the Software in accordance with these Terms and Conditions.
53
+
54
+ ### Patents
55
+
56
+ To the extent your use for a Permitted Purpose would necessarily infringe our
57
+ patents, the license grant above includes a license under our patents. If you
58
+ make a claim against any party that the Software infringes or contributes to
59
+ the infringement of any patent, then your patent license to the Software ends
60
+ immediately.
61
+
62
+ ### Redistribution
63
+
64
+ The Terms and Conditions apply to all copies, modifications and derivatives of
65
+ the Software.
66
+
67
+ If you redistribute any copies, modifications or derivatives of the Software,
68
+ you must include a copy of or a link to these Terms and Conditions and not
69
+ remove any copyright notices provided in or with the Software.
70
+
71
+ ### Disclaimer
72
+
73
+ THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
74
+ IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
75
+ PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
76
+
77
+ IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
78
+ SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
79
+ EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
80
+
81
+ ### Trademarks
82
+
83
+ Except for displaying the License Details and identifying us as the origin of
84
+ the Software, you have no right under these Terms and Conditions to use our
85
+ trademarks, trade names, service marks or product names.
86
+
87
+ ## Grant of Future License
88
+
89
+ We hereby irrevocably grant you an additional license to use the Software under
90
+ the Apache License, Version 2.0 that is effective on the second anniversary of
91
+ the date we make the Software available. On or after that date, you may use the
92
+ Software under the Apache License, Version 2.0, in which case the following
93
+ will apply:
94
+
95
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
96
+ this file except in compliance with the License.
97
+
98
+ You may obtain a copy of the License at
99
+
100
+ http://www.apache.org/licenses/LICENSE-2.0
101
+
102
+ Unless required by applicable law or agreed to in writing, software distributed
103
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
104
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
105
+ specific language governing permissions and limitations under the License.
package/README.md CHANGED
@@ -12,4 +12,4 @@ Surface plugin for Stack entities.
12
12
 
13
13
  Your ideas, issues, and code are most welcome. Please take a look at our [community code of conduct](https://github.com/dxos/dxos/blob/main/CODE_OF_CONDUCT.md), the [issue guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-issues), and the [PR contribution guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-prs).
14
14
 
15
- License: [MIT](./LICENSE) Copyright 2023 © DXOS
15
+ License: [FSL-1.1-Apache-2.0](./LICENSE) Copyright 2023 © DXOS
@@ -0,0 +1,126 @@
1
+ // src/containers/StackArticle/StackArticle.tsx
2
+ import { Atom, useAtomValue } from "@effect-atom/atom-react";
3
+ import * as Option from "effect/Option";
4
+ import React, { useCallback, useState } from "react";
5
+ import { useOperationInvoker } from "@dxos/app-framework/ui";
6
+ import { LayoutOperation } from "@dxos/app-toolkit";
7
+ import { useAppGraph } from "@dxos/app-toolkit/ui";
8
+ import { Annotation, Obj } from "@dxos/echo";
9
+ import { AtomObj } from "@dxos/echo-atom";
10
+ import { Graph } from "@dxos/plugin-graph";
11
+ import { SpaceOperation } from "@dxos/plugin-space";
12
+ import { Toolbar, toLocalizedString, useTranslation } from "@dxos/react-ui";
13
+ import { Stack, StackItem } from "@dxos/react-ui-stack";
14
+ import { isNonNullable } from "@dxos/util";
15
+ import { StackContext, StackSection } from "#components";
16
+ import { meta } from "#meta";
17
+ var collectionObjectsFamily = Atom.family((collection) => Atom.make((get) => {
18
+ const snapshot = get(AtomObj.make(collection));
19
+ return snapshot.objects.map((ref) => get(AtomObj.makeWithReactive(ref))).filter(isNonNullable);
20
+ }));
21
+ var StackArticle = ({ attendableId, subject: collection }) => {
22
+ const { invokePromise } = useOperationInvoker();
23
+ const { graph } = useAppGraph();
24
+ const { t } = useTranslation(meta.id);
25
+ const [collapsedSections, setCollapsedSections] = useState({});
26
+ const collectionObjects = useAtomValue(collectionObjectsFamily(collection));
27
+ const items = collectionObjects.map((object) => {
28
+ const schema = Obj.getSchema(object);
29
+ const iconAnnotation = schema ? Option.getOrUndefined(Annotation.IconAnnotation.get(schema)) : void 0;
30
+ const metadata = {
31
+ icon: iconAnnotation?.icon
32
+ };
33
+ const view = {
34
+ // ...stack.sections[object.id],
35
+ collapsed: collapsedSections[Obj.getDXN(object).toString()],
36
+ title: object?.title ?? // TODO(wittjosiah): `getNode` is not reactive.
37
+ toLocalizedString(Graph.getNode(graph, Obj.getDXN(object).toString()).pipe(Option.getOrNull)?.properties.label, t)
38
+ };
39
+ return {
40
+ id: Obj.getDXN(object).toString(),
41
+ object,
42
+ metadata,
43
+ view
44
+ };
45
+ });
46
+ const handleDelete = useCallback(async (id) => {
47
+ const index = collection.objects.map((object2) => object2.target).filter(isNonNullable).findIndex((section) => Obj.getDXN(section).toString() === id);
48
+ const object = collection.objects[index].target;
49
+ if (Obj.isObject(object)) {
50
+ await invokePromise(SpaceOperation.RemoveObjects, {
51
+ objects: [
52
+ object
53
+ ],
54
+ target: collection
55
+ });
56
+ }
57
+ }, [
58
+ collection,
59
+ invokePromise
60
+ ]);
61
+ const handleAdd = useCallback(async (id, position) => {
62
+ await invokePromise(LayoutOperation.UpdateDialog, {
63
+ subject: `${meta.id}.AddSectionDialog`,
64
+ blockAlign: "start",
65
+ props: {
66
+ path: id,
67
+ position,
68
+ collection
69
+ }
70
+ });
71
+ }, [
72
+ collection,
73
+ invokePromise
74
+ ]);
75
+ const handleNavigate = useCallback(async (id) => {
76
+ await invokePromise(LayoutOperation.Open, {
77
+ subject: [
78
+ id
79
+ ]
80
+ });
81
+ }, [
82
+ invokePromise
83
+ ]);
84
+ const handleCollapse = useCallback((id, collapsed) => setCollapsedSections((prev) => ({
85
+ ...prev,
86
+ [id]: collapsed
87
+ })), []);
88
+ const handleAddSection = useCallback(() => invokePromise(SpaceOperation.OpenCreateObject, {
89
+ target: collection,
90
+ navigable: false
91
+ }), [
92
+ collection,
93
+ invokePromise
94
+ ]);
95
+ return /* @__PURE__ */ React.createElement(StackItem.Content, {
96
+ toolbar: true,
97
+ classNames: "dx-document"
98
+ }, /* @__PURE__ */ React.createElement(Toolbar.Root, null, /* @__PURE__ */ React.createElement(Toolbar.IconButton, {
99
+ icon: "ph--plus--regular",
100
+ iconOnly: true,
101
+ label: "Add section",
102
+ "data-testid": "stack.addSection",
103
+ onClick: handleAddSection
104
+ })), /* @__PURE__ */ React.createElement(StackContext.Provider, {
105
+ value: {
106
+ attendableId,
107
+ onCollapse: handleCollapse,
108
+ onNavigate: handleNavigate,
109
+ onDelete: handleDelete,
110
+ onAdd: handleAdd
111
+ }
112
+ }, /* @__PURE__ */ React.createElement(Stack, {
113
+ orientation: "vertical",
114
+ size: "intrinsic",
115
+ id: Obj.getDXN(collection).toString(),
116
+ "data-testid": "main.stack",
117
+ classNames: "overflow-y-auto"
118
+ }, items.map((item) => /* @__PURE__ */ React.createElement(StackSection, {
119
+ key: item.id,
120
+ ...item
121
+ })))));
122
+ };
123
+ export {
124
+ StackArticle as default
125
+ };
126
+ //# sourceMappingURL=StackArticle-3FE52PUH.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/containers/StackArticle/StackArticle.tsx"],
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 { useOperationInvoker } from '@dxos/app-framework/ui';\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport { useAppGraph, type AppSurface } from '@dxos/app-toolkit/ui';\nimport { Annotation, type Collection, Obj, type Ref } from '@dxos/echo';\nimport { AtomObj } from '@dxos/echo-atom';\nimport { Graph } from '@dxos/plugin-graph';\nimport { SpaceOperation } from '@dxos/plugin-space';\nimport { Toolbar, toLocalizedString, useTranslation } from '@dxos/react-ui';\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 StackArticleProps = AppSurface.ObjectArticleProps<Collection.Collection>;\n\nexport const StackArticle = ({ attendableId, subject: collection }: StackArticleProps) => {\n const { invokePromise } = useOperationInvoker();\n const { graph } = useAppGraph();\n const { t } = useTranslation(meta.id);\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 schema = Obj.getSchema(object);\n const iconAnnotation = schema ? Option.getOrUndefined(Annotation.IconAnnotation.get(schema)) : undefined;\n const metadata: StackSectionMetadata = { icon: iconAnnotation?.icon };\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-document'>\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 <StackContext.Provider\n value={{\n attendableId,\n onCollapse: handleCollapse,\n onNavigate: handleNavigate,\n onDelete: handleDelete,\n onAdd: handleAdd,\n }}\n >\n <Stack\n orientation='vertical'\n size='intrinsic'\n id={Obj.getDXN(collection).toString()}\n data-testid='main.stack'\n classNames='overflow-y-auto'\n >\n {items.map((item) => (\n <StackSection key={item.id} {...item} />\n ))}\n </Stack>\n </StackContext.Provider>\n </StackItem.Content>\n );\n};\n"],
5
+ "mappings": ";AAIA,SAASA,MAAMC,oBAAoB;AACnC,YAAYC,YAAY;AACxB,OAAOC,SAASC,aAAaC,gBAAgB;AAE7C,SAASC,2BAA2B;AACpC,SAASC,uBAAuB;AAChC,SAASC,mBAAoC;AAC7C,SAASC,YAA6BC,WAAqB;AAC3D,SAASC,eAAe;AACxB,SAASC,aAAa;AACtB,SAASC,sBAAsB;AAC/B,SAASC,SAASC,mBAAmBC,sBAAsB;AAC3D,SAASC,OAAOC,iBAAiB;AACjC,SAASC,qBAAqB;AAE9B,SAASC,cAAcC,oBAAoB;AAC3C,SAASC,YAAY;AASrB,IAAMC,0BAA0BvB,KAAKwB,OAAO,CAACC,eAC3CzB,KAAK0B,KAAK,CAACC,QAAAA;AACT,QAAMC,WAAWD,IAAIhB,QAAQe,KAAKD,UAAAA,CAAAA;AAClC,SACEG,SAASC,QAENC,IAAI,CAACC,QAA8BJ,IAAIhB,QAAQqB,iBAAiBD,GAAAA,CAAAA,CAAAA,EAChEE,OAAOd,aAAAA;AAEd,CAAA,CAAA;AAKK,IAAMe,eAAe,CAAC,EAAEC,cAAcC,SAASX,WAAU,MAAqB;AACnF,QAAM,EAAEY,cAAa,IAAK/B,oBAAAA;AAC1B,QAAM,EAAEgC,MAAK,IAAK9B,YAAAA;AAClB,QAAM,EAAE+B,EAAC,IAAKvB,eAAeM,KAAKkB,EAAE;AACpC,QAAM,CAACC,mBAAmBC,oBAAAA,IAAwBrC,SAA4B,CAAC,CAAA;AAW/E,QAAMsC,oBAAoB1C,aAAasB,wBAAwBE,UAAAA,CAAAA;AAC/D,QAAMmB,QAAQD,kBAAkBb,IAAI,CAACe,WAAAA;AACnC,UAAMC,SAASpC,IAAIqC,UAAUF,MAAAA;AAC7B,UAAMG,iBAAiBF,SAAgBG,sBAAexC,WAAW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AC5D,GACA;IAACH;GAAc;AAGjB,QAAM0C,iBAAiB3E,YACrB,CAACoC,IAAYe,cAAuBb,qBAAqB,CAACsC,UAAU;IAAE,GAAGA;IAAM,CAACxC,EAAAA,GAAKe;EAAU,EAAA,GAC/F,CAAA,CAAE;AAGJ,QAAM0B,mBAAmB7E,YACvB,MACEiC,cAAcxB,eAAeqE,kBAAkB;IAC7ChB,QAAQzC;IACR0D,WAAW;EACb,CAAA,GACF;IAAC1D;IAAYY;GAAc;AAG7B,SACE,sBAAA,cAACnB,UAAUkE,SAAO;IAACC,SAAAA;IAAQC,YAAW;KACpC,sBAAA,cAACxE,QAAQyE,MAAI,MACX,sBAAA,cAACzE,QAAQ0E,YAAU;IACjBnC,MAAK;IACLoC,UAAAA;IACA1B,OAAM;IACN2B,eAAY;IACZC,SAASV;OAGb,sBAAA,cAAC7D,aAAawE,UAAQ;IACpBC,OAAO;MACL1D;MACA2D,YAAYf;MACZgB,YAAYlB;MACZmB,UAAUhC;MACViC,OAAO1B;IACT;KAEA,sBAAA,cAACtD,OAAAA;IACCiF,aAAY;IACZC,MAAK;IACL3D,IAAI9B,IAAI8C,OAAO/B,UAAAA,EAAYgC,SAAQ;IACnCiC,eAAY;IACZJ,YAAW;KAEV1C,MAAMd,IAAI,CAACsE,SACV,sBAAA,cAAC/E,cAAAA;IAAagF,KAAKD,KAAK5D;IAAK,GAAG4D;;AAM5C;",
6
+ "names": ["Atom", "useAtomValue", "Option", "React", "useCallback", "useState", "useOperationInvoker", "LayoutOperation", "useAppGraph", "Annotation", "Obj", "AtomObj", "Graph", "SpaceOperation", "Toolbar", "toLocalizedString", "useTranslation", "Stack", "StackItem", "isNonNullable", "StackContext", "StackSection", "meta", "collectionObjectsFamily", "family", "collection", "make", "get", "snapshot", "objects", "map", "ref", "makeWithReactive", "filter", "StackArticle", "attendableId", "subject", "invokePromise", "graph", "t", "id", "collapsedSections", "setCollapsedSections", "collectionObjects", "items", "object", "schema", "getSchema", "iconAnnotation", "getOrUndefined", "IconAnnotation", "undefined", "metadata", "icon", "view", "collapsed", "getDXN", "toString", "title", "getNode", "pipe", "getOrNull", "properties", "label", "handleDelete", "index", "target", "findIndex", "section", "isObject", "RemoveObjects", "handleAdd", "position", "UpdateDialog", "blockAlign", "props", "path", "handleNavigate", "Open", "handleCollapse", "prev", "handleAddSection", "OpenCreateObject", "navigable", "Content", "toolbar", "classNames", "Root", "IconButton", "iconOnly", "data-testid", "onClick", "Provider", "value", "onCollapse", "onNavigate", "onDelete", "onAdd", "orientation", "size", "item", "key"]
7
+ }
@@ -0,0 +1,22 @@
1
+ // src/StackPlugin.ts
2
+ import { Plugin } from "@dxos/app-framework";
3
+ import { AppPlugin } from "@dxos/app-toolkit";
4
+ import { ReactSurface } from "#capabilities";
5
+ import { meta } from "#meta";
6
+ import { translations } from "#translations";
7
+ import { StackViewType } from "#types";
8
+ var StackPlugin = Plugin.define(meta).pipe(AppPlugin.addSchemaModule({
9
+ schema: [
10
+ StackViewType
11
+ ]
12
+ }), AppPlugin.addSurfaceModule({
13
+ activate: ReactSurface
14
+ }), AppPlugin.addTranslationsModule({
15
+ translations
16
+ }), Plugin.make);
17
+ var StackPlugin_default = StackPlugin;
18
+ export {
19
+ StackPlugin,
20
+ StackPlugin_default as default
21
+ };
22
+ //# sourceMappingURL=StackPlugin.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/StackPlugin.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\n\nimport { ReactSurface } from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\nimport { StackViewType } from '#types';\n\nexport const StackPlugin = Plugin.define(meta).pipe(\n AppPlugin.addSchemaModule({ schema: [StackViewType] }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.make,\n);\n\nexport default StackPlugin;\n"],
5
+ "mappings": ";AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAE1B,SAASC,oBAAoB;AAC7B,SAASC,YAAY;AACrB,SAASC,oBAAoB;AAC7B,SAASC,qBAAqB;AAEvB,IAAMC,cAAcN,OAAOO,OAAOJ,IAAAA,EAAMK,KAC7CP,UAAUQ,gBAAgB;EAAEC,QAAQ;IAACL;;AAAe,CAAA,GACpDJ,UAAUU,iBAAiB;EAAEC,UAAUV;AAAa,CAAA,GACpDD,UAAUY,sBAAsB;EAAET;AAAa,CAAA,GAC/CJ,OAAOc,IAAI;AAGb,IAAA,sBAAeR;",
6
+ "names": ["Plugin", "AppPlugin", "ReactSurface", "meta", "translations", "StackViewType", "StackPlugin", "define", "pipe", "addSchemaModule", "schema", "addSurfaceModule", "activate", "addTranslationsModule", "make"]
7
+ }
@@ -0,0 +1,7 @@
1
+ // src/capabilities/index.ts
2
+ import { Capability } from "@dxos/app-framework";
3
+ var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-MD3CVY2N.mjs"));
4
+ export {
5
+ ReactSurface
6
+ };
7
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/capabilities/index.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\n"],
5
+ "mappings": ";AAIA,SAASA,kBAAkB;AAEpB,IAAMC,eAAeD,WAAWE,KAAK,gBAAgB,MAAM,OAAO,+BAAA,CAAA;",
6
+ "names": ["Capability", "ReactSurface", "lazy"]
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: "org.dxos.type.stackView",
20
+ version: "0.1.0"
21
+ }));
23
22
 
24
23
  export {
25
24
  SectionSchema,
26
25
  StackViewType
27
26
  };
28
- //# sourceMappingURL=chunk-VDSBIEAC.mjs.map
27
+ //# sourceMappingURL=chunk-IPU3C6TT.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: 'org.dxos.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,KACDd,KAAKe,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", "object", "typename", "version"]
7
+ }
@@ -1,21 +1,22 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
-
3
1
  // src/meta.ts
4
- var STACK_PLUGIN = "dxos.org/plugin/stack";
5
- var SECTION_IDENTIFIER = "dxos.org/type/StackSection";
2
+ import { trim } from "@dxos/util";
3
+ var SECTION_IDENTIFIER = "org.dxos.type.stackSection";
6
4
  var meta = {
7
- id: STACK_PLUGIN,
5
+ id: "org.dxos.plugin.stack",
8
6
  // TODO(wittjosiah): Prevents "stacks" language from being exposed to users in settings panel.
9
7
  // Conside renaming this to the collection plugin and trying to factor more collections logic from the space plugin.
10
8
  name: "Collections",
11
- description: "View collections of objects within the deck.",
9
+ author: "DXOS",
10
+ description: trim`
11
+ Organize and view curated collections of workspace objects in customizable layouts.
12
+ Group related items together and manage collections with sections and filtering.
13
+ `,
12
14
  icon: "ph--stack-simple--regular",
13
15
  source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-stack"
14
16
  };
15
17
 
16
18
  export {
17
- STACK_PLUGIN,
18
19
  SECTION_IDENTIFIER,
19
20
  meta
20
21
  };
21
- //# sourceMappingURL=chunk-UN5PA7TK.mjs.map
22
+ //# sourceMappingURL=chunk-LAZU5N5N.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 = 'org.dxos.type.stackSection';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.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 author: 'DXOS',\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,QAAQ;EACRC,aAAaN;;;;EAIbO,MAAM;EACNC,QAAQ;AACV;",
6
+ "names": ["trim", "SECTION_IDENTIFIER", "meta", "id", "name", "author", "description", "icon", "source"]
7
+ }
@@ -0,0 +1,182 @@
1
+ // src/components/StackContext/StackContext.tsx
2
+ import { createContext, useContext } from "react";
3
+ var StackContext = /* @__PURE__ */ createContext({
4
+ attendableId: "",
5
+ onCollapse: () => {
6
+ },
7
+ onNavigate: async () => {
8
+ },
9
+ onDelete: async () => {
10
+ },
11
+ onAdd: () => {
12
+ }
13
+ });
14
+ var useStack = () => useContext(StackContext);
15
+
16
+ // src/components/StackSection/StackSection.tsx
17
+ import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
18
+ import React2, { useMemo, useState } from "react";
19
+ import { Surface } from "@dxos/app-framework/ui";
20
+ import { AppSurface } from "@dxos/app-toolkit/ui";
21
+ import { DropdownMenu, Icon, IconButton, useTranslation } from "@dxos/react-ui";
22
+ import { useAttentionAttributes } from "@dxos/react-ui-attention";
23
+ import { StackItem } from "@dxos/react-ui-stack";
24
+ import { getSize, mx } from "@dxos/ui-theme";
25
+ import { meta } from "#meta";
26
+
27
+ // src/components/StackSection/CaretDownUp.tsx
28
+ import React from "react";
29
+ var CaretDownUp = ({ children, ...props }) => {
30
+ return /* @__PURE__ */ React.createElement("svg", {
31
+ xmlns: "http://www.w3.org/2000/svg",
32
+ viewBox: "0 0 256 256",
33
+ ...props
34
+ }, /* @__PURE__ */ React.createElement("rect", {
35
+ width: "256",
36
+ height: "256",
37
+ fill: "none"
38
+ }), /* @__PURE__ */ React.createElement("polyline", {
39
+ points: "80 224 128 176 176 224",
40
+ fill: "none",
41
+ stroke: "currentColor",
42
+ strokeLinecap: "round",
43
+ strokeLinejoin: "round",
44
+ strokeWidth: "16"
45
+ }), /* @__PURE__ */ React.createElement("polyline", {
46
+ points: "80 32 128 80 176 32",
47
+ fill: "none",
48
+ stroke: "currentColor",
49
+ strokeLinecap: "round",
50
+ strokeLinejoin: "round",
51
+ strokeWidth: "16"
52
+ }), children);
53
+ };
54
+
55
+ // src/components/StackSection/StackSection.tsx
56
+ var sectionActionDimensions = "p-1 my-1 shrink-0 min-h-0 w-(--dx-rail-action) h-min";
57
+ var StackSection = ({ id, view, object, metadata: { icon = "ph--placeholder--regular" } }) => {
58
+ const { t } = useTranslation(meta.id);
59
+ const { attendableId: parentAttendableId, onNavigate, onAdd, onCollapse, onDelete } = useStack();
60
+ const [optionsMenuOpen, setOptionsMenuOpen] = useState(false);
61
+ const attendableId = `${parentAttendableId}/${object.id}`;
62
+ const attentionAttrs = useAttentionAttributes(attendableId);
63
+ const stackItem = useMemo(() => ({
64
+ id
65
+ }), [
66
+ id
67
+ ]);
68
+ const data = useMemo(() => ({
69
+ attendableId,
70
+ subject: object
71
+ }), [
72
+ object,
73
+ attendableId
74
+ ]);
75
+ return /* @__PURE__ */ React2.createElement(CollapsiblePrimitive.Root, {
76
+ asChild: true,
77
+ open: !view.collapsed,
78
+ onOpenChange: (nextOpen) => onCollapse?.(id, !nextOpen)
79
+ }, /* @__PURE__ */ React2.createElement(StackItem.Root, {
80
+ item: stackItem,
81
+ role: "section",
82
+ ...attentionAttrs
83
+ }, /* @__PURE__ */ React2.createElement(StackItem.Heading, {
84
+ classNames: "dx-attention-surface"
85
+ }, /* @__PURE__ */ React2.createElement("span", {
86
+ className: "sr-only"
87
+ }, view.title), /* @__PURE__ */ React2.createElement(StackItem.HeadingStickyContent, null, /* @__PURE__ */ React2.createElement(DropdownMenu.Root, {
88
+ open: optionsMenuOpen,
89
+ onOpenChange: setOptionsMenuOpen
90
+ }, /* @__PURE__ */ React2.createElement(DropdownMenu.Trigger, {
91
+ asChild: true
92
+ }, /* @__PURE__ */ React2.createElement(StackItem.SigilButton, null, /* @__PURE__ */ React2.createElement(Icon, {
93
+ icon,
94
+ classNames: "transition-opacity"
95
+ }))), /* @__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, {
96
+ onClick: () => onNavigate(id),
97
+ "data-testid": "section.navigate-to"
98
+ }, /* @__PURE__ */ React2.createElement(Icon, {
99
+ icon: "ph--arrow-right--regular"
100
+ }), /* @__PURE__ */ React2.createElement("span", {
101
+ className: "ms-2 grow"
102
+ }, t("navigate-to-section.label"))) : /* @__PURE__ */ React2.createElement(CollapsiblePrimitive.Trigger, {
103
+ asChild: true
104
+ }, /* @__PURE__ */ React2.createElement(DropdownMenu.Item, null, /* @__PURE__ */ React2.createElement(CaretDownUp, {
105
+ className: getSize(5)
106
+ }), /* @__PURE__ */ React2.createElement("span", {
107
+ className: "ms-2 grow"
108
+ }, t("collapse.label")))), /* @__PURE__ */ React2.createElement(DropdownMenu.Item, {
109
+ onClick: () => onAdd(id, "before"),
110
+ "data-testid": "section.add-before"
111
+ }, /* @__PURE__ */ React2.createElement(Icon, {
112
+ icon: "ph--arrow-line-up--regular"
113
+ }), /* @__PURE__ */ React2.createElement("span", {
114
+ className: "ms-2 grow"
115
+ }, t("add-section-before.label"))), /* @__PURE__ */ React2.createElement(DropdownMenu.Item, {
116
+ onClick: () => onAdd(id, "after"),
117
+ "data-testid": "section.add-after"
118
+ }, /* @__PURE__ */ React2.createElement(Icon, {
119
+ icon: "ph--arrow-line-down--regular"
120
+ }), /* @__PURE__ */ React2.createElement("span", {
121
+ className: "ms-2 grow"
122
+ }, t("add-section-after.label"))), /* @__PURE__ */ React2.createElement(DropdownMenu.Item, {
123
+ onClick: () => onDelete(id),
124
+ "data-testid": "section.remove"
125
+ }, /* @__PURE__ */ React2.createElement(Icon, {
126
+ icon: "ph--trash--regular"
127
+ }), /* @__PURE__ */ React2.createElement("span", {
128
+ className: "ms-2 grow"
129
+ }, t("remove-section.label")))), /* @__PURE__ */ React2.createElement(DropdownMenu.Arrow, null)))), view.collapsed ? /* @__PURE__ */ React2.createElement(CollapsiblePrimitive.Trigger, {
130
+ asChild: true
131
+ }, /* @__PURE__ */ React2.createElement(IconButton, {
132
+ iconOnly: true,
133
+ variant: "ghost",
134
+ label: t("expand.label"),
135
+ icon: "ph--caret-up-down--regular",
136
+ classNames: sectionActionDimensions
137
+ })) : /* @__PURE__ */ React2.createElement(IconButton, {
138
+ iconOnly: true,
139
+ variant: "ghost",
140
+ onClick: () => onNavigate(id),
141
+ label: t("navigate-to-section.label"),
142
+ icon: "ph--arrow-right--regular",
143
+ "data-testid": "section.navigate-to",
144
+ classNames: sectionActionDimensions
145
+ }))), /* @__PURE__ */ React2.createElement(CollapsiblePrimitive.Content, null, /* @__PURE__ */ React2.createElement(Surface.Surface, {
146
+ type: AppSurface.Section,
147
+ data,
148
+ limit: 1,
149
+ placeholder: /* @__PURE__ */ React2.createElement(React2.Fragment, null)
150
+ })), view.collapsed && /* @__PURE__ */ React2.createElement(StackItem.Content, {
151
+ classNames: "dx-attention-surface"
152
+ }, /* @__PURE__ */ React2.createElement("h2", {
153
+ className: mx("flex items-center p-4 font-medium")
154
+ }, view.title))));
155
+ };
156
+
157
+ // src/components/StackSettings/StackSettings.tsx
158
+ import React3 from "react";
159
+ import { Input, useTranslation as useTranslation2 } from "@dxos/react-ui";
160
+ import { Settings as SettingsForm } from "@dxos/react-ui-form";
161
+ import { meta as meta2 } from "#meta";
162
+ var StackSettings = ({ settings }) => {
163
+ const { t } = useTranslation2(meta2.id);
164
+ return /* @__PURE__ */ React3.createElement(SettingsForm.Viewport, null, /* @__PURE__ */ React3.createElement(SettingsForm.Section, {
165
+ title: t("settings.title", {
166
+ ns: meta2.id
167
+ })
168
+ }, /* @__PURE__ */ React3.createElement(SettingsForm.Item, {
169
+ title: t("settings.separation.label"),
170
+ description: t("settings.separation.description")
171
+ }, /* @__PURE__ */ React3.createElement(Input.Switch, {
172
+ checked: settings.separation,
173
+ onCheckedChange: (checked) => settings.separation = !!checked
174
+ }))));
175
+ };
176
+ export {
177
+ StackContext,
178
+ StackSection,
179
+ StackSettings,
180
+ useStack
181
+ };
182
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/components/StackContext/StackContext.tsx", "../../../../src/components/StackSection/StackSection.tsx", "../../../../src/components/StackSection/CaretDownUp.tsx", "../../../../src/components/StackSettings/StackSettings.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { createContext, useContext } from 'react';\n\nimport { type AddSectionPosition } from '#types';\n\nexport type StackContextValue = {\n attendableId: string;\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 attendableId: '',\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 { AppSurface } from '@dxos/app-toolkit/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 } from '@dxos/ui-theme';\n\nimport { meta } from '#meta';\nimport { type StackSectionItem } from '#types';\n\nimport { useStack } from '../StackContext';\nimport { CaretDownUp } from './CaretDownUp';\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 { attendableId: parentAttendableId, onNavigate, onAdd, onCollapse, onDelete } = useStack();\n const [optionsMenuOpen, setOptionsMenuOpen] = useState(false);\n const attendableId = `${parentAttendableId}/${object.id}`;\n const attentionAttrs = useAttentionAttributes(attendableId);\n const stackItem = useMemo(() => ({ id }), [id]);\n const data = useMemo(() => ({ attendableId, subject: object }), [object, attendableId]);\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} 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' />\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' />\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' />\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' />\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 type={AppSurface.Section} data={data} 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')}>{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 as SettingsForm } 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 <SettingsForm.Viewport>\n <SettingsForm.Section title={t('settings.title', { ns: meta.id })}>\n <SettingsForm.Item title={t('settings.separation.label')} description={t('settings.separation.description')}>\n <Input.Switch\n checked={settings.separation}\n onCheckedChange={(checked) => (settings.separation = !!checked)}\n />\n </SettingsForm.Item>\n </SettingsForm.Section>\n </SettingsForm.Viewport>\n );\n};\n"],
5
+ "mappings": ";AAIA,SAASA,eAAeC,kBAAkB;AAYnC,IAAMC,eAAeF,8BAAiC;EAC3DG,cAAc;EACdC,YAAY,MAAA;EAAO;EACnBC,YAAY,YAAA;EAAa;EACzBC,UAAU,YAAA;EAAa;EACvBC,OAAO,MAAA;EAAO;AAChB,CAAA;AAEO,IAAMC,WAAW,MAAMP,WAAWC,YAAAA;;;ACpBzC,YAAYO,0BAA0B;AACtC,OAAOC,UAASC,SAASC,gBAAgB;AAE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,KAAK2B,aACJ,gBAAAJ,OAAA,cAACO,UAAUc,SAAO;IAACV,YAAW;KAC5B,gBAAAX,OAAA,cAACuC,MAAAA;IAAG1B,WAAW2B,GAAG,mCAAA;KAAuC/D,KAAKqC,KAAK,CAAA,CAAA,CAAA;AAM/E;;;AEtHA,OAAO2B,YAAW;AAElB,SAASC,OAAOC,kBAAAA,uBAAsB;AACtC,SAASC,YAAYC,oBAAoB;AAEzC,SAASC,QAAAA,aAAY;AAGd,IAAMC,gBAAgB,CAAC,EAAEC,SAAQ,MAAoC;AAC1E,QAAM,EAAEC,EAAC,IAAKN,gBAAeG,MAAKI,EAAE;AAEpC,SACE,gBAAAT,OAAA,cAACI,aAAaM,UAAQ,MACpB,gBAAAV,OAAA,cAACI,aAAaO,SAAO;IAACC,OAAOJ,EAAE,kBAAkB;MAAEK,IAAIR,MAAKI;IAAG,CAAA;KAC7D,gBAAAT,OAAA,cAACI,aAAaU,MAAI;IAACF,OAAOJ,EAAE,2BAAA;IAA8BO,aAAaP,EAAE,iCAAA;KACvE,gBAAAR,OAAA,cAACC,MAAMe,QAAM;IACXC,SAASV,SAASW;IAClBC,iBAAiB,CAACF,YAAaV,SAASW,aAAa,CAAC,CAACD;;AAMnE;",
6
+ "names": ["createContext", "useContext", "StackContext", "attendableId", "onCollapse", "onNavigate", "onDelete", "onAdd", "useStack", "CollapsiblePrimitive", "React", "useMemo", "useState", "Surface", "AppSurface", "DropdownMenu", "Icon", "IconButton", "useTranslation", "useAttentionAttributes", "StackItem", "getSize", "mx", "meta", "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", "attendableId", "parentAttendableId", "onNavigate", "onAdd", "onCollapse", "onDelete", "useStack", "optionsMenuOpen", "setOptionsMenuOpen", "useState", "attentionAttrs", "useAttentionAttributes", "stackItem", "useMemo", "data", "subject", "React", "Root", "asChild", "open", "collapsed", "onOpenChange", "nextOpen", "StackItem", "item", "role", "Heading", "classNames", "span", "className", "title", "HeadingStickyContent", "DropdownMenu", "Trigger", "SigilButton", "Icon", "Portal", "Content", "Viewport", "Item", "onClick", "data-testid", "CaretDownUp", "getSize", "Arrow", "IconButton", "iconOnly", "variant", "label", "Surface", "type", "AppSurface", "Section", "limit", "placeholder", "h2", "mx", "React", "Input", "useTranslation", "Settings", "SettingsForm", "meta", "StackSettings", "settings", "t", "id", "Viewport", "Section", "title", "ns", "Item", "description", "Switch", "checked", "separation", "onCheckedChange"]
7
+ }