@dxos/plugin-stack 0.7.4 → 0.7.5-main.937ce75

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 (43) hide show
  1. package/dist/lib/browser/StackMain-HSYQ5B3Y.mjs +295 -0
  2. package/dist/lib/browser/StackMain-HSYQ5B3Y.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +28 -163
  4. package/dist/lib/browser/index.mjs.map +4 -4
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/node/StackMain-AWN5MFZK.cjs +309 -0
  7. package/dist/lib/node/StackMain-AWN5MFZK.cjs.map +7 -0
  8. package/dist/lib/node/index.cjs +28 -161
  9. package/dist/lib/node/index.cjs.map +4 -4
  10. package/dist/lib/node/meta.json +1 -1
  11. package/dist/lib/node-esm/StackMain-EFCZCMIJ.mjs +296 -0
  12. package/dist/lib/node-esm/StackMain-EFCZCMIJ.mjs.map +7 -0
  13. package/dist/lib/node-esm/index.mjs +28 -163
  14. package/dist/lib/node-esm/index.mjs.map +4 -4
  15. package/dist/lib/node-esm/meta.json +1 -1
  16. package/dist/types/src/StackPlugin.d.ts.map +1 -1
  17. package/dist/types/src/components/StackMain.d.ts.map +1 -1
  18. package/dist/types/src/components/StackSection.d.ts.map +1 -1
  19. package/dist/types/src/components/index.d.ts +0 -1
  20. package/dist/types/src/components/index.d.ts.map +1 -1
  21. package/dist/types/src/types/stack.d.ts +6 -12
  22. package/dist/types/src/types/stack.d.ts.map +1 -1
  23. package/dist/types/src/types/types.d.ts +4 -16
  24. package/dist/types/src/types/types.d.ts.map +1 -1
  25. package/dist/types/tsconfig.tsbuildinfo +1 -0
  26. package/package.json +23 -23
  27. package/src/StackPlugin.tsx +26 -47
  28. package/src/components/StackMain.tsx +60 -69
  29. package/src/components/StackSection.tsx +2 -4
  30. package/src/components/index.ts +0 -1
  31. package/src/types/types.ts +3 -19
  32. package/dist/lib/browser/StackMain-4D4J4IRK.mjs +0 -391
  33. package/dist/lib/browser/StackMain-4D4J4IRK.mjs.map +0 -7
  34. package/dist/lib/node/StackMain-V7C55NCF.cjs +0 -403
  35. package/dist/lib/node/StackMain-V7C55NCF.cjs.map +0 -7
  36. package/dist/lib/node-esm/StackMain-5I43UWGF.mjs +0 -392
  37. package/dist/lib/node-esm/StackMain-5I43UWGF.mjs.map +0 -7
  38. package/dist/types/src/components/AddSection.d.ts +0 -6
  39. package/dist/types/src/components/AddSection.d.ts.map +0 -1
  40. package/dist/types/src/components/AddSectionDialog.d.ts +0 -14
  41. package/dist/types/src/components/AddSectionDialog.d.ts.map +0 -1
  42. package/src/components/AddSection.tsx +0 -102
  43. package/src/components/AddSectionDialog.tsx +0 -128
@@ -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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AAUa,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", "../../../src/index.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { createSurface, type PluginDefinition } from '@dxos/app-framework';\nimport { type ReactiveEchoObject, fullyQualifiedId } from '@dxos/client/echo';\nimport { LocalStorageStore } from '@dxos/local-storage';\nimport { CollectionType } from '@dxos/plugin-space/types';\n\nimport { StackMain, StackSettings } from './components';\nimport meta, { SECTION_IDENTIFIER, STACK_PLUGIN } from './meta';\nimport translations from './translations';\nimport { StackViewType } from './types';\nimport { type StackPluginProvides, type StackSettingsProps } from './types';\n\nexport const StackPlugin = (): PluginDefinition<StackPluginProvides> => {\n const settings = new LocalStorageStore<StackSettingsProps>(STACK_PLUGIN, { separation: true });\n\n return {\n meta,\n ready: async () => {\n settings.prop({ key: 'separation', type: LocalStorageStore.bool() });\n },\n provides: {\n settings: settings.values,\n metadata: {\n records: {\n [StackViewType.typename]: {\n placeholder: ['stack title placeholder', { ns: STACK_PLUGIN }],\n icon: 'ph--stack-simple--regular',\n },\n [SECTION_IDENTIFIER]: {\n parse: (section: { object: ReactiveEchoObject<any> }, type: string) => {\n switch (type) {\n case 'node':\n // TODO(wittjosiah): Remove cast.\n return { id: section.object.id, label: section.object.title, data: section.object };\n case 'object':\n return section.object;\n case 'view-object':\n return section;\n }\n },\n },\n },\n },\n translations,\n echo: {\n system: [StackViewType],\n },\n surface: {\n definitions: () => [\n createSurface({\n id: `${STACK_PLUGIN}/article`,\n role: 'article',\n filter: (data): data is { id?: string; subject: CollectionType } => data.subject instanceof CollectionType,\n component: ({ data }) => {\n // This allows the id to be overridden by the surface for situations where the id of the collection\n // is not the same as the id of what is being represented (e.g., a space with a root collection).\n const id = typeof data.id === 'string' ? data.id : undefined;\n return (\n <div role='none' className='overflow-auto' style={{ contain: 'layout' }}>\n <StackMain id={id ?? fullyQualifiedId(data.subject)} collection={data.subject} />\n </div>\n );\n },\n }),\n createSurface({\n id: `${STACK_PLUGIN}/settings`,\n role: 'settings',\n filter: (data): data is any => data.plugin === meta.id,\n component: () => <StackSettings settings={settings.values} />,\n }),\n ],\n },\n },\n };\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { lazy } from 'react';\n\nexport const StackMain = lazy(() => import('./StackMain'));\n\nexport * from './StackSettings';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Input, useTranslation } from '@dxos/react-ui';\nimport { DeprecatedFormInput } from '@dxos/react-ui-form';\n\nimport { STACK_PLUGIN } from '../meta';\nimport { type StackSettingsProps } from '../types';\n\nexport const StackSettings = ({ settings }: { settings: StackSettingsProps }) => {\n const { t } = useTranslation(STACK_PLUGIN);\n\n return (\n <>\n <DeprecatedFormInput label={t('settings separation label')}>\n <Input.Switch checked={settings.separation} onCheckedChange={(checked) => (settings.separation = !!checked)} />\n </DeprecatedFormInput>\n </>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { translations as stackTranslations } from '@dxos/react-ui-stack';\n\nimport { STACK_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [STACK_PLUGIN]: {\n 'plugin name': 'Stacks',\n 'settings separation label': 'Separate sections',\n 'add section beforeAll dialog title': 'Add a section to the start',\n 'add section afterAll dialog title': 'Add a section to the end',\n 'add section before dialog title': 'Add a section',\n 'add section after dialog title': 'Add a section',\n 'add section input placeholder': 'Find the type of section to add',\n 'upload file label': 'Add file',\n 'add section label': 'Add section',\n 'empty stack message': 'Drag items into the stack.',\n 'remove section label': 'Delete',\n 'navigate to section label': 'Navigate to item',\n 'untitled section title': 'Untitled section',\n 'add section before label': 'Add before',\n 'add section after label': 'Add after',\n 'expand label': 'Expand',\n 'collapse label': 'Collapse',\n 'drag handle label': 'Press space or enter to begin dragging this item.',\n },\n },\n },\n ...stackTranslations,\n];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { StackPlugin } from './StackPlugin';\n\nexport default StackPlugin;\n\nexport * from './types';\n\nexport * from './StackPlugin';\n"],
5
+ "mappings": ";;;;;;;;;;;;AAIA,OAAOA,YAAW;AAElB,SAASC,qBAA4C;AACrD,SAAkCC,wBAAwB;AAC1D,SAASC,yBAAyB;AAClC,SAASC,sBAAsB;;;ACL/B,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;;;ADhBO,IAAMG,YAAYC,KAAK,MAAM,OAAO,0BAAA,CAAA;;;AEF3C,SAASC,gBAAgBC,yBAAyB;AAIlD,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACC,YAAA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,qBACE,gBAAAC,OAAA,cAACC,OAAAA;gBAAIP,MAAK;gBAAOQ,WAAU;gBAAgBC,OAAO;kBAAEC,SAAS;gBAAS;iBACpE,gBAAAJ,OAAA,cAACK,WAAAA;gBAAUtB,IAAIA,MAAMuB,iBAAiBnB,KAAKS,OAAO;gBAAGW,YAAYpB,KAAKS;;YAG5E;UACF,CAAA;UACAH,cAAc;YACZV,IAAI,GAAGpB,YAAAA;YACP+B,MAAM;YACNC,QAAQ,CAACR,SAAsBA,KAAKqB,WAAW3C,aAAKkB;YACpDe,WAAW,MAAM,gBAAAE,OAAA,cAACS,eAAAA;cAAchD,UAAUA,SAASW;;UACrD,CAAA;;MAEJ;IACF;EACF;AACF;;;AIzEA,IAAA,cAAesC;",
6
+ "names": ["React", "createSurface", "fullyQualifiedId", "LocalStorageStore", "CollectionType", "lazy", "React", "Input", "useTranslation", "DeprecatedFormInput", "StackSettings", "settings", "t", "useTranslation", "STACK_PLUGIN", "DeprecatedFormInput", "label", "Input", "Switch", "checked", "separation", "onCheckedChange", "StackMain", "lazy", "translations", "stackTranslations", "STACK_PLUGIN", "stackTranslations", "StackPlugin", "settings", "LocalStorageStore", "STACK_PLUGIN", "separation", "meta", "ready", "prop", "key", "type", "bool", "provides", "values", "metadata", "records", "StackViewType", "typename", "placeholder", "ns", "icon", "SECTION_IDENTIFIER", "parse", "section", "id", "object", "label", "title", "data", "translations", "echo", "system", "surface", "definitions", "createSurface", "role", "filter", "subject", "CollectionType", "component", "undefined", "React", "div", "className", "style", "contain", "StackMain", "fullyQualifiedId", "collection", "plugin", "StackSettings", "StackPlugin"]
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":2237,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytes":2624,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytes":1887,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytes":3039,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytes":17526,"imports":[{"path":"@radix-ui/react-collapsible","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx","kind":"import-statement","original":"./CaretDownUp"},{"path":"packages/plugins/plugin-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/types/stack.ts":{"bytes":3411,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/types/types.ts":{"bytes":2607,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/types/index.ts":{"bytes":581,"imports":[{"path":"packages/plugins/plugin-stack/src/types/stack.ts","kind":"import-statement","original":"./stack"},{"path":"packages/plugins/plugin-stack/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackMain.tsx":{"bytes":18858,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/plugins/plugin-stack/src/components/StackSection.tsx","kind":"import-statement","original":"./StackSection"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/index.ts":{"bytes":873,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/StackSettings.tsx","kind":"import-statement","original":"./StackSettings"},{"path":"packages/plugins/plugin-stack/src/components/StackMain.tsx","kind":"dynamic-import","original":"./StackMain"}],"format":"esm"},"packages/plugins/plugin-stack/src/translations.ts":{"bytes":4081,"imports":[{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/StackPlugin.tsx":{"bytes":11494,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-stack/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-stack/src/index.ts":{"bytes":854,"imports":[{"path":"packages/plugins/plugin-stack/src/StackPlugin.tsx","kind":"import-statement","original":"./StackPlugin"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/plugin-stack/src/StackPlugin.tsx","kind":"import-statement","original":"./StackPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-stack/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8688},"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/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/dist/lib/node-esm/StackMain-EFCZCMIJ.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":2596},"packages/plugins/plugin-stack/src/components/index.ts":{"bytesInOutput":94},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytesInOutput":564},"packages/plugins/plugin-stack/src/translations.ts":{"bytesInOutput":1176},"packages/plugins/plugin-stack/src/index.ts":{"bytesInOutput":31}},"bytes":5232},"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-EFCZCMIJ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21861},"packages/plugins/plugin-stack/dist/lib/node-esm/StackMain-EFCZCMIJ.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":"react","kind":"import-statement","external":true},{"path":"@radix-ui/react-collapsible","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-stack/src/components/StackMain.tsx","inputs":{"packages/plugins/plugin-stack/src/components/StackMain.tsx":{"bytesInOutput":4416},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytesInOutput":265},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytesInOutput":5160},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytesInOutput":771}},"bytes":11295},"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 +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":"AAMA,OAAO,EAAiB,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAS3E,OAAO,EAAE,KAAK,mBAAmB,EAA2B,MAAM,SAAS,CAAC;AAE5E,eAAO,MAAM,WAAW,QAAO,gBAAgB,CAAC,mBAAmB,CA8DlE,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,sBA2GpD,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"}
@@ -3,5 +3,4 @@ export declare const StackMain: import("react").LazyExoticComponent<({ id, colle
3
3
  collection: import("packages/plugins/plugin-space/dist/types/src").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"}
@@ -3,18 +3,12 @@ export declare const SectionSchema: S.Struct<{
3
3
  height: S.optional<typeof S.Number>;
4
4
  custom: S.optional<S.Record$<typeof S.String, typeof S.Any>>;
5
5
  }>;
6
- declare const StackViewType_base: import("@dxos/echo-schema").AbstractTypedObject<{
7
- sections: {
8
- [x: string]: {
9
- readonly height?: number | undefined;
10
- readonly custom?: {
11
- readonly [x: string]: any;
12
- } | undefined;
13
- };
14
- };
15
- } & {
16
- id: string;
17
- }, S.Struct.Encoded<{
6
+ declare const StackViewType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectFields<{
7
+ sections: S.mutable<S.Record$<typeof S.String, S.Struct<{
8
+ height: S.optional<typeof S.Number>;
9
+ custom: S.optional<S.Record$<typeof S.String, typeof S.Any>>;
10
+ }>>>;
11
+ }, import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectOptions>, S.Struct.Encoded<{
18
12
  sections: S.mutable<S.Record$<typeof S.String, S.Struct<{
19
13
  height: S.optional<typeof S.Number>;
20
14
  custom: S.optional<S.Record$<typeof S.String, typeof S.Any>>;
@@ -1 +1 @@
1
- {"version":3,"file":"stack.d.ts","sourceRoot":"","sources":["../../../../src/types/stack.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAe,MAAM,mBAAmB,CAAC;AAOnD,eAAO,MAAM,aAAa;;;EAKxB,CAAC;;;;;;;;;;;;;;;;;;AAGH,qBAAa,aAAc,SAAQ,kBAEjC;CAAG"}
1
+ {"version":3,"file":"stack.d.ts","sourceRoot":"","sources":["../../../../src/types/stack.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAe,MAAM,mBAAmB,CAAC;AAOnD,eAAO,MAAM,aAAa;;;EAKxB,CAAC;;;;;;;;;;;;AAGH,qBAAa,aAAc,SAAQ,kBAEjC;CAAG"}
@@ -1,8 +1,9 @@
1
1
  import { type IconProps } from '@phosphor-icons/react';
2
2
  import { type FC } from 'react';
3
- import type { Intent, MetadataRecordsProvides, SettingsProvides, SurfaceProvides, TranslationsProvides } from '@dxos/app-framework';
3
+ import type { MetadataRecordsProvides, SettingsProvides, SurfaceProvides, TranslationsProvides } from '@dxos/app-framework';
4
4
  import { type SchemaProvides } from '@dxos/plugin-space';
5
5
  import { type CollectionType } from '@dxos/plugin-space/types';
6
+ import { type ReactiveEchoObject } from '@dxos/react-client/echo';
6
7
  import { type Label } from '@dxos/react-ui';
7
8
  import { type StackItemSize } from '@dxos/react-ui-stack';
8
9
  export type AddSectionPosition = 'before' | 'after' | 'beforeAll' | 'afterAll';
@@ -33,26 +34,13 @@ export type StackSectionMetadata = {
33
34
  };
34
35
  export type StackSectionItem = {
35
36
  id: string;
36
- object: CollectionType['objects'][number];
37
+ object: ReactiveEchoObject<any>;
37
38
  view: StackSectionView;
38
39
  metadata: StackSectionMetadata;
39
40
  };
40
- export type StackSectionCreator = StackSectionAction & {
41
- intent: Intent | Intent[];
42
- };
43
- export type StackProvides = {
44
- stack: {
45
- creators?: StackSectionCreator[];
46
- };
47
- };
48
- export type StackState = {
49
- creators: StackSectionCreator[];
50
- };
51
41
  export type StackSettingsProps = {
52
42
  separation: boolean;
53
43
  };
54
- export type StackPluginProvides = SurfaceProvides & MetadataRecordsProvides & SettingsProvides<StackSettingsProps> & TranslationsProvides & SchemaProvides & {
55
- stack: StackState;
56
- };
44
+ export type StackPluginProvides = SurfaceProvides & MetadataRecordsProvides & SettingsProvides<StackSettingsProps> & TranslationsProvides & SchemaProvides;
57
45
  export {};
58
46
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAA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C5D,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,kBAAkB,CAAC,GAAG,CAAC,CAAC;IAChC,IAAI,EAAE,gBAAgB,CAAC;IACvB,QAAQ,EAAE,oBAAoB,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAAE,UAAU,EAAE,OAAO,CAAA;CAAE,CAAC;AAEzD,MAAM,MAAM,mBAAmB,GAAG,eAAe,GAC/C,uBAAuB,GACvB,gBAAgB,CAAC,kBAAkB,CAAC,GACpC,oBAAoB,GACpB,cAAc,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":"5.7.2"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-stack",
3
- "version": "0.7.4",
3
+ "version": "0.7.5-main.937ce75",
4
4
  "description": "DXOS Surface plugin for Stack entities",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -46,23 +46,23 @@
46
46
  "@radix-ui/react-collapsible": "^1.0.2",
47
47
  "node-fetch": "^2.6.0",
48
48
  "react-is": "~18.2.0",
49
- "@dxos/app-framework": "0.7.4",
50
- "@dxos/async": "0.7.4",
51
- "@dxos/client": "0.7.4",
52
- "@dxos/echo-schema": "0.7.4",
53
- "@dxos/invariant": "0.7.4",
54
- "@dxos/local-storage": "0.7.4",
55
- "@dxos/plugin-graph": "0.7.4",
56
- "@dxos/plugin-client": "0.7.4",
57
- "@dxos/plugin-ipfs": "0.7.4",
58
- "@dxos/plugin-space": "0.7.4",
59
- "@dxos/react-client": "0.7.4",
60
- "@dxos/react-ui-attention": "0.7.4",
61
- "@dxos/react-ui-form": "0.7.4",
62
- "@dxos/react-ui-mosaic": "0.7.4",
63
- "@dxos/react-ui-stack": "0.7.4",
64
- "@dxos/react-ui-searchlist": "0.7.4",
65
- "@dxos/util": "0.7.4"
49
+ "@dxos/app-framework": "0.7.5-main.937ce75",
50
+ "@dxos/async": "0.7.5-main.937ce75",
51
+ "@dxos/client": "0.7.5-main.937ce75",
52
+ "@dxos/invariant": "0.7.5-main.937ce75",
53
+ "@dxos/echo-schema": "0.7.5-main.937ce75",
54
+ "@dxos/local-storage": "0.7.5-main.937ce75",
55
+ "@dxos/plugin-graph": "0.7.5-main.937ce75",
56
+ "@dxos/plugin-ipfs": "0.7.5-main.937ce75",
57
+ "@dxos/plugin-client": "0.7.5-main.937ce75",
58
+ "@dxos/plugin-space": "0.7.5-main.937ce75",
59
+ "@dxos/react-client": "0.7.5-main.937ce75",
60
+ "@dxos/react-ui-attention": "0.7.5-main.937ce75",
61
+ "@dxos/react-ui-searchlist": "0.7.5-main.937ce75",
62
+ "@dxos/react-ui-stack": "0.7.5-main.937ce75",
63
+ "@dxos/react-ui-form": "0.7.5-main.937ce75",
64
+ "@dxos/util": "0.7.5-main.937ce75",
65
+ "@dxos/react-ui-mosaic": "0.7.5-main.937ce75"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@babel/core": "^7.18.13",
@@ -72,16 +72,16 @@
72
72
  "react": "~18.2.0",
73
73
  "react-dom": "~18.2.0",
74
74
  "vite": "5.4.7",
75
- "@dxos/react-ui-theme": "0.7.4",
76
- "@dxos/react-ui": "0.7.4",
77
- "@dxos/storybook-utils": "0.7.4"
75
+ "@dxos/react-ui": "0.7.5-main.937ce75",
76
+ "@dxos/storybook-utils": "0.7.5-main.937ce75",
77
+ "@dxos/react-ui-theme": "0.7.5-main.937ce75"
78
78
  },
79
79
  "peerDependencies": {
80
80
  "@phosphor-icons/react": "^2.1.5",
81
81
  "react": "~18.2.0",
82
82
  "react-dom": "~18.2.0",
83
- "@dxos/react-ui": "0.7.4",
84
- "@dxos/react-ui-theme": "0.7.4"
83
+ "@dxos/react-ui": "0.7.5-main.937ce75",
84
+ "@dxos/react-ui-theme": "0.7.5-main.937ce75"
85
85
  },
86
86
  "publishConfig": {
87
87
  "access": "public"
@@ -4,37 +4,24 @@
4
4
 
5
5
  import React from 'react';
6
6
 
7
- import { type Plugin, type PluginDefinition } from '@dxos/app-framework';
8
- import { create, type ReactiveEchoObject, fullyQualifiedId } from '@dxos/client/echo';
7
+ import { createSurface, type PluginDefinition } from '@dxos/app-framework';
8
+ import { type ReactiveEchoObject, fullyQualifiedId } from '@dxos/client/echo';
9
9
  import { LocalStorageStore } from '@dxos/local-storage';
10
10
  import { CollectionType } from '@dxos/plugin-space/types';
11
- import { Main } from '@dxos/react-ui';
12
- import { baseSurface, topbarBlockPaddingStart, bottombarBlockPaddingEnd } from '@dxos/react-ui-theme';
13
11
 
14
- import { StackMain, StackSettings, AddSectionDialog, dataHasAddSectionDialogProps } from './components';
12
+ import { StackMain, StackSettings } from './components';
15
13
  import meta, { SECTION_IDENTIFIER, STACK_PLUGIN } from './meta';
16
14
  import translations from './translations';
17
15
  import { StackViewType } from './types';
18
- import { type StackPluginProvides, type StackProvides, type StackState, type StackSettingsProps } from './types';
16
+ import { type StackPluginProvides, type StackSettingsProps } from './types';
19
17
 
20
18
  export const StackPlugin = (): PluginDefinition<StackPluginProvides> => {
21
19
  const settings = new LocalStorageStore<StackSettingsProps>(STACK_PLUGIN, { separation: true });
22
- const stackState = create<StackState>({ creators: [] });
23
20
 
24
21
  return {
25
22
  meta,
26
- ready: async (plugins) => {
23
+ ready: async () => {
27
24
  settings.prop({ key: 'separation', type: LocalStorageStore.bool() });
28
-
29
- for (const plugin of plugins) {
30
- if (plugin.meta.id === STACK_PLUGIN) {
31
- continue;
32
- }
33
-
34
- if (Array.isArray((plugin as Plugin<StackProvides>).provides?.stack?.creators)) {
35
- stackState.creators.push(...((plugin as Plugin<StackProvides>).provides.stack.creators ?? []));
36
- }
37
- }
38
25
  },
39
26
  provides: {
40
27
  settings: settings.values,
@@ -64,38 +51,30 @@ export const StackPlugin = (): PluginDefinition<StackPluginProvides> => {
64
51
  system: [StackViewType],
65
52
  },
66
53
  surface: {
67
- component: ({ data, role }) => {
68
- switch (data.component) {
69
- case `${STACK_PLUGIN}/AddSectionDialog`:
70
- return dataHasAddSectionDialogProps(data) ? <AddSectionDialog {...data.subject} /> : null;
71
- }
72
-
73
- const primary = data.active ?? data.object;
74
- // This allows the id to be overridden by the surface for situations where the id of the collection
75
- // is not the same as the id of what is being represented (e.g., a space with a root collection).
76
- const id = typeof data.id === 'string' ? data.id : undefined;
77
- switch (role) {
78
- case 'main':
79
- return primary instanceof CollectionType ? (
80
- <Main.Content bounce classNames={[baseSurface, topbarBlockPaddingStart, bottombarBlockPaddingEnd]}>
81
- <StackMain id={id ?? fullyQualifiedId(primary)} collection={primary} />
82
- </Main.Content>
83
- ) : null;
84
- case 'article':
85
- return primary instanceof CollectionType ? (
54
+ definitions: () => [
55
+ createSurface({
56
+ id: `${STACK_PLUGIN}/article`,
57
+ role: 'article',
58
+ filter: (data): data is { id?: string; subject: CollectionType } => data.subject instanceof CollectionType,
59
+ component: ({ data }) => {
60
+ // This allows the id to be overridden by the surface for situations where the id of the collection
61
+ // is not the same as the id of what is being represented (e.g., a space with a root collection).
62
+ const id = typeof data.id === 'string' ? data.id : undefined;
63
+ return (
86
64
  <div role='none' className='overflow-auto' style={{ contain: 'layout' }}>
87
- <StackMain id={id ?? fullyQualifiedId(primary)} collection={primary} />
65
+ <StackMain id={id ?? fullyQualifiedId(data.subject)} collection={data.subject} />
88
66
  </div>
89
- ) : null;
90
- case 'settings': {
91
- return data.plugin === meta.id ? <StackSettings settings={settings.values} /> : null;
92
- }
93
- default:
94
- return null;
95
- }
96
- },
67
+ );
68
+ },
69
+ }),
70
+ createSurface({
71
+ id: `${STACK_PLUGIN}/settings`,
72
+ role: 'settings',
73
+ filter: (data): data is any => data.plugin === meta.id,
74
+ component: () => <StackSettings settings={settings.values} />,
75
+ }),
76
+ ],
97
77
  },
98
- stack: stackState,
99
78
  },
100
79
  };
101
80
  };