@dxos/plugin-stack 0.7.4 → 0.7.5-feature-compute.4d9d99a

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/lib/browser/StackMain-VH3YESQL.mjs +295 -0
  2. package/dist/lib/browser/StackMain-VH3YESQL.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-DS5KGEJG.mjs → chunk-WTGFKPPQ.mjs} +3 -3
  4. package/dist/lib/browser/chunk-WTGFKPPQ.mjs.map +7 -0
  5. package/dist/lib/browser/index.mjs +78 -235
  6. package/dist/lib/browser/index.mjs.map +4 -4
  7. package/dist/lib/browser/meta.json +1 -1
  8. package/dist/lib/node/StackMain-USQVAFKL.cjs +309 -0
  9. package/dist/lib/node/StackMain-USQVAFKL.cjs.map +7 -0
  10. package/dist/lib/node/{chunk-PA5PRDM6.cjs → chunk-CZCFFT2J.cjs} +7 -7
  11. package/dist/lib/node/chunk-CZCFFT2J.cjs.map +7 -0
  12. package/dist/lib/node/index.cjs +80 -231
  13. package/dist/lib/node/index.cjs.map +4 -4
  14. package/dist/lib/node/meta.json +1 -1
  15. package/dist/lib/node-esm/StackMain-DW27O56R.mjs +296 -0
  16. package/dist/lib/node-esm/StackMain-DW27O56R.mjs.map +7 -0
  17. package/dist/lib/node-esm/{chunk-JEQMG2E2.mjs → chunk-SJU6TPRI.mjs} +3 -3
  18. package/dist/lib/node-esm/chunk-SJU6TPRI.mjs.map +7 -0
  19. package/dist/lib/node-esm/index.mjs +78 -235
  20. package/dist/lib/node-esm/index.mjs.map +4 -4
  21. package/dist/lib/node-esm/meta.json +1 -1
  22. package/dist/types/src/StackPlugin.d.ts +1 -3
  23. package/dist/types/src/StackPlugin.d.ts.map +1 -1
  24. package/dist/types/src/components/StackMain.d.ts.map +1 -1
  25. package/dist/types/src/components/StackSection.d.ts.map +1 -1
  26. package/dist/types/src/components/index.d.ts +1 -2
  27. package/dist/types/src/components/index.d.ts.map +1 -1
  28. package/dist/types/src/index.d.ts +1 -3
  29. package/dist/types/src/index.d.ts.map +1 -1
  30. package/dist/types/src/meta.d.ts +1 -2
  31. package/dist/types/src/meta.d.ts.map +1 -1
  32. package/dist/types/src/types/stack.d.ts +6 -12
  33. package/dist/types/src/types/stack.d.ts.map +1 -1
  34. package/dist/types/src/types/types.d.ts +2 -17
  35. package/dist/types/src/types/types.d.ts.map +1 -1
  36. package/dist/types/tsconfig.tsbuildinfo +1 -0
  37. package/package.json +22 -31
  38. package/src/StackPlugin.tsx +61 -73
  39. package/src/components/StackMain.tsx +66 -76
  40. package/src/components/StackSection.tsx +2 -4
  41. package/src/components/index.ts +0 -1
  42. package/src/index.ts +1 -6
  43. package/src/meta.ts +1 -1
  44. package/src/types/types.ts +2 -31
  45. package/dist/lib/browser/StackMain-4D4J4IRK.mjs +0 -391
  46. package/dist/lib/browser/StackMain-4D4J4IRK.mjs.map +0 -7
  47. package/dist/lib/browser/chunk-DS5KGEJG.mjs.map +0 -7
  48. package/dist/lib/browser/meta.mjs +0 -11
  49. package/dist/lib/browser/meta.mjs.map +0 -7
  50. package/dist/lib/node/StackMain-V7C55NCF.cjs +0 -403
  51. package/dist/lib/node/StackMain-V7C55NCF.cjs.map +0 -7
  52. package/dist/lib/node/chunk-PA5PRDM6.cjs.map +0 -7
  53. package/dist/lib/node/meta.cjs +0 -32
  54. package/dist/lib/node/meta.cjs.map +0 -7
  55. package/dist/lib/node-esm/StackMain-5I43UWGF.mjs +0 -392
  56. package/dist/lib/node-esm/StackMain-5I43UWGF.mjs.map +0 -7
  57. package/dist/lib/node-esm/chunk-JEQMG2E2.mjs.map +0 -7
  58. package/dist/lib/node-esm/meta.mjs +0 -12
  59. package/dist/lib/node-esm/meta.mjs.map +0 -7
  60. package/dist/types/src/components/AddSection.d.ts +0 -6
  61. package/dist/types/src/components/AddSection.d.ts.map +0 -1
  62. package/dist/types/src/components/AddSectionDialog.d.ts +0 -14
  63. package/dist/types/src/components/AddSectionDialog.d.ts.map +0 -1
  64. package/src/components/AddSection.tsx +0 -102
  65. package/src/components/AddSectionDialog.tsx +0 -128
@@ -28,147 +28,29 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
  var node_exports = {};
30
30
  __export(node_exports, {
31
- SectionSchema: () => import_chunk_6IPBX635.SectionSchema,
31
+ SECTION_IDENTIFIER: () => import_chunk_CZCFFT2J.SECTION_IDENTIFIER,
32
+ STACK_PLUGIN: () => import_chunk_CZCFFT2J.STACK_PLUGIN,
32
33
  StackPlugin: () => StackPlugin,
33
- StackViewType: () => import_chunk_6IPBX635.StackViewType,
34
- default: () => src_default
34
+ meta: () => import_chunk_CZCFFT2J.meta
35
35
  });
36
36
  module.exports = __toCommonJS(node_exports);
37
- var import_chunk_PA5PRDM6 = require("./chunk-PA5PRDM6.cjs");
37
+ var import_chunk_CZCFFT2J = require("./chunk-CZCFFT2J.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
- var import_local_storage = require("@dxos/local-storage");
42
+ var import_plugin_client = require("@dxos/plugin-client");
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 import_react_ui2 = require("@dxos/react-ui");
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
- var StackSettings = ({ settings }) => {
61
- const { t } = (0, import_react_ui2.useTranslation)(import_chunk_PA5PRDM6.STACK_PLUGIN);
62
- return /* @__PURE__ */ import_react3.default.createElement(import_react3.default.Fragment, null, /* @__PURE__ */ import_react3.default.createElement(import_react_ui_form.DeprecatedFormInput, {
63
- label: t("settings separation label")
64
- }, /* @__PURE__ */ import_react3.default.createElement(import_react_ui2.Input.Switch, {
65
- checked: settings.separation,
66
- onCheckedChange: (checked) => settings.separation = !!checked
67
- })));
68
- };
69
- var dataHasAddSectionDialogProps = (data) => {
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"));
49
+ var StackMain = (0, import_react2.lazy)(() => import("./StackMain-USQVAFKL.cjs"));
168
50
  var translations_default = [
169
51
  {
170
52
  "en-US": {
171
- [import_chunk_PA5PRDM6.STACK_PLUGIN]: {
53
+ [import_chunk_CZCFFT2J.STACK_PLUGIN]: {
172
54
  "plugin name": "Stacks",
173
55
  "settings separation label": "Separate sections",
174
56
  "add section beforeAll dialog title": "Add a section to the start",
@@ -192,117 +74,84 @@ var translations_default = [
192
74
  },
193
75
  ...import_react_ui_stack.translations
194
76
  ];
195
- var StackPlugin = () => {
196
- const settings = new import_local_storage.LocalStorageStore(import_chunk_PA5PRDM6.STACK_PLUGIN, {
197
- separation: true
198
- });
199
- const stackState = (0, import_echo.create)({
200
- creators: []
201
- });
202
- return {
203
- meta: import_chunk_PA5PRDM6.meta_default,
204
- ready: async (plugins) => {
205
- settings.prop({
206
- key: "separation",
207
- type: import_local_storage.LocalStorageStore.bool()
208
- });
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
- },
218
- provides: {
219
- settings: settings.values,
220
- metadata: {
221
- records: {
222
- [import_chunk_6IPBX635.StackViewType.typename]: {
223
- placeholder: [
224
- "stack title placeholder",
225
- {
226
- ns: import_chunk_PA5PRDM6.STACK_PLUGIN
227
- }
228
- ],
229
- icon: "ph--stack-simple--regular"
230
- },
231
- [import_chunk_PA5PRDM6.SECTION_IDENTIFIER]: {
232
- parse: (section, type) => {
233
- switch (type) {
234
- case "node":
235
- return {
236
- id: section.object.id,
237
- label: section.object.title,
238
- data: section.object
239
- };
240
- case "object":
241
- return section.object;
242
- case "view-object":
243
- return section;
244
- }
77
+ var StackPlugin = () => (0, import_app_framework.definePlugin)(import_chunk_CZCFFT2J.meta, [
78
+ (0, import_app_framework.defineModule)({
79
+ id: `${import_chunk_CZCFFT2J.meta.id}/module/translations`,
80
+ activatesOn: import_app_framework.Events.SetupTranslations,
81
+ activate: () => (0, import_app_framework.contributes)(import_app_framework.Capabilities.Translations, translations_default)
82
+ }),
83
+ (0, import_app_framework.defineModule)({
84
+ id: `${import_chunk_CZCFFT2J.meta.id}/module/metadata`,
85
+ activatesOn: (0, import_app_framework.oneOf)(import_app_framework.Events.Startup, import_app_framework.Events.SetupAppGraph),
86
+ activate: () => [
87
+ (0, import_app_framework.contributes)(import_app_framework.Capabilities.Metadata, {
88
+ id: import_chunk_6IPBX635.StackViewType.typename,
89
+ metadata: {
90
+ placeholder: [
91
+ "stack title placeholder",
92
+ {
93
+ ns: import_chunk_CZCFFT2J.STACK_PLUGIN
245
94
  }
246
- }
95
+ ],
96
+ icon: "ph--stack-simple--regular"
247
97
  }
248
- },
249
- translations: translations_default,
250
- echo: {
251
- system: [
252
- import_chunk_6IPBX635.StackViewType
253
- ]
254
- },
255
- surface: {
256
- component: ({ data, role }) => {
257
- switch (data.component) {
258
- case `${import_chunk_PA5PRDM6.STACK_PLUGIN}/AddSectionDialog`:
259
- return dataHasAddSectionDialogProps(data) ? /* @__PURE__ */ import_react.default.createElement(AddSectionDialog, data.subject) : null;
260
- }
261
- const primary = data.active ?? data.object;
262
- const id = typeof data.id === "string" ? data.id : void 0;
263
- switch (role) {
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", {
278
- role: "none",
279
- className: "overflow-auto",
280
- style: {
281
- contain: "layout"
282
- }
283
- }, /* @__PURE__ */ import_react.default.createElement(StackMain, {
284
- id: id ?? (0, import_echo.fullyQualifiedId)(primary),
285
- collection: primary
286
- })) : null;
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;
98
+ }),
99
+ (0, import_app_framework.contributes)(import_app_framework.Capabilities.Metadata, {
100
+ id: import_chunk_CZCFFT2J.SECTION_IDENTIFIER,
101
+ metadata: {
102
+ parse: (section, type) => {
103
+ switch (type) {
104
+ case "node":
105
+ return {
106
+ id: section.object.id,
107
+ label: section.object.title,
108
+ data: section.object
109
+ };
110
+ case "object":
111
+ return section.object;
112
+ case "view-object":
113
+ return section;
291
114
  }
292
- default:
293
- return null;
294
115
  }
295
116
  }
296
- },
297
- stack: stackState
298
- }
299
- };
300
- };
301
- var src_default = StackPlugin;
117
+ })
118
+ ]
119
+ }),
120
+ (0, import_app_framework.defineModule)({
121
+ id: `${import_chunk_CZCFFT2J.meta.id}/module/schema`,
122
+ activatesOn: import_plugin_client.ClientEvents.SetupClient,
123
+ activate: () => (0, import_app_framework.contributes)(import_plugin_client.ClientCapabilities.SystemSchema, [
124
+ import_chunk_6IPBX635.StackViewType
125
+ ])
126
+ }),
127
+ (0, import_app_framework.defineModule)({
128
+ id: `${import_chunk_CZCFFT2J.meta.id}/module/react-surface`,
129
+ activatesOn: import_app_framework.Events.Startup,
130
+ activate: () => (0, import_app_framework.contributes)(import_app_framework.Capabilities.ReactSurface, (0, import_app_framework.createSurface)({
131
+ id: `${import_chunk_CZCFFT2J.STACK_PLUGIN}/article`,
132
+ role: "article",
133
+ filter: (data) => data.subject instanceof import_types.CollectionType,
134
+ component: ({ data }) => {
135
+ const id = typeof data.id === "string" ? data.id : void 0;
136
+ return /* @__PURE__ */ import_react.default.createElement("div", {
137
+ role: "none",
138
+ className: "overflow-auto",
139
+ style: {
140
+ contain: "layout"
141
+ }
142
+ }, /* @__PURE__ */ import_react.default.createElement(StackMain, {
143
+ id: id ?? (0, import_echo.fullyQualifiedId)(data.subject),
144
+ collection: data.subject
145
+ }));
146
+ }
147
+ }))
148
+ })
149
+ ]);
302
150
  // Annotate the CommonJS export names for ESM import in node:
303
151
  0 && (module.exports = {
304
- SectionSchema,
152
+ SECTION_IDENTIFIER,
153
+ STACK_PLUGIN,
305
154
  StackPlugin,
306
- StackViewType
155
+ meta
307
156
  });
308
157
  //# sourceMappingURL=index.cjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/StackPlugin.tsx", "../../../src/components/index.ts", "../../../src/components/StackSettings.tsx", "../../../src/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, 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;AAGlB,kBAAkE;AAClE,2BAAkC;AAClC,mBAA+B;AAC/B,sBAAqB;AACrB,4BAA+E;ACP/E,IAAAA,gBAAqB;ACArB,IAAAA,gBAAkB;AAElB,IAAAC,mBAAsC;AACtC,2BAAoC;ACHpC,IAAAD,gBAAyB;AACzB,IAAAA,gBAAqD;AAErD,2BAA6F;AAC7F,IAAAE,eAA0D;AAC1D,IAAAC,gBAAyB;AAEzB,IAAAF,mBAA0D;AAC1D,6BAAqB;AACrB,iCAA2B;AAC3B,IAAAG,yBAA4B;AAC5B,kBAA4B;ACX5B,4BAAkD;AFQ3C,IAAMC,gBAAgB,CAAC,EAAEC,SAAQ,MAAoC;AAC1E,QAAM,EAAEC,EAAC,QAAKC,iCAAeC,kCAAAA;AAE7B,SACE,8BAAAC,QAAA,cAAA,cAAAA,QAAA,UAAA,MACE,8BAAAA,QAAA,cAACC,0CAAAA;IAAoBC,OAAOL,EAAE,2BAAA;KAC5B,8BAAAG,QAAA,cAACG,uBAAMC,QAAM;IAACC,SAAST,SAASU;IAAYC,iBAAiB,CAACF,YAAaT,SAASU,a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cAACY,kBAAqBH,KAAKC,OAAO,IAAO;UACzF;AAEA,gBAAM8H,UAAU/H,KAAKgI,UAAUhI,KAAKuH;AAGpC,gBAAMvF,KAAK,OAAOhC,KAAKgC,OAAO,WAAWhC,KAAKgC,KAAK4B;AACnD,kBAAQkE,MAAAA;YACN,KAAK;AACH,qBAAOC,mBAAmBE,8BACxB1I,6BAAAA,QAAA,cAAC2I,qBAAKpE,SAAO;gBAACqE,QAAAA;gBAAOhE,YAAY;kBAACiE;kBAAaC;kBAAyBC;;iBACtE/I,6BAAAA,QAAA,cAAC2G,WAAAA;gBAAUlE,IAAIA,UAAMuG,8BAAiBR,OAAAA;gBAAU1H,YAAY0H;oBAE5D;YACN,KAAK;AACH,qBAAOA,mBAAmBE,8BACxB1I,6BAAAA,QAAA,cAACoG,OAAAA;gBAAImC,MAAK;gBAAO1C,WAAU;gBAAgBoD,OAAO;kBAAEC,SAAS;gBAAS;iBACpElJ,6BAAAA,QAAA,cAAC2G,WAAAA;gBAAUlE,IAAIA,UAAMuG,8BAAiBR,OAAAA;gBAAU1H,YAAY0H;oBAE5D;YACN,KAAK,YAAY;AACf,qBAAO/H,KAAK6G,WAAWL,mCAAKxE,KAAKzC,6BAAAA,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", "import_types", "import_react_ui_theme", "StackSettings", "settings", "t", "useTranslation", "STACK_PLUGIN", "React", "DeprecatedFormInput", "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", "system", "surface", "component", "role", "primary", "active", "CollectionType", "Main", "bounce", "baseSurface", "topbarBlockPaddingStart", "bottombarBlockPaddingEnd", "fullyQualifiedId", "style", "contain"]
3
+ "sources": ["../../../src/StackPlugin.tsx", "../../../src/components/index.ts", "../../../src/components/StackSettings.tsx", "../../../src/translations.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport {\n Capabilities,\n contributes,\n createSurface,\n defineModule,\n definePlugin,\n Events,\n oneOf,\n} from '@dxos/app-framework';\nimport { type ReactiveEchoObject, fullyQualifiedId } from '@dxos/client/echo';\nimport { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';\nimport { CollectionType } from '@dxos/plugin-space/types';\n\nimport { StackMain } from './components';\nimport { meta, SECTION_IDENTIFIER, STACK_PLUGIN } from './meta';\nimport translations from './translations';\nimport { StackViewType } from './types';\n\nexport const StackPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/metadata`,\n activatesOn: oneOf(Events.Startup, Events.SetupAppGraph),\n activate: () => [\n contributes(Capabilities.Metadata, {\n id: StackViewType.typename,\n metadata: {\n placeholder: ['stack title placeholder', { ns: STACK_PLUGIN }],\n icon: 'ph--stack-simple--regular',\n },\n }),\n contributes(Capabilities.Metadata, {\n id: SECTION_IDENTIFIER,\n metadata: {\n parse: (section: { object: ReactiveEchoObject<any> }, type: string) => {\n switch (type) {\n case 'node':\n // TODO(wittjosiah): Remove cast.\n return { id: section.object.id, label: section.object.title, data: section.object };\n case 'object':\n return section.object;\n case 'view-object':\n return section;\n }\n },\n },\n }),\n ],\n }),\n defineModule({\n id: `${meta.id}/module/schema`,\n activatesOn: ClientEvents.SetupClient,\n activate: () => contributes(ClientCapabilities.SystemSchema, [StackViewType]),\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.Startup,\n activate: () =>\n contributes(\n Capabilities.ReactSurface,\n createSurface({\n id: `${STACK_PLUGIN}/article`,\n role: 'article',\n filter: (data): data is { id?: string; subject: CollectionType } => data.subject instanceof CollectionType,\n component: ({ data }) => {\n // This allows the id to be overridden by the surface for situations where the id of the collection\n // is not the same as the id of what is being represented (e.g., a space with a root collection).\n const id = typeof data.id === 'string' ? data.id : undefined;\n return (\n <div role='none' className='overflow-auto' style={{ contain: 'layout' }}>\n <StackMain id={id ?? fullyQualifiedId(data.subject)} collection={data.subject} />\n </div>\n );\n },\n }),\n ),\n }),\n ]);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { lazy } from 'react';\n\nexport const StackMain = lazy(() => import('./StackMain'));\n\nexport * from './StackSettings';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Input, useTranslation } from '@dxos/react-ui';\nimport { DeprecatedFormInput } from '@dxos/react-ui-form';\n\nimport { STACK_PLUGIN } from '../meta';\nimport { type StackSettingsProps } from '../types';\n\nexport const StackSettings = ({ settings }: { settings: StackSettingsProps }) => {\n const { t } = useTranslation(STACK_PLUGIN);\n\n return (\n <>\n <DeprecatedFormInput label={t('settings separation label')}>\n <Input.Switch checked={settings.separation} onCheckedChange={(checked) => (settings.separation = !!checked)} />\n </DeprecatedFormInput>\n </>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { translations as stackTranslations } from '@dxos/react-ui-stack';\n\nimport { STACK_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [STACK_PLUGIN]: {\n 'plugin name': 'Stacks',\n 'settings separation label': 'Separate sections',\n 'add section beforeAll dialog title': 'Add a section to the start',\n 'add section afterAll dialog title': 'Add a section to the end',\n 'add section before dialog title': 'Add a section',\n 'add section after dialog title': 'Add a section',\n 'add section input placeholder': 'Find the type of section to add',\n 'upload file label': 'Add file',\n 'add section label': 'Add section',\n 'empty stack message': 'Drag items into the stack.',\n 'remove section label': 'Delete',\n 'navigate to section label': 'Navigate to item',\n 'untitled section title': 'Untitled section',\n 'add section before label': 'Add before',\n 'add section after label': 'Add after',\n 'expand label': 'Expand',\n 'collapse label': 'Collapse',\n 'drag handle label': 'Press space or enter to begin dragging this item.',\n },\n },\n },\n ...stackTranslations,\n];\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAkB;AAElB,2BAQO;AACP,kBAA0D;AAC1D,2BAAiD;AACjD,mBAA+B;ACb/B,IAAAA,gBAAqB;ACArB,IAAAA,gBAAkB;AAElB,sBAAsC;AACtC,2BAAoC;ACHpC,4BAAkD;AFE3C,IAAMC,gBAAYC,oBAAK,MAAM,OAAO,0BAAA,CAAA;AEE3C,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACC,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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A2DA,KAAKS,mBAAmBC;MAC5FC,WAAW,CAAC,EAAEX,KAAI,MAAE;AAGlB,cAAM1B,KAAK,OAAO0B,KAAK1B,OAAO,WAAW0B,KAAK1B,KAAKsC;AACnD,eACEC,6BAAAA,QAAA,cAACC,OAAAA;UAAIP,MAAK;UAAOQ,WAAU;UAAgBC,OAAO;YAAEC,SAAS;UAAS;WACpEJ,6BAAAA,QAAA,cAAC/C,WAAAA;UAAUQ,IAAIA,UAAM4C,8BAAiBlB,KAAKS,OAAO;UAAGU,YAAYnB,KAAKS;;MAG5E;IACF,CAAA,CAAA;EAEN,CAAA;CACD;",
6
+ "names": ["import_react", "StackMain", "lazy", "STACK_PLUGIN", "stackTranslations", "StackPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "oneOf", "Startup", "SetupAppGraph", "Metadata", "StackViewType", "typename", "metadata", "placeholder", "ns", "icon", "SECTION_IDENTIFIER", "parse", "section", "type", "object", "label", "title", "data", "ClientEvents", "SetupClient", "ClientCapabilities", "SystemSchema", "ReactSurface", "createSurface", "role", "filter", "subject", "CollectionType", "component", "undefined", "React", "div", "className", "style", "contain", "fullyQualifiedId", "collection"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytes":2237,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytes":2624,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/types/stack.ts":{"bytes":3411,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/types/types.ts":{"bytes":3167,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/types/index.ts":{"bytes":581,"imports":[{"path":"packages/plugins/plugin-stack/src/types/stack.ts","kind":"import-statement","original":"./stack"},{"path":"packages/plugins/plugin-stack/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/AddSectionDialog.tsx":{"bytes":18260,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-ipfs/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/react-ui-searchlist","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/AddSection.tsx":{"bytes":10461,"imports":[{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytes":1887,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytes":3039,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytes":17844,"imports":[{"path":"@radix-ui/react-collapsible","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx","kind":"import-statement","original":"./CaretDownUp"},{"path":"packages/plugins/plugin-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackMain.tsx":{"bytes":18885,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/AddSection.tsx","kind":"import-statement","original":"./AddSection"},{"path":"packages/plugins/plugin-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/plugins/plugin-stack/src/components/StackSection.tsx","kind":"import-statement","original":"./StackSection"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/index.ts":{"bytes":981,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/StackSettings.tsx","kind":"import-statement","original":"./StackSettings"},{"path":"packages/plugins/plugin-stack/src/components/AddSectionDialog.tsx","kind":"import-statement","original":"./AddSectionDialog"},{"path":"packages/plugins/plugin-stack/src/components/StackMain.tsx","kind":"dynamic-import","original":"./StackMain"}],"format":"esm"},"packages/plugins/plugin-stack/src/translations.ts":{"bytes":4081,"imports":[{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/StackPlugin.tsx":{"bytes":15314,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-stack/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-stack/src/index.ts":{"bytes":854,"imports":[{"path":"packages/plugins/plugin-stack/src/StackPlugin.tsx","kind":"import-statement","original":"./StackPlugin"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/plugin-stack/src/StackPlugin.tsx","kind":"import-statement","original":"./StackPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-stack/dist/lib/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":2274,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytes":2624,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytes":1887,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytes":3039,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytes":17526,"imports":[{"path":"@radix-ui/react-collapsible","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx","kind":"import-statement","original":"./CaretDownUp"},{"path":"packages/plugins/plugin-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/types/stack.ts":{"bytes":3411,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/types/types.ts":{"bytes":2111,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/types/index.ts":{"bytes":581,"imports":[{"path":"packages/plugins/plugin-stack/src/types/stack.ts","kind":"import-statement","original":"./stack"},{"path":"packages/plugins/plugin-stack/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackMain.tsx":{"bytes":18830,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/plugins/plugin-stack/src/components/StackSection.tsx","kind":"import-statement","original":"./StackSection"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/index.ts":{"bytes":873,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/StackSettings.tsx","kind":"import-statement","original":"./StackSettings"},{"path":"packages/plugins/plugin-stack/src/components/StackMain.tsx","kind":"dynamic-import","original":"./StackMain"}],"format":"esm"},"packages/plugins/plugin-stack/src/translations.ts":{"bytes":4081,"imports":[{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/StackPlugin.tsx":{"bytes":12082,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-stack/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-stack/src/index.ts":{"bytes":592,"imports":[{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-stack/src/StackPlugin.tsx","kind":"import-statement","original":"./StackPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-stack/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8439},"packages/plugins/plugin-stack/dist/lib/node/index.cjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-CZCFFT2J.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/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/dist/lib/node/StackMain-USQVAFKL.cjs","kind":"dynamic-import"},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","StackPlugin","meta"],"entryPoint":"packages/plugins/plugin-stack/src/index.ts","inputs":{"packages/plugins/plugin-stack/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-stack/src/StackPlugin.tsx":{"bytesInOutput":2516},"packages/plugins/plugin-stack/src/components/index.ts":{"bytesInOutput":94},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytesInOutput":142},"packages/plugins/plugin-stack/src/translations.ts":{"bytesInOutput":1176}},"bytes":4521},"packages/plugins/plugin-stack/dist/lib/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-USQVAFKL.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21814},"packages/plugins/plugin-stack/dist/lib/node/StackMain-USQVAFKL.cjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-CZCFFT2J.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/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@radix-ui/react-collapsible","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-stack/src/components/StackMain.tsx","inputs":{"packages/plugins/plugin-stack/src/components/StackMain.tsx":{"bytesInOutput":4398},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytesInOutput":265},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytesInOutput":5160},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytesInOutput":771}},"bytes":11185},"packages/plugins/plugin-stack/dist/lib/node/chunk-CZCFFT2J.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1042},"packages/plugins/plugin-stack/dist/lib/node/chunk-CZCFFT2J.cjs":{"imports":[],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","meta"],"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytesInOutput":557}},"bytes":704},"packages/plugins/plugin-stack/dist/lib/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}}}