@dxos/plugin-stack 0.8.2 → 0.8.3-main.672df60

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 (22) hide show
  1. package/dist/lib/browser/{StackMain-RIX67KLY.mjs → StackMain-HZI5H2RA.mjs} +4 -4
  2. package/dist/lib/browser/{StackMain-RIX67KLY.mjs.map → StackMain-HZI5H2RA.mjs.map} +3 -3
  3. package/dist/lib/browser/index.mjs +1 -1
  4. package/dist/lib/browser/meta.json +1 -1
  5. package/dist/lib/browser/{react-surface-ED2DI7B5.mjs → react-surface-FIWIAQRE.mjs} +2 -2
  6. package/dist/lib/node/{StackMain-4DMJWHZ3.cjs → StackMain-NPXLFG5C.cjs} +6 -6
  7. package/dist/lib/node/{StackMain-4DMJWHZ3.cjs.map → StackMain-NPXLFG5C.cjs.map} +3 -3
  8. package/dist/lib/node/index.cjs +1 -1
  9. package/dist/lib/node/meta.json +1 -1
  10. package/dist/lib/node/{react-surface-L52YERMX.cjs → react-surface-73G6PBCV.cjs} +5 -5
  11. package/dist/lib/node-esm/{StackMain-7FHYHLK6.mjs → StackMain-QH6CGYPK.mjs} +4 -4
  12. package/dist/lib/node-esm/{StackMain-7FHYHLK6.mjs.map → StackMain-QH6CGYPK.mjs.map} +3 -3
  13. package/dist/lib/node-esm/index.mjs +1 -1
  14. package/dist/lib/node-esm/meta.json +1 -1
  15. package/dist/lib/node-esm/{react-surface-6WUOGQY6.mjs → react-surface-SCL5YFJ5.mjs} +2 -2
  16. package/dist/types/src/translations.d.ts +1 -0
  17. package/dist/types/src/translations.d.ts.map +1 -1
  18. package/package.json +23 -23
  19. package/src/components/StackSection.tsx +3 -3
  20. /package/dist/lib/browser/{react-surface-ED2DI7B5.mjs.map → react-surface-FIWIAQRE.mjs.map} +0 -0
  21. /package/dist/lib/node/{react-surface-L52YERMX.cjs.map → react-surface-73G6PBCV.cjs.map} +0 -0
  22. /package/dist/lib/node-esm/{react-surface-6WUOGQY6.mjs.map → react-surface-SCL5YFJ5.mjs.map} +0 -0
@@ -38,7 +38,7 @@ import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
38
38
  import React2, { useState } from "react";
39
39
  import { Surface } from "@dxos/app-framework";
40
40
  import { DropdownMenu, Icon, useTranslation, IconButton } from "@dxos/react-ui";
41
- import { useAttendableAttributes } from "@dxos/react-ui-attention";
41
+ import { useAttentionAttributes } from "@dxos/react-ui-attention";
42
42
  import { StackItem } from "@dxos/react-ui-stack";
43
43
  import { mx, getSize, textBlockWidth } from "@dxos/react-ui-theme";
44
44
 
@@ -84,7 +84,7 @@ var StackSection = ({ id, view, object, metadata: { icon = "ph--placeholder--reg
84
84
  const { t } = useTranslation(STACK_PLUGIN);
85
85
  const { onNavigate, onAdd, onCollapse, onDelete } = useStack();
86
86
  const [optionsMenuOpen, setOptionsMenuOpen] = useState(false);
87
- const attendableAttrs = useAttendableAttributes(id);
87
+ const attentionAttrs = useAttentionAttributes(id);
88
88
  return /* @__PURE__ */ React2.createElement(CollapsiblePrimitive.Root, {
89
89
  asChild: true,
90
90
  open: !view.collapsed,
@@ -94,7 +94,7 @@ var StackSection = ({ id, view, object, metadata: { icon = "ph--placeholder--reg
94
94
  id
95
95
  },
96
96
  role: "section",
97
- ...attendableAttrs,
97
+ ...attentionAttrs,
98
98
  classNames: "border-be border-separator"
99
99
  }, /* @__PURE__ */ React2.createElement(StackItem.Heading, {
100
100
  classNames: "attention-surface border-ie !border-separator"
@@ -312,4 +312,4 @@ var StackMain_default = StackMain;
312
312
  export {
313
313
  StackMain_default as default
314
314
  };
315
- //# sourceMappingURL=StackMain-RIX67KLY.mjs.map
315
+ //# sourceMappingURL=StackMain-HZI5H2RA.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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 { Option } from 'effect';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport {\n Capabilities,\n createIntent,\n LayoutAction,\n useAppGraph,\n useCapabilities,\n useIntentDispatcher,\n} from '@dxos/app-framework';\nimport { fullyQualifiedId, getTypename, isLiveObject, live, makeRef } from '@dxos/client/echo';\nimport { SpaceAction, 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 { isNonNullable } from '@dxos/util';\n\nimport { StackContext } from './StackContext';\nimport { StackSection } from './StackSection';\nimport { STACK_PLUGIN } from '../meta';\nimport {\n StackViewType,\n type AddSectionPosition,\n type CollapsedSections,\n type StackSectionItem,\n type StackSectionMetadata,\n type StackSectionView,\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 } = useAppGraph();\n const { t } = useTranslation(STACK_PLUGIN);\n const allMetadata = useCapabilities(Capabilities.Metadata);\n const defaultStack = useMemo(() => live(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(isNonNullable)\n .map((object) => {\n const metadata = allMetadata.find((m) => m.id === (getTypename(object) ?? 'never'))\n ?.metadata as StackSectionMetadata;\n const view = {\n ...stack.sections[object.id],\n collapsed: collapsedSections[fullyQualifiedId(object)],\n title:\n (object as any)?.title ??\n // TODO(wittjosiah): `getNode` is not reactive.\n toLocalizedString(graph.getNode(fullyQualifiedId(object)).pipe(Option.getOrNull)?.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(isNonNullable)\n .findIndex((section) => fullyQualifiedId(section) === id);\n const object = collection.objects[index].target;\n if (isLiveObject(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 // TODO(wittjosiah): Use object creation dialog.\n createIntent(LayoutAction.UpdateDialog, {\n part: 'dialog',\n subject: `${STACK_PLUGIN}/AddSectionDialog`,\n options: {\n blockAlign: 'start',\n props: {\n path: id,\n position,\n collection,\n },\n },\n }),\n );\n },\n [collection, dispatch],\n );\n\n const handleNavigate = useCallback(\n async (id: string) => {\n await dispatch(createIntent(LayoutAction.Open, { part: 'main', subject: [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 = 'p-1 mlb-1 shrink-0 min-bs-0 is-[--rail-action] bs-min';\n\nexport type StackSectionProps = StackSectionItem;\n\nexport const StackSection = ({\n id,\n view,\n object,\n metadata: { icon = 'ph--placeholder--regular' },\n}: StackSectionProps) => {\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] p-1 is-full'>\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-right--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-right--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 classNames='attention-surface'>\n <h2 className={mx('flex items-center p-4 font-medium', 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,SAASA,YAAY;AACrB,SAASC,cAAc;AACvB,OAAOC,UAASC,aAAaC,WAAWC,SAASC,YAAAA,iBAAgB;AAEjE,SACEC,cACAC,cACAC,cACAC,aACAC,iBACAC,2BACK;AACP,SAASC,kBAAkBC,aAAaC,cAAcC,MAAMC,eAAe;AAC3E,SAASC,mBAAwC;AACjD,SAASC,QAAQC,mBAAmBC,kBAAAA,uBAAsB;AAC1D,SAASC,yBAAyB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,UAAMmE,iBAAiBpB,YACrB,CAAClD,KAAYuC,cAAuBf,qBAAqB,CAAC+C,UAAU;MAAE,GAAGA;MAAM,CAACvE,GAAAA,GAAKuC;IAAU,EAAA,GAC/F,CAAA,CAAE;AAGJ,UAAMiC,mBAAmBtB,YACvB,MAAM/C,WAAWoD,aAAaC,YAAYiB,kBAAkB;MAAEnD,QAAQrB;MAAYyE,WAAW;IAAM,CAAA,CAAA,GACnG;MAACzE;MAAYE;KAAS;AAGxB,WACE,gBAAAwE,OAAA,cAACC,mBAAAA;MAAkB5E;OACjB,gBAAA2E,OAAA,cAACE,aAAaC,UAAQ;MACpBC,OAAO;QACLC,YAAYV;QACZW,YAAYb;QACZc,UAAUjC;QACVkC,OAAOzB;MACT;OAEA,gBAAAiB,OAAA,cAACS,OAAAA;MAAMC,aAAY;MAAWC,MAAK;MAAYtF;MAAQuF,eAAY;OAChE3D,MAAME,IAAI,CAAC0D,SACV,gBAAAb,OAAA,cAACc,cAAAA;MAAaC,KAAKF,KAAKxF;MAAK,GAAGwF;UAIpC,gBAAAb,OAAA,cAACgB,OAAAA;MAAIC,MAAK;MAAOC,WAAU;OACzB,gBAAAlB,OAAA,cAACmB,QAAAA;MAAOP,eAAY;MAAsBQ,YAAW;MAAQC,SAASxB;OACpE,gBAAAG,OAAA,cAACsB,MAAAA,IAAAA,GACD,gBAAAtB,OAAA,cAACuB,QAAAA;MAAKL,WAAU;OAAWtF,EAAE,mBAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;;;AAMzC;AAEA,IAAA,oBAAeR;",
6
- "names": ["Plus", "Option", "React", "useCallback", "useEffect", "useMemo", "useState", "Capabilities", "createIntent", "LayoutAction", "useAppGraph", "useCapabilities", "useIntentDispatcher", "fullyQualifiedId", "getTypename", "isLiveObject", "live", "makeRef", "SpaceAction", "Button", "toLocalizedString", "useTranslation", "AttentionProvider", "Stack", "isNonNullable", "createContext", "useContext", "StackContext", "createContext", "onCollapse", "onNavigate", "onDelete", "onAdd", "useStack", "useContext", "CollapsiblePrimitive", "React", "useState", "Surface", "DropdownMenu", "Icon", "useTranslation", "IconButton", "useAttendableAttributes", "StackItem", "mx", "getSize", "textBlockWidth", "React", "CaretDownUp", "children", "props", "svg", "xmlns", "viewBox", "rect", "width", "height", "fill", "polyline", "points", "stroke", "strokeLinecap", "strokeLinejoin", "strokeWidth", "sectionActionDimensions", "StackSection", "id", "view", "object", "metadata", "icon", "t", "useTranslation", "STACK_PLUGIN", "onNavigate", "onAdd", "onCollapse", "onDelete", "useStack", "optionsMenuOpen", "setOptionsMenuOpen", "useState", "attendableAttrs", "useAttendableAttributes", "React", "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", "CaretDownUp", "getSize", "Arrow", "IconButton", "iconOnly", "variant", "label", "Surface", "data", "subject", "limit", "placeholder", "h2", "mx", "textBlockWidth", "StackMain", "id", "collection", "dispatchPromise", "dispatch", "useIntentDispatcher", "graph", "useAppGraph", "t", "useTranslation", "STACK_PLUGIN", "allMetadata", "useCapabilities", "Capabilities", "Metadata", "defaultStack", "useMemo", "live", "StackViewType", "sections", "stack", "views", "typename", "target", "collapsedSections", "setCollapsedSections", "useState", "useEffect", "makeRef", "items", "objects", "map", "object", "filter", "isNonNullable", "metadata", "find", "m", "getTypename", "view", "collapsed", "fullyQualifiedId", "title", "toLocalizedString", "getNode", "pipe", "Option", "getOrNull", "properties", "label", "handleDelete", "useCallback", "index", "findIndex", "section", "isLiveObject", "createIntent", "SpaceAction", "RemoveObjects", "handleAdd", "position", "LayoutAction", "UpdateDialog", "part", "subject", "options", "blockAlign", "props", "path", "handleNavigate", "Open", "handleCollapse", "prev", "handleAddSection", "OpenCreateObject", "navigable", "React", "AttentionProvider", "StackContext", "Provider", "value", "onCollapse", "onNavigate", "onDelete", "onAdd", "Stack", "orientation", "size", "data-testid", "item", "StackSection", "key", "div", "role", "className", "Button", "classNames", "onClick", "Plus", "span"]
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plus } from '@phosphor-icons/react';\nimport { Option } from 'effect';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport {\n Capabilities,\n createIntent,\n LayoutAction,\n useAppGraph,\n useCapabilities,\n useIntentDispatcher,\n} from '@dxos/app-framework';\nimport { fullyQualifiedId, getTypename, isLiveObject, live, makeRef } from '@dxos/client/echo';\nimport { SpaceAction, 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 { isNonNullable } from '@dxos/util';\n\nimport { StackContext } from './StackContext';\nimport { StackSection } from './StackSection';\nimport { STACK_PLUGIN } from '../meta';\nimport {\n StackViewType,\n type AddSectionPosition,\n type CollapsedSections,\n type StackSectionItem,\n type StackSectionMetadata,\n type StackSectionView,\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 } = useAppGraph();\n const { t } = useTranslation(STACK_PLUGIN);\n const allMetadata = useCapabilities(Capabilities.Metadata);\n const defaultStack = useMemo(() => live(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(isNonNullable)\n .map((object) => {\n const metadata = allMetadata.find((m) => m.id === (getTypename(object) ?? 'never'))\n ?.metadata as StackSectionMetadata;\n const view = {\n ...stack.sections[object.id],\n collapsed: collapsedSections[fullyQualifiedId(object)],\n title:\n (object as any)?.title ??\n // TODO(wittjosiah): `getNode` is not reactive.\n toLocalizedString(graph.getNode(fullyQualifiedId(object)).pipe(Option.getOrNull)?.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(isNonNullable)\n .findIndex((section) => fullyQualifiedId(section) === id);\n const object = collection.objects[index].target;\n if (isLiveObject(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 // TODO(wittjosiah): Use object creation dialog.\n createIntent(LayoutAction.UpdateDialog, {\n part: 'dialog',\n subject: `${STACK_PLUGIN}/AddSectionDialog`,\n options: {\n blockAlign: 'start',\n props: {\n path: id,\n position,\n collection,\n },\n },\n }),\n );\n },\n [collection, dispatch],\n );\n\n const handleNavigate = useCallback(\n async (id: string) => {\n await dispatch(createIntent(LayoutAction.Open, { part: 'main', subject: [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 { useAttentionAttributes } 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 = 'p-1 mlb-1 shrink-0 min-bs-0 is-[--rail-action] bs-min';\n\nexport type StackSectionProps = StackSectionItem;\n\nexport const StackSection = ({\n id,\n view,\n object,\n metadata: { icon = 'ph--placeholder--regular' },\n}: StackSectionProps) => {\n const { t } = useTranslation(STACK_PLUGIN);\n const { onNavigate, onAdd, onCollapse, onDelete } = useStack();\n const [optionsMenuOpen, setOptionsMenuOpen] = useState(false);\n const attentionAttrs = useAttentionAttributes(id);\n\n return (\n <CollapsiblePrimitive.Root asChild open={!view.collapsed} onOpenChange={(nextOpen) => onCollapse?.(id, !nextOpen)}>\n <StackItem.Root item={{ id }} role='section' {...attentionAttrs} 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] p-1 is-full'>\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-right--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-right--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 classNames='attention-surface'>\n <h2 className={mx('flex items-center p-4 font-medium', 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,SAASA,YAAY;AACrB,SAASC,cAAc;AACvB,OAAOC,UAASC,aAAaC,WAAWC,SAASC,YAAAA,iBAAgB;AAEjE,SACEC,cACAC,cACAC,cACAC,aACAC,iBACAC,2BACK;AACP,SAASC,kBAAkBC,aAAaC,cAAcC,MAAMC,eAAe;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AAM;QAAEP,MAAM;QAAQC,SAAS;UAAC/D;;MAAI,CAAA,CAAA;IAC/E,GACA;MAACG;KAAS;AAGZ,UAAMmE,iBAAiBpB,YACrB,CAAClD,KAAYuC,cAAuBf,qBAAqB,CAAC+C,UAAU;MAAE,GAAGA;MAAM,CAACvE,GAAAA,GAAKuC;IAAU,EAAA,GAC/F,CAAA,CAAE;AAGJ,UAAMiC,mBAAmBtB,YACvB,MAAM/C,WAAWoD,aAAaC,YAAYiB,kBAAkB;MAAEnD,QAAQrB;MAAYyE,WAAW;IAAM,CAAA,CAAA,GACnG;MAACzE;MAAYE;KAAS;AAGxB,WACE,gBAAAwE,OAAA,cAACC,mBAAAA;MAAkB5E;OACjB,gBAAA2E,OAAA,cAACE,aAAaC,UAAQ;MACpBC,OAAO;QACLC,YAAYV;QACZW,YAAYb;QACZc,UAAUjC;QACVkC,OAAOzB;MACT;OAEA,gBAAAiB,OAAA,cAACS,OAAAA;MAAMC,aAAY;MAAWC,MAAK;MAAYtF;MAAQuF,eAAY;OAChE3D,MAAME,IAAI,CAAC0D,SACV,gBAAAb,OAAA,cAACc,cAAAA;MAAaC,KAAKF,KAAKxF;MAAK,GAAGwF;UAIpC,gBAAAb,OAAA,cAACgB,OAAAA;MAAIC,MAAK;MAAOC,WAAU;OACzB,gBAAAlB,OAAA,cAACmB,QAAAA;MAAOP,eAAY;MAAsBQ,YAAW;MAAQC,SAASxB;OACpE,gBAAAG,OAAA,cAACsB,MAAAA,IAAAA,GACD,gBAAAtB,OAAA,cAACuB,QAAAA;MAAKL,WAAU;OAAWtF,EAAE,mBAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;;;AAMzC;AAEA,IAAA,oBAAeR;",
6
+ "names": ["Plus", "Option", "React", "useCallback", "useEffect", "useMemo", "useState", "Capabilities", "createIntent", "LayoutAction", "useAppGraph", "useCapabilities", "useIntentDispatcher", "fullyQualifiedId", "getTypename", "isLiveObject", "live", "makeRef", "SpaceAction", "Button", "toLocalizedString", "useTranslation", "AttentionProvider", "Stack", "isNonNullable", "createContext", "useContext", "StackContext", "createContext", "onCollapse", "onNavigate", "onDelete", "onAdd", "useStack", "useContext", "CollapsiblePrimitive", "React", "useState", "Surface", "DropdownMenu", "Icon", "useTranslation", "IconButton", "useAttentionAttributes", "StackItem", "mx", "getSize", "textBlockWidth", "React", "CaretDownUp", "children", "props", "svg", "xmlns", "viewBox", "rect", "width", "height", "fill", "polyline", "points", "stroke", "strokeLinecap", "strokeLinejoin", "strokeWidth", "sectionActionDimensions", "StackSection", "id", "view", "object", "metadata", "icon", "t", "useTranslation", "STACK_PLUGIN", "onNavigate", "onAdd", "onCollapse", "onDelete", "useStack", "optionsMenuOpen", "setOptionsMenuOpen", "useState", "attentionAttrs", "useAttentionAttributes", "React", "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", "CaretDownUp", "getSize", "Arrow", "IconButton", "iconOnly", "variant", "label", "Surface", "data", "subject", "limit", "placeholder", "h2", "mx", "textBlockWidth", "StackMain", "id", "collection", "dispatchPromise", "dispatch", "useIntentDispatcher", "graph", "useAppGraph", "t", "useTranslation", "STACK_PLUGIN", "allMetadata", "useCapabilities", "Capabilities", "Metadata", "defaultStack", "useMemo", "live", "StackViewType", "sections", "stack", "views", "typename", "target", "collapsedSections", "setCollapsedSections", "useState", "useEffect", "makeRef", "items", "objects", "map", "object", "filter", "isNonNullable", "metadata", "find", "m", "getTypename", "view", "collapsed", "fullyQualifiedId", "title", "toLocalizedString", "getNode", "pipe", "Option", "getOrNull", "properties", "label", "handleDelete", "useCallback", "index", "findIndex", "section", "isLiveObject", "createIntent", "SpaceAction", "RemoveObjects", "handleAdd", "position", "LayoutAction", "UpdateDialog", "part", "subject", "options", "blockAlign", "props", "path", "handleNavigate", "Open", "handleCollapse", "prev", "handleAddSection", "OpenCreateObject", "navigable", "React", "AttentionProvider", "StackContext", "Provider", "value", "onCollapse", "onNavigate", "onDelete", "onAdd", "Stack", "orientation", "size", "data-testid", "item", "StackSection", "key", "div", "role", "className", "Button", "classNames", "onClick", "Plus", "span"]
7
7
  }
@@ -13,7 +13,7 @@ import { ClientCapabilities, ClientEvents } from "@dxos/plugin-client";
13
13
 
14
14
  // packages/plugins/plugin-stack/src/capabilities/index.ts
15
15
  import { lazy } from "@dxos/app-framework";
16
- var ReactSurface = lazy(() => import("./react-surface-ED2DI7B5.mjs"));
16
+ var ReactSurface = lazy(() => import("./react-surface-FIWIAQRE.mjs"));
17
17
 
18
18
  // packages/plugins/plugin-stack/src/translations.ts
19
19
  import { translations as stackTranslations } from "@dxos/react-ui-stack";
@@ -1 +1 @@
1
- {"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytes":2218,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytes":2968,"imports":[{"path":"@preact-signals/safe-react/tracking","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/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytes":1847,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytes":3241,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytes":17900,"imports":[{"path":"@preact-signals/safe-react/tracking","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":"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":3567,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/types/types.ts":{"bytes":2067,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/types/index.ts":{"bytes":549,"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":19550,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"effect","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-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/plugins/plugin-stack/src/components/StackSection.tsx","kind":"import-statement","original":"./StackSection"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/index.ts":{"bytes":837,"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/capabilities/react-surface.tsx":{"bytes":4565,"imports":[{"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-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","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"}],"format":"esm"},"packages/plugins/plugin-stack/src/capabilities/index.ts":{"bytes":791,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-stack/src/translations.ts":{"bytes":4167,"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.ts":{"bytes":6972,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"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":560,"imports":[{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-stack/src/StackPlugin.ts","kind":"import-statement","original":"./StackPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-stack/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5354},"packages/plugins/plugin-stack/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-XOUJQIK6.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-XHZTILS3.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/dist/lib/browser/react-surface-ED2DI7B5.mjs","kind":"dynamic-import"},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","StackPlugin","meta"],"entryPoint":"packages/plugins/plugin-stack/src/index.ts","inputs":{"packages/plugins/plugin-stack/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-stack/src/StackPlugin.ts":{"bytesInOutput":1402},"packages/plugins/plugin-stack/src/capabilities/index.ts":{"bytesInOutput":115},"packages/plugins/plugin-stack/src/translations.ts":{"bytesInOutput":1230}},"bytes":3215},"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-XOUJQIK6.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-RIX67KLY.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21913},"packages/plugins/plugin-stack/dist/lib/browser/StackMain-RIX67KLY.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-XOUJQIK6.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-XHZTILS3.mjs","kind":"import-statement"},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"effect","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-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","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":"@preact-signals/safe-react/tracking","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":4888},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytesInOutput":265},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytesInOutput":5487},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytesInOutput":972}},"bytes":12203},"packages/plugins/plugin-stack/dist/lib/browser/chunk-XOUJQIK6.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1718},"packages/plugins/plugin-stack/dist/lib/browser/chunk-XOUJQIK6.mjs":{"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["SectionSchema","StackViewType"],"inputs":{"packages/plugins/plugin-stack/src/types/stack.ts":{"bytesInOutput":595},"packages/plugins/plugin-stack/src/types/index.ts":{"bytesInOutput":0}},"bytes":737},"packages/plugins/plugin-stack/dist/lib/browser/react-surface-ED2DI7B5.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3556},"packages/plugins/plugin-stack/dist/lib/browser/react-surface-ED2DI7B5.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-XHZTILS3.mjs","kind":"import-statement"},{"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-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","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-RIX67KLY.mjs","kind":"dynamic-import"}],"exports":["default"],"entryPoint":"packages/plugins/plugin-stack/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-stack/src/capabilities/react-surface.tsx":{"bytesInOutput":888},"packages/plugins/plugin-stack/src/components/index.ts":{"bytesInOutput":94},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytesInOutput":248}},"bytes":1705},"packages/plugins/plugin-stack/dist/lib/browser/chunk-XHZTILS3.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1034},"packages/plugins/plugin-stack/dist/lib/browser/chunk-XHZTILS3.mjs":{"imports":[],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","meta"],"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytesInOutput":557}},"bytes":704}}}
1
+ {"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytes":2218,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytes":2968,"imports":[{"path":"@preact-signals/safe-react/tracking","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/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytes":1847,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytes":3241,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytes":17888,"imports":[{"path":"@preact-signals/safe-react/tracking","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":"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":3567,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/types/types.ts":{"bytes":2067,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/types/index.ts":{"bytes":549,"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":19550,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"effect","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-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/plugins/plugin-stack/src/components/StackSection.tsx","kind":"import-statement","original":"./StackSection"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/index.ts":{"bytes":837,"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/capabilities/react-surface.tsx":{"bytes":4565,"imports":[{"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-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","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"}],"format":"esm"},"packages/plugins/plugin-stack/src/capabilities/index.ts":{"bytes":791,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-stack/src/translations.ts":{"bytes":4167,"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.ts":{"bytes":6972,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"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":560,"imports":[{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-stack/src/StackPlugin.ts","kind":"import-statement","original":"./StackPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-stack/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5354},"packages/plugins/plugin-stack/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-XOUJQIK6.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-XHZTILS3.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/dist/lib/browser/react-surface-FIWIAQRE.mjs","kind":"dynamic-import"},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","StackPlugin","meta"],"entryPoint":"packages/plugins/plugin-stack/src/index.ts","inputs":{"packages/plugins/plugin-stack/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-stack/src/StackPlugin.ts":{"bytesInOutput":1402},"packages/plugins/plugin-stack/src/capabilities/index.ts":{"bytesInOutput":115},"packages/plugins/plugin-stack/src/translations.ts":{"bytesInOutput":1230}},"bytes":3215},"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-XOUJQIK6.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-HZI5H2RA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21906},"packages/plugins/plugin-stack/dist/lib/browser/StackMain-HZI5H2RA.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-XOUJQIK6.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-XHZTILS3.mjs","kind":"import-statement"},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"effect","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-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","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":"@preact-signals/safe-react/tracking","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":4888},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytesInOutput":265},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytesInOutput":5483},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytesInOutput":972}},"bytes":12199},"packages/plugins/plugin-stack/dist/lib/browser/chunk-XOUJQIK6.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1718},"packages/plugins/plugin-stack/dist/lib/browser/chunk-XOUJQIK6.mjs":{"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["SectionSchema","StackViewType"],"inputs":{"packages/plugins/plugin-stack/src/types/stack.ts":{"bytesInOutput":595},"packages/plugins/plugin-stack/src/types/index.ts":{"bytesInOutput":0}},"bytes":737},"packages/plugins/plugin-stack/dist/lib/browser/react-surface-FIWIAQRE.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3556},"packages/plugins/plugin-stack/dist/lib/browser/react-surface-FIWIAQRE.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-XHZTILS3.mjs","kind":"import-statement"},{"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-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","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-HZI5H2RA.mjs","kind":"dynamic-import"}],"exports":["default"],"entryPoint":"packages/plugins/plugin-stack/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-stack/src/capabilities/react-surface.tsx":{"bytesInOutput":888},"packages/plugins/plugin-stack/src/components/index.ts":{"bytesInOutput":94},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytesInOutput":248}},"bytes":1705},"packages/plugins/plugin-stack/dist/lib/browser/chunk-XHZTILS3.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1034},"packages/plugins/plugin-stack/dist/lib/browser/chunk-XHZTILS3.mjs":{"imports":[],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","meta"],"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytesInOutput":557}},"bytes":704}}}
@@ -19,7 +19,7 @@ import { Input, useTranslation } from "@dxos/react-ui";
19
19
  import { DeprecatedFormContainer, DeprecatedFormInput } from "@dxos/react-ui-form";
20
20
 
21
21
  // packages/plugins/plugin-stack/src/components/index.ts
22
- var StackMain = lazy(() => import("./StackMain-RIX67KLY.mjs"));
22
+ var StackMain = lazy(() => import("./StackMain-HZI5H2RA.mjs"));
23
23
 
24
24
  // packages/plugins/plugin-stack/src/capabilities/react-surface.tsx
25
25
  var react_surface_default = () => contributes(Capabilities.ReactSurface, createSurface({
@@ -43,4 +43,4 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, createS
43
43
  export {
44
44
  react_surface_default as default
45
45
  };
46
- //# sourceMappingURL=react-surface-ED2DI7B5.mjs.map
46
+ //# sourceMappingURL=react-surface-FIWIAQRE.mjs.map
@@ -26,11 +26,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var StackMain_4DMJWHZ3_exports = {};
30
- __export(StackMain_4DMJWHZ3_exports, {
29
+ var StackMain_NPXLFG5C_exports = {};
30
+ __export(StackMain_NPXLFG5C_exports, {
31
31
  default: () => StackMain_default
32
32
  });
33
- module.exports = __toCommonJS(StackMain_4DMJWHZ3_exports);
33
+ module.exports = __toCommonJS(StackMain_NPXLFG5C_exports);
34
34
  var import_chunk_5QWZH22T = require("./chunk-5QWZH22T.cjs");
35
35
  var import_chunk_F7ZNJ53O = require("./chunk-F7ZNJ53O.cjs");
36
36
  var import_tracking = require("@preact-signals/safe-react/tracking");
@@ -103,7 +103,7 @@ var StackSection = ({ id, view, object, metadata: { icon = "ph--placeholder--reg
103
103
  const { t } = (0, import_react_ui2.useTranslation)(import_chunk_F7ZNJ53O.STACK_PLUGIN);
104
104
  const { onNavigate, onAdd, onCollapse, onDelete } = useStack();
105
105
  const [optionsMenuOpen, setOptionsMenuOpen] = (0, import_react4.useState)(false);
106
- const attendableAttrs = (0, import_react_ui_attention2.useAttendableAttributes)(id);
106
+ const attentionAttrs = (0, import_react_ui_attention2.useAttentionAttributes)(id);
107
107
  return /* @__PURE__ */ import_react4.default.createElement(CollapsiblePrimitive.Root, {
108
108
  asChild: true,
109
109
  open: !view.collapsed,
@@ -113,7 +113,7 @@ var StackSection = ({ id, view, object, metadata: { icon = "ph--placeholder--reg
113
113
  id
114
114
  },
115
115
  role: "section",
116
- ...attendableAttrs,
116
+ ...attentionAttrs,
117
117
  classNames: "border-be border-separator"
118
118
  }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui_stack2.StackItem.Heading, {
119
119
  classNames: "attention-surface border-ie !border-separator"
@@ -326,4 +326,4 @@ var StackMain = ({ id, collection }) => {
326
326
  }
327
327
  };
328
328
  var StackMain_default = StackMain;
329
- //# sourceMappingURL=StackMain-4DMJWHZ3.cjs.map
329
+ //# sourceMappingURL=StackMain-NPXLFG5C.cjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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 { Option } from 'effect';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport {\n Capabilities,\n createIntent,\n LayoutAction,\n useAppGraph,\n useCapabilities,\n useIntentDispatcher,\n} from '@dxos/app-framework';\nimport { fullyQualifiedId, getTypename, isLiveObject, live, makeRef } from '@dxos/client/echo';\nimport { SpaceAction, 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 { isNonNullable } from '@dxos/util';\n\nimport { StackContext } from './StackContext';\nimport { StackSection } from './StackSection';\nimport { STACK_PLUGIN } from '../meta';\nimport {\n StackViewType,\n type AddSectionPosition,\n type CollapsedSections,\n type StackSectionItem,\n type StackSectionMetadata,\n type StackSectionView,\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 } = useAppGraph();\n const { t } = useTranslation(STACK_PLUGIN);\n const allMetadata = useCapabilities(Capabilities.Metadata);\n const defaultStack = useMemo(() => live(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(isNonNullable)\n .map((object) => {\n const metadata = allMetadata.find((m) => m.id === (getTypename(object) ?? 'never'))\n ?.metadata as StackSectionMetadata;\n const view = {\n ...stack.sections[object.id],\n collapsed: collapsedSections[fullyQualifiedId(object)],\n title:\n (object as any)?.title ??\n // TODO(wittjosiah): `getNode` is not reactive.\n toLocalizedString(graph.getNode(fullyQualifiedId(object)).pipe(Option.getOrNull)?.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(isNonNullable)\n .findIndex((section) => fullyQualifiedId(section) === id);\n const object = collection.objects[index].target;\n if (isLiveObject(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 // TODO(wittjosiah): Use object creation dialog.\n createIntent(LayoutAction.UpdateDialog, {\n part: 'dialog',\n subject: `${STACK_PLUGIN}/AddSectionDialog`,\n options: {\n blockAlign: 'start',\n props: {\n path: id,\n position,\n collection,\n },\n },\n }),\n );\n },\n [collection, dispatch],\n );\n\n const handleNavigate = useCallback(\n async (id: string) => {\n await dispatch(createIntent(LayoutAction.Open, { part: 'main', subject: [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 = 'p-1 mlb-1 shrink-0 min-bs-0 is-[--rail-action] bs-min';\n\nexport type StackSectionProps = StackSectionItem;\n\nexport const StackSection = ({\n id,\n view,\n object,\n metadata: { icon = 'ph--placeholder--regular' },\n}: StackSectionProps) => {\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] p-1 is-full'>\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-right--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-right--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 classNames='attention-surface'>\n <h2 className={mx('flex items-center p-4 font-medium', 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,oBAAuB;AACvB,IAAAA,gBAAiE;AAEjE,2BAOO;AACP,kBAA2E;AAC3E,mBAAiD;AACjD,sBAA0D;AAC1D,gCAAkC;AAClC,4BAAsB;AACtB,kBAA8B;ACjB9B,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,CAAC,EAAEC,UAAU,GAAGC,MAAAA,MAAwC;;;AACjF,WACE,8BAAAC,QAAA,cAACC,OAAAA;MAAIC,OAAM;MAA6BC,SAAQ;MAAe,GAAGJ;OAChE,8BAAAC,QAAA,cAACI,QAAAA;MAAKC,OAAM;MAAMC,QAAO;MAAMC,MAAK;QACpC,8BAAAP,QAAA,cAACQ,YAAAA;MAC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;QACZpI,UAAUmH;QACVlH,OAAO2H;MACT;OAEArH,8BAAAA,QAAA,cAACuI,6BAAAA;MAAMC,aAAY;MAAWxF,MAAK;MAAYhC;MAAQsC,eAAY;OAChEuC,MAAME,IAAI,CAAC3D,SACVpC,8BAAAA,QAAA,cAACe,cAAAA;MAAa0H,KAAKrG,KAAKpB;MAAK,GAAGoB;UAIpCpC,8BAAAA,QAAA,cAAC2C,OAAAA;MAAIN,MAAK;MAAOI,WAAU;OACzBzC,8BAAAA,QAAA,cAAC0I,wBAAAA;MAAOpF,eAAY;MAAsBhB,YAAW;MAAQe,SAAS4E;OACpEjI,8BAAAA,QAAA,cAAC2I,mBAAAA,IAAAA,GACD3I,8BAAAA,QAAA,cAACwC,QAAAA;MAAKC,WAAU;OAAWpB,EAAE,mBAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;;;AAMzC;AAEA,IAAA,oBAAegD;",
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", "h2", "mx", "textBlockWidth", "StackMain", "collection", "dispatchPromise", "dispatch", "useIntentDispatcher", "graph", "useAppGraph", "allMetadata", "useCapabilities", "Capabilities", "Metadata", "defaultStack", "useMemo", "live", "StackViewType", "sections", "stack", "views", "typename", "target", "collapsedSections", "setCollapsedSections", "useEffect", "makeRef", "items", "objects", "map", "filter", "isNonNullable", "find", "m", "getTypename", "fullyQualifiedId", "toLocalizedString", "getNode", "pipe", "Option", "getOrNull", "properties", "handleDelete", "useCallback", "index", "findIndex", "section", "isLiveObject", "createIntent", "SpaceAction", "RemoveObjects", "handleAdd", "position", "LayoutAction", "UpdateDialog", "part", "options", "blockAlign", "path", "handleNavigate", "Open", "handleCollapse", "prev", "handleAddSection", "OpenCreateObject", "navigable", "AttentionProvider", "Provider", "value", "Stack", "orientation", "key", "Button", "Plus"]
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plus } from '@phosphor-icons/react';\nimport { Option } from 'effect';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport {\n Capabilities,\n createIntent,\n LayoutAction,\n useAppGraph,\n useCapabilities,\n useIntentDispatcher,\n} from '@dxos/app-framework';\nimport { fullyQualifiedId, getTypename, isLiveObject, live, makeRef } from '@dxos/client/echo';\nimport { SpaceAction, 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 { isNonNullable } from '@dxos/util';\n\nimport { StackContext } from './StackContext';\nimport { StackSection } from './StackSection';\nimport { STACK_PLUGIN } from '../meta';\nimport {\n StackViewType,\n type AddSectionPosition,\n type CollapsedSections,\n type StackSectionItem,\n type StackSectionMetadata,\n type StackSectionView,\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 } = useAppGraph();\n const { t } = useTranslation(STACK_PLUGIN);\n const allMetadata = useCapabilities(Capabilities.Metadata);\n const defaultStack = useMemo(() => live(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(isNonNullable)\n .map((object) => {\n const metadata = allMetadata.find((m) => m.id === (getTypename(object) ?? 'never'))\n ?.metadata as StackSectionMetadata;\n const view = {\n ...stack.sections[object.id],\n collapsed: collapsedSections[fullyQualifiedId(object)],\n title:\n (object as any)?.title ??\n // TODO(wittjosiah): `getNode` is not reactive.\n toLocalizedString(graph.getNode(fullyQualifiedId(object)).pipe(Option.getOrNull)?.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(isNonNullable)\n .findIndex((section) => fullyQualifiedId(section) === id);\n const object = collection.objects[index].target;\n if (isLiveObject(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 // TODO(wittjosiah): Use object creation dialog.\n createIntent(LayoutAction.UpdateDialog, {\n part: 'dialog',\n subject: `${STACK_PLUGIN}/AddSectionDialog`,\n options: {\n blockAlign: 'start',\n props: {\n path: id,\n position,\n collection,\n },\n },\n }),\n );\n },\n [collection, dispatch],\n );\n\n const handleNavigate = useCallback(\n async (id: string) => {\n await dispatch(createIntent(LayoutAction.Open, { part: 'main', subject: [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 { useAttentionAttributes } 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 = 'p-1 mlb-1 shrink-0 min-bs-0 is-[--rail-action] bs-min';\n\nexport type StackSectionProps = StackSectionItem;\n\nexport const StackSection = ({\n id,\n view,\n object,\n metadata: { icon = 'ph--placeholder--regular' },\n}: StackSectionProps) => {\n const { t } = useTranslation(STACK_PLUGIN);\n const { onNavigate, onAdd, onCollapse, onDelete } = useStack();\n const [optionsMenuOpen, setOptionsMenuOpen] = useState(false);\n const attentionAttrs = useAttentionAttributes(id);\n\n return (\n <CollapsiblePrimitive.Root asChild open={!view.collapsed} onOpenChange={(nextOpen) => onCollapse?.(id, !nextOpen)}>\n <StackItem.Root item={{ id }} role='section' {...attentionAttrs} 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] p-1 is-full'>\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-right--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-right--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 classNames='attention-surface'>\n <h2 className={mx('flex items-center p-4 font-medium', 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,oBAAuB;AACvB,IAAAA,gBAAiE;AAEjE,2BAOO;AACP,kBAA2E;AAC3E,mBAAiD;AACjD,sBAA0D;AAC1D,gCAAkC;AAClC,4BAAsB;AACtB,kBAA8B;ACjB9B,IAAAA,gBAA0C;;ACA1C,2BAAsC;AACtC,IAAAA,gBAAgC;AAEhC,IAAAC,wBAAwB;AACxB,IAAAC,mBAA+D;AAC/D,IAAAC,6BAAuC;AACvC,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,CAAC,EAAEC,UAAU,GAAGC,MAAAA,MAAwC;;;AACjF,WACE,8BAAAC,QAAA,cAACC,OAAAA;MAAIC,OAAM;MAA6BC,SAAQ;MAAe,GAAGJ;OAChE,8BAAAC,QAAA,cAACI,QAAAA;MAAKC,OAAM;MAAMC,QAAO;MAAMC,MAAK;QACpC,8BAAAP,QAAA,cAACQ,YAAAA;MACCC,QAAO;MACPF,MAAK;MACLG,QAAO;MACPC,eAAc;MACdC,gBAAe;MACfC,aAAY;QAEd,8BAAAb,QAAA,cAACQ,YAAAA;MACCC,QAAO;MACPF,MAAK;MACLG,QAAO;MACPC,eAAc;MACdC,gBAAe;MACfC,aAAY;QAEbf,QAAAA;;;;AAGP;ADXA,IAAMgB,0BAA0B;AAIzB,IAAMC,eAAe,CA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AA,cAAC2C,OAAAA;MAAIN,MAAK;MAAOI,WAAU;OACzBzC,8BAAAA,QAAA,cAAC0I,wBAAAA;MAAOpF,eAAY;MAAsBhB,YAAW;MAAQe,SAAS4E;OACpEjI,8BAAAA,QAAA,cAAC2I,mBAAAA,IAAAA,GACD3I,8BAAAA,QAAA,cAACwC,QAAAA;MAAKC,WAAU;OAAWpB,EAAE,mBAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;;;AAMzC;AAEA,IAAA,oBAAegD;",
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", "attentionAttrs", "useAttentionAttributes", "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", "h2", "mx", "textBlockWidth", "StackMain", "collection", "dispatchPromise", "dispatch", "useIntentDispatcher", "graph", "useAppGraph", "allMetadata", "useCapabilities", "Capabilities", "Metadata", "defaultStack", "useMemo", "live", "StackViewType", "sections", "stack", "views", "typename", "target", "collapsedSections", "setCollapsedSections", "useEffect", "makeRef", "items", "objects", "map", "filter", "isNonNullable", "find", "m", "getTypename", "fullyQualifiedId", "toLocalizedString", "getNode", "pipe", "Option", "getOrNull", "properties", "handleDelete", "useCallback", "index", "findIndex", "section", "isLiveObject", "createIntent", "SpaceAction", "RemoveObjects", "handleAdd", "position", "LayoutAction", "UpdateDialog", "part", "options", "blockAlign", "path", "handleNavigate", "Open", "handleCollapse", "prev", "handleAddSection", "OpenCreateObject", "navigable", "AttentionProvider", "Provider", "value", "Stack", "orientation", "key", "Button", "Plus"]
7
7
  }
@@ -40,7 +40,7 @@ var import_app_framework = require("@dxos/app-framework");
40
40
  var import_plugin_client = require("@dxos/plugin-client");
41
41
  var import_app_framework2 = require("@dxos/app-framework");
42
42
  var import_react_ui_stack = require("@dxos/react-ui-stack");
43
- var ReactSurface = (0, import_app_framework2.lazy)(() => import("./react-surface-L52YERMX.cjs"));
43
+ var ReactSurface = (0, import_app_framework2.lazy)(() => import("./react-surface-73G6PBCV.cjs"));
44
44
  var translations_default = [
45
45
  {
46
46
  "en-US": {
@@ -1 +1 @@
1
- {"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytes":2218,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytes":2968,"imports":[{"path":"@preact-signals/safe-react/tracking","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/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytes":1847,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytes":3241,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytes":17900,"imports":[{"path":"@preact-signals/safe-react/tracking","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":"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":3567,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/types/types.ts":{"bytes":2067,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/types/index.ts":{"bytes":549,"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":19550,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"effect","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-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/plugins/plugin-stack/src/components/StackSection.tsx","kind":"import-statement","original":"./StackSection"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/index.ts":{"bytes":837,"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/capabilities/react-surface.tsx":{"bytes":4565,"imports":[{"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-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","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"}],"format":"esm"},"packages/plugins/plugin-stack/src/capabilities/index.ts":{"bytes":791,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-stack/src/translations.ts":{"bytes":4167,"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.ts":{"bytes":6972,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"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":560,"imports":[{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-stack/src/StackPlugin.ts","kind":"import-statement","original":"./StackPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-stack/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5354},"packages/plugins/plugin-stack/dist/lib/node/index.cjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-5QWZH22T.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-F7ZNJ53O.cjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/dist/lib/node/react-surface-L52YERMX.cjs","kind":"dynamic-import"},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","StackPlugin","meta"],"entryPoint":"packages/plugins/plugin-stack/src/index.ts","inputs":{"packages/plugins/plugin-stack/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-stack/src/StackPlugin.ts":{"bytesInOutput":1402},"packages/plugins/plugin-stack/src/capabilities/index.ts":{"bytesInOutput":115},"packages/plugins/plugin-stack/src/translations.ts":{"bytesInOutput":1230}},"bytes":3215},"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-5QWZH22T.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-4DMJWHZ3.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21913},"packages/plugins/plugin-stack/dist/lib/node/StackMain-4DMJWHZ3.cjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-5QWZH22T.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-F7ZNJ53O.cjs","kind":"import-statement"},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"effect","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-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","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":"@preact-signals/safe-react/tracking","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":4888},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytesInOutput":265},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytesInOutput":5487},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytesInOutput":972}},"bytes":12203},"packages/plugins/plugin-stack/dist/lib/node/chunk-5QWZH22T.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1718},"packages/plugins/plugin-stack/dist/lib/node/chunk-5QWZH22T.cjs":{"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["SectionSchema","StackViewType"],"inputs":{"packages/plugins/plugin-stack/src/types/stack.ts":{"bytesInOutput":595},"packages/plugins/plugin-stack/src/types/index.ts":{"bytesInOutput":0}},"bytes":737},"packages/plugins/plugin-stack/dist/lib/node/react-surface-L52YERMX.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3556},"packages/plugins/plugin-stack/dist/lib/node/react-surface-L52YERMX.cjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-F7ZNJ53O.cjs","kind":"import-statement"},{"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-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/dist/lib/node/StackMain-4DMJWHZ3.cjs","kind":"dynamic-import"}],"exports":["default"],"entryPoint":"packages/plugins/plugin-stack/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-stack/src/capabilities/react-surface.tsx":{"bytesInOutput":888},"packages/plugins/plugin-stack/src/components/index.ts":{"bytesInOutput":94},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytesInOutput":248}},"bytes":1705},"packages/plugins/plugin-stack/dist/lib/node/chunk-F7ZNJ53O.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1034},"packages/plugins/plugin-stack/dist/lib/node/chunk-F7ZNJ53O.cjs":{"imports":[],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","meta"],"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytesInOutput":557}},"bytes":704}}}
1
+ {"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytes":2218,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytes":2968,"imports":[{"path":"@preact-signals/safe-react/tracking","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/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytes":1847,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytes":3241,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytes":17888,"imports":[{"path":"@preact-signals/safe-react/tracking","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":"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":3567,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/types/types.ts":{"bytes":2067,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/types/index.ts":{"bytes":549,"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":19550,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"effect","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-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/plugins/plugin-stack/src/components/StackSection.tsx","kind":"import-statement","original":"./StackSection"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/index.ts":{"bytes":837,"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/capabilities/react-surface.tsx":{"bytes":4565,"imports":[{"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-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","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"}],"format":"esm"},"packages/plugins/plugin-stack/src/capabilities/index.ts":{"bytes":791,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-stack/src/translations.ts":{"bytes":4167,"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.ts":{"bytes":6972,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"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":560,"imports":[{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-stack/src/StackPlugin.ts","kind":"import-statement","original":"./StackPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-stack/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5354},"packages/plugins/plugin-stack/dist/lib/node/index.cjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-5QWZH22T.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-F7ZNJ53O.cjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/dist/lib/node/react-surface-73G6PBCV.cjs","kind":"dynamic-import"},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","StackPlugin","meta"],"entryPoint":"packages/plugins/plugin-stack/src/index.ts","inputs":{"packages/plugins/plugin-stack/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-stack/src/StackPlugin.ts":{"bytesInOutput":1402},"packages/plugins/plugin-stack/src/capabilities/index.ts":{"bytesInOutput":115},"packages/plugins/plugin-stack/src/translations.ts":{"bytesInOutput":1230}},"bytes":3215},"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-5QWZH22T.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-NPXLFG5C.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21906},"packages/plugins/plugin-stack/dist/lib/node/StackMain-NPXLFG5C.cjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-5QWZH22T.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-F7ZNJ53O.cjs","kind":"import-statement"},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"effect","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-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","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":"@preact-signals/safe-react/tracking","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":4888},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytesInOutput":265},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytesInOutput":5483},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytesInOutput":972}},"bytes":12199},"packages/plugins/plugin-stack/dist/lib/node/chunk-5QWZH22T.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1718},"packages/plugins/plugin-stack/dist/lib/node/chunk-5QWZH22T.cjs":{"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["SectionSchema","StackViewType"],"inputs":{"packages/plugins/plugin-stack/src/types/stack.ts":{"bytesInOutput":595},"packages/plugins/plugin-stack/src/types/index.ts":{"bytesInOutput":0}},"bytes":737},"packages/plugins/plugin-stack/dist/lib/node/react-surface-73G6PBCV.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3556},"packages/plugins/plugin-stack/dist/lib/node/react-surface-73G6PBCV.cjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node/chunk-F7ZNJ53O.cjs","kind":"import-statement"},{"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-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/dist/lib/node/StackMain-NPXLFG5C.cjs","kind":"dynamic-import"}],"exports":["default"],"entryPoint":"packages/plugins/plugin-stack/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-stack/src/capabilities/react-surface.tsx":{"bytesInOutput":888},"packages/plugins/plugin-stack/src/components/index.ts":{"bytesInOutput":94},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytesInOutput":248}},"bytes":1705},"packages/plugins/plugin-stack/dist/lib/node/chunk-F7ZNJ53O.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1034},"packages/plugins/plugin-stack/dist/lib/node/chunk-F7ZNJ53O.cjs":{"imports":[],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","meta"],"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytesInOutput":557}},"bytes":704}}}
@@ -26,11 +26,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var react_surface_L52YERMX_exports = {};
30
- __export(react_surface_L52YERMX_exports, {
29
+ var react_surface_73G6PBCV_exports = {};
30
+ __export(react_surface_73G6PBCV_exports, {
31
31
  default: () => react_surface_default
32
32
  });
33
- module.exports = __toCommonJS(react_surface_L52YERMX_exports);
33
+ module.exports = __toCommonJS(react_surface_73G6PBCV_exports);
34
34
  var import_chunk_F7ZNJ53O = require("./chunk-F7ZNJ53O.cjs");
35
35
  var import_react = __toESM(require("react"));
36
36
  var import_app_framework = require("@dxos/app-framework");
@@ -42,7 +42,7 @@ var import_tracking = require("@preact-signals/safe-react/tracking");
42
42
  var import_react3 = __toESM(require("react"));
43
43
  var import_react_ui = require("@dxos/react-ui");
44
44
  var import_react_ui_form = require("@dxos/react-ui-form");
45
- var StackMain = (0, import_react2.lazy)(() => import("./StackMain-4DMJWHZ3.cjs"));
45
+ var StackMain = (0, import_react2.lazy)(() => import("./StackMain-NPXLFG5C.cjs"));
46
46
  var react_surface_default = () => (0, import_app_framework.contributes)(import_app_framework.Capabilities.ReactSurface, (0, import_app_framework.createSurface)({
47
47
  id: `${import_chunk_F7ZNJ53O.STACK_PLUGIN}/article`,
48
48
  role: "article",
@@ -61,4 +61,4 @@ var react_surface_default = () => (0, import_app_framework.contributes)(import_a
61
61
  }));
62
62
  }
63
63
  }));
64
- //# sourceMappingURL=react-surface-L52YERMX.cjs.map
64
+ //# sourceMappingURL=react-surface-73G6PBCV.cjs.map
@@ -39,7 +39,7 @@ import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
39
39
  import React2, { useState } from "react";
40
40
  import { Surface } from "@dxos/app-framework";
41
41
  import { DropdownMenu, Icon, useTranslation, IconButton } from "@dxos/react-ui";
42
- import { useAttendableAttributes } from "@dxos/react-ui-attention";
42
+ import { useAttentionAttributes } from "@dxos/react-ui-attention";
43
43
  import { StackItem } from "@dxos/react-ui-stack";
44
44
  import { mx, getSize, textBlockWidth } from "@dxos/react-ui-theme";
45
45
 
@@ -85,7 +85,7 @@ var StackSection = ({ id, view, object, metadata: { icon = "ph--placeholder--reg
85
85
  const { t } = useTranslation(STACK_PLUGIN);
86
86
  const { onNavigate, onAdd, onCollapse, onDelete } = useStack();
87
87
  const [optionsMenuOpen, setOptionsMenuOpen] = useState(false);
88
- const attendableAttrs = useAttendableAttributes(id);
88
+ const attentionAttrs = useAttentionAttributes(id);
89
89
  return /* @__PURE__ */ React2.createElement(CollapsiblePrimitive.Root, {
90
90
  asChild: true,
91
91
  open: !view.collapsed,
@@ -95,7 +95,7 @@ var StackSection = ({ id, view, object, metadata: { icon = "ph--placeholder--reg
95
95
  id
96
96
  },
97
97
  role: "section",
98
- ...attendableAttrs,
98
+ ...attentionAttrs,
99
99
  classNames: "border-be border-separator"
100
100
  }, /* @__PURE__ */ React2.createElement(StackItem.Heading, {
101
101
  classNames: "attention-surface border-ie !border-separator"
@@ -313,4 +313,4 @@ var StackMain_default = StackMain;
313
313
  export {
314
314
  StackMain_default as default
315
315
  };
316
- //# sourceMappingURL=StackMain-7FHYHLK6.mjs.map
316
+ //# sourceMappingURL=StackMain-QH6CGYPK.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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 { Option } from 'effect';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport {\n Capabilities,\n createIntent,\n LayoutAction,\n useAppGraph,\n useCapabilities,\n useIntentDispatcher,\n} from '@dxos/app-framework';\nimport { fullyQualifiedId, getTypename, isLiveObject, live, makeRef } from '@dxos/client/echo';\nimport { SpaceAction, 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 { isNonNullable } from '@dxos/util';\n\nimport { StackContext } from './StackContext';\nimport { StackSection } from './StackSection';\nimport { STACK_PLUGIN } from '../meta';\nimport {\n StackViewType,\n type AddSectionPosition,\n type CollapsedSections,\n type StackSectionItem,\n type StackSectionMetadata,\n type StackSectionView,\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 } = useAppGraph();\n const { t } = useTranslation(STACK_PLUGIN);\n const allMetadata = useCapabilities(Capabilities.Metadata);\n const defaultStack = useMemo(() => live(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(isNonNullable)\n .map((object) => {\n const metadata = allMetadata.find((m) => m.id === (getTypename(object) ?? 'never'))\n ?.metadata as StackSectionMetadata;\n const view = {\n ...stack.sections[object.id],\n collapsed: collapsedSections[fullyQualifiedId(object)],\n title:\n (object as any)?.title ??\n // TODO(wittjosiah): `getNode` is not reactive.\n toLocalizedString(graph.getNode(fullyQualifiedId(object)).pipe(Option.getOrNull)?.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(isNonNullable)\n .findIndex((section) => fullyQualifiedId(section) === id);\n const object = collection.objects[index].target;\n if (isLiveObject(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 // TODO(wittjosiah): Use object creation dialog.\n createIntent(LayoutAction.UpdateDialog, {\n part: 'dialog',\n subject: `${STACK_PLUGIN}/AddSectionDialog`,\n options: {\n blockAlign: 'start',\n props: {\n path: id,\n position,\n collection,\n },\n },\n }),\n );\n },\n [collection, dispatch],\n );\n\n const handleNavigate = useCallback(\n async (id: string) => {\n await dispatch(createIntent(LayoutAction.Open, { part: 'main', subject: [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 = 'p-1 mlb-1 shrink-0 min-bs-0 is-[--rail-action] bs-min';\n\nexport type StackSectionProps = StackSectionItem;\n\nexport const StackSection = ({\n id,\n view,\n object,\n metadata: { icon = 'ph--placeholder--regular' },\n}: StackSectionProps) => {\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] p-1 is-full'>\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-right--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-right--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 classNames='attention-surface'>\n <h2 className={mx('flex items-center p-4 font-medium', 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,SAASA,YAAY;AACrB,SAASC,cAAc;AACvB,OAAOC,UAASC,aAAaC,WAAWC,SAASC,YAAAA,iBAAgB;AAEjE,SACEC,cACAC,cACAC,cACAC,aACAC,iBACAC,2BACK;AACP,SAASC,kBAAkBC,aAAaC,cAAcC,MAAMC,eAAe;AAC3E,SAASC,mBAAwC;AACjD,SAASC,QAAQC,mBAAmBC,kBAAAA,uBAAsB;AAC1D,SAASC,yBAAyB;AAClC,SAASC,aAAa;AACtB,SAASC,qBAAqB;;;ACjB9B,SAASC,eAAeC,kBAAkB;AAWnC,IAAMC,eAAeC,8BAAiC;EAC3DC,YAAY,MAAA;EAAO;EACnBC,YAAY,YAAA;EAAa;EACzBC,UAAU,YAAA;EAAa;EACvBC,OAAO,MAAA;EAAO;AAChB,CAAA;AAEO,IAAMC,WAAW,MAAMC,WAAWP,YAAAA;;;;AClBzC,YAAYQ,0BAA0B;AACtC,OAAOC,UAASC,gBAAgB;AAEhC,SAASC,eAAe;AACxB,SAASC,c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5E;OACjB,gBAAA2E,OAAA,cAACE,aAAaC,UAAQ;MACpBC,OAAO;QACLC,YAAYV;QACZW,YAAYb;QACZc,UAAUjC;QACVkC,OAAOzB;MACT;OAEA,gBAAAiB,OAAA,cAACS,OAAAA;MAAMC,aAAY;MAAWC,MAAK;MAAYtF;MAAQuF,eAAY;OAChE3D,MAAME,IAAI,CAAC0D,SACV,gBAAAb,OAAA,cAACc,cAAAA;MAAaC,KAAKF,KAAKxF;MAAK,GAAGwF;UAIpC,gBAAAb,OAAA,cAACgB,OAAAA;MAAIC,MAAK;MAAOC,WAAU;OACzB,gBAAAlB,OAAA,cAACmB,QAAAA;MAAOP,eAAY;MAAsBQ,YAAW;MAAQC,SAASxB;OACpE,gBAAAG,OAAA,cAACsB,MAAAA,IAAAA,GACD,gBAAAtB,OAAA,cAACuB,QAAAA;MAAKL,WAAU;OAAWtF,EAAE,mBAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;;;AAMzC;AAEA,IAAA,oBAAeR;",
6
- "names": ["Plus", "Option", "React", "useCallback", "useEffect", "useMemo", "useState", "Capabilities", "createIntent", "LayoutAction", "useAppGraph", "useCapabilities", "useIntentDispatcher", "fullyQualifiedId", "getTypename", "isLiveObject", "live", "makeRef", "SpaceAction", "Button", "toLocalizedString", "useTranslation", "AttentionProvider", "Stack", "isNonNullable", "createContext", "useContext", "StackContext", "createContext", "onCollapse", "onNavigate", "onDelete", "onAdd", "useStack", "useContext", "CollapsiblePrimitive", "React", "useState", "Surface", "DropdownMenu", "Icon", "useTranslation", "IconButton", "useAttendableAttributes", "StackItem", "mx", "getSize", "textBlockWidth", "React", "CaretDownUp", "children", "props", "svg", "xmlns", "viewBox", "rect", "width", "height", "fill", "polyline", "points", "stroke", "strokeLinecap", "strokeLinejoin", "strokeWidth", "sectionActionDimensions", "StackSection", "id", "view", "object", "metadata", "icon", "t", "useTranslation", "STACK_PLUGIN", "onNavigate", "onAdd", "onCollapse", "onDelete", "useStack", "optionsMenuOpen", "setOptionsMenuOpen", "useState", "attendableAttrs", "useAttendableAttributes", "React", "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", "CaretDownUp", "getSize", "Arrow", "IconButton", "iconOnly", "variant", "label", "Surface", "data", "subject", "limit", "placeholder", "h2", "mx", "textBlockWidth", "StackMain", "id", "collection", "dispatchPromise", "dispatch", "useIntentDispatcher", "graph", "useAppGraph", "t", "useTranslation", "STACK_PLUGIN", "allMetadata", "useCapabilities", "Capabilities", "Metadata", "defaultStack", "useMemo", "live", "StackViewType", "sections", "stack", "views", "typename", "target", "collapsedSections", "setCollapsedSections", "useState", "useEffect", "makeRef", "items", "objects", "map", "object", "filter", "isNonNullable", "metadata", "find", "m", "getTypename", "view", "collapsed", "fullyQualifiedId", "title", "toLocalizedString", "getNode", "pipe", "Option", "getOrNull", "properties", "label", "handleDelete", "useCallback", "index", "findIndex", "section", "isLiveObject", "createIntent", "SpaceAction", "RemoveObjects", "handleAdd", "position", "LayoutAction", "UpdateDialog", "part", "subject", "options", "blockAlign", "props", "path", "handleNavigate", "Open", "handleCollapse", "prev", "handleAddSection", "OpenCreateObject", "navigable", "React", "AttentionProvider", "StackContext", "Provider", "value", "onCollapse", "onNavigate", "onDelete", "onAdd", "Stack", "orientation", "size", "data-testid", "item", "StackSection", "key", "div", "role", "className", "Button", "classNames", "onClick", "Plus", "span"]
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plus } from '@phosphor-icons/react';\nimport { Option } from 'effect';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport {\n Capabilities,\n createIntent,\n LayoutAction,\n useAppGraph,\n useCapabilities,\n useIntentDispatcher,\n} from '@dxos/app-framework';\nimport { fullyQualifiedId, getTypename, isLiveObject, live, makeRef } from '@dxos/client/echo';\nimport { SpaceAction, 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 { isNonNullable } from '@dxos/util';\n\nimport { StackContext } from './StackContext';\nimport { StackSection } from './StackSection';\nimport { STACK_PLUGIN } from '../meta';\nimport {\n StackViewType,\n type AddSectionPosition,\n type CollapsedSections,\n type StackSectionItem,\n type StackSectionMetadata,\n type StackSectionView,\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 } = useAppGraph();\n const { t } = useTranslation(STACK_PLUGIN);\n const allMetadata = useCapabilities(Capabilities.Metadata);\n const defaultStack = useMemo(() => live(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(isNonNullable)\n .map((object) => {\n const metadata = allMetadata.find((m) => m.id === (getTypename(object) ?? 'never'))\n ?.metadata as StackSectionMetadata;\n const view = {\n ...stack.sections[object.id],\n collapsed: collapsedSections[fullyQualifiedId(object)],\n title:\n (object as any)?.title ??\n // TODO(wittjosiah): `getNode` is not reactive.\n toLocalizedString(graph.getNode(fullyQualifiedId(object)).pipe(Option.getOrNull)?.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(isNonNullable)\n .findIndex((section) => fullyQualifiedId(section) === id);\n const object = collection.objects[index].target;\n if (isLiveObject(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 // TODO(wittjosiah): Use object creation dialog.\n createIntent(LayoutAction.UpdateDialog, {\n part: 'dialog',\n subject: `${STACK_PLUGIN}/AddSectionDialog`,\n options: {\n blockAlign: 'start',\n props: {\n path: id,\n position,\n collection,\n },\n },\n }),\n );\n },\n [collection, dispatch],\n );\n\n const handleNavigate = useCallback(\n async (id: string) => {\n await dispatch(createIntent(LayoutAction.Open, { part: 'main', subject: [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 { useAttentionAttributes } 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 = 'p-1 mlb-1 shrink-0 min-bs-0 is-[--rail-action] bs-min';\n\nexport type StackSectionProps = StackSectionItem;\n\nexport const StackSection = ({\n id,\n view,\n object,\n metadata: { icon = 'ph--placeholder--regular' },\n}: StackSectionProps) => {\n const { t } = useTranslation(STACK_PLUGIN);\n const { onNavigate, onAdd, onCollapse, onDelete } = useStack();\n const [optionsMenuOpen, setOptionsMenuOpen] = useState(false);\n const attentionAttrs = useAttentionAttributes(id);\n\n return (\n <CollapsiblePrimitive.Root asChild open={!view.collapsed} onOpenChange={(nextOpen) => onCollapse?.(id, !nextOpen)}>\n <StackItem.Root item={{ id }} role='section' {...attentionAttrs} 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] p-1 is-full'>\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-right--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-right--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 classNames='attention-surface'>\n <h2 className={mx('flex items-center p-4 font-medium', 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,SAASA,YAAY;AACrB,SAASC,cAAc;AACvB,OAAOC,UAASC,aAAaC,WAAWC,SAASC,YAAAA,iBAAgB;AAEjE,SACEC,cACAC,cACAC,cACAC,aACAC,iBACAC,2BACK;AACP,SAASC,kBAAkBC,aAAaC,cAAcC,MAAMC,eAAe;AAC3E,SAASC,mBAAwC;AACjD,SAASC,QAAQC,mBAAmBC,kBAAAA,uBAAsB;AAC1D,SAASC,yBAAyB;AAClC,SAASC,aAAa;AACtB,SAASC,qBAAqB;;;ACjB9B,SAASC,eAAeC,kBAAkB;AAWnC,IAAMC,eAAeC,8BAAiC;EAC3DC,YAAY,MAAA;EAAO;EACnBC,YAAY,YAAA;EAAa;EACzBC,UAAU,YAAA;EAAa;EACvBC,OAAO,MAAA;EAAO;AAChB,CAAA;AAEO,IAAMC,WAAW,MAAMC,WAAWP,YAAAA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M,CAAA,CAAA,GACnG;MAACzE;MAAYE;KAAS;AAGxB,WACE,gBAAAwE,OAAA,cAACC,mBAAAA;MAAkB5E;OACjB,gBAAA2E,OAAA,cAACE,aAAaC,UAAQ;MACpBC,OAAO;QACLC,YAAYV;QACZW,YAAYb;QACZc,UAAUjC;QACVkC,OAAOzB;MACT;OAEA,gBAAAiB,OAAA,cAACS,OAAAA;MAAMC,aAAY;MAAWC,MAAK;MAAYtF;MAAQuF,eAAY;OAChE3D,MAAME,IAAI,CAAC0D,SACV,gBAAAb,OAAA,cAACc,cAAAA;MAAaC,KAAKF,KAAKxF;MAAK,GAAGwF;UAIpC,gBAAAb,OAAA,cAACgB,OAAAA;MAAIC,MAAK;MAAOC,WAAU;OACzB,gBAAAlB,OAAA,cAACmB,QAAAA;MAAOP,eAAY;MAAsBQ,YAAW;MAAQC,SAASxB;OACpE,gBAAAG,OAAA,cAACsB,MAAAA,IAAAA,GACD,gBAAAtB,OAAA,cAACuB,QAAAA;MAAKL,WAAU;OAAWtF,EAAE,mBAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;;;AAMzC;AAEA,IAAA,oBAAeR;",
6
+ "names": ["Plus", "Option", "React", "useCallback", "useEffect", "useMemo", "useState", "Capabilities", "createIntent", "LayoutAction", "useAppGraph", "useCapabilities", "useIntentDispatcher", "fullyQualifiedId", "getTypename", "isLiveObject", "live", "makeRef", "SpaceAction", "Button", "toLocalizedString", "useTranslation", "AttentionProvider", "Stack", "isNonNullable", "createContext", "useContext", "StackContext", "createContext", "onCollapse", "onNavigate", "onDelete", "onAdd", "useStack", "useContext", "CollapsiblePrimitive", "React", "useState", "Surface", "DropdownMenu", "Icon", "useTranslation", "IconButton", "useAttentionAttributes", "StackItem", "mx", "getSize", "textBlockWidth", "React", "CaretDownUp", "children", "props", "svg", "xmlns", "viewBox", "rect", "width", "height", "fill", "polyline", "points", "stroke", "strokeLinecap", "strokeLinejoin", "strokeWidth", "sectionActionDimensions", "StackSection", "id", "view", "object", "metadata", "icon", "t", "useTranslation", "STACK_PLUGIN", "onNavigate", "onAdd", "onCollapse", "onDelete", "useStack", "optionsMenuOpen", "setOptionsMenuOpen", "useState", "attentionAttrs", "useAttentionAttributes", "React", "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", "CaretDownUp", "getSize", "Arrow", "IconButton", "iconOnly", "variant", "label", "Surface", "data", "subject", "limit", "placeholder", "h2", "mx", "textBlockWidth", "StackMain", "id", "collection", "dispatchPromise", "dispatch", "useIntentDispatcher", "graph", "useAppGraph", "t", "useTranslation", "STACK_PLUGIN", "allMetadata", "useCapabilities", "Capabilities", "Metadata", "defaultStack", "useMemo", "live", "StackViewType", "sections", "stack", "views", "typename", "target", "collapsedSections", "setCollapsedSections", "useState", "useEffect", "makeRef", "items", "objects", "map", "object", "filter", "isNonNullable", "metadata", "find", "m", "getTypename", "view", "collapsed", "fullyQualifiedId", "title", "toLocalizedString", "getNode", "pipe", "Option", "getOrNull", "properties", "label", "handleDelete", "useCallback", "index", "findIndex", "section", "isLiveObject", "createIntent", "SpaceAction", "RemoveObjects", "handleAdd", "position", "LayoutAction", "UpdateDialog", "part", "subject", "options", "blockAlign", "props", "path", "handleNavigate", "Open", "handleCollapse", "prev", "handleAddSection", "OpenCreateObject", "navigable", "React", "AttentionProvider", "StackContext", "Provider", "value", "onCollapse", "onNavigate", "onDelete", "onAdd", "Stack", "orientation", "size", "data-testid", "item", "StackSection", "key", "div", "role", "className", "Button", "classNames", "onClick", "Plus", "span"]
7
7
  }
@@ -14,7 +14,7 @@ import { ClientCapabilities, ClientEvents } from "@dxos/plugin-client";
14
14
 
15
15
  // packages/plugins/plugin-stack/src/capabilities/index.ts
16
16
  import { lazy } from "@dxos/app-framework";
17
- var ReactSurface = lazy(() => import("./react-surface-6WUOGQY6.mjs"));
17
+ var ReactSurface = lazy(() => import("./react-surface-SCL5YFJ5.mjs"));
18
18
 
19
19
  // packages/plugins/plugin-stack/src/translations.ts
20
20
  import { translations as stackTranslations } from "@dxos/react-ui-stack";
@@ -1 +1 @@
1
- {"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytes":2218,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytes":2968,"imports":[{"path":"@preact-signals/safe-react/tracking","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/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytes":1847,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytes":3241,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytes":17900,"imports":[{"path":"@preact-signals/safe-react/tracking","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":"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":3567,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/types/types.ts":{"bytes":2067,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/types/index.ts":{"bytes":549,"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":19550,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"effect","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-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/plugins/plugin-stack/src/components/StackSection.tsx","kind":"import-statement","original":"./StackSection"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/index.ts":{"bytes":837,"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/capabilities/react-surface.tsx":{"bytes":4565,"imports":[{"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-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","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"}],"format":"esm"},"packages/plugins/plugin-stack/src/capabilities/index.ts":{"bytes":791,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-stack/src/translations.ts":{"bytes":4167,"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.ts":{"bytes":6972,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"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":560,"imports":[{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-stack/src/StackPlugin.ts","kind":"import-statement","original":"./StackPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-stack/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5355},"packages/plugins/plugin-stack/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-3R62SZZT.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-YW7WYA4H.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/dist/lib/node-esm/react-surface-6WUOGQY6.mjs","kind":"dynamic-import"},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","StackPlugin","meta"],"entryPoint":"packages/plugins/plugin-stack/src/index.ts","inputs":{"packages/plugins/plugin-stack/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-stack/src/StackPlugin.ts":{"bytesInOutput":1402},"packages/plugins/plugin-stack/src/capabilities/index.ts":{"bytesInOutput":115},"packages/plugins/plugin-stack/src/translations.ts":{"bytesInOutput":1230}},"bytes":3307},"packages/plugins/plugin-stack/dist/lib/node-esm/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-stack/dist/lib/node-esm/types/index.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-3R62SZZT.mjs","kind":"import-statement"}],"exports":["SectionSchema","StackViewType"],"entryPoint":"packages/plugins/plugin-stack/src/types/index.ts","inputs":{},"bytes":246},"packages/plugins/plugin-stack/dist/lib/node-esm/StackMain-7FHYHLK6.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21914},"packages/plugins/plugin-stack/dist/lib/node-esm/StackMain-7FHYHLK6.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-3R62SZZT.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-YW7WYA4H.mjs","kind":"import-statement"},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"effect","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-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","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":"@preact-signals/safe-react/tracking","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":4888},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytesInOutput":265},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytesInOutput":5487},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytesInOutput":972}},"bytes":12295},"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-3R62SZZT.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1720},"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-3R62SZZT.mjs":{"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["SectionSchema","StackViewType"],"inputs":{"packages/plugins/plugin-stack/src/types/stack.ts":{"bytesInOutput":595},"packages/plugins/plugin-stack/src/types/index.ts":{"bytesInOutput":0}},"bytes":830},"packages/plugins/plugin-stack/dist/lib/node-esm/react-surface-6WUOGQY6.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3557},"packages/plugins/plugin-stack/dist/lib/node-esm/react-surface-6WUOGQY6.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-YW7WYA4H.mjs","kind":"import-statement"},{"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-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/dist/lib/node-esm/StackMain-7FHYHLK6.mjs","kind":"dynamic-import"}],"exports":["default"],"entryPoint":"packages/plugins/plugin-stack/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-stack/src/capabilities/react-surface.tsx":{"bytesInOutput":888},"packages/plugins/plugin-stack/src/components/index.ts":{"bytesInOutput":94},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytesInOutput":248}},"bytes":1797},"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-YW7WYA4H.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1036},"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-YW7WYA4H.mjs":{"imports":[],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","meta"],"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytesInOutput":557}},"bytes":797}}}
1
+ {"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytes":2218,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytes":2968,"imports":[{"path":"@preact-signals/safe-react/tracking","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/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytes":1847,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytes":3241,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytes":17888,"imports":[{"path":"@preact-signals/safe-react/tracking","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":"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":3567,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/types/types.ts":{"bytes":2067,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/types/index.ts":{"bytes":549,"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":19550,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"effect","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-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/plugins/plugin-stack/src/components/StackSection.tsx","kind":"import-statement","original":"./StackSection"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/index.ts":{"bytes":837,"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/capabilities/react-surface.tsx":{"bytes":4565,"imports":[{"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-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","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"}],"format":"esm"},"packages/plugins/plugin-stack/src/capabilities/index.ts":{"bytes":791,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-stack/src/translations.ts":{"bytes":4167,"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.ts":{"bytes":6972,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"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":560,"imports":[{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-stack/src/StackPlugin.ts","kind":"import-statement","original":"./StackPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-stack/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5355},"packages/plugins/plugin-stack/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-3R62SZZT.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-YW7WYA4H.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/dist/lib/node-esm/react-surface-SCL5YFJ5.mjs","kind":"dynamic-import"},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","StackPlugin","meta"],"entryPoint":"packages/plugins/plugin-stack/src/index.ts","inputs":{"packages/plugins/plugin-stack/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-stack/src/StackPlugin.ts":{"bytesInOutput":1402},"packages/plugins/plugin-stack/src/capabilities/index.ts":{"bytesInOutput":115},"packages/plugins/plugin-stack/src/translations.ts":{"bytesInOutput":1230}},"bytes":3307},"packages/plugins/plugin-stack/dist/lib/node-esm/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-stack/dist/lib/node-esm/types/index.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-3R62SZZT.mjs","kind":"import-statement"}],"exports":["SectionSchema","StackViewType"],"entryPoint":"packages/plugins/plugin-stack/src/types/index.ts","inputs":{},"bytes":246},"packages/plugins/plugin-stack/dist/lib/node-esm/StackMain-QH6CGYPK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21907},"packages/plugins/plugin-stack/dist/lib/node-esm/StackMain-QH6CGYPK.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-3R62SZZT.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-YW7WYA4H.mjs","kind":"import-statement"},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"effect","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-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","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":"@preact-signals/safe-react/tracking","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":4888},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytesInOutput":265},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytesInOutput":5483},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytesInOutput":972}},"bytes":12291},"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-3R62SZZT.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1720},"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-3R62SZZT.mjs":{"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["SectionSchema","StackViewType"],"inputs":{"packages/plugins/plugin-stack/src/types/stack.ts":{"bytesInOutput":595},"packages/plugins/plugin-stack/src/types/index.ts":{"bytesInOutput":0}},"bytes":830},"packages/plugins/plugin-stack/dist/lib/node-esm/react-surface-SCL5YFJ5.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3557},"packages/plugins/plugin-stack/dist/lib/node-esm/react-surface-SCL5YFJ5.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-YW7WYA4H.mjs","kind":"import-statement"},{"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-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/dist/lib/node-esm/StackMain-QH6CGYPK.mjs","kind":"dynamic-import"}],"exports":["default"],"entryPoint":"packages/plugins/plugin-stack/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-stack/src/capabilities/react-surface.tsx":{"bytesInOutput":888},"packages/plugins/plugin-stack/src/components/index.ts":{"bytesInOutput":94},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytesInOutput":248}},"bytes":1797},"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-YW7WYA4H.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1036},"packages/plugins/plugin-stack/dist/lib/node-esm/chunk-YW7WYA4H.mjs":{"imports":[],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","meta"],"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytesInOutput":557}},"bytes":797}}}
@@ -20,7 +20,7 @@ import { Input, useTranslation } from "@dxos/react-ui";
20
20
  import { DeprecatedFormContainer, DeprecatedFormInput } from "@dxos/react-ui-form";
21
21
 
22
22
  // packages/plugins/plugin-stack/src/components/index.ts
23
- var StackMain = lazy(() => import("./StackMain-7FHYHLK6.mjs"));
23
+ var StackMain = lazy(() => import("./StackMain-QH6CGYPK.mjs"));
24
24
 
25
25
  // packages/plugins/plugin-stack/src/capabilities/react-surface.tsx
26
26
  var react_surface_default = () => contributes(Capabilities.ReactSurface, createSurface({
@@ -44,4 +44,4 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, createS
44
44
  export {
45
45
  react_surface_default as default
46
46
  };
47
- //# sourceMappingURL=react-surface-6WUOGQY6.mjs.map
47
+ //# sourceMappingURL=react-surface-SCL5YFJ5.mjs.map
@@ -2,6 +2,7 @@ declare const _default: ({
2
2
  'en-US': {
3
3
  stack: {
4
4
  "resize label": string;
5
+ "drag handle label": string;
5
6
  "pin start label": string;
6
7
  "pin end label": string;
7
8
  "increment start label": string;
@@ -1 +1 @@
1
- {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,wBA2BE"}
1
+ {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,wBA2BE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-stack",
3
- "version": "0.8.2",
3
+ "version": "0.8.3-main.672df60",
4
4
  "description": "DXOS Surface plugin for Stack entities",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -40,23 +40,23 @@
40
40
  "effect": "3.14.21",
41
41
  "node-fetch": "^2.6.0",
42
42
  "react-is": "~18.2.0",
43
- "@dxos/async": "0.8.2",
44
- "@dxos/app-framework": "0.8.2",
45
- "@dxos/client": "0.8.2",
46
- "@dxos/echo": "0.8.2",
47
- "@dxos/echo-schema": "0.8.2",
48
- "@dxos/invariant": "0.8.2",
49
- "@dxos/local-storage": "0.8.2",
50
- "@dxos/plugin-client": "0.8.2",
51
- "@dxos/plugin-graph": "0.8.2",
52
- "@dxos/plugin-deck": "0.8.2",
53
- "@dxos/plugin-space": "0.8.2",
54
- "@dxos/react-client": "0.8.2",
55
- "@dxos/react-ui-attention": "0.8.2",
56
- "@dxos/react-ui-form": "0.8.2",
57
- "@dxos/react-ui-stack": "0.8.2",
58
- "@dxos/react-ui-searchlist": "0.8.2",
59
- "@dxos/util": "0.8.2"
43
+ "@dxos/app-framework": "0.8.3-main.672df60",
44
+ "@dxos/echo": "0.8.3-main.672df60",
45
+ "@dxos/client": "0.8.3-main.672df60",
46
+ "@dxos/echo-schema": "0.8.3-main.672df60",
47
+ "@dxos/invariant": "0.8.3-main.672df60",
48
+ "@dxos/local-storage": "0.8.3-main.672df60",
49
+ "@dxos/async": "0.8.3-main.672df60",
50
+ "@dxos/plugin-client": "0.8.3-main.672df60",
51
+ "@dxos/plugin-deck": "0.8.3-main.672df60",
52
+ "@dxos/plugin-graph": "0.8.3-main.672df60",
53
+ "@dxos/plugin-space": "0.8.3-main.672df60",
54
+ "@dxos/react-client": "0.8.3-main.672df60",
55
+ "@dxos/react-ui-attention": "0.8.3-main.672df60",
56
+ "@dxos/react-ui-form": "0.8.3-main.672df60",
57
+ "@dxos/react-ui-stack": "0.8.3-main.672df60",
58
+ "@dxos/util": "0.8.3-main.672df60",
59
+ "@dxos/react-ui-searchlist": "0.8.3-main.672df60"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@babel/core": "^7.18.13",
@@ -66,17 +66,17 @@
66
66
  "react": "~18.2.0",
67
67
  "react-dom": "~18.2.0",
68
68
  "vite": "5.4.7",
69
- "@dxos/react-ui": "0.8.2",
70
- "@dxos/storybook-utils": "0.8.2",
71
- "@dxos/react-ui-theme": "0.8.2"
69
+ "@dxos/react-ui": "0.8.3-main.672df60",
70
+ "@dxos/react-ui-theme": "0.8.3-main.672df60",
71
+ "@dxos/storybook-utils": "0.8.3-main.672df60"
72
72
  },
73
73
  "peerDependencies": {
74
74
  "@phosphor-icons/react": "^2.1.5",
75
75
  "effect": "^3.13.3",
76
76
  "react": "~18.2.0",
77
77
  "react-dom": "~18.2.0",
78
- "@dxos/react-ui": "0.8.2",
79
- "@dxos/react-ui-theme": "0.8.2"
78
+ "@dxos/react-ui": "0.8.3-main.672df60",
79
+ "@dxos/react-ui-theme": "0.8.3-main.672df60"
80
80
  },
81
81
  "publishConfig": {
82
82
  "access": "public"
@@ -7,7 +7,7 @@ import React, { useState } from 'react';
7
7
 
8
8
  import { Surface } from '@dxos/app-framework';
9
9
  import { DropdownMenu, Icon, useTranslation, IconButton } from '@dxos/react-ui';
10
- import { useAttendableAttributes } from '@dxos/react-ui-attention';
10
+ import { useAttentionAttributes } from '@dxos/react-ui-attention';
11
11
  import { StackItem } from '@dxos/react-ui-stack';
12
12
  import { mx, getSize, textBlockWidth } from '@dxos/react-ui-theme';
13
13
 
@@ -29,11 +29,11 @@ export const StackSection = ({
29
29
  const { t } = useTranslation(STACK_PLUGIN);
30
30
  const { onNavigate, onAdd, onCollapse, onDelete } = useStack();
31
31
  const [optionsMenuOpen, setOptionsMenuOpen] = useState(false);
32
- const attendableAttrs = useAttendableAttributes(id);
32
+ const attentionAttrs = useAttentionAttributes(id);
33
33
 
34
34
  return (
35
35
  <CollapsiblePrimitive.Root asChild open={!view.collapsed} onOpenChange={(nextOpen) => onCollapse?.(id, !nextOpen)}>
36
- <StackItem.Root item={{ id }} role='section' {...attendableAttrs} classNames='border-be border-separator'>
36
+ <StackItem.Root item={{ id }} role='section' {...attentionAttrs} classNames='border-be border-separator'>
37
37
  <StackItem.Heading classNames='attention-surface border-ie !border-separator'>
38
38
  <span className='sr-only'>{view.title}</span>
39
39
  <div role='none' className='sticky -block-start-px bg-[--sticky-bg] p-1 is-full'>