@dxos/plugin-stack 0.6.12-main.ed7cda7 → 0.6.12-staging.0b4bb48
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-MT6W47OT.mjs → StackMain-XRQRNZ4I.mjs} +4 -4
- package/dist/lib/browser/StackMain-XRQRNZ4I.mjs.map +7 -0
- package/dist/lib/{node-esm/chunk-T42IEBEL.mjs → browser/chunk-AYDYMPJK.mjs} +5 -4
- package/dist/lib/browser/chunk-AYDYMPJK.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +5 -3
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/meta.mjs +1 -1
- package/dist/lib/node/{StackMain-P5DO4ND6.cjs → StackMain-XJGYFDDN.cjs} +12 -12
- package/dist/lib/node/StackMain-XJGYFDDN.cjs.map +7 -0
- package/dist/lib/node/{chunk-PGL7XDNJ.cjs → chunk-I42JKRXR.cjs} +18 -5
- package/dist/lib/node/chunk-I42JKRXR.cjs.map +7 -0
- package/dist/lib/node/index.cjs +41 -39
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/meta.cjs +4 -4
- package/dist/lib/node/meta.cjs.map +1 -1
- package/dist/lib/node/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/meta.d.ts +4 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/package.json +27 -30
- package/src/StackPlugin.tsx +3 -1
- package/src/components/StackMain.tsx +3 -4
- package/src/meta.tsx +5 -1
- package/dist/lib/browser/StackMain-MT6W47OT.mjs.map +0 -7
- package/dist/lib/browser/chunk-H4O4KKLZ.mjs +0 -16
- package/dist/lib/browser/chunk-H4O4KKLZ.mjs.map +0 -7
- package/dist/lib/node/StackMain-P5DO4ND6.cjs.map +0 -7
- package/dist/lib/node/chunk-PGL7XDNJ.cjs.map +0 -7
- package/dist/lib/node-esm/StackMain-QLAHERGZ.mjs +0 -277
- package/dist/lib/node-esm/StackMain-QLAHERGZ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-4ULAI3BI.mjs +0 -23
- package/dist/lib/node-esm/chunk-4ULAI3BI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-T42IEBEL.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -284
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/meta.mjs +0 -12
- package/dist/lib/node-esm/meta.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -10
- package/dist/lib/node-esm/types/index.mjs.map +0 -7
package/dist/lib/node/index.cjs
CHANGED
|
@@ -34,20 +34,21 @@ __export(node_exports, {
|
|
|
34
34
|
default: () => src_default
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(node_exports);
|
|
37
|
-
var
|
|
37
|
+
var import_chunk_I42JKRXR = require("./chunk-I42JKRXR.cjs");
|
|
38
38
|
var import_chunk_EMD6A66G = require("./chunk-EMD6A66G.cjs");
|
|
39
|
-
var import_react =
|
|
39
|
+
var import_react = require("@phosphor-icons/react");
|
|
40
|
+
var import_react2 = __toESM(require("react"));
|
|
40
41
|
var import_echo_schema = require("@dxos/echo-schema");
|
|
41
42
|
var import_local_storage = require("@dxos/local-storage");
|
|
42
43
|
var import_types = require("@dxos/plugin-space/types");
|
|
43
44
|
var import_react_ui = require("@dxos/react-ui");
|
|
44
45
|
var import_react_ui_theme = require("@dxos/react-ui-theme");
|
|
45
|
-
var import_react2 = __toESM(require("react"));
|
|
46
46
|
var import_react3 = __toESM(require("react"));
|
|
47
|
+
var import_react4 = __toESM(require("react"));
|
|
47
48
|
var import_plugin_settings = require("@dxos/plugin-settings");
|
|
48
49
|
var import_react_ui2 = require("@dxos/react-ui");
|
|
49
|
-
var
|
|
50
|
-
var
|
|
50
|
+
var import_react5 = require("@phosphor-icons/react");
|
|
51
|
+
var import_react6 = __toESM(require("react"));
|
|
51
52
|
var import_app_framework = require("@dxos/app-framework");
|
|
52
53
|
var import_echo_schema2 = require("@dxos/echo-schema");
|
|
53
54
|
var import_types2 = require("@dxos/plugin-ipfs/types");
|
|
@@ -59,10 +60,10 @@ var import_react_ui_theme2 = require("@dxos/react-ui-theme");
|
|
|
59
60
|
var import_util = require("@dxos/util");
|
|
60
61
|
var import_react_ui_stack = require("@dxos/react-ui-stack");
|
|
61
62
|
var StackSettings = ({ settings }) => {
|
|
62
|
-
const { t } = (0, import_react_ui2.useTranslation)(
|
|
63
|
-
return /* @__PURE__ */
|
|
63
|
+
const { t } = (0, import_react_ui2.useTranslation)(import_chunk_I42JKRXR.STACK_PLUGIN);
|
|
64
|
+
return /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, /* @__PURE__ */ import_react4.default.createElement(import_plugin_settings.SettingsValue, {
|
|
64
65
|
label: t("settings separation label")
|
|
65
|
-
}, /* @__PURE__ */
|
|
66
|
+
}, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.Switch, {
|
|
66
67
|
checked: settings.separation,
|
|
67
68
|
onCheckedChange: (checked) => settings.separation = !!checked
|
|
68
69
|
})));
|
|
@@ -71,15 +72,15 @@ var dataHasAddSectionDialogProps = (data) => {
|
|
|
71
72
|
return "subject" in data && typeof data.subject === "object" && !!data.subject && "position" in data.subject && typeof data.subject.position === "string" && "collection" in data.subject;
|
|
72
73
|
};
|
|
73
74
|
var AddSectionDialog = ({ path, position, collection }) => {
|
|
74
|
-
const { t } = (0, import_react_ui3.useTranslation)(
|
|
75
|
-
const stackPlugin = (0, import_app_framework.usePlugin)(
|
|
75
|
+
const { t } = (0, import_react_ui3.useTranslation)(import_chunk_I42JKRXR.STACK_PLUGIN);
|
|
76
|
+
const stackPlugin = (0, import_app_framework.usePlugin)(import_chunk_I42JKRXR.STACK_PLUGIN);
|
|
76
77
|
const fileManagerPlugin = (0, import_app_framework.useResolvePlugin)(import_app_framework.parseFileManagerPlugin);
|
|
77
|
-
const fileRef = (0,
|
|
78
|
+
const fileRef = (0, import_react6.useRef)(null);
|
|
78
79
|
const { dispatch } = (0, import_app_framework.useIntent)();
|
|
79
80
|
const space = (0, import_echo.getSpace)(collection);
|
|
80
|
-
const [pending, setPending] = (0,
|
|
81
|
-
const [uploadError, setUploadError] = (0,
|
|
82
|
-
const handleAdd = (0,
|
|
81
|
+
const [pending, setPending] = (0, import_react6.useState)(false);
|
|
82
|
+
const [uploadError, setUploadError] = (0, import_react6.useState)();
|
|
83
|
+
const handleAdd = (0, import_react6.useCallback)((sectionObject) => {
|
|
83
84
|
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));
|
|
84
85
|
collection.objects.splice(index + (position === "after" ? 1 : 0), 0, sectionObject);
|
|
85
86
|
const stack = collection.views[import_chunk_EMD6A66G.StackViewType.typename];
|
|
@@ -117,20 +118,20 @@ var AddSectionDialog = ({ path, position, collection }) => {
|
|
|
117
118
|
setUploadError(err);
|
|
118
119
|
}
|
|
119
120
|
} : void 0;
|
|
120
|
-
return /* @__PURE__ */
|
|
121
|
+
return /* @__PURE__ */ import_react6.default.createElement(import_react_ui3.Dialog.Content, null, /* @__PURE__ */ import_react6.default.createElement(import_react_ui3.Dialog.Title, null, t(`add section ${position} dialog title`)), /* @__PURE__ */ import_react6.default.createElement(import_react_ui_searchlist.SearchList.Root, {
|
|
121
122
|
label: t("add section input placeholder")
|
|
122
|
-
}, /* @__PURE__ */
|
|
123
|
+
}, /* @__PURE__ */ import_react6.default.createElement(import_react_ui_searchlist.SearchList.Input, {
|
|
123
124
|
placeholder: t("add section input placeholder"),
|
|
124
125
|
classNames: "pli-3",
|
|
125
126
|
disabled: pending
|
|
126
|
-
}), /* @__PURE__ */
|
|
127
|
+
}), /* @__PURE__ */ import_react6.default.createElement(import_react_ui_searchlist.SearchList.Content, {
|
|
127
128
|
classNames: "min-bs-24 bs-fit max-bs-64 overflow-auto",
|
|
128
129
|
...pending && {
|
|
129
130
|
inert: "true"
|
|
130
131
|
}
|
|
131
132
|
}, stackPlugin?.provides?.stack.creators?.map(({ id, icon: Icon, label: propsLabel, testId, intent }) => {
|
|
132
133
|
const label = (0, import_react_ui3.toLocalizedString)(propsLabel, t);
|
|
133
|
-
return /* @__PURE__ */
|
|
134
|
+
return /* @__PURE__ */ import_react6.default.createElement(import_react_ui_searchlist.SearchList.Item, {
|
|
134
135
|
value: label,
|
|
135
136
|
key: id,
|
|
136
137
|
onSelect: async () => {
|
|
@@ -145,31 +146,31 @@ var AddSectionDialog = ({ path, position, collection }) => {
|
|
|
145
146
|
},
|
|
146
147
|
classNames: "flex items-center gap-2 pli-2",
|
|
147
148
|
"data-testid": testId
|
|
148
|
-
}, Icon && /* @__PURE__ */
|
|
149
|
+
}, Icon && /* @__PURE__ */ import_react6.default.createElement(Icon, {
|
|
149
150
|
className: (0, import_react_ui_theme2.mx)((0, import_react_ui_theme2.getSize)(4), "shrink-0")
|
|
150
|
-
}), /* @__PURE__ */
|
|
151
|
+
}), /* @__PURE__ */ import_react6.default.createElement("span", {
|
|
151
152
|
className: "grow truncate"
|
|
152
153
|
}, label));
|
|
153
|
-
}), handleFileUpload && /* @__PURE__ */
|
|
154
|
+
}), handleFileUpload && /* @__PURE__ */ import_react6.default.createElement(import_react_ui_searchlist.SearchList.Item, {
|
|
154
155
|
value: t("upload file label"),
|
|
155
156
|
classNames: "flex items-center gap-2 pli-2",
|
|
156
157
|
onSelect: () => fileRef.current?.click()
|
|
157
|
-
}, /* @__PURE__ */
|
|
158
|
+
}, /* @__PURE__ */ import_react6.default.createElement(import_react5.FilePlus, null), /* @__PURE__ */ import_react6.default.createElement("span", {
|
|
158
159
|
className: "grow truncate"
|
|
159
|
-
}, t("upload file label"))), uploadError && /* @__PURE__ */
|
|
160
|
+
}, t("upload file label"))), uploadError && /* @__PURE__ */ import_react6.default.createElement("div", {
|
|
160
161
|
className: "text-error-500"
|
|
161
|
-
}, uploadError.message))), handleFileUpload && /* @__PURE__ */
|
|
162
|
+
}, uploadError.message))), handleFileUpload && /* @__PURE__ */ import_react6.default.createElement("input", {
|
|
162
163
|
type: "file",
|
|
163
164
|
className: "sr-only",
|
|
164
165
|
ref: fileRef,
|
|
165
166
|
onChange: ({ target: { files } }) => files && handleFileUpload(files[0])
|
|
166
167
|
}));
|
|
167
168
|
};
|
|
168
|
-
var StackMain =
|
|
169
|
+
var StackMain = import_react3.default.lazy(() => import("./StackMain-XJGYFDDN.cjs"));
|
|
169
170
|
var translations_default = [
|
|
170
171
|
{
|
|
171
172
|
"en-US": {
|
|
172
|
-
[
|
|
173
|
+
[import_chunk_I42JKRXR.STACK_PLUGIN]: {
|
|
173
174
|
"plugin name": "Stacks",
|
|
174
175
|
"settings separation label": "Separate sections",
|
|
175
176
|
"add section beforeAll dialog title": "Add a section to the start",
|
|
@@ -185,21 +186,21 @@ var translations_default = [
|
|
|
185
186
|
...import_react_ui_stack.translations
|
|
186
187
|
];
|
|
187
188
|
var StackPlugin = () => {
|
|
188
|
-
const settings = new import_local_storage.LocalStorageStore(
|
|
189
|
+
const settings = new import_local_storage.LocalStorageStore(import_chunk_I42JKRXR.STACK_PLUGIN, {
|
|
189
190
|
separation: true
|
|
190
191
|
});
|
|
191
192
|
const stackState = (0, import_echo_schema.create)({
|
|
192
193
|
creators: []
|
|
193
194
|
});
|
|
194
195
|
return {
|
|
195
|
-
meta:
|
|
196
|
+
meta: import_chunk_I42JKRXR.meta_default,
|
|
196
197
|
ready: async (plugins) => {
|
|
197
198
|
settings.prop({
|
|
198
199
|
key: "separation",
|
|
199
200
|
type: import_local_storage.LocalStorageStore.bool()
|
|
200
201
|
});
|
|
201
202
|
for (const plugin of plugins) {
|
|
202
|
-
if (plugin.meta.id ===
|
|
203
|
+
if (plugin.meta.id === import_chunk_I42JKRXR.STACK_PLUGIN) {
|
|
203
204
|
continue;
|
|
204
205
|
}
|
|
205
206
|
if (Array.isArray(plugin.provides?.stack?.creators)) {
|
|
@@ -215,12 +216,13 @@ var StackPlugin = () => {
|
|
|
215
216
|
placeholder: [
|
|
216
217
|
"stack title placeholder",
|
|
217
218
|
{
|
|
218
|
-
ns:
|
|
219
|
+
ns: import_chunk_I42JKRXR.STACK_PLUGIN
|
|
219
220
|
}
|
|
220
221
|
],
|
|
221
|
-
icon:
|
|
222
|
+
icon: (props) => /* @__PURE__ */ import_react2.default.createElement(import_react.StackSimple, props),
|
|
223
|
+
iconSymbol: "ph--stack-simple--regular"
|
|
222
224
|
},
|
|
223
|
-
[
|
|
225
|
+
[import_chunk_I42JKRXR.SECTION_IDENTIFIER]: {
|
|
224
226
|
parse: (section, type) => {
|
|
225
227
|
switch (type) {
|
|
226
228
|
case "node":
|
|
@@ -247,33 +249,33 @@ var StackPlugin = () => {
|
|
|
247
249
|
surface: {
|
|
248
250
|
component: ({ data, role }) => {
|
|
249
251
|
switch (data.component) {
|
|
250
|
-
case `${
|
|
251
|
-
return dataHasAddSectionDialogProps(data) ? /* @__PURE__ */
|
|
252
|
+
case `${import_chunk_I42JKRXR.STACK_PLUGIN}/AddSectionDialog`:
|
|
253
|
+
return dataHasAddSectionDialogProps(data) ? /* @__PURE__ */ import_react2.default.createElement(AddSectionDialog, data.subject) : null;
|
|
252
254
|
}
|
|
253
255
|
const primary = data.active ?? data.object;
|
|
254
256
|
switch (role) {
|
|
255
257
|
case "main":
|
|
256
|
-
return primary instanceof import_types.CollectionType ? /* @__PURE__ */
|
|
258
|
+
return primary instanceof import_types.CollectionType ? /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Main.Content, {
|
|
257
259
|
bounce: true,
|
|
258
260
|
classNames: [
|
|
259
261
|
import_react_ui_theme.baseSurface,
|
|
260
262
|
import_react_ui_theme.topbarBlockPaddingStart,
|
|
261
263
|
import_react_ui_theme.bottombarBlockPaddingEnd
|
|
262
264
|
]
|
|
263
|
-
}, /* @__PURE__ */
|
|
265
|
+
}, /* @__PURE__ */ import_react2.default.createElement(StackMain, {
|
|
264
266
|
collection: primary,
|
|
265
267
|
separation: settings.values.separation
|
|
266
268
|
})) : null;
|
|
267
269
|
case "article":
|
|
268
|
-
return primary instanceof import_types.CollectionType ? /* @__PURE__ */
|
|
270
|
+
return primary instanceof import_types.CollectionType ? /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
269
271
|
role: "none",
|
|
270
272
|
className: "row-span-2 overflow-auto"
|
|
271
|
-
}, /* @__PURE__ */
|
|
273
|
+
}, /* @__PURE__ */ import_react2.default.createElement(StackMain, {
|
|
272
274
|
collection: primary,
|
|
273
275
|
separation: settings.values.separation
|
|
274
276
|
})) : null;
|
|
275
277
|
case "settings": {
|
|
276
|
-
return data.plugin ===
|
|
278
|
+
return data.plugin === import_chunk_I42JKRXR.meta_default.id ? /* @__PURE__ */ import_react2.default.createElement(StackSettings, {
|
|
277
279
|
settings: settings.values
|
|
278
280
|
}) : null;
|
|
279
281
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/StackPlugin.tsx", "../../../src/components/index.ts", "../../../src/components/StackSettings.tsx", "../../../src/components/AddSectionDialog.tsx", "../../../src/translations.ts", "../../../src/index.ts"],
|
|
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 } from '@dxos/echo-schema';\nimport { type EchoReactiveObject } from '@dxos/echo-schema';\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: EchoReactiveObject<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 schema: [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 switch (role) {\n case 'main':\n return primary instanceof CollectionType ? (\n <Main.Content bounce classNames={[baseSurface, topbarBlockPaddingStart, bottombarBlockPaddingEnd]}>\n <StackMain collection={primary} separation={settings.values.separation} />\n </Main.Content>\n ) : null;\n case 'article':\n return primary instanceof CollectionType ? (\n <div role='none' className='row-span-2 overflow-auto'>\n <StackMain collection={primary} separation={settings.values.separation} />\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 React from 'react';\n\n// Lazily load components for content surfaces.\nexport const StackMain = React.lazy(() => import('./StackMain'));\n\nexport * from './StackSettings';\nexport * from './AddSectionDialog';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { SettingsValue } from '@dxos/plugin-settings';\nimport { Input, useTranslation } from '@dxos/react-ui';\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 <SettingsValue label={t('settings separation label')}>\n <Input.Switch checked={settings.separation} onCheckedChange={(checked) => (settings.separation = !!checked)} />\n </SettingsValue>\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 EchoReactiveObject, create } from '@dxos/echo-schema';\nimport { FileType } from '@dxos/plugin-ipfs/types';\nimport { type CollectionType } from '@dxos/plugin-space/types';\nimport { getSpace } from '@dxos/react-client/echo';\nimport { Dialog, toLocalizedString, useTranslation } from '@dxos/react-ui';\nimport { Path } from '@dxos/react-ui-mosaic';\nimport { SearchList } from '@dxos/react-ui-searchlist';\nimport { type AddSectionPosition } from '@dxos/react-ui-stack';\nimport { getSize, mx } from '@dxos/react-ui-theme';\nimport { nonNullable } from '@dxos/util';\n\nimport { STACK_PLUGIN } from '../meta';\nimport { StackViewType, type StackPluginProvides } 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: EchoReactiveObject<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 },\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,
|
|
6
|
-
"names": ["import_react", "import_react_ui", "import_echo_schema", "import_types", "import_react_ui_theme", "StackSettings", "settings", "t", "useTranslation", "STACK_PLUGIN", "React", "SettingsValue", "label", "Input", "Switch", "checked", "separation", "onCheckedChange", "dataHasAddSectionDialogProps", "data", "subject", "position", "AddSectionDialog", "path", "collection", "stackPlugin", "usePlugin", "fileManagerPlugin", "useResolvePlugin", "parseFileManagerPlugin", "fileRef", "useRef", "dispatch", "useIntent", "space", "getSpace", "pending", "setPending", "useState", "uploadError", "setUploadError", "handleAdd", "useCallback", "sectionObject", "index", "objects", "length", "filter", "nonNullable", "findIndex", "section", "id", "Path", "last", "splice", "stack", "views", "StackViewType", "typename", "sections", "action", "LayoutAction", "SET_LAYOUT", "element", "state", "handleFileUpload", "provides", "file", "upload", "filename", "name", "split", "info", "obj", "create", "FileType", "type", "cid", "err", "undefined", "Dialog", "Content", "Title", "SearchList", "Root", "placeholder", "classNames", "disabled", "inert", "creators", "map", "icon", "Icon", "propsLabel", "testId", "intent", "toLocalizedString", "Item", "value", "key", "onSelect", "nextSection", "data-testid", "className", "mx", "getSize", "span", "current", "click", "FilePlus", "div", "message", "input", "ref", "onChange", "target", "files", "StackMain", "lazy", "stackTranslations", "StackPlugin", "LocalStorageStore", "stackState", "meta", "ready", "plugins", "prop", "bool", "plugin", "Array", "isArray", "push", "values", "metadata", "records", "ns", "SECTION_IDENTIFIER", "parse", "object", "title", "translations", "echo", "schema", "surface", "component", "role", "primary", "active", "CollectionType", "Main", "bounce", "baseSurface", "topbarBlockPaddingStart", "bottombarBlockPaddingEnd"]
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { StackSimple, type IconProps } from '@phosphor-icons/react';\nimport React from 'react';\n\nimport { type Plugin, type PluginDefinition } from '@dxos/app-framework';\nimport { create } from '@dxos/echo-schema';\nimport { type EchoReactiveObject } from '@dxos/echo-schema';\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: (props: IconProps) => <StackSimple {...props} />,\n iconSymbol: 'ph--stack-simple--regular',\n },\n [SECTION_IDENTIFIER]: {\n parse: (section: { object: EchoReactiveObject<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 schema: [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 switch (role) {\n case 'main':\n return primary instanceof CollectionType ? (\n <Main.Content bounce classNames={[baseSurface, topbarBlockPaddingStart, bottombarBlockPaddingEnd]}>\n <StackMain collection={primary} separation={settings.values.separation} />\n </Main.Content>\n ) : null;\n case 'article':\n return primary instanceof CollectionType ? (\n <div role='none' className='row-span-2 overflow-auto'>\n <StackMain collection={primary} separation={settings.values.separation} />\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 React from 'react';\n\n// Lazily load components for content surfaces.\nexport const StackMain = React.lazy(() => import('./StackMain'));\n\nexport * from './StackSettings';\nexport * from './AddSectionDialog';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { SettingsValue } from '@dxos/plugin-settings';\nimport { Input, useTranslation } from '@dxos/react-ui';\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 <SettingsValue label={t('settings separation label')}>\n <Input.Switch checked={settings.separation} onCheckedChange={(checked) => (settings.separation = !!checked)} />\n </SettingsValue>\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 EchoReactiveObject, create } from '@dxos/echo-schema';\nimport { FileType } from '@dxos/plugin-ipfs/types';\nimport { type CollectionType } from '@dxos/plugin-space/types';\nimport { getSpace } from '@dxos/react-client/echo';\nimport { Dialog, toLocalizedString, useTranslation } from '@dxos/react-ui';\nimport { Path } from '@dxos/react-ui-mosaic';\nimport { SearchList } from '@dxos/react-ui-searchlist';\nimport { type AddSectionPosition } from '@dxos/react-ui-stack';\nimport { getSize, mx } from '@dxos/react-ui-theme';\nimport { nonNullable } from '@dxos/util';\n\nimport { STACK_PLUGIN } from '../meta';\nimport { StackViewType, type StackPluginProvides } 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: EchoReactiveObject<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 },\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": ";;;;;;;;;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6H;gBAASrI,YAAYV,SAAS8H,OAAOpH;oBAE5D;YACN,KAAK,YAAY;AACf,qBAAOG,KAAK6G,WAAWL,mCAAKxE,KAAKzC,8BAAAA,QAAA,cAACL,eAAAA;gBAAcC,UAAUA,SAAS8H;mBAAa;YAClF;YACA;AACE,qBAAO;UACX;QACF;MACF;MACA7E,OAAOmE;IACT;EACF;AACF;AK9FA,IAAA,cAAeF;",
|
|
6
|
+
"names": ["import_react", "import_react_ui", "import_echo_schema", "import_types", "import_react_ui_theme", "StackSettings", "settings", "t", "useTranslation", "STACK_PLUGIN", "React", "SettingsValue", "label", "Input", "Switch", "checked", "separation", "onCheckedChange", "dataHasAddSectionDialogProps", "data", "subject", "position", "AddSectionDialog", "path", "collection", "stackPlugin", "usePlugin", "fileManagerPlugin", "useResolvePlugin", "parseFileManagerPlugin", "fileRef", "useRef", "dispatch", "useIntent", "space", "getSpace", "pending", "setPending", "useState", "uploadError", "setUploadError", "handleAdd", "useCallback", "sectionObject", "index", "objects", "length", "filter", "nonNullable", "findIndex", "section", "id", "Path", "last", "splice", "stack", "views", "StackViewType", "typename", "sections", "action", "LayoutAction", "SET_LAYOUT", "element", "state", "handleFileUpload", "provides", "file", "upload", "filename", "name", "split", "info", "obj", "create", "FileType", "type", "cid", "err", "undefined", "Dialog", "Content", "Title", "SearchList", "Root", "placeholder", "classNames", "disabled", "inert", "creators", "map", "icon", "Icon", "propsLabel", "testId", "intent", "toLocalizedString", "Item", "value", "key", "onSelect", "nextSection", "data-testid", "className", "mx", "getSize", "span", "current", "click", "FilePlus", "div", "message", "input", "ref", "onChange", "target", "files", "StackMain", "lazy", "stackTranslations", "StackPlugin", "LocalStorageStore", "stackState", "meta", "ready", "plugins", "prop", "bool", "plugin", "Array", "isArray", "push", "values", "metadata", "records", "ns", "props", "StackSimple", "iconSymbol", "SECTION_IDENTIFIER", "parse", "object", "title", "translations", "echo", "schema", "surface", "component", "role", "primary", "active", "CollectionType", "Main", "bounce", "baseSurface", "topbarBlockPaddingStart", "bottombarBlockPaddingEnd"]
|
|
7
7
|
}
|
package/dist/lib/node/meta.cjs
CHANGED
|
@@ -18,12 +18,12 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var meta_exports = {};
|
|
20
20
|
__export(meta_exports, {
|
|
21
|
-
SECTION_IDENTIFIER: () =>
|
|
22
|
-
STACK_PLUGIN: () =>
|
|
23
|
-
default: () =>
|
|
21
|
+
SECTION_IDENTIFIER: () => import_chunk_I42JKRXR.SECTION_IDENTIFIER,
|
|
22
|
+
STACK_PLUGIN: () => import_chunk_I42JKRXR.STACK_PLUGIN,
|
|
23
|
+
default: () => import_chunk_I42JKRXR.meta_default
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(meta_exports);
|
|
26
|
-
var
|
|
26
|
+
var import_chunk_I42JKRXR = require("./chunk-I42JKRXR.cjs");
|
|
27
27
|
// Annotate the CommonJS export names for ESM import in node:
|
|
28
28
|
0 && (module.exports = {
|
|
29
29
|
SECTION_IDENTIFIER,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["meta.cjs"],
|
|
4
|
-
"sourcesContent": ["import {\n SECTION_IDENTIFIER,\n STACK_PLUGIN,\n meta_default\n} from \"./chunk-
|
|
4
|
+
"sourcesContent": ["import {\n SECTION_IDENTIFIER,\n STACK_PLUGIN,\n meta_default\n} from \"./chunk-I42JKRXR.cjs\";\nexport {\n SECTION_IDENTIFIER,\n STACK_PLUGIN,\n meta_default as default\n};\n//# sourceMappingURL=meta.cjs.map\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAIO;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/lib/node/meta.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/plugins/plugin-stack/src/meta.tsx":{"bytes":1422,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytes":2578,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/plugin-settings","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.tsx","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/types/stack.ts":{"bytes":3077,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/types/types.ts":{"bytes":2031,"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":18438,"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/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-ipfs/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","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.tsx","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.tsx","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/StackMain.tsx":{"bytes":26729,"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/echo-schema","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-client/echo","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-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/meta.tsx","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":1140,"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":2731,"imports":[{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.tsx","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/StackPlugin.tsx":{"bytes":14243,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","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.tsx","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":19550},"packages/plugins/plugin-stack/dist/lib/node/index.cjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-PGL7XDNJ.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-EMD6A66G.cjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","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/plugin-settings","kind":"import-statement","external":true},{"path":"@dxos/react-ui","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/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-ipfs/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","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-P5DO4ND6.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":3542},"packages/plugins/plugin-stack/src/components/index.ts":{"bytesInOutput":99},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytesInOutput":554},"packages/plugins/plugin-stack/src/components/AddSectionDialog.tsx":{"bytesInOutput":4643},"packages/plugins/plugin-stack/src/translations.ts":{"bytesInOutput":710},"packages/plugins/plugin-stack/src/index.ts":{"bytesInOutput":31}},"bytes":10328},"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-PGL7XDNJ.cjs","kind":"import-statement"}],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","default"],"entryPoint":"packages/plugins/plugin-stack/src/meta.tsx","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-EMD6A66G.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-P5DO4ND6.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":19298},"packages/plugins/plugin-stack/dist/lib/node/StackMain-P5DO4ND6.cjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-PGL7XDNJ.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-EMD6A66G.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/echo-schema","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-client/echo","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-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}],"exports":["default"],"entryPoint":"packages/plugins/plugin-stack/src/components/StackMain.tsx","inputs":{"packages/plugins/plugin-stack/src/components/StackMain.tsx":{"bytesInOutput":6274},"packages/plugins/plugin-stack/src/components/AddSection.tsx":{"bytesInOutput":2546}},"bytes":9234},"packages/plugins/plugin-stack/dist/lib/node/chunk-PGL7XDNJ.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":632},"packages/plugins/plugin-stack/dist/lib/node/chunk-PGL7XDNJ.cjs":{"imports":[],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","meta_default"],"inputs":{"packages/plugins/plugin-stack/src/meta.tsx":{"bytesInOutput":299}},"bytes":455},"packages/plugins/plugin-stack/dist/lib/node/chunk-EMD6A66G.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1475},"packages/plugins/plugin-stack/dist/lib/node/chunk-EMD6A66G.cjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["SectionSchema","StackViewType"],"inputs":{"packages/plugins/plugin-stack/src/types/stack.ts":{"bytesInOutput":463},"packages/plugins/plugin-stack/src/types/index.ts":{"bytesInOutput":0}},"bytes":605}}}
|
|
1
|
+
{"inputs":{"packages/plugins/plugin-stack/src/meta.tsx":{"bytes":2015,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytes":2578,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/plugin-settings","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.tsx","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/types/stack.ts":{"bytes":3077,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/types/types.ts":{"bytes":2031,"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":18438,"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/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-ipfs/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","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.tsx","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.tsx","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/StackMain.tsx":{"bytes":26459,"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/echo-schema","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-client/echo","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-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/meta.tsx","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":1140,"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":2731,"imports":[{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.tsx","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/StackPlugin.tsx":{"bytes":14740,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","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.tsx","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":19831},"packages/plugins/plugin-stack/dist/lib/node/index.cjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-I42JKRXR.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-EMD6A66G.cjs","kind":"import-statement"},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","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/plugin-settings","kind":"import-statement","external":true},{"path":"@dxos/react-ui","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/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-ipfs/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","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-XJGYFDDN.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":3688},"packages/plugins/plugin-stack/src/components/index.ts":{"bytesInOutput":99},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytesInOutput":554},"packages/plugins/plugin-stack/src/components/AddSectionDialog.tsx":{"bytesInOutput":4643},"packages/plugins/plugin-stack/src/translations.ts":{"bytesInOutput":710},"packages/plugins/plugin-stack/src/index.ts":{"bytesInOutput":31}},"bytes":10474},"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-I42JKRXR.cjs","kind":"import-statement"}],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","default"],"entryPoint":"packages/plugins/plugin-stack/src/meta.tsx","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-EMD6A66G.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-XJGYFDDN.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":19143},"packages/plugins/plugin-stack/dist/lib/node/StackMain-XJGYFDDN.cjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-I42JKRXR.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-EMD6A66G.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/echo-schema","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-client/echo","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-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}],"exports":["default"],"entryPoint":"packages/plugins/plugin-stack/src/components/StackMain.tsx","inputs":{"packages/plugins/plugin-stack/src/components/StackMain.tsx":{"bytesInOutput":6206},"packages/plugins/plugin-stack/src/components/AddSection.tsx":{"bytesInOutput":2546}},"bytes":9166},"packages/plugins/plugin-stack/dist/lib/node/chunk-I42JKRXR.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":962},"packages/plugins/plugin-stack/dist/lib/node/chunk-I42JKRXR.cjs":{"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","meta_default"],"inputs":{"packages/plugins/plugin-stack/src/meta.tsx":{"bytesInOutput":470}},"bytes":626},"packages/plugins/plugin-stack/dist/lib/node/chunk-EMD6A66G.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1475},"packages/plugins/plugin-stack/dist/lib/node/chunk-EMD6A66G.cjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["SectionSchema","StackViewType"],"inputs":{"packages/plugins/plugin-stack/src/types/stack.ts":{"bytesInOutput":463},"packages/plugins/plugin-stack/src/types/index.ts":{"bytesInOutput":0}},"bytes":605}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackPlugin.d.ts","sourceRoot":"","sources":["../../../src/StackPlugin.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"StackPlugin.d.ts","sourceRoot":"","sources":["../../../src/StackPlugin.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAYzE,OAAO,EAAE,KAAK,mBAAmB,EAAgE,MAAM,SAAS,CAAC;AAEjH,eAAO,MAAM,WAAW,QAAO,gBAAgB,CAAC,mBAAmB,CA+ElE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackMain.d.ts","sourceRoot":"","sources":["../../../../src/components/StackMain.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAa5D,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAsB/D,KAAK,cAAc,GAAG;IACpB,UAAU,EAAE,cAAc,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,QAAA,MAAM,SAAS,+BAAgC,cAAc,
|
|
1
|
+
{"version":3,"file":"StackMain.d.ts","sourceRoot":"","sources":["../../../../src/components/StackMain.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAa5D,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAsB/D,KAAK,cAAc,GAAG;IACpB,UAAU,EAAE,cAAc,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,QAAA,MAAM,SAAS,+BAAgC,cAAc,sBA2K5D,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
package/dist/types/src/meta.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { type IconProps } from '@phosphor-icons/react';
|
|
2
|
+
import React from 'react';
|
|
1
3
|
export declare const STACK_PLUGIN = "dxos.org/plugin/stack";
|
|
2
4
|
export declare const SECTION_IDENTIFIER = "dxos.org/type/StackSection";
|
|
3
5
|
declare const _default: {
|
|
4
6
|
id: string;
|
|
5
7
|
name: string;
|
|
6
|
-
|
|
8
|
+
iconComponent: (props: IconProps) => React.JSX.Element;
|
|
9
|
+
iconSymbol: string;
|
|
7
10
|
};
|
|
8
11
|
export default _default;
|
|
9
12
|
//# sourceMappingURL=meta.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY,0BAA0B,CAAC;AACpD,eAAO,MAAM,kBAAkB,+BAA+B,CAAC
|
|
1
|
+
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAe,MAAM,uBAAuB,CAAC;AACpE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,eAAO,MAAM,YAAY,0BAA0B,CAAC;AACpD,eAAO,MAAM,kBAAkB,+BAA+B,CAAC;;;;2BAMtC,SAAS;;;AAJlC,wBAME"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-stack",
|
|
3
|
-
"version": "0.6.12-
|
|
3
|
+
"version": "0.6.12-staging.0b4bb48",
|
|
4
4
|
"description": "DXOS Surface plugin for Stack entities",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -10,24 +10,21 @@
|
|
|
10
10
|
".": {
|
|
11
11
|
"browser": "./dist/lib/browser/index.mjs",
|
|
12
12
|
"node": {
|
|
13
|
-
"
|
|
14
|
-
"default": "./dist/lib/node-esm/index.mjs"
|
|
13
|
+
"default": "./dist/lib/node/index.cjs"
|
|
15
14
|
},
|
|
16
15
|
"types": "./dist/types/src/index.d.ts"
|
|
17
16
|
},
|
|
18
17
|
"./meta": {
|
|
19
18
|
"browser": "./dist/lib/browser/meta.mjs",
|
|
20
19
|
"node": {
|
|
21
|
-
"
|
|
22
|
-
"default": "./dist/lib/node-esm/meta.mjs"
|
|
20
|
+
"default": "./dist/lib/node/meta.cjs"
|
|
23
21
|
},
|
|
24
22
|
"types": "./dist/types/src/meta.d.ts"
|
|
25
23
|
},
|
|
26
24
|
"./types": {
|
|
27
25
|
"browser": "./dist/lib/browser/types/index.mjs",
|
|
28
26
|
"node": {
|
|
29
|
-
"
|
|
30
|
-
"default": "./dist/lib/node-esm/types/index.mjs"
|
|
27
|
+
"default": "./dist/lib/node/types/index.cjs"
|
|
31
28
|
},
|
|
32
29
|
"types": "./dist/types/src/types/index.d.ts"
|
|
33
30
|
}
|
|
@@ -52,21 +49,21 @@
|
|
|
52
49
|
"@preact/signals-core": "^1.6.0",
|
|
53
50
|
"node-fetch": "^2.6.0",
|
|
54
51
|
"react-is": "~18.2.0",
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/invariant": "0.6.12-
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/plugin-client": "0.6.12-
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/plugin-graph": "0.6.12-
|
|
62
|
-
"@dxos/plugin-
|
|
63
|
-
"@dxos/plugin-space": "0.6.12-
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/react-
|
|
67
|
-
"@dxos/react-ui-searchlist": "0.6.12-
|
|
68
|
-
"@dxos/react-ui-stack": "0.6.12-
|
|
69
|
-
"@dxos/util": "0.6.12-
|
|
52
|
+
"@dxos/app-framework": "0.6.12-staging.0b4bb48",
|
|
53
|
+
"@dxos/async": "0.6.12-staging.0b4bb48",
|
|
54
|
+
"@dxos/invariant": "0.6.12-staging.0b4bb48",
|
|
55
|
+
"@dxos/local-storage": "0.6.12-staging.0b4bb48",
|
|
56
|
+
"@dxos/plugin-client": "0.6.12-staging.0b4bb48",
|
|
57
|
+
"@dxos/echo-schema": "0.6.12-staging.0b4bb48",
|
|
58
|
+
"@dxos/plugin-graph": "0.6.12-staging.0b4bb48",
|
|
59
|
+
"@dxos/plugin-ipfs": "0.6.12-staging.0b4bb48",
|
|
60
|
+
"@dxos/plugin-space": "0.6.12-staging.0b4bb48",
|
|
61
|
+
"@dxos/react-ui-mosaic": "0.6.12-staging.0b4bb48",
|
|
62
|
+
"@dxos/plugin-settings": "0.6.12-staging.0b4bb48",
|
|
63
|
+
"@dxos/react-client": "0.6.12-staging.0b4bb48",
|
|
64
|
+
"@dxos/react-ui-searchlist": "0.6.12-staging.0b4bb48",
|
|
65
|
+
"@dxos/react-ui-stack": "0.6.12-staging.0b4bb48",
|
|
66
|
+
"@dxos/util": "0.6.12-staging.0b4bb48"
|
|
70
67
|
},
|
|
71
68
|
"devDependencies": {
|
|
72
69
|
"@babel/core": "^7.18.13",
|
|
@@ -75,18 +72,18 @@
|
|
|
75
72
|
"@types/react-dom": "~18.2.0",
|
|
76
73
|
"react": "~18.2.0",
|
|
77
74
|
"react-dom": "~18.2.0",
|
|
78
|
-
"vite": "5.4
|
|
79
|
-
"@dxos/react-ui
|
|
80
|
-
"@dxos/
|
|
81
|
-
"@dxos/
|
|
75
|
+
"vite": "^5.3.4",
|
|
76
|
+
"@dxos/react-ui": "0.6.12-staging.0b4bb48",
|
|
77
|
+
"@dxos/react-ui-theme": "0.6.12-staging.0b4bb48",
|
|
78
|
+
"@dxos/storybook-utils": "0.6.12-staging.0b4bb48"
|
|
82
79
|
},
|
|
83
80
|
"optionalDependencies": {
|
|
84
81
|
"@babel/core": "^7.18.13",
|
|
85
82
|
"@phosphor-icons/react": "^2.1.5",
|
|
86
|
-
"react": "
|
|
87
|
-
"react-dom": "
|
|
88
|
-
"@dxos/react-ui
|
|
89
|
-
"@dxos/react-ui": "0.6.12-
|
|
83
|
+
"react": "^18.0.0",
|
|
84
|
+
"react-dom": "^18.0.0",
|
|
85
|
+
"@dxos/react-ui": "0.6.12-staging.0b4bb48",
|
|
86
|
+
"@dxos/react-ui-theme": "0.6.12-staging.0b4bb48"
|
|
90
87
|
},
|
|
91
88
|
"publishConfig": {
|
|
92
89
|
"access": "public"
|
package/src/StackPlugin.tsx
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { StackSimple, type IconProps } from '@phosphor-icons/react';
|
|
5
6
|
import React from 'react';
|
|
6
7
|
|
|
7
8
|
import { type Plugin, type PluginDefinition } from '@dxos/app-framework';
|
|
@@ -43,7 +44,8 @@ export const StackPlugin = (): PluginDefinition<StackPluginProvides> => {
|
|
|
43
44
|
records: {
|
|
44
45
|
[StackViewType.typename]: {
|
|
45
46
|
placeholder: ['stack title placeholder', { ns: STACK_PLUGIN }],
|
|
46
|
-
icon:
|
|
47
|
+
icon: (props: IconProps) => <StackSimple {...props} />,
|
|
48
|
+
iconSymbol: 'ph--stack-simple--regular',
|
|
47
49
|
},
|
|
48
50
|
[SECTION_IDENTIFIER]: {
|
|
49
51
|
parse: (section: { object: EchoReactiveObject<any> }, type: string) => {
|