@dxos/plugin-stack 0.7.4-staging.f7e8224 → 0.7.5-main.499c70c
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-HSYQ5B3Y.mjs +295 -0
- package/dist/lib/browser/StackMain-HSYQ5B3Y.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +28 -163
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/StackMain-AWN5MFZK.cjs +309 -0
- package/dist/lib/node/StackMain-AWN5MFZK.cjs.map +7 -0
- package/dist/lib/node/index.cjs +28 -161
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node-esm/StackMain-EFCZCMIJ.mjs +296 -0
- package/dist/lib/node-esm/StackMain-EFCZCMIJ.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +28 -163
- 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.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 +0 -1
- package/dist/types/src/components/index.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 +4 -16
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/package.json +23 -23
- package/src/StackPlugin.tsx +26 -47
- package/src/components/StackMain.tsx +60 -69
- package/src/components/StackSection.tsx +2 -4
- package/src/components/index.ts +0 -1
- package/src/types/types.ts +3 -19
- package/dist/lib/browser/StackMain-4D4J4IRK.mjs +0 -391
- package/dist/lib/browser/StackMain-4D4J4IRK.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-esm/StackMain-5I43UWGF.mjs +0 -392
- package/dist/lib/node-esm/StackMain-5I43UWGF.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
package/dist/lib/node/index.cjs
CHANGED
|
@@ -37,134 +37,25 @@ module.exports = __toCommonJS(node_exports);
|
|
|
37
37
|
var import_chunk_PA5PRDM6 = require("./chunk-PA5PRDM6.cjs");
|
|
38
38
|
var import_chunk_6IPBX635 = require("./chunk-6IPBX635.cjs");
|
|
39
39
|
var import_react = __toESM(require("react"));
|
|
40
|
+
var import_app_framework = require("@dxos/app-framework");
|
|
40
41
|
var import_echo = require("@dxos/client/echo");
|
|
41
42
|
var import_local_storage = require("@dxos/local-storage");
|
|
42
43
|
var import_types = require("@dxos/plugin-space/types");
|
|
43
|
-
var import_react_ui = require("@dxos/react-ui");
|
|
44
|
-
var import_react_ui_theme = require("@dxos/react-ui-theme");
|
|
45
44
|
var import_react2 = require("react");
|
|
46
45
|
var import_react3 = __toESM(require("react"));
|
|
47
|
-
var
|
|
46
|
+
var import_react_ui = require("@dxos/react-ui");
|
|
48
47
|
var import_react_ui_form = require("@dxos/react-ui-form");
|
|
49
|
-
var import_react4 = require("@phosphor-icons/react");
|
|
50
|
-
var import_react5 = __toESM(require("react"));
|
|
51
|
-
var import_app_framework = require("@dxos/app-framework");
|
|
52
|
-
var import_echo2 = require("@dxos/client/echo");
|
|
53
|
-
var import_types2 = require("@dxos/plugin-ipfs/types");
|
|
54
|
-
var import_react_ui3 = require("@dxos/react-ui");
|
|
55
|
-
var import_react_ui_mosaic = require("@dxos/react-ui-mosaic");
|
|
56
|
-
var import_react_ui_searchlist = require("@dxos/react-ui-searchlist");
|
|
57
|
-
var import_react_ui_theme2 = require("@dxos/react-ui-theme");
|
|
58
|
-
var import_util = require("@dxos/util");
|
|
59
48
|
var import_react_ui_stack = require("@dxos/react-ui-stack");
|
|
60
49
|
var StackSettings = ({ settings }) => {
|
|
61
|
-
const { t } = (0,
|
|
50
|
+
const { t } = (0, import_react_ui.useTranslation)(import_chunk_PA5PRDM6.STACK_PLUGIN);
|
|
62
51
|
return /* @__PURE__ */ import_react3.default.createElement(import_react3.default.Fragment, null, /* @__PURE__ */ import_react3.default.createElement(import_react_ui_form.DeprecatedFormInput, {
|
|
63
52
|
label: t("settings separation label")
|
|
64
|
-
}, /* @__PURE__ */ import_react3.default.createElement(
|
|
53
|
+
}, /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Input.Switch, {
|
|
65
54
|
checked: settings.separation,
|
|
66
55
|
onCheckedChange: (checked) => settings.separation = !!checked
|
|
67
56
|
})));
|
|
68
57
|
};
|
|
69
|
-
var
|
|
70
|
-
return "subject" in data && typeof data.subject === "object" && !!data.subject && "position" in data.subject && typeof data.subject.position === "string" && "collection" in data.subject;
|
|
71
|
-
};
|
|
72
|
-
var AddSectionDialog = ({ path, position, collection }) => {
|
|
73
|
-
const { t } = (0, import_react_ui3.useTranslation)(import_chunk_PA5PRDM6.STACK_PLUGIN);
|
|
74
|
-
const stackPlugin = (0, import_app_framework.usePlugin)(import_chunk_PA5PRDM6.STACK_PLUGIN);
|
|
75
|
-
const fileManagerPlugin = (0, import_app_framework.useResolvePlugin)(import_app_framework.parseFileManagerPlugin);
|
|
76
|
-
const fileRef = (0, import_react5.useRef)(null);
|
|
77
|
-
const { dispatch } = (0, import_app_framework.useIntent)();
|
|
78
|
-
const space = (0, import_echo2.getSpace)(collection);
|
|
79
|
-
const [pending, setPending] = (0, import_react5.useState)(false);
|
|
80
|
-
const [uploadError, setUploadError] = (0, import_react5.useState)();
|
|
81
|
-
const handleAdd = (0, import_react5.useCallback)((sectionObject) => {
|
|
82
|
-
const index = position === "beforeAll" ? 0 : position === "afterAll" ? collection.objects.length : collection.objects.filter(import_util.nonNullable).findIndex((section) => section.id === import_react_ui_mosaic.Path.last(path));
|
|
83
|
-
collection.objects.splice(index + (position === "after" ? 1 : 0), 0, sectionObject);
|
|
84
|
-
const stack = collection.views[import_chunk_6IPBX635.StackViewType.typename];
|
|
85
|
-
if (stack) {
|
|
86
|
-
stack.sections[sectionObject.id] = {};
|
|
87
|
-
}
|
|
88
|
-
setPending(false);
|
|
89
|
-
void dispatch?.({
|
|
90
|
-
action: import_app_framework.LayoutAction.SET_LAYOUT,
|
|
91
|
-
data: {
|
|
92
|
-
element: "dialog",
|
|
93
|
-
state: false
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
}, [
|
|
97
|
-
collection,
|
|
98
|
-
path,
|
|
99
|
-
position,
|
|
100
|
-
dispatch
|
|
101
|
-
]);
|
|
102
|
-
const handleFileUpload = fileManagerPlugin?.provides.file.upload && space ? async (file) => {
|
|
103
|
-
const filename = file.name.split(".")[0];
|
|
104
|
-
try {
|
|
105
|
-
const info = await fileManagerPlugin.provides.file.upload?.(file, space);
|
|
106
|
-
if (info) {
|
|
107
|
-
const obj = (0, import_echo2.create)(import_types2.FileType, {
|
|
108
|
-
type: file.type,
|
|
109
|
-
name: filename,
|
|
110
|
-
filename,
|
|
111
|
-
cid: info.cid
|
|
112
|
-
});
|
|
113
|
-
handleAdd(obj);
|
|
114
|
-
}
|
|
115
|
-
} catch (err) {
|
|
116
|
-
setUploadError(err);
|
|
117
|
-
}
|
|
118
|
-
} : void 0;
|
|
119
|
-
return /* @__PURE__ */ import_react5.default.createElement(import_react_ui3.Dialog.Content, null, /* @__PURE__ */ import_react5.default.createElement(import_react_ui3.Dialog.Title, null, t(`add section ${position} dialog title`)), /* @__PURE__ */ import_react5.default.createElement(import_react_ui_searchlist.SearchList.Root, {
|
|
120
|
-
label: t("add section input placeholder")
|
|
121
|
-
}, /* @__PURE__ */ import_react5.default.createElement(import_react_ui_searchlist.SearchList.Input, {
|
|
122
|
-
placeholder: t("add section input placeholder"),
|
|
123
|
-
classNames: "pli-3",
|
|
124
|
-
disabled: pending
|
|
125
|
-
}), /* @__PURE__ */ import_react5.default.createElement(import_react_ui_searchlist.SearchList.Content, {
|
|
126
|
-
classNames: "min-bs-24 bs-fit max-bs-64 overflow-auto",
|
|
127
|
-
...pending && {
|
|
128
|
-
inert: "true"
|
|
129
|
-
}
|
|
130
|
-
}, stackPlugin?.provides?.stack.creators?.map(({ id, icon: Icon, label: propsLabel, testId, intent }) => {
|
|
131
|
-
const label = (0, import_react_ui3.toLocalizedString)(propsLabel, t);
|
|
132
|
-
return /* @__PURE__ */ import_react5.default.createElement(import_react_ui_searchlist.SearchList.Item, {
|
|
133
|
-
value: label,
|
|
134
|
-
key: id,
|
|
135
|
-
onSelect: async () => {
|
|
136
|
-
setPending(true);
|
|
137
|
-
const { data: nextSection } = await dispatch({
|
|
138
|
-
...intent,
|
|
139
|
-
data: {
|
|
140
|
-
space
|
|
141
|
-
}
|
|
142
|
-
}) ?? {};
|
|
143
|
-
handleAdd(nextSection);
|
|
144
|
-
},
|
|
145
|
-
classNames: "flex items-center gap-2 pli-2",
|
|
146
|
-
"data-testid": testId
|
|
147
|
-
}, Icon && /* @__PURE__ */ import_react5.default.createElement(Icon, {
|
|
148
|
-
className: (0, import_react_ui_theme2.mx)((0, import_react_ui_theme2.getSize)(4), "shrink-0")
|
|
149
|
-
}), /* @__PURE__ */ import_react5.default.createElement("span", {
|
|
150
|
-
className: "grow truncate"
|
|
151
|
-
}, label));
|
|
152
|
-
}), handleFileUpload && /* @__PURE__ */ import_react5.default.createElement(import_react_ui_searchlist.SearchList.Item, {
|
|
153
|
-
value: t("upload file label"),
|
|
154
|
-
classNames: "flex items-center gap-2 pli-2",
|
|
155
|
-
onSelect: () => fileRef.current?.click()
|
|
156
|
-
}, /* @__PURE__ */ import_react5.default.createElement(import_react4.FilePlus, null), /* @__PURE__ */ import_react5.default.createElement("span", {
|
|
157
|
-
className: "grow truncate"
|
|
158
|
-
}, t("upload file label"))), uploadError && /* @__PURE__ */ import_react5.default.createElement("div", {
|
|
159
|
-
className: "text-error-500"
|
|
160
|
-
}, uploadError.message))), handleFileUpload && /* @__PURE__ */ import_react5.default.createElement("input", {
|
|
161
|
-
type: "file",
|
|
162
|
-
className: "sr-only",
|
|
163
|
-
ref: fileRef,
|
|
164
|
-
onChange: ({ target: { files } }) => files && handleFileUpload(files[0])
|
|
165
|
-
}));
|
|
166
|
-
};
|
|
167
|
-
var StackMain = (0, import_react2.lazy)(() => import("./StackMain-V7C55NCF.cjs"));
|
|
58
|
+
var StackMain = (0, import_react2.lazy)(() => import("./StackMain-AWN5MFZK.cjs"));
|
|
168
59
|
var translations_default = [
|
|
169
60
|
{
|
|
170
61
|
"en-US": {
|
|
@@ -196,24 +87,13 @@ var StackPlugin = () => {
|
|
|
196
87
|
const settings = new import_local_storage.LocalStorageStore(import_chunk_PA5PRDM6.STACK_PLUGIN, {
|
|
197
88
|
separation: true
|
|
198
89
|
});
|
|
199
|
-
const stackState = (0, import_echo.create)({
|
|
200
|
-
creators: []
|
|
201
|
-
});
|
|
202
90
|
return {
|
|
203
91
|
meta: import_chunk_PA5PRDM6.meta_default,
|
|
204
|
-
ready: async (
|
|
92
|
+
ready: async () => {
|
|
205
93
|
settings.prop({
|
|
206
94
|
key: "separation",
|
|
207
95
|
type: import_local_storage.LocalStorageStore.bool()
|
|
208
96
|
});
|
|
209
|
-
for (const plugin of plugins) {
|
|
210
|
-
if (plugin.meta.id === import_chunk_PA5PRDM6.STACK_PLUGIN) {
|
|
211
|
-
continue;
|
|
212
|
-
}
|
|
213
|
-
if (Array.isArray(plugin.provides?.stack?.creators)) {
|
|
214
|
-
stackState.creators.push(...plugin.provides.stack.creators ?? []);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
97
|
},
|
|
218
98
|
provides: {
|
|
219
99
|
settings: settings.values,
|
|
@@ -253,48 +133,35 @@ var StackPlugin = () => {
|
|
|
253
133
|
]
|
|
254
134
|
},
|
|
255
135
|
surface: {
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
case "main":
|
|
265
|
-
return primary instanceof import_types.CollectionType ? /* @__PURE__ */ import_react.default.createElement(import_react_ui.Main.Content, {
|
|
266
|
-
bounce: true,
|
|
267
|
-
classNames: [
|
|
268
|
-
import_react_ui_theme.baseSurface,
|
|
269
|
-
import_react_ui_theme.topbarBlockPaddingStart,
|
|
270
|
-
import_react_ui_theme.bottombarBlockPaddingEnd
|
|
271
|
-
]
|
|
272
|
-
}, /* @__PURE__ */ import_react.default.createElement(StackMain, {
|
|
273
|
-
id: id ?? (0, import_echo.fullyQualifiedId)(primary),
|
|
274
|
-
collection: primary
|
|
275
|
-
})) : null;
|
|
276
|
-
case "article":
|
|
277
|
-
return primary instanceof import_types.CollectionType ? /* @__PURE__ */ import_react.default.createElement("div", {
|
|
136
|
+
definitions: () => [
|
|
137
|
+
(0, import_app_framework.createSurface)({
|
|
138
|
+
id: `${import_chunk_PA5PRDM6.STACK_PLUGIN}/article`,
|
|
139
|
+
role: "article",
|
|
140
|
+
filter: (data) => data.subject instanceof import_types.CollectionType,
|
|
141
|
+
component: ({ data }) => {
|
|
142
|
+
const id = typeof data.id === "string" ? data.id : void 0;
|
|
143
|
+
return /* @__PURE__ */ import_react.default.createElement("div", {
|
|
278
144
|
role: "none",
|
|
279
145
|
className: "overflow-auto",
|
|
280
146
|
style: {
|
|
281
147
|
contain: "layout"
|
|
282
148
|
}
|
|
283
149
|
}, /* @__PURE__ */ import_react.default.createElement(StackMain, {
|
|
284
|
-
id: id ?? (0, import_echo.fullyQualifiedId)(
|
|
285
|
-
collection:
|
|
286
|
-
}))
|
|
287
|
-
case "settings": {
|
|
288
|
-
return data.plugin === import_chunk_PA5PRDM6.meta_default.id ? /* @__PURE__ */ import_react.default.createElement(StackSettings, {
|
|
289
|
-
settings: settings.values
|
|
290
|
-
}) : null;
|
|
150
|
+
id: id ?? (0, import_echo.fullyQualifiedId)(data.subject),
|
|
151
|
+
collection: data.subject
|
|
152
|
+
}));
|
|
291
153
|
}
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
154
|
+
}),
|
|
155
|
+
(0, import_app_framework.createSurface)({
|
|
156
|
+
id: `${import_chunk_PA5PRDM6.STACK_PLUGIN}/settings`,
|
|
157
|
+
role: "settings",
|
|
158
|
+
filter: (data) => data.plugin === import_chunk_PA5PRDM6.meta_default.id,
|
|
159
|
+
component: () => /* @__PURE__ */ import_react.default.createElement(StackSettings, {
|
|
160
|
+
settings: settings.values
|
|
161
|
+
})
|
|
162
|
+
})
|
|
163
|
+
]
|
|
164
|
+
}
|
|
298
165
|
}
|
|
299
166
|
};
|
|
300
167
|
};
|
|
@@ -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": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAkB;
|
|
6
|
-
"names": ["import_react", "
|
|
3
|
+
"sources": ["../../../src/StackPlugin.tsx", "../../../src/components/index.ts", "../../../src/components/StackSettings.tsx", "../../../src/translations.ts", "../../../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { createSurface, type PluginDefinition } from '@dxos/app-framework';\nimport { type ReactiveEchoObject, fullyQualifiedId } from '@dxos/client/echo';\nimport { LocalStorageStore } from '@dxos/local-storage';\nimport { CollectionType } from '@dxos/plugin-space/types';\n\nimport { StackMain, StackSettings } from './components';\nimport meta, { SECTION_IDENTIFIER, STACK_PLUGIN } from './meta';\nimport translations from './translations';\nimport { StackViewType } from './types';\nimport { type StackPluginProvides, type StackSettingsProps } from './types';\n\nexport const StackPlugin = (): PluginDefinition<StackPluginProvides> => {\n const settings = new LocalStorageStore<StackSettingsProps>(STACK_PLUGIN, { separation: true });\n\n return {\n meta,\n ready: async () => {\n settings.prop({ key: 'separation', type: LocalStorageStore.bool() });\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 definitions: () => [\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 createSurface({\n id: `${STACK_PLUGIN}/settings`,\n role: 'settings',\n filter: (data): data is any => data.plugin === meta.id,\n component: () => <StackSettings settings={settings.values} />,\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", "//\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": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAkB;AAElB,2BAAqD;AACrD,kBAA0D;AAC1D,2BAAkC;AAClC,mBAA+B;ACL/B,IAAAA,gBAAqB;ACArB,IAAAA,gBAAkB;AAElB,sBAAsC;AACtC,2BAAoC;ACHpC,4BAAkD;ADQ3C,IAAMC,gBAAgB,CAAC,EAAEC,SAAQ,MAAoC;AAC1E,QAAM,EAAEC,EAAC,QAAKC,gCAAeC,kCAAAA;AAE7B,SACE,8BAAAC,QAAA,cAAA,cAAAA,QAAA,UAAA,MACE,8BAAAA,QAAA,cAACC,0CAAAA;IAAoBC,OAAOL,EAAE,2BAAA;KAC5B,8BAAAG,QAAA,cAACG,sBAAMC,QAAM;IAACC,SAAST,SAASU;IAAYC,iBAAiB,CAACF,YAAaT,SAASU,aAAa,CAAC,CAACD;;AAI3G;ADhBO,IAAMG,gBAAYC,oBAAK,MAAM,OAAO,0BAAA,CAAA;AEE3C,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACV,kCAAAA,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;KACGW,sBAAAA;;AHhBE,IAAMC,cAAc,MAAA;AACzB,QAAMf,WAAW,IAAIgB,uCAAsCb,oCAAc;IAAEO,YAAY;EAAK,CAAA;AAE5F,SAAO;IACLO,MAAAA;IACAC,OAAO,YAAA;AACLlB,eAASmB,KAAK;QAAEC,KAAK;QAAcC,MAAML,uCAAkBM,KAAI;MAAG,CAAA;IACpE;IACAC,UAAU;MACRvB,UAAUA,SAASwB;MACnBC,UAAU;QACRC,SAAS;UACP,CAACC,oCAAcC,QAAQ,GAAG;YACxBC,aAAa;cAAC;cAA2B;gBAAEC,IAAI3B;cAAa;;YAC5D4B,MAAM;UACR;UACA,CAACC,wCAAAA,GAAqB;YACpBC,OAAO,CAACC,SAA8Cb,SAAAA;AACpD,sBAAQA,MAAAA;gBACN,KAAK;AAEH,yBAAO;oBAAEc,IAAID,QAAQE,OAAOD;oBAAI7B,OAAO4B,QAAQE,OAAOC;oBAAOC,MAAMJ,QAAQE;kBAAO;gBACpF,KAAK;AACH,yBAAOF,QAAQE;gBACjB,KAAK;AACH,yBAAOF;cACX;YACF;UACF;QACF;MACF;MACAK,cAAAA;MACAC,MAAM;QACJC,QAAQ;UAACd;;MACX;MACAe,SAAS;QACPC,aAAa,MAAM;cACjBC,oCAAc;YACZT,IAAI,GAAGhC,kCAAAA;YACP0C,MAAM;YACNC,QAAQ,CAACR,SAA2DA,KAAKS,mBAAmBC;YAC5FC,WAAW,CAAC,EAAEX,KAAI,MAAE;AAGlB,oBAAMH,KAAK,OAAOG,KAAKH,OAAO,WAAWG,KAAKH,KAAKe;AACnD,qBACE9C,6BAAAA,QAAA,cAAC+C,OAAAA;gBAAIN,MAAK;gBAAOO,WAAU;gBAAgBC,OAAO;kBAAEC,SAAS;gBAAS;iBACpElD,6BAAAA,QAAA,cAACQ,WAAAA;gBAAUuB,IAAIA,UAAMoB,8BAAiBjB,KAAKS,OAAO;gBAAGS,YAAYlB,KAAKS;;YAG5E;UACF,CAAA;cACAH,oCAAc;YACZT,IAAI,GAAGhC,kCAAAA;YACP0C,MAAM;YACNC,QAAQ,CAACR,SAAsBA,KAAKmB,WAAWxC,mCAAKkB;YACpDc,WAAW,MAAM7C,6BAAAA,QAAA,cAACL,eAAAA;cAAcC,UAAUA,SAASwB;;UACrD,CAAA;;MAEJ;IACF;EACF;AACF;AIzEA,IAAA,cAAeT;",
|
|
6
|
+
"names": ["import_react", "StackSettings", "settings", "t", "useTranslation", "STACK_PLUGIN", "React", "DeprecatedFormInput", "label", "Input", "Switch", "checked", "separation", "onCheckedChange", "StackMain", "lazy", "stackTranslations", "StackPlugin", "LocalStorageStore", "meta", "ready", "prop", "key", "type", "bool", "provides", "values", "metadata", "records", "StackViewType", "typename", "placeholder", "ns", "icon", "SECTION_IDENTIFIER", "parse", "section", "id", "object", "title", "data", "translations", "echo", "system", "surface", "definitions", "createSurface", "role", "filter", "subject", "CollectionType", "component", "undefined", "div", "className", "style", "contain", "fullyQualifiedId", "collection", "plugin"]
|
|
7
7
|
}
|
package/dist/lib/node/meta.json
CHANGED
|
@@ -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/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":20482},"packages/plugins/plugin-stack/dist/lib/node/index.cjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-PA5PRDM6.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-6IPBX635.cjs","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/node/StackMain-V7C55NCF.cjs","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/node/meta.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-stack/dist/lib/node/meta.cjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-PA5PRDM6.cjs","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/node/types/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-stack/dist/lib/node/types/index.cjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-6IPBX635.cjs","kind":"import-statement"}],"exports":["SectionSchema","StackViewType"],"entryPoint":"packages/plugins/plugin-stack/src/types/index.ts","inputs":{},"bytes":154},"packages/plugins/plugin-stack/dist/lib/node/StackMain-V7C55NCF.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":27259},"packages/plugins/plugin-stack/dist/lib/node/StackMain-V7C55NCF.cjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-PA5PRDM6.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-6IPBX635.cjs","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/node/chunk-PA5PRDM6.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1027},"packages/plugins/plugin-stack/dist/lib/node/chunk-PA5PRDM6.cjs":{"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/node/chunk-6IPBX635.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1614},"packages/plugins/plugin-stack/dist/lib/node/chunk-6IPBX635.cjs":{"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":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/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":2607,"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":18858,"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/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":11494,"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/local-storage","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":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/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8687},"packages/plugins/plugin-stack/dist/lib/node/index.cjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-PA5PRDM6.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-6IPBX635.cjs","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/local-storage","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/node/StackMain-AWN5MFZK.cjs","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":2596},"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/translations.ts":{"bytesInOutput":1176},"packages/plugins/plugin-stack/src/index.ts":{"bytesInOutput":31}},"bytes":5140},"packages/plugins/plugin-stack/dist/lib/node/meta.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-stack/dist/lib/node/meta.cjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-PA5PRDM6.cjs","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/node/types/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-stack/dist/lib/node/types/index.cjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-6IPBX635.cjs","kind":"import-statement"}],"exports":["SectionSchema","StackViewType"],"entryPoint":"packages/plugins/plugin-stack/src/types/index.ts","inputs":{},"bytes":154},"packages/plugins/plugin-stack/dist/lib/node/StackMain-AWN5MFZK.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21860},"packages/plugins/plugin-stack/dist/lib/node/StackMain-AWN5MFZK.cjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-PA5PRDM6.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-6IPBX635.cjs","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":"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":4416},"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":11203},"packages/plugins/plugin-stack/dist/lib/node/chunk-PA5PRDM6.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1027},"packages/plugins/plugin-stack/dist/lib/node/chunk-PA5PRDM6.cjs":{"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/node/chunk-6IPBX635.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1614},"packages/plugins/plugin-stack/dist/lib/node/chunk-6IPBX635.cjs":{"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}}}
|