@dxos/plugin-stack 0.7.4 → 0.7.5-labs.5f04cf6
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/dist/lib/browser/StackMain-VH3YESQL.mjs +295 -0
- package/dist/lib/browser/StackMain-VH3YESQL.mjs.map +7 -0
- package/dist/lib/browser/{chunk-DS5KGEJG.mjs → chunk-WTGFKPPQ.mjs} +3 -3
- package/dist/lib/browser/chunk-WTGFKPPQ.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +78 -235
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/StackMain-USQVAFKL.cjs +309 -0
- package/dist/lib/node/StackMain-USQVAFKL.cjs.map +7 -0
- package/dist/lib/node/{chunk-PA5PRDM6.cjs → chunk-CZCFFT2J.cjs} +7 -7
- package/dist/lib/node/chunk-CZCFFT2J.cjs.map +7 -0
- package/dist/lib/node/index.cjs +80 -231
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node-esm/StackMain-DW27O56R.mjs +296 -0
- package/dist/lib/node-esm/StackMain-DW27O56R.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-JEQMG2E2.mjs → chunk-SJU6TPRI.mjs} +3 -3
- package/dist/lib/node-esm/chunk-SJU6TPRI.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +78 -235
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/StackPlugin.d.ts +1 -3
- package/dist/types/src/StackPlugin.d.ts.map +1 -1
- package/dist/types/src/components/StackMain.d.ts.map +1 -1
- package/dist/types/src/components/StackSection.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +1 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/types/stack.d.ts +6 -12
- package/dist/types/src/types/stack.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +2 -17
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/package.json +22 -31
- package/src/StackPlugin.tsx +61 -73
- package/src/components/StackMain.tsx +66 -76
- package/src/components/StackSection.tsx +2 -4
- package/src/components/index.ts +0 -1
- package/src/index.ts +1 -6
- package/src/meta.ts +1 -1
- package/src/types/types.ts +2 -31
- package/dist/lib/browser/StackMain-4D4J4IRK.mjs +0 -391
- package/dist/lib/browser/StackMain-4D4J4IRK.mjs.map +0 -7
- package/dist/lib/browser/chunk-DS5KGEJG.mjs.map +0 -7
- package/dist/lib/browser/meta.mjs +0 -11
- package/dist/lib/browser/meta.mjs.map +0 -7
- package/dist/lib/node/StackMain-V7C55NCF.cjs +0 -403
- package/dist/lib/node/StackMain-V7C55NCF.cjs.map +0 -7
- package/dist/lib/node/chunk-PA5PRDM6.cjs.map +0 -7
- package/dist/lib/node/meta.cjs +0 -32
- package/dist/lib/node/meta.cjs.map +0 -7
- package/dist/lib/node-esm/StackMain-5I43UWGF.mjs +0 -392
- package/dist/lib/node-esm/StackMain-5I43UWGF.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JEQMG2E2.mjs.map +0 -7
- package/dist/lib/node-esm/meta.mjs +0 -12
- package/dist/lib/node-esm/meta.mjs.map +0 -7
- package/dist/types/src/components/AddSection.d.ts +0 -6
- package/dist/types/src/components/AddSection.d.ts.map +0 -1
- package/dist/types/src/components/AddSectionDialog.d.ts +0 -14
- package/dist/types/src/components/AddSectionDialog.d.ts.map +0 -1
- package/src/components/AddSection.tsx +0 -102
- package/src/components/AddSectionDialog.tsx +0 -128
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SECTION_IDENTIFIER,
|
|
3
3
|
STACK_PLUGIN,
|
|
4
|
-
|
|
5
|
-
} from "./chunk-
|
|
4
|
+
meta
|
|
5
|
+
} from "./chunk-WTGFKPPQ.mjs";
|
|
6
6
|
import {
|
|
7
|
-
SectionSchema,
|
|
8
7
|
StackViewType
|
|
9
8
|
} from "./chunk-L34RFJ2L.mjs";
|
|
10
9
|
|
|
11
10
|
// packages/plugins/plugin-stack/src/StackPlugin.tsx
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
11
|
+
import React2 from "react";
|
|
12
|
+
import { Capabilities, contributes, createSurface, defineModule, definePlugin, Events, oneOf } from "@dxos/app-framework";
|
|
13
|
+
import { fullyQualifiedId } from "@dxos/client/echo";
|
|
14
|
+
import { ClientCapabilities, ClientEvents } from "@dxos/plugin-client";
|
|
15
15
|
import { CollectionType } from "@dxos/plugin-space/types";
|
|
16
|
-
import { Main } from "@dxos/react-ui";
|
|
17
|
-
import { baseSurface, topbarBlockPaddingStart, bottombarBlockPaddingEnd } from "@dxos/react-ui-theme";
|
|
18
16
|
|
|
19
17
|
// packages/plugins/plugin-stack/src/components/index.ts
|
|
20
18
|
import { lazy } from "react";
|
|
@@ -23,128 +21,9 @@ import { lazy } from "react";
|
|
|
23
21
|
import React from "react";
|
|
24
22
|
import { Input, useTranslation } from "@dxos/react-ui";
|
|
25
23
|
import { DeprecatedFormInput } from "@dxos/react-ui-form";
|
|
26
|
-
var StackSettings = ({ settings }) => {
|
|
27
|
-
const { t } = useTranslation(STACK_PLUGIN);
|
|
28
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(DeprecatedFormInput, {
|
|
29
|
-
label: t("settings separation label")
|
|
30
|
-
}, /* @__PURE__ */ React.createElement(Input.Switch, {
|
|
31
|
-
checked: settings.separation,
|
|
32
|
-
onCheckedChange: (checked) => settings.separation = !!checked
|
|
33
|
-
})));
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
// packages/plugins/plugin-stack/src/components/AddSectionDialog.tsx
|
|
37
|
-
import { FilePlus } from "@phosphor-icons/react";
|
|
38
|
-
import React2, { useCallback, useRef, useState } from "react";
|
|
39
|
-
import { usePlugin, useIntent, LayoutAction, useResolvePlugin, parseFileManagerPlugin } from "@dxos/app-framework";
|
|
40
|
-
import { create, getSpace } from "@dxos/client/echo";
|
|
41
|
-
import { FileType } from "@dxos/plugin-ipfs/types";
|
|
42
|
-
import { Dialog, toLocalizedString, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
43
|
-
import { Path } from "@dxos/react-ui-mosaic";
|
|
44
|
-
import { SearchList } from "@dxos/react-ui-searchlist";
|
|
45
|
-
import { getSize, mx } from "@dxos/react-ui-theme";
|
|
46
|
-
import { nonNullable } from "@dxos/util";
|
|
47
|
-
var dataHasAddSectionDialogProps = (data) => {
|
|
48
|
-
return "subject" in data && typeof data.subject === "object" && !!data.subject && "position" in data.subject && typeof data.subject.position === "string" && "collection" in data.subject;
|
|
49
|
-
};
|
|
50
|
-
var AddSectionDialog = ({ path, position, collection }) => {
|
|
51
|
-
const { t } = useTranslation2(STACK_PLUGIN);
|
|
52
|
-
const stackPlugin = usePlugin(STACK_PLUGIN);
|
|
53
|
-
const fileManagerPlugin = useResolvePlugin(parseFileManagerPlugin);
|
|
54
|
-
const fileRef = useRef(null);
|
|
55
|
-
const { dispatch } = useIntent();
|
|
56
|
-
const space = getSpace(collection);
|
|
57
|
-
const [pending, setPending] = useState(false);
|
|
58
|
-
const [uploadError, setUploadError] = useState();
|
|
59
|
-
const handleAdd = useCallback((sectionObject) => {
|
|
60
|
-
const index = position === "beforeAll" ? 0 : position === "afterAll" ? collection.objects.length : collection.objects.filter(nonNullable).findIndex((section) => section.id === Path.last(path));
|
|
61
|
-
collection.objects.splice(index + (position === "after" ? 1 : 0), 0, sectionObject);
|
|
62
|
-
const stack = collection.views[StackViewType.typename];
|
|
63
|
-
if (stack) {
|
|
64
|
-
stack.sections[sectionObject.id] = {};
|
|
65
|
-
}
|
|
66
|
-
setPending(false);
|
|
67
|
-
void dispatch?.({
|
|
68
|
-
action: LayoutAction.SET_LAYOUT,
|
|
69
|
-
data: {
|
|
70
|
-
element: "dialog",
|
|
71
|
-
state: false
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
}, [
|
|
75
|
-
collection,
|
|
76
|
-
path,
|
|
77
|
-
position,
|
|
78
|
-
dispatch
|
|
79
|
-
]);
|
|
80
|
-
const handleFileUpload = fileManagerPlugin?.provides.file.upload && space ? async (file) => {
|
|
81
|
-
const filename = file.name.split(".")[0];
|
|
82
|
-
try {
|
|
83
|
-
const info = await fileManagerPlugin.provides.file.upload?.(file, space);
|
|
84
|
-
if (info) {
|
|
85
|
-
const obj = create(FileType, {
|
|
86
|
-
type: file.type,
|
|
87
|
-
name: filename,
|
|
88
|
-
filename,
|
|
89
|
-
cid: info.cid
|
|
90
|
-
});
|
|
91
|
-
handleAdd(obj);
|
|
92
|
-
}
|
|
93
|
-
} catch (err) {
|
|
94
|
-
setUploadError(err);
|
|
95
|
-
}
|
|
96
|
-
} : void 0;
|
|
97
|
-
return /* @__PURE__ */ React2.createElement(Dialog.Content, null, /* @__PURE__ */ React2.createElement(Dialog.Title, null, t(`add section ${position} dialog title`)), /* @__PURE__ */ React2.createElement(SearchList.Root, {
|
|
98
|
-
label: t("add section input placeholder")
|
|
99
|
-
}, /* @__PURE__ */ React2.createElement(SearchList.Input, {
|
|
100
|
-
placeholder: t("add section input placeholder"),
|
|
101
|
-
classNames: "pli-3",
|
|
102
|
-
disabled: pending
|
|
103
|
-
}), /* @__PURE__ */ React2.createElement(SearchList.Content, {
|
|
104
|
-
classNames: "min-bs-24 bs-fit max-bs-64 overflow-auto",
|
|
105
|
-
...pending && {
|
|
106
|
-
inert: "true"
|
|
107
|
-
}
|
|
108
|
-
}, stackPlugin?.provides?.stack.creators?.map(({ id, icon: Icon, label: propsLabel, testId, intent }) => {
|
|
109
|
-
const label = toLocalizedString(propsLabel, t);
|
|
110
|
-
return /* @__PURE__ */ React2.createElement(SearchList.Item, {
|
|
111
|
-
value: label,
|
|
112
|
-
key: id,
|
|
113
|
-
onSelect: async () => {
|
|
114
|
-
setPending(true);
|
|
115
|
-
const { data: nextSection } = await dispatch({
|
|
116
|
-
...intent,
|
|
117
|
-
data: {
|
|
118
|
-
space
|
|
119
|
-
}
|
|
120
|
-
}) ?? {};
|
|
121
|
-
handleAdd(nextSection);
|
|
122
|
-
},
|
|
123
|
-
classNames: "flex items-center gap-2 pli-2",
|
|
124
|
-
"data-testid": testId
|
|
125
|
-
}, Icon && /* @__PURE__ */ React2.createElement(Icon, {
|
|
126
|
-
className: mx(getSize(4), "shrink-0")
|
|
127
|
-
}), /* @__PURE__ */ React2.createElement("span", {
|
|
128
|
-
className: "grow truncate"
|
|
129
|
-
}, label));
|
|
130
|
-
}), handleFileUpload && /* @__PURE__ */ React2.createElement(SearchList.Item, {
|
|
131
|
-
value: t("upload file label"),
|
|
132
|
-
classNames: "flex items-center gap-2 pli-2",
|
|
133
|
-
onSelect: () => fileRef.current?.click()
|
|
134
|
-
}, /* @__PURE__ */ React2.createElement(FilePlus, null), /* @__PURE__ */ React2.createElement("span", {
|
|
135
|
-
className: "grow truncate"
|
|
136
|
-
}, t("upload file label"))), uploadError && /* @__PURE__ */ React2.createElement("div", {
|
|
137
|
-
className: "text-error-500"
|
|
138
|
-
}, uploadError.message))), handleFileUpload && /* @__PURE__ */ React2.createElement("input", {
|
|
139
|
-
type: "file",
|
|
140
|
-
className: "sr-only",
|
|
141
|
-
ref: fileRef,
|
|
142
|
-
onChange: ({ target: { files } }) => files && handleFileUpload(files[0])
|
|
143
|
-
}));
|
|
144
|
-
};
|
|
145
24
|
|
|
146
25
|
// packages/plugins/plugin-stack/src/components/index.ts
|
|
147
|
-
var StackMain = lazy(() => import("./StackMain-
|
|
26
|
+
var StackMain = lazy(() => import("./StackMain-VH3YESQL.mjs"));
|
|
148
27
|
|
|
149
28
|
// packages/plugins/plugin-stack/src/translations.ts
|
|
150
29
|
import { translations as stackTranslations } from "@dxos/react-ui-stack";
|
|
@@ -177,119 +56,83 @@ var translations_default = [
|
|
|
177
56
|
];
|
|
178
57
|
|
|
179
58
|
// packages/plugins/plugin-stack/src/StackPlugin.tsx
|
|
180
|
-
var StackPlugin = () =>
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
}
|
|
198
|
-
if (Array.isArray(plugin.provides?.stack?.creators)) {
|
|
199
|
-
stackState.creators.push(...plugin.provides.stack.creators ?? []);
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
},
|
|
203
|
-
provides: {
|
|
204
|
-
settings: settings.values,
|
|
205
|
-
metadata: {
|
|
206
|
-
records: {
|
|
207
|
-
[StackViewType.typename]: {
|
|
208
|
-
placeholder: [
|
|
209
|
-
"stack title placeholder",
|
|
210
|
-
{
|
|
211
|
-
ns: STACK_PLUGIN
|
|
212
|
-
}
|
|
213
|
-
],
|
|
214
|
-
icon: "ph--stack-simple--regular"
|
|
215
|
-
},
|
|
216
|
-
[SECTION_IDENTIFIER]: {
|
|
217
|
-
parse: (section, type) => {
|
|
218
|
-
switch (type) {
|
|
219
|
-
case "node":
|
|
220
|
-
return {
|
|
221
|
-
id: section.object.id,
|
|
222
|
-
label: section.object.title,
|
|
223
|
-
data: section.object
|
|
224
|
-
};
|
|
225
|
-
case "object":
|
|
226
|
-
return section.object;
|
|
227
|
-
case "view-object":
|
|
228
|
-
return section;
|
|
229
|
-
}
|
|
59
|
+
var StackPlugin = () => definePlugin(meta, [
|
|
60
|
+
defineModule({
|
|
61
|
+
id: `${meta.id}/module/translations`,
|
|
62
|
+
activatesOn: Events.SetupTranslations,
|
|
63
|
+
activate: () => contributes(Capabilities.Translations, translations_default)
|
|
64
|
+
}),
|
|
65
|
+
defineModule({
|
|
66
|
+
id: `${meta.id}/module/metadata`,
|
|
67
|
+
activatesOn: oneOf(Events.Startup, Events.SetupAppGraph),
|
|
68
|
+
activate: () => [
|
|
69
|
+
contributes(Capabilities.Metadata, {
|
|
70
|
+
id: StackViewType.typename,
|
|
71
|
+
metadata: {
|
|
72
|
+
placeholder: [
|
|
73
|
+
"stack title placeholder",
|
|
74
|
+
{
|
|
75
|
+
ns: STACK_PLUGIN
|
|
230
76
|
}
|
|
231
|
-
|
|
77
|
+
],
|
|
78
|
+
icon: "ph--stack-simple--regular"
|
|
232
79
|
}
|
|
233
|
-
},
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
case "main":
|
|
250
|
-
return primary instanceof CollectionType ? /* @__PURE__ */ React3.createElement(Main.Content, {
|
|
251
|
-
bounce: true,
|
|
252
|
-
classNames: [
|
|
253
|
-
baseSurface,
|
|
254
|
-
topbarBlockPaddingStart,
|
|
255
|
-
bottombarBlockPaddingEnd
|
|
256
|
-
]
|
|
257
|
-
}, /* @__PURE__ */ React3.createElement(StackMain, {
|
|
258
|
-
id: id ?? fullyQualifiedId(primary),
|
|
259
|
-
collection: primary
|
|
260
|
-
})) : null;
|
|
261
|
-
case "article":
|
|
262
|
-
return primary instanceof CollectionType ? /* @__PURE__ */ React3.createElement("div", {
|
|
263
|
-
role: "none",
|
|
264
|
-
className: "overflow-auto",
|
|
265
|
-
style: {
|
|
266
|
-
contain: "layout"
|
|
267
|
-
}
|
|
268
|
-
}, /* @__PURE__ */ React3.createElement(StackMain, {
|
|
269
|
-
id: id ?? fullyQualifiedId(primary),
|
|
270
|
-
collection: primary
|
|
271
|
-
})) : null;
|
|
272
|
-
case "settings": {
|
|
273
|
-
return data.plugin === meta_default.id ? /* @__PURE__ */ React3.createElement(StackSettings, {
|
|
274
|
-
settings: settings.values
|
|
275
|
-
}) : null;
|
|
80
|
+
}),
|
|
81
|
+
contributes(Capabilities.Metadata, {
|
|
82
|
+
id: SECTION_IDENTIFIER,
|
|
83
|
+
metadata: {
|
|
84
|
+
parse: (section, type) => {
|
|
85
|
+
switch (type) {
|
|
86
|
+
case "node":
|
|
87
|
+
return {
|
|
88
|
+
id: section.object.id,
|
|
89
|
+
label: section.object.title,
|
|
90
|
+
data: section.object
|
|
91
|
+
};
|
|
92
|
+
case "object":
|
|
93
|
+
return section.object;
|
|
94
|
+
case "view-object":
|
|
95
|
+
return section;
|
|
276
96
|
}
|
|
277
|
-
default:
|
|
278
|
-
return null;
|
|
279
97
|
}
|
|
280
98
|
}
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
99
|
+
})
|
|
100
|
+
]
|
|
101
|
+
}),
|
|
102
|
+
defineModule({
|
|
103
|
+
id: `${meta.id}/module/schema`,
|
|
104
|
+
activatesOn: ClientEvents.SetupClient,
|
|
105
|
+
activate: () => contributes(ClientCapabilities.SystemSchema, [
|
|
106
|
+
StackViewType
|
|
107
|
+
])
|
|
108
|
+
}),
|
|
109
|
+
defineModule({
|
|
110
|
+
id: `${meta.id}/module/react-surface`,
|
|
111
|
+
activatesOn: Events.Startup,
|
|
112
|
+
activate: () => contributes(Capabilities.ReactSurface, createSurface({
|
|
113
|
+
id: `${STACK_PLUGIN}/article`,
|
|
114
|
+
role: "article",
|
|
115
|
+
filter: (data) => data.subject instanceof CollectionType,
|
|
116
|
+
component: ({ data }) => {
|
|
117
|
+
const id = typeof data.id === "string" ? data.id : void 0;
|
|
118
|
+
return /* @__PURE__ */ React2.createElement("div", {
|
|
119
|
+
role: "none",
|
|
120
|
+
className: "overflow-auto",
|
|
121
|
+
style: {
|
|
122
|
+
contain: "layout"
|
|
123
|
+
}
|
|
124
|
+
}, /* @__PURE__ */ React2.createElement(StackMain, {
|
|
125
|
+
id: id ?? fullyQualifiedId(data.subject),
|
|
126
|
+
collection: data.subject
|
|
127
|
+
}));
|
|
128
|
+
}
|
|
129
|
+
}))
|
|
130
|
+
})
|
|
131
|
+
]);
|
|
289
132
|
export {
|
|
290
|
-
|
|
133
|
+
SECTION_IDENTIFIER,
|
|
134
|
+
STACK_PLUGIN,
|
|
291
135
|
StackPlugin,
|
|
292
|
-
|
|
293
|
-
src_default as default
|
|
136
|
+
meta
|
|
294
137
|
};
|
|
295
138
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/StackPlugin.tsx", "../../../src/components/index.ts", "../../../src/components/StackSettings.tsx", "../../../src/
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type Plugin, type PluginDefinition } from '@dxos/app-framework';\nimport { create, type ReactiveEchoObject, fullyQualifiedId } from '@dxos/client/echo';\nimport { LocalStorageStore } from '@dxos/local-storage';\nimport { CollectionType } from '@dxos/plugin-space/types';\nimport { Main } from '@dxos/react-ui';\nimport { baseSurface, topbarBlockPaddingStart, bottombarBlockPaddingEnd } from '@dxos/react-ui-theme';\n\nimport { StackMain, StackSettings, AddSectionDialog, dataHasAddSectionDialogProps } from './components';\nimport meta, { SECTION_IDENTIFIER, STACK_PLUGIN } from './meta';\nimport translations from './translations';\nimport { StackViewType } from './types';\nimport { type StackPluginProvides, type StackProvides, type StackState, type StackSettingsProps } from './types';\n\nexport const StackPlugin = (): PluginDefinition<StackPluginProvides> => {\n const settings = new LocalStorageStore<StackSettingsProps>(STACK_PLUGIN, { separation: true });\n const stackState = create<StackState>({ creators: [] });\n\n return {\n meta,\n ready: async (plugins) => {\n settings.prop({ key: 'separation', type: LocalStorageStore.bool() });\n\n for (const plugin of plugins) {\n if (plugin.meta.id === STACK_PLUGIN) {\n continue;\n }\n\n if (Array.isArray((plugin as Plugin<StackProvides>).provides?.stack?.creators)) {\n stackState.creators.push(...((plugin as Plugin<StackProvides>).provides.stack.creators ?? []));\n }\n }\n },\n provides: {\n settings: settings.values,\n metadata: {\n records: {\n [StackViewType.typename]: {\n placeholder: ['stack title placeholder', { ns: STACK_PLUGIN }],\n icon: 'ph--stack-simple--regular',\n },\n [SECTION_IDENTIFIER]: {\n parse: (section: { object: ReactiveEchoObject<any> }, type: string) => {\n switch (type) {\n case 'node':\n // TODO(wittjosiah): Remove cast.\n return { id: section.object.id, label: section.object.title, data: section.object };\n case 'object':\n return section.object;\n case 'view-object':\n return section;\n }\n },\n },\n },\n },\n translations,\n echo: {\n system: [StackViewType],\n },\n surface: {\n component: ({ data, role }) => {\n switch (data.component) {\n case `${STACK_PLUGIN}/AddSectionDialog`:\n return dataHasAddSectionDialogProps(data) ? <AddSectionDialog {...data.subject} /> : null;\n }\n\n const primary = data.active ?? data.object;\n // This allows the id to be overridden by the surface for situations where the id of the collection\n // is not the same as the id of what is being represented (e.g., a space with a root collection).\n const id = typeof data.id === 'string' ? data.id : undefined;\n switch (role) {\n case 'main':\n return primary instanceof CollectionType ? (\n <Main.Content bounce classNames={[baseSurface, topbarBlockPaddingStart, bottombarBlockPaddingEnd]}>\n <StackMain id={id ?? fullyQualifiedId(primary)} collection={primary} />\n </Main.Content>\n ) : null;\n case 'article':\n return primary instanceof CollectionType ? (\n <div role='none' className='overflow-auto' style={{ contain: 'layout' }}>\n <StackMain id={id ?? fullyQualifiedId(primary)} collection={primary} />\n </div>\n ) : null;\n case 'settings': {\n return data.plugin === meta.id ? <StackSettings settings={settings.values} /> : null;\n }\n default:\n return null;\n }\n },\n },\n stack: stackState,\n },\n };\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { lazy } from 'react';\n\nexport const StackMain = lazy(() => import('./StackMain'));\n\nexport * from './StackSettings';\nexport * from './AddSectionDialog';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Input, useTranslation } from '@dxos/react-ui';\nimport { DeprecatedFormInput } from '@dxos/react-ui-form';\n\nimport { STACK_PLUGIN } from '../meta';\nimport { type StackSettingsProps } from '../types';\n\nexport const StackSettings = ({ settings }: { settings: StackSettingsProps }) => {\n const { t } = useTranslation(STACK_PLUGIN);\n\n return (\n <>\n <DeprecatedFormInput label={t('settings separation label')}>\n <Input.Switch checked={settings.separation} onCheckedChange={(checked) => (settings.separation = !!checked)} />\n </DeprecatedFormInput>\n </>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { FilePlus } from '@phosphor-icons/react';\nimport React, { useCallback, useRef, useState } from 'react';\n\nimport { usePlugin, useIntent, LayoutAction, useResolvePlugin, parseFileManagerPlugin } from '@dxos/app-framework';\nimport { type ReactiveEchoObject, create, getSpace } from '@dxos/client/echo';\nimport { FileType } from '@dxos/plugin-ipfs/types';\nimport { type CollectionType } from '@dxos/plugin-space/types';\nimport { Dialog, toLocalizedString, useTranslation } from '@dxos/react-ui';\nimport { Path } from '@dxos/react-ui-mosaic';\nimport { SearchList } from '@dxos/react-ui-searchlist';\nimport { getSize, mx } from '@dxos/react-ui-theme';\nimport { nonNullable } from '@dxos/util';\n\nimport { STACK_PLUGIN } from '../meta';\nimport { StackViewType, type StackPluginProvides, type AddSectionPosition } from '../types';\n\ntype AddSectionDialogProps = { path?: string; position: AddSectionPosition; collection: CollectionType };\n\nexport const dataHasAddSectionDialogProps = (data: any): data is { subject: AddSectionDialogProps } => {\n return (\n 'subject' in data &&\n typeof data.subject === 'object' &&\n !!data.subject &&\n 'position' in data.subject &&\n typeof data.subject.position === 'string' &&\n 'collection' in data.subject\n );\n};\n\nexport const AddSectionDialog = ({ path, position, collection }: AddSectionDialogProps) => {\n const { t } = useTranslation(STACK_PLUGIN);\n const stackPlugin = usePlugin<StackPluginProvides>(STACK_PLUGIN);\n const fileManagerPlugin = useResolvePlugin(parseFileManagerPlugin);\n const fileRef = useRef<HTMLInputElement | null>(null);\n const { dispatch } = useIntent();\n const space = getSpace(collection);\n const [pending, setPending] = useState<boolean>(false);\n const [uploadError, setUploadError] = useState<Error | undefined>();\n\n const handleAdd = useCallback(\n (sectionObject: ReactiveEchoObject<any>) => {\n const index =\n position === 'beforeAll'\n ? 0\n : position === 'afterAll'\n ? collection.objects.length\n : collection.objects.filter(nonNullable).findIndex((section) => section.id === Path.last(path!));\n\n collection.objects.splice(index + (position === 'after' ? 1 : 0), 0, sectionObject);\n const stack = collection.views[StackViewType.typename];\n if (stack) {\n stack.sections[sectionObject.id] = {};\n }\n setPending(false);\n void dispatch?.({ action: LayoutAction.SET_LAYOUT, data: { element: 'dialog', state: false } });\n },\n [collection, path, position, dispatch],\n );\n\n const handleFileUpload =\n fileManagerPlugin?.provides.file.upload && space\n ? async (file: File) => {\n const filename = file.name.split('.')[0];\n try {\n const info = await fileManagerPlugin.provides.file.upload?.(file, space);\n if (info) {\n const obj = create(FileType, { type: file.type, name: filename, filename, cid: info.cid });\n handleAdd(obj);\n }\n } catch (err: any) {\n setUploadError(err);\n }\n }\n : undefined;\n\n return (\n <Dialog.Content>\n <Dialog.Title>{t(`add section ${position} dialog title`)}</Dialog.Title>\n <SearchList.Root label={t('add section input placeholder')}>\n <SearchList.Input placeholder={t('add section input placeholder')} classNames='pli-3' disabled={pending} />\n <SearchList.Content classNames='min-bs-24 bs-fit max-bs-64 overflow-auto' {...(pending && { inert: 'true' })}>\n {stackPlugin?.provides?.stack.creators?.map(({ id, icon: Icon, label: propsLabel, testId, intent }) => {\n const label = toLocalizedString(propsLabel, t);\n return (\n <SearchList.Item\n value={label}\n key={id}\n onSelect={async () => {\n setPending(true);\n const { data: nextSection } = (await dispatch({ ...intent, data: { space } })) ?? {};\n handleAdd(nextSection);\n }}\n classNames='flex items-center gap-2 pli-2'\n data-testid={testId}\n >\n {Icon && <Icon className={mx(getSize(4), 'shrink-0')} />}\n <span className='grow truncate'>{label}</span>\n </SearchList.Item>\n );\n })}\n {handleFileUpload && (\n <SearchList.Item\n value={t('upload file label')}\n classNames='flex items-center gap-2 pli-2'\n onSelect={() => fileRef.current?.click()}\n >\n <FilePlus />\n <span className='grow truncate'>{t('upload file label')}</span>\n </SearchList.Item>\n )}\n {uploadError && <div className='text-error-500'>{uploadError.message}</div>}\n </SearchList.Content>\n </SearchList.Root>\n {handleFileUpload && (\n <input\n type='file'\n className='sr-only'\n ref={fileRef}\n onChange={({ target: { files } }) => files && handleFileUpload(files[0])}\n />\n )}\n </Dialog.Content>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { translations as stackTranslations } from '@dxos/react-ui-stack';\n\nimport { STACK_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [STACK_PLUGIN]: {\n 'plugin name': 'Stacks',\n 'settings separation label': 'Separate sections',\n 'add section beforeAll dialog title': 'Add a section to the start',\n 'add section afterAll dialog title': 'Add a section to the end',\n 'add section before dialog title': 'Add a section',\n 'add section after dialog title': 'Add a section',\n 'add section input placeholder': 'Find the type of section to add',\n 'upload file label': 'Add file',\n 'add section label': 'Add section',\n 'empty stack message': 'Drag items into the stack.',\n 'remove section label': 'Delete',\n 'navigate to section label': 'Navigate to item',\n 'untitled section title': 'Untitled section',\n 'add section before label': 'Add before',\n 'add section after label': 'Add after',\n 'expand label': 'Expand',\n 'collapse label': 'Collapse',\n 'drag handle label': 'Press space or enter to begin dragging this item.',\n },\n },\n },\n ...stackTranslations,\n];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { StackPlugin } from './StackPlugin';\n\nexport default StackPlugin;\n\nexport * from './types';\n\nexport * from './StackPlugin';\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["React", "
|
|
3
|
+
"sources": ["../../../src/StackPlugin.tsx", "../../../src/components/index.ts", "../../../src/components/StackSettings.tsx", "../../../src/translations.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport {\n Capabilities,\n contributes,\n createSurface,\n defineModule,\n definePlugin,\n Events,\n oneOf,\n} from '@dxos/app-framework';\nimport { type ReactiveEchoObject, fullyQualifiedId } from '@dxos/client/echo';\nimport { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';\nimport { CollectionType } from '@dxos/plugin-space/types';\n\nimport { StackMain } from './components';\nimport { meta, SECTION_IDENTIFIER, STACK_PLUGIN } from './meta';\nimport translations from './translations';\nimport { StackViewType } from './types';\n\nexport const StackPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/metadata`,\n activatesOn: oneOf(Events.Startup, Events.SetupAppGraph),\n activate: () => [\n contributes(Capabilities.Metadata, {\n id: StackViewType.typename,\n metadata: {\n placeholder: ['stack title placeholder', { ns: STACK_PLUGIN }],\n icon: 'ph--stack-simple--regular',\n },\n }),\n contributes(Capabilities.Metadata, {\n id: SECTION_IDENTIFIER,\n metadata: {\n parse: (section: { object: ReactiveEchoObject<any> }, type: string) => {\n switch (type) {\n case 'node':\n // TODO(wittjosiah): Remove cast.\n return { id: section.object.id, label: section.object.title, data: section.object };\n case 'object':\n return section.object;\n case 'view-object':\n return section;\n }\n },\n },\n }),\n ],\n }),\n defineModule({\n id: `${meta.id}/module/schema`,\n activatesOn: ClientEvents.SetupClient,\n activate: () => contributes(ClientCapabilities.SystemSchema, [StackViewType]),\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.Startup,\n activate: () =>\n contributes(\n Capabilities.ReactSurface,\n createSurface({\n id: `${STACK_PLUGIN}/article`,\n role: 'article',\n filter: (data): data is { id?: string; subject: CollectionType } => data.subject instanceof CollectionType,\n component: ({ data }) => {\n // This allows the id to be overridden by the surface for situations where the id of the collection\n // is not the same as the id of what is being represented (e.g., a space with a root collection).\n const id = typeof data.id === 'string' ? data.id : undefined;\n return (\n <div role='none' className='overflow-auto' style={{ contain: 'layout' }}>\n <StackMain id={id ?? fullyQualifiedId(data.subject)} collection={data.subject} />\n </div>\n );\n },\n }),\n ),\n }),\n ]);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { lazy } from 'react';\n\nexport const StackMain = lazy(() => import('./StackMain'));\n\nexport * from './StackSettings';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Input, useTranslation } from '@dxos/react-ui';\nimport { DeprecatedFormInput } from '@dxos/react-ui-form';\n\nimport { STACK_PLUGIN } from '../meta';\nimport { type StackSettingsProps } from '../types';\n\nexport const StackSettings = ({ settings }: { settings: StackSettingsProps }) => {\n const { t } = useTranslation(STACK_PLUGIN);\n\n return (\n <>\n <DeprecatedFormInput label={t('settings separation label')}>\n <Input.Switch checked={settings.separation} onCheckedChange={(checked) => (settings.separation = !!checked)} />\n </DeprecatedFormInput>\n </>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { translations as stackTranslations } from '@dxos/react-ui-stack';\n\nimport { STACK_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [STACK_PLUGIN]: {\n 'plugin name': 'Stacks',\n 'settings separation label': 'Separate sections',\n 'add section beforeAll dialog title': 'Add a section to the start',\n 'add section afterAll dialog title': 'Add a section to the end',\n 'add section before dialog title': 'Add a section',\n 'add section after dialog title': 'Add a section',\n 'add section input placeholder': 'Find the type of section to add',\n 'upload file label': 'Add file',\n 'add section label': 'Add section',\n 'empty stack message': 'Drag items into the stack.',\n 'remove section label': 'Delete',\n 'navigate to section label': 'Navigate to item',\n 'untitled section title': 'Untitled section',\n 'add section before label': 'Add before',\n 'add section after label': 'Add after',\n 'expand label': 'Expand',\n 'collapse label': 'Collapse',\n 'drag handle label': 'Press space or enter to begin dragging this item.',\n },\n },\n },\n ...stackTranslations,\n];\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;AAIA,OAAOA,YAAW;AAElB,SACEC,cACAC,aACAC,eACAC,cACAC,cACAC,QACAC,aACK;AACP,SAAkCC,wBAAwB;AAC1D,SAASC,oBAAoBC,oBAAoB;AACjD,SAASC,sBAAsB;;;ACb/B,SAASC,YAAY;;;ACArB,OAAOC,WAAW;AAElB,SAASC,OAAOC,sBAAsB;AACtC,SAASC,2BAA2B;;;ADD7B,IAAMC,YAAYC,KAAK,MAAM,OAAO,0BAAA,CAAA;;;AEF3C,SAASC,gBAAgBC,yBAAyB;AAIlD,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACC,YAAAA,GAAe;QACd,eAAe;QACf,6BAA6B;QAC7B,sCAAsC;QACtC,qCAAqC;QACrC,mCAAmC;QACnC,kCAAkC;QAClC,iCAAiC;QACjC,qBAAqB;QACrB,qBAAqB;QACrB,uBAAuB;QACvB,wBAAwB;QACxB,6BAA6B;QAC7B,0BAA0B;QAC1B,4BAA4B;QAC5B,2BAA2B;QAC3B,gBAAgB;QAChB,kBAAkB;QAClB,qBAAqB;MACvB;IACF;EACF;KACGC;;;;AHTE,IAAMC,cAAc,MACzBC,aAAaC,MAAM;EACjBC,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOC;IACpBC,UAAU,MAAMC,YAAYC,aAAaC,cAAcC,oBAAAA;EACzD,CAAA;EACAT,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaQ,MAAMP,OAAOQ,SAASR,OAAOS,aAAa;IACvDP,UAAU,MAAM;MACdC,YAAYC,aAAaM,UAAU;QACjCZ,IAAIa,cAAcC;QAClBC,UAAU;UACRC,aAAa;YAAC;YAA2B;cAAEC,IAAIC;YAAa;;UAC5DC,MAAM;QACR;MACF,CAAA;MACAd,YAAYC,aAAaM,UAAU;QACjCZ,IAAIoB;QACJL,UAAU;UACRM,OAAO,CAACC,SAA8CC,SAAAA;AACpD,oBAAQA,MAAAA;cACN,KAAK;AAEH,uBAAO;kBAAEvB,IAAIsB,QAAQE,OAAOxB;kBAAIyB,OAAOH,QAAQE,OAAOE;kBAAOC,MAAML,QAAQE;gBAAO;cACpF,KAAK;AACH,uBAAOF,QAAQE;cACjB,KAAK;AACH,uBAAOF;YACX;UACF;QACF;MACF,CAAA;;EAEJ,CAAA;EACAvB,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAa2B,aAAaC;IAC1BzB,UAAU,MAAMC,YAAYyB,mBAAmBC,cAAc;MAAClB;KAAc;EAC9E,CAAA;EACAd,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOQ;IACpBN,UAAU,MACRC,YACEC,aAAa0B,cACbC,cAAc;MACZjC,IAAI,GAAGkB,YAAAA;MACPgB,MAAM;MACNC,QAAQ,CAACR,SAA2DA,KAAKS,mBAAmBC;MAC5FC,WAAW,CAAC,EAAEX,KAAI,MAAE;AAGlB,cAAM3B,KAAK,OAAO2B,KAAK3B,OAAO,WAAW2B,KAAK3B,KAAKuC;AACnD,eACE,gBAAAC,OAAA,cAACC,OAAAA;UAAIP,MAAK;UAAOQ,WAAU;UAAgBC,OAAO;YAAEC,SAAS;UAAS;WACpE,gBAAAJ,OAAA,cAACK,WAAAA;UAAU7C,IAAIA,MAAM8C,iBAAiBnB,KAAKS,OAAO;UAAGW,YAAYpB,KAAKS;;MAG5E;IACF,CAAA,CAAA;EAEN,CAAA;CACD;",
|
|
6
|
+
"names": ["React", "Capabilities", "contributes", "createSurface", "defineModule", "definePlugin", "Events", "oneOf", "fullyQualifiedId", "ClientCapabilities", "ClientEvents", "CollectionType", "lazy", "React", "Input", "useTranslation", "DeprecatedFormInput", "StackMain", "lazy", "translations", "stackTranslations", "STACK_PLUGIN", "stackTranslations", "StackPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "oneOf", "Startup", "SetupAppGraph", "Metadata", "StackViewType", "typename", "metadata", "placeholder", "ns", "STACK_PLUGIN", "icon", "SECTION_IDENTIFIER", "parse", "section", "type", "object", "label", "title", "data", "ClientEvents", "SetupClient", "ClientCapabilities", "SystemSchema", "ReactSurface", "createSurface", "role", "filter", "subject", "CollectionType", "component", "undefined", "React", "div", "className", "style", "contain", "StackMain", "fullyQualifiedId", "collection"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytes":2237,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytes":2624,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/types/stack.ts":{"bytes":3411,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/types/types.ts":{"bytes":3167,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/types/index.ts":{"bytes":581,"imports":[{"path":"packages/plugins/plugin-stack/src/types/stack.ts","kind":"import-statement","original":"./stack"},{"path":"packages/plugins/plugin-stack/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/AddSectionDialog.tsx":{"bytes":18260,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-ipfs/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/react-ui-searchlist","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/AddSection.tsx":{"bytes":10461,"imports":[{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytes":1887,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytes":3039,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytes":17844,"imports":[{"path":"@radix-ui/react-collapsible","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx","kind":"import-statement","original":"./CaretDownUp"},{"path":"packages/plugins/plugin-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackMain.tsx":{"bytes":18885,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/AddSection.tsx","kind":"import-statement","original":"./AddSection"},{"path":"packages/plugins/plugin-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/plugins/plugin-stack/src/components/StackSection.tsx","kind":"import-statement","original":"./StackSection"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/index.ts":{"bytes":981,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/StackSettings.tsx","kind":"import-statement","original":"./StackSettings"},{"path":"packages/plugins/plugin-stack/src/components/AddSectionDialog.tsx","kind":"import-statement","original":"./AddSectionDialog"},{"path":"packages/plugins/plugin-stack/src/components/StackMain.tsx","kind":"dynamic-import","original":"./StackMain"}],"format":"esm"},"packages/plugins/plugin-stack/src/translations.ts":{"bytes":4081,"imports":[{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/StackPlugin.tsx":{"bytes":15314,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-stack/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-stack/src/index.ts":{"bytes":854,"imports":[{"path":"packages/plugins/plugin-stack/src/StackPlugin.tsx","kind":"import-statement","original":"./StackPlugin"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/plugin-stack/src/StackPlugin.tsx","kind":"import-statement","original":"./StackPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-stack/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":20482},"packages/plugins/plugin-stack/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-DS5KGEJG.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-ipfs/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/react-ui-searchlist","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/dist/lib/browser/StackMain-4D4J4IRK.mjs","kind":"dynamic-import"},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["SectionSchema","StackPlugin","StackViewType","default"],"entryPoint":"packages/plugins/plugin-stack/src/index.ts","inputs":{"packages/plugins/plugin-stack/src/StackPlugin.tsx":{"bytesInOutput":3692},"packages/plugins/plugin-stack/src/components/index.ts":{"bytesInOutput":94},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytesInOutput":564},"packages/plugins/plugin-stack/src/components/AddSectionDialog.tsx":{"bytesInOutput":4601},"packages/plugins/plugin-stack/src/translations.ts":{"bytesInOutput":1176},"packages/plugins/plugin-stack/src/index.ts":{"bytesInOutput":31}},"bytes":10907},"packages/plugins/plugin-stack/dist/lib/browser/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-stack/dist/lib/browser/meta.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-DS5KGEJG.mjs","kind":"import-statement"}],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","default"],"entryPoint":"packages/plugins/plugin-stack/src/meta.ts","inputs":{},"bytes":203},"packages/plugins/plugin-stack/dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-stack/dist/lib/browser/types/index.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.mjs","kind":"import-statement"}],"exports":["SectionSchema","StackViewType"],"entryPoint":"packages/plugins/plugin-stack/src/types/index.ts","inputs":{},"bytes":154},"packages/plugins/plugin-stack/dist/lib/browser/StackMain-4D4J4IRK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":27259},"packages/plugins/plugin-stack/dist/lib/browser/StackMain-4D4J4IRK.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-DS5KGEJG.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.mjs","kind":"import-statement"},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@radix-ui/react-collapsible","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-stack/src/components/StackMain.tsx","inputs":{"packages/plugins/plugin-stack/src/components/StackMain.tsx":{"bytesInOutput":4441},"packages/plugins/plugin-stack/src/components/AddSection.tsx":{"bytesInOutput":2554},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytesInOutput":265},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytesInOutput":5279},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytesInOutput":776}},"bytes":13970},"packages/plugins/plugin-stack/dist/lib/browser/chunk-DS5KGEJG.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1027},"packages/plugins/plugin-stack/dist/lib/browser/chunk-DS5KGEJG.mjs":{"imports":[],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","meta_default"],"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytesInOutput":565}},"bytes":720},"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1614},"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.mjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["SectionSchema","StackViewType"],"inputs":{"packages/plugins/plugin-stack/src/types/stack.ts":{"bytesInOutput":515},"packages/plugins/plugin-stack/src/types/index.ts":{"bytesInOutput":0}},"bytes":657}}}
|
|
1
|
+
{"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytes":2274,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytes":2624,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytes":1887,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytes":3039,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytes":17526,"imports":[{"path":"@radix-ui/react-collapsible","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx","kind":"import-statement","original":"./CaretDownUp"},{"path":"packages/plugins/plugin-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/types/stack.ts":{"bytes":3411,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/types/types.ts":{"bytes":2111,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/types/index.ts":{"bytes":581,"imports":[{"path":"packages/plugins/plugin-stack/src/types/stack.ts","kind":"import-statement","original":"./stack"},{"path":"packages/plugins/plugin-stack/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackMain.tsx":{"bytes":18830,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/plugins/plugin-stack/src/components/StackSection.tsx","kind":"import-statement","original":"./StackSection"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/index.ts":{"bytes":873,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/StackSettings.tsx","kind":"import-statement","original":"./StackSettings"},{"path":"packages/plugins/plugin-stack/src/components/StackMain.tsx","kind":"dynamic-import","original":"./StackMain"}],"format":"esm"},"packages/plugins/plugin-stack/src/translations.ts":{"bytes":4081,"imports":[{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/StackPlugin.tsx":{"bytes":12082,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-stack/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-stack/src/index.ts":{"bytes":592,"imports":[{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-stack/src/StackPlugin.tsx","kind":"import-statement","original":"./StackPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-stack/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8439},"packages/plugins/plugin-stack/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-WTGFKPPQ.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/dist/lib/browser/StackMain-VH3YESQL.mjs","kind":"dynamic-import"},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","StackPlugin","meta"],"entryPoint":"packages/plugins/plugin-stack/src/index.ts","inputs":{"packages/plugins/plugin-stack/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-stack/src/StackPlugin.tsx":{"bytesInOutput":2516},"packages/plugins/plugin-stack/src/components/index.ts":{"bytesInOutput":94},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytesInOutput":142},"packages/plugins/plugin-stack/src/translations.ts":{"bytesInOutput":1176}},"bytes":4521},"packages/plugins/plugin-stack/dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-stack/dist/lib/browser/types/index.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.mjs","kind":"import-statement"}],"exports":["SectionSchema","StackViewType"],"entryPoint":"packages/plugins/plugin-stack/src/types/index.ts","inputs":{},"bytes":154},"packages/plugins/plugin-stack/dist/lib/browser/StackMain-VH3YESQL.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21814},"packages/plugins/plugin-stack/dist/lib/browser/StackMain-VH3YESQL.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-WTGFKPPQ.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.mjs","kind":"import-statement"},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@radix-ui/react-collapsible","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-stack/src/components/StackMain.tsx","inputs":{"packages/plugins/plugin-stack/src/components/StackMain.tsx":{"bytesInOutput":4398},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytesInOutput":265},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytesInOutput":5160},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytesInOutput":771}},"bytes":11185},"packages/plugins/plugin-stack/dist/lib/browser/chunk-WTGFKPPQ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1042},"packages/plugins/plugin-stack/dist/lib/browser/chunk-WTGFKPPQ.mjs":{"imports":[],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","meta"],"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytesInOutput":557}},"bytes":704},"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1614},"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.mjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["SectionSchema","StackViewType"],"inputs":{"packages/plugins/plugin-stack/src/types/stack.ts":{"bytesInOutput":515},"packages/plugins/plugin-stack/src/types/index.ts":{"bytesInOutput":0}},"bytes":657}}}
|