@dxos/plugin-stack 0.7.4-staging.f7e8224 → 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
@@ -2,20 +2,18 @@ import { createRequire } from 'node:module';const require = createRequire(import
2
2
  import {
3
3
  SECTION_IDENTIFIER,
4
4
  STACK_PLUGIN,
5
- meta_default
6
- } from "./chunk-JEQMG2E2.mjs";
5
+ meta
6
+ } from "./chunk-SJU6TPRI.mjs";
7
7
  import {
8
- SectionSchema,
9
8
  StackViewType
10
9
  } from "./chunk-3ZYHKSIS.mjs";
11
10
 
12
11
  // packages/plugins/plugin-stack/src/StackPlugin.tsx
13
- import React3 from "react";
14
- import { create as create2, fullyQualifiedId } from "@dxos/client/echo";
15
- import { LocalStorageStore } from "@dxos/local-storage";
12
+ import React2 from "react";
13
+ import { Capabilities, contributes, createSurface, defineModule, definePlugin, Events, oneOf } from "@dxos/app-framework";
14
+ import { fullyQualifiedId } from "@dxos/client/echo";
15
+ import { ClientCapabilities, ClientEvents } from "@dxos/plugin-client";
16
16
  import { CollectionType } from "@dxos/plugin-space/types";
17
- import { Main } from "@dxos/react-ui";
18
- import { baseSurface, topbarBlockPaddingStart, bottombarBlockPaddingEnd } from "@dxos/react-ui-theme";
19
17
 
20
18
  // packages/plugins/plugin-stack/src/components/index.ts
21
19
  import { lazy } from "react";
@@ -24,128 +22,9 @@ import { lazy } from "react";
24
22
  import React from "react";
25
23
  import { Input, useTranslation } from "@dxos/react-ui";
26
24
  import { DeprecatedFormInput } from "@dxos/react-ui-form";
27
- var StackSettings = ({ settings }) => {
28
- const { t } = useTranslation(STACK_PLUGIN);
29
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(DeprecatedFormInput, {
30
- label: t("settings separation label")
31
- }, /* @__PURE__ */ React.createElement(Input.Switch, {
32
- checked: settings.separation,
33
- onCheckedChange: (checked) => settings.separation = !!checked
34
- })));
35
- };
36
-
37
- // packages/plugins/plugin-stack/src/components/AddSectionDialog.tsx
38
- import { FilePlus } from "@phosphor-icons/react";
39
- import React2, { useCallback, useRef, useState } from "react";
40
- import { usePlugin, useIntent, LayoutAction, useResolvePlugin, parseFileManagerPlugin } from "@dxos/app-framework";
41
- import { create, getSpace } from "@dxos/client/echo";
42
- import { FileType } from "@dxos/plugin-ipfs/types";
43
- import { Dialog, toLocalizedString, useTranslation as useTranslation2 } from "@dxos/react-ui";
44
- import { Path } from "@dxos/react-ui-mosaic";
45
- import { SearchList } from "@dxos/react-ui-searchlist";
46
- import { getSize, mx } from "@dxos/react-ui-theme";
47
- import { nonNullable } from "@dxos/util";
48
- var dataHasAddSectionDialogProps = (data) => {
49
- return "subject" in data && typeof data.subject === "object" && !!data.subject && "position" in data.subject && typeof data.subject.position === "string" && "collection" in data.subject;
50
- };
51
- var AddSectionDialog = ({ path, position, collection }) => {
52
- const { t } = useTranslation2(STACK_PLUGIN);
53
- const stackPlugin = usePlugin(STACK_PLUGIN);
54
- const fileManagerPlugin = useResolvePlugin(parseFileManagerPlugin);
55
- const fileRef = useRef(null);
56
- const { dispatch } = useIntent();
57
- const space = getSpace(collection);
58
- const [pending, setPending] = useState(false);
59
- const [uploadError, setUploadError] = useState();
60
- const handleAdd = useCallback((sectionObject) => {
61
- const index = position === "beforeAll" ? 0 : position === "afterAll" ? collection.objects.length : collection.objects.filter(nonNullable).findIndex((section) => section.id === Path.last(path));
62
- collection.objects.splice(index + (position === "after" ? 1 : 0), 0, sectionObject);
63
- const stack = collection.views[StackViewType.typename];
64
- if (stack) {
65
- stack.sections[sectionObject.id] = {};
66
- }
67
- setPending(false);
68
- void dispatch?.({
69
- action: LayoutAction.SET_LAYOUT,
70
- data: {
71
- element: "dialog",
72
- state: false
73
- }
74
- });
75
- }, [
76
- collection,
77
- path,
78
- position,
79
- dispatch
80
- ]);
81
- const handleFileUpload = fileManagerPlugin?.provides.file.upload && space ? async (file) => {
82
- const filename = file.name.split(".")[0];
83
- try {
84
- const info = await fileManagerPlugin.provides.file.upload?.(file, space);
85
- if (info) {
86
- const obj = create(FileType, {
87
- type: file.type,
88
- name: filename,
89
- filename,
90
- cid: info.cid
91
- });
92
- handleAdd(obj);
93
- }
94
- } catch (err) {
95
- setUploadError(err);
96
- }
97
- } : void 0;
98
- return /* @__PURE__ */ React2.createElement(Dialog.Content, null, /* @__PURE__ */ React2.createElement(Dialog.Title, null, t(`add section ${position} dialog title`)), /* @__PURE__ */ React2.createElement(SearchList.Root, {
99
- label: t("add section input placeholder")
100
- }, /* @__PURE__ */ React2.createElement(SearchList.Input, {
101
- placeholder: t("add section input placeholder"),
102
- classNames: "pli-3",
103
- disabled: pending
104
- }), /* @__PURE__ */ React2.createElement(SearchList.Content, {
105
- classNames: "min-bs-24 bs-fit max-bs-64 overflow-auto",
106
- ...pending && {
107
- inert: "true"
108
- }
109
- }, stackPlugin?.provides?.stack.creators?.map(({ id, icon: Icon, label: propsLabel, testId, intent }) => {
110
- const label = toLocalizedString(propsLabel, t);
111
- return /* @__PURE__ */ React2.createElement(SearchList.Item, {
112
- value: label,
113
- key: id,
114
- onSelect: async () => {
115
- setPending(true);
116
- const { data: nextSection } = await dispatch({
117
- ...intent,
118
- data: {
119
- space
120
- }
121
- }) ?? {};
122
- handleAdd(nextSection);
123
- },
124
- classNames: "flex items-center gap-2 pli-2",
125
- "data-testid": testId
126
- }, Icon && /* @__PURE__ */ React2.createElement(Icon, {
127
- className: mx(getSize(4), "shrink-0")
128
- }), /* @__PURE__ */ React2.createElement("span", {
129
- className: "grow truncate"
130
- }, label));
131
- }), handleFileUpload && /* @__PURE__ */ React2.createElement(SearchList.Item, {
132
- value: t("upload file label"),
133
- classNames: "flex items-center gap-2 pli-2",
134
- onSelect: () => fileRef.current?.click()
135
- }, /* @__PURE__ */ React2.createElement(FilePlus, null), /* @__PURE__ */ React2.createElement("span", {
136
- className: "grow truncate"
137
- }, t("upload file label"))), uploadError && /* @__PURE__ */ React2.createElement("div", {
138
- className: "text-error-500"
139
- }, uploadError.message))), handleFileUpload && /* @__PURE__ */ React2.createElement("input", {
140
- type: "file",
141
- className: "sr-only",
142
- ref: fileRef,
143
- onChange: ({ target: { files } }) => files && handleFileUpload(files[0])
144
- }));
145
- };
146
25
 
147
26
  // packages/plugins/plugin-stack/src/components/index.ts
148
- var StackMain = lazy(() => import("./StackMain-5I43UWGF.mjs"));
27
+ var StackMain = lazy(() => import("./StackMain-DW27O56R.mjs"));
149
28
 
150
29
  // packages/plugins/plugin-stack/src/translations.ts
151
30
  import { translations as stackTranslations } from "@dxos/react-ui-stack";
@@ -178,119 +57,83 @@ var translations_default = [
178
57
  ];
179
58
 
180
59
  // packages/plugins/plugin-stack/src/StackPlugin.tsx
181
- var StackPlugin = () => {
182
- const settings = new LocalStorageStore(STACK_PLUGIN, {
183
- separation: true
184
- });
185
- const stackState = create2({
186
- creators: []
187
- });
188
- return {
189
- meta: meta_default,
190
- ready: async (plugins) => {
191
- settings.prop({
192
- key: "separation",
193
- type: LocalStorageStore.bool()
194
- });
195
- for (const plugin of plugins) {
196
- if (plugin.meta.id === STACK_PLUGIN) {
197
- continue;
198
- }
199
- if (Array.isArray(plugin.provides?.stack?.creators)) {
200
- stackState.creators.push(...plugin.provides.stack.creators ?? []);
201
- }
202
- }
203
- },
204
- provides: {
205
- settings: settings.values,
206
- metadata: {
207
- records: {
208
- [StackViewType.typename]: {
209
- placeholder: [
210
- "stack title placeholder",
211
- {
212
- ns: STACK_PLUGIN
213
- }
214
- ],
215
- icon: "ph--stack-simple--regular"
216
- },
217
- [SECTION_IDENTIFIER]: {
218
- parse: (section, type) => {
219
- switch (type) {
220
- case "node":
221
- return {
222
- id: section.object.id,
223
- label: section.object.title,
224
- data: section.object
225
- };
226
- case "object":
227
- return section.object;
228
- case "view-object":
229
- return section;
230
- }
60
+ var StackPlugin = () => definePlugin(meta, [
61
+ defineModule({
62
+ id: `${meta.id}/module/translations`,
63
+ activatesOn: Events.SetupTranslations,
64
+ activate: () => contributes(Capabilities.Translations, translations_default)
65
+ }),
66
+ defineModule({
67
+ id: `${meta.id}/module/metadata`,
68
+ activatesOn: oneOf(Events.Startup, Events.SetupAppGraph),
69
+ activate: () => [
70
+ contributes(Capabilities.Metadata, {
71
+ id: StackViewType.typename,
72
+ metadata: {
73
+ placeholder: [
74
+ "stack title placeholder",
75
+ {
76
+ ns: STACK_PLUGIN
231
77
  }
232
- }
78
+ ],
79
+ icon: "ph--stack-simple--regular"
233
80
  }
234
- },
235
- translations: translations_default,
236
- echo: {
237
- system: [
238
- StackViewType
239
- ]
240
- },
241
- surface: {
242
- component: ({ data, role }) => {
243
- switch (data.component) {
244
- case `${STACK_PLUGIN}/AddSectionDialog`:
245
- return dataHasAddSectionDialogProps(data) ? /* @__PURE__ */ React3.createElement(AddSectionDialog, data.subject) : null;
246
- }
247
- const primary = data.active ?? data.object;
248
- const id = typeof data.id === "string" ? data.id : void 0;
249
- switch (role) {
250
- case "main":
251
- return primary instanceof CollectionType ? /* @__PURE__ */ React3.createElement(Main.Content, {
252
- bounce: true,
253
- classNames: [
254
- baseSurface,
255
- topbarBlockPaddingStart,
256
- bottombarBlockPaddingEnd
257
- ]
258
- }, /* @__PURE__ */ React3.createElement(StackMain, {
259
- id: id ?? fullyQualifiedId(primary),
260
- collection: primary
261
- })) : null;
262
- case "article":
263
- return primary instanceof CollectionType ? /* @__PURE__ */ React3.createElement("div", {
264
- role: "none",
265
- className: "overflow-auto",
266
- style: {
267
- contain: "layout"
268
- }
269
- }, /* @__PURE__ */ React3.createElement(StackMain, {
270
- id: id ?? fullyQualifiedId(primary),
271
- collection: primary
272
- })) : null;
273
- case "settings": {
274
- return data.plugin === meta_default.id ? /* @__PURE__ */ React3.createElement(StackSettings, {
275
- settings: settings.values
276
- }) : null;
81
+ }),
82
+ contributes(Capabilities.Metadata, {
83
+ id: SECTION_IDENTIFIER,
84
+ metadata: {
85
+ parse: (section, type) => {
86
+ switch (type) {
87
+ case "node":
88
+ return {
89
+ id: section.object.id,
90
+ label: section.object.title,
91
+ data: section.object
92
+ };
93
+ case "object":
94
+ return section.object;
95
+ case "view-object":
96
+ return section;
277
97
  }
278
- default:
279
- return null;
280
98
  }
281
99
  }
282
- },
283
- stack: stackState
284
- }
285
- };
286
- };
287
-
288
- // packages/plugins/plugin-stack/src/index.ts
289
- var src_default = StackPlugin;
100
+ })
101
+ ]
102
+ }),
103
+ defineModule({
104
+ id: `${meta.id}/module/schema`,
105
+ activatesOn: ClientEvents.SetupClient,
106
+ activate: () => contributes(ClientCapabilities.SystemSchema, [
107
+ StackViewType
108
+ ])
109
+ }),
110
+ defineModule({
111
+ id: `${meta.id}/module/react-surface`,
112
+ activatesOn: Events.Startup,
113
+ activate: () => contributes(Capabilities.ReactSurface, createSurface({
114
+ id: `${STACK_PLUGIN}/article`,
115
+ role: "article",
116
+ filter: (data) => data.subject instanceof CollectionType,
117
+ component: ({ data }) => {
118
+ const id = typeof data.id === "string" ? data.id : void 0;
119
+ return /* @__PURE__ */ React2.createElement("div", {
120
+ role: "none",
121
+ className: "overflow-auto",
122
+ style: {
123
+ contain: "layout"
124
+ }
125
+ }, /* @__PURE__ */ React2.createElement(StackMain, {
126
+ id: id ?? fullyQualifiedId(data.subject),
127
+ collection: data.subject
128
+ }));
129
+ }
130
+ }))
131
+ })
132
+ ]);
290
133
  export {
291
- SectionSchema,
134
+ SECTION_IDENTIFIER,
135
+ STACK_PLUGIN,
292
136
  StackPlugin,
293
- StackViewType,
294
- src_default as default
137
+ meta
295
138
  };
296
139
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/StackPlugin.tsx", "../../../src/components/index.ts", "../../../src/components/StackSettings.tsx", "../../../src/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,OAAOA,YAAW;AAGlB,SAASC,UAAAA,SAAiCC,wBAAwB;AAClE,SAASC,yBAAyB;AAClC,SAASC,sBAAsB;AAC/B,SAASC,YAAY;AACrB,SAASC,aAAaC,yBAAyBC,gCAAgC;;;ACP/E,SAASC,YAAY;;;ACArB,OAAOC,WAAW;AAElB,SAASC,OAAOC,sBAAsB;AACtC,SAASC,2BAA2B;AAK7B,IAAMC,gBAAgB,CAAC,EAAEC,SAAQ,MAAoC;AAC1E,QAAM,EAAEC,EAAC,IAAKC,eAAeC,YAAAA;AAE7B,SACE,sBAAA,cAAA,MAAA,UAAA,MACE,sBAAA,cAACC,qBAAAA;IAAoBC,OAAOJ,EAAE,2BAAA;KAC5B,sBAAA,cAACK,MAAMC,QAAM;IAACC,SAASR,SAASS;IAAYC,iBAAiB,CAACF,YAAaR,SAASS,aAAa,CAAC,CAACD;;AAI3G;;;AClBA,SAASG,gBAAgB;AACzB,OAAOC,UAASC,aAAaC,QAAQC,gBAAgB;AAErD,SAASC,WAAWC,WAAWC,cAAcC,kBAAkBC,8BAA8B;AAC7F,SAAkCC,QAAQC,gBAAgB;AAC1D,SAASC,gBAAgB;AAEzB,SAASC,QAAQC,mBAAmBC,kBAAAA,uBAAsB;AAC1D,SAASC,YAAY;AACrB,SAASC,kBAAkB;AAC3B,SAASC,SAASC,UAAU;AAC5B,SAASC,mBAAmB;AAOrB,IA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AACnD,kBAAQP,MAAAA;YACN,KAAK;AACH,qBAAOK,mBAAmBG,iBACxB,gBAAAN,OAAA,cAACO,KAAKC,SAAO;gBAACC,QAAAA;gBAAOC,YAAY;kBAACC;kBAAaC;kBAAyBC;;iBACtE,gBAAAb,OAAA,cAACc,WAAAA;gBAAU1C,IAAIA,MAAM2C,iBAAiBZ,OAAAA;gBAAUa,YAAYb;oBAE5D;YACN,KAAK;AACH,qBAAOA,mBAAmBG,iBACxB,gBAAAN,OAAA,cAACiB,OAAAA;gBAAInB,MAAK;gBAAOoB,WAAU;gBAAgBC,OAAO;kBAAEC,SAAS;gBAAS;iBACpE,gBAAApB,OAAA,cAACc,WAAAA;gBAAU1C,IAAIA,MAAM2C,iBAAiBZ,OAAAA;gBAAUa,YAAYb;oBAE5D;YACN,KAAK,YAAY;AACf,qBAAOX,KAAKrB,WAAWP,aAAKQ,KAAK,gBAAA4B,OAAA,cAACqB,eAAAA;gBAAchE,UAAUA,SAASqB;mBAAa;YAClF;YACA;AACE,qBAAO;UACX;QACF;MACF;MACAF,OAAOf;IACT;EACF;AACF;;;AK9FA,IAAA,cAAe6D;",
6
- "names": ["React", "create", "fullyQualifiedId", "LocalStorageStore", "CollectionType", "Main", "baseSurface", "topbarBlockPaddingStart", "bottombarBlockPaddingEnd", "lazy", "React", "Input", "useTranslation", "DeprecatedFormInput", "StackSettings", "settings", "t", "useTranslation", "STACK_PLUGIN", "DeprecatedFormInput", "label", "Input", "Switch", "checked", "separation", "onCheckedChange", "FilePlus", "React", "useCallback", "useRef", "useState", "usePlugin", "useIntent", "LayoutAction", "useResolvePlugin", "parseFileManagerPlugin", "create", "getSpace", "FileType", "Dialog", "toLocalizedString", "useTranslation", "Path", "SearchList", "getSize", "mx", "nonNullable", "dataHasAddSectionDialogProps", "data", "subject", "position", "AddSectionDialog", "path", "collection", "t", "useTranslation", "STACK_PLUGIN", "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", "React", "Dialog", "Content", "Title", "SearchList", "Root", "label", "Input", "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", "translations", "stackTranslations", "STACK_PLUGIN", "stackTranslations", "StackPlugin", "settings", "LocalStorageStore", "STACK_PLUGIN", "separation", "stackState", "create", "creators", "meta", "ready", "plugins", "prop", "key", "type", "bool", "plugin", "id", "Array", "isArray", "provides", "stack", "push", "values", "metadata", "records", "StackViewType", "typename", "placeholder", "ns", "icon", "SECTION_IDENTIFIER", "parse", "section", "object", "label", "title", "data", "translations", "echo", "system", "surface", "component", "role", "dataHasAddSectionDialogProps", "React", "AddSectionDialog", "subject", "primary", "active", "undefined", "CollectionType", "Main", "Content", "bounce", "classNames", "baseSurface", "topbarBlockPaddingStart", "bottombarBlockPaddingEnd", "StackMain", "fullyQualifiedId", "collection", "div", "className", "style", "contain", "StackSettings", "StackPlugin"]
3
+ "sources": ["../../../src/StackPlugin.tsx", "../../../src/components/index.ts", "../../../src/components/StackSettings.tsx", "../../../src/translations.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport {\n Capabilities,\n contributes,\n createSurface,\n defineModule,\n definePlugin,\n Events,\n oneOf,\n} from '@dxos/app-framework';\nimport { type ReactiveEchoObject, fullyQualifiedId } from '@dxos/client/echo';\nimport { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';\nimport { CollectionType } from '@dxos/plugin-space/types';\n\nimport { StackMain } from './components';\nimport { meta, SECTION_IDENTIFIER, STACK_PLUGIN } from './meta';\nimport translations from './translations';\nimport { StackViewType } from './types';\n\nexport const StackPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/metadata`,\n activatesOn: oneOf(Events.Startup, Events.SetupAppGraph),\n activate: () => [\n contributes(Capabilities.Metadata, {\n id: StackViewType.typename,\n metadata: {\n placeholder: ['stack title placeholder', { ns: STACK_PLUGIN }],\n icon: 'ph--stack-simple--regular',\n },\n }),\n contributes(Capabilities.Metadata, {\n id: SECTION_IDENTIFIER,\n metadata: {\n parse: (section: { object: ReactiveEchoObject<any> }, type: string) => {\n switch (type) {\n case 'node':\n // TODO(wittjosiah): Remove cast.\n return { id: section.object.id, label: section.object.title, data: section.object };\n case 'object':\n return section.object;\n case 'view-object':\n return section;\n }\n },\n },\n }),\n ],\n }),\n defineModule({\n id: `${meta.id}/module/schema`,\n activatesOn: ClientEvents.SetupClient,\n activate: () => contributes(ClientCapabilities.SystemSchema, [StackViewType]),\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.Startup,\n activate: () =>\n contributes(\n Capabilities.ReactSurface,\n createSurface({\n id: `${STACK_PLUGIN}/article`,\n role: 'article',\n filter: (data): data is { id?: string; subject: CollectionType } => data.subject instanceof CollectionType,\n component: ({ data }) => {\n // This allows the id to be overridden by the surface for situations where the id of the collection\n // is not the same as the id of what is being represented (e.g., a space with a root collection).\n const id = typeof data.id === 'string' ? data.id : undefined;\n return (\n <div role='none' className='overflow-auto' style={{ contain: 'layout' }}>\n <StackMain id={id ?? fullyQualifiedId(data.subject)} collection={data.subject} />\n </div>\n );\n },\n }),\n ),\n }),\n ]);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { lazy } from 'react';\n\nexport const StackMain = lazy(() => import('./StackMain'));\n\nexport * from './StackSettings';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Input, useTranslation } from '@dxos/react-ui';\nimport { DeprecatedFormInput } from '@dxos/react-ui-form';\n\nimport { STACK_PLUGIN } from '../meta';\nimport { type StackSettingsProps } from '../types';\n\nexport const StackSettings = ({ settings }: { settings: StackSettingsProps }) => {\n const { t } = useTranslation(STACK_PLUGIN);\n\n return (\n <>\n <DeprecatedFormInput label={t('settings separation label')}>\n <Input.Switch checked={settings.separation} onCheckedChange={(checked) => (settings.separation = !!checked)} />\n </DeprecatedFormInput>\n </>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { translations as stackTranslations } from '@dxos/react-ui-stack';\n\nimport { STACK_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [STACK_PLUGIN]: {\n 'plugin name': 'Stacks',\n 'settings separation label': 'Separate sections',\n 'add section beforeAll dialog title': 'Add a section to the start',\n 'add section afterAll dialog title': 'Add a section to the end',\n 'add section before dialog title': 'Add a section',\n 'add section after dialog title': 'Add a section',\n 'add section input placeholder': 'Find the type of section to add',\n 'upload file label': 'Add file',\n 'add section label': 'Add section',\n 'empty stack message': 'Drag items into the stack.',\n 'remove section label': 'Delete',\n 'navigate to section label': 'Navigate to item',\n 'untitled section title': 'Untitled section',\n 'add section before label': 'Add before',\n 'add section after label': 'Add after',\n 'expand label': 'Expand',\n 'collapse label': 'Collapse',\n 'drag handle label': 'Press space or enter to begin dragging this item.',\n },\n },\n },\n ...stackTranslations,\n];\n"],
5
+ "mappings": ";;;;;;;;;;;AAIA,OAAOA,YAAW;AAElB,SACEC,cACAC,aACAC,eACAC,cACAC,cACAC,QACAC,aACK;AACP,SAAkCC,wBAAwB;AAC1D,SAASC,oBAAoBC,oBAAoB;AACjD,SAASC,sBAAsB;;;ACb/B,SAASC,YAAY;;;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A;;EAEJ,CAAA;EACAvB,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAa2B,aAAaC;IAC1BzB,UAAU,MAAMC,YAAYyB,mBAAmBC,cAAc;MAAClB;KAAc;EAC9E,CAAA;EACAd,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOQ;IACpBN,UAAU,MACRC,YACEC,aAAa0B,cACbC,cAAc;MACZjC,IAAI,GAAGkB,YAAAA;MACPgB,MAAM;MACNC,QAAQ,CAACR,SAA2DA,KAAKS,mBAAmBC;MAC5FC,WAAW,CAAC,EAAEX,KAAI,MAAE;AAGlB,cAAM3B,KAAK,OAAO2B,KAAK3B,OAAO,WAAW2B,KAAK3B,KAAKuC;AACnD,eACE,gBAAAC,OAAA,cAACC,OAAAA;UAAIP,MAAK;UAAOQ,WAAU;UAAgBC,OAAO;YAAEC,SAAS;UAAS;WACpE,gBAAAJ,OAAA,cAACK,WAAAA;UAAU7C,IAAIA,MAAM8C,iBAAiBnB,KAAKS,OAAO;UAAGW,YAAYpB,KAAKS;;MAG5E;IACF,CAAA,CAAA;EAEN,CAAA;CACD;",
6
+ "names": ["React", "Capabilities", "contributes", "createSurface", "defineModule", "definePlugin", "Events", "oneOf", "fullyQualifiedId", "ClientCapabilities", "ClientEvents", "CollectionType", "lazy", "React", "Input", "useTranslation", "DeprecatedFormInput", "StackMain", "lazy", "translations", "stackTranslations", "STACK_PLUGIN", "stackTranslations", "StackPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "oneOf", "Startup", "SetupAppGraph", "Metadata", "StackViewType", "typename", "metadata", "placeholder", "ns", "STACK_PLUGIN", "icon", "SECTION_IDENTIFIER", "parse", "section", "type", "object", "label", "title", "data", "ClientEvents", "SetupClient", "ClientCapabilities", "SystemSchema", "ReactSurface", "createSurface", "role", "filter", "subject", "CollectionType", "component", "undefined", "React", "div", "className", "style", "contain", "StackMain", "fullyQualifiedId", "collection"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytes":2237,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytes":2624,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/types/stack.ts":{"bytes":3411,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/types/types.ts":{"bytes":3167,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/types/index.ts":{"bytes":581,"imports":[{"path":"packages/plugins/plugin-stack/src/types/stack.ts","kind":"import-statement","original":"./stack"},{"path":"packages/plugins/plugin-stack/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/AddSectionDialog.tsx":{"bytes":18260,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-ipfs/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/react-ui-searchlist","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/AddSection.tsx":{"bytes":10461,"imports":[{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytes":1887,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytes":3039,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytes":17844,"imports":[{"path":"@radix-ui/react-collapsible","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx","kind":"import-statement","original":"./CaretDownUp"},{"path":"packages/plugins/plugin-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackMain.tsx":{"bytes":18885,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/AddSection.tsx","kind":"import-statement","original":"./AddSection"},{"path":"packages/plugins/plugin-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/plugins/plugin-stack/src/components/StackSection.tsx","kind":"import-statement","original":"./StackSection"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/index.ts":{"bytes":981,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/StackSettings.tsx","kind":"import-statement","original":"./StackSettings"},{"path":"packages/plugins/plugin-stack/src/components/AddSectionDialog.tsx","kind":"import-statement","original":"./AddSectionDialog"},{"path":"packages/plugins/plugin-stack/src/components/StackMain.tsx","kind":"dynamic-import","original":"./StackMain"}],"format":"esm"},"packages/plugins/plugin-stack/src/translations.ts":{"bytes":4081,"imports":[{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/StackPlugin.tsx":{"bytes":15314,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-stack/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-stack/src/index.ts":{"bytes":854,"imports":[{"path":"packages/plugins/plugin-stack/src/StackPlugin.tsx","kind":"import-statement","original":"./StackPlugin"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/plugin-stack/src/StackPlugin.tsx","kind":"import-statement","original":"./StackPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-stack/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":20483},"packages/plugins/plugin-stack/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-JEQMG2E2.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-3ZYHKSIS.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-ipfs/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/react-ui-searchlist","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/dist/lib/node-esm/StackMain-5I43UWGF.mjs","kind":"dynamic-import"},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["SectionSchema","StackPlugin","StackViewType","default"],"entryPoint":"packages/plugins/plugin-stack/src/index.ts","inputs":{"packages/plugins/plugin-stack/src/StackPlugin.tsx":{"bytesInOutput":3692},"packages/plugins/plugin-stack/src/components/index.ts":{"bytesInOutput":94},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytesInOutput":564},"packages/plugins/plugin-stack/src/components/AddSectionDialog.tsx":{"bytesInOutput":4601},"packages/plugins/plugin-stack/src/translations.ts":{"bytesInOutput":1176},"packages/plugins/plugin-stack/src/index.ts":{"bytesInOutput":31}},"bytes":10999},"packages/plugins/plugin-stack/dist/lib/node-esm/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-stack/dist/lib/node-esm/meta.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-JEQMG2E2.mjs","kind":"import-statement"}],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","default"],"entryPoint":"packages/plugins/plugin-stack/src/meta.ts","inputs":{},"bytes":295},"packages/plugins/plugin-stack/dist/lib/node-esm/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-stack/dist/lib/node-esm/types/index.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-3ZYHKSIS.mjs","kind":"import-statement"}],"exports":["SectionSchema","StackViewType"],"entryPoint":"packages/plugins/plugin-stack/src/types/index.ts","inputs":{},"bytes":246},"packages/plugins/plugin-stack/dist/lib/node-esm/StackMain-5I43UWGF.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":27260},"packages/plugins/plugin-stack/dist/lib/node-esm/StackMain-5I43UWGF.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-JEQMG2E2.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-3ZYHKSIS.mjs","kind":"import-statement"},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@radix-ui/react-collapsible","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-stack/src/components/StackMain.tsx","inputs":{"packages/plugins/plugin-stack/src/components/StackMain.tsx":{"bytesInOutput":4441},"packages/plugins/plugin-stack/src/components/AddSection.tsx":{"bytesInOutput":2554},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytesInOutput":265},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytesInOutput":5279},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytesInOutput":776}},"bytes":14062},"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-JEQMG2E2.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1029},"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-JEQMG2E2.mjs":{"imports":[],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","meta_default"],"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytesInOutput":565}},"bytes":813},"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-3ZYHKSIS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1616},"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-3ZYHKSIS.mjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["SectionSchema","StackViewType"],"inputs":{"packages/plugins/plugin-stack/src/types/stack.ts":{"bytesInOutput":515},"packages/plugins/plugin-stack/src/types/index.ts":{"bytesInOutput":0}},"bytes":750}}}
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-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8440},"packages/plugins/plugin-stack/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-SJU6TPRI.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-3ZYHKSIS.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/dist/lib/node-esm/StackMain-DW27O56R.mjs","kind":"dynamic-import"},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","StackPlugin","meta"],"entryPoint":"packages/plugins/plugin-stack/src/index.ts","inputs":{"packages/plugins/plugin-stack/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-stack/src/StackPlugin.tsx":{"bytesInOutput":2516},"packages/plugins/plugin-stack/src/components/index.ts":{"bytesInOutput":94},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytesInOutput":142},"packages/plugins/plugin-stack/src/translations.ts":{"bytesInOutput":1176}},"bytes":4613},"packages/plugins/plugin-stack/dist/lib/node-esm/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-stack/dist/lib/node-esm/types/index.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-3ZYHKSIS.mjs","kind":"import-statement"}],"exports":["SectionSchema","StackViewType"],"entryPoint":"packages/plugins/plugin-stack/src/types/index.ts","inputs":{},"bytes":246},"packages/plugins/plugin-stack/dist/lib/node-esm/StackMain-DW27O56R.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21815},"packages/plugins/plugin-stack/dist/lib/node-esm/StackMain-DW27O56R.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-SJU6TPRI.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-3ZYHKSIS.mjs","kind":"import-statement"},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@radix-ui/react-collapsible","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-stack/src/components/StackMain.tsx","inputs":{"packages/plugins/plugin-stack/src/components/StackMain.tsx":{"bytesInOutput":4398},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytesInOutput":265},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytesInOutput":5160},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytesInOutput":771}},"bytes":11277},"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-SJU6TPRI.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1044},"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-SJU6TPRI.mjs":{"imports":[],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","meta"],"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytesInOutput":557}},"bytes":797},"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-3ZYHKSIS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1616},"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-3ZYHKSIS.mjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["SectionSchema","StackViewType"],"inputs":{"packages/plugins/plugin-stack/src/types/stack.ts":{"bytesInOutput":515},"packages/plugins/plugin-stack/src/types/index.ts":{"bytesInOutput":0}},"bytes":750}}}
@@ -1,4 +1,2 @@
1
- import { type PluginDefinition } from '@dxos/app-framework';
2
- import { type StackPluginProvides } from './types';
3
- export declare const StackPlugin: () => PluginDefinition<StackPluginProvides>;
1
+ export declare const StackPlugin: () => import("@dxos/app-framework").Plugin;
4
2
  //# sourceMappingURL=StackPlugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"StackPlugin.d.ts","sourceRoot":"","sources":["../../../src/StackPlugin.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAWzE,OAAO,EAAE,KAAK,mBAAmB,EAAgE,MAAM,SAAS,CAAC;AAEjH,eAAO,MAAM,WAAW,QAAO,gBAAgB,CAAC,mBAAmB,CAiFlE,CAAC"}
1
+ {"version":3,"file":"StackPlugin.d.ts","sourceRoot":"","sources":["../../../src/StackPlugin.tsx"],"names":[],"mappings":"AAwBA,eAAO,MAAM,WAAW,4CAgEpB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"StackMain.d.ts","sourceRoot":"","sources":["../../../../src/components/StackMain.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAY5D,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAmB/D,KAAK,cAAc,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,cAAc,CAAC;CAC5B,CAAC;AAEF,QAAA,MAAM,SAAS,uBAAwB,cAAc,sBAoHpD,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"StackMain.d.ts","sourceRoot":"","sources":["../../../../src/components/StackMain.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAazE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAkB/D,KAAK,cAAc,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,cAAc,CAAC;CAC5B,CAAC;AAEF,QAAA,MAAM,SAAS,uBAAwB,cAAc,sBA0GpD,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"StackSection.d.ts","sourceRoot":"","sources":["../../../../src/components/StackSection.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAWxC,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAIjD,eAAO,MAAM,YAAY,8CAKtB,gBAAgB,sBA4FlB,CAAC"}
1
+ {"version":3,"file":"StackSection.d.ts","sourceRoot":"","sources":["../../../../src/components/StackSection.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAWxC,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAIjD,eAAO,MAAM,YAAY,8CAKtB,gBAAgB,sBA0FlB,CAAC"}
@@ -1,7 +1,6 @@
1
1
  export declare const StackMain: import("react").LazyExoticComponent<({ id, collection }: {
2
2
  id: string;
3
- collection: import("packages/plugins/plugin-space/dist/types/src").CollectionType;
3
+ collection: import("packages/plugins/plugin-space/dist/types/src/types").CollectionType;
4
4
  }) => import("react").JSX.Element>;
5
5
  export * from './StackSettings';
6
- export * from './AddSectionDialog';
7
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,SAAS;;;kCAAoC,CAAC;AAE3D,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,SAAS;;;kCAAoC,CAAC;AAE3D,cAAc,iBAAiB,CAAC"}
@@ -1,5 +1,3 @@
1
- import { StackPlugin } from './StackPlugin';
2
- export default StackPlugin;
3
- export * from './types';
1
+ export * from './meta';
4
2
  export * from './StackPlugin';
5
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,eAAe,WAAW,CAAC;AAE3B,cAAc,SAAS,CAAC;AAExB,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC"}
@@ -1,11 +1,10 @@
1
1
  export declare const STACK_PLUGIN = "dxos.org/plugin/stack";
2
2
  export declare const SECTION_IDENTIFIER = "dxos.org/type/StackSection";
3
- declare const _default: {
3
+ export declare const meta: {
4
4
  id: string;
5
5
  name: string;
6
6
  description: string;
7
7
  icon: string;
8
8
  source: string;
9
9
  };
10
- export default _default;
11
10
  //# sourceMappingURL=meta.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY,0BAA0B,CAAC;AACpD,eAAO,MAAM,kBAAkB,+BAA+B,CAAC;;;;;;;;AAE/D,wBAQuB"}
1
+ {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY,0BAA0B,CAAC;AACpD,eAAO,MAAM,kBAAkB,+BAA+B,CAAC;AAE/D,eAAO,MAAM,IAAI;;;;;;CAQK,CAAC"}