@dxos/plugin-stack 0.6.12-main.15a606f → 0.6.12-main.2d19bf1

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 (52) hide show
  1. package/dist/lib/browser/{StackMain-QYF4ZDSX.mjs → StackMain-JA6SVPH5.mjs} +10 -8
  2. package/dist/lib/browser/StackMain-JA6SVPH5.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-R5KXWF2W.mjs → chunk-BA6WV7BZ.mjs} +9 -3
  4. package/dist/lib/browser/{chunk-R5KXWF2W.mjs.map → chunk-BA6WV7BZ.mjs.map} +3 -3
  5. package/dist/lib/browser/{chunk-H4O4KKLZ.mjs → chunk-ONAKM24Z.mjs} +2 -2
  6. package/dist/lib/browser/chunk-ONAKM24Z.mjs.map +7 -0
  7. package/dist/lib/browser/index.mjs +7 -3
  8. package/dist/lib/browser/index.mjs.map +3 -3
  9. package/dist/lib/browser/meta.json +1 -1
  10. package/dist/lib/browser/meta.mjs +1 -1
  11. package/dist/lib/browser/types/index.mjs +1 -1
  12. package/dist/lib/node/{StackMain-X77PXUJ3.cjs → StackMain-P2QHA4YD.cjs} +23 -21
  13. package/dist/lib/node/StackMain-P2QHA4YD.cjs.map +7 -0
  14. package/dist/lib/node/{chunk-EMD6A66G.cjs → chunk-ACPGRTG3.cjs} +12 -6
  15. package/dist/lib/node/{chunk-EMD6A66G.cjs.map → chunk-ACPGRTG3.cjs.map} +3 -3
  16. package/dist/lib/node/{chunk-PGL7XDNJ.cjs → chunk-O5SQVKNW.cjs} +4 -4
  17. package/dist/lib/node/chunk-O5SQVKNW.cjs.map +7 -0
  18. package/dist/lib/node/index.cjs +25 -21
  19. package/dist/lib/node/index.cjs.map +3 -3
  20. package/dist/lib/node/meta.cjs +4 -4
  21. package/dist/lib/node/meta.cjs.map +1 -1
  22. package/dist/lib/node/meta.json +1 -1
  23. package/dist/lib/node/types/index.cjs +3 -3
  24. package/dist/lib/node/types/index.cjs.map +1 -1
  25. package/dist/lib/node-esm/{StackMain-PJBETNMK.mjs → StackMain-5W53IZEG.mjs} +10 -8
  26. package/dist/lib/node-esm/StackMain-5W53IZEG.mjs.map +7 -0
  27. package/dist/lib/node-esm/{chunk-4ULAI3BI.mjs → chunk-DIM4KTS3.mjs} +9 -3
  28. package/dist/lib/node-esm/{chunk-4ULAI3BI.mjs.map → chunk-DIM4KTS3.mjs.map} +3 -3
  29. package/dist/lib/node-esm/{chunk-T42IEBEL.mjs → chunk-J57BXQJY.mjs} +2 -2
  30. package/dist/lib/node-esm/chunk-J57BXQJY.mjs.map +7 -0
  31. package/dist/lib/node-esm/index.mjs +7 -3
  32. package/dist/lib/node-esm/index.mjs.map +3 -3
  33. package/dist/lib/node-esm/meta.json +1 -1
  34. package/dist/lib/node-esm/meta.mjs +1 -1
  35. package/dist/lib/node-esm/types/index.mjs +1 -1
  36. package/dist/types/src/StackPlugin.d.ts.map +1 -1
  37. package/dist/types/src/components/StackMain.d.ts +2 -1
  38. package/dist/types/src/components/StackMain.d.ts.map +1 -1
  39. package/dist/types/src/components/index.d.ts +2 -1
  40. package/dist/types/src/components/index.d.ts.map +1 -1
  41. package/dist/types/src/meta.d.ts.map +1 -1
  42. package/package.json +24 -23
  43. package/src/StackPlugin.tsx +15 -4
  44. package/src/components/StackMain.tsx +48 -44
  45. package/src/{meta.tsx → meta.ts} +3 -1
  46. package/src/types/stack.ts +2 -2
  47. package/dist/lib/browser/StackMain-QYF4ZDSX.mjs.map +0 -7
  48. package/dist/lib/browser/chunk-H4O4KKLZ.mjs.map +0 -7
  49. package/dist/lib/node/StackMain-X77PXUJ3.cjs.map +0 -7
  50. package/dist/lib/node/chunk-PGL7XDNJ.cjs.map +0 -7
  51. package/dist/lib/node-esm/StackMain-PJBETNMK.mjs.map +0 -7
  52. package/dist/lib/node-esm/chunk-T42IEBEL.mjs.map +0 -7
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/StackMain.tsx", "../../../src/components/AddSection.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plus } from '@phosphor-icons/react';\nimport React, { useEffect, useMemo, useState } from 'react';\n\nimport {\n LayoutAction,\n NavigationAction,\n parseMetadataResolverPlugin,\n Surface,\n useIntentDispatcher,\n useResolvePlugin,\n} from '@dxos/app-framework';\nimport { create, getType, isReactiveObject } from '@dxos/echo-schema';\nimport { useGraph } from '@dxos/plugin-graph';\nimport { SpaceAction } from '@dxos/plugin-space';\nimport { type CollectionType } from '@dxos/plugin-space/types';\nimport { fullyQualifiedId } from '@dxos/react-client/echo';\nimport { Button, toLocalizedString, useTranslation } from '@dxos/react-ui';\nimport { AttentionProvider } from '@dxos/react-ui-attention';\nimport { type MosaicDataItem, type MosaicDropEvent, type MosaicMoveEvent, Mosaic, Path } from '@dxos/react-ui-mosaic';\nimport {\n type AddSectionPosition,\n type CollapsedSections,\n Stack,\n type StackProps,\n type StackSectionItem,\n} from '@dxos/react-ui-stack';\nimport { nonNullable } from '@dxos/util';\n\nimport { AddSection } from './AddSection';\nimport { SECTION_IDENTIFIER, STACK_PLUGIN } from '../meta';\nimport { StackViewType } from '../types';\n\nconst SectionContent: StackProps['SectionContent'] = ({ data }) => {\n // TODO(wittjosiah): Better section placeholder.\n return <Surface role='section' data={{ object: data }} limit={1} placeholder={<></>} />;\n};\n\ntype StackMainProps = {\n id: string;\n collection: CollectionType;\n separation?: boolean;\n};\n\nconst StackMain = ({ id, collection, separation }: StackMainProps) => {\n const 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] as StackViewType) ?? defaultStack;\n const [collapsedSections, setCollapsedSections] = useState<CollapsedSections>({});\n\n useEffect(() => {\n if (!collection.views[StackViewType.typename]) {\n collection.views[StackViewType.typename] = 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 .filter(nonNullable)\n .map((object) => {\n const metadata = metadataPlugin?.provides.metadata.resolver(\n getType(object)?.objectId ?? 'never',\n ) as StackSectionItem['metadata'];\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 StackSectionItem['view'];\n return { id: fullyQualifiedId(object), object, metadata, view };\n }) ?? [];\n\n const handleOver = ({ active, over }: MosaicMoveEvent<number>) => {\n // TODO(thure): Eventually Stack should handle foreign draggables.\n if (active.type !== SECTION_IDENTIFIER) {\n return 'reject';\n }\n if (Path.parent(active.path) === Path.parent(over.path)) {\n return 'rearrange';\n }\n\n const parseData = metadataPlugin?.provides.metadata.resolver(active.type)?.parse;\n const data = parseData ? parseData(active.item, 'object') : active.item;\n\n // TODO(wittjosiah): Prevent dropping items which don't have a section renderer?\n // Perhaps stack plugin should just provide a fallback section renderer.\n if (!isReactiveObject(data)) {\n return 'reject';\n }\n\n const exists = items.findIndex(({ id }) => id === active.item.id) >= 0;\n if (!exists) {\n return 'transfer';\n } else {\n return 'reject';\n }\n };\n\n const handleDrop = ({ operation, active, over }: MosaicDropEvent<number>) => {\n if (\n (active.path === Path.create(id, active.item.id) || active.path === id) &&\n (operation !== 'copy' || over.path === Path.create(id, over.item.id) || over.path === id)\n ) {\n collection.objects.splice(active.position!, 1);\n delete stack.sections[active.item.id];\n }\n\n const parseData = metadataPlugin?.provides.metadata.resolver(active.type)?.parse;\n const object = parseData?.(active.item, 'object');\n if (object && over.path === Path.create(id, over.item.id)) {\n collection.objects.splice(over.position!, 0, object);\n } else if (object && over.path === id) {\n collection.objects.push(object);\n }\n\n if (!stack.sections[object.id]) {\n stack.sections[object.id] = {};\n }\n };\n\n const handleDelete = async (path: string) => {\n const index = collection.objects\n .filter(nonNullable)\n .findIndex((section) => fullyQualifiedId(section) === Path.last(path));\n if (index >= 0) {\n await dispatch({\n action: SpaceAction.REMOVE_OBJECT,\n data: { object: collection.objects[index], collection },\n });\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\n // TODO(wittjosiah): Factor out.\n\n const handleNavigate = async (object: MosaicDataItem) => {\n const toId = fullyQualifiedId(object);\n await dispatch([\n {\n action: NavigationAction.OPEN,\n data: { activeParts: { main: [toId] } },\n },\n {\n action: LayoutAction.SCROLL_INTO_VIEW,\n data: { id: toId },\n },\n ]);\n };\n\n const handleAddSection = (path: string, position: AddSectionPosition) => {\n void dispatch?.({\n action: LayoutAction.SET_LAYOUT,\n data: {\n element: 'dialog',\n component: `${STACK_PLUGIN}/AddSectionDialog`,\n subject: { path, position, collection },\n },\n });\n };\n\n const handleCollapseSection = (id: string, collapsed: boolean) => {\n setCollapsedSections((prev) => ({ ...prev, [id]: collapsed }));\n };\n\n return (\n <AttentionProvider id={id}>\n <Mosaic.Root>\n <Mosaic.DragOverlay />\n <Stack\n id={id}\n data-testid='main.stack'\n SectionContent={SectionContent}\n type={SECTION_IDENTIFIER}\n items={items}\n separation={separation}\n emptyComponent={<span data-testid='stack.empty'></span>}\n onDrop={handleDrop}\n onOver={handleOver}\n onDeleteSection={handleDelete}\n onNavigateToSection={handleNavigate}\n onAddSection={handleAddSection}\n onCollapseSection={handleCollapseSection}\n />\n\n {items.length === 0 ? (\n <AddSection collection={collection} />\n ) : (\n <div role='none' className='flex mlb-2 pli-2 justify-center'>\n <Button\n data-testid='stack.createSection'\n classNames='gap-2'\n onClick={() =>\n dispatch?.({\n action: LayoutAction.SET_LAYOUT,\n data: {\n element: 'dialog',\n component: 'dxos.org/plugin/stack/AddSectionDialog',\n subject: { position: 'afterAll', collection },\n },\n })\n }\n >\n <Plus />\n <span className='sr-only'>{t('add section label')}</span>\n </Button>\n </div>\n )}\n </Mosaic.Root>\n </AttentionProvider>\n );\n};\n\nexport default StackMain;\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport { type IconProps } from '@phosphor-icons/react';\nimport React, { type FC, type KeyboardEvent, type MouseEvent, useCallback } from 'react';\n\nimport { usePlugin, useIntentDispatcher } from '@dxos/app-framework';\nimport { type CollectionType } from '@dxos/plugin-space/types';\nimport { toLocalizedString, useTranslation } from '@dxos/react-ui';\nimport { getSize, mx } from '@dxos/react-ui-theme';\n\nimport { STACK_PLUGIN } from '../meta';\nimport { StackViewType, type StackSectionCreator, type StackPluginProvides } from '../types';\n\nconst CreatorTile = ({\n Icon,\n label,\n testId,\n handleAdd,\n}: {\n Icon: FC<IconProps>;\n testId: string;\n label: string;\n handleAdd: () => void;\n}) => {\n const onClick = useCallback((_: MouseEvent<HTMLDivElement>) => handleAdd(), [handleAdd]);\n const onKeyDown = useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n handleAdd();\n }\n },\n [handleAdd],\n );\n\n return (\n <div\n role='button'\n aria-label={label}\n tabIndex={0}\n className={mx(\n 'flex items-center w-[10rem] h-16 overflow-hidden',\n 'border rounded-md border-separator shadow-sm hover:bg-hoverSurface cursor-pointer',\n )}\n onClick={onClick}\n onKeyDown={onKeyDown}\n data-testid={testId}\n >\n <div className='flex h-full w-12 items-center justify-center bg-scrim shrink-0 border-r border-separator'>\n <Icon weight='thin' className={getSize(6)} />\n </div>\n <div className='overflow-hidden items-center p-2 px-3'>\n <span className='capitalize'>{label}</span>\n </div>\n </div>\n );\n};\n\nexport const AddSection = ({ collection }: { collection: CollectionType }) => {\n const domAttributes = useArrowNavigationGroup({ axis: 'grid' });\n const dispatch = useIntentDispatcher();\n const { t } = useTranslation(STACK_PLUGIN);\n\n const stackPlugin = usePlugin<StackPluginProvides>(STACK_PLUGIN);\n const stackCreators = stackPlugin?.provides?.stack.creators ?? [];\n\n const handleAdd = useCallback(\n async (creator: StackSectionCreator) => {\n const { data: section } = (await dispatch(creator.intent)) ?? {};\n collection.objects = [section];\n const stack = collection.views[StackViewType.typename];\n if (stack) {\n stack.sections[section.id] = {};\n }\n },\n [collection, dispatch],\n );\n\n if (stackCreators.length === 0) {\n return null;\n }\n\n return (\n <div {...domAttributes} role='none' className='flex flex-wrap items-center p-8 gap-4'>\n {stackCreators.map((creator) => {\n const { id, type, icon, testId } = creator;\n return (\n <CreatorTile\n key={id}\n label={toLocalizedString(type, t)}\n testId={testId}\n Icon={icon}\n handleAdd={() => handleAdd(creator)}\n />\n );\n })}\n </div>\n );\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAqB;AACrB,IAAAA,gBAAoD;AAEpD,2BAOO;AACP,yBAAkD;AAClD,0BAAyB;AACzB,0BAA4B;AAE5B,kBAAiC;AACjC,sBAA0D;AAC1D,gCAAkC;AAClC,6BAA8F;AAC9F,4BAMO;AACP,kBAA4B;AC1B5B,2BAAwC;AAExC,IAAAA,gBAAiF;AAEjF,IAAAC,wBAA+C;AAE/C,IAAAC,mBAAkD;AAClD,4BAA4B;AAK5B,IAAMC,cAAc,CAAC,EACnBC,MACAC,OACAC,QACAC,UAAS,MAMV;AACC,QAAMC,cAAUC,2BAAY,CAACC,MAAkCH,UAAAA,GAAa;IAACA;GAAU;AACvF,QAAMI,gBAAYF,2BAChB,CAACG,UAAAA;AACC,QAAIA,MAAMC,QAAQ,WAAWD,MAAMC,QAAQ,KAAK;AAC9CD,YAAME,eAAc;AACpBP,gBAAAA;IACF;EACF,GACA;IAACA;GAAU;AAGb,SACE,8BAAAQ,QAAA,cAACC,OAAAA;IACCC,MAAK;IACLC,cAAYb;IACZc,UAAU;IACVC,eAAWC,0BACT,oDACA,mFAAA;IAEFb;IACAG;IACAW,eAAahB;KAEb,8BAAAS,QAAA,cAACC,OAA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C,cAAAA;AACzCX,yBAAqB,CAACsD,UAAU;MAAE,GAAGA;MAAM,CAAC5E,GAAAA,GAAKiC;IAAU,EAAA;EAC7D;AAEA,SACErE,8BAAAA,QAAA,cAACiH,6CAAAA;IAAkB7E;KACjBpC,8BAAAA,QAAA,cAACkH,8BAAOC,MAAI,MACVnH,8BAAAA,QAAA,cAACkH,8BAAOE,aAAW,IAAA,GACnBpH,8BAAAA,QAAA,cAACqH,6BAAAA;IACCjF;IACA7B,eAAY;IACZmC;IACAH,MAAMsC;IACNhB;IACAb;IACAsE,gBAAgBtH,8BAAAA,QAAA,cAACU,QAAAA;MAAKH,eAAY;;IAClCgH,QAAQhC;IACRiC,QAAQ9C;IACR+C,iBAAiB7B;IACjB8B,qBAAqBxB;IACrByB,cAAcjB;IACdkB,mBAAmBb;MAGpBlD,MAAMxB,WAAW,IAChBrC,8BAAAA,QAAA,cAACW,YAAAA;IAAWC;OAEZZ,8BAAAA,QAAA,cAACC,OAAAA;IAAIC,MAAK;IAAOG,WAAU;KACzBL,8BAAAA,QAAA,cAAC6H,wBAAAA;IACCtH,eAAY;IACZuH,YAAW;IACXrI,SAAS,MACPuB,WAAW;MACT+E,QAAQS,kCAAaG;MACrB/E,MAAM;QACJgF,SAAS;QACTC,WAAW;QACXC,SAAS;UAAEpB,UAAU;UAAY9E;QAAW;MAC9C;IACF,CAAA;KAGFZ,8BAAAA,QAAA,cAAC+H,mBAAAA,IAAAA,GACD/H,8BAAAA,QAAA,cAACU,QAAAA;IAAKL,WAAU;KAAWa,EAAE,mBAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAO3C;AAEA,IAAA,oBAAe6B;",
6
+ "names": ["import_react", "import_app_framework", "import_react_ui", "CreatorTile", "Icon", "label", "testId", "handleAdd", "onClick", "useCallback", "_", "onKeyDown", "event", "key", "preventDefault", "React", "div", "role", "aria-label", "tabIndex", "className", "mx", "data-testid", "weight", "getSize", "span", "AddSection", "collection", "domAttributes", "useArrowNavigationGroup", "axis", "dispatch", "useIntentDispatcher", "t", "useTranslation", "STACK_PLUGIN", "stackPlugin", "usePlugin", "stackCreators", "provides", "stack", "creators", "creator", "data", "section", "intent", "objects", "views", "StackViewType", "typename", "sections", "id", "length", "map", "type", "icon", "toLocalizedString", "SectionContent", "Surface", "object", "limit", "placeholder", "StackMain", "separation", "graph", "useGraph", "metadataPlugin", "useResolvePlugin", "parseMetadataResolverPlugin", "defaultStack", "useMemo", "create", "collapsedSections", "setCollapsedSections", "useState", "useEffect", "items", "filter", "nonNullable", "metadata", "resolver", "getType", "objectId", "view", "collapsed", "fullyQualifiedId", "title", "findNode", "properties", "handleOver", "active", "over", "SECTION_IDENTIFIER", "Path", "parent", "path", "parseData", "parse", "item", "isReactiveObject", "exists", "findIndex", "handleDrop", "operation", "splice", "position", "push", "handleDelete", "index", "last", "action", "SpaceAction", "REMOVE_OBJECT", "handleNavigate", "toId", "NavigationAction", "OPEN", "activeParts", "main", "LayoutAction", "SCROLL_INTO_VIEW", "handleAddSection", "SET_LAYOUT", "element", "component", "subject", "handleCollapseSection", "prev", "AttentionProvider", "Mosaic", "Root", "DragOverlay", "Stack", "emptyComponent", "onDrop", "onOver", "onDeleteSection", "onNavigateToSection", "onAddSection", "onCollapseSection", "Button", "classNames", "Plus"]
7
+ }
@@ -16,24 +16,30 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_EMD6A66G_exports = {};
20
- __export(chunk_EMD6A66G_exports, {
19
+ var chunk_ACPGRTG3_exports = {};
20
+ __export(chunk_ACPGRTG3_exports, {
21
21
  SectionSchema: () => SectionSchema,
22
22
  StackViewType: () => StackViewType
23
23
  });
24
- module.exports = __toCommonJS(chunk_EMD6A66G_exports);
24
+ module.exports = __toCommonJS(chunk_ACPGRTG3_exports);
25
25
  var import_echo_schema = require("@dxos/echo-schema");
26
26
  var SectionSchema = import_echo_schema.S.Struct({
27
27
  height: import_echo_schema.S.optional(import_echo_schema.S.Number),
28
28
  // Space for data that isn't stack-specific but is specific to this view instance.
29
29
  // e.g. cover/fill for an image
30
- custom: import_echo_schema.S.optional(import_echo_schema.S.Record(import_echo_schema.S.String, import_echo_schema.S.Any))
30
+ custom: import_echo_schema.S.optional(import_echo_schema.S.Record({
31
+ key: import_echo_schema.S.String,
32
+ value: import_echo_schema.S.Any
33
+ }))
31
34
  });
32
35
  var StackViewType = class extends (0, import_echo_schema.TypedObject)({
33
36
  typename: "dxos.org/type/StackView",
34
37
  version: "0.1.0"
35
38
  })({
36
- sections: import_echo_schema.S.mutable(import_echo_schema.S.Record(import_echo_schema.S.String, SectionSchema))
39
+ sections: import_echo_schema.S.mutable(import_echo_schema.S.Record({
40
+ key: import_echo_schema.S.String,
41
+ value: SectionSchema
42
+ }))
37
43
  }) {
38
44
  };
39
45
  // Annotate the CommonJS export names for ESM import in node:
@@ -41,4 +47,4 @@ var StackViewType = class extends (0, import_echo_schema.TypedObject)({
41
47
  SectionSchema,
42
48
  StackViewType
43
49
  });
44
- //# sourceMappingURL=chunk-EMD6A66G.cjs.map
50
+ //# sourceMappingURL=chunk-ACPGRTG3.cjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/types/stack.ts"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { S, TypedObject } from '@dxos/echo-schema';\n\n// All section metadata needs to be optional/have defaults.\n// Any objects added to the collection will start with the section defaults.\n// If an object is removed from the collection without removing the section metadata this is fine.\n// Stack component should cleanup the superfluous data on future edits.\n\nexport const SectionSchema = S.Struct({\n height: S.optional(S.Number),\n // Space for data that isn't stack-specific but is specific to this view instance.\n // e.g. cover/fill for an image\n custom: S.optional(S.Record(S.String, S.Any)),\n});\n\nexport class StackViewType extends TypedObject({ typename: 'dxos.org/type/StackView', version: '0.1.0' })({\n sections: S.mutable(S.Record(S.String, SectionSchema)),\n}) {}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAIA,yBAA+B;AAOxB,IAAMA,gBAAgBC,qBAAEC,OAAO;EACpCC,QAAQF,qBAAEG,SAASH,qBAAEI,MAAM;;;EAG3BC,QAAQL,qBAAEG,SAASH,qBAAEM,OAAON,qBAAEO,QAAQP,qBAAEQ,GAAG,CAAA;AAC7C,CAAA;AAEO,IAAMC,gBAAN,kBAA4BC,gCAAY;EAAEC,UAAU;EAA2BC,SAAS;AAAQ,CAAA,EAAG;EACxGC,UAAUb,qBAAEc,QAAQd,qBAAEM,OAAON,qBAAEO,QAAQR,aAAAA,CAAAA;AACzC,CAAA,EAAA;AAAI;",
6
- "names": ["SectionSchema", "S", "Struct", "height", "optional", "Number", "custom", "Record", "String", "Any", "StackViewType", "TypedObject", "typename", "version", "sections", "mutable"]
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { S, TypedObject } from '@dxos/echo-schema';\n\n// All section metadata needs to be optional/have defaults.\n// Any objects added to the collection will start with the section defaults.\n// If an object is removed from the collection without removing the section metadata this is fine.\n// Stack component should cleanup the superfluous data on future edits.\n\nexport const SectionSchema = S.Struct({\n height: S.optional(S.Number),\n // Space for data that isn't stack-specific but is specific to this view instance.\n // e.g. cover/fill for an image\n custom: S.optional(S.Record({ key: S.String, value: S.Any })),\n});\n\nexport class StackViewType extends TypedObject({ typename: 'dxos.org/type/StackView', version: '0.1.0' })({\n sections: S.mutable(S.Record({ key: S.String, value: SectionSchema })),\n}) {}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAIA,yBAA+B;AAOxB,IAAMA,gBAAgBC,qBAAEC,OAAO;EACpCC,QAAQF,qBAAEG,SAASH,qBAAEI,MAAM;;;EAG3BC,QAAQL,qBAAEG,SAASH,qBAAEM,OAAO;IAAEC,KAAKP,qBAAEQ;IAAQC,OAAOT,qBAAEU;EAAI,CAAA,CAAA;AAC5D,CAAA;AAEO,IAAMC,gBAAN,kBAA4BC,gCAAY;EAAEC,UAAU;EAA2BC,SAAS;AAAQ,CAAA,EAAG;EACxGC,UAAUf,qBAAEgB,QAAQhB,qBAAEM,OAAO;IAAEC,KAAKP,qBAAEQ;IAAQC,OAAOV;EAAc,CAAA,CAAA;AACrE,CAAA,EAAA;AAAI;",
6
+ "names": ["SectionSchema", "S", "Struct", "height", "optional", "Number", "custom", "Record", "key", "String", "value", "Any", "StackViewType", "TypedObject", "typename", "version", "sections", "mutable"]
7
7
  }
@@ -16,13 +16,13 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_PGL7XDNJ_exports = {};
20
- __export(chunk_PGL7XDNJ_exports, {
19
+ var chunk_O5SQVKNW_exports = {};
20
+ __export(chunk_O5SQVKNW_exports, {
21
21
  SECTION_IDENTIFIER: () => SECTION_IDENTIFIER,
22
22
  STACK_PLUGIN: () => STACK_PLUGIN,
23
23
  meta_default: () => meta_default
24
24
  });
25
- module.exports = __toCommonJS(chunk_PGL7XDNJ_exports);
25
+ module.exports = __toCommonJS(chunk_O5SQVKNW_exports);
26
26
  var STACK_PLUGIN = "dxos.org/plugin/stack";
27
27
  var SECTION_IDENTIFIER = "dxos.org/type/StackSection";
28
28
  var meta_default = {
@@ -37,4 +37,4 @@ var meta_default = {
37
37
  STACK_PLUGIN,
38
38
  meta_default
39
39
  });
40
- //# sourceMappingURL=chunk-PGL7XDNJ.cjs.map
40
+ //# sourceMappingURL=chunk-O5SQVKNW.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/meta.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const STACK_PLUGIN = 'dxos.org/plugin/stack';\nexport const SECTION_IDENTIFIER = 'dxos.org/type/StackSection';\n\nexport default {\n id: STACK_PLUGIN,\n // TODO(wittjosiah): Prevents \"stacks\" language from being exposed to users in settings panel.\n name: 'Collections',\n icon: 'ph--stack-simple--regular',\n} satisfies PluginMeta;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAMO,IAAMA,eAAe;AACrB,IAAMC,qBAAqB;AAElC,IAAA,eAAe;EACbC,IAAIF;;EAEJG,MAAM;EACNC,MAAM;AACR;",
6
+ "names": ["STACK_PLUGIN", "SECTION_IDENTIFIER", "id", "name", "icon"]
7
+ }
@@ -28,18 +28,19 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
  var node_exports = {};
30
30
  __export(node_exports, {
31
- SectionSchema: () => import_chunk_EMD6A66G.SectionSchema,
31
+ SectionSchema: () => import_chunk_ACPGRTG3.SectionSchema,
32
32
  StackPlugin: () => StackPlugin,
33
- StackViewType: () => import_chunk_EMD6A66G.StackViewType,
33
+ StackViewType: () => import_chunk_ACPGRTG3.StackViewType,
34
34
  default: () => src_default
35
35
  });
36
36
  module.exports = __toCommonJS(node_exports);
37
- var import_chunk_PGL7XDNJ = require("./chunk-PGL7XDNJ.cjs");
38
- var import_chunk_EMD6A66G = require("./chunk-EMD6A66G.cjs");
37
+ var import_chunk_O5SQVKNW = require("./chunk-O5SQVKNW.cjs");
38
+ var import_chunk_ACPGRTG3 = require("./chunk-ACPGRTG3.cjs");
39
39
  var import_react = __toESM(require("react"));
40
40
  var import_echo_schema = require("@dxos/echo-schema");
41
41
  var import_local_storage = require("@dxos/local-storage");
42
42
  var import_types = require("@dxos/plugin-space/types");
43
+ var import_echo = require("@dxos/react-client/echo");
43
44
  var import_react_ui = require("@dxos/react-ui");
44
45
  var import_react_ui_theme = require("@dxos/react-ui-theme");
45
46
  var import_react2 = __toESM(require("react"));
@@ -51,7 +52,7 @@ var import_react5 = __toESM(require("react"));
51
52
  var import_app_framework = require("@dxos/app-framework");
52
53
  var import_echo_schema2 = require("@dxos/echo-schema");
53
54
  var import_types2 = require("@dxos/plugin-ipfs/types");
54
- var import_echo = require("@dxos/react-client/echo");
55
+ var import_echo2 = require("@dxos/react-client/echo");
55
56
  var import_react_ui3 = require("@dxos/react-ui");
56
57
  var import_react_ui_mosaic = require("@dxos/react-ui-mosaic");
57
58
  var import_react_ui_searchlist = require("@dxos/react-ui-searchlist");
@@ -59,7 +60,7 @@ var import_react_ui_theme2 = require("@dxos/react-ui-theme");
59
60
  var import_util = require("@dxos/util");
60
61
  var import_react_ui_stack = require("@dxos/react-ui-stack");
61
62
  var StackSettings = ({ settings }) => {
62
- const { t } = (0, import_react_ui2.useTranslation)(import_chunk_PGL7XDNJ.STACK_PLUGIN);
63
+ const { t } = (0, import_react_ui2.useTranslation)(import_chunk_O5SQVKNW.STACK_PLUGIN);
63
64
  return /* @__PURE__ */ import_react3.default.createElement(import_react3.default.Fragment, null, /* @__PURE__ */ import_react3.default.createElement(import_plugin_settings.SettingsValue, {
64
65
  label: t("settings separation label")
65
66
  }, /* @__PURE__ */ import_react3.default.createElement(import_react_ui2.Input.Switch, {
@@ -71,18 +72,18 @@ var dataHasAddSectionDialogProps = (data) => {
71
72
  return "subject" in data && typeof data.subject === "object" && !!data.subject && "position" in data.subject && typeof data.subject.position === "string" && "collection" in data.subject;
72
73
  };
73
74
  var AddSectionDialog = ({ path, position, collection }) => {
74
- const { t } = (0, import_react_ui3.useTranslation)(import_chunk_PGL7XDNJ.STACK_PLUGIN);
75
- const stackPlugin = (0, import_app_framework.usePlugin)(import_chunk_PGL7XDNJ.STACK_PLUGIN);
75
+ const { t } = (0, import_react_ui3.useTranslation)(import_chunk_O5SQVKNW.STACK_PLUGIN);
76
+ const stackPlugin = (0, import_app_framework.usePlugin)(import_chunk_O5SQVKNW.STACK_PLUGIN);
76
77
  const fileManagerPlugin = (0, import_app_framework.useResolvePlugin)(import_app_framework.parseFileManagerPlugin);
77
78
  const fileRef = (0, import_react5.useRef)(null);
78
79
  const { dispatch } = (0, import_app_framework.useIntent)();
79
- const space = (0, import_echo.getSpace)(collection);
80
+ const space = (0, import_echo2.getSpace)(collection);
80
81
  const [pending, setPending] = (0, import_react5.useState)(false);
81
82
  const [uploadError, setUploadError] = (0, import_react5.useState)();
82
83
  const handleAdd = (0, import_react5.useCallback)((sectionObject) => {
83
84
  const index = position === "beforeAll" ? 0 : position === "afterAll" ? collection.objects.length : collection.objects.filter(import_util.nonNullable).findIndex((section) => section.id === import_react_ui_mosaic.Path.last(path));
84
85
  collection.objects.splice(index + (position === "after" ? 1 : 0), 0, sectionObject);
85
- const stack = collection.views[import_chunk_EMD6A66G.StackViewType.typename];
86
+ const stack = collection.views[import_chunk_ACPGRTG3.StackViewType.typename];
86
87
  if (stack) {
87
88
  stack.sections[sectionObject.id] = {};
88
89
  }
@@ -165,11 +166,11 @@ var AddSectionDialog = ({ path, position, collection }) => {
165
166
  onChange: ({ target: { files } }) => files && handleFileUpload(files[0])
166
167
  }));
167
168
  };
168
- var StackMain = import_react2.default.lazy(() => import("./StackMain-X77PXUJ3.cjs"));
169
+ var StackMain = import_react2.default.lazy(() => import("./StackMain-P2QHA4YD.cjs"));
169
170
  var translations_default = [
170
171
  {
171
172
  "en-US": {
172
- [import_chunk_PGL7XDNJ.STACK_PLUGIN]: {
173
+ [import_chunk_O5SQVKNW.STACK_PLUGIN]: {
173
174
  "plugin name": "Stacks",
174
175
  "settings separation label": "Separate sections",
175
176
  "add section beforeAll dialog title": "Add a section to the start",
@@ -185,21 +186,21 @@ var translations_default = [
185
186
  ...import_react_ui_stack.translations
186
187
  ];
187
188
  var StackPlugin = () => {
188
- const settings = new import_local_storage.LocalStorageStore(import_chunk_PGL7XDNJ.STACK_PLUGIN, {
189
+ const settings = new import_local_storage.LocalStorageStore(import_chunk_O5SQVKNW.STACK_PLUGIN, {
189
190
  separation: true
190
191
  });
191
192
  const stackState = (0, import_echo_schema.create)({
192
193
  creators: []
193
194
  });
194
195
  return {
195
- meta: import_chunk_PGL7XDNJ.meta_default,
196
+ meta: import_chunk_O5SQVKNW.meta_default,
196
197
  ready: async (plugins) => {
197
198
  settings.prop({
198
199
  key: "separation",
199
200
  type: import_local_storage.LocalStorageStore.bool()
200
201
  });
201
202
  for (const plugin of plugins) {
202
- if (plugin.meta.id === import_chunk_PGL7XDNJ.STACK_PLUGIN) {
203
+ if (plugin.meta.id === import_chunk_O5SQVKNW.STACK_PLUGIN) {
203
204
  continue;
204
205
  }
205
206
  if (Array.isArray(plugin.provides?.stack?.creators)) {
@@ -211,16 +212,16 @@ var StackPlugin = () => {
211
212
  settings: settings.values,
212
213
  metadata: {
213
214
  records: {
214
- [import_chunk_EMD6A66G.StackViewType.typename]: {
215
+ [import_chunk_ACPGRTG3.StackViewType.typename]: {
215
216
  placeholder: [
216
217
  "stack title placeholder",
217
218
  {
218
- ns: import_chunk_PGL7XDNJ.STACK_PLUGIN
219
+ ns: import_chunk_O5SQVKNW.STACK_PLUGIN
219
220
  }
220
221
  ],
221
222
  icon: "ph--stack-simple--regular"
222
223
  },
223
- [import_chunk_PGL7XDNJ.SECTION_IDENTIFIER]: {
224
+ [import_chunk_O5SQVKNW.SECTION_IDENTIFIER]: {
224
225
  parse: (section, type) => {
225
226
  switch (type) {
226
227
  case "node":
@@ -241,16 +242,17 @@ var StackPlugin = () => {
241
242
  translations: translations_default,
242
243
  echo: {
243
244
  schema: [
244
- import_chunk_EMD6A66G.StackViewType
245
+ import_chunk_ACPGRTG3.StackViewType
245
246
  ]
246
247
  },
247
248
  surface: {
248
249
  component: ({ data, role }) => {
249
250
  switch (data.component) {
250
- case `${import_chunk_PGL7XDNJ.STACK_PLUGIN}/AddSectionDialog`:
251
+ case `${import_chunk_O5SQVKNW.STACK_PLUGIN}/AddSectionDialog`:
251
252
  return dataHasAddSectionDialogProps(data) ? /* @__PURE__ */ import_react.default.createElement(AddSectionDialog, data.subject) : null;
252
253
  }
253
254
  const primary = data.active ?? data.object;
255
+ const id = typeof data.id === "string" ? data.id : void 0;
254
256
  switch (role) {
255
257
  case "main":
256
258
  return primary instanceof import_types.CollectionType ? /* @__PURE__ */ import_react.default.createElement(import_react_ui.Main.Content, {
@@ -261,6 +263,7 @@ var StackPlugin = () => {
261
263
  import_react_ui_theme.bottombarBlockPaddingEnd
262
264
  ]
263
265
  }, /* @__PURE__ */ import_react.default.createElement(StackMain, {
266
+ id: id ?? (0, import_echo.fullyQualifiedId)(primary),
264
267
  collection: primary,
265
268
  separation: settings.values.separation
266
269
  })) : null;
@@ -269,11 +272,12 @@ var StackPlugin = () => {
269
272
  role: "none",
270
273
  className: "row-span-2 overflow-auto"
271
274
  }, /* @__PURE__ */ import_react.default.createElement(StackMain, {
275
+ id: id ?? (0, import_echo.fullyQualifiedId)(primary),
272
276
  collection: primary,
273
277
  separation: settings.values.separation
274
278
  })) : null;
275
279
  case "settings": {
276
- return data.plugin === import_chunk_PGL7XDNJ.meta_default.id ? /* @__PURE__ */ import_react.default.createElement(StackSettings, {
280
+ return data.plugin === import_chunk_O5SQVKNW.meta_default.id ? /* @__PURE__ */ import_react.default.createElement(StackSettings, {
277
281
  settings: settings.values
278
282
  }) : null;
279
283
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/StackPlugin.tsx", "../../../src/components/index.ts", "../../../src/components/StackSettings.tsx", "../../../src/components/AddSectionDialog.tsx", "../../../src/translations.ts", "../../../src/index.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type Plugin, type PluginDefinition } from '@dxos/app-framework';\nimport { create } from '@dxos/echo-schema';\nimport { type EchoReactiveObject } from '@dxos/echo-schema';\nimport { LocalStorageStore } from '@dxos/local-storage';\nimport { CollectionType } from '@dxos/plugin-space/types';\nimport { Main } from '@dxos/react-ui';\nimport { baseSurface, topbarBlockPaddingStart, bottombarBlockPaddingEnd } from '@dxos/react-ui-theme';\n\nimport { StackMain, StackSettings, AddSectionDialog, dataHasAddSectionDialogProps } from './components';\nimport meta, { SECTION_IDENTIFIER, STACK_PLUGIN } from './meta';\nimport translations from './translations';\nimport { StackViewType } from './types';\nimport { type StackPluginProvides, type StackProvides, type StackState, type StackSettingsProps } from './types';\n\nexport const StackPlugin = (): PluginDefinition<StackPluginProvides> => {\n const settings = new LocalStorageStore<StackSettingsProps>(STACK_PLUGIN, { separation: true });\n const stackState = create<StackState>({ creators: [] });\n\n return {\n meta,\n ready: async (plugins) => {\n settings.prop({ key: 'separation', type: LocalStorageStore.bool() });\n\n for (const plugin of plugins) {\n if (plugin.meta.id === STACK_PLUGIN) {\n continue;\n }\n\n if (Array.isArray((plugin as Plugin<StackProvides>).provides?.stack?.creators)) {\n stackState.creators.push(...((plugin as Plugin<StackProvides>).provides.stack.creators ?? []));\n }\n }\n },\n provides: {\n settings: settings.values,\n metadata: {\n records: {\n [StackViewType.typename]: {\n placeholder: ['stack title placeholder', { ns: STACK_PLUGIN }],\n icon: 'ph--stack-simple--regular',\n },\n [SECTION_IDENTIFIER]: {\n parse: (section: { object: EchoReactiveObject<any> }, type: string) => {\n switch (type) {\n case 'node':\n // TODO(wittjosiah): Remove cast.\n return { id: section.object.id, label: section.object.title, data: section.object };\n case 'object':\n return section.object;\n case 'view-object':\n return section;\n }\n },\n },\n },\n },\n translations,\n echo: {\n schema: [StackViewType],\n },\n surface: {\n component: ({ data, role }) => {\n switch (data.component) {\n case `${STACK_PLUGIN}/AddSectionDialog`:\n return dataHasAddSectionDialogProps(data) ? <AddSectionDialog {...data.subject} /> : null;\n }\n\n const primary = data.active ?? data.object;\n switch (role) {\n case 'main':\n return primary instanceof CollectionType ? (\n <Main.Content bounce classNames={[baseSurface, topbarBlockPaddingStart, bottombarBlockPaddingEnd]}>\n <StackMain collection={primary} separation={settings.values.separation} />\n </Main.Content>\n ) : null;\n case 'article':\n return primary instanceof CollectionType ? (\n <div role='none' className='row-span-2 overflow-auto'>\n <StackMain collection={primary} separation={settings.values.separation} />\n </div>\n ) : null;\n case 'settings': {\n return data.plugin === meta.id ? <StackSettings settings={settings.values} /> : null;\n }\n default:\n return null;\n }\n },\n },\n stack: stackState,\n },\n };\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\n// Lazily load components for content surfaces.\nexport const StackMain = React.lazy(() => import('./StackMain'));\n\nexport * from './StackSettings';\nexport * from './AddSectionDialog';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { SettingsValue } from '@dxos/plugin-settings';\nimport { Input, useTranslation } from '@dxos/react-ui';\n\nimport { STACK_PLUGIN } from '../meta';\nimport { type StackSettingsProps } from '../types';\n\nexport const StackSettings = ({ settings }: { settings: StackSettingsProps }) => {\n const { t } = useTranslation(STACK_PLUGIN);\n\n return (\n <>\n <SettingsValue label={t('settings separation label')}>\n <Input.Switch checked={settings.separation} onCheckedChange={(checked) => (settings.separation = !!checked)} />\n </SettingsValue>\n </>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { FilePlus } from '@phosphor-icons/react';\nimport React, { useCallback, useRef, useState } from 'react';\n\nimport { usePlugin, useIntent, LayoutAction, useResolvePlugin, parseFileManagerPlugin } from '@dxos/app-framework';\nimport { type EchoReactiveObject, create } from '@dxos/echo-schema';\nimport { FileType } from '@dxos/plugin-ipfs/types';\nimport { type CollectionType } from '@dxos/plugin-space/types';\nimport { getSpace } from '@dxos/react-client/echo';\nimport { Dialog, toLocalizedString, useTranslation } from '@dxos/react-ui';\nimport { Path } from '@dxos/react-ui-mosaic';\nimport { SearchList } from '@dxos/react-ui-searchlist';\nimport { type AddSectionPosition } from '@dxos/react-ui-stack';\nimport { getSize, mx } from '@dxos/react-ui-theme';\nimport { nonNullable } from '@dxos/util';\n\nimport { STACK_PLUGIN } from '../meta';\nimport { StackViewType, type StackPluginProvides } from '../types';\n\ntype AddSectionDialogProps = { path?: string; position: AddSectionPosition; collection: CollectionType };\n\nexport const dataHasAddSectionDialogProps = (data: any): data is { subject: AddSectionDialogProps } => {\n return (\n 'subject' in data &&\n typeof data.subject === 'object' &&\n !!data.subject &&\n 'position' in data.subject &&\n typeof data.subject.position === 'string' &&\n 'collection' in data.subject\n );\n};\n\nexport const AddSectionDialog = ({ path, position, collection }: AddSectionDialogProps) => {\n const { t } = useTranslation(STACK_PLUGIN);\n const stackPlugin = usePlugin<StackPluginProvides>(STACK_PLUGIN);\n const fileManagerPlugin = useResolvePlugin(parseFileManagerPlugin);\n const fileRef = useRef<HTMLInputElement | null>(null);\n const { dispatch } = useIntent();\n const space = getSpace(collection);\n const [pending, setPending] = useState<boolean>(false);\n const [uploadError, setUploadError] = useState<Error | undefined>();\n\n const handleAdd = useCallback(\n (sectionObject: EchoReactiveObject<any>) => {\n const index =\n position === 'beforeAll'\n ? 0\n : position === 'afterAll'\n ? collection.objects.length\n : collection.objects.filter(nonNullable).findIndex((section) => section.id === Path.last(path!));\n\n collection.objects.splice(index + (position === 'after' ? 1 : 0), 0, sectionObject);\n const stack = collection.views[StackViewType.typename];\n if (stack) {\n stack.sections[sectionObject.id] = {};\n }\n setPending(false);\n void dispatch?.({ action: LayoutAction.SET_LAYOUT, data: { element: 'dialog', state: false } });\n },\n [collection, path, position, dispatch],\n );\n\n const handleFileUpload =\n fileManagerPlugin?.provides.file.upload && space\n ? async (file: File) => {\n const filename = file.name.split('.')[0];\n try {\n const info = await fileManagerPlugin.provides.file.upload?.(file, space);\n if (info) {\n const obj = create(FileType, { type: file.type, name: filename, filename, cid: info.cid });\n handleAdd(obj);\n }\n } catch (err: any) {\n setUploadError(err);\n }\n }\n : undefined;\n\n return (\n <Dialog.Content>\n <Dialog.Title>{t(`add section ${position} dialog title`)}</Dialog.Title>\n <SearchList.Root label={t('add section input placeholder')}>\n <SearchList.Input placeholder={t('add section input placeholder')} classNames='pli-3' disabled={pending} />\n <SearchList.Content classNames='min-bs-24 bs-fit max-bs-64 overflow-auto' {...(pending && { inert: 'true' })}>\n {stackPlugin?.provides?.stack.creators?.map(({ id, icon: Icon, label: propsLabel, testId, intent }) => {\n const label = toLocalizedString(propsLabel, t);\n return (\n <SearchList.Item\n value={label}\n key={id}\n onSelect={async () => {\n setPending(true);\n const { data: nextSection } = (await dispatch({ ...intent, data: { space } })) ?? {};\n handleAdd(nextSection);\n }}\n classNames='flex items-center gap-2 pli-2'\n data-testid={testId}\n >\n {Icon && <Icon className={mx(getSize(4), 'shrink-0')} />}\n <span className='grow truncate'>{label}</span>\n </SearchList.Item>\n );\n })}\n {handleFileUpload && (\n <SearchList.Item\n value={t('upload file label')}\n classNames='flex items-center gap-2 pli-2'\n onSelect={() => fileRef.current?.click()}\n >\n <FilePlus />\n <span className='grow truncate'>{t('upload file label')}</span>\n </SearchList.Item>\n )}\n {uploadError && <div className='text-error-500'>{uploadError.message}</div>}\n </SearchList.Content>\n </SearchList.Root>\n {handleFileUpload && (\n <input\n type='file'\n className='sr-only'\n ref={fileRef}\n onChange={({ target: { files } }) => files && handleFileUpload(files[0])}\n />\n )}\n </Dialog.Content>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { translations as stackTranslations } from '@dxos/react-ui-stack';\n\nimport { STACK_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [STACK_PLUGIN]: {\n 'plugin name': 'Stacks',\n 'settings separation label': 'Separate sections',\n 'add section beforeAll dialog title': 'Add a section to the start',\n 'add section afterAll dialog title': 'Add a section to the end',\n 'add section before dialog title': 'Add a section',\n 'add section after dialog title': 'Add a section',\n 'add section input placeholder': 'Find the type of section to add',\n 'upload file label': 'Add file',\n 'add section label': 'Add section',\n },\n },\n },\n ...stackTranslations,\n];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { StackPlugin } from './StackPlugin';\n\nexport default StackPlugin;\n\nexport * from './types';\n\nexport * from './StackPlugin';\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAkB;AAGlB,yBAAuB;AAEvB,2BAAkC;AAClC,mBAA+B;AAC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F;MACF;MACA7E,OAAOmE;IACT;EACF;AACF;AK5FA,IAAA,cAAeF;",
6
- "names": ["import_react", "import_react_ui", "import_echo_schema", "import_types", "import_react_ui_theme", "StackSettings", "settings", "t", "useTranslation", "STACK_PLUGIN", "React", "SettingsValue", "label", "Input", "Switch", "checked", "separation", "onCheckedChange", "dataHasAddSectionDialogProps", "data", "subject", "position", "AddSectionDialog", "path", "collection", "stackPlugin", "usePlugin", "fileManagerPlugin", "useResolvePlugin", "parseFileManagerPlugin", "fileRef", "useRef", "dispatch", "useIntent", "space", "getSpace", "pending", "setPending", "useState", "uploadError", "setUploadError", "handleAdd", "useCallback", "sectionObject", "index", "objects", "length", "filter", "nonNullable", "findIndex", "section", "id", "Path", "last", "splice", "stack", "views", "StackViewType", "typename", "sections", "action", "LayoutAction", "SET_LAYOUT", "element", "state", "handleFileUpload", "provides", "file", "upload", "filename", "name", "split", "info", "obj", "create", "FileType", "type", "cid", "err", "undefined", "Dialog", "Content", "Title", "SearchList", "Root", "placeholder", "classNames", "disabled", "inert", "creators", "map", "icon", "Icon", "propsLabel", "testId", "intent", "toLocalizedString", "Item", "value", "key", "onSelect", "nextSection", "data-testid", "className", "mx", "getSize", "span", "current", "click", "FilePlus", "div", "message", "input", "ref", "onChange", "target", "files", "StackMain", "lazy", "stackTranslations", "StackPlugin", "LocalStorageStore", "stackState", "meta", "ready", "plugins", "prop", "bool", "plugin", "Array", "isArray", "push", "values", "metadata", "records", "ns", "SECTION_IDENTIFIER", "parse", "object", "title", "translations", "echo", "schema", "surface", "component", "role", "primary", "active", "CollectionType", "Main", "bounce", "baseSurface", "topbarBlockPaddingStart", "bottombarBlockPaddingEnd"]
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type Plugin, type PluginDefinition } from '@dxos/app-framework';\nimport { create, type EchoReactiveObject } from '@dxos/echo-schema';\nimport { LocalStorageStore } from '@dxos/local-storage';\nimport { CollectionType } from '@dxos/plugin-space/types';\nimport { fullyQualifiedId } from '@dxos/react-client/echo';\nimport { Main } from '@dxos/react-ui';\nimport { baseSurface, topbarBlockPaddingStart, bottombarBlockPaddingEnd } from '@dxos/react-ui-theme';\n\nimport { StackMain, StackSettings, AddSectionDialog, dataHasAddSectionDialogProps } from './components';\nimport meta, { SECTION_IDENTIFIER, STACK_PLUGIN } from './meta';\nimport translations from './translations';\nimport { StackViewType } from './types';\nimport { type StackPluginProvides, type StackProvides, type StackState, type StackSettingsProps } from './types';\n\nexport const StackPlugin = (): PluginDefinition<StackPluginProvides> => {\n const settings = new LocalStorageStore<StackSettingsProps>(STACK_PLUGIN, { separation: true });\n const stackState = create<StackState>({ creators: [] });\n\n return {\n meta,\n ready: async (plugins) => {\n settings.prop({ key: 'separation', type: LocalStorageStore.bool() });\n\n for (const plugin of plugins) {\n if (plugin.meta.id === STACK_PLUGIN) {\n continue;\n }\n\n if (Array.isArray((plugin as Plugin<StackProvides>).provides?.stack?.creators)) {\n stackState.creators.push(...((plugin as Plugin<StackProvides>).provides.stack.creators ?? []));\n }\n }\n },\n provides: {\n settings: settings.values,\n metadata: {\n records: {\n [StackViewType.typename]: {\n placeholder: ['stack title placeholder', { ns: STACK_PLUGIN }],\n icon: 'ph--stack-simple--regular',\n },\n [SECTION_IDENTIFIER]: {\n parse: (section: { object: EchoReactiveObject<any> }, type: string) => {\n switch (type) {\n case 'node':\n // TODO(wittjosiah): Remove cast.\n return { id: section.object.id, label: section.object.title, data: section.object };\n case 'object':\n return section.object;\n case 'view-object':\n return section;\n }\n },\n },\n },\n },\n translations,\n echo: {\n schema: [StackViewType],\n },\n surface: {\n component: ({ data, role }) => {\n switch (data.component) {\n case `${STACK_PLUGIN}/AddSectionDialog`:\n return dataHasAddSectionDialogProps(data) ? <AddSectionDialog {...data.subject} /> : null;\n }\n\n const primary = data.active ?? data.object;\n // 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\n id={id ?? fullyQualifiedId(primary)}\n collection={primary}\n separation={settings.values.separation}\n />\n </Main.Content>\n ) : null;\n case 'article':\n return primary instanceof CollectionType ? (\n <div role='none' className='row-span-2 overflow-auto'>\n <StackMain\n id={id ?? fullyQualifiedId(primary)}\n collection={primary}\n separation={settings.values.separation}\n />\n </div>\n ) : null;\n case 'settings': {\n return data.plugin === meta.id ? <StackSettings settings={settings.values} /> : null;\n }\n default:\n return null;\n }\n },\n },\n stack: stackState,\n },\n };\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\n// Lazily load components for content surfaces.\nexport const StackMain = React.lazy(() => import('./StackMain'));\n\nexport * from './StackSettings';\nexport * from './AddSectionDialog';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { SettingsValue } from '@dxos/plugin-settings';\nimport { Input, useTranslation } from '@dxos/react-ui';\n\nimport { STACK_PLUGIN } from '../meta';\nimport { type StackSettingsProps } from '../types';\n\nexport const StackSettings = ({ settings }: { settings: StackSettingsProps }) => {\n const { t } = useTranslation(STACK_PLUGIN);\n\n return (\n <>\n <SettingsValue label={t('settings separation label')}>\n <Input.Switch checked={settings.separation} onCheckedChange={(checked) => (settings.separation = !!checked)} />\n </SettingsValue>\n </>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { FilePlus } from '@phosphor-icons/react';\nimport React, { useCallback, useRef, useState } from 'react';\n\nimport { usePlugin, useIntent, LayoutAction, useResolvePlugin, parseFileManagerPlugin } from '@dxos/app-framework';\nimport { type EchoReactiveObject, create } from '@dxos/echo-schema';\nimport { FileType } from '@dxos/plugin-ipfs/types';\nimport { type CollectionType } from '@dxos/plugin-space/types';\nimport { getSpace } from '@dxos/react-client/echo';\nimport { Dialog, toLocalizedString, useTranslation } from '@dxos/react-ui';\nimport { Path } from '@dxos/react-ui-mosaic';\nimport { SearchList } from '@dxos/react-ui-searchlist';\nimport { type AddSectionPosition } from '@dxos/react-ui-stack';\nimport { getSize, mx } from '@dxos/react-ui-theme';\nimport { nonNullable } from '@dxos/util';\n\nimport { STACK_PLUGIN } from '../meta';\nimport { StackViewType, type StackPluginProvides } from '../types';\n\ntype AddSectionDialogProps = { path?: string; position: AddSectionPosition; collection: CollectionType };\n\nexport const dataHasAddSectionDialogProps = (data: any): data is { subject: AddSectionDialogProps } => {\n return (\n 'subject' in data &&\n typeof data.subject === 'object' &&\n !!data.subject &&\n 'position' in data.subject &&\n typeof data.subject.position === 'string' &&\n 'collection' in data.subject\n );\n};\n\nexport const AddSectionDialog = ({ path, position, collection }: AddSectionDialogProps) => {\n const { t } = useTranslation(STACK_PLUGIN);\n const stackPlugin = usePlugin<StackPluginProvides>(STACK_PLUGIN);\n const fileManagerPlugin = useResolvePlugin(parseFileManagerPlugin);\n const fileRef = useRef<HTMLInputElement | null>(null);\n const { dispatch } = useIntent();\n const space = getSpace(collection);\n const [pending, setPending] = useState<boolean>(false);\n const [uploadError, setUploadError] = useState<Error | undefined>();\n\n const handleAdd = useCallback(\n (sectionObject: EchoReactiveObject<any>) => {\n const index =\n position === 'beforeAll'\n ? 0\n : position === 'afterAll'\n ? collection.objects.length\n : collection.objects.filter(nonNullable).findIndex((section) => section.id === Path.last(path!));\n\n collection.objects.splice(index + (position === 'after' ? 1 : 0), 0, sectionObject);\n const stack = collection.views[StackViewType.typename];\n if (stack) {\n stack.sections[sectionObject.id] = {};\n }\n setPending(false);\n void dispatch?.({ action: LayoutAction.SET_LAYOUT, data: { element: 'dialog', state: false } });\n },\n [collection, path, position, dispatch],\n );\n\n const handleFileUpload =\n fileManagerPlugin?.provides.file.upload && space\n ? async (file: File) => {\n const filename = file.name.split('.')[0];\n try {\n const info = await fileManagerPlugin.provides.file.upload?.(file, space);\n if (info) {\n const obj = create(FileType, { type: file.type, name: filename, filename, cid: info.cid });\n handleAdd(obj);\n }\n } catch (err: any) {\n setUploadError(err);\n }\n }\n : undefined;\n\n return (\n <Dialog.Content>\n <Dialog.Title>{t(`add section ${position} dialog title`)}</Dialog.Title>\n <SearchList.Root label={t('add section input placeholder')}>\n <SearchList.Input placeholder={t('add section input placeholder')} classNames='pli-3' disabled={pending} />\n <SearchList.Content classNames='min-bs-24 bs-fit max-bs-64 overflow-auto' {...(pending && { inert: 'true' })}>\n {stackPlugin?.provides?.stack.creators?.map(({ id, icon: Icon, label: propsLabel, testId, intent }) => {\n const label = toLocalizedString(propsLabel, t);\n return (\n <SearchList.Item\n value={label}\n key={id}\n onSelect={async () => {\n setPending(true);\n const { data: nextSection } = (await dispatch({ ...intent, data: { space } })) ?? {};\n handleAdd(nextSection);\n }}\n classNames='flex items-center gap-2 pli-2'\n data-testid={testId}\n >\n {Icon && <Icon className={mx(getSize(4), 'shrink-0')} />}\n <span className='grow truncate'>{label}</span>\n </SearchList.Item>\n );\n })}\n {handleFileUpload && (\n <SearchList.Item\n value={t('upload file label')}\n classNames='flex items-center gap-2 pli-2'\n onSelect={() => fileRef.current?.click()}\n >\n <FilePlus />\n <span className='grow truncate'>{t('upload file label')}</span>\n </SearchList.Item>\n )}\n {uploadError && <div className='text-error-500'>{uploadError.message}</div>}\n </SearchList.Content>\n </SearchList.Root>\n {handleFileUpload && (\n <input\n type='file'\n className='sr-only'\n ref={fileRef}\n onChange={({ target: { files } }) => files && handleFileUpload(files[0])}\n />\n )}\n </Dialog.Content>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { translations as stackTranslations } from '@dxos/react-ui-stack';\n\nimport { STACK_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [STACK_PLUGIN]: {\n 'plugin name': 'Stacks',\n 'settings separation label': 'Separate sections',\n 'add section beforeAll dialog title': 'Add a section to the start',\n 'add section afterAll dialog title': 'Add a section to the end',\n 'add section before dialog title': 'Add a section',\n 'add section after dialog title': 'Add a section',\n 'add section input placeholder': 'Find the type of section to add',\n 'upload file label': 'Add file',\n 'add section label': 'Add section',\n },\n },\n },\n ...stackTranslations,\n];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { StackPlugin } from './StackPlugin';\n\nexport default StackPlugin;\n\nexport * from './types';\n\nexport * from './StackPlugin';\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAkB;AAGlB,yBAAgD;AAChD,2BAAkC;AAClC,mBAA+B;AAC/B,kBAAiC;AACjC,sBAAqB;AACrB,4BAA+E;ACR/E,IAAAA,gBAAkB;ACAlB,IAAAA,gBAAkB;AAElB,6BAA8B;AAC9B,IAAAC,mBAAsC;ACHtC,IAAAD,gBAAyB;AACzB,IAAAA,gBAAqD;AAErD,2BAA6F;AAC7F,IAAAE,sBAAgD;AAChD,IAAAC,gBAAyB;AAEzB,IAAAC,eAAyB;AACzB,IAAAH,mBAA0D;AAC1D,6BAAqB;AACrB,iCAA2B;AAE3B,IAAAI,yBAA4B;AAC5B,kBAA4B;ACb5B,4BAAkD;AFQ3C,IAAMC,gBAAgB,CAAC,EAAEC,SAAQ,MAAoC;AAC1E,QAAM,EAAEC,EAAC,QAAKC,iCAAeC,kCAAAA;AAE7B,SACE,8BAAAC,QAAA,cAAA,cAAAA,QAAA,UAAA,MACE,8BAAAA,QAAA,cAACC,sCAAAA;IAAcC,OAAOL,EAAE,2BAAA;KACtB,8BAAAG,QAAA,cAACG,uBAAMC,QAAM;IAACC,SAAST,SAASU;IAAYC,iBAAiB,CAACF,YAAaT,SAASU,aAAa,CAAC,CAACD;;AAI3G;ACEO,IAAMG,+BAA+B,CAACC,SAAAA;AAC3C,SACE,aAAaA,QACb,OAAOA,KAAKC,YAAY,YACxB,CAAC,CAACD,KAAKC,WACP,cAAcD,KAAKC,WACnB,OAAOD,KAAKC,QAAQC,aAAa,YACjC,gBAAgBF,KAAKC;AAEzB;AAEO,IAAME,mBAAmB,CA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G,WAAAA;gBACClE,IAAIA,UAAMuG,8BAAiBR,OAAAA;gBAC3B1H,YAAY0H;gBACZlI,YAAYV,SAAS8H,OAAOpH;oBAG9B;YACN,KAAK;AACH,qBAAOkI,mBAAmBE,8BACxB1I,6BAAAA,QAAA,cAACoG,OAAAA;gBAAImC,MAAK;gBAAO1C,WAAU;iBACzB7F,6BAAAA,QAAA,cAAC2G,WAAAA;gBACClE,IAAIA,UAAMuG,8BAAiBR,OAAAA;gBAC3B1H,YAAY0H;gBACZlI,YAAYV,SAAS8H,OAAOpH;oBAG9B;YACN,KAAK,YAAY;AACf,qBAAOG,KAAK6G,WAAWL,mCAAKxE,KAAKzC,6BAAAA,QAAA,cAACL,eAAAA;gBAAcC,UAAUA,SAAS8H;mBAAa;YAClF;YACA;AACE,qBAAO;UACX;QACF;MACF;MACA7E,OAAOmE;IACT;EACF;AACF;AKvGA,IAAA,cAAeF;",
6
+ "names": ["import_react", "import_react_ui", "import_echo_schema", "import_types", "import_echo", "import_react_ui_theme", "StackSettings", "settings", "t", "useTranslation", "STACK_PLUGIN", "React", "SettingsValue", "label", "Input", "Switch", "checked", "separation", "onCheckedChange", "dataHasAddSectionDialogProps", "data", "subject", "position", "AddSectionDialog", "path", "collection", "stackPlugin", "usePlugin", "fileManagerPlugin", "useResolvePlugin", "parseFileManagerPlugin", "fileRef", "useRef", "dispatch", "useIntent", "space", "getSpace", "pending", "setPending", "useState", "uploadError", "setUploadError", "handleAdd", "useCallback", "sectionObject", "index", "objects", "length", "filter", "nonNullable", "findIndex", "section", "id", "Path", "last", "splice", "stack", "views", "StackViewType", "typename", "sections", "action", "LayoutAction", "SET_LAYOUT", "element", "state", "handleFileUpload", "provides", "file", "upload", "filename", "name", "split", "info", "obj", "create", "FileType", "type", "cid", "err", "undefined", "Dialog", "Content", "Title", "SearchList", "Root", "placeholder", "classNames", "disabled", "inert", "creators", "map", "icon", "Icon", "propsLabel", "testId", "intent", "toLocalizedString", "Item", "value", "key", "onSelect", "nextSection", "data-testid", "className", "mx", "getSize", "span", "current", "click", "FilePlus", "div", "message", "input", "ref", "onChange", "target", "files", "StackMain", "lazy", "stackTranslations", "StackPlugin", "LocalStorageStore", "stackState", "meta", "ready", "plugins", "prop", "bool", "plugin", "Array", "isArray", "push", "values", "metadata", "records", "ns", "SECTION_IDENTIFIER", "parse", "object", "title", "translations", "echo", "schema", "surface", "component", "role", "primary", "active", "CollectionType", "Main", "bounce", "baseSurface", "topbarBlockPaddingStart", "bottombarBlockPaddingEnd", "fullyQualifiedId"]
7
7
  }
@@ -18,12 +18,12 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var meta_exports = {};
20
20
  __export(meta_exports, {
21
- SECTION_IDENTIFIER: () => import_chunk_PGL7XDNJ.SECTION_IDENTIFIER,
22
- STACK_PLUGIN: () => import_chunk_PGL7XDNJ.STACK_PLUGIN,
23
- default: () => import_chunk_PGL7XDNJ.meta_default
21
+ SECTION_IDENTIFIER: () => import_chunk_O5SQVKNW.SECTION_IDENTIFIER,
22
+ STACK_PLUGIN: () => import_chunk_O5SQVKNW.STACK_PLUGIN,
23
+ default: () => import_chunk_O5SQVKNW.meta_default
24
24
  });
25
25
  module.exports = __toCommonJS(meta_exports);
26
- var import_chunk_PGL7XDNJ = require("./chunk-PGL7XDNJ.cjs");
26
+ var import_chunk_O5SQVKNW = require("./chunk-O5SQVKNW.cjs");
27
27
  // Annotate the CommonJS export names for ESM import in node:
28
28
  0 && (module.exports = {
29
29
  SECTION_IDENTIFIER,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["meta.cjs"],
4
- "sourcesContent": ["import {\n SECTION_IDENTIFIER,\n STACK_PLUGIN,\n meta_default\n} from \"./chunk-PGL7XDNJ.cjs\";\nexport {\n SECTION_IDENTIFIER,\n STACK_PLUGIN,\n meta_default as default\n};\n//# sourceMappingURL=meta.cjs.map\n"],
4
+ "sourcesContent": ["import {\n SECTION_IDENTIFIER,\n STACK_PLUGIN,\n meta_default\n} from \"./chunk-O5SQVKNW.cjs\";\nexport {\n SECTION_IDENTIFIER,\n STACK_PLUGIN,\n meta_default as default\n};\n//# sourceMappingURL=meta.cjs.map\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAIO;",
6
6
  "names": []
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"packages/plugins/plugin-stack/src/meta.tsx":{"bytes":1422,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytes":2578,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/plugin-settings","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.tsx","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/types/stack.ts":{"bytes":3077,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/types/types.ts":{"bytes":2031,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/types/index.ts":{"bytes":581,"imports":[{"path":"packages/plugins/plugin-stack/src/types/stack.ts","kind":"import-statement","original":"./stack"},{"path":"packages/plugins/plugin-stack/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/AddSectionDialog.tsx":{"bytes":18438,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-ipfs/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/react-ui-searchlist","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.tsx","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/AddSection.tsx":{"bytes":10461,"imports":[{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.tsx","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackMain.tsx":{"bytes":26459,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/AddSection.tsx","kind":"import-statement","original":"./AddSection"},{"path":"packages/plugins/plugin-stack/src/meta.tsx","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/index.ts":{"bytes":1140,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/StackSettings.tsx","kind":"import-statement","original":"./StackSettings"},{"path":"packages/plugins/plugin-stack/src/components/AddSectionDialog.tsx","kind":"import-statement","original":"./AddSectionDialog"},{"path":"packages/plugins/plugin-stack/src/components/StackMain.tsx","kind":"dynamic-import","original":"./StackMain"}],"format":"esm"},"packages/plugins/plugin-stack/src/translations.ts":{"bytes":2731,"imports":[{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.tsx","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/StackPlugin.tsx":{"bytes":14243,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-stack/src/meta.tsx","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-stack/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-stack/src/index.ts":{"bytes":854,"imports":[{"path":"packages/plugins/plugin-stack/src/StackPlugin.tsx","kind":"import-statement","original":"./StackPlugin"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/plugin-stack/src/StackPlugin.tsx","kind":"import-statement","original":"./StackPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-stack/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":19550},"packages/plugins/plugin-stack/dist/lib/node/index.cjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-PGL7XDNJ.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-EMD6A66G.cjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/plugin-settings","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-ipfs/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/react-ui-searchlist","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/dist/lib/node/StackMain-X77PXUJ3.cjs","kind":"dynamic-import"},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["SectionSchema","StackPlugin","StackViewType","default"],"entryPoint":"packages/plugins/plugin-stack/src/index.ts","inputs":{"packages/plugins/plugin-stack/src/StackPlugin.tsx":{"bytesInOutput":3542},"packages/plugins/plugin-stack/src/components/index.ts":{"bytesInOutput":99},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytesInOutput":554},"packages/plugins/plugin-stack/src/components/AddSectionDialog.tsx":{"bytesInOutput":4643},"packages/plugins/plugin-stack/src/translations.ts":{"bytesInOutput":710},"packages/plugins/plugin-stack/src/index.ts":{"bytesInOutput":31}},"bytes":10328},"packages/plugins/plugin-stack/dist/lib/node/meta.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-stack/dist/lib/node/meta.cjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-PGL7XDNJ.cjs","kind":"import-statement"}],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","default"],"entryPoint":"packages/plugins/plugin-stack/src/meta.tsx","inputs":{},"bytes":203},"packages/plugins/plugin-stack/dist/lib/node/types/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-stack/dist/lib/node/types/index.cjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-EMD6A66G.cjs","kind":"import-statement"}],"exports":["SectionSchema","StackViewType"],"entryPoint":"packages/plugins/plugin-stack/src/types/index.ts","inputs":{},"bytes":154},"packages/plugins/plugin-stack/dist/lib/node/StackMain-X77PXUJ3.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":19143},"packages/plugins/plugin-stack/dist/lib/node/StackMain-X77PXUJ3.cjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-PGL7XDNJ.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-EMD6A66G.cjs","kind":"import-statement"},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-stack/src/components/StackMain.tsx","inputs":{"packages/plugins/plugin-stack/src/components/StackMain.tsx":{"bytesInOutput":6206},"packages/plugins/plugin-stack/src/components/AddSection.tsx":{"bytesInOutput":2546}},"bytes":9166},"packages/plugins/plugin-stack/dist/lib/node/chunk-PGL7XDNJ.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":632},"packages/plugins/plugin-stack/dist/lib/node/chunk-PGL7XDNJ.cjs":{"imports":[],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","meta_default"],"inputs":{"packages/plugins/plugin-stack/src/meta.tsx":{"bytesInOutput":299}},"bytes":455},"packages/plugins/plugin-stack/dist/lib/node/chunk-EMD6A66G.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1475},"packages/plugins/plugin-stack/dist/lib/node/chunk-EMD6A66G.cjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["SectionSchema","StackViewType"],"inputs":{"packages/plugins/plugin-stack/src/types/stack.ts":{"bytesInOutput":463},"packages/plugins/plugin-stack/src/types/index.ts":{"bytesInOutput":0}},"bytes":605}}}
1
+ {"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytes":1525,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytes":2578,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/plugin-settings","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/types/stack.ts":{"bytes":3281,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/types/types.ts":{"bytes":2031,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/types/index.ts":{"bytes":581,"imports":[{"path":"packages/plugins/plugin-stack/src/types/stack.ts","kind":"import-statement","original":"./stack"},{"path":"packages/plugins/plugin-stack/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/AddSectionDialog.tsx":{"bytes":18438,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-ipfs/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/react-ui-searchlist","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.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/StackMain.tsx":{"bytes":27132,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/AddSection.tsx","kind":"import-statement","original":"./AddSection"},{"path":"packages/plugins/plugin-stack/src/meta.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":1140,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/StackSettings.tsx","kind":"import-statement","original":"./StackSettings"},{"path":"packages/plugins/plugin-stack/src/components/AddSectionDialog.tsx","kind":"import-statement","original":"./AddSectionDialog"},{"path":"packages/plugins/plugin-stack/src/components/StackMain.tsx","kind":"dynamic-import","original":"./StackMain"}],"format":"esm"},"packages/plugins/plugin-stack/src/translations.ts":{"bytes":2731,"imports":[{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/StackPlugin.tsx":{"bytes":15800,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-stack/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-stack/src/index.ts":{"bytes":854,"imports":[{"path":"packages/plugins/plugin-stack/src/StackPlugin.tsx","kind":"import-statement","original":"./StackPlugin"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/plugin-stack/src/StackPlugin.tsx","kind":"import-statement","original":"./StackPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-stack/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":20309},"packages/plugins/plugin-stack/dist/lib/node/index.cjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-O5SQVKNW.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-ACPGRTG3.cjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/plugin-settings","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-ipfs/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/react-ui-searchlist","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/dist/lib/node/StackMain-P2QHA4YD.cjs","kind":"dynamic-import"},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["SectionSchema","StackPlugin","StackViewType","default"],"entryPoint":"packages/plugins/plugin-stack/src/index.ts","inputs":{"packages/plugins/plugin-stack/src/StackPlugin.tsx":{"bytesInOutput":3777},"packages/plugins/plugin-stack/src/components/index.ts":{"bytesInOutput":99},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytesInOutput":554},"packages/plugins/plugin-stack/src/components/AddSectionDialog.tsx":{"bytesInOutput":4643},"packages/plugins/plugin-stack/src/translations.ts":{"bytesInOutput":710},"packages/plugins/plugin-stack/src/index.ts":{"bytesInOutput":31}},"bytes":10563},"packages/plugins/plugin-stack/dist/lib/node/meta.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-stack/dist/lib/node/meta.cjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-O5SQVKNW.cjs","kind":"import-statement"}],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","default"],"entryPoint":"packages/plugins/plugin-stack/src/meta.ts","inputs":{},"bytes":203},"packages/plugins/plugin-stack/dist/lib/node/types/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-stack/dist/lib/node/types/index.cjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-ACPGRTG3.cjs","kind":"import-statement"}],"exports":["SectionSchema","StackViewType"],"entryPoint":"packages/plugins/plugin-stack/src/types/index.ts","inputs":{},"bytes":154},"packages/plugins/plugin-stack/dist/lib/node/StackMain-P2QHA4YD.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":19553},"packages/plugins/plugin-stack/dist/lib/node/StackMain-P2QHA4YD.cjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-O5SQVKNW.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-ACPGRTG3.cjs","kind":"import-statement"},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-stack/src/components/StackMain.tsx","inputs":{"packages/plugins/plugin-stack/src/components/StackMain.tsx":{"bytesInOutput":6372},"packages/plugins/plugin-stack/src/components/AddSection.tsx":{"bytesInOutput":2546}},"bytes":9332},"packages/plugins/plugin-stack/dist/lib/node/chunk-O5SQVKNW.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":710},"packages/plugins/plugin-stack/dist/lib/node/chunk-O5SQVKNW.cjs":{"imports":[],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","meta_default"],"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytesInOutput":299}},"bytes":454},"packages/plugins/plugin-stack/dist/lib/node/chunk-ACPGRTG3.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1567},"packages/plugins/plugin-stack/dist/lib/node/chunk-ACPGRTG3.cjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["SectionSchema","StackViewType"],"inputs":{"packages/plugins/plugin-stack/src/types/stack.ts":{"bytesInOutput":515},"packages/plugins/plugin-stack/src/types/index.ts":{"bytesInOutput":0}},"bytes":657}}}
@@ -18,11 +18,11 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var types_exports = {};
20
20
  __export(types_exports, {
21
- SectionSchema: () => import_chunk_EMD6A66G.SectionSchema,
22
- StackViewType: () => import_chunk_EMD6A66G.StackViewType
21
+ SectionSchema: () => import_chunk_ACPGRTG3.SectionSchema,
22
+ StackViewType: () => import_chunk_ACPGRTG3.StackViewType
23
23
  });
24
24
  module.exports = __toCommonJS(types_exports);
25
- var import_chunk_EMD6A66G = require("../chunk-EMD6A66G.cjs");
25
+ var import_chunk_ACPGRTG3 = require("../chunk-ACPGRTG3.cjs");
26
26
  // Annotate the CommonJS export names for ESM import in node:
27
27
  0 && (module.exports = {
28
28
  SectionSchema,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["index.cjs"],
4
- "sourcesContent": ["import {\n SectionSchema,\n StackViewType\n} from \"../chunk-EMD6A66G.cjs\";\nexport {\n SectionSchema,\n StackViewType\n};\n//# sourceMappingURL=index.cjs.map\n"],
4
+ "sourcesContent": ["import {\n SectionSchema,\n StackViewType\n} from \"../chunk-ACPGRTG3.cjs\";\nexport {\n SectionSchema,\n StackViewType\n};\n//# sourceMappingURL=index.cjs.map\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAGO;",
6
6
  "names": []
7
7
  }