@dxos/plugin-stack 0.8.4-main.ead640a → 0.8.4-main.effb148878
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +102 -5
- package/README.md +1 -1
- package/dist/lib/neutral/StackArticle-TCMVWM2C.mjs +126 -0
- package/dist/lib/neutral/StackArticle-TCMVWM2C.mjs.map +7 -0
- package/dist/lib/neutral/StackPlugin.mjs +22 -0
- package/dist/lib/neutral/StackPlugin.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +7 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-DSGNXCFU.mjs +34 -0
- package/dist/lib/neutral/chunk-DSGNXCFU.mjs.map +7 -0
- package/dist/lib/{browser/chunk-NHMDZYOB.mjs → neutral/chunk-T4NSFSPH.mjs} +6 -10
- package/dist/lib/neutral/chunk-T4NSFSPH.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +182 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +7 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +15 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +9 -0
- package/dist/lib/neutral/plugin.mjs +11 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-MD3CVY2N.mjs +23 -0
- package/dist/lib/neutral/react-surface-MD3CVY2N.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +37 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/{browser → neutral}/types/index.mjs +1 -1
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/types/src/StackPlugin.d.ts +3 -1
- package/dist/types/src/StackPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +2 -1
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +3 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/{StackContext.d.ts → StackContext/StackContext.d.ts} +2 -1
- package/dist/types/src/components/StackContext/StackContext.d.ts.map +1 -0
- package/dist/types/src/components/StackContext/index.d.ts +2 -0
- package/dist/types/src/components/StackContext/index.d.ts.map +1 -0
- package/dist/types/src/components/{CaretDownUp.d.ts → StackSection/CaretDownUp.d.ts} +1 -1
- package/dist/types/src/components/StackSection/CaretDownUp.d.ts.map +1 -0
- package/dist/types/src/components/{StackSection.d.ts → StackSection/StackSection.d.ts} +1 -1
- package/dist/types/src/components/StackSection/StackSection.d.ts.map +1 -0
- package/dist/types/src/components/StackSection/index.d.ts +2 -0
- package/dist/types/src/components/StackSection/index.d.ts.map +1 -0
- package/dist/types/src/components/{StackSettings.d.ts → StackSettings/StackSettings.d.ts} +1 -1
- package/dist/types/src/components/StackSettings/StackSettings.d.ts.map +1 -0
- package/dist/types/src/components/StackSettings/index.d.ts +2 -0
- package/dist/types/src/components/StackSettings/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +2 -7
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/StackArticle/StackArticle.d.ts +7 -0
- package/dist/types/src/containers/StackArticle/StackArticle.d.ts.map +1 -0
- package/dist/types/src/containers/StackArticle/index.d.ts +2 -0
- package/dist/types/src/containers/StackArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +3 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +3 -3
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/plugin.d.ts +3 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +31 -31
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/stack.d.ts +12 -14
- package/dist/types/src/types/stack.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +3 -4
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +91 -50
- package/src/StackPlugin.ts +14 -45
- package/src/capabilities/index.ts +2 -2
- package/src/capabilities/react-surface.tsx +20 -22
- package/src/components/{StackContext.tsx → StackContext/StackContext.tsx} +3 -1
- package/src/components/StackContext/index.ts +5 -0
- package/src/components/{StackSection.tsx → StackSection/StackSection.tsx} +28 -25
- package/src/components/StackSection/index.ts +5 -0
- package/src/components/StackSettings/StackSettings.tsx +28 -0
- package/src/components/StackSettings/index.ts +5 -0
- package/src/components/index.ts +2 -4
- package/src/containers/StackArticle/StackArticle.tsx +168 -0
- package/src/containers/StackArticle/index.ts +5 -0
- package/src/containers/index.ts +7 -0
- package/src/index.ts +1 -1
- package/src/meta.ts +22 -5
- package/src/plugin.ts +9 -0
- package/src/translations.ts +23 -22
- package/src/types/stack.ts +6 -7
- package/src/types/types.ts +3 -4
- package/dist/lib/browser/StackContainer-RFJDTQBT.mjs +0 -297
- package/dist/lib/browser/StackContainer-RFJDTQBT.mjs.map +0 -7
- package/dist/lib/browser/chunk-MS4QSWEZ.mjs +0 -17
- package/dist/lib/browser/chunk-MS4QSWEZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-NHMDZYOB.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -99
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/react-surface-DGGN5OPM.mjs +0 -40
- package/dist/lib/browser/react-surface-DGGN5OPM.mjs.map +0 -7
- package/dist/lib/node-esm/StackContainer-HL6KYBW2.mjs +0 -298
- package/dist/lib/node-esm/StackContainer-HL6KYBW2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-5FDDKAPB.mjs +0 -19
- package/dist/lib/node-esm/chunk-5FDDKAPB.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ZZFA7HIV.mjs +0 -30
- package/dist/lib/node-esm/chunk-ZZFA7HIV.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -100
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/react-surface-TEOPQTLH.mjs +0 -41
- package/dist/lib/node-esm/react-surface-TEOPQTLH.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -10
- package/dist/types/src/components/CaretDownUp.d.ts.map +0 -1
- package/dist/types/src/components/StackContainer.d.ts +0 -9
- package/dist/types/src/components/StackContainer.d.ts.map +0 -1
- package/dist/types/src/components/StackContext.d.ts.map +0 -1
- package/dist/types/src/components/StackSection.d.ts.map +0 -1
- package/dist/types/src/components/StackSettings.d.ts.map +0 -1
- package/src/components/StackContainer.tsx +0 -161
- package/src/components/StackSettings.tsx +0 -30
- /package/dist/lib/{browser/types → neutral}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/types/index.mjs.map → neutral/meta.mjs.map} +0 -0
- /package/src/components/{CaretDownUp.tsx → StackSection/CaretDownUp.tsx} +0 -0
package/LICENSE
CHANGED
|
@@ -1,8 +1,105 @@
|
|
|
1
|
-
|
|
2
|
-
Copyright (c) 2022 DXOS
|
|
1
|
+
# Functional Source License, Version 1.1, ALv2 Future License
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
## Abbreviation
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
FSL-1.1-Apache-2.0
|
|
7
6
|
|
|
8
|
-
|
|
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: [
|
|
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, Type } 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 type = Obj.getType(object);
|
|
29
|
+
const iconAnnotation = type ? Option.getOrUndefined(Annotation.IconAnnotation.get(Type.getSchema(type))) : void 0;
|
|
30
|
+
const metadata = {
|
|
31
|
+
icon: iconAnnotation?.icon
|
|
32
|
+
};
|
|
33
|
+
const view = {
|
|
34
|
+
// ...stack.sections[object.id],
|
|
35
|
+
collapsed: collapsedSections[Obj.getURI(object)],
|
|
36
|
+
title: object?.title ?? // TODO(wittjosiah): `getNode` is not reactive.
|
|
37
|
+
toLocalizedString(Graph.getNode(graph, Obj.getURI(object)).pipe(Option.getOrNull)?.properties.label, t)
|
|
38
|
+
};
|
|
39
|
+
return {
|
|
40
|
+
id: Obj.getURI(object),
|
|
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.getURI(section) === 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.getURI(collection),
|
|
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-TCMVWM2C.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, Type } 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 type = Obj.getType(object);\n const iconAnnotation = type\n ? Option.getOrUndefined(Annotation.IconAnnotation.get(Type.getSchema(type)))\n : undefined;\n const metadata: StackSectionMetadata = { icon: iconAnnotation?.icon };\n const view = {\n // ...stack.sections[object.id],\n collapsed: collapsedSections[Obj.getURI(object)],\n title:\n (object as any)?.title ??\n // TODO(wittjosiah): `getNode` is not reactive.\n toLocalizedString(Graph.getNode(graph, Obj.getURI(object)).pipe(Option.getOrNull)?.properties.label, t),\n } as StackSectionView;\n return { id: Obj.getURI(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) => Obj.getURI(section) === 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.getURI(collection)}\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,KAAeC,YAAY;AACjE,SAASC,eAAe;AACxB,SAASC,aAAa;AACtB,SAASC,sBAAsB;AAC/B,SAASC,SAASC,mBAAmBC,sBAAsB;AAC3D,SAASC,OAAOC,iBAAiB;AACjC,SAASC,qBAAqB;AAE9B,SAASC,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N2B,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,IAAI/B,IAAIgD,OAAOhC,UAAAA;IACfiE,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", "Type", "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", "type", "getType", "iconAnnotation", "getOrUndefined", "IconAnnotation", "getSchema", "undefined", "metadata", "icon", "view", "collapsed", "getURI", "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
|
+
{
|
|
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
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// src/meta.ts
|
|
2
|
+
import { trim } from "@dxos/util";
|
|
3
|
+
var SECTION_IDENTIFIER = "org.dxos.type.stackSection";
|
|
4
|
+
var meta = {
|
|
5
|
+
id: "org.dxos.plugin.stack",
|
|
6
|
+
// TODO(wittjosiah): Prevents "stacks" language from being exposed to users in settings panel.
|
|
7
|
+
// Conside renaming this to the collection plugin and trying to factor more collections logic from the space plugin.
|
|
8
|
+
name: "Collections",
|
|
9
|
+
author: "DXOS",
|
|
10
|
+
spec: "PLUGIN.mdl",
|
|
11
|
+
description: trim`
|
|
12
|
+
StackPlugin renders any Collection object as a vertically scrollable stack of collapsible sections in the
|
|
13
|
+
Composer article surface. Each section wraps an arbitrary ECHO object and delegates its content rendering
|
|
14
|
+
to the section surface role, enabling any other plugin to contribute its own section renderer.
|
|
15
|
+
|
|
16
|
+
Sections can be individually collapsed to show only their title, expanded to reveal full content, navigated
|
|
17
|
+
to directly, or removed from the collection. New sections can be inserted before or after any existing
|
|
18
|
+
section via a per-section dropdown menu, or appended via the toolbar Add button.
|
|
19
|
+
|
|
20
|
+
The plugin registers StackViewType with the ECHO schema module so that per-section view metadata
|
|
21
|
+
(height overrides, custom display data) can be stored and replicated alongside the collection.
|
|
22
|
+
|
|
23
|
+
A settings panel exposes a separation toggle that controls whether visual dividers are rendered between
|
|
24
|
+
sections.
|
|
25
|
+
`,
|
|
26
|
+
icon: "ph--stack-simple--regular",
|
|
27
|
+
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-stack"
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export {
|
|
31
|
+
SECTION_IDENTIFIER,
|
|
32
|
+
meta
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=chunk-DSGNXCFU.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 spec: 'PLUGIN.mdl',\n description: trim`\n StackPlugin renders any Collection object as a vertically scrollable stack of collapsible sections in the\n Composer article surface. Each section wraps an arbitrary ECHO object and delegates its content rendering\n to the section surface role, enabling any other plugin to contribute its own section renderer.\n\n Sections can be individually collapsed to show only their title, expanded to reveal full content, navigated\n to directly, or removed from the collection. New sections can be inserted before or after any existing\n section via a per-section dropdown menu, or appended via the toolbar Add button.\n\n The plugin registers StackViewType with the ECHO schema module so that per-section view metadata\n (height overrides, custom display data) can be stored and replicated alongside the collection.\n\n A settings panel exposes a separation toggle that controls whether visual dividers are rendered between\n sections.\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,MAAM;EACNC,aAAaP;;;;;;;;;;;;;;;EAebQ,MAAM;EACNC,QAAQ;AACV;",
|
|
6
|
+
"names": ["trim", "SECTION_IDENTIFIER", "meta", "id", "name", "author", "spec", "description", "icon", "source"]
|
|
7
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/types/stack.ts
|
|
2
2
|
import * as Schema from "effect/Schema";
|
|
3
|
-
import {
|
|
3
|
+
import { DXN, 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,15 @@ var SectionSchema = Schema.Struct({
|
|
|
10
10
|
value: Schema.Any
|
|
11
11
|
}))
|
|
12
12
|
});
|
|
13
|
-
var StackViewType =
|
|
14
|
-
|
|
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.makeObject(DXN.make("org.dxos.type.stackView", "0.1.0")));
|
|
23
19
|
|
|
24
20
|
export {
|
|
25
21
|
SectionSchema,
|
|
26
22
|
StackViewType
|
|
27
23
|
};
|
|
28
|
-
//# sourceMappingURL=chunk-
|
|
24
|
+
//# sourceMappingURL=chunk-T4NSFSPH.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 { DXN, 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(Type.makeObject(DXN.make('org.dxos.type.stackView', '0.1.0')));\n\nexport type StackViewType = Type.InstanceType<typeof StackViewType>;\n"],
|
|
5
|
+
"mappings": ";AAIA,YAAYA,YAAY;AAExB,SAASC,KAAKC,YAAY;AAOnB,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,KAAKd,KAAKe,WAAWhB,IAAIiB,KAAK,2BAA2B,OAAA,CAAA,CAAA;",
|
|
6
|
+
"names": ["Schema", "DXN", "Type", "SectionSchema", "Struct", "height", "optional", "Number", "custom", "Record", "key", "String", "value", "Any", "StackViewType", "sections", "pipe", "makeObject", "make"]
|
|
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--circle-dashed--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--circle-dashed--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;AAEzC,SAASC,eAAe;AACxB,SAASC,kBAAkB;AAC3B,SAASC,cAAcC,MAAMC,YAAYC,sBAAsB;AAC/D,SAASC,8BAA8B;AACvC,SAASC,iBAAiB;AAC1B,SAASC,SAASC,UAAU;AAE5B,SAASC,YAAY;;;ACVrB,OAAOC,WAA8C;AAE9C,IAAMC,cAAc,CAAC,EAAEC,UAAU,GAAGC,MAAAA,MAAwC;AACjF,SACE,sBAAA,cAACC,OAAAA;IAAIC,OAAM;IAA6BC,SAAQ;IAAe,GAAGH;KAChE,sBAAA,cAACI,QAAAA;IAAKC,OAAM;IAAMC,QAAO;IAAMC,MAAK;MACpC,sBAAA,cAACC,YAAAA;IACCC,QAAO;IACPF,MAAK;IACLG,QAAO;IACPC,eAAc;IACdC,gBAAe;IACfC,aAAY;MAEd,sBAAA,cAACL,YAAAA;IACCC,QAAO;IACPF,M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AG,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
|
+
}
|