@dxos/plugin-stack 0.7.4 → 0.7.5-main.9d26e3a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/StackMain-HSYQ5B3Y.mjs +295 -0
- package/dist/lib/browser/StackMain-HSYQ5B3Y.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +28 -163
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/StackMain-AWN5MFZK.cjs +309 -0
- package/dist/lib/node/StackMain-AWN5MFZK.cjs.map +7 -0
- package/dist/lib/node/index.cjs +28 -161
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node-esm/StackMain-EFCZCMIJ.mjs +296 -0
- package/dist/lib/node-esm/StackMain-EFCZCMIJ.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +28 -163
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/StackPlugin.d.ts.map +1 -1
- package/dist/types/src/components/StackMain.d.ts.map +1 -1
- package/dist/types/src/components/StackSection.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/types/stack.d.ts +6 -12
- package/dist/types/src/types/stack.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +4 -16
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/package.json +23 -23
- package/src/StackPlugin.tsx +26 -47
- package/src/components/StackMain.tsx +60 -69
- package/src/components/StackSection.tsx +2 -4
- package/src/components/index.ts +0 -1
- package/src/types/types.ts +3 -19
- package/dist/lib/browser/StackMain-4D4J4IRK.mjs +0 -391
- package/dist/lib/browser/StackMain-4D4J4IRK.mjs.map +0 -7
- package/dist/lib/node/StackMain-V7C55NCF.cjs +0 -403
- package/dist/lib/node/StackMain-V7C55NCF.cjs.map +0 -7
- package/dist/lib/node-esm/StackMain-5I43UWGF.mjs +0 -392
- package/dist/lib/node-esm/StackMain-5I43UWGF.mjs.map +0 -7
- package/dist/types/src/components/AddSection.d.ts +0 -6
- package/dist/types/src/components/AddSection.d.ts.map +0 -1
- package/dist/types/src/components/AddSectionDialog.d.ts +0 -14
- package/dist/types/src/components/AddSectionDialog.d.ts.map +0 -1
- package/src/components/AddSection.tsx +0 -102
- package/src/components/AddSectionDialog.tsx +0 -128
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/StackPlugin.tsx", "../../../src/components/index.ts", "../../../src/components/StackSettings.tsx", "../../../src/
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type Plugin, type PluginDefinition } from '@dxos/app-framework';\nimport { create, type ReactiveEchoObject, fullyQualifiedId } from '@dxos/client/echo';\nimport { LocalStorageStore } from '@dxos/local-storage';\nimport { CollectionType } from '@dxos/plugin-space/types';\nimport { Main } from '@dxos/react-ui';\nimport { baseSurface, topbarBlockPaddingStart, bottombarBlockPaddingEnd } from '@dxos/react-ui-theme';\n\nimport { StackMain, StackSettings, AddSectionDialog, dataHasAddSectionDialogProps } from './components';\nimport meta, { SECTION_IDENTIFIER, STACK_PLUGIN } from './meta';\nimport translations from './translations';\nimport { StackViewType } from './types';\nimport { type StackPluginProvides, type StackProvides, type StackState, type StackSettingsProps } from './types';\n\nexport const StackPlugin = (): PluginDefinition<StackPluginProvides> => {\n const settings = new LocalStorageStore<StackSettingsProps>(STACK_PLUGIN, { separation: true });\n const stackState = create<StackState>({ creators: [] });\n\n return {\n meta,\n ready: async (plugins) => {\n settings.prop({ key: 'separation', type: LocalStorageStore.bool() });\n\n for (const plugin of plugins) {\n if (plugin.meta.id === STACK_PLUGIN) {\n continue;\n }\n\n if (Array.isArray((plugin as Plugin<StackProvides>).provides?.stack?.creators)) {\n stackState.creators.push(...((plugin as Plugin<StackProvides>).provides.stack.creators ?? []));\n }\n }\n },\n provides: {\n settings: settings.values,\n metadata: {\n records: {\n [StackViewType.typename]: {\n placeholder: ['stack title placeholder', { ns: STACK_PLUGIN }],\n icon: 'ph--stack-simple--regular',\n },\n [SECTION_IDENTIFIER]: {\n parse: (section: { object: ReactiveEchoObject<any> }, type: string) => {\n switch (type) {\n case 'node':\n // TODO(wittjosiah): Remove cast.\n return { id: section.object.id, label: section.object.title, data: section.object };\n case 'object':\n return section.object;\n case 'view-object':\n return section;\n }\n },\n },\n },\n },\n translations,\n echo: {\n system: [StackViewType],\n },\n surface: {\n component: ({ data, role }) => {\n switch (data.component) {\n case `${STACK_PLUGIN}/AddSectionDialog`:\n return dataHasAddSectionDialogProps(data) ? <AddSectionDialog {...data.subject} /> : null;\n }\n\n const primary = data.active ?? data.object;\n // This allows the id to be overridden by the surface for situations where the id of the collection\n // is not the same as the id of what is being represented (e.g., a space with a root collection).\n const id = typeof data.id === 'string' ? data.id : undefined;\n switch (role) {\n case 'main':\n return primary instanceof CollectionType ? (\n <Main.Content bounce classNames={[baseSurface, topbarBlockPaddingStart, bottombarBlockPaddingEnd]}>\n <StackMain id={id ?? fullyQualifiedId(primary)} collection={primary} />\n </Main.Content>\n ) : null;\n case 'article':\n return primary instanceof CollectionType ? (\n <div role='none' className='overflow-auto' style={{ contain: 'layout' }}>\n <StackMain id={id ?? fullyQualifiedId(primary)} collection={primary} />\n </div>\n ) : null;\n case 'settings': {\n return data.plugin === meta.id ? <StackSettings settings={settings.values} /> : null;\n }\n default:\n return null;\n }\n },\n },\n stack: stackState,\n },\n };\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { lazy } from 'react';\n\nexport const StackMain = lazy(() => import('./StackMain'));\n\nexport * from './StackSettings';\nexport * from './AddSectionDialog';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Input, useTranslation } from '@dxos/react-ui';\nimport { DeprecatedFormInput } from '@dxos/react-ui-form';\n\nimport { STACK_PLUGIN } from '../meta';\nimport { type StackSettingsProps } from '../types';\n\nexport const StackSettings = ({ settings }: { settings: StackSettingsProps }) => {\n const { t } = useTranslation(STACK_PLUGIN);\n\n return (\n <>\n <DeprecatedFormInput label={t('settings separation label')}>\n <Input.Switch checked={settings.separation} onCheckedChange={(checked) => (settings.separation = !!checked)} />\n </DeprecatedFormInput>\n </>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { FilePlus } from '@phosphor-icons/react';\nimport React, { useCallback, useRef, useState } from 'react';\n\nimport { usePlugin, useIntent, LayoutAction, useResolvePlugin, parseFileManagerPlugin } from '@dxos/app-framework';\nimport { type ReactiveEchoObject, create, getSpace } from '@dxos/client/echo';\nimport { FileType } from '@dxos/plugin-ipfs/types';\nimport { type CollectionType } from '@dxos/plugin-space/types';\nimport { Dialog, toLocalizedString, useTranslation } from '@dxos/react-ui';\nimport { Path } from '@dxos/react-ui-mosaic';\nimport { SearchList } from '@dxos/react-ui-searchlist';\nimport { getSize, mx } from '@dxos/react-ui-theme';\nimport { nonNullable } from '@dxos/util';\n\nimport { STACK_PLUGIN } from '../meta';\nimport { StackViewType, type StackPluginProvides, type AddSectionPosition } from '../types';\n\ntype AddSectionDialogProps = { path?: string; position: AddSectionPosition; collection: CollectionType };\n\nexport const dataHasAddSectionDialogProps = (data: any): data is { subject: AddSectionDialogProps } => {\n return (\n 'subject' in data &&\n typeof data.subject === 'object' &&\n !!data.subject &&\n 'position' in data.subject &&\n typeof data.subject.position === 'string' &&\n 'collection' in data.subject\n );\n};\n\nexport const AddSectionDialog = ({ path, position, collection }: AddSectionDialogProps) => {\n const { t } = useTranslation(STACK_PLUGIN);\n const stackPlugin = usePlugin<StackPluginProvides>(STACK_PLUGIN);\n const fileManagerPlugin = useResolvePlugin(parseFileManagerPlugin);\n const fileRef = useRef<HTMLInputElement | null>(null);\n const { dispatch } = useIntent();\n const space = getSpace(collection);\n const [pending, setPending] = useState<boolean>(false);\n const [uploadError, setUploadError] = useState<Error | undefined>();\n\n const handleAdd = useCallback(\n (sectionObject: ReactiveEchoObject<any>) => {\n const index =\n position === 'beforeAll'\n ? 0\n : position === 'afterAll'\n ? collection.objects.length\n : collection.objects.filter(nonNullable).findIndex((section) => section.id === Path.last(path!));\n\n collection.objects.splice(index + (position === 'after' ? 1 : 0), 0, sectionObject);\n const stack = collection.views[StackViewType.typename];\n if (stack) {\n stack.sections[sectionObject.id] = {};\n }\n setPending(false);\n void dispatch?.({ action: LayoutAction.SET_LAYOUT, data: { element: 'dialog', state: false } });\n },\n [collection, path, position, dispatch],\n );\n\n const handleFileUpload =\n fileManagerPlugin?.provides.file.upload && space\n ? async (file: File) => {\n const filename = file.name.split('.')[0];\n try {\n const info = await fileManagerPlugin.provides.file.upload?.(file, space);\n if (info) {\n const obj = create(FileType, { type: file.type, name: filename, filename, cid: info.cid });\n handleAdd(obj);\n }\n } catch (err: any) {\n setUploadError(err);\n }\n }\n : undefined;\n\n return (\n <Dialog.Content>\n <Dialog.Title>{t(`add section ${position} dialog title`)}</Dialog.Title>\n <SearchList.Root label={t('add section input placeholder')}>\n <SearchList.Input placeholder={t('add section input placeholder')} classNames='pli-3' disabled={pending} />\n <SearchList.Content classNames='min-bs-24 bs-fit max-bs-64 overflow-auto' {...(pending && { inert: 'true' })}>\n {stackPlugin?.provides?.stack.creators?.map(({ id, icon: Icon, label: propsLabel, testId, intent }) => {\n const label = toLocalizedString(propsLabel, t);\n return (\n <SearchList.Item\n value={label}\n key={id}\n onSelect={async () => {\n setPending(true);\n const { data: nextSection } = (await dispatch({ ...intent, data: { space } })) ?? {};\n handleAdd(nextSection);\n }}\n classNames='flex items-center gap-2 pli-2'\n data-testid={testId}\n >\n {Icon && <Icon className={mx(getSize(4), 'shrink-0')} />}\n <span className='grow truncate'>{label}</span>\n </SearchList.Item>\n );\n })}\n {handleFileUpload && (\n <SearchList.Item\n value={t('upload file label')}\n classNames='flex items-center gap-2 pli-2'\n onSelect={() => fileRef.current?.click()}\n >\n <FilePlus />\n <span className='grow truncate'>{t('upload file label')}</span>\n </SearchList.Item>\n )}\n {uploadError && <div className='text-error-500'>{uploadError.message}</div>}\n </SearchList.Content>\n </SearchList.Root>\n {handleFileUpload && (\n <input\n type='file'\n className='sr-only'\n ref={fileRef}\n onChange={({ target: { files } }) => files && handleFileUpload(files[0])}\n />\n )}\n </Dialog.Content>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { translations as stackTranslations } from '@dxos/react-ui-stack';\n\nimport { STACK_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [STACK_PLUGIN]: {\n 'plugin name': 'Stacks',\n 'settings separation label': 'Separate sections',\n 'add section beforeAll dialog title': 'Add a section to the start',\n 'add section afterAll dialog title': 'Add a section to the end',\n 'add section before dialog title': 'Add a section',\n 'add section after dialog title': 'Add a section',\n 'add section input placeholder': 'Find the type of section to add',\n 'upload file label': 'Add file',\n 'add section label': 'Add section',\n 'empty stack message': 'Drag items into the stack.',\n 'remove section label': 'Delete',\n 'navigate to section label': 'Navigate to item',\n 'untitled section title': 'Untitled section',\n 'add section before label': 'Add before',\n 'add section after label': 'Add after',\n 'expand label': 'Expand',\n 'collapse label': 'Collapse',\n 'drag handle label': 'Press space or enter to begin dragging this item.',\n },\n },\n },\n ...stackTranslations,\n];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { StackPlugin } from './StackPlugin';\n\nexport default StackPlugin;\n\nexport * from './types';\n\nexport * from './StackPlugin';\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;AAIA,OAAOA,YAAW;
|
|
6
|
-
"names": ["React", "
|
|
3
|
+
"sources": ["../../../src/StackPlugin.tsx", "../../../src/components/index.ts", "../../../src/components/StackSettings.tsx", "../../../src/translations.ts", "../../../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { createSurface, type PluginDefinition } from '@dxos/app-framework';\nimport { type ReactiveEchoObject, fullyQualifiedId } from '@dxos/client/echo';\nimport { LocalStorageStore } from '@dxos/local-storage';\nimport { CollectionType } from '@dxos/plugin-space/types';\n\nimport { StackMain, StackSettings } from './components';\nimport meta, { SECTION_IDENTIFIER, STACK_PLUGIN } from './meta';\nimport translations from './translations';\nimport { StackViewType } from './types';\nimport { type StackPluginProvides, type StackSettingsProps } from './types';\n\nexport const StackPlugin = (): PluginDefinition<StackPluginProvides> => {\n const settings = new LocalStorageStore<StackSettingsProps>(STACK_PLUGIN, { separation: true });\n\n return {\n meta,\n ready: async () => {\n settings.prop({ key: 'separation', type: LocalStorageStore.bool() });\n },\n provides: {\n settings: settings.values,\n metadata: {\n records: {\n [StackViewType.typename]: {\n placeholder: ['stack title placeholder', { ns: STACK_PLUGIN }],\n icon: 'ph--stack-simple--regular',\n },\n [SECTION_IDENTIFIER]: {\n parse: (section: { object: ReactiveEchoObject<any> }, type: string) => {\n switch (type) {\n case 'node':\n // TODO(wittjosiah): Remove cast.\n return { id: section.object.id, label: section.object.title, data: section.object };\n case 'object':\n return section.object;\n case 'view-object':\n return section;\n }\n },\n },\n },\n },\n translations,\n echo: {\n system: [StackViewType],\n },\n surface: {\n definitions: () => [\n createSurface({\n id: `${STACK_PLUGIN}/article`,\n role: 'article',\n filter: (data): data is { id?: string; subject: CollectionType } => data.subject instanceof CollectionType,\n component: ({ data }) => {\n // This allows the id to be overridden by the surface for situations where the id of the collection\n // is not the same as the id of what is being represented (e.g., a space with a root collection).\n const id = typeof data.id === 'string' ? data.id : undefined;\n return (\n <div role='none' className='overflow-auto' style={{ contain: 'layout' }}>\n <StackMain id={id ?? fullyQualifiedId(data.subject)} collection={data.subject} />\n </div>\n );\n },\n }),\n createSurface({\n id: `${STACK_PLUGIN}/settings`,\n role: 'settings',\n filter: (data): data is any => data.plugin === meta.id,\n component: () => <StackSettings settings={settings.values} />,\n }),\n ],\n },\n },\n };\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { lazy } from 'react';\n\nexport const StackMain = lazy(() => import('./StackMain'));\n\nexport * from './StackSettings';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Input, useTranslation } from '@dxos/react-ui';\nimport { DeprecatedFormInput } from '@dxos/react-ui-form';\n\nimport { STACK_PLUGIN } from '../meta';\nimport { type StackSettingsProps } from '../types';\n\nexport const StackSettings = ({ settings }: { settings: StackSettingsProps }) => {\n const { t } = useTranslation(STACK_PLUGIN);\n\n return (\n <>\n <DeprecatedFormInput label={t('settings separation label')}>\n <Input.Switch checked={settings.separation} onCheckedChange={(checked) => (settings.separation = !!checked)} />\n </DeprecatedFormInput>\n </>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { translations as stackTranslations } from '@dxos/react-ui-stack';\n\nimport { STACK_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [STACK_PLUGIN]: {\n 'plugin name': 'Stacks',\n 'settings separation label': 'Separate sections',\n 'add section beforeAll dialog title': 'Add a section to the start',\n 'add section afterAll dialog title': 'Add a section to the end',\n 'add section before dialog title': 'Add a section',\n 'add section after dialog title': 'Add a section',\n 'add section input placeholder': 'Find the type of section to add',\n 'upload file label': 'Add file',\n 'add section label': 'Add section',\n 'empty stack message': 'Drag items into the stack.',\n 'remove section label': 'Delete',\n 'navigate to section label': 'Navigate to item',\n 'untitled section title': 'Untitled section',\n 'add section before label': 'Add before',\n 'add section after label': 'Add after',\n 'expand label': 'Expand',\n 'collapse label': 'Collapse',\n 'drag handle label': 'Press space or enter to begin dragging this item.',\n },\n },\n },\n ...stackTranslations,\n];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { StackPlugin } from './StackPlugin';\n\nexport default StackPlugin;\n\nexport * from './types';\n\nexport * from './StackPlugin';\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;AAIA,OAAOA,YAAW;AAElB,SAASC,qBAA4C;AACrD,SAAkCC,wBA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5DgB,MAAM;UACR;UACA,CAACC,kBAAAA,GAAqB;YACpBC,OAAO,CAACC,SAA8Cb,SAAAA;AACpD,sBAAQA,MAAAA;gBACN,KAAK;AAEH,yBAAO;oBAAEc,IAAID,QAAQE,OAAOD;oBAAIE,OAAOH,QAAQE,OAAOE;oBAAOC,MAAML,QAAQE;kBAAO;gBACpF,KAAK;AACH,yBAAOF,QAAQE;gBACjB,KAAK;AACH,yBAAOF;cACX;YACF;UACF;QACF;MACF;MACAM;MACAC,MAAM;QACJC,QAAQ;UAACf;;MACX;MACAgB,SAAS;QACPC,aAAa,MAAM;UACjBC,cAAc;YACZV,IAAI,GAAGpB,YAAAA;YACP+B,MAAM;YACNC,QAAQ,CAACR,SAA2DA,KAAKS,mBAAmBC;YAC5FC,WAAW,CAAC,EAAEX,KAAI,MAAE;AAGlB,oBAAMJ,KAAK,OAAOI,KAAKJ,OAAO,WAAWI,KAAKJ,KAAKgB;AACnD,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/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":20482},"packages/plugins/plugin-stack/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-DS5KGEJG.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.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/browser/StackMain-4D4J4IRK.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":10907},"packages/plugins/plugin-stack/dist/lib/browser/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-stack/dist/lib/browser/meta.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-DS5KGEJG.mjs","kind":"import-statement"}],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","default"],"entryPoint":"packages/plugins/plugin-stack/src/meta.ts","inputs":{},"bytes":203},"packages/plugins/plugin-stack/dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-stack/dist/lib/browser/types/index.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.mjs","kind":"import-statement"}],"exports":["SectionSchema","StackViewType"],"entryPoint":"packages/plugins/plugin-stack/src/types/index.ts","inputs":{},"bytes":154},"packages/plugins/plugin-stack/dist/lib/browser/StackMain-4D4J4IRK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":27259},"packages/plugins/plugin-stack/dist/lib/browser/StackMain-4D4J4IRK.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-DS5KGEJG.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.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":13970},"packages/plugins/plugin-stack/dist/lib/browser/chunk-DS5KGEJG.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1027},"packages/plugins/plugin-stack/dist/lib/browser/chunk-DS5KGEJG.mjs":{"imports":[],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","meta_default"],"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytesInOutput":565}},"bytes":720},"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1614},"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.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":657}}}
|
|
1
|
+
{"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytes":2237,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytes":2624,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytes":1887,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytes":3039,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytes":17526,"imports":[{"path":"@radix-ui/react-collapsible","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx","kind":"import-statement","original":"./CaretDownUp"},{"path":"packages/plugins/plugin-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/types/stack.ts":{"bytes":3411,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/types/types.ts":{"bytes":2607,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/types/index.ts":{"bytes":581,"imports":[{"path":"packages/plugins/plugin-stack/src/types/stack.ts","kind":"import-statement","original":"./stack"},{"path":"packages/plugins/plugin-stack/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackMain.tsx":{"bytes":18858,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/plugins/plugin-stack/src/components/StackSection.tsx","kind":"import-statement","original":"./StackSection"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/index.ts":{"bytes":873,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/StackSettings.tsx","kind":"import-statement","original":"./StackSettings"},{"path":"packages/plugins/plugin-stack/src/components/StackMain.tsx","kind":"dynamic-import","original":"./StackMain"}],"format":"esm"},"packages/plugins/plugin-stack/src/translations.ts":{"bytes":4081,"imports":[{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/StackPlugin.tsx":{"bytes":11494,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-stack/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-stack/src/index.ts":{"bytes":854,"imports":[{"path":"packages/plugins/plugin-stack/src/StackPlugin.tsx","kind":"import-statement","original":"./StackPlugin"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/plugin-stack/src/StackPlugin.tsx","kind":"import-statement","original":"./StackPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-stack/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8687},"packages/plugins/plugin-stack/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-DS5KGEJG.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.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/browser/StackMain-HSYQ5B3Y.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":5140},"packages/plugins/plugin-stack/dist/lib/browser/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-stack/dist/lib/browser/meta.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-DS5KGEJG.mjs","kind":"import-statement"}],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","default"],"entryPoint":"packages/plugins/plugin-stack/src/meta.ts","inputs":{},"bytes":203},"packages/plugins/plugin-stack/dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-stack/dist/lib/browser/types/index.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.mjs","kind":"import-statement"}],"exports":["SectionSchema","StackViewType"],"entryPoint":"packages/plugins/plugin-stack/src/types/index.ts","inputs":{},"bytes":154},"packages/plugins/plugin-stack/dist/lib/browser/StackMain-HSYQ5B3Y.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21860},"packages/plugins/plugin-stack/dist/lib/browser/StackMain-HSYQ5B3Y.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-DS5KGEJG.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.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":11203},"packages/plugins/plugin-stack/dist/lib/browser/chunk-DS5KGEJG.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1027},"packages/plugins/plugin-stack/dist/lib/browser/chunk-DS5KGEJG.mjs":{"imports":[],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","meta_default"],"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytesInOutput":565}},"bytes":720},"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1614},"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.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":657}}}
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var StackMain_AWN5MFZK_exports = {};
|
|
30
|
+
__export(StackMain_AWN5MFZK_exports, {
|
|
31
|
+
default: () => StackMain_default
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(StackMain_AWN5MFZK_exports);
|
|
34
|
+
var import_chunk_PA5PRDM6 = require("./chunk-PA5PRDM6.cjs");
|
|
35
|
+
var import_chunk_6IPBX635 = require("./chunk-6IPBX635.cjs");
|
|
36
|
+
var import_react = require("@phosphor-icons/react");
|
|
37
|
+
var import_react2 = __toESM(require("react"));
|
|
38
|
+
var import_app_framework = require("@dxos/app-framework");
|
|
39
|
+
var import_echo = require("@dxos/client/echo");
|
|
40
|
+
var import_plugin_graph = require("@dxos/plugin-graph");
|
|
41
|
+
var import_plugin_space = require("@dxos/plugin-space");
|
|
42
|
+
var import_react_ui = require("@dxos/react-ui");
|
|
43
|
+
var import_react_ui_attention = require("@dxos/react-ui-attention");
|
|
44
|
+
var import_react_ui_stack = require("@dxos/react-ui-stack");
|
|
45
|
+
var import_util = require("@dxos/util");
|
|
46
|
+
var import_react3 = require("react");
|
|
47
|
+
var CollapsiblePrimitive = __toESM(require("@radix-ui/react-collapsible"));
|
|
48
|
+
var import_react4 = __toESM(require("react"));
|
|
49
|
+
var import_app_framework2 = require("@dxos/app-framework");
|
|
50
|
+
var import_react_ui2 = require("@dxos/react-ui");
|
|
51
|
+
var import_react_ui_attention2 = require("@dxos/react-ui-attention");
|
|
52
|
+
var import_react_ui_stack2 = require("@dxos/react-ui-stack");
|
|
53
|
+
var import_react_ui_theme = require("@dxos/react-ui-theme");
|
|
54
|
+
var import_react5 = __toESM(require("react"));
|
|
55
|
+
var StackContext = /* @__PURE__ */ (0, import_react3.createContext)({
|
|
56
|
+
onCollapse: () => {
|
|
57
|
+
},
|
|
58
|
+
onNavigate: async () => {
|
|
59
|
+
},
|
|
60
|
+
onDelete: async () => {
|
|
61
|
+
},
|
|
62
|
+
onAdd: () => {
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
var useStack = () => (0, import_react3.useContext)(StackContext);
|
|
66
|
+
var CaretDownUp = ({ children, ...props }) => {
|
|
67
|
+
return /* @__PURE__ */ import_react5.default.createElement("svg", {
|
|
68
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
69
|
+
viewBox: "0 0 256 256",
|
|
70
|
+
...props
|
|
71
|
+
}, /* @__PURE__ */ import_react5.default.createElement("rect", {
|
|
72
|
+
width: "256",
|
|
73
|
+
height: "256",
|
|
74
|
+
fill: "none"
|
|
75
|
+
}), /* @__PURE__ */ import_react5.default.createElement("polyline", {
|
|
76
|
+
points: "80 224 128 176 176 224",
|
|
77
|
+
fill: "none",
|
|
78
|
+
stroke: "currentColor",
|
|
79
|
+
strokeLinecap: "round",
|
|
80
|
+
strokeLinejoin: "round",
|
|
81
|
+
strokeWidth: "16"
|
|
82
|
+
}), /* @__PURE__ */ import_react5.default.createElement("polyline", {
|
|
83
|
+
points: "80 32 128 80 176 32",
|
|
84
|
+
fill: "none",
|
|
85
|
+
stroke: "currentColor",
|
|
86
|
+
strokeLinecap: "round",
|
|
87
|
+
strokeLinejoin: "round",
|
|
88
|
+
strokeWidth: "16"
|
|
89
|
+
}), children);
|
|
90
|
+
};
|
|
91
|
+
var sectionActionDimensions = "m-1 p-1 shrink-0 min-bs-0 is-[--rail-action] bs-min";
|
|
92
|
+
var StackSection = ({ id, view, object, metadata: { icon = "ph--placeholder--regular" } }) => {
|
|
93
|
+
const { t } = (0, import_react_ui2.useTranslation)(import_chunk_PA5PRDM6.STACK_PLUGIN);
|
|
94
|
+
const { onNavigate, onAdd, onCollapse, onDelete } = useStack();
|
|
95
|
+
const [optionsMenuOpen, setOptionsMenuOpen] = (0, import_react4.useState)(false);
|
|
96
|
+
const attendableAttrs = (0, import_react_ui_attention2.useAttendableAttributes)(id);
|
|
97
|
+
return /* @__PURE__ */ import_react4.default.createElement(CollapsiblePrimitive.Root, {
|
|
98
|
+
asChild: true,
|
|
99
|
+
open: !view.collapsed,
|
|
100
|
+
onOpenChange: (nextOpen) => onCollapse?.(id, !nextOpen)
|
|
101
|
+
}, /* @__PURE__ */ import_react4.default.createElement(import_react_ui_stack2.StackItem.Root, {
|
|
102
|
+
item: {
|
|
103
|
+
id
|
|
104
|
+
},
|
|
105
|
+
role: "section",
|
|
106
|
+
...attendableAttrs,
|
|
107
|
+
classNames: "border-be border-separator"
|
|
108
|
+
}, /* @__PURE__ */ import_react4.default.createElement(import_react_ui_stack2.StackItem.Heading, {
|
|
109
|
+
classNames: "attention-surface border-ie !border-separator"
|
|
110
|
+
}, /* @__PURE__ */ import_react4.default.createElement("span", {
|
|
111
|
+
className: "sr-only"
|
|
112
|
+
}, view.title), /* @__PURE__ */ import_react4.default.createElement("div", {
|
|
113
|
+
role: "none",
|
|
114
|
+
className: "sticky -block-start-px bg-[--sticky-bg]"
|
|
115
|
+
}, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.DropdownMenu.Root, {
|
|
116
|
+
open: optionsMenuOpen,
|
|
117
|
+
onOpenChange: setOptionsMenuOpen
|
|
118
|
+
}, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.DropdownMenu.Trigger, {
|
|
119
|
+
asChild: true
|
|
120
|
+
}, /* @__PURE__ */ import_react4.default.createElement(import_react_ui_stack2.StackItem.SigilButton, null, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Icon, {
|
|
121
|
+
icon,
|
|
122
|
+
size: 5,
|
|
123
|
+
classNames: "transition-opacity"
|
|
124
|
+
}))), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.DropdownMenu.Portal, null, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.DropdownMenu.Content, null, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.DropdownMenu.Viewport, null, view.collapsed ? /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.DropdownMenu.Item, {
|
|
125
|
+
onClick: () => onNavigate(id),
|
|
126
|
+
"data-testid": "section.navigate-to"
|
|
127
|
+
}, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Icon, {
|
|
128
|
+
icon: "ph--arrow-square-out--regular",
|
|
129
|
+
size: 5
|
|
130
|
+
}), /* @__PURE__ */ import_react4.default.createElement("span", {
|
|
131
|
+
className: "mis-2 grow"
|
|
132
|
+
}, t("navigate to section label"))) : /* @__PURE__ */ import_react4.default.createElement(CollapsiblePrimitive.Trigger, {
|
|
133
|
+
asChild: true
|
|
134
|
+
}, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.DropdownMenu.Item, null, /* @__PURE__ */ import_react4.default.createElement(CaretDownUp, {
|
|
135
|
+
className: (0, import_react_ui_theme.getSize)(5)
|
|
136
|
+
}), /* @__PURE__ */ import_react4.default.createElement("span", {
|
|
137
|
+
className: "mis-2 grow"
|
|
138
|
+
}, t("collapse label")))), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.DropdownMenu.Item, {
|
|
139
|
+
onClick: () => onAdd(id, "before"),
|
|
140
|
+
"data-testid": "section.add-before"
|
|
141
|
+
}, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Icon, {
|
|
142
|
+
icon: "ph--arrow-line-up--regular",
|
|
143
|
+
size: 5
|
|
144
|
+
}), /* @__PURE__ */ import_react4.default.createElement("span", {
|
|
145
|
+
className: "mis-2 grow"
|
|
146
|
+
}, t("add section before label"))), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.DropdownMenu.Item, {
|
|
147
|
+
onClick: () => onAdd(id, "after"),
|
|
148
|
+
"data-testid": "section.add-after"
|
|
149
|
+
}, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Icon, {
|
|
150
|
+
icon: "ph--arrow-line-down--regular",
|
|
151
|
+
size: 5
|
|
152
|
+
}), /* @__PURE__ */ import_react4.default.createElement("span", {
|
|
153
|
+
className: "mis-2 grow"
|
|
154
|
+
}, t("add section after label"))), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.DropdownMenu.Item, {
|
|
155
|
+
onClick: () => onDelete(id),
|
|
156
|
+
"data-testid": "section.remove"
|
|
157
|
+
}, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Icon, {
|
|
158
|
+
icon: "ph--trash--regular",
|
|
159
|
+
size: 5
|
|
160
|
+
}), /* @__PURE__ */ import_react4.default.createElement("span", {
|
|
161
|
+
className: "mis-2 grow"
|
|
162
|
+
}, t("remove section label")))), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.DropdownMenu.Arrow, null)))), view.collapsed ? /* @__PURE__ */ import_react4.default.createElement(CollapsiblePrimitive.Trigger, {
|
|
163
|
+
asChild: true
|
|
164
|
+
}, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.IconButton, {
|
|
165
|
+
iconOnly: true,
|
|
166
|
+
variant: "ghost",
|
|
167
|
+
label: t("expand label"),
|
|
168
|
+
icon: "ph--caret-up-down--regular",
|
|
169
|
+
classNames: sectionActionDimensions
|
|
170
|
+
})) : /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.IconButton, {
|
|
171
|
+
iconOnly: true,
|
|
172
|
+
variant: "ghost",
|
|
173
|
+
onClick: () => onNavigate(id),
|
|
174
|
+
label: t("navigate to section label"),
|
|
175
|
+
icon: "ph--arrow-square-out--regular",
|
|
176
|
+
"data-testid": "section.navigate-to",
|
|
177
|
+
classNames: sectionActionDimensions
|
|
178
|
+
}))), /* @__PURE__ */ import_react4.default.createElement(CollapsiblePrimitive.Content, null, /* @__PURE__ */ import_react4.default.createElement(import_app_framework2.Surface, {
|
|
179
|
+
role: "section",
|
|
180
|
+
data: {
|
|
181
|
+
subject: object
|
|
182
|
+
},
|
|
183
|
+
limit: 1,
|
|
184
|
+
placeholder: /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null)
|
|
185
|
+
})), view.collapsed && /* @__PURE__ */ import_react4.default.createElement(import_react_ui_stack2.StackItem.Content, {
|
|
186
|
+
toolbar: false,
|
|
187
|
+
classNames: "attention-surface"
|
|
188
|
+
}, /* @__PURE__ */ import_react4.default.createElement("h2", {
|
|
189
|
+
className: (0, import_react_ui_theme.mx)("flex items-center p-4 font-medium is-full", import_react_ui_theme.textBlockWidth)
|
|
190
|
+
}, view.title))));
|
|
191
|
+
};
|
|
192
|
+
var StackMain = ({ id, collection }) => {
|
|
193
|
+
const { dispatchPromise: dispatch } = (0, import_app_framework.useIntentDispatcher)();
|
|
194
|
+
const { graph } = (0, import_plugin_graph.useGraph)();
|
|
195
|
+
const { t } = (0, import_react_ui.useTranslation)(import_chunk_PA5PRDM6.STACK_PLUGIN);
|
|
196
|
+
const metadataPlugin = (0, import_app_framework.useResolvePlugin)(import_app_framework.parseMetadataResolverPlugin);
|
|
197
|
+
const defaultStack = (0, import_react2.useMemo)(() => (0, import_echo.create)(import_chunk_6IPBX635.StackViewType, {
|
|
198
|
+
sections: {}
|
|
199
|
+
}), [
|
|
200
|
+
collection
|
|
201
|
+
]);
|
|
202
|
+
const stack = collection.views[import_chunk_6IPBX635.StackViewType.typename]?.target ?? defaultStack;
|
|
203
|
+
const [collapsedSections, setCollapsedSections] = (0, import_react2.useState)({});
|
|
204
|
+
(0, import_react2.useEffect)(() => {
|
|
205
|
+
if (!collection.views[import_chunk_6IPBX635.StackViewType.typename]) {
|
|
206
|
+
collection.views[import_chunk_6IPBX635.StackViewType.typename] = (0, import_echo.makeRef)(stack);
|
|
207
|
+
}
|
|
208
|
+
}, [
|
|
209
|
+
collection,
|
|
210
|
+
stack
|
|
211
|
+
]);
|
|
212
|
+
const items = collection.objects.map((object) => object.target).filter(import_util.nonNullable).map((object) => {
|
|
213
|
+
const metadata = metadataPlugin?.provides.metadata.resolver((0, import_echo.getType)(object)?.objectId ?? "never");
|
|
214
|
+
const view = {
|
|
215
|
+
...stack.sections[object.id],
|
|
216
|
+
collapsed: collapsedSections[(0, import_echo.fullyQualifiedId)(object)],
|
|
217
|
+
title: object?.title ?? (0, import_react_ui.toLocalizedString)(graph.findNode((0, import_echo.fullyQualifiedId)(object))?.properties.label, t)
|
|
218
|
+
};
|
|
219
|
+
return {
|
|
220
|
+
id: (0, import_echo.fullyQualifiedId)(object),
|
|
221
|
+
object,
|
|
222
|
+
metadata,
|
|
223
|
+
view
|
|
224
|
+
};
|
|
225
|
+
}) ?? [];
|
|
226
|
+
const handleDelete = (0, import_react2.useCallback)(async (id2) => {
|
|
227
|
+
const index = collection.objects.map((object2) => object2.target).filter(import_util.nonNullable).findIndex((section) => (0, import_echo.fullyQualifiedId)(section) === id2);
|
|
228
|
+
const object = collection.objects[index].target;
|
|
229
|
+
if ((0, import_echo.isReactiveObject)(object)) {
|
|
230
|
+
await dispatch((0, import_app_framework.createIntent)(import_plugin_space.SpaceAction.RemoveObjects, {
|
|
231
|
+
objects: [
|
|
232
|
+
object
|
|
233
|
+
],
|
|
234
|
+
target: collection
|
|
235
|
+
}));
|
|
236
|
+
}
|
|
237
|
+
}, [
|
|
238
|
+
collection,
|
|
239
|
+
dispatch
|
|
240
|
+
]);
|
|
241
|
+
const handleAdd = (0, import_react2.useCallback)(async (id2, position) => {
|
|
242
|
+
await dispatch?.((0, import_app_framework.createIntent)(import_app_framework.LayoutAction.SetLayout, {
|
|
243
|
+
element: "dialog",
|
|
244
|
+
component: `${import_chunk_PA5PRDM6.STACK_PLUGIN}/AddSectionDialog`,
|
|
245
|
+
subject: {
|
|
246
|
+
path: id2,
|
|
247
|
+
position,
|
|
248
|
+
collection
|
|
249
|
+
}
|
|
250
|
+
}));
|
|
251
|
+
}, [
|
|
252
|
+
collection,
|
|
253
|
+
dispatch
|
|
254
|
+
]);
|
|
255
|
+
const handleNavigate = (0, import_react2.useCallback)(async (id2) => {
|
|
256
|
+
await dispatch((0, import_app_framework.createIntent)(import_app_framework.NavigationAction.Open, {
|
|
257
|
+
activeParts: {
|
|
258
|
+
main: [
|
|
259
|
+
id2
|
|
260
|
+
]
|
|
261
|
+
}
|
|
262
|
+
}));
|
|
263
|
+
await dispatch((0, import_app_framework.createIntent)(import_app_framework.LayoutAction.ScrollIntoView, {
|
|
264
|
+
id: id2
|
|
265
|
+
}));
|
|
266
|
+
}, [
|
|
267
|
+
dispatch
|
|
268
|
+
]);
|
|
269
|
+
const handleCollapse = (0, import_react2.useCallback)((id2, collapsed) => setCollapsedSections((prev) => ({
|
|
270
|
+
...prev,
|
|
271
|
+
[id2]: collapsed
|
|
272
|
+
})), []);
|
|
273
|
+
const handleAddSection = (0, import_react2.useCallback)(() => dispatch?.((0, import_app_framework.createIntent)(import_plugin_space.SpaceAction.OpenCreateObject, {
|
|
274
|
+
target: collection,
|
|
275
|
+
navigable: false
|
|
276
|
+
})), [
|
|
277
|
+
collection,
|
|
278
|
+
dispatch
|
|
279
|
+
]);
|
|
280
|
+
return /* @__PURE__ */ import_react2.default.createElement(import_react_ui_attention.AttentionProvider, {
|
|
281
|
+
id
|
|
282
|
+
}, /* @__PURE__ */ import_react2.default.createElement(StackContext.Provider, {
|
|
283
|
+
value: {
|
|
284
|
+
onCollapse: handleCollapse,
|
|
285
|
+
onNavigate: handleNavigate,
|
|
286
|
+
onDelete: handleDelete,
|
|
287
|
+
onAdd: handleAdd
|
|
288
|
+
}
|
|
289
|
+
}, /* @__PURE__ */ import_react2.default.createElement(import_react_ui_stack.Stack, {
|
|
290
|
+
orientation: "vertical",
|
|
291
|
+
size: "intrinsic",
|
|
292
|
+
id,
|
|
293
|
+
"data-testid": "main.stack"
|
|
294
|
+
}, items.map((item) => /* @__PURE__ */ import_react2.default.createElement(StackSection, {
|
|
295
|
+
key: item.id,
|
|
296
|
+
...item
|
|
297
|
+
}))), /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
298
|
+
role: "none",
|
|
299
|
+
className: "flex mlb-2 pli-2 justify-center"
|
|
300
|
+
}, /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Button, {
|
|
301
|
+
"data-testid": "stack.createSection",
|
|
302
|
+
classNames: "gap-2",
|
|
303
|
+
onClick: handleAddSection
|
|
304
|
+
}, /* @__PURE__ */ import_react2.default.createElement(import_react.Plus, null), /* @__PURE__ */ import_react2.default.createElement("span", {
|
|
305
|
+
className: "sr-only"
|
|
306
|
+
}, t("add section label"))))));
|
|
307
|
+
};
|
|
308
|
+
var StackMain_default = StackMain;
|
|
309
|
+
//# sourceMappingURL=StackMain-AWN5MFZK.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/StackMain.tsx", "../../../src/components/StackContext.tsx", "../../../src/components/StackSection.tsx", "../../../src/components/CaretDownUp.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plus } from '@phosphor-icons/react';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport {\n createIntent,\n LayoutAction,\n NavigationAction,\n parseMetadataResolverPlugin,\n useIntentDispatcher,\n useResolvePlugin,\n} from '@dxos/app-framework';\nimport { create, getType, fullyQualifiedId, isReactiveObject, makeRef } from '@dxos/client/echo';\nimport { useGraph } from '@dxos/plugin-graph';\nimport { SpaceAction } from '@dxos/plugin-space';\nimport { type CollectionType } from '@dxos/plugin-space/types';\nimport { Button, toLocalizedString, useTranslation } from '@dxos/react-ui';\nimport { AttentionProvider } from '@dxos/react-ui-attention';\nimport { Stack } from '@dxos/react-ui-stack';\nimport { nonNullable } from '@dxos/util';\n\nimport { StackContext } from './StackContext';\nimport { StackSection } from './StackSection';\nimport { STACK_PLUGIN } from '../meta';\nimport {\n StackViewType,\n type CollapsedSections,\n type StackSectionMetadata,\n type StackSectionView,\n type StackSectionItem,\n type AddSectionPosition,\n} from '../types';\n\ntype StackMainProps = {\n id: string;\n collection: CollectionType;\n};\n\nconst StackMain = ({ id, collection }: StackMainProps) => {\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n const { graph } = useGraph();\n const { t } = useTranslation(STACK_PLUGIN);\n const metadataPlugin = useResolvePlugin(parseMetadataResolverPlugin);\n const defaultStack = useMemo(() => create(StackViewType, { sections: {} }), [collection]);\n const stack = (collection.views[StackViewType.typename]?.target as StackViewType | undefined) ?? defaultStack;\n const [collapsedSections, setCollapsedSections] = useState<CollapsedSections>({});\n\n useEffect(() => {\n if (!collection.views[StackViewType.typename]) {\n collection.views[StackViewType.typename] = makeRef(stack);\n }\n }, [collection, stack]);\n\n const items =\n collection.objects\n // TODO(wittjosiah): Should the database handle this differently?\n // TODO(wittjosiah): Render placeholders for missing objects so they can be removed from the stack?\n .map((object) => object.target)\n .filter(nonNullable)\n .map((object) => {\n const metadata = metadataPlugin?.provides.metadata.resolver(\n getType(object)?.objectId ?? 'never',\n ) as StackSectionMetadata;\n const view = {\n ...stack.sections[object.id],\n collapsed: collapsedSections[fullyQualifiedId(object)],\n title:\n (object as any)?.title ?? toLocalizedString(graph.findNode(fullyQualifiedId(object))?.properties.label, t),\n } as StackSectionView;\n return { id: fullyQualifiedId(object), object, metadata, view } satisfies StackSectionItem;\n }) ?? [];\n\n const handleDelete = useCallback(\n async (id: string) => {\n const index = collection.objects\n .map((object) => object.target)\n .filter(nonNullable)\n .findIndex((section) => fullyQualifiedId(section) === id);\n const object = collection.objects[index].target;\n if (isReactiveObject(object)) {\n await dispatch(createIntent(SpaceAction.RemoveObjects, { objects: [object], target: collection }));\n\n // TODO(wittjosiah): The section should also be removed, but needs to be restored if the action is undone.\n // delete stack.sections[Path.last(path)];\n }\n },\n [collection, dispatch],\n );\n\n const handleAdd = useCallback(\n async (id: string, position: AddSectionPosition) => {\n await dispatch?.(\n createIntent(LayoutAction.SetLayout, {\n element: 'dialog',\n component: `${STACK_PLUGIN}/AddSectionDialog`,\n subject: { path: id, position, collection },\n }),\n );\n },\n [collection, dispatch],\n );\n\n const handleNavigate = useCallback(\n async (id: string) => {\n await dispatch(createIntent(NavigationAction.Open, { activeParts: { main: [id] } }));\n await dispatch(createIntent(LayoutAction.ScrollIntoView, { id }));\n },\n [dispatch],\n );\n\n const handleCollapse = useCallback(\n (id: string, collapsed: boolean) => setCollapsedSections((prev) => ({ ...prev, [id]: collapsed })),\n [],\n );\n\n const handleAddSection = useCallback(\n () => dispatch?.(createIntent(SpaceAction.OpenCreateObject, { target: collection, navigable: false })),\n [collection, dispatch],\n );\n\n return (\n <AttentionProvider id={id}>\n <StackContext.Provider\n value={{\n onCollapse: handleCollapse,\n onNavigate: handleNavigate,\n onDelete: handleDelete,\n onAdd: handleAdd,\n }}\n >\n <Stack orientation='vertical' size='intrinsic' id={id} data-testid='main.stack'>\n {items.map((item) => (\n <StackSection key={item.id} {...item} />\n ))}\n </Stack>\n\n <div role='none' className='flex mlb-2 pli-2 justify-center'>\n <Button data-testid='stack.createSection' classNames='gap-2' onClick={handleAddSection}>\n <Plus />\n <span className='sr-only'>{t('add section label')}</span>\n </Button>\n </div>\n </StackContext.Provider>\n </AttentionProvider>\n );\n};\n\nexport default StackMain;\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { createContext, useContext } from 'react';\n\nimport { type AddSectionPosition } from '../types';\n\nexport type StackContextValue = {\n onCollapse: (id: string, collapsed: boolean) => void;\n onNavigate: (id: string) => Promise<void>;\n onDelete: (id: string) => Promise<void>;\n onAdd: (id: string, position: AddSectionPosition) => void;\n};\n\nexport const StackContext = createContext<StackContextValue>({\n onCollapse: () => {},\n onNavigate: async () => {},\n onDelete: async () => {},\n onAdd: () => {},\n});\n\nexport const useStack = () => useContext(StackContext);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport * as CollapsiblePrimitive from '@radix-ui/react-collapsible';\nimport React, { useState } from 'react';\n\nimport { Surface } from '@dxos/app-framework';\nimport { DropdownMenu, Icon, useTranslation, IconButton } from '@dxos/react-ui';\nimport { useAttendableAttributes } from '@dxos/react-ui-attention';\nimport { StackItem } from '@dxos/react-ui-stack';\nimport { mx, getSize, textBlockWidth } from '@dxos/react-ui-theme';\n\nimport { CaretDownUp } from './CaretDownUp';\nimport { useStack } from './StackContext';\nimport { STACK_PLUGIN } from '../meta';\nimport { type StackSectionItem } from '../types';\n\nconst sectionActionDimensions = 'm-1 p-1 shrink-0 min-bs-0 is-[--rail-action] bs-min';\n\nexport const StackSection = ({\n id,\n view,\n object,\n metadata: { icon = 'ph--placeholder--regular' },\n}: StackSectionItem) => {\n const { t } = useTranslation(STACK_PLUGIN);\n const { onNavigate, onAdd, onCollapse, onDelete } = useStack();\n const [optionsMenuOpen, setOptionsMenuOpen] = useState(false);\n const attendableAttrs = useAttendableAttributes(id);\n\n return (\n <CollapsiblePrimitive.Root asChild open={!view.collapsed} onOpenChange={(nextOpen) => onCollapse?.(id, !nextOpen)}>\n <StackItem.Root item={{ id }} role='section' {...attendableAttrs} classNames='border-be border-separator'>\n <StackItem.Heading classNames='attention-surface border-ie !border-separator'>\n <span className='sr-only'>{view.title}</span>\n <div role='none' className='sticky -block-start-px bg-[--sticky-bg]'>\n <DropdownMenu.Root\n {...{\n open: optionsMenuOpen,\n onOpenChange: setOptionsMenuOpen,\n }}\n >\n <DropdownMenu.Trigger asChild>\n <StackItem.SigilButton>\n <Icon icon={icon} size={5} classNames='transition-opacity' />\n </StackItem.SigilButton>\n </DropdownMenu.Trigger>\n <DropdownMenu.Portal>\n <DropdownMenu.Content>\n <DropdownMenu.Viewport>\n {view.collapsed ? (\n <DropdownMenu.Item onClick={() => onNavigate(id)} data-testid='section.navigate-to'>\n <Icon icon='ph--arrow-square-out--regular' size={5} />\n <span className='mis-2 grow'>{t('navigate to section label')}</span>\n </DropdownMenu.Item>\n ) : (\n <CollapsiblePrimitive.Trigger asChild>\n <DropdownMenu.Item>\n <CaretDownUp className={getSize(5)} />\n <span className='mis-2 grow'>{t('collapse label')}</span>\n </DropdownMenu.Item>\n </CollapsiblePrimitive.Trigger>\n )}\n <DropdownMenu.Item onClick={() => onAdd(id, 'before')} data-testid='section.add-before'>\n <Icon icon='ph--arrow-line-up--regular' size={5} />\n <span className='mis-2 grow'>{t('add section before label')}</span>\n </DropdownMenu.Item>\n <DropdownMenu.Item onClick={() => onAdd(id, 'after')} data-testid='section.add-after'>\n <Icon icon='ph--arrow-line-down--regular' size={5} />\n <span className='mis-2 grow'>{t('add section after label')}</span>\n </DropdownMenu.Item>\n <DropdownMenu.Item onClick={() => onDelete(id)} data-testid='section.remove'>\n <Icon icon='ph--trash--regular' size={5} />\n <span className='mis-2 grow'>{t('remove section label')}</span>\n </DropdownMenu.Item>\n </DropdownMenu.Viewport>\n <DropdownMenu.Arrow />\n </DropdownMenu.Content>\n </DropdownMenu.Portal>\n </DropdownMenu.Root>\n {view.collapsed ? (\n <CollapsiblePrimitive.Trigger asChild>\n <IconButton\n iconOnly\n variant='ghost'\n label={t('expand label')}\n icon='ph--caret-up-down--regular'\n classNames={sectionActionDimensions}\n />\n </CollapsiblePrimitive.Trigger>\n ) : (\n <IconButton\n iconOnly\n variant='ghost'\n onClick={() => onNavigate(id)}\n label={t('navigate to section label')}\n icon='ph--arrow-square-out--regular'\n data-testid='section.navigate-to'\n classNames={sectionActionDimensions}\n />\n )}\n </div>\n </StackItem.Heading>\n <CollapsiblePrimitive.Content>\n <Surface role='section' data={{ subject: object }} limit={1} placeholder={<></>} />\n </CollapsiblePrimitive.Content>\n {view.collapsed && (\n <StackItem.Content toolbar={false} classNames='attention-surface'>\n <h2 className={mx('flex items-center p-4 font-medium is-full', textBlockWidth)}>{view.title}</h2>\n </StackItem.Content>\n )}\n </StackItem.Root>\n </CollapsiblePrimitive.Root>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { type ComponentPropsWithoutRef } from 'react';\n\nexport const CaretDownUp = ({ children, ...props }: ComponentPropsWithoutRef<'svg'>) => {\n return (\n <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' {...props}>\n <rect width='256' height='256' fill='none' />\n <polyline\n points='80 224 128 176 176 224'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='16'\n />\n <polyline\n points='80 32 128 80 176 32'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='16'\n />\n {children}\n </svg>\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAqB;AACrB,IAAAA,gBAAiE;AAEjE,2BAOO;AACP,kBAA6E;AAC7E,0BAAyB;AACzB,0BAA4B;AAE5B,sBAA0D;AAC1D,gCAAkC;AAClC,4BAAsB;AACtB,kBAA4B;AClB5B,IAAAA,gBAA0C;ACA1C,2BAAsC;AACtC,IAAAA,gBAAgC;AAEhC,IAAAC,wBAAwB;AACxB,IAAAC,mBAA+D;AAC/D,IAAAC,6BAAwC;AACxC,IAAAC,yBAA0B;AAC1B,4BAA4C;ACP5C,IAAAJ,gBAAqD;AFW9C,IAAMK,eAAeC,iDAAiC;EAC3DC,YAAY,MAAA;EAAO;EACnBC,YAAY,YAAA;EAAa;EACzBC,UAAU,YAAA;EAAa;EACvBC,OAAO,MAAA;EAAO;AAChB,CAAA;AAEO,IAAMC,WAAW,UAAMC,0BAAWP,YAAAA;AEhBlC,IAAMQ,cAAc,CA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AAaC,gCAAYkB,kBAAkB;IAAE3C,QAAQjB;IAAY6D,WAAW;EAAM,CAAA,CAAA,GACnG;IAAC7D;IAAYE;GAAS;AAGxB,SACEzE,8BAAAA,QAAA,cAACqI,6CAAAA;IAAkBrH;KACjBhB,8BAAAA,QAAA,cAACX,aAAaiJ,UAAQ;IACpBC,OAAO;MACLhJ,YAAYyI;MACZxI,YAAYkI;MACZjI,UAAUiH;MACVhH,OAAOyH;IACT;KAEAnH,8BAAAA,QAAA,cAACwI,6BAAAA;IAAMC,aAAY;IAAWzF,MAAK;IAAYhC;IAAQsC,eAAY;KAChEuC,MAAME,IAAI,CAAC3D,SACVpC,8BAAAA,QAAA,cAACe,cAAAA;IAAa2H,KAAKtG,KAAKpB;IAAK,GAAGoB;QAIpCpC,8BAAAA,QAAA,cAAC2C,OAAAA;IAAIN,MAAK;IAAOI,WAAU;KACzBzC,8BAAAA,QAAA,cAAC2I,wBAAAA;IAAOrF,eAAY;IAAsBhB,YAAW;IAAQe,SAAS6E;KACpElI,8BAAAA,QAAA,cAAC4I,mBAAAA,IAAAA,GACD5I,8BAAAA,QAAA,cAACwC,QAAAA;IAAKC,WAAU;KAAWpB,EAAE,mBAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAMzC;AAEA,IAAA,oBAAeiD;",
|
|
6
|
+
"names": ["import_react", "import_app_framework", "import_react_ui", "import_react_ui_attention", "import_react_ui_stack", "StackContext", "createContext", "onCollapse", "onNavigate", "onDelete", "onAdd", "useStack", "useContext", "CaretDownUp", "children", "props", "React", "svg", "xmlns", "viewBox", "rect", "width", "height", "fill", "polyline", "points", "stroke", "strokeLinecap", "strokeLinejoin", "strokeWidth", "sectionActionDimensions", "StackSection", "id", "view", "object", "metadata", "icon", "t", "useTranslation", "STACK_PLUGIN", "optionsMenuOpen", "setOptionsMenuOpen", "useState", "attendableAttrs", "useAttendableAttributes", "Root", "asChild", "open", "collapsed", "onOpenChange", "nextOpen", "StackItem", "item", "role", "classNames", "Heading", "span", "className", "title", "div", "DropdownMenu", "Trigger", "SigilButton", "Icon", "size", "Portal", "Content", "Viewport", "Item", "onClick", "data-testid", "getSize", "Arrow", "IconButton", "iconOnly", "variant", "label", "Surface", "data", "subject", "limit", "placeholder", "toolbar", "h2", "mx", "textBlockWidth", "StackMain", "collection", "dispatchPromise", "dispatch", "useIntentDispatcher", "graph", "useGraph", "metadataPlugin", "useResolvePlugin", "parseMetadataResolverPlugin", "defaultStack", "useMemo", "create", "StackViewType", "sections", "stack", "views", "typename", "target", "collapsedSections", "setCollapsedSections", "useEffect", "makeRef", "items", "objects", "map", "filter", "nonNullable", "provides", "resolver", "getType", "objectId", "fullyQualifiedId", "toLocalizedString", "findNode", "properties", "handleDelete", "useCallback", "index", "findIndex", "section", "isReactiveObject", "createIntent", "SpaceAction", "RemoveObjects", "handleAdd", "position", "LayoutAction", "SetLayout", "element", "component", "path", "handleNavigate", "NavigationAction", "Open", "activeParts", "main", "ScrollIntoView", "handleCollapse", "prev", "handleAddSection", "OpenCreateObject", "navigable", "AttentionProvider", "Provider", "value", "Stack", "orientation", "key", "Button", "Plus"]
|
|
7
|
+
}
|