@dxos/plugin-simple-layout 0.8.4-main.6fa680abb7 → 0.8.4-main.8360d9e660

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 (38) hide show
  1. package/dist/lib/browser/{chunk-MDPEKLKR.mjs → chunk-2YSUM2L4.mjs} +13 -23
  2. package/dist/lib/browser/chunk-2YSUM2L4.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +3 -3
  4. package/dist/lib/browser/meta.json +1 -1
  5. package/dist/lib/browser/{operation-resolver-VTZ6HZ4B.mjs → operation-resolver-LV5FK6MN.mjs} +3 -2
  6. package/dist/lib/browser/operation-resolver-LV5FK6MN.mjs.map +7 -0
  7. package/dist/lib/browser/{react-root-WVQYY2JA.mjs → react-root-JR6OENXV.mjs} +2 -2
  8. package/dist/lib/browser/{react-surface-VLBR37ED.mjs → react-surface-5JOPIP5Z.mjs} +2 -2
  9. package/dist/lib/node-esm/{chunk-DCKASLMP.mjs → chunk-RCQE6FR2.mjs} +13 -23
  10. package/dist/lib/node-esm/chunk-RCQE6FR2.mjs.map +7 -0
  11. package/dist/lib/node-esm/index.mjs +3 -3
  12. package/dist/lib/node-esm/meta.json +1 -1
  13. package/dist/lib/node-esm/{operation-resolver-R7CQ6ERU.mjs → operation-resolver-FD3EF2LX.mjs} +3 -2
  14. package/dist/lib/node-esm/operation-resolver-FD3EF2LX.mjs.map +7 -0
  15. package/dist/lib/node-esm/{react-root-XBNDM7BE.mjs → react-root-CRTCNH3F.mjs} +2 -2
  16. package/dist/lib/node-esm/{react-surface-U5NHA367.mjs → react-surface-NRTDSGFB.mjs} +2 -2
  17. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -1
  18. package/dist/types/src/components/NavBranch/NavBranch.d.ts.map +1 -1
  19. package/dist/types/src/components/Popover/Popover.d.ts.map +1 -1
  20. package/dist/types/src/components/SimpleLayout/NavBar.d.ts +1 -1
  21. package/dist/types/src/components/SimpleLayout/NavBar.d.ts.map +1 -1
  22. package/dist/types/tsconfig.tsbuildinfo +1 -1
  23. package/package.json +27 -27
  24. package/src/capabilities/operation-resolver/operation-resolver.ts +1 -0
  25. package/src/components/Home/Home.tsx +2 -2
  26. package/src/components/NavBranch/NavBranch.tsx +5 -2
  27. package/src/components/Popover/Popover.tsx +2 -12
  28. package/src/components/SimpleLayout/Drawer.tsx +1 -1
  29. package/src/components/SimpleLayout/NavBar.tsx +2 -3
  30. package/src/hooks/useDrawerActions.ts +1 -1
  31. package/dist/lib/browser/chunk-MDPEKLKR.mjs.map +0 -7
  32. package/dist/lib/browser/operation-resolver-VTZ6HZ4B.mjs.map +0 -7
  33. package/dist/lib/node-esm/chunk-DCKASLMP.mjs.map +0 -7
  34. package/dist/lib/node-esm/operation-resolver-R7CQ6ERU.mjs.map +0 -7
  35. /package/dist/lib/browser/{react-root-WVQYY2JA.mjs.map → react-root-JR6OENXV.mjs.map} +0 -0
  36. /package/dist/lib/browser/{react-surface-VLBR37ED.mjs.map → react-surface-5JOPIP5Z.mjs.map} +0 -0
  37. /package/dist/lib/node-esm/{react-root-XBNDM7BE.mjs.map → react-root-CRTCNH3F.mjs.map} +0 -0
  38. /package/dist/lib/node-esm/{react-surface-U5NHA367.mjs.map → react-surface-NRTDSGFB.mjs.map} +0 -0
@@ -62,8 +62,7 @@ var Home = (_) => {
62
62
  }, /* @__PURE__ */ React.createElement(Panel.Root, null, /* @__PURE__ */ React.createElement(Panel.Toolbar, {
63
63
  asChild: true
64
64
  }, /* @__PURE__ */ React.createElement(Toolbar.Root, null, /* @__PURE__ */ React.createElement(SearchList.Input, {
65
- placeholder: t("search placeholder"),
66
- autoFocus: true
65
+ placeholder: t("search placeholder")
67
66
  }))), /* @__PURE__ */ React.createElement(Panel.Content, {
68
67
  asChild: true
69
68
  }, /* @__PURE__ */ React.createElement(SearchList.Content, null, /* @__PURE__ */ React.createElement(Mosaic.Container, {
@@ -129,7 +128,7 @@ var WorkspaceTile = (props) => {
129
128
  hue: data.properties.hue,
130
129
  hueVariant: "transparent",
131
130
  variant: "square",
132
- size: 12,
131
+ size: 8,
133
132
  fallback: name
134
133
  }), /* @__PURE__ */ React.createElement(Avatar.Label, null, name), /* @__PURE__ */ React.createElement(Icon, {
135
134
  icon: "ph--caret-right--regular"
@@ -518,7 +517,6 @@ var useIOSKeyboard = () => {
518
517
  import { createContext as createContext2 } from "@radix-ui/react-context";
519
518
  import React4, { useCallback as useCallback3, useEffect as useEffect4, useMemo as useMemo4, useRef as useRef2, useState as useState2 } from "react";
520
519
  import { Surface } from "@dxos/app-framework/ui";
521
- import { useObjectNavigate } from "@dxos/app-toolkit/ui";
522
520
  import { Popover, toLocalizedString as toLocalizedString3, useTranslation as useTranslation3 } from "@dxos/react-ui";
523
521
  import { Card as Card2 } from "@dxos/react-ui";
524
522
  var DEBOUNCE_DELAY = 40;
@@ -557,12 +555,10 @@ var PopoverRoot = ({ children }) => {
557
555
  virtualRef
558
556
  }), children));
559
557
  };
560
- var getPopoverSubject = (content) => content && typeof content === "object" && "subject" in content ? content.subject : content;
561
558
  var PopoverContent = () => {
562
559
  const { t } = useTranslation3(meta.id);
563
560
  const { state, updateState } = useSimpleLayoutState();
564
561
  const { setOpen } = useLayoutPopoverContext("PopoverContent");
565
- const handleNavigate = useObjectNavigate(getPopoverSubject(state.popoverContent));
566
562
  const handleClose = useCallback3(() => {
567
563
  setOpen(false);
568
564
  updateState((s) => ({
@@ -610,9 +606,7 @@ var PopoverContent = () => {
610
606
  }), state.popoverKind === "card" && /* @__PURE__ */ React4.createElement(Card2.Root, {
611
607
  border: false,
612
608
  classNames: "dx-card-popover"
613
- }, /* @__PURE__ */ React4.createElement(Card2.Toolbar, null, /* @__PURE__ */ React4.createElement("span", null), state.popoverTitle ? /* @__PURE__ */ React4.createElement(Card2.Title, {
614
- onClick: handleNavigate
615
- }, toLocalizedString3(state.popoverTitle, t)) : /* @__PURE__ */ React4.createElement("span", null), /* @__PURE__ */ React4.createElement(Card2.CloseIconButton, {
609
+ }, /* @__PURE__ */ React4.createElement(Card2.Toolbar, null, /* @__PURE__ */ React4.createElement("span", null), state.popoverTitle ? /* @__PURE__ */ React4.createElement(Card2.Title, null, toLocalizedString3(state.popoverTitle, t)) : /* @__PURE__ */ React4.createElement("span", null), /* @__PURE__ */ React4.createElement(Card2.CloseIconButton, {
616
610
  onClick: handleClose
617
611
  })), /* @__PURE__ */ React4.createElement(Surface.Surface, {
618
612
  role: "card--content",
@@ -676,12 +670,11 @@ import { useAppGraph as useAppGraph5 } from "@dxos/app-toolkit/ui";
676
670
  import { useNode as useNode2 } from "@dxos/plugin-graph";
677
671
  import { ErrorFallback } from "@dxos/react-ui";
678
672
  import { useAttentionAttributes } from "@dxos/react-ui-attention";
679
- import { mx as mx5 } from "@dxos/ui-theme";
673
+ import { mx as mx4 } from "@dxos/ui-theme";
680
674
 
681
675
  // src/components/SimpleLayout/NavBar.tsx
682
676
  import React6 from "react";
683
677
  import { Menu as Menu2, useMenuActions as useMenuActions2 } from "@dxos/react-ui-menu";
684
- import { mx as mx4 } from "@dxos/ui-theme";
685
678
  var NAVBAR_NAME = "SimpleLayout.NavBar";
686
679
  var NavBar = ({ classNames, actions, onAction }) => {
687
680
  const menu = useMenuActions2(actions);
@@ -690,8 +683,7 @@ var NavBar = ({ classNames, actions, onAction }) => {
690
683
  alwaysActive: true,
691
684
  onAction
692
685
  }, /* @__PURE__ */ React6.createElement(Menu2.Toolbar, {
693
- density: "coarse",
694
- classNames: mx4(classNames)
686
+ density: "coarse"
695
687
  }));
696
688
  };
697
689
  NavBar.displayName = NAVBAR_NAME;
@@ -726,7 +718,7 @@ var Main = () => {
726
718
  const showNavBar = !keyboardOpen && !state.isPopover && state.drawerState === "closed";
727
719
  return /* @__PURE__ */ React7.createElement("div", {
728
720
  role: "none",
729
- className: mx5("h-full grid overflow-hidden bg-toolbar-surface", showNavBar ? "grid-rows-[var(--dx-rail-action)_1fr_var(--dx-toolbar-size)]" : "grid-rows-[var(--dx-rail-action)_1fr]"),
721
+ className: mx4("h-full grid overflow-hidden bg-toolbar-surface", showNavBar ? "grid-rows-[var(--dx-rail-action)_1fr_var(--dx-toolbar-size)]" : "grid-rows-[var(--dx-rail-action)_1fr]"),
730
722
  ...attentionAttrs
731
723
  }, /* @__PURE__ */ React7.createElement(AppBar, appBarProps), /* @__PURE__ */ React7.createElement("article", {
732
724
  className: "h-full overflow-hidden bg-base-surface"
@@ -755,13 +747,13 @@ import { Avatar as Avatar2, Icon as Icon2, Panel as Panel2, ScrollArea as Scroll
755
747
  import { Card as Card3 } from "@dxos/react-ui";
756
748
  import { Mosaic as Mosaic2 } from "@dxos/react-ui-mosaic";
757
749
  import { SearchList as SearchList2, useSearchListItem as useSearchListItem2, useSearchListResults as useSearchListResults2 } from "@dxos/react-ui-searchlist";
758
- import { mx as mx6 } from "@dxos/ui-theme";
750
+ import { mx as mx5 } from "@dxos/ui-theme";
759
751
  var NavBranch = ({ id }) => {
760
752
  const { t } = useTranslation5(meta.id);
761
753
  const { graph } = useAppGraph6();
762
754
  useExpandPath(id);
763
755
  const children = useConnections3(graph, id, "child");
764
- const visibleChildren = useMemo6(() => children.filter((node) => node.properties.disposition !== "alternate-tree"), [
756
+ const visibleChildren = useMemo6(() => children.filter((node) => node.properties.disposition !== "alternate-tree" && node.properties.disposition !== "hidden"), [
765
757
  children
766
758
  ]);
767
759
  const { results, handleSearch } = useSearchListResults2({
@@ -832,7 +824,7 @@ var NavBranchTile = (props) => {
832
824
  fullWidth: true,
833
825
  tabIndex: -1,
834
826
  "data-selected": isSelected,
835
- classNames: mx6("dx-focus-ring", isSelected && "bg-hover-overlay"),
827
+ classNames: mx5("dx-focus-ring", isSelected && "bg-hover-overlay"),
836
828
  onClick: handleSelect
837
829
  }, /* @__PURE__ */ React8.createElement(Card3.Toolbar, {
838
830
  density: "coarse"
@@ -841,7 +833,7 @@ var NavBranchTile = (props) => {
841
833
  icon: data.properties.icon,
842
834
  hueVariant: "transparent",
843
835
  variant: "square",
844
- size: 12,
836
+ size: 8,
845
837
  fallback: name
846
838
  }), /* @__PURE__ */ React8.createElement(Avatar2.Label, null, name), /* @__PURE__ */ React8.createElement(Icon2, {
847
839
  icon: "ph--caret-right--regular"
@@ -880,7 +872,7 @@ var useDrawerActions = (consumerName) => {
880
872
  const state = get(stateAtom);
881
873
  const { nodes, edges } = createCompanionActions(graph, stateAtom, get, {
882
874
  idPrefix: "drawer",
883
- selectedVariant: state.companionVariant,
875
+ selectedVariant: state.drawerState !== "closed" ? state.companionVariant : void 0,
884
876
  updateState
885
877
  });
886
878
  const gapSeparator = createGapSeparator("drawer-gap");
@@ -1078,9 +1070,7 @@ var Drawer = () => {
1078
1070
  ...menu,
1079
1071
  alwaysActive: true,
1080
1072
  onAction
1081
- }, /* @__PURE__ */ React10.createElement(Menu3.Toolbar, {
1082
- density: "coarse"
1083
- }))), /* @__PURE__ */ React10.createElement(Panel3.Content, {
1073
+ }, /* @__PURE__ */ React10.createElement(Menu3.Toolbar, null))), /* @__PURE__ */ React10.createElement(Panel3.Content, {
1084
1074
  asChild: true
1085
1075
  }, /* @__PURE__ */ React10.createElement(Surface4.Surface, {
1086
1076
  role: "article",
@@ -1160,4 +1150,4 @@ export {
1160
1150
  SimpleLayout,
1161
1151
  NavBranch
1162
1152
  };
1163
- //# sourceMappingURL=chunk-MDPEKLKR.mjs.map
1153
+ //# sourceMappingURL=chunk-2YSUM2L4.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/Home/Home.tsx", "../../../src/components/hooks.ts", "../../../src/components/SimpleLayout/SimpleLayout.tsx", "../../../src/hooks/useAppBarProps.ts", "../../../src/hooks/useCompanions.ts", "../../../src/hooks/actions.ts", "../../../src/hooks/useDrawerActions.ts", "../../../src/components/ContentLoading/ContentLoading.tsx", "../../../src/components/MobileLayout/MobileLayout.tsx", "../../../src/components/Popover/Popover.tsx", "../../../src/components/SimpleLayout/AppBar.tsx", "../../../src/components/SimpleLayout/Main.tsx", "../../../src/components/SimpleLayout/NavBar.tsx", "../../../src/components/NavBranch/NavBranch.tsx", "../../../src/hooks/useSimpleLayoutState.ts", "../../../src/hooks/useNavbarActions.ts", "../../../src/components/Dialog/Dialog.tsx", "../../../src/components/SimpleLayout/Drawer.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback, useEffect, useMemo, useRef } from 'react';\n\nimport { useOperationInvoker } from '@dxos/app-framework/ui';\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport { useAppGraph } from '@dxos/app-toolkit/ui';\nimport { Node, useConnections } from '@dxos/plugin-graph';\nimport { Avatar, Icon, Panel, ScrollArea, Toolbar, toLocalizedString, useTranslation } from '@dxos/react-ui';\nimport { Card } from '@dxos/react-ui';\nimport { Mosaic, type MosaicStackTileComponent } from '@dxos/react-ui-mosaic';\nimport { SearchList, useSearchListItem, useSearchListResults } from '@dxos/react-ui-searchlist';\nimport { mx } from '@dxos/ui-theme';\nimport { byPosition } from '@dxos/util';\n\nimport { meta } from '../../meta';\nimport { useExpandPath } from '../hooks';\n\nexport type HomeProps = {};\n\n/**\n * Home screen.\n */\nexport const Home = (_: HomeProps) => {\n const { t } = useTranslation(meta.id);\n const userAccountItem = useItemsByDisposition('user-account')[0];\n const pinnedItems = useItemsByDisposition('pin-end', true);\n const workspaceItems = useItemsByDisposition('workspace');\n useExpandPath(Node.RootId);\n\n const items = useMemo(\n () => [...(userAccountItem ? [userAccountItem] : []), ...pinnedItems, ...workspaceItems],\n [userAccountItem, pinnedItems, workspaceItems],\n );\n\n const { results, handleSearch } = useSearchListResults({\n items,\n extract: (node) => toLocalizedString(node.properties.label, t),\n });\n\n return (\n <SearchList.Root onSearch={handleSearch}>\n <Panel.Root>\n <Panel.Toolbar asChild>\n <Toolbar.Root>\n <SearchList.Input placeholder={t('search placeholder')} />\n </Toolbar.Root>\n </Panel.Toolbar>\n <Panel.Content asChild>\n <SearchList.Content>\n <Mosaic.Container asChild>\n <ScrollArea.Root orientation='vertical'>\n <ScrollArea.Viewport classNames='p-2'>\n <Mosaic.Stack items={results} getId={(node) => node.id} Tile={WorkspaceTile} />\n </ScrollArea.Viewport>\n </ScrollArea.Root>\n </Mosaic.Container>\n </SearchList.Content>\n </Panel.Content>\n </Panel.Root>\n </SearchList.Root>\n );\n};\n\nconst WorkspaceTile: MosaicStackTileComponent<Node.Node> = (props) => {\n const data = props.data;\n const { t } = useTranslation(meta.id);\n const { invokePromise } = useOperationInvoker();\n const { selectedValue, registerItem, unregisterItem } = useSearchListItem();\n const name = toLocalizedString(data.properties.label, t);\n const isSelected = selectedValue === data.id;\n const cardRef = useRef<HTMLDivElement>(null);\n\n useExpandPath(data.id);\n\n const handleSelect = useCallback(\n () => invokePromise(LayoutOperation.SwitchWorkspace, { subject: data.id }),\n [invokePromise, data.id],\n );\n\n // Register this workspace with the search context.\n useEffect(() => {\n if (cardRef.current) {\n registerItem(data.id, cardRef.current, handleSelect);\n }\n\n return () => unregisterItem(data.id);\n }, [data.id, handleSelect, registerItem, unregisterItem]);\n\n // Scroll into view when selected.\n useEffect(() => {\n if (isSelected && cardRef.current) {\n cardRef.current.scrollIntoView({ block: 'nearest', behavior: 'smooth' });\n }\n }, [isSelected]);\n\n return (\n <Card.Root\n role='button'\n fullWidth\n tabIndex={-1} // TODO(burdon): Use Mosaic.Focus.\n data-selected={isSelected}\n classNames={mx('dx-focus-ring', isSelected && 'bg-hover-overlay')}\n onClick={handleSelect}\n ref={cardRef}\n >\n <Card.Toolbar density='coarse'>\n <Avatar.Root>\n <Avatar.Content\n icon={data.properties.icon}\n hue={data.properties.hue}\n hueVariant='transparent'\n variant='square'\n size={8}\n fallback={name}\n />\n <Avatar.Label>{name}</Avatar.Label>\n <Icon icon='ph--caret-right--regular' />\n </Avatar.Root>\n </Card.Toolbar>\n </Card.Root>\n );\n};\n\n/** Filters nodes by disposition. */\nconst filterItems = (node: Node.Node, disposition: string) => {\n return node.properties.disposition === disposition;\n};\n\n/** Returns root-level items filtered by disposition. */\nconst useItemsByDisposition = (disposition: string, sort = false) => {\n const { graph } = useAppGraph();\n const connections = useConnections(graph, Node.RootId, 'child');\n const filtered = connections.filter((node) => filterItems(node, disposition));\n return sort ? filtered.toSorted((a, b) => byPosition(a.properties, b.properties)) : filtered;\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useEffect } from 'react';\n\nimport { expandAttendableId } from '@dxos/react-ui-attention';\nimport { useAppGraph } from '@dxos/app-toolkit/ui';\nimport { Graph } from '@dxos/plugin-graph';\n\n/**\n * Expand graph nodes along the full path from root to the given node ID.\n * Walks each progressive prefix, ensuring ancestor nodes are materialized\n * before attempting to access their children.\n */\nexport const useExpandPath = (nodeId?: string) => {\n const { graph } = useAppGraph();\n\n useEffect(() => {\n if (nodeId) {\n for (const prefix of expandAttendableId(nodeId)) {\n Graph.expand(graph, prefix, 'child');\n }\n }\n }, [nodeId, graph]);\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useEffect, useRef, useState } from 'react';\n\nimport { Splitter, type SplitterMode } from '@dxos/react-ui';\nimport { Mosaic } from '@dxos/react-ui-mosaic';\n\nimport { useSimpleLayoutState } from '../../hooks';\nimport { Dialog } from '../Dialog';\nimport { MobileLayout } from '../MobileLayout';\nimport { PopoverContent, PopoverRoot } from '../Popover';\n\nimport { Drawer } from './Drawer';\nimport { Main } from './Main';\n\n// TODO(burdon): Mobile/Desktop variance?\nexport const SimpleLayout = () => {\n const { state } = useSimpleLayoutState();\n const [keyboardOpen, setKeyboardOpen] = useState(false);\n const [splitterMode, setSplitterMode] = useState<SplitterMode>('upper');\n\n const drawerRef = useRef<HTMLDivElement>(null);\n useEffect(() => {\n if (keyboardOpen) {\n // Determine which panel has focus and expand that one.\n const activeElement = document.activeElement;\n const drawerHasFocus = drawerRef.current?.contains(activeElement);\n setSplitterMode(drawerHasFocus ? 'lower' : 'upper');\n } else {\n setSplitterMode(state.drawerState === 'closed' ? 'upper' : state.drawerState === 'open' ? 'both' : 'lower');\n }\n }, [state.drawerState, keyboardOpen]);\n\n return (\n <Mosaic.Root classNames='contents'>\n <MobileLayout.Root\n classNames='bg-toolbar-surface'\n onKeyboardOpenChange={(keyboardOpen: boolean) => setKeyboardOpen(keyboardOpen)}\n >\n <MobileLayout.Panel safe={{ top: true, bottom: splitterMode === 'upper' }}>\n <PopoverRoot>\n <Splitter.Root mode={splitterMode} ratio={0.55}>\n <Splitter.Panel position='upper'>\n <Main />\n </Splitter.Panel>\n <Splitter.Panel position='lower' ref={drawerRef}>\n <Drawer />\n </Splitter.Panel>\n </Splitter.Root>\n <Dialog />\n <PopoverContent />\n </PopoverRoot>\n </MobileLayout.Panel>\n </MobileLayout.Root>\n </Mosaic.Root>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Atom, useAtomValue } from '@effect-atom/atom-react';\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\nimport { useCallback, useMemo } from 'react';\n\nimport { useCapability, useOperationInvoker } from '@dxos/app-framework/ui';\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport { useAppGraph } from '@dxos/app-toolkit/ui';\nimport { Graph, Node, useActionRunner, useNode } from '@dxos/plugin-graph';\nimport { toLocalizedString, useTranslation } from '@dxos/react-ui';\nimport { type ActionGraphProps } from '@dxos/react-ui-menu';\n\nimport { type AppBarProps } from '../components';\nimport { meta } from '../meta';\nimport { SimpleLayoutState as SimpleLayoutStateCapability } from '../types';\n\n/**\n * Hook that computes all AppBar props from the app graph.\n * Derives activeId from state atom. Returns props ready to spread into the AppBar component.\n */\nexport const useAppBarProps = (): Omit<AppBarProps, 'classNames'> => {\n const { t } = useTranslation(meta.id);\n const stateAtom = useCapability(SimpleLayoutStateCapability);\n const state = useAtomValue(stateAtom);\n const { graph } = useAppGraph();\n const { invokeSync } = useOperationInvoker();\n const runAction = useActionRunner();\n\n // Derive activeId from state.\n const activeId = state.active ?? state.workspace;\n const node = useNode(graph, activeId);\n\n // Compute title from node label.\n const title = node ? toLocalizedString(node.properties.label, t) : undefined;\n\n // Build actions atom filtering by disposition.\n // Derive activeId from state atom so we don't need to recreate this atom when it changes.\n const actionsAtom = useMemo(\n () =>\n Atom.make((get): ActionGraphProps => {\n const state = get(stateAtom);\n const activeId = state.active ?? state.workspace;\n const allActions = activeId ? get(graph.actions(activeId)) : [];\n const filtered = allActions.filter((action) =>\n ['list-item', 'list-item-primary', 'heading-list-item'].includes(action.properties.disposition),\n );\n const nodes: ActionGraphProps['nodes'] = filtered as ActionGraphProps['nodes'];\n const edges: ActionGraphProps['edges'] = filtered.map((action) => ({\n source: 'root',\n target: action.id,\n relation: 'child',\n }));\n\n // Add alternate-tree action (e.g. Settings) from the workspace node.\n const workspaceConnections = state.workspace ? get(graph.connections(state.workspace, 'child')) : [];\n const alternateTreeNode = workspaceConnections.find(\n (node: Node.Node) => node.properties.disposition === 'alternate-tree',\n );\n if (alternateTreeNode && activeId !== alternateTreeNode.id) {\n const settingsAction = {\n id: `appbar-settings-${alternateTreeNode.id}`,\n type: Node.ActionType,\n data: () => Effect.sync(() => invokeSync(LayoutOperation.Open, { subject: [alternateTreeNode.id] })),\n properties: {\n label: alternateTreeNode.properties.label ?? alternateTreeNode.id,\n icon: alternateTreeNode.properties.icon ?? 'ph--placeholder--regular',\n },\n };\n nodes.push(settingsAction);\n edges.push({ source: 'root', target: settingsAction.id, relation: 'child' });\n }\n\n return { nodes, edges };\n }),\n [graph, stateAtom],\n );\n\n // Back button logic.\n const showBackButton = activeId !== undefined && activeId !== Node.RootId;\n\n const onBack = useCallback(() => {\n if (state.active) {\n const isWorkspace = Graph.getNode(graph, state.active).pipe(\n Option.map((node) => node.properties.disposition === 'workspace'),\n Option.getOrElse(() => false),\n );\n\n // If history is empty and this is a workspace, go to home.\n if (state.history.length === 0 && isWorkspace) {\n invokeSync(LayoutOperation.SwitchWorkspace, { subject: Node.RootId });\n } else {\n // Otherwise, close (which will pop from history or clear active).\n invokeSync(LayoutOperation.Close, { subject: [state.active] });\n }\n } else {\n invokeSync(LayoutOperation.SwitchWorkspace, { subject: Node.RootId });\n }\n }, [graph, invokeSync, state.active, state.history.length]);\n\n // Compute popover anchor ID.\n const popoverAnchorId = node && state.popoverAnchorId === `${meta.id}:${node.id}` ? state.popoverAnchorId : undefined;\n\n return {\n title,\n actions: actionsAtom,\n showBackButton,\n popoverAnchorId,\n onBack: onBack,\n onAction: runAction,\n };\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useMemo } from 'react';\n\nimport { useAppGraph } from '@dxos/app-toolkit/ui';\nimport { useConnections } from '@dxos/plugin-graph';\nimport { byPosition } from '@dxos/util';\n\nimport { PLANK_COMPANION_TYPE } from './actions';\n\n/**\n * @deprecated Adopt the pattern from useNavbarActions (deriving from graph atoms)\n * or merge the Drawer companion display into the NavBar component.\n */\nexport const useCompanions = (nodeId?: string) => {\n const { graph } = useAppGraph();\n const nodes = useConnections(graph, nodeId, 'child');\n const companions = nodes.filter((node) => node.type === PLANK_COMPANION_TYPE);\n return useMemo(() => companions.toSorted((a, b) => byPosition(a.properties, b.properties)), [companions]);\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Atom } from '@effect-atom/atom-react';\nimport * as Effect from 'effect/Effect';\n\nimport { type AppCapabilities, getCompanionVariant } from '@dxos/app-toolkit';\nimport { Node } from '@dxos/plugin-graph';\nimport { type ActionGraphProps } from '@dxos/react-ui-menu';\nimport { byPosition } from '@dxos/util';\n\nimport { type SimpleLayoutState } from '../types';\n\n// TODO(wittjosiah): Factor out to shared location with plugin-deck.\nexport const PLANK_COMPANION_TYPE = 'org.dxos.plugin.deck.plank-companion';\n\nexport type CompanionActionsConfig = {\n /** Prefix for companion action IDs (e.g. 'navbar' or 'drawer') */\n idPrefix: string;\n /** Optional: highlight companion with this variant */\n selectedVariant?: string;\n /** State updater for toggling the drawer. */\n updateState: (fn: (state: SimpleLayoutState) => SimpleLayoutState) => void;\n};\n\n/**\n * Creates action graph nodes and edges for companion actions.\n * Shared logic between useNavbarActions and useDrawerActions.\n */\n// TODO(burdon): Use builder pattern.\nexport const createCompanionActions = (\n graph: AppCapabilities.AppGraph['graph'],\n stateAtom: Atom.Atom<SimpleLayoutState>,\n get: (atom: Atom.Atom<any>) => any,\n config: CompanionActionsConfig,\n): Pick<ActionGraphProps, 'nodes' | 'edges'> => {\n const { idPrefix, selectedVariant, updateState } = config;\n\n // Derive activeId from state atom.\n const state = get(stateAtom);\n const activeId = state.active ?? state.workspace;\n\n // Get companions from graph connections for activeId.\n const activeConnections = activeId ? get(graph.connections(activeId, 'child')) : [];\n const companions = activeConnections\n .filter((node: Node.Node) => node.type === PLANK_COMPANION_TYPE)\n .toSorted((a: Node.Node, b: Node.Node) => byPosition(a.properties, b.properties));\n\n const nodes: ActionGraphProps['nodes'] = [];\n const edges: ActionGraphProps['edges'] = [];\n\n companions.forEach((companion: Node.Node) => {\n const companionVariant = getCompanionVariant(companion.id);\n const companionAction = {\n id: `${idPrefix}-companion-${companion.id}`,\n type: Node.ActionType,\n properties: {\n icon: companion.properties.icon ?? 'ph--placeholder--regular',\n label: companion.properties.label,\n iconOnly: true,\n ...(selectedVariant !== undefined && {\n variant: selectedVariant === companionVariant ? 'primary' : 'ghost',\n }),\n },\n data: () =>\n Effect.sync(() =>\n updateState((current) => {\n const closing = current.companionVariant === companionVariant && current.drawerState !== 'closed';\n return {\n ...current,\n companionVariant: closing ? undefined : companionVariant,\n drawerState: closing ? 'closed' : 'open',\n };\n }),\n ),\n };\n nodes.push(companionAction);\n edges.push({ source: 'root', target: companionAction.id, relation: 'child' });\n });\n\n return { nodes, edges };\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Atom } from '@effect-atom/atom-react';\nimport * as Effect from 'effect/Effect';\nimport { useMemo } from 'react';\n\nimport { useCapability } from '@dxos/app-framework/ui';\nimport { useAppGraph } from '@dxos/app-toolkit/ui';\nimport { Node, useActionRunner } from '@dxos/plugin-graph';\nimport { useTranslation } from '@dxos/react-ui';\nimport { type ActionExecutor, type ActionGraphProps, createGapSeparator } from '@dxos/react-ui-menu';\n\nimport { useMobileLayout } from '../components';\nimport { meta } from '../meta';\nimport { SimpleLayoutState as SimpleLayoutStateCapability } from '../types';\n\nimport { createCompanionActions } from './actions';\nimport { useSimpleLayoutState } from './useSimpleLayoutState';\n\nexport type DrawerActions = {\n /** Action graph atom for the drawer. */\n actions: Atom.Atom<ActionGraphProps>;\n /** Action executor callback. */\n onAction: ActionExecutor;\n};\n\n/**\n * Builds the drawer actions including companion tabs and toolbar buttons.\n */\nexport const useDrawerActions = (consumerName: string): DrawerActions => {\n const { t } = useTranslation(meta.id);\n const stateAtom = useCapability(SimpleLayoutStateCapability);\n const { graph } = useAppGraph();\n const runAction = useActionRunner();\n const { updateState } = useSimpleLayoutState();\n const { keyboardOpen } = useMobileLayout(consumerName);\n\n // Create a computed atom that derives everything from graph connections and state.\n const actionsAtom = useMemo(\n () =>\n Atom.make((get): ActionGraphProps => {\n // Derive drawer state from state atom.\n const state = get(stateAtom);\n\n // Add companion tab actions.\n const { nodes, edges } = createCompanionActions(graph, stateAtom, get, {\n idPrefix: 'drawer',\n selectedVariant: state.drawerState !== 'closed' ? state.companionVariant : undefined,\n updateState,\n });\n\n // Add gap separator before toolbar buttons.\n const gapSeparator = createGapSeparator('drawer-gap');\n nodes.push(...gapSeparator.nodes);\n edges.push(...gapSeparator.edges);\n\n // Add expand/collapse toggle button (hidden when keyboard is open).\n if (!keyboardOpen) {\n const isExpanded = state.drawerState === 'expanded';\n const toggleExpandAction = {\n id: 'drawer-toggle-expand',\n type: Node.ActionType,\n properties: {\n icon: isExpanded ? 'ph--arrow-down--regular' : 'ph--arrow-up--regular',\n label: isExpanded ? t('collapse drawer label') : t('expand drawer label'),\n iconOnly: true,\n },\n data: () =>\n Effect.sync(() => updateState((state) => ({ ...state, drawerState: isExpanded ? 'open' : 'expanded' }))),\n };\n nodes.push(toggleExpandAction);\n edges.push({ source: 'root', target: toggleExpandAction.id, relation: 'child' });\n }\n\n // Add close button.\n const closeAction = {\n id: 'drawer-close',\n type: Node.ActionType,\n properties: {\n icon: 'ph--x--regular',\n label: t('close drawer label'),\n iconOnly: true,\n },\n data: () =>\n Effect.sync(() =>\n updateState((state) => ({ ...state, drawerState: 'closed', companionVariant: undefined })),\n ),\n };\n nodes.push(closeAction);\n edges.push({ source: 'root', target: closeAction.id, relation: 'child' });\n\n return { nodes, edges };\n }),\n [graph, stateAtom, updateState, keyboardOpen, t],\n );\n\n return { actions: actionsAtom, onAction: runAction };\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\n// TODO(burdon): Show skeleton: https://github.com/dxos/dxos/issues/8259\nexport const ContentLoading = () => {\n return <div role='none' className='grid place-items-center dx-attention-surface' />;\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { createContext } from '@radix-ui/react-context';\nimport React, { type PropsWithChildren, forwardRef, useEffect, useState } from 'react';\n\nimport { addEventListener, combine } from '@dxos/async';\nimport { log } from '@dxos/log';\nimport { type ThemedClassName } from '@dxos/react-ui';\nimport { mx } from '@dxos/ui-theme';\n\n// TODO(burdon): Move into @dxos/react-ui?\n\nconst MOBILE_LAYOUT_NAME = 'MobileLayout';\nconst MOBILE_LAYOUT_ROOT_NAME = 'MobileLayout.Root';\nconst MOBILE_LAYOUT_PANEL_NAME = 'MobileLayout.Panel';\n\n//\n// Context\n//\n\ntype MobileLayoutContextValue = {\n keyboardOpen: boolean;\n};\n\nconst [MobileLayoutProvider, useMobileLayout] = createContext<MobileLayoutContextValue>(MOBILE_LAYOUT_NAME);\n\n//\n// Root\n//\n\ntype MobileLayoutRootProps = ThemedClassName<\n PropsWithChildren<{\n transition?: number;\n onKeyboardOpenChange?: (nextState: boolean) => void;\n }>\n>;\n\n/**\n * Mobile layout root container that handles iOS keyboard detection.\n */\n// TODO(burdon): Should this be ios-only?\nconst MobileLayoutRoot = forwardRef<HTMLDivElement, MobileLayoutRootProps>(\n ({ classNames, children, transition = 250, onKeyboardOpenChange, ...props }, forwardedRef) => {\n const { open: keyboardOpen } = useIOSKeyboard();\n useAutoScroll();\n useEffect(() => onKeyboardOpenChange?.(keyboardOpen), [onKeyboardOpenChange, keyboardOpen]);\n useLockBodyScroll(keyboardOpen);\n\n return (\n <MobileLayoutProvider keyboardOpen={keyboardOpen}>\n <div\n {...props}\n role='none'\n style={{\n transition: `h-size ${transition}ms ease-out`,\n blockSize: 'calc(100vh - var(--kb-height, 0px))',\n }}\n className={mx('absolute top-0 left-0 right-0 flex flex-col', classNames)}\n ref={forwardedRef}\n >\n {children}\n </div>\n </MobileLayoutProvider>\n );\n },\n);\n\nMobileLayoutRoot.displayName = MOBILE_LAYOUT_ROOT_NAME;\n\n//\n// Panel\n//\n\ntype MobileLayoutPanelProps = ThemedClassName<\n PropsWithChildren<{\n safe?: {\n top: boolean;\n bottom: boolean;\n };\n }>\n>;\n\n/**\n * Mobile layout panel that applies safe area insets.\n */\nconst MobileLayoutPanel = forwardRef<HTMLDivElement, MobileLayoutPanelProps>(\n ({ classNames, children, safe, ...props }, forwardedRef) => {\n return (\n <div\n {...props}\n role='none'\n style={{\n paddingTop: safe?.top ? 'env(safe-area-inset-top)' : undefined,\n paddingBottom: safe?.bottom ? `calc((1 - var(--kb-open, 0)) * env(safe-area-inset-bottom))` : undefined,\n }}\n className={mx('relative h-full flex flex-col overflow-hidden', classNames)}\n ref={forwardedRef}\n >\n {children}\n </div>\n );\n },\n);\n\nMobileLayoutPanel.displayName = MOBILE_LAYOUT_PANEL_NAME;\n\n//\n// Exports\n//\n\nexport const MobileLayout = {\n Root: MobileLayoutRoot,\n Panel: MobileLayoutPanel,\n};\n\nexport { useMobileLayout };\n\nexport type { MobileLayoutRootProps, MobileLayoutPanelProps };\n\n/**\n * Prevent auto-scroll when input is focused.\n */\nconst useAutoScroll = () => {\n useEffect(() => {\n // Prevent auto-scroll when input is focused.\n return addEventListener(\n document,\n 'focus',\n (event: FocusEvent) => {\n const target = event.target as HTMLElement;\n if (\n target.tagName === 'INPUT' ||\n target.tagName === 'TEXTAREA' ||\n (target.tagName === 'DIV' && target.isContentEditable)\n ) {\n // Prevent default focus behavior.\n event.preventDefault();\n\n // Manually focus without scroll.\n target.focus({ preventScroll: true });\n\n // Lock current scroll position.\n const scrollX = window.scrollX;\n const scrollY = window.scrollY;\n requestAnimationFrame(() => {\n window.scrollTo(scrollX, scrollY);\n });\n\n // TODO(burdon): Scroll to position in parent; this may need to be via an intent,\n // since it may be plugin-specific (e.g., codemirror document.)\n }\n },\n // Important: focus events don't bubble, so capture phase is required.\n { capture: true },\n );\n }, []);\n};\n\n/**\n * Prevent iOS Safari viewport scroll when enabled.\n * Setting overflow:hidden doesn't work on iOS, so we must preventDefault on touchmove events.\n * Only allows scrolling if the target is within a scrollable container.\n */\nconst useLockBodyScroll = (enabled: boolean) => {\n useEffect(() => {\n if (!enabled) {\n return;\n }\n\n const isScrollable = (el: HTMLElement | null, axis: 'x' | 'y'): boolean => {\n while (el && el !== document.body) {\n const style = getComputedStyle(el);\n if (axis === 'y') {\n const overflow = style.overflowY;\n if ((overflow === 'auto' || overflow === 'scroll') && el.scrollHeight > el.clientHeight) {\n return true;\n }\n } else {\n const overflow = style.overflowX;\n if ((overflow === 'auto' || overflow === 'scroll') && el.scrollWidth > el.clientWidth) {\n return true;\n }\n }\n\n el = el.parentElement;\n }\n\n return false;\n };\n\n let touchStartX = 0;\n let touchStartY = 0;\n\n return combine(\n // Record initial touch position.\n addEventListener(\n document,\n 'touchstart',\n (event: TouchEvent) => {\n const touch = event.touches[0];\n touchStartX = touch.clientX;\n touchStartY = touch.clientY;\n },\n { passive: true },\n ),\n\n // Prevent scrolling the viewport.\n addEventListener(\n document,\n 'touchmove',\n (event: TouchEvent) => {\n const touch = event.touches[0];\n const dx = Math.abs(touch.clientX - touchStartX);\n const dy = Math.abs(touch.clientY - touchStartY);\n if (!isScrollable(event.target as HTMLElement, dx > dy ? 'x' : 'y')) {\n event.preventDefault();\n }\n },\n { passive: false },\n ),\n );\n }, [enabled]);\n};\n\n//\n// Hooks\n//\n\ntype IOSKeyboard = {\n open: boolean;\n height: number;\n};\n\n/**\n * Mobile container that handles iOS keyboard layout adjustments.\n *\n * Uses two strategies for keyboard detection:\n * 1. Tauri iOS: Native keyboard plugin for reliable height/animation events.\n * 2. Web/PWA: visualViewport API as fallback.\n *\n * iPhone (portrait, points)\n * - Without predictive bar: ~291 pt\n * - With predictive bar: ~335 pt\n * - With accessory view: ~380–420 pt\n *\n * Example:\n * - Viewport: 874 (entire screen)\n * - SafeArea: 96 (62+34)\n * - Main: 778\n * - Keyboard: 318; 413 (incl. Input Accessory View)\n *\n * CSS Variables set on document.documentElement:\n * --vvh: Visual viewport height (use as container height).\n * --kb-height: Keyboard height in pixels.\n * --kb-open: 1 when keyboard is open, 0 when closed.\n *\n * NOTE: By default when an input is selected on iOS the Input Accessory View is shown above the keyboard.\n * This can be disabled by setting the `inputAccessoryView` property to `false`.\n *\n * On iOS (Tauri), listens for 'keyboard' CustomEvents dispatched by the native KeyboardObserver.swift.\n * Falls back to VisualViewport API on other platforms.\n */\nconst useIOSKeyboard = (): IOSKeyboard => {\n const [open, setOpen] = useState(false);\n const [height, setHeight] = useState(0);\n\n // Detect keybaord state.\n useEffect(() => {\n const viewport = window.visualViewport;\n if (!viewport) {\n return;\n }\n\n // Handler for VisualViewport resize (fallback for non-iOS).\n const initialHeight = viewport.height ?? window.innerHeight;\n\n const updateState = (keyboardHeight: number, keyboardOpen: boolean) => {\n setOpen(keyboardOpen);\n setHeight(keyboardHeight);\n\n const vvh = initialHeight - keyboardHeight;\n document.documentElement.style.setProperty('--vvh', `${vvh}px`);\n document.documentElement.style.setProperty('--kb-height', `${keyboardHeight}px`);\n document.documentElement.style.setProperty('--kb-open', keyboardOpen ? '1' : '0');\n log.info('viewport size', { initialHeight, vvh, keyboardHeight, keyboardOpen });\n };\n\n return combine(\n // Handler for native iOS keyboard events (from KeyboardObserver.swift).\n addEventListener(\n window,\n 'keyboard' as any,\n (event: CustomEvent<{ type: 'show' | 'hide'; height: number; duration: number }>) => {\n const { type, height } = event.detail;\n log.info('keyboard event', { type, height });\n updateState(height, type === 'show');\n },\n ),\n );\n }, []);\n\n return { open, height };\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { createContext } from '@radix-ui/react-context';\nimport React, { type PropsWithChildren, useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { Surface } from '@dxos/app-framework/ui';\n\nimport { Popover, type PopoverContentInteractOutsideEvent, toLocalizedString, useTranslation } from '@dxos/react-ui';\nimport { Card } from '@dxos/react-ui';\n\nimport { useSimpleLayoutState } from '../../hooks';\nimport { meta } from '../../meta';\n\nconst DEBOUNCE_DELAY = 40;\n\ntype LayoutPopoverContextValue = {\n setOpen: (open: boolean) => void;\n};\n\nconst [LayoutPopoverProvider, useLayoutPopoverContext] = createContext<LayoutPopoverContextValue>('LayoutPopover');\n\nexport const PopoverRoot = ({ children }: PropsWithChildren) => {\n const { state } = useSimpleLayoutState();\n const [open, setOpen] = useState(false);\n const virtualRef = useRef<HTMLButtonElement | null>(null);\n const [virtualIter, setVirtualIter] = useState(0);\n const debounceRef = useRef<NodeJS.Timeout | null>(null);\n\n // TODO(thure): This is a workaround for the race condition between displaying a Popover and either rendering\n // the anchor further down the tree or measuring the virtual trigger's client rect.\n useEffect(() => {\n setOpen(false);\n if (state.popoverOpen) {\n if (debounceRef.current) {\n clearTimeout(debounceRef.current);\n }\n if (state.popoverAnchor && virtualRef.current !== state.popoverAnchor) {\n virtualRef.current = state.popoverAnchor ?? null;\n setVirtualIter((iter) => iter + 1);\n }\n debounceRef.current = setTimeout(() => setOpen(true), DEBOUNCE_DELAY);\n }\n }, [state.popoverOpen, state.popoverAnchorId, state.popoverAnchor, state.popoverContent]);\n\n return (\n <LayoutPopoverProvider setOpen={setOpen}>\n <Popover.Root modal={false} open={open}>\n {state.popoverAnchor && <Popover.VirtualTrigger key={virtualIter} virtualRef={virtualRef} />}\n {children}\n </Popover.Root>\n </LayoutPopoverProvider>\n );\n};\n\nexport const PopoverContent = () => {\n const { t } = useTranslation(meta.id);\n const { state, updateState } = useSimpleLayoutState();\n const { setOpen } = useLayoutPopoverContext('PopoverContent');\n const handleClose = useCallback(() => {\n setOpen(false);\n updateState((s) => ({\n ...s,\n popoverOpen: false,\n popoverAnchor: undefined,\n popoverAnchorId: undefined,\n popoverSide: undefined,\n }));\n }, [setOpen, updateState]);\n\n const handleInteractOutside = useCallback(\n (event: KeyboardEvent | PopoverContentInteractOutsideEvent) => {\n if (\n // TODO(thure): CodeMirror should not focus itself when it updates.\n event.type === 'dismissableLayer.focusOutside' &&\n (event.currentTarget as HTMLElement | undefined)?.classList.contains('cm-content')\n ) {\n event.preventDefault();\n } else {\n handleClose();\n }\n },\n [handleClose],\n );\n\n const collisionBoundaries: HTMLElement[] = useMemo(() => {\n const closest = state.popoverAnchor?.closest('[data-popover-collision-boundary]') as HTMLElement | null | undefined;\n return closest ? [closest] : [];\n }, [state.popoverAnchor]);\n\n return (\n <Popover.Portal>\n <Popover.Content\n side={state.popoverSide}\n sticky='always'\n hideWhenDetached\n collisionBoundary={collisionBoundaries}\n onInteractOutside={handleInteractOutside}\n onEscapeKeyDown={handleInteractOutside}\n >\n <Popover.Viewport>\n {state.popoverKind === 'base' && <Surface.Surface role='popover' data={state.popoverContent} limit={1} />}\n {state.popoverKind === 'card' && (\n <Card.Root border={false} classNames='dx-card-popover'>\n <Card.Toolbar>\n {/* TODO(wittjosiah): Cleaner way to handle no drag handle in toolbar? */}\n <span />\n {state.popoverTitle ? <Card.Title>{toLocalizedString(state.popoverTitle, t)}</Card.Title> : <span />}\n <Card.CloseIconButton onClick={handleClose} />\n </Card.Toolbar>\n <Surface.Surface role='card--content' data={state.popoverContent} limit={1} />\n </Card.Root>\n )}\n </Popover.Viewport>\n <Popover.Arrow />\n </Popover.Content>\n </Popover.Portal>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Atom, useAtomValue } from '@effect-atom/atom-react';\nimport React, { Fragment } from 'react';\n\nimport { IconButton, Popover, type ThemedClassName, Toolbar, useTranslation } from '@dxos/react-ui';\nimport { type ActionExecutor, type ActionGraphProps, Menu, useMenuActions } from '@dxos/react-ui-menu';\nimport { mx, osTranslations } from '@dxos/ui-theme';\n\nimport { meta } from '../../meta';\nimport { useMobileLayout } from '../MobileLayout';\n\nconst APP_BAR_NAME = 'SimpleLayout.AppBar';\n\nexport type AppBarProps = ThemedClassName<{\n /** Title/label to display in the banner. */\n title?: string;\n /** Action graph atom for the dropdown menu. */\n actions: Atom.Atom<ActionGraphProps>;\n /** Whether to show the back button. */\n showBackButton?: boolean;\n /** Popover anchor ID for the dropdown trigger. */\n popoverAnchorId?: string;\n /** Action executor callback. */\n onAction?: ActionExecutor;\n /** Callback when back button is clicked. */\n onBack?: () => void;\n}>;\n\n/**\n * AppBar component that renders a title, optional back button, and actions dropdown.\n */\nexport const AppBar = ({\n classNames,\n title,\n actions,\n showBackButton,\n popoverAnchorId,\n onAction,\n onBack,\n}: AppBarProps) => {\n const { t } = useTranslation(meta.id);\n const menu = useMenuActions(actions);\n const actionsValue = useAtomValue(actions);\n const hasActions = actionsValue.nodes.length > 0;\n const { keyboardOpen } = useMobileLayout(APP_BAR_NAME);\n\n // Fall back to app name if no title provided.\n const displayTitle = title ?? t('current app name', { ns: osTranslations });\n\n // Wrap the menu trigger with Popover.Anchor when the popoverAnchorId is set.\n const AnchorRoot = popoverAnchorId ? Popover.Anchor : Fragment;\n\n return (\n <Toolbar.Root\n role='banner'\n classNames={mx(\n 'grid grid-cols-[var(--dx-rail-size)_1fr_var(--dx-rail-size)] items-center',\n 'dx-density-fine',\n classNames,\n )}\n >\n {keyboardOpen ? (\n <IconButton variant='ghost' icon='ph--x--regular' iconOnly label={t('done label')} />\n ) : showBackButton ? (\n <IconButton variant='ghost' icon='ph--caret-left--regular' iconOnly label={t('back label')} onClick={onBack} />\n ) : (\n <div />\n )}\n <h1 className='text-center truncate font-thin uppercase'>{displayTitle}</h1>\n {hasActions ? (\n <AnchorRoot>\n <Menu.Root {...menu} caller={meta.id} onAction={onAction}>\n <Menu.Trigger asChild>\n <IconButton\n variant='ghost'\n icon='ph--dots-three-vertical--regular'\n iconOnly\n label={t('actions menu label')}\n />\n </Menu.Trigger>\n <Menu.Content />\n </Menu.Root>\n </AnchorRoot>\n ) : (\n <span />\n )}\n </Toolbar.Root>\n );\n};\n\nAppBar.displayName = APP_BAR_NAME;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useMemo } from 'react';\n\nimport { Surface } from '@dxos/app-framework/ui';\nimport { useAppGraph } from '@dxos/app-toolkit/ui';\nimport { useNode } from '@dxos/plugin-graph';\nimport { ErrorFallback } from '@dxos/react-ui';\nimport { useAttentionAttributes } from '@dxos/react-ui-attention';\nimport { mx } from '@dxos/ui-theme';\n\nimport { useAppBarProps, useNavbarActions, useSimpleLayoutState } from '../../hooks';\nimport { ContentLoading } from '../ContentLoading';\nimport { useExpandPath } from '../hooks';\nimport { useMobileLayout } from '../MobileLayout';\n\nimport { AppBar } from './AppBar';\nimport { NavBar } from './NavBar';\n\nconst MAIN_NAME = 'SimpleLayout.Main';\n\n/**\n * Main content component.\n */\nexport const Main = () => {\n const { state } = useSimpleLayoutState();\n const id = state.active ?? state.workspace;\n const attentionAttrs = useAttentionAttributes(id);\n const { keyboardOpen } = useMobileLayout(MAIN_NAME);\n const { actions, onAction } = useNavbarActions();\n const appBarProps = useAppBarProps();\n\n const placeholder = useMemo(() => <ContentLoading />, []);\n\n const { graph } = useAppGraph();\n const node = useNode(graph, id);\n const data = useMemo(() => {\n return (\n node && {\n attendableId: id,\n subject: node.data,\n properties: node.properties,\n popoverAnchorId: state.popoverAnchorId,\n }\n );\n }, [id, node, node?.data, node?.properties, state.popoverAnchorId]);\n\n useExpandPath(id);\n\n // TODO(burdon): BUG: When showing ANY statusbar the size progressively shrinks when the keyboard opens/closes.\n const showNavBar = !keyboardOpen && !state.isPopover && state.drawerState === 'closed';\n\n return (\n <div\n role='none'\n className={mx(\n 'h-full grid overflow-hidden bg-toolbar-surface',\n showNavBar\n ? 'grid-rows-[var(--dx-rail-action)_1fr_var(--dx-toolbar-size)]'\n : 'grid-rows-[var(--dx-rail-action)_1fr]',\n )}\n {...attentionAttrs}\n >\n <AppBar {...appBarProps} />\n <article className='h-full overflow-hidden bg-base-surface'>\n <Surface.Surface\n key={id}\n role='article'\n data={data}\n limit={1}\n fallback={ErrorFallback}\n placeholder={placeholder}\n />\n </article>\n {showNavBar && <NavBar classNames='border-y border-subdued-separator' actions={actions} onAction={onAction} />}\n </div>\n );\n};\n\nMain.displayName = MAIN_NAME;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Atom } from '@effect-atom/atom-react';\nimport React from 'react';\n\nimport { type ActionExecutor, type ActionGraphProps, Menu, useMenuActions } from '@dxos/react-ui-menu';\nimport { type ThemedClassName } from '@dxos/react-ui';\n\nconst NAVBAR_NAME = 'SimpleLayout.NavBar';\n\nexport type NavBarProps = ThemedClassName<{\n /** Action graph atom for the toolbar. */\n actions: Atom.Atom<ActionGraphProps>;\n /** Action executor callback. */\n onAction?: ActionExecutor;\n}>;\n\n/**\n * Presentational navbar component that renders a toolbar from an action graph.\n */\nexport const NavBar = ({ classNames, actions, onAction }: NavBarProps) => {\n const menu = useMenuActions(actions);\n\n return (\n <Menu.Root {...menu} alwaysActive onAction={onAction}>\n <Menu.Toolbar density='coarse' />\n </Menu.Root>\n );\n};\n\nNavBar.displayName = NAVBAR_NAME;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback, useEffect, useMemo, useRef } from 'react';\n\nimport { useOperationInvoker } from '@dxos/app-framework/ui';\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport { useAppGraph } from '@dxos/app-toolkit/ui';\nimport { type Node, useConnections } from '@dxos/plugin-graph';\nimport { Avatar, Icon, Panel, ScrollArea, Toolbar, toLocalizedString, useTranslation } from '@dxos/react-ui';\nimport { Card } from '@dxos/react-ui';\nimport { Mosaic, type MosaicStackTileComponent } from '@dxos/react-ui-mosaic';\nimport { SearchList, useSearchListItem, useSearchListResults } from '@dxos/react-ui-searchlist';\nimport { mx } from '@dxos/ui-theme';\n\nimport { meta } from '../../meta';\nimport { useExpandPath } from '../hooks';\n\nexport type NavBranchProps = {\n id: string;\n};\n\n/**\n * Renders the children of a graph branch node as a searchable mosaic list.\n * Used for any node with `role: 'branch'` or a workspace disposition, including\n * spaces, collection sections, type sections, and schema nodes.\n */\nexport const NavBranch = ({ id }: NavBranchProps) => {\n const { t } = useTranslation(meta.id);\n const { graph } = useAppGraph();\n\n useExpandPath(id);\n\n const children = useConnections(graph, id, 'child');\n\n // TODO(wittjosiah): Move alternate-tree nodes to a non-child relation so they don't need filtering.\n const visibleChildren = useMemo(\n () =>\n children.filter(\n (node) => node.properties.disposition !== 'alternate-tree' && node.properties.disposition !== 'hidden',\n ),\n [children],\n );\n\n const { results, handleSearch } = useSearchListResults({\n items: visibleChildren,\n extract: (child) => toLocalizedString(child.properties.label, t),\n });\n\n return (\n <SearchList.Root onSearch={handleSearch}>\n <Panel.Root>\n <Panel.Toolbar asChild>\n <Toolbar.Root>\n {/* TODO(wittjosiah): Search should be pluggable. Must support searching via ECHO query inside a space. */}\n <SearchList.Input placeholder={t('search placeholder')} autoFocus />\n </Toolbar.Root>\n </Panel.Toolbar>\n <Panel.Content asChild>\n <SearchList.Content>\n <Mosaic.Container asChild>\n <ScrollArea.Root orientation='vertical'>\n <ScrollArea.Viewport classNames='p-2'>\n <Mosaic.Stack items={results} getId={(child) => child.id} Tile={NavBranchTile} />\n </ScrollArea.Viewport>\n </ScrollArea.Root>\n </Mosaic.Container>\n </SearchList.Content>\n </Panel.Content>\n </Panel.Root>\n </SearchList.Root>\n );\n};\n\nconst NavBranchTile: MosaicStackTileComponent<Node.Node> = (props) => {\n const data = props.data;\n const { t } = useTranslation(meta.id);\n const { invokeSync } = useOperationInvoker();\n const ref = useRef<HTMLDivElement>(null);\n const { selectedValue, registerItem, unregisterItem } = useSearchListItem();\n const isSelected = selectedValue === data.id;\n\n const name = toLocalizedString(data.properties.label, t);\n\n const handleSelect = useCallback(\n () => invokeSync(LayoutOperation.Open, { subject: [data.id] }),\n [invokeSync, data.id],\n );\n\n // Register this item with the search context.\n useEffect(() => {\n if (ref.current) {\n registerItem(data.id, ref.current, handleSelect);\n }\n\n return () => unregisterItem(data.id);\n }, [data.id, handleSelect, registerItem, unregisterItem]);\n\n // Scroll into view when selected.\n useEffect(() => {\n if (isSelected && ref.current) {\n ref.current.scrollIntoView({ block: 'nearest', behavior: 'smooth' });\n }\n }, [isSelected]);\n\n return (\n <Card.Root\n ref={ref}\n role='button'\n fullWidth\n tabIndex={-1} // TODO(burdon): Use Mosaic.Focus.\n data-selected={isSelected}\n classNames={mx('dx-focus-ring', isSelected && 'bg-hover-overlay')}\n onClick={handleSelect}\n >\n <Card.Toolbar density='coarse'>\n <Avatar.Root>\n <Avatar.Content\n hue={data.properties.hue}\n icon={data.properties.icon}\n hueVariant='transparent'\n variant='square'\n size={8}\n fallback={name}\n />\n <Avatar.Label>{name}</Avatar.Label>\n <Icon icon='ph--caret-right--regular' />\n </Avatar.Root>\n </Card.Toolbar>\n </Card.Root>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { RegistryContext, useAtomValue } from '@effect-atom/atom-react';\nimport { useCallback, useContext } from 'react';\n\nimport { useCapability } from '@dxos/app-framework/ui';\n\nimport { SimpleLayoutState } from '../types';\n\nexport type UseSimpleLayoutState = {\n state: SimpleLayoutState;\n updateState: (fn: (current: SimpleLayoutState) => SimpleLayoutState) => void;\n};\n\nexport const useSimpleLayoutState = (): UseSimpleLayoutState => {\n const registry = useContext(RegistryContext);\n const stateAtom = useCapability(SimpleLayoutState);\n const state = useAtomValue(stateAtom);\n\n const updateState = useCallback(\n (fn: (current: SimpleLayoutState) => SimpleLayoutState) => {\n registry.set(stateAtom, fn(registry.get(stateAtom)));\n },\n [registry, stateAtom],\n );\n\n return { state, updateState };\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Atom } from '@effect-atom/atom-react';\nimport { useMemo } from 'react';\n\nimport { useCapability } from '@dxos/app-framework/ui';\nimport { useAppGraph } from '@dxos/app-toolkit/ui';\nimport { Node, useActionRunner } from '@dxos/plugin-graph';\nimport { useTranslation } from '@dxos/react-ui';\nimport {\n type ActionExecutor,\n type ActionGraphProps,\n createGapSeparator,\n createMenuItemGroup,\n} from '@dxos/react-ui-menu';\n\nimport { meta } from '../meta';\nimport { SimpleLayoutState } from '../types';\n\nimport { createCompanionActions } from './actions';\nimport { useSimpleLayoutState } from './useSimpleLayoutState';\n\nconst MAIN_MENU_GROUP_ID = 'navbar-main-menu';\n\nexport type NavbarActions = {\n /** Action graph atom for the navbar. */\n actions: Atom.Atom<ActionGraphProps>;\n /** Action executor callback. */\n onAction: ActionExecutor;\n};\n\n/**\n * Builds the navbar actions including companion icons, separator, and main menu dropdown.\n * Derives everything from graph connection atoms for proper reactivity.\n */\nexport const useNavbarActions = (): NavbarActions => {\n const { t } = useTranslation(meta.id);\n const { graph } = useAppGraph();\n const runAction = useActionRunner();\n const stateAtom = useCapability(SimpleLayoutState);\n const { updateState } = useSimpleLayoutState();\n\n // Create a computed atom that derives everything from graph connections and state.\n const actionsAtom = useMemo(\n () =>\n Atom.make((get): ActionGraphProps => {\n // Add companion actions.\n const { nodes, edges } = createCompanionActions(graph, stateAtom, get, {\n idPrefix: 'navbar',\n updateState,\n });\n\n // Add gap separator.\n const gapSeparator = createGapSeparator('navbar-gap');\n nodes.push(...gapSeparator.nodes);\n edges.push(...gapSeparator.edges);\n\n // Add main menu dropdown group.\n const mainMenuGroup = createMenuItemGroup(MAIN_MENU_GROUP_ID, {\n variant: 'dropdownMenu',\n icon: 'ph--list--regular',\n iconOnly: true,\n label: t('main menu label'),\n testId: 'simpleLayoutPlugin.addSpace',\n });\n nodes.push(mainMenuGroup);\n edges.push({ source: 'root', target: mainMenuGroup.id, relation: 'child' });\n\n // Get menu actions from root actions (on 'action' edge relation).\n const rootActions = get(graph.actions(Node.RootId));\n const menuActions = rootActions.filter((node) => node.properties.disposition === 'menu');\n\n // Add menu actions as children of the dropdown group.\n menuActions.forEach((menuAction) => {\n nodes.push(menuAction as ActionGraphProps['nodes'][number]);\n edges.push({ source: MAIN_MENU_GROUP_ID, target: menuAction.id, relation: 'child' });\n });\n\n return { nodes, edges };\n }),\n [graph, stateAtom, updateState, t],\n );\n\n return { actions: actionsAtom, onAction: runAction };\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Surface } from '@dxos/app-framework/ui';\nimport { AlertDialog, Dialog as NaturalDialog } from '@dxos/react-ui';\nimport { ErrorFallback } from '@dxos/react-ui';\n\nimport { useSimpleLayoutState } from '../../hooks';\n\nexport const Dialog = () => {\n const { state, updateState } = useSimpleLayoutState();\n\n const DialogRoot = state.dialogType === 'alert' ? AlertDialog.Root : NaturalDialog.Root;\n const DialogOverlay = state.dialogType === 'alert' ? AlertDialog.Overlay : NaturalDialog.Overlay;\n\n return (\n <DialogRoot\n modal={state.dialogBlockAlign !== 'end'}\n open={state.dialogOpen}\n onOpenChange={(nextOpen) => updateState((state) => ({ ...state, dialogOpen: nextOpen }))}\n >\n {state.dialogBlockAlign === 'end' ? (\n <Surface.Surface role='dialog' data={state.dialogContent} limit={1} fallback={ErrorFallback} />\n ) : (\n <DialogOverlay\n blockAlign={state.dialogBlockAlign}\n classNames={state.dialogOverlayClasses}\n style={state.dialogOverlayStyle}\n >\n <Surface.Surface role='dialog' data={state.dialogContent} limit={1} fallback={ErrorFallback} />\n </DialogOverlay>\n )}\n </DialogRoot>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useMemo } from 'react';\n\nimport { Surface } from '@dxos/app-framework/ui';\nimport { getCompanionVariant } from '@dxos/app-toolkit';\nimport { useAppGraph } from '@dxos/app-toolkit/ui';\nimport { type Node, useNode } from '@dxos/plugin-graph';\nimport { ErrorFallback, Panel } from '@dxos/react-ui';\nimport { Menu, useMenuActions } from '@dxos/react-ui-menu';\n\nimport { useCompanions, useDrawerActions, useSimpleLayoutState } from '../../hooks';\nimport { ContentLoading } from '../ContentLoading';\n\nconst DRAWER_NAME = 'SimpleLayout.Drawer';\n\n/**\n * Companion drawer component.\n */\nexport const Drawer = () => {\n const { graph } = useAppGraph();\n const { state: layoutState } = useSimpleLayoutState();\n\n const placeholder = useMemo(() => <ContentLoading />, []);\n\n // Get all companions for the current active (primary) item.\n const activeId = layoutState.active ?? layoutState.workspace;\n const companions = useCompanions(activeId);\n const { companionId, variant } = useSelectedCompanion(companions, layoutState.companionVariant);\n\n // Get node for the selected companion.\n const node = useNode(graph, companionId);\n const parentNode = useNode(graph, activeId);\n\n // Build Surface data for the companion content.\n const data = useMemo(() => {\n return (\n node && {\n attendableId: companionId,\n subject: node.data,\n companionTo: parentNode?.data,\n properties: node.properties,\n variant,\n }\n );\n }, [companionId, node, parentNode, variant]);\n\n // Get drawer actions (tabs + toolbar buttons).\n const { actions, onAction } = useDrawerActions(DRAWER_NAME);\n const menu = useMenuActions(actions);\n\n return (\n <Panel.Root>\n <Panel.Toolbar>\n <Menu.Root {...menu} alwaysActive onAction={onAction}>\n <Menu.Toolbar />\n </Menu.Root>\n </Panel.Toolbar>\n <Panel.Content asChild>\n <Surface.Surface role='article' data={data} limit={1} fallback={ErrorFallback} placeholder={placeholder} />\n </Panel.Content>\n </Panel.Root>\n );\n};\n\nDrawer.displayName = DRAWER_NAME;\n\n/**\n * Resolves which companion to show based on variant preference.\n * Falls back to first available if preferred variant not available.\n */\nconst useSelectedCompanion = (companions: Node.Node[], preferredVariant?: string) => {\n const selectedCompanion = useMemo(() => {\n if (companions.length === 0) {\n return undefined;\n }\n\n // Try to find companion matching the preferred variant.\n if (preferredVariant) {\n const preferred = companions.find((c) => getCompanionVariant(c.id) === preferredVariant);\n if (preferred) {\n return preferred;\n }\n }\n\n // Fallback to first companion.\n return companions[0];\n }, [companions, preferredVariant]);\n\n const companionId = selectedCompanion?.id;\n const variant = companionId ? getCompanionVariant(companionId) : undefined;\n\n return { selectedCompanion, companionId, variant };\n};\n"],
5
+ "mappings": ";;;;;;AAIA,OAAOA,SAASC,aAAaC,aAAAA,YAAWC,SAASC,cAAc;AAE/D,SAASC,2BAA2B;AACpC,SAASC,uBAAuB;AAChC,SAASC,eAAAA,oBAAmB;AAC5B,SAASC,MAAMC,sBAAsB;AACrC,SAASC,QAAQC,MAAMC,OAAOC,YAAYC,SAASC,mBAAmBC,sBAAsB;AAC5F,SAASC,YAAY;AACrB,SAASC,cAA6C;AACtD,SAASC,YAAYC,mBAAmBC,4BAA4B;AACpE,SAASC,UAAU;AACnB,SAASC,kBAAkB;;;ACX3B,SAASC,iBAAiB;AAE1B,SAASC,0BAA0B;AACnC,SAASC,mBAAmB;AAC5B,SAASC,aAAa;AAOf,IAAMC,gBAAgB,CAACC,WAAAA;AAC5B,QAAM,EAAEC,MAAK,IAAKC,YAAAA;AAElBC,YAAU,MAAA;AACR,QAAIH,QAAQ;AACV,iBAAWI,UAAUC,mBAAmBL,MAAAA,GAAS;AAC/CM,cAAMC,OAAON,OAAOG,QAAQ,OAAA;MAC9B;IACF;EACF,GAAG;IAACJ;IAAQC;GAAM;AACpB;;;ADAO,IAAMO,OAAO,CAACC,MAAAA;AACnB,QAAM,EAAEC,EAAC,IAAKC,eAAeC,KAAKC,EAAE;AACpC,QAAMC,kBAAkBC,sBAAsB,cAAA,EAAgB,CAAA;AAC9D,QAAMC,cAAcD,sBAAsB,WAAW,IAAA;AACrD,QAAME,iBAAiBF,sBAAsB,WAAA;AAC7CG,gBAAcC,KAAKC,MAAM;AAEzB,QAAMC,QAAQC,QACZ,MAAM;OAAKR,kBAAkB;MAACA;QAAmB,CAAA;OAAQE;OAAgBC;KACzE;IAACH;IAAiBE;IAAaC;GAAe;AAGhD,QAAM,EAAEM,SAASC,aAAY,IAAKC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;AACLN,sBAAgBN,MAAMe,gBAAgB,WAAW,UAAUf,MAAMe,gBAAgB,SAAS,SAAS,OAAA;IACrG;EACF,GAAG;IAACf,MAAMe;IAAab;GAAa;AAEpC,SACE,gBAAAc,QAAA,cAACC,QAAOC,MAAI;IAACC,YAAW;KACtB,gBAAAH,QAAA,cAACI,aAAaF,MAAI;IAChBC,YAAW;IACXE,sBAAsB,CAACnB,kBAA0BC,gBAAgBD,aAAAA;KAEjE,gBAAAc,QAAA,cAACI,aAAaE,OAAK;IAACC,MAAM;MAAEC,KAAK;MAAMC,QAAQpB,iBAAiB;IAAQ;KACtE,gBAAAW,QAAA,cAACU,aAAAA,MACC,gBAAAV,QAAA,cAACW,SAAST,MAAI;IAACU,MAAMvB;IAAcwB,OAAO;KACxC,gBAAAb,QAAA,cAACW,SAASL,OAAK;IAACQ,UAAS;KACvB,gBAAAd,QAAA,cAACe,MAAAA,IAAAA,CAAAA,GAEH,gBAAAf,QAAA,cAACW,SAASL,OAAK;IAACQ,UAAS;IAAQE,KAAKzB;KACpC,gBAAAS,QAAA,cAACiB,QAAAA,IAAAA,CAAAA,CAAAA,GAGL,gBAAAjB,QAAA,cAACkB,QAAAA,IAAAA,GACD,gBAAAlB,QAAA,cAACmB,gBAAAA,IAAAA,CAAAA,CAAAA,CAAAA,CAAAA;AAMb;",
6
+ "names": ["React", "useCallback", "useEffect", "useMemo", "useRef", "useOperationInvoker", "LayoutOperation", "useAppGraph", "Node", "useConnections", "Avatar", "Icon", "Panel", "ScrollArea", "Toolbar", "toLocalizedString", "useTranslation", "Card", "Mosaic", "SearchList", "useSearchListItem", "useSearchListResults", "mx", "byPosition", "useEffect", "expandAttendableId", "useAppGraph", "Graph", "useExpandPath", "nodeId", "graph", "useAppGraph", "useEffect", "prefix", "expandAttendableId", "Graph", "expand", "Home", "_", "t", "useTranslation", "meta", "id", "userAccountItem", "useItemsByDisposition", "pinnedItems", "workspaceItems", "useExpandPath", "Node", "RootId", "items", "useMemo", "results", "handleSearch", "useSearchListResults", "extract", "node", "toLocalizedString", "properties", "label", "SearchList", "Root", "onSearch", "Panel", "Toolbar", "asChild", "Input", "placeholder", "Content", "Mosaic", "Container", "ScrollArea", "orientation", "Viewport", "classNames", "Stack", "getId", "Tile", "WorkspaceTile", "props", "data", "invokePromise", "useOperationInvoker", "selectedValue", "registerItem", "unregisterItem", "useSearchListItem", "name", "isSelected", "cardRef", "useRef", "handleSelect", "useCallback", "LayoutOperation", "SwitchWorkspace", "subject", "useEffect", "current", "scrollIntoView", "block", "behavior", "Card", "role", "fullWidth", "tabIndex", "data-selected", "mx", "onClick", "ref", "density", "Avatar", "icon", "hue", "hueVariant", "variant", "size", "fallback", "Label", "Icon", "filterItems", "disposition", "sort", "graph", "useAppGraph", "connections", "useConnections", "filtered", "filter", "toSorted", "a", "b", "byPosition", "React", "useEffect", "useRef", "useState", "Splitter", "Mosaic", "Atom", "useAtomValue", "Effect", "Option", "useCallback", "useMemo", "useCapability", "useOperationInvoker", "LayoutOperation", "useAppGraph", "Graph", "Node", "useActionRunner", "useNode", "toLocalizedString", "useTranslation", "useAppBarProps", "t", "useTranslation", "meta", "id", "stateAtom", "useCapability", "SimpleLayoutStateCapability", "state", "useAtomValue", "graph", "useAppGraph", "invokeSync", "useOperationInvoker", "runAction", "useActionRunner", "activeId", "active", "workspace", "node", "useNode", "title", "toLocalizedString", "properties", "label", "undefined", "actionsAtom", "useMemo", "Atom", "make", "get", "allActions", "actions", "filtered", "filter", "action", "includes", "disposition", "nodes", "edges", "map", "source", "target", "relation", "workspaceConnections", "connections", "alternateTreeNode", "find", "settingsAction", "type", "Node", "ActionType", "data", "sync", "LayoutOperation", "Open", "subject", "icon", "push", "showBackButton", "RootId", "onBack", "useCallback", "isWorkspace", "Graph", "getNode", "pipe", "getOrElse", "history", "length", "SwitchWorkspace", "Close", "popoverAnchorId", "onAction", "useMemo", "useAppGraph", "useConnections", "byPosition", "Effect", "getCompanionVariant", "Node", "byPosition", "PLANK_COMPANION_TYPE", "createCompanionActions", "graph", "stateAtom", "get", "config", "idPrefix", "selectedVariant", "updateState", "state", "activeId", "active", "workspace", "activeConnections", "connections", "companions", "filter", "node", "type", "toSorted", "a", "b", "byPosition", "properties", "nodes", "edges", "forEach", "companion", "companionVariant", "getCompanionVariant", "id", "companionAction", "Node", "ActionType", "icon", "label", "iconOnly", "undefined", "variant", "data", "sync", "current", "closing", "drawerState", "push", "source", "target", "relation", "useCompanions", "nodeId", "graph", "useAppGraph", "nodes", "useConnections", "companions", "filter", "node", "type", "PLANK_COMPANION_TYPE", "useMemo", "toSorted", "a", "b", "byPosition", "properties", "Atom", "Effect", "useMemo", "useCapability", "useAppGraph", "Node", "useActionRunner", "useTranslation", "createGapSeparator", "React", "ContentLoading", "React", "div", "role", "className", "createContext", "React", "forwardRef", "useEffect", "useState", "addEventListener", "combine", "log", "mx", "MOBILE_LAYOUT_NAME", "MOBILE_LAYOUT_ROOT_NAME", "MOBILE_LAYOUT_PANEL_NAME", "MobileLayoutProvider", "useMobileLayout", "MobileLayoutRoot", "classNames", "children", "transition", "onKeyboardOpenChange", "props", "forwardedRef", "open", "keyboardOpen", "useIOSKeyboard", "useAutoScroll", "useLockBodyScroll", "div", "role", "style", "blockSize", "className", "ref", "displayName", "MobileLayoutPanel", "safe", "paddingTop", "top", "undefined", "paddingBottom", "bottom", "MobileLayout", "Root", "Panel", "useAutoScroll", "useEffect", "addEventListener", "document", "event", "target", "tagName", "isContentEditable", "preventDefault", "focus", "preventScroll", "scrollX", "window", "scrollY", "requestAnimationFrame", "scrollTo", "capture", "useLockBodyScroll", "enabled", "isScrollable", "el", "axis", "body", "style", "getComputedStyle", "overflow", "overflowY", "scrollHeight", "clientHeight", "overflowX", "scrollWidth", "clientWidth", "parentElement", "touchStartX", "touchStartY", "combine", "touch", "touches", "clientX", "clientY", "passive", "dx", "Math", "abs", "dy", "useIOSKeyboard", "open", "setOpen", "useState", "height", "setHeight", "viewport", "visualViewport", "initialHeight", "innerHeight", "updateState", "keyboardHeight", "keyboardOpen", "vvh", "documentElement", "setProperty", "log", "info", "type", "detail", "createContext", "React", "useCallback", "useEffect", "useMemo", "useRef", "useState", "Surface", "Popover", "toLocalizedString", "useTranslation", "Card", "DEBOUNCE_DELAY", "LayoutPopoverProvider", "useLayoutPopoverContext", "createContext", "PopoverRoot", "children", "state", "useSimpleLayoutState", "open", "setOpen", "useState", "virtualRef", "useRef", "virtualIter", "setVirtualIter", "debounceRef", "useEffect", "popoverOpen", "current", "clearTimeout", "popoverAnchor", "iter", "setTimeout", "popoverAnchorId", "popoverContent", "React", "Popover", "Root", "modal", "VirtualTrigger", "key", "PopoverContent", "t", "useTranslation", "meta", "id", "updateState", "handleClose", "useCallback", "s", "undefined", "popoverSide", "handleInteractOutside", "event", "type", "currentTarget", "classList", "contains", "preventDefault", "collisionBoundaries", "useMemo", "closest", "Portal", "Content", "side", "sticky", "hideWhenDetached", "collisionBoundary", "onInteractOutside", "onEscapeKeyDown", "Viewport", "popoverKind", "Surface", "role", "data", "limit", "Card", "border", "classNames", "Toolbar", "span", "popoverTitle", "Title", "toLocalizedString", "CloseIconButton", "onClick", "Arrow", "useAtomValue", "React", "Fragment", "IconButton", "Popover", "Toolbar", "useTranslation", "Menu", "useMenuActions", "mx", "osTranslations", "APP_BAR_NAME", "AppBar", "classNames", "title", "actions", "showBackButton", "popoverAnchorId", "onAction", "onBack", "t", "useTranslation", "meta", "id", "menu", "useMenuActions", "actionsValue", "useAtomValue", "hasActions", "nodes", "length", "keyboardOpen", "useMobileLayout", "displayTitle", "ns", "osTranslations", "AnchorRoot", "Popover", "Anchor", "Fragment", "React", "Toolbar", "Root", "role", "mx", "IconButton", "variant", "icon", "iconOnly", "label", "onClick", "div", "h1", "className", "Menu", "caller", "Trigger", "asChild", "Content", "span", "displayName", "React", "useMemo", "Surface", "useAppGraph", "useNode", "ErrorFallback", "useAttentionAttributes", "mx", "React", "Menu", "useMenuActions", "NAVBAR_NAME", "NavBar", "classNames", "actions", "onAction", "menu", "useMenuActions", "React", "Menu", "Root", "alwaysActive", "Toolbar", "density", "displayName", "MAIN_NAME", "Main", "state", "useSimpleLayoutState", "id", "active", "workspace", "attentionAttrs", "useAttentionAttributes", "keyboardOpen", "useMobileLayout", "actions", "onAction", "useNavbarActions", "appBarProps", "useAppBarProps", "placeholder", "useMemo", "React", "ContentLoading", "graph", "useAppGraph", "node", "useNode", "data", "attendableId", "subject", "properties", "popoverAnchorId", "useExpandPath", "showNavBar", "isPopover", "drawerState", "div", "role", "className", "mx", "AppBar", "article", "Surface", "key", "limit", "fallback", "ErrorFallback", "NavBar", "classNames", "displayName", "React", "useCallback", "useEffect", "useMemo", "useRef", "useOperationInvoker", "LayoutOperation", "useAppGraph", "useConnections", "Avatar", "Icon", "Panel", "ScrollArea", "Toolbar", "toLocalizedString", "useTranslation", "Card", "Mosaic", "SearchList", "useSearchListItem", "useSearchListResults", "mx", "NavBranch", "id", "t", "useTranslation", "meta", "graph", "useAppGraph", "useExpandPath", "children", "useConnections", "visibleChildren", "useMemo", "filter", "node", "properties", "disposition", "results", "handleSearch", "useSearchListResults", "items", "extract", "child", "toLocalizedString", "label", "React", "SearchList", "Root", "onSearch", "Panel", "Toolbar", "asChild", "Input", "placeholder", "autoFocus", "Content", "Mosaic", "Container", "ScrollArea", "orientation", "Viewport", "classNames", "Stack", "getId", "Tile", "NavBranchTile", "props", "data", "invokeSync", "useOperationInvoker", "ref", "useRef", "selectedValue", "registerItem", "unregisterItem", "useSearchListItem", "isSelected", "name", "handleSelect", "useCallback", "LayoutOperation", "Open", "subject", "useEffect", "current", "scrollIntoView", "block", "behavior", "Card", "role", "fullWidth", "tabIndex", "data-selected", "mx", "onClick", "density", "Avatar", "hue", "icon", "hueVariant", "variant", "size", "fallback", "Label", "Icon", "RegistryContext", "useAtomValue", "useCallback", "useContext", "useCapability", "useSimpleLayoutState", "registry", "useContext", "RegistryContext", "stateAtom", "useCapability", "SimpleLayoutState", "state", "useAtomValue", "updateState", "useCallback", "fn", "set", "get", "useDrawerActions", "consumerName", "t", "useTranslation", "meta", "id", "stateAtom", "useCapability", "SimpleLayoutStateCapability", "graph", "useAppGraph", "runAction", "useActionRunner", "updateState", "useSimpleLayoutState", "keyboardOpen", "useMobileLayout", "actionsAtom", "useMemo", "Atom", "make", "get", "state", "nodes", "edges", "createCompanionActions", "idPrefix", "selectedVariant", "drawerState", "companionVariant", "undefined", "gapSeparator", "createGapSeparator", "push", "isExpanded", "toggleExpandAction", "type", "Node", "ActionType", "properties", "icon", "label", "iconOnly", "data", "sync", "source", "target", "relation", "closeAction", "actions", "onAction", "Atom", "useMemo", "useCapability", "useAppGraph", "Node", "useActionRunner", "useTranslation", "createGapSeparator", "createMenuItemGroup", "MAIN_MENU_GROUP_ID", "useNavbarActions", "t", "useTranslation", "meta", "id", "graph", "useAppGraph", "runAction", "useActionRunner", "stateAtom", "useCapability", "SimpleLayoutState", "updateState", "useSimpleLayoutState", "actionsAtom", "useMemo", "Atom", "make", "get", "nodes", "edges", "createCompanionActions", "idPrefix", "gapSeparator", "createGapSeparator", "push", "mainMenuGroup", "createMenuItemGroup", "variant", "icon", "iconOnly", "label", "testId", "source", "target", "relation", "rootActions", "actions", "Node", "RootId", "menuActions", "filter", "node", "properties", "disposition", "forEach", "menuAction", "onAction", "React", "Surface", "AlertDialog", "Dialog", "NaturalDialog", "ErrorFallback", "Dialog", "state", "updateState", "useSimpleLayoutState", "DialogRoot", "dialogType", "AlertDialog", "Root", "NaturalDialog", "DialogOverlay", "Overlay", "React", "modal", "dialogBlockAlign", "open", "dialogOpen", "onOpenChange", "nextOpen", "Surface", "role", "data", "dialogContent", "limit", "fallback", "ErrorFallback", "blockAlign", "classNames", "dialogOverlayClasses", "style", "dialogOverlayStyle", "React", "useMemo", "Surface", "getCompanionVariant", "useAppGraph", "useNode", "ErrorFallback", "Panel", "Menu", "useMenuActions", "DRAWER_NAME", "Drawer", "graph", "useAppGraph", "state", "layoutState", "useSimpleLayoutState", "placeholder", "useMemo", "React", "ContentLoading", "activeId", "active", "workspace", "companions", "useCompanions", "companionId", "variant", "useSelectedCompanion", "companionVariant", "node", "useNode", "parentNode", "data", "attendableId", "subject", "companionTo", "properties", "actions", "onAction", "useDrawerActions", "menu", "useMenuActions", "Panel", "Root", "Toolbar", "Menu", "alwaysActive", "Content", "asChild", "Surface", "role", "limit", "fallback", "ErrorFallback", "displayName", "preferredVariant", "selectedCompanion", "length", "undefined", "preferred", "find", "c", "getCompanionVariant", "id", "SimpleLayout", "state", "useSimpleLayoutState", "keyboardOpen", "setKeyboardOpen", "useState", "splitterMode", "setSplitterMode", "drawerRef", "useRef", "useEffect", "activeElement", "document", "drawerHasFocus", "current", "contains", "drawerState", "React", "Mosaic", "Root", "classNames", "MobileLayout", "onKeyboardOpenChange", "Panel", "safe", "top", "bottom", "PopoverRoot", "Splitter", "mode", "ratio", "position", "Main", "ref", "Drawer", "Dialog", "PopoverContent"]
7
+ }
@@ -9,15 +9,15 @@ import { AppActivationEvents, AppPlugin } from "@dxos/app-toolkit";
9
9
 
10
10
  // src/capabilities/operation-resolver/index.ts
11
11
  import { Capability as Capability$ } from "@dxos/app-framework";
12
- var OperationResolver = Capability$.lazy("OperationResolver", () => import("./operation-resolver-VTZ6HZ4B.mjs"));
12
+ var OperationResolver = Capability$.lazy("OperationResolver", () => import("./operation-resolver-LV5FK6MN.mjs"));
13
13
 
14
14
  // src/capabilities/react-root/index.ts
15
15
  import { Capability } from "@dxos/app-framework";
16
- var ReactRoot = Capability.lazy("ReactRoot", () => import("./react-root-WVQYY2JA.mjs"));
16
+ var ReactRoot = Capability.lazy("ReactRoot", () => import("./react-root-JR6OENXV.mjs"));
17
17
 
18
18
  // src/capabilities/react-surface/index.ts
19
19
  import { Capability as Capability2 } from "@dxos/app-framework";
20
- var ReactSurface = Capability2.lazy("ReactSurface", () => import("./react-surface-VLBR37ED.mjs"));
20
+ var ReactSurface = Capability2.lazy("ReactSurface", () => import("./react-surface-5JOPIP5Z.mjs"));
21
21
 
22
22
  // src/capabilities/spotlight-dismiss/index.ts
23
23
  import { Capability as Capability3 } from "@dxos/app-framework";