@dxos/plugin-navtree 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/PLUGIN.mdl +8 -6
- package/dist/lib/NavTreePlugin.mjs +40 -0
- package/dist/lib/NavTreePlugin.mjs.map +1 -0
- package/dist/lib/capabilities.mjs +11 -0
- package/dist/lib/capabilities.mjs.map +1 -0
- package/dist/lib/chunk-CommandsDialogContent.mjs +100 -0
- package/dist/lib/chunk-CommandsDialogContent.mjs.map +1 -0
- package/dist/lib/chunk-CommandsTrigger.mjs +27 -0
- package/dist/lib/chunk-CommandsTrigger.mjs.map +1 -0
- package/dist/lib/chunk-NavTreeDocumentTitle.mjs +17 -0
- package/dist/lib/chunk-NavTreeDocumentTitle.mjs.map +1 -0
- package/dist/lib/chunk-app-graph-builder.mjs +33 -0
- package/dist/lib/chunk-app-graph-builder.mjs.map +1 -0
- package/dist/lib/chunk-expose.mjs +31 -0
- package/dist/lib/chunk-expose.mjs.map +1 -0
- package/dist/lib/chunk-keyboard.mjs +49 -0
- package/dist/lib/chunk-keyboard.mjs.map +1 -0
- package/dist/lib/{neutral/chunk-IRQMJLRY.mjs → chunk-meta.mjs} +14 -23
- package/dist/lib/chunk-meta.mjs.map +1 -0
- package/dist/lib/chunk-operation-handler.mjs +11 -0
- package/dist/lib/chunk-operation-handler.mjs.map +1 -0
- package/dist/lib/chunk-react-surface.mjs +46 -0
- package/dist/lib/chunk-react-surface.mjs.map +1 -0
- package/dist/lib/chunk-state.mjs +106 -0
- package/dist/lib/chunk-state.mjs.map +1 -0
- package/dist/lib/chunk-types.mjs +26 -0
- package/dist/lib/chunk-types.mjs.map +1 -0
- package/dist/lib/chunk-util.mjs +51 -0
- package/dist/lib/chunk-util.mjs.map +1 -0
- package/dist/lib/components.mjs +723 -0
- package/dist/lib/components.mjs.map +1 -0
- package/dist/lib/containers.mjs +231 -0
- package/dist/lib/containers.mjs.map +1 -0
- package/dist/lib/hooks.mjs +162 -0
- package/dist/lib/hooks.mjs.map +1 -0
- package/dist/lib/index.mjs +4 -0
- package/dist/lib/meta.mjs +2 -0
- package/dist/lib/operations.mjs +7 -0
- package/dist/lib/operations.mjs.map +1 -0
- package/dist/lib/plugin.mjs +9 -0
- package/dist/lib/plugin.mjs.map +1 -0
- package/dist/lib/testing.mjs +397 -0
- package/dist/lib/testing.mjs.map +1 -0
- package/dist/lib/translations.mjs +17 -0
- package/dist/lib/translations.mjs.map +1 -0
- package/dist/lib/types.mjs +2 -0
- package/dist/types/src/NavTreePlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/keyboard.d.ts +1 -1
- package/dist/types/src/capabilities/nav-tree-view-state.d.ts +12 -0
- package/dist/types/src/capabilities/nav-tree-view-state.d.ts.map +1 -0
- package/dist/types/src/capabilities/nav-tree-view-state.test.d.ts +2 -0
- package/dist/types/src/capabilities/nav-tree-view-state.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts +1 -1
- package/dist/types/src/components/NavTree/NavTree.d.ts.map +1 -1
- package/dist/types/src/components/NavTree/NavTree.stories.d.ts +3 -0
- package/dist/types/src/components/NavTree/NavTree.stories.d.ts.map +1 -1
- package/dist/types/src/components/NavTreeContext/NavTreeContext.d.ts.map +1 -1
- package/dist/types/src/components/NavTreeItem/NavTreeItemAction.d.ts +1 -1
- package/dist/types/src/components/NavTreeItem/NavTreeItemAction.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L0Menu.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L1Panel.d.ts +5 -2
- package/dist/types/src/components/Sidebar/L1Panel.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L1Tabs.d.ts.map +1 -1
- package/dist/types/src/containers/CommandsDialogContent/CommandsDialogContent.d.ts.map +1 -1
- package/dist/types/src/containers/CommandsDialogContent/CommandsDialogContent.stories.d.ts +2 -0
- package/dist/types/src/containers/CommandsDialogContent/CommandsDialogContent.stories.d.ts.map +1 -1
- package/dist/types/src/containers/CommandsTrigger/CommandsTrigger.d.ts +4 -1
- package/dist/types/src/containers/CommandsTrigger/CommandsTrigger.d.ts.map +1 -1
- package/dist/types/src/containers/NavTreeContainer/NavTreeContainer.d.ts.map +1 -1
- package/dist/types/src/containers/NavTreeDocumentTitle/NavTreeDocumentTitle.d.ts +5 -2
- package/dist/types/src/containers/NavTreeDocumentTitle/NavTreeDocumentTitle.d.ts.map +1 -1
- package/dist/types/src/experimental/Tree.d.ts +0 -1
- package/dist/types/src/experimental/Tree.d.ts.map +1 -1
- package/dist/types/src/experimental/Tree.stories.d.ts.map +1 -1
- package/dist/types/src/experimental/visit-nodes.d.ts +3 -0
- package/dist/types/src/experimental/visit-nodes.d.ts.map +1 -0
- package/dist/types/src/hooks/useActions.d.ts +3 -1
- package/dist/types/src/hooks/useActions.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +2 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/NavTreeCapabilities.d.ts +1 -1
- package/dist/types/src/types/NavTreeCapabilities.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +1 -1
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +47 -52
- package/src/NavTreePlugin.tsx +3 -1
- package/src/capabilities/nav-tree-view-state.test.ts +55 -0
- package/src/capabilities/nav-tree-view-state.ts +19 -0
- package/src/capabilities/{react-surface.tsx → react-surface.ts} +8 -9
- package/src/capabilities/state.ts +47 -38
- package/src/components/NavTree/NavTree.stories.tsx +26 -5
- package/src/components/NavTree/NavTree.tsx +10 -13
- package/src/components/NavTreeItem/NavTreeItemAction.tsx +1 -1
- package/src/components/Sidebar/L0Menu.tsx +9 -3
- package/src/components/Sidebar/L1Panel.tsx +52 -20
- package/src/components/Sidebar/L1Tabs.tsx +6 -0
- package/src/containers/CommandsDialogContent/CommandsDialogContent.tsx +49 -44
- package/src/containers/CommandsTrigger/CommandsTrigger.tsx +2 -0
- package/src/containers/NavTreeContainer/NavTreeContainer.tsx +17 -18
- package/src/containers/NavTreeDocumentTitle/NavTreeDocumentTitle.tsx +2 -0
- package/src/experimental/Tree.stories.tsx +2 -1
- package/src/experimental/Tree.tsx +2 -18
- package/src/experimental/visit-nodes.ts +27 -0
- package/src/hooks/useActions.ts +15 -4
- package/src/hooks/useNavTreeModel.ts +1 -1
- package/src/operations/expose.ts +2 -2
- package/src/testing/app-graph-builder.ts +1 -1
- package/src/translations.ts +3 -0
- package/src/types/NavTreeCapabilities.ts +1 -1
- package/src/types/schema.ts +1 -1
- package/src/util.ts +7 -9
- package/dist/lib/neutral/CommandsDialogContent-TEKBCQ3U.mjs +0 -112
- package/dist/lib/neutral/CommandsDialogContent-TEKBCQ3U.mjs.map +0 -7
- package/dist/lib/neutral/CommandsTrigger-HGCI22SP.mjs +0 -27
- package/dist/lib/neutral/CommandsTrigger-HGCI22SP.mjs.map +0 -7
- package/dist/lib/neutral/NavTreeContainer-ICDKC2GI.mjs +0 -12
- package/dist/lib/neutral/NavTreeContainer-ICDKC2GI.mjs.map +0 -7
- package/dist/lib/neutral/NavTreeDocumentTitle-RMERXZGK.mjs +0 -22
- package/dist/lib/neutral/NavTreeDocumentTitle-RMERXZGK.mjs.map +0 -7
- package/dist/lib/neutral/NavTreePlugin.mjs +0 -68
- package/dist/lib/neutral/NavTreePlugin.mjs.map +0 -7
- package/dist/lib/neutral/NavTreePlugin.node.mjs +0 -18
- package/dist/lib/neutral/NavTreePlugin.node.mjs.map +0 -7
- package/dist/lib/neutral/NavTreePlugin.workerd.mjs +0 -16
- package/dist/lib/neutral/NavTreePlugin.workerd.mjs.map +0 -7
- package/dist/lib/neutral/app-graph-builder-2DYAIROU.mjs +0 -42
- package/dist/lib/neutral/app-graph-builder-2DYAIROU.mjs.map +0 -7
- package/dist/lib/neutral/capabilities/index.mjs +0 -17
- package/dist/lib/neutral/capabilities/index.mjs.map +0 -7
- package/dist/lib/neutral/chunk-4RN6TH36.mjs +0 -292
- package/dist/lib/neutral/chunk-4RN6TH36.mjs.map +0 -7
- package/dist/lib/neutral/chunk-BAVI2K7A.mjs +0 -27
- package/dist/lib/neutral/chunk-BAVI2K7A.mjs.map +0 -7
- package/dist/lib/neutral/chunk-EAN4K6OL.mjs +0 -8
- package/dist/lib/neutral/chunk-EAN4K6OL.mjs.map +0 -7
- package/dist/lib/neutral/chunk-IRQMJLRY.mjs.map +0 -7
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +0 -10
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +0 -7
- package/dist/lib/neutral/chunk-JOSNCOV4.mjs +0 -79
- package/dist/lib/neutral/chunk-JOSNCOV4.mjs.map +0 -7
- package/dist/lib/neutral/components/index.mjs +0 -814
- package/dist/lib/neutral/components/index.mjs.map +0 -7
- package/dist/lib/neutral/containers/index.mjs +0 -20
- package/dist/lib/neutral/containers/index.mjs.map +0 -7
- package/dist/lib/neutral/expose-HIBA2NQG.mjs +0 -38
- package/dist/lib/neutral/expose-HIBA2NQG.mjs.map +0 -7
- package/dist/lib/neutral/hooks/index.mjs +0 -181
- package/dist/lib/neutral/hooks/index.mjs.map +0 -7
- package/dist/lib/neutral/index.mjs +0 -34
- package/dist/lib/neutral/index.mjs.map +0 -7
- package/dist/lib/neutral/keyboard-JM2HCF5N.mjs +0 -58
- package/dist/lib/neutral/keyboard-JM2HCF5N.mjs.map +0 -7
- package/dist/lib/neutral/meta.json +0 -1
- package/dist/lib/neutral/meta.mjs +0 -12
- package/dist/lib/neutral/meta.mjs.map +0 -7
- package/dist/lib/neutral/operation-handler-ORDOJUL2.mjs +0 -13
- package/dist/lib/neutral/operation-handler-ORDOJUL2.mjs.map +0 -7
- package/dist/lib/neutral/operations/index.mjs +0 -8
- package/dist/lib/neutral/operations/index.mjs.map +0 -7
- package/dist/lib/neutral/plugin.mjs +0 -16
- package/dist/lib/neutral/plugin.mjs.map +0 -7
- package/dist/lib/neutral/react-surface-QPMUEDZX.mjs +0 -48
- package/dist/lib/neutral/react-surface-QPMUEDZX.mjs.map +0 -7
- package/dist/lib/neutral/state-PDZU4PIP.mjs +0 -126
- package/dist/lib/neutral/state-PDZU4PIP.mjs.map +0 -7
- package/dist/lib/neutral/testing/index.mjs +0 -439
- package/dist/lib/neutral/testing/index.mjs.map +0 -7
- package/dist/lib/neutral/translations.mjs +0 -23
- package/dist/lib/neutral/translations.mjs.map +0 -7
- package/dist/lib/neutral/types/index.mjs +0 -10
- package/dist/lib/neutral/types/index.mjs.map +0 -7
- package/dist/types/src/NavTreePlugin.node.d.ts +0 -4
- package/dist/types/src/NavTreePlugin.node.d.ts.map +0 -1
- package/dist/types/src/NavTreePlugin.test.d.ts +0 -2
- package/dist/types/src/NavTreePlugin.test.d.ts.map +0 -1
- package/dist/types/src/NavTreePlugin.workerd.d.ts +0 -4
- package/dist/types/src/NavTreePlugin.workerd.d.ts.map +0 -1
- package/src/NavTreePlugin.node.ts +0 -17
- package/src/NavTreePlugin.test.ts +0 -27
- package/src/NavTreePlugin.workerd.ts +0 -16
- /package/src/components/NavTreeContext/{NavTreeContext.tsx → NavTreeContext.ts} +0 -0
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/components/NavTree/NavTree.tsx", "../../../../src/components/NavTreeContext/NavTreeContext.tsx", "../../../../src/components/Sidebar/L0Menu.tsx", "../../../../src/components/UserAccountAvatar/UserAccountAvatar.tsx", "../../../../src/components/Sidebar/L1Panel.tsx", "../../../../src/components/NavTreeItem/NavTreeItemColumns.tsx", "../../../../src/components/NavTreeItem/NavTreeItemAction.tsx", "../../../../src/components/Sidebar/L1Tabs.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { forwardRef, useMemo } from 'react';\n\nimport { useAppGraph } from '@dxos/app-toolkit/ui';\nimport { Node, useConnections, useActions as useGraphActions } from '@dxos/plugin-graph';\nimport { type MenuItem } from '@dxos/react-ui-menu';\nimport { Tabs } from '@dxos/react-ui-tabs';\nimport { Position } from '@dxos/util';\n\nimport { useLoadDescendents } from '#hooks';\n\nimport { useNavTreeContext } from '../NavTreeContext';\nimport { L0Menu, L1Tabs, type L1TabsProps } from '../Sidebar';\n\nexport const NAV_TREE_ITEM = 'NavTreeItem';\n\nexport type NavTreeProps = { id: string; root?: Node.Node; tab: string } & Pick<L1TabsProps, 'open'>;\n\n// TODO(wittjosiah): Refactor to Radix-style.\nexport const NavTree = forwardRef<HTMLDivElement, NavTreeProps>(({ id, root, tab, ...props }, forwardedRef) => {\n const { onBack, onItemHover } = useNavTreeContext();\n const { topLevelActions, l0Items, pinnedItems, userAccountItem, topLevelItems } = useTopLevelNavItems(root);\n\n useLoadDescendents(root);\n const path = useMemo(() => [id], [id]);\n\n return (\n // TODO(thure): `Tabs.Root` forces all items that should be able to receive focus to use `Tabs.Tab(Primitive)` since\n // it uses RovingFocus and doesn't support moving focus to an item that is not a tab. Assess whether this situation\n // should change including whether it should motivate a change in the design/taxonomy, or if this means this should\n // not use `react-ui-tabs` at all.\n <Tabs.Root value={tab} orientation='vertical' classNames='relative' ref={forwardedRef}>\n <L0Menu\n menuActions={topLevelActions as MenuItem[]}\n topLevelItems={l0Items}\n pinnedItems={pinnedItems}\n userAccountItem={userAccountItem}\n path={path}\n parent={root}\n onItemHover={onItemHover}\n />\n <L1Tabs topLevelItems={topLevelItems} path={path} currentItemId={tab} onBack={onBack} {...props} />\n </Tabs.Root>\n );\n});\n\n/**\n * Partitions root children into workspaces, pinned items, user-account, and top-level actions.\n */\nconst useTopLevelNavItems = (root?: Node.Node) => {\n const { graph } = useAppGraph();\n const rootId = root?.id ?? Node.RootId;\n const rootOutboundItems = useConnections(graph, rootId, 'child');\n const rootActions = useGraphActions(graph, rootId);\n\n const { topLevelActions, l0Items, pinnedItems, userAccountItem } = useMemo(() => {\n const topLevelWorkspaces: Node.Node[] = [];\n const outboundPinnedItems: Node.Node[] = [];\n let userAccountItem: Node.Node | undefined;\n for (const node of rootOutboundItems) {\n switch (node.properties.disposition) {\n case 'workspace':\n topLevelWorkspaces.push(node);\n break;\n case 'pin-end':\n outboundPinnedItems.push(node);\n break;\n case 'user-account':\n userAccountItem ??= node;\n break;\n }\n }\n\n const topLevelActions = rootActions\n .filter((action) => action.properties.disposition === 'menu')\n .toSorted((a, b) => Position.compare(a.properties, b.properties));\n const pinnedItems = [\n ...outboundPinnedItems,\n ...rootActions.filter((action) => action.properties.disposition === 'pin-end'),\n ].toSorted((a, b) => Position.compare(a.properties, b.properties));\n\n return {\n pinnedItems,\n topLevelActions,\n userAccountItem,\n l0Items: topLevelWorkspaces,\n };\n }, [rootActions, rootOutboundItems]);\n\n const topLevelItems = useMemo(\n () => [...l0Items, ...pinnedItems, ...(userAccountItem ? [userAccountItem] : [])],\n [l0Items, pinnedItems, userAccountItem],\n );\n\n return { topLevelActions, l0Items, pinnedItems, userAccountItem, topLevelItems };\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { createContext, useContext } from 'react';\n\nimport { raise } from '@dxos/debug';\n\nimport { type NavTreeContextValue } from '../types';\n\nexport const NavTreeContext = createContext<NavTreeContextValue | null>(null);\n\nexport const useNavTreeContext = () => useContext(NavTreeContext) ?? raise(new Error('Missing NavTreeContext'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport {\n type Edge,\n attachClosestEdge,\n extractClosestEdge,\n} from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';\nimport { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';\nimport { draggable, dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';\nimport { preserveOffsetOnSource } from '@atlaskit/pragmatic-drag-and-drop/element/preserve-offset-on-source';\nimport { scrollJustEnoughIntoView } from '@atlaskit/pragmatic-drag-and-drop/element/scroll-just-enough-into-view';\nimport { useAtomValue } from '@effect-atom/atom-react';\nimport React, {\n type MouseEvent,\n type PropsWithChildren,\n forwardRef,\n memo,\n useCallback,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport { type Node } from '@dxos/app-graph';\nimport { DxAvatar } from '@dxos/lit-ui/react';\nimport { useActionRunner } from '@dxos/plugin-graph';\nimport {\n Icon,\n IconButton,\n ScrollArea,\n type ThemedClassName,\n Tooltip,\n toLocalizedString,\n useMediaQuery,\n useTranslation,\n} from '@dxos/react-ui';\nimport { DropIndicator } from '@dxos/react-ui-list';\nimport { Menu, type MenuItem } from '@dxos/react-ui-menu';\nimport { Tabs } from '@dxos/react-ui-tabs';\nimport { mx } from '@dxos/ui-theme';\nimport { arrayMove } from '@dxos/util';\n\nimport { useNavTreeState } from '#hooks';\nimport { meta } from '#meta';\n\nimport { l0ItemType } from '../../util';\nimport { useNavTreeContext } from '../NavTreeContext';\nimport { UserAccountAvatar } from '../UserAccountAvatar';\n\n//\n// L0Item\n//\n\ntype L0ItemData = {\n id: L0ItemProps['item']['id'];\n type: 'l0Item';\n};\n\n// Local rearrange-handler callback shape; drag-and-drop is wired directly via pragmatic-dnd in `L0Item`,\n// so only the callback signature is needed here.\ntype StackItemRearrangeHandler<Data extends { id: string } = { id: string }> = (\n source: Data,\n target: Data,\n closestEdge: Edge | null,\n) => void;\n\ntype L0ItemRootProps = {\n item: Node.Node;\n parent?: Node.Node;\n path: string[];\n onMouseEnter?: () => void;\n};\n\ntype L0ItemProps = L0ItemRootProps & {\n item: Node.Node;\n parent?: Node.Node;\n path: string[];\n pinned?: boolean;\n onRearrange?: StackItemRearrangeHandler<L0ItemData>;\n onItemHover?: (params: { item: Node.Node }) => void;\n};\n\nconst useL0ItemClick = ({ item, parent, path }: L0ItemProps, type: string) => {\n const { onSelect, onTabChange } = useNavTreeContext();\n const { getItem } = useNavTreeState();\n const [isLg] = useMediaQuery('lg');\n const runAction = useActionRunner();\n\n return useCallback(\n (event: MouseEvent) => {\n switch (type) {\n case 'action': {\n const { properties: { caller } = {} } = item;\n return void runAction(item as Node.Action, caller ? { parent, path, caller } : { parent, path });\n }\n case 'tab':\n return onTabChange?.(item);\n case 'link':\n return onSelect?.({ item, path, current: !getItem(path).current, option: event.altKey });\n }\n },\n [item, parent, type, getItem, onSelect, onTabChange, isLg, runAction],\n );\n};\n\nconst l0Breakpoints: Record<string, string> = {\n lg: 'hidden lg:grid',\n};\n\nconst L0ItemRoot = memo(\n forwardRef<HTMLButtonElement, PropsWithChildren<L0ItemRootProps>>(\n ({ item, parent, path, onMouseEnter, children }, forwardedRef) => {\n const { t } = useTranslation(meta.profile.key);\n const { model } = useNavTreeContext();\n const itemPath = useMemo(() => [...path, item.id], [item.id, path]);\n const { id, testId } = useAtomValue(model.itemProps(itemPath));\n const localizedString = toLocalizedString(item.properties.label, t);\n\n const type = l0ItemType(item);\n const handleClick = useL0ItemClick({ item, parent, path: itemPath }, type);\n\n return (\n <Tooltip.Trigger asChild delayDuration={0} side='right' content={localizedString}>\n <Tabs.TabPrimitive\n className={mx(\n 'group/l0item flex w-full justify-center items-center relative',\n 'dx-app-no-drag dx-focus-ring-group data[type!=\"collection\"]:cursor-pointer',\n l0Breakpoints[item.properties.l0Breakpoint],\n )}\n tabIndex={type === 'tab' ? 0 : undefined}\n data-type={type}\n data-testid={testId}\n data-object-id={id}\n value={item.id}\n onClick={handleClick}\n onMouseEnter={onMouseEnter}\n ref={forwardedRef}\n >\n {children}\n </Tabs.TabPrimitive>\n </Tooltip.Trigger>\n );\n },\n ),\n);\n\nexport const L0ItemActiveTabIndicator = ({ classNames }: ThemedClassName<{}>) => (\n <div\n className={mx(\n 'hidden group-aria-selected/l0item:block absolute start-0 h-6 w-1.5 bg-accent-bg rounded-sm',\n classNames,\n )}\n />\n);\n\n// TODO(burdon): Factor out pinned (non-draggable) items.\nconst L0Item = memo(({ item, parent, path, pinned, onRearrange, onItemHover }: L0ItemProps) => {\n const { t } = useTranslation(meta.profile.key);\n const itemElement = useRef<HTMLButtonElement | null>(null);\n const [closestEdge, setEdge] = useState<Edge | null>(null);\n const localizedString = toLocalizedString(item.properties.label, t);\n const hue = item.properties.hue ?? null;\n\n useLayoutEffect(() => {\n if (!itemElement.current || !onRearrange) {\n return;\n }\n\n return combine(\n draggable({\n element: itemElement.current,\n getInitialData: () => ({ id: item.id, type: 'l0Item' }) satisfies L0ItemData,\n onGenerateDragPreview: ({ nativeSetDragImage, source, location }) => {\n document.body.setAttribute('data-drag-preview', 'true');\n const element = source.element.querySelector('[data-frame]') as HTMLElement;\n scrollJustEnoughIntoView({ element });\n const { x, y } = preserveOffsetOnSource({ element, input: location.current.input })({\n container: (element.offsetParent ?? document.body) as HTMLElement,\n });\n nativeSetDragImage?.(element, x, y);\n },\n onDragStart: () => {\n document.body.removeAttribute('data-drag-preview');\n itemElement.current!.closest('[data-drag-autoscroll]')?.setAttribute('data-drag-autoscroll', 'active');\n },\n onDrop: () => {\n itemElement.current!.closest('[data-drag-autoscroll]')?.setAttribute('data-drag-autoscroll', 'idle');\n },\n }),\n dropTargetForElements({\n element: itemElement.current,\n getData: ({ input, element }) => {\n return attachClosestEdge(\n { id: item.id, type: 'l0Item' },\n { input, element, allowedEdges: ['top', 'bottom'] },\n );\n },\n onDragEnter: ({ self, source }) => {\n if (source.data.type === self.data.type) {\n setEdge(extractClosestEdge(self.data));\n }\n },\n onDrag: ({ self, source }) => {\n if (source.data.type === self.data.type) {\n setEdge(extractClosestEdge(self.data));\n }\n },\n onDragLeave: () => setEdge(null),\n onDrop: ({ self, source }) => {\n setEdge(null);\n if (source.data.type === self.data.type) {\n onRearrange(source.data as L0ItemData, self.data as L0ItemData, extractClosestEdge(self.data));\n }\n },\n }),\n );\n }, [item, onRearrange]);\n\n const handleMouseEnter = useCallback(() => onItemHover?.({ item }), [item, onItemHover]);\n\n return (\n <L0ItemRoot ref={itemElement} item={item} parent={parent} path={path} onMouseEnter={handleMouseEnter}>\n <div\n data-frame={true}\n {...(hue && { style: { background: `var(--color-${hue}-surface)` } })}\n className={mx(\n 'flex justify-center items-center dx-focus-ring-group-indicator transition-colors rounded-sm',\n pinned\n ? 'p-2 group-hover/l0item:bg-current-surface'\n : 'w-(--dx-l0-avatar-size) h-(--dx-l0-avatar-size) bg-current-surface',\n )}\n >\n <ItemAvatar item={item} />\n </div>\n <L0ItemActiveTabIndicator />\n <span id={`${item.id}__label`} className='sr-only'>\n {localizedString}\n </span>\n {closestEdge && <DropIndicator edge={closestEdge} />}\n </L0ItemRoot>\n );\n});\n\nconst ItemAvatar = ({ item }: Pick<L0ItemProps, 'item'>) => {\n const { t } = useTranslation(meta.profile.key);\n\n // Actions.\n if (item.properties.icon) {\n const hue = item.properties.hue ?? null;\n const hueFgStyle = hue && { style: { color: `var(--color-${hue}-fg)` } };\n return <Icon icon={item.properties.icon} size={6} {...hueFgStyle} />;\n }\n\n const type = l0ItemType(item);\n if (type === 'tab' && item.properties.disposition !== 'pin-end') {\n const hue = item.properties.hue ?? null;\n const localizedString = toLocalizedString(item.properties.label, t);\n return <DxAvatar hue={hue} hueVariant='surface' variant='square' size={12} fallback={localizedString} />;\n }\n\n return null;\n};\n\n//\n// L0Menu\n//\n\nexport type L0MenuProps = {\n menuActions: MenuItem[];\n topLevelItems: Node.Node[];\n pinnedItems: Node.Node[];\n userAccountItem?: Node.Node;\n parent?: Node.Node;\n path: string[];\n onItemHover?: (params: { item: Node.Node }) => void;\n};\n\nexport const L0Menu = ({\n menuActions,\n topLevelItems,\n pinnedItems,\n userAccountItem,\n parent,\n path,\n onItemHover,\n}: L0MenuProps) => {\n const { t } = useTranslation(meta.profile.key);\n const runAction = useActionRunner();\n const handleAction = useCallback(\n (action: Node.Action, params: Node.InvokeProps) => {\n void runAction(action, params);\n },\n [runAction],\n );\n\n const handleRearrange = useCallback<StackItemRearrangeHandler<L0ItemData>>(\n (source, target, closestEdge) => {\n const sourceItem = topLevelItems.find((i) => i.id === source.id);\n if (!sourceItem?.properties.onRearrange) {\n return;\n }\n\n const sourceIndex = topLevelItems.findIndex((i) => i.id === source.id);\n const targetIndex = topLevelItems.findIndex((i) => i.id === target.id);\n const insertIndex =\n source.id === target.id\n ? sourceIndex\n : targetIndex +\n (sourceIndex < targetIndex ? (closestEdge === 'top' ? -1 : 0) : closestEdge === 'bottom' ? 1 : 0);\n const nextOrder = arrayMove([...topLevelItems], sourceIndex, insertIndex);\n return sourceItem.properties.onRearrange(nextOrder.map((item) => item.data));\n },\n [topLevelItems],\n );\n\n // Check if any items have onRearrange to enable drag-and-drop.\n const hasRearrangeableItems = topLevelItems.some((item) => item.properties.onRearrange);\n\n return (\n <Tabs.Tablist\n data-tauri-drag-region\n classNames={[\n 'group/l0 absolute z-[1] inset-y-0 start-0 rounded-is',\n 'grid grid-cols-[var(--dx-l0-size)] grid-rows-[var(--dx-rail-size)_1fr_min-content_var(--dx-l0-size)] dx-contain-layout',\n 'w-(--dx-l0-size) bg-l0-surface dx-app-drag pb-[env(safe-area-inset-bottom)]',\n '[body[data-platform=\"macos\"]_&]:pt-[30px]',\n '[body[data-platform=\"ios\"]_&]:pt-[max(env(safe-area-inset-top),0.25rem)]',\n ]}\n >\n {/* TODO(wittjosiah): Use L0Item trigger. */}\n <Menu.Root onAction={handleAction}>\n <Menu.Trigger asChild data-testid='spacePlugin.addSpace'>\n <div className='grid place-items-center'>\n <IconButton\n density='lg'\n variant='ghost'\n size={5}\n icon='ph--list--regular'\n iconOnly\n square\n label={t('app-menu.label')}\n />\n </div>\n </Menu.Trigger>\n <Menu.Content group={parent} items={menuActions} />\n </Menu.Root>\n\n {/* Space list. */}\n <ScrollArea.Root centered thin orientation='vertical'>\n <ScrollArea.Viewport classNames='flex flex-col gap-2 py-1'>\n {topLevelItems.map((item) => (\n <L0Item\n key={item.id}\n item={item}\n parent={parent}\n path={path}\n onItemHover={onItemHover}\n {...(hasRearrangeableItems && { onRearrange: handleRearrange })}\n />\n ))}\n </ScrollArea.Viewport>\n </ScrollArea.Root>\n\n {/* Actions. */}\n <div className='grid grid-cols-1 auto-rows-(--dx-rail-action) pt-2'>\n {pinnedItems.map((item) => (\n <L0Item key={item.id} item={item} parent={parent} path={path} pinned />\n ))}\n </div>\n\n {userAccountItem && (\n <div className='grid dx-app-no-drag'>\n <L0ItemRoot key={userAccountItem.id} item={userAccountItem} parent={parent} path={path}>\n <UserAccountAvatar\n userId={userAccountItem.properties.userId}\n hue={userAccountItem.properties.hue}\n emoji={userAccountItem.properties.emoji}\n status={userAccountItem.properties.status}\n size={10}\n />\n </L0ItemRoot>\n </div>\n )}\n </Tabs.Tablist>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Avatar, type AvatarStatus, type Size } from '@dxos/react-ui';\nimport { hexToFallback } from '@dxos/util';\n\nimport { L0ItemActiveTabIndicator } from '../Sidebar';\n\nexport type UserAccountAvatarProps = {\n size?: Size;\n userId?: string;\n hue?: string;\n emoji?: string;\n status?: AvatarStatus;\n};\n\nexport const UserAccountAvatar = ({ size, userId, hue, emoji, status }: UserAccountAvatarProps) => {\n const fallbackValue = hexToFallback(userId ?? '0');\n\n return (\n <>\n <L0ItemActiveTabIndicator classNames='inset-y-6' />\n <div\n className='grid place-items-center dx-focus-ring-group-indicator rounded-full'\n data-joyride='welcome/account'\n >\n <Avatar.Root>\n <Avatar.Content\n variant='circle'\n size={size ?? 12}\n status={status ?? 'active'}\n hue={hue || fallbackValue.hue}\n fallback={emoji || fallbackValue.emoji}\n data-testid='treeView.userAccount'\n />\n </Avatar.Root>\n </div>\n </>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Option from 'effect/Option';\nimport React, { memo, useCallback, useMemo } from 'react';\n\nimport { Node } from '@dxos/app-graph';\nimport { Paths } from '@dxos/app-toolkit';\nimport { useAppGraph } from '@dxos/app-toolkit/ui';\nimport { Graph, useActionRunner, useEdges } from '@dxos/plugin-graph';\nimport { DensityProvider, IconButton, ScrollArea, toLocalizedString, useTranslation } from '@dxos/react-ui';\nimport { Tree } from '@dxos/react-ui-list';\nimport { Menu, type MenuItem } from '@dxos/react-ui-menu';\nimport { Tabs } from '@dxos/react-ui-tabs';\nimport { hoverableControlItem, hoverableOpenControlItem } from '@dxos/ui-theme';\n\nimport { getListActions, useActions, useLoadDescendents } from '#hooks';\nimport { meta } from '#meta';\n\nimport { NAV_TREE_ITEM } from '../NavTree';\nimport { useNavTreeContext } from '../NavTreeContext';\nimport { NavTreeItemColumns } from '../NavTreeItem/NavTreeItemColumns';\n\nexport type L1PanelProps = {\n open?: boolean;\n path: string[];\n item: Node.Node;\n isCurrent: boolean;\n onBack?: () => void;\n};\n\n/**\n * Space or settings panel.\n */\nconst L1Panel$ = ({ open, path, item, isCurrent, onBack }: L1PanelProps) => {\n const { t } = useTranslation(meta.profile.key);\n const title = toLocalizedString(item.properties.label, t);\n const isActivated = useIsActivatedWorkspace(item);\n const shouldRenderContent = isCurrent || isActivated;\n\n return (\n <Tabs.Panel\n key={item.id}\n value={item.id}\n classNames={[\n 'absolute inset-y-0 end-0',\n 'w-[calc(100%-var(--dx-l0-size))] lg:w-(--dx-l1-size) grid-cols-1 grid-rows-[var(--dx-rail-size)_1fr]',\n 'py-[env(safe-area-inset-top)]',\n isCurrent && 'grid',\n ]}\n tabIndex={-1}\n aria-label={title}\n {...(isCurrent && { 'data-testid': 'navtree.workspace.visible' })}\n {...(!open && { inert: true })}\n >\n {shouldRenderContent && <L1PanelContent open={open} path={path} item={item} onBack={onBack} />}\n </Tabs.Panel>\n );\n};\n\n/** Determines whether a workspace tab has been populated with real child content (i.e. expanded at least once). */\nconst useIsActivatedWorkspace = (item: Node.Node): boolean => {\n const { graph } = useAppGraph();\n const edges = useEdges(graph, item.id);\n\n return useMemo(() => {\n const childIds = edges[Graph.relationKey('child')] ?? [];\n return childIds.some((childId) => {\n const child = Graph.getNode(graph, childId);\n if (Option.isNone(child)) {\n return false;\n }\n return child.value.properties.disposition === undefined;\n });\n }, [edges, graph]);\n};\n\n/**\n * Mounted panel content for active or previously-visited tabs.\n */\nconst L1PanelContent = ({ path, item, onBack }: Pick<L1PanelProps, 'open' | 'path' | 'item' | 'onBack'>) => {\n const navTreeContext = useNavTreeContext();\n\n return (\n <DensityProvider density='md'>\n <L1PanelHeader path={path} item={item} onBack={onBack} />\n <ScrollArea.Root thin orientation='vertical'>\n <ScrollArea.Viewport>\n <Tree\n classNames='pt-[2px]'\n model={navTreeContext.model}\n id={item.id}\n rootId={item.id}\n path={path}\n levelOffset={5}\n draggable\n gridTemplateColumns='[tree-row-start] minmax(0, 1fr) min-content min-content [tree-row-end]'\n renderColumns={NavTreeItemColumns}\n blockInstruction={navTreeContext.blockInstruction}\n canDrop={navTreeContext.canDrop}\n canSelect={navTreeContext.canSelect}\n onOpenChange={navTreeContext.onOpenChange}\n onSelect={navTreeContext.onSelect}\n onItemHover={navTreeContext.onItemHover}\n />\n </ScrollArea.Viewport>\n </ScrollArea.Root>\n </DensityProvider>\n );\n};\n\n/**\n * Header row.\n */\nconst L1PanelHeader = ({ item, path, onBack }: Pick<L1PanelProps, 'item' | 'path' | 'onBack'>) => {\n const { t } = useTranslation(meta.profile.key);\n const { renderItemEnd: ItemEnd } = useNavTreeContext();\n const title = toLocalizedString(item.properties.label, t);\n const backCapableWorkspace = Paths.isPinnedWorkspace(item.id);\n\n const { menuActions, onAction } = useL1MenuActions({ item, path });\n useLoadDescendents(item);\n\n return (\n <div\n data-tauri-drag-region\n className='grid grid-cols-[28px_1fr_min-content_min-content] w-full items-center dx-app-drag dx-density-lg'\n >\n {backCapableWorkspace ? (\n <IconButton\n classNames={[hoverableControlItem, hoverableOpenControlItem]}\n variant='ghost'\n icon='ph--caret-left--regular'\n iconOnly\n size={4}\n label={t('button-back.button')}\n data-testid='treeView.primaryTreeButton'\n onClick={() => onBack?.()}\n />\n ) : (\n <div />\n )}\n <h2 data-tauri-drag-region className='flex-1 truncate min-w-0'>\n {title}\n </h2>\n <div className='contents dx-app-no-drag'>\n <MenuActions item={item} menuActions={menuActions} onAction={onAction} />\n {ItemEnd && <ItemEnd node={item} open />}\n </div>\n </div>\n );\n};\n\ntype L1MenuActions = {\n menuActions: Node.Action[];\n onAction: (action: Node.Action, params?: Node.InvokeProps) => void;\n};\n\n/**\n * Header menu actions for an L1 workspace tab. Renders nothing for an empty\n * `menuActions`, a single inline icon button for one action, and a\n * `…`-menu trigger for multiple.\n */\nconst MenuActions = ({\n item,\n menuActions,\n onAction,\n}: {\n item: Node.Node;\n} & Pick<L1MenuActions, 'menuActions' | 'onAction'>) => {\n const { t } = useTranslation(meta.profile.key);\n\n if (menuActions.length === 0) {\n return null;\n }\n\n if (menuActions.length === 1) {\n return (\n <IconButton\n classNames={['shrink-0 px-2 pointer-fine:px-1', hoverableControlItem, hoverableOpenControlItem]}\n variant='ghost'\n icon={menuActions[0].properties?.icon ?? 'ph--circle-dashed--regular'}\n iconOnly\n size={4}\n label={toLocalizedString(menuActions[0].properties?.label, t)}\n data-testid={menuActions[0].properties?.testId}\n onClick={() => onAction(menuActions[0] as Node.Action)}\n />\n );\n }\n\n return (\n <Menu.Root caller={NAV_TREE_ITEM} onAction={onAction}>\n <Menu.Trigger asChild>\n <IconButton\n classNames={['shrink-0 px-2 pointer-fine:px-1', hoverableControlItem, hoverableOpenControlItem]}\n variant='ghost'\n icon='ph--dots-three-vertical--regular'\n iconOnly\n size={4}\n label={t('tree-item-actions.label')}\n data-testid='navtree.treeItem.actionsLevel0'\n />\n </Menu.Trigger>\n <Menu.Content group={item} items={menuActions as MenuItem[]} />\n </Menu.Root>\n );\n};\n\n/**\n * Builds the menu actions for the L1 panel header.\n */\nconst useL1MenuActions = ({ item, path }: Pick<L1PanelProps, 'item' | 'path'>): L1MenuActions => {\n const runAction = useActionRunner();\n\n const menuActions = getListActions(useActions(item));\n\n const onAction = useCallback(\n (action: Node.Action, params?: Node.InvokeProps) => {\n void runAction(action, { ...params, path });\n },\n [runAction, path],\n );\n\n return { menuActions, onAction };\n};\n\nexport const L1Panel = memo(L1Panel$);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { Fragment, memo, useMemo } from 'react';\n\nimport { Popover, toLocalizedString, useTranslation } from '@dxos/react-ui';\nimport { Treegrid } from '@dxos/react-ui-list';\n\nimport { getListActions, useActions } from '#hooks';\nimport { meta } from '#meta';\n\nimport { NAV_TREE_ITEM } from '../NavTree';\nimport { useNavTreeContext } from '../NavTreeContext';\nimport { type NavTreeItemColumnsProps } from '../types';\nimport { NavTreeItemActionDropdownMenu, NavTreeItemMonolithicAction } from './NavTreeItemAction';\n\nexport const NavTreeItemColumns = memo(({ path, item, open }: NavTreeItemColumnsProps) => {\n const { t } = useTranslation(meta.profile.key);\n const { renderItemEnd: ItemEnd, popoverAnchorId } = useNavTreeContext();\n\n const level = path.length - 2;\n const flattenedActions = useActions(item);\n const allActions = useMemo(() => getListActions(flattenedActions), [flattenedActions]);\n\n const anchored = popoverAnchorId === `${NAV_TREE_ITEM}:${item.id}`;\n const ActionRoot = anchored ? Popover.Anchor : Fragment;\n\n return (\n // `data-popover-anchor` lets the enclosing row highlight itself while a popover (e.g. rename) is open on it.\n <div className='contents dx-app-no-drag' {...(anchored && { 'data-popover-anchor': '' })}>\n <ActionRoot>\n {allActions.length === 1 ? (\n <Treegrid.Cell classNames='contents'>\n <NavTreeItemMonolithicAction\n baseLabel={toLocalizedString(allActions[0].properties?.label, t)}\n parent={item}\n path={path}\n {...allActions[0]}\n />\n </Treegrid.Cell>\n ) : allActions.length > 1 ? (\n <Treegrid.Cell classNames='contents'>\n <NavTreeItemActionDropdownMenu\n testId={`navtree.treeItem.actionsLevel${level}`}\n label={t('tree-item-actions.label')}\n icon='ph--dots-three-vertical--regular'\n parent={item}\n path={path}\n menuActions={allActions}\n caller={NAV_TREE_ITEM}\n />\n </Treegrid.Cell>\n ) : (\n <Treegrid.Cell />\n )}\n </ActionRoot>\n {ItemEnd && (\n <Treegrid.Cell classNames='contents'>\n <ItemEnd node={item} open={open} />\n </Treegrid.Cell>\n )}\n </div>\n );\n});\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useCallback } from 'react';\n\nimport { type Node } from '@dxos/app-graph';\nimport { useActionRunner } from '@dxos/plugin-graph';\nimport { IconButton, toLocalizedString, useDensityContext, useTranslation } from '@dxos/react-ui';\nimport { composable, composableProps } from '@dxos/react-ui';\nimport { Menu, type MenuItem } from '@dxos/react-ui-menu';\nimport { hoverableControlItem, hoverableOpenControlItem } from '@dxos/ui-theme';\n\nimport { meta } from '#meta';\nimport { type ActionProperties } from '#types';\n\nconst fallbackIcon = 'ph--circle-dashed--regular';\n\nconst mdActionButtonProps = {\n size: 4 as const,\n density: 'md' as const,\n};\n\nconst lgActionButtonProps = {\n size: 5 as const,\n density: 'lg' as const,\n};\n\nexport type NavTreeItemActionMenuProps = ActionProperties & {\n parent: Node.Node;\n path?: string[];\n caller?: string;\n monolithic?: boolean;\n menuActions?: Node.Action[];\n};\n\nexport const NavTreeItemActionDropdownMenu = composable<HTMLButtonElement, NavTreeItemActionMenuProps>(\n ({ parent, path, label, icon, testId, menuActions, caller, ...props }, forwardedRef) => {\n const { t } = useTranslation(meta.profile.key);\n const density = useDensityContext();\n const runAction = useActionRunner();\n const handleAction = useCallback(\n (action: Node.Action, params: Node.InvokeProps = {}) => runAction(action, { ...params, path }),\n [runAction, path],\n );\n\n return (\n <Menu.Root caller={caller} onAction={handleAction}>\n <Menu.Trigger asChild>\n <IconButton\n {...(density === 'lg' ? lgActionButtonProps : mdActionButtonProps)}\n {...composableProps(props)}\n classNames={['shrink-0 px-2 pointer-fine:px-1', hoverableControlItem, hoverableOpenControlItem]}\n variant='ghost'\n icon={icon ?? fallbackIcon}\n iconOnly\n label={toLocalizedString(label, t)}\n data-testid={testId}\n ref={forwardedRef}\n />\n </Menu.Trigger>\n <Menu.Content group={parent} items={menuActions as MenuItem[]} />\n </Menu.Root>\n );\n },\n);\n\nNavTreeItemActionDropdownMenu.displayName = 'NavTreeItemActionDropdownMenu';\n\nexport const NavTreeItemMonolithicAction = (\n props: Node.Action & {\n parent: Node.Node;\n path?: string[];\n onAction?: (action: Node.Action) => void;\n baseLabel: string;\n },\n) => {\n const {\n parent,\n path,\n properties: { disabled, caller, testId, icon, variant = 'ghost', iconOnly = true } = { label: 'never' },\n baseLabel,\n } = props;\n const density = useDensityContext();\n const runAction = useActionRunner();\n return (\n <IconButton\n {...(density === 'lg' ? lgActionButtonProps : mdActionButtonProps)}\n variant={variant}\n classNames={[\n 'shrink-0',\n hoverableControlItem,\n hoverableOpenControlItem,\n iconOnly ? 'px-2 pointer-fine:px-1' : 'p-2 pointer-fine:p-2 me-1',\n ]}\n icon={icon ?? fallbackIcon}\n iconOnly={iconOnly}\n label={baseLabel}\n disabled={disabled}\n onClick={(event) => {\n event.stopPropagation();\n if (disabled) {\n return;\n }\n\n void runAction(props, caller ? { parent, caller, path } : { parent, path });\n }}\n data-testid={testId}\n />\n );\n};\n\nexport const NavTreeItemAction = ({\n monolithic,\n menuActions,\n menuType,\n parent,\n path,\n ...props\n}: NavTreeItemActionMenuProps) => {\n const { t } = useTranslation(meta.profile.key);\n\n const monolithicAction = menuActions?.length === 1 && menuActions[0];\n const baseLabel = toLocalizedString(monolithicAction ? monolithicAction.properties!.label : props.label, t);\n return monolithic && menuActions?.length === 1 ? (\n <NavTreeItemMonolithicAction baseLabel={baseLabel} parent={parent} path={path} {...menuActions[0]} />\n ) : (\n <NavTreeItemActionDropdownMenu {...props} label={baseLabel} parent={parent} path={path} menuActions={menuActions} />\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type Node } from '@dxos/app-graph';\n\nimport { l0ItemType } from '../../util';\nimport { L1Panel, type L1PanelProps } from './L1Panel';\n\nexport type L1TabsProps = Pick<L1PanelProps, 'open' | 'onBack'> & {\n currentItemId: string;\n path: string[];\n topLevelItems: Node.Node[];\n};\n\n/**\n * Each workspace is an L1 tab.\n */\nexport const L1Tabs = ({ topLevelItems, currentItemId, onBack, open, path }: L1TabsProps) => {\n return (\n <>\n {topLevelItems.map((item) => {\n const type = l0ItemType(item);\n if (type === 'tab') {\n return (\n <L1Panel\n key={item.id}\n item={item}\n path={path}\n open={open}\n onBack={onBack}\n isCurrent={item.id === currentItemId}\n />\n );\n }\n return null;\n })}\n </>\n );\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;AAIA,OAAOA,UAASC,cAAAA,aAAYC,WAAAA,gBAAe;AAE3C,SAASC,eAAAA,oBAAmB;AAC5B,SAASC,MAAMC,gBAAgBC,cAAcC,uBAAuB;AAEpE,SAASC,QAAAA,aAAY;AACrB,SAASC,gBAAgB;AAEzB,SAASC,sBAAAA,2BAA0B;;;ACRnC,SAASC,eAAeC,kBAAkB;AAE1C,SAASC,aAAa;AAIf,IAAMC,iBAAiBH,8BAA0C,IAAA;AAEjE,IAAMI,oBAAoB,MAAMH,WAAWE,cAAAA,KAAmBD,MAAM,IAAIG,MAAM,wBAAA,CAAA;;;ACRrF,SAEEC,mBACAC,0BACK;AACP,SAASC,eAAe;AACxB,SAASC,WAAWC,6BAA6B;AACjD,SAASC,8BAA8B;AACvC,SAASC,gCAAgC;AACzC,SAASC,oBAAoB;AAC7B,OAAOC,UAGLC,YACAC,MACAC,aACAC,iBACAC,SACAC,QACAC,gBACK;AAGP,SAASC,gBAAgB;AACzB,SAASC,uBAAuB;AAChC,SACEC,MACAC,YACAC,YAEAC,SACAC,mBACAC,eACAC,sBACK;AACP,SAASC,qBAAqB;AAC9B,SAASC,YAA2B;AACpC,SAASC,YAAY;AACrB,SAASC,UAAU;AACnB,SAASC,iBAAiB;AAE1B,SAASC,uBAAuB;AAChC,SAASC,YAAY;;;AC1CrB,OAAOC,WAAW;AAElB,SAASC,cAA4C;AACrD,SAASC,qBAAqB;AAYvB,IAAMC,oBAAoB,CAAC,EAAEC,MAAMC,QAAQC,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;AACxB;QACF,KAAK;AACHD,8BAAoBI,KAAKH,IAAAA;AACzB;QACF,KAAK;AACH7B,UAAAA,qBAAoB6B;AACpB;MACJ;IACF;AAEA,UAAMhC,mBAAkB4B,YACrBQ,OAAO,CAACC,WAAWA,OAAOJ,WAAWC,gBAAgB,MAAA,EACrDI,SAAS,CAACC,GAAGC,MAAMC,SAASC,QAAQH,EAAEN,YAAYO,EAAEP,UAAU,CAAA;AACjE,UAAM/B,eAAc;SACf6B;SACAH,YAAYQ,OAAO,CAACC,WAAWA,OAAOJ,WAAWC,gBAAgB,SAAA;MACpEI,SAAS,CAACC,GAAGC,MAAMC,SAASC,QAAQH,EAAEN,YAAYO,EAAEP,UAAU,CAAA;AAEhE,WAAO;MACL/B,aAAAA;MACAF,iBAAAA;MACAG,iBAAAA;MACAF,SAAS6B;IACX;EACF,GAAG;IAACF;IAAaF;GAAkB;AAEnC,QAAMtB,gBAAgBI,SACpB,MAAM;OAAIP;OAAYC;OAAiBC,kBAAkB;MAACA;QAAmB,CAAA;KAC7E;IAACF;IAASC;IAAaC;GAAgB;AAGzC,SAAO;IAAEH;IAAiBC;IAASC;IAAaC;IAAiBC;EAAc;AACjF;",
|
|
6
|
-
"names": ["React", "forwardRef", "useMemo", "useAppGraph", "Node", "useConnections", "useActions", "useGraphActions", "Tabs", "Position", "useLoadDescendents", "createContext", "useContext", "raise", "NavTreeContext", "useNavTreeContext", "Error", "attachClosestEdge", "extractClosestEdge", "combine", "draggable", "dropTargetForElements", "preserveOffsetOnSource", "scrollJustEnoughIntoView", "useAtomValue", "React", "forwardRef", "memo", "useCallback", "useLayoutEffect", "useMemo", "useRef", "useState", "DxAvatar", "useActionRunner", "Icon", "IconButton", "ScrollArea", "Tooltip", "toLocalizedString", "useMediaQuery", "useTranslation", "DropIndicator", "Menu", "Tabs", "mx", "arrayMove", "useNavTreeState", "meta", "React", "Avatar", "hexToFallback", "UserAccountAvatar", "size", "userId", "hue", "emoji", "status", "fallbackValue", "hexToFallback", "L0ItemActiveTabIndicator", "classNames", "div", "className", "data-joyride", "Avatar", "Root", "Content", "variant", "fallback", "data-testid", "useL0ItemClick", "item", "parent", "path", "type", "onSelect", "onTabChange", "useNavTreeContext", "getItem", "useNavTreeState", "isLg", "useMediaQuery", "runAction", "useActionRunner", "useCallback", "event", "properties", "caller", "current", "option", "altKey", "l0Breakpoints", "lg", "L0ItemRoot", "memo", "forwardRef", "onMouseEnter", "children", "forwardedRef", "t", "useTranslation", "meta", "profile", "key", "model", "itemPath", "useMemo", "id", "testId", "useAtomValue", "itemProps", "localizedString", "toLocalizedString", "label", "l0ItemType", "handleClick", "React", "Tooltip", "Trigger", "asChild", "delayDuration", "side", "content", "Tabs", "TabPrimitive", "className", "mx", "l0Breakpoint", "tabIndex", "undefined", "data-type", "data-testid", "data-object-id", "value", "onClick", "ref", "L0ItemActiveTabIndicator", "classNames", "div", "L0Item", "pinned", "onRearrange", "onItemHover", "itemElement", "useRef", "closestEdge", "setEdge", "useState", "hue", "useLayoutEffect", "combine", "draggable", "element", "getInitialData", "onGenerateDragPreview", "nativeSetDragImage", "source", "location", "document", "body", "setAttribute", "querySelector", "scrollJustEnoughIntoView", "x", "y", "preserveOffsetOnSource", "input", "container", "offsetParent", "onDragStart", "removeAttribute", "closest", "onDrop", "dropTargetForElements", "getData", "attachClosestEdge", "allowedEdges", "onDragEnter", "self", "data", "extractClosestEdge", "onDrag", "onDragLeave", "handleMouseEnter", "data-frame", "style", "background", "ItemAvatar", "span", "DropIndicator", "edge", "icon", "hueFgStyle", "color", "Icon", "size", "disposition", "DxAvatar", "hueVariant", "variant", "fallback", "L0Menu", "menuActions", "topLevelItems", "pinnedItems", "userAccountItem", "handleAction", "action", "params", "handleRearrange", "target", "sourceItem", "find", "i", "sourceIndex", "findIndex", "targetIndex", "insertIndex", "nextOrder", "arrayMove", "map", "hasRearrangeableItems", "some", "Tablist", "data-tauri-drag-region", "Menu", "Root", "onAction", "IconButton", "density", "iconOnly", "square", "Content", "group", "items", "ScrollArea", "centered", "thin", "orientation", "Viewport", "UserAccountAvatar", "userId", "emoji", "status", "Option", "React", "memo", "useCallback", "useMemo", "Paths", "useAppGraph", "Graph", "useActionRunner", "useEdges", "DensityProvider", "IconButton", "ScrollArea", "toLocalizedString", "useTranslation", "Tree", "Menu", "Tabs", "hoverableControlItem", "hoverableOpenControlItem", "getListActions", "useActions", "useLoadDescendents", "meta", "React", "Fragment", "memo", "useMemo", "Popover", "toLocalizedString", "useTranslation", "Treegrid", "getListActions", "useActions", "meta", "React", "useCallback", "useActionRunner", "IconButton", "toLocalizedString", "useDensityContext", "useTranslation", "composable", "composableProps", "Menu", "hoverableControlItem", "hoverableOpenControlItem", "meta", "fallbackIcon", "mdActionButtonProps", "size", "density", "lgActionButtonProps", "NavTreeItemActionDropdownMenu", "parent", "path", "label", "icon", "testId", "menuActions", "caller", "props", "forwardedRef", "t", "profile", "key", "runAction", "handleAction", "action", "params", "Root", "onAction", "Trigger", "asChild", "classNames", "variant", "iconOnly", "data-testid", "ref", "Content", "group", "items", "displayName", "NavTreeItemMonolithicAction", "properties", "disabled", "baseLabel", "onClick", "event", "stopPropagation", "NavTreeItemColumns", "memo", "path", "item", "open", "t", "useTranslation", "meta", "profile", "key", "renderItemEnd", "ItemEnd", "popoverAnchorId", "useNavTreeContext", "level", "length", "flattenedActions", "useActions", "allActions", "useMemo", "getListActions", "anchored", "NAV_TREE_ITEM", "id", "ActionRoot", "Popover", "Anchor", "Fragment", "React", "div", "className", "Treegrid", "Cell", "classNames", "NavTreeItemMonolithicAction", "baseLabel", "toLocalizedString", "properties", "label", "parent", "NavTreeItemActionDropdownMenu", "testId", "icon", "menuActions", "caller", "node", "L1Panel$", "open", "path", "item", "isCurrent", "onBack", "t", "useTranslation", "meta", "profile", "key", "title", "toLocalizedString", "properties", "label", "isActivated", "useIsActivatedWorkspace", "shouldRenderContent", "React", "Tabs", "Panel", "id", "value", "classNames", "tabIndex", "aria-label", "inert", "L1PanelContent", "graph", "useAppGraph", "edges", "useEdges", "useMemo", "childIds", "Graph", "relationKey", "some", "childId", "child", "getNode", "isNone", "disposition", "undefined", "navTreeContext", "useNavTreeContext", "DensityProvider", "density", "L1PanelHeader", "ScrollArea", "Root", "thin", "orientation", "Viewport", "Tree", "model", "rootId", "levelOffset", "draggable", "gridTemplateColumns", "renderColumns", "NavTreeItemColumns", "blockInstruction", "canDrop", "canSelect", "onOpenChange", "onSelect", "onItemHover", "renderItemEnd", "ItemEnd", "backCapableWorkspace", "Paths", "isPinnedWorkspace", "menuActions", "onAction", "useL1MenuActions", "useLoadDescendents", "div", "data-tauri-drag-region", "className", "IconButton", "hoverableControlItem", "hoverableOpenControlItem", "variant", "icon", "iconOnly", "size", "data-testid", "onClick", "h2", "MenuActions", "node", "length", "testId", "Menu", "caller", "NAV_TREE_ITEM", "Trigger", "asChild", "Content", "group", "items", "runAction", "useActionRunner", "getListActions", "useActions", "useCallback", "action", "params", "L1Panel", "memo", "React", "L1Tabs", "topLevelItems", "currentItemId", "onBack", "open", "path", "React", "map", "item", "type", "l0ItemType", "L1Panel", "key", "id", "isCurrent", "NAV_TREE_ITEM", "NavTree", "forwardRef", "id", "root", "tab", "props", "forwardedRef", "onBack", "onItemHover", "useNavTreeContext", "topLevelActions", "l0Items", "pinnedItems", "userAccountItem", "topLevelItems", "useTopLevelNavItems", "useLoadDescendents", "path", "useMemo", "React", "Tabs", "Root", "value", "orientation", "classNames", "ref", "L0Menu", "menuActions", "parent", "L1Tabs", "currentItemId", "graph", "useAppGraph", "rootId", "Node", "RootId", "rootOutboundItems", "useConnections", "rootActions", "useGraphActions", "topLevelWorkspaces", "outboundPinnedItems", "node", "properties", "disposition", "push", "filter", "action", "toSorted", "a", "b", "Position", "compare"]
|
|
7
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
NODE_TYPE
|
|
3
|
-
} from "../chunk-4RN6TH36.mjs";
|
|
4
|
-
import "../chunk-JOSNCOV4.mjs";
|
|
5
|
-
import "../chunk-J5LGTIGS.mjs";
|
|
6
|
-
|
|
7
|
-
// src/containers/index.ts
|
|
8
|
-
import { lazy } from "react";
|
|
9
|
-
var CommandsDialogContent = lazy(() => import("../CommandsDialogContent-TEKBCQ3U.mjs"));
|
|
10
|
-
var CommandsTrigger = lazy(() => import("../CommandsTrigger-HGCI22SP.mjs"));
|
|
11
|
-
var NavTreeContainer = lazy(() => import("../NavTreeContainer-ICDKC2GI.mjs"));
|
|
12
|
-
var NavTreeDocumentTitle = lazy(() => import("../NavTreeDocumentTitle-RMERXZGK.mjs"));
|
|
13
|
-
export {
|
|
14
|
-
CommandsDialogContent,
|
|
15
|
-
CommandsTrigger,
|
|
16
|
-
NODE_TYPE,
|
|
17
|
-
NavTreeContainer,
|
|
18
|
-
NavTreeDocumentTitle
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/containers/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type ComponentType, lazy } from 'react';\n\nexport { NODE_TYPE } from './NavTreeContainer';\n\nexport const CommandsDialogContent: ComponentType<any> = lazy(() => import('./CommandsDialogContent'));\nexport const CommandsTrigger: ComponentType<any> = lazy(() => import('./CommandsTrigger'));\nexport const NavTreeContainer: ComponentType<any> = lazy(() => import('./NavTreeContainer'));\nexport const NavTreeDocumentTitle: ComponentType<any> = lazy(() => import('./NavTreeDocumentTitle'));\n"],
|
|
5
|
-
"mappings": ";;;;;;;AAIA,SAA6BA,YAAY;AAIlC,IAAMC,wBAA4CD,KAAK,MAAM,OAAO,uCAAA,CAAA;AACpE,IAAME,kBAAsCF,KAAK,MAAM,OAAO,iCAAA,CAAA;AAC9D,IAAMG,mBAAuCH,KAAK,MAAM,OAAO,kCAAA,CAAA;AAC/D,IAAMI,uBAA2CJ,KAAK,MAAM,OAAO,sCAAA,CAAA;",
|
|
6
|
-
"names": ["lazy", "CommandsDialogContent", "CommandsTrigger", "NavTreeContainer", "NavTreeDocumentTitle"]
|
|
7
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
NavTreeCapabilities_exports
|
|
3
|
-
} from "./chunk-BAVI2K7A.mjs";
|
|
4
|
-
import "./chunk-J5LGTIGS.mjs";
|
|
5
|
-
|
|
6
|
-
// src/operations/expose.ts
|
|
7
|
-
import * as Effect from "effect/Effect";
|
|
8
|
-
import * as Option from "effect/Option";
|
|
9
|
-
import { Capability } from "@dxos/app-framework";
|
|
10
|
-
import { AppCapabilities, LayoutOperation } from "@dxos/app-toolkit";
|
|
11
|
-
import { Operation } from "@dxos/compute";
|
|
12
|
-
import { log } from "@dxos/log";
|
|
13
|
-
import { Graph } from "@dxos/plugin-graph";
|
|
14
|
-
import { expandAttendableId } from "@dxos/react-ui-attention";
|
|
15
|
-
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-navtree/src/operations/expose.ts";
|
|
16
|
-
var handler = LayoutOperation.Expose.pipe(Operation.withHandler(Effect.fnUntraced(function* ({ subject }) {
|
|
17
|
-
const { graph } = yield* Capability.get(AppCapabilities.AppGraph);
|
|
18
|
-
const { getItem, setItem } = yield* Capability.get(NavTreeCapabilities_exports.State);
|
|
19
|
-
const prefixes = expandAttendableId(subject);
|
|
20
|
-
for (const qualifiedId of prefixes) {
|
|
21
|
-
Graph.expand(graph, qualifiedId, "child");
|
|
22
|
-
const treePath = prefixes.slice(0, prefixes.indexOf(qualifiedId) + 1);
|
|
23
|
-
const state = getItem(treePath);
|
|
24
|
-
if (!state.open) {
|
|
25
|
-
setItem(treePath, "open", true);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
if (Option.isNone(Graph.getNode(graph, subject))) {
|
|
29
|
-
log("Node not found after expansion", {
|
|
30
|
-
subject
|
|
31
|
-
}, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 26, S: this });
|
|
32
|
-
}
|
|
33
|
-
})));
|
|
34
|
-
var expose_default = handler;
|
|
35
|
-
export {
|
|
36
|
-
expose_default as default
|
|
37
|
-
};
|
|
38
|
-
//# sourceMappingURL=expose-HIBA2NQG.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/operations/expose.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppCapabilities, LayoutOperation } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\nimport { log } from '@dxos/log';\nimport { Graph } from '@dxos/plugin-graph';\nimport { expandAttendableId } from '@dxos/react-ui-attention';\n\nimport { NavTreeCapabilities } from '../types';\n\nconst handler: Operation.WithHandler<typeof LayoutOperation.Expose> = LayoutOperation.Expose.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* ({ subject }) {\n const { graph } = yield* Capability.get(AppCapabilities.AppGraph);\n const { getItem, setItem } = yield* Capability.get(NavTreeCapabilities.State);\n\n const prefixes = expandAttendableId(subject);\n\n for (const qualifiedId of prefixes) {\n Graph.expand(graph, qualifiedId, 'child');\n\n const treePath = prefixes.slice(0, prefixes.indexOf(qualifiedId) + 1);\n const state = getItem(treePath);\n if (!state.open) {\n setItem(treePath, 'open', true);\n }\n }\n\n if (Option.isNone(Graph.getNode(graph, subject))) {\n log('Node not found after expansion', { subject });\n }\n }),\n ),\n);\n\nexport default handler;\n"],
|
|
5
|
-
"mappings": ";;;;;;AAIA,YAAYA,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,iBAAiBC,uBAAuB;AACjD,SAASC,iBAAiB;AAC1B,SAASC,WAAW;AACpB,SAASC,aAAa;AACtB,SAASC,0BAA0B;AAInC,IAAA,eAAsEC;IAIhE,UAAQC,gBAAkB,OAAG,KAAOC,UAAc,YAACC,kBAAyB,WAAA,EAAA,QAAA,GAAA;AAE5E,QAAMC,EAAAA,MAAAA,IAAWC,OAAAA,WAAmBC,IAAAA,gBAAAA,QAAAA;AAEpC,QAAK,EAAA,SAAMC,QAAAA,IAAeH,OAAU,WAAA,IAAA,4BAAA,KAAA;QAClCI,WAAaC,mBAAOF,OAAa;aAE3BG,eAAWN,UAAc;AAC/B,UAAMO,OAAAA,OAAQV,aAAQS,OAAAA;AACtB,UAAKC,WAAY,SAAA,MAAA,GAAA,SAAA,QAAA,WAAA,IAAA,CAAA;UACfC,QAAQF,QAAU,QAAQ;AAC5B,QAAA,CAAA,MAAA,MAAA;AACF,cAAA,UAAA,QAAA,IAAA;IAEIG;;MACsCP,cAAAA,MAAAA,QAAAA,OAAAA,OAAAA,CAAAA,GAAAA;AAAQ,QAAA,kCAAA;MAClD;IACF,GAAA,EAAA,YAAA,YAAA,GAAA,cAAA,GAAA,IAAA,GAAA,KAAA,CAAA;EAIJ;;;",
|
|
6
|
-
"names": ["Effect", "Option", "Capability", "AppCapabilities", "LayoutOperation", "Operation", "log", "Graph", "expandAttendableId", "LayoutOperation", "getItem", "Capability", "NavTreeCapabilities", "prefixes", "expandAttendableId", "subject", "qualifiedId", "Graph", "graph", "treePath", "state", "setItem", "Option"]
|
|
7
|
-
}
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
filterItems
|
|
3
|
-
} from "../chunk-JOSNCOV4.mjs";
|
|
4
|
-
import "../chunk-J5LGTIGS.mjs";
|
|
5
|
-
|
|
6
|
-
// src/hooks/useActions.ts
|
|
7
|
-
import { useMemo } from "react";
|
|
8
|
-
import { useAppGraph } from "@dxos/app-toolkit/ui";
|
|
9
|
-
import { Graph, Node, useActions as useGraphActions } from "@dxos/plugin-graph";
|
|
10
|
-
var getListActions = ({ actions, groupedActions }) => actions.flatMap((action) => Node.isAction(action) ? [
|
|
11
|
-
action
|
|
12
|
-
] : groupedActions[action.id] ?? []).filter((action) => [
|
|
13
|
-
"list-item",
|
|
14
|
-
"list-item-primary"
|
|
15
|
-
].includes(action.properties?.disposition));
|
|
16
|
-
var useActions = (node) => {
|
|
17
|
-
const { graph } = useAppGraph();
|
|
18
|
-
const actions = useGraphActions(graph, node.id);
|
|
19
|
-
return useMemo(() => {
|
|
20
|
-
return actions.reduce((acc, arg) => {
|
|
21
|
-
if (arg.properties.disposition === "item") {
|
|
22
|
-
return acc;
|
|
23
|
-
}
|
|
24
|
-
acc.actions.push(arg);
|
|
25
|
-
if (!Node.isAction(arg)) {
|
|
26
|
-
const actionGroup = Graph.getActions(graph, arg.id);
|
|
27
|
-
acc.groupedActions[arg.id] = actionGroup;
|
|
28
|
-
}
|
|
29
|
-
return acc;
|
|
30
|
-
}, {
|
|
31
|
-
actions: [],
|
|
32
|
-
groupedActions: {}
|
|
33
|
-
});
|
|
34
|
-
}, [
|
|
35
|
-
actions
|
|
36
|
-
]);
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
// src/hooks/useLoadDescendents.ts
|
|
40
|
-
import { useEffect } from "react";
|
|
41
|
-
import { useAppGraph as useAppGraph2 } from "@dxos/app-toolkit/ui";
|
|
42
|
-
import { Graph as Graph2 } from "@dxos/plugin-graph";
|
|
43
|
-
var useLoadDescendents = (root) => {
|
|
44
|
-
const { graph } = useAppGraph2();
|
|
45
|
-
useEffect(() => {
|
|
46
|
-
if (!root) {
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
Graph2.expand(graph, root.id, "child");
|
|
50
|
-
}, [
|
|
51
|
-
graph,
|
|
52
|
-
root
|
|
53
|
-
]);
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
// src/hooks/useNavTreeModel.ts
|
|
57
|
-
import { Atom } from "@effect-atom/atom-react";
|
|
58
|
-
import * as Option from "effect/Option";
|
|
59
|
-
import { useMemo as useMemo3 } from "react";
|
|
60
|
-
import { useAppGraph as useAppGraph3 } from "@dxos/app-toolkit/ui";
|
|
61
|
-
import { PLANK_COMPANION_TYPE } from "@dxos/plugin-deck";
|
|
62
|
-
import { Path } from "@dxos/react-ui-list";
|
|
63
|
-
import { mx } from "@dxos/ui-theme";
|
|
64
|
-
|
|
65
|
-
// src/hooks/useNavTreeState.ts
|
|
66
|
-
import { useAtomValue } from "@effect-atom/atom-react";
|
|
67
|
-
import { useMemo as useMemo2 } from "react";
|
|
68
|
-
import { useCapability } from "@dxos/app-framework/ui";
|
|
69
|
-
import { NavTreeCapabilities } from "#types";
|
|
70
|
-
var useNavTreeState = () => {
|
|
71
|
-
return useCapability(NavTreeCapabilities.State);
|
|
72
|
-
};
|
|
73
|
-
var useNavTreeItemState = (path) => {
|
|
74
|
-
const { getItemAtom } = useCapability(NavTreeCapabilities.State);
|
|
75
|
-
const pathKey = useMemo2(() => path.join("~"), [
|
|
76
|
-
path
|
|
77
|
-
]);
|
|
78
|
-
const atom = useMemo2(() => getItemAtom(path), [
|
|
79
|
-
getItemAtom,
|
|
80
|
-
pathKey
|
|
81
|
-
]);
|
|
82
|
-
return useAtomValue(atom);
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
// src/hooks/useNavTreeModel.ts
|
|
86
|
-
var isVisibleChild = (node) => node.type !== PLANK_COMPANION_TYPE && node.properties.disposition !== "hidden";
|
|
87
|
-
var createItemPropsFamily = (graph) => Atom.family((pathKey) => {
|
|
88
|
-
const path = Path.parts(pathKey);
|
|
89
|
-
const id = Path.last(pathKey);
|
|
90
|
-
return Atom.make((get) => {
|
|
91
|
-
const nodeOpt = get(graph.node(id));
|
|
92
|
-
const node = Option.getOrElse(nodeOpt, () => void 0);
|
|
93
|
-
if (!node) {
|
|
94
|
-
return {
|
|
95
|
-
id,
|
|
96
|
-
label: id
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
const safeChildren = get(graph.connections(node.id, "child")).filter((child) => !path.includes(child.id));
|
|
100
|
-
const visibleChildren = safeChildren.filter(isVisibleChild);
|
|
101
|
-
const parentOf = visibleChildren.length > 0 ? visibleChildren.map((child) => child.id) : node.properties.role === "branch" ? [] : void 0;
|
|
102
|
-
const parentId = path.length >= 2 ? path[path.length - 2] : void 0;
|
|
103
|
-
const parentNode = parentId ? Option.getOrElse(get(graph.node(parentId)), () => void 0) : void 0;
|
|
104
|
-
const droppable = node.properties.droppable === false || parentNode?.properties.childrenDroppable === false ? false : void 0;
|
|
105
|
-
const disposition = node.properties.disposition;
|
|
106
|
-
const isGroup = disposition === "group";
|
|
107
|
-
return {
|
|
108
|
-
id: node.id,
|
|
109
|
-
parentOf: isGroup ? void 0 : parentOf,
|
|
110
|
-
disposition,
|
|
111
|
-
disabled: isGroup || node.properties.disabled,
|
|
112
|
-
draggable: isGroup ? false : node.properties.draggable,
|
|
113
|
-
droppable: isGroup ? false : droppable,
|
|
114
|
-
label: node.properties.label ?? node.id,
|
|
115
|
-
className: mx(node.properties.className, node.properties.modified && "italic"),
|
|
116
|
-
headingClassName: node.properties.headingClassName,
|
|
117
|
-
icon: node.properties.icon,
|
|
118
|
-
iconHue: node.properties.iconHue,
|
|
119
|
-
testId: node.properties.testId,
|
|
120
|
-
count: node.properties.count,
|
|
121
|
-
modifiedCount: node.properties.modifiedCount
|
|
122
|
-
};
|
|
123
|
-
}).pipe(Atom.keepAlive);
|
|
124
|
-
});
|
|
125
|
-
var createChildIdsFamily = (graph) => Atom.family((id) => Atom.make((get) => get(graph.connections(id, "child")).map((child) => child.id)).pipe(Atom.keepAlive));
|
|
126
|
-
var createItemFamily = (graph) => Atom.family((id) => Atom.make((get) => {
|
|
127
|
-
const node = Option.getOrElse(get(graph.node(id)), () => void 0);
|
|
128
|
-
return node && filterItems(node) ? node : void 0;
|
|
129
|
-
}).pipe(Atom.keepAlive));
|
|
130
|
-
var createItemOpenFamily = (getItemAtom) => Atom.family((pathKey) => {
|
|
131
|
-
const path = Path.parts(pathKey);
|
|
132
|
-
const stateAtom = getItemAtom(path);
|
|
133
|
-
return Atom.make((get) => get(stateAtom).open).pipe(Atom.keepAlive);
|
|
134
|
-
});
|
|
135
|
-
var createItemCurrentFamily = (getItemAtom) => Atom.family((pathKey) => {
|
|
136
|
-
const path = Path.parts(pathKey);
|
|
137
|
-
const stateAtom = getItemAtom(path);
|
|
138
|
-
return Atom.make((get) => get(stateAtom).current).pipe(Atom.keepAlive);
|
|
139
|
-
});
|
|
140
|
-
var useNavTreeModel = (rootId) => {
|
|
141
|
-
const { graph } = useAppGraph3();
|
|
142
|
-
const { getItemAtom } = useNavTreeState();
|
|
143
|
-
const itemPropsFamily = useMemo3(() => createItemPropsFamily(graph), [
|
|
144
|
-
graph
|
|
145
|
-
]);
|
|
146
|
-
const childIdsFamily = useMemo3(() => createChildIdsFamily(graph), [
|
|
147
|
-
graph
|
|
148
|
-
]);
|
|
149
|
-
const itemFamily = useMemo3(() => createItemFamily(graph), [
|
|
150
|
-
graph
|
|
151
|
-
]);
|
|
152
|
-
const itemOpenFamily = useMemo3(() => createItemOpenFamily(getItemAtom), [
|
|
153
|
-
getItemAtom
|
|
154
|
-
]);
|
|
155
|
-
const itemCurrentFamily = useMemo3(() => createItemCurrentFamily(getItemAtom), [
|
|
156
|
-
getItemAtom
|
|
157
|
-
]);
|
|
158
|
-
return useMemo3(() => ({
|
|
159
|
-
item: (id) => itemFamily(id),
|
|
160
|
-
itemProps: (path) => itemPropsFamily(Path.create(...path)),
|
|
161
|
-
itemOpen: (path) => itemOpenFamily(Path.create(...path)),
|
|
162
|
-
itemCurrent: (path) => itemCurrentFamily(Path.create(...path)),
|
|
163
|
-
childIds: (parentId) => childIdsFamily(parentId ?? rootId)
|
|
164
|
-
}), [
|
|
165
|
-
itemFamily,
|
|
166
|
-
itemPropsFamily,
|
|
167
|
-
itemOpenFamily,
|
|
168
|
-
itemCurrentFamily,
|
|
169
|
-
childIdsFamily,
|
|
170
|
-
rootId
|
|
171
|
-
]);
|
|
172
|
-
};
|
|
173
|
-
export {
|
|
174
|
-
getListActions,
|
|
175
|
-
useActions,
|
|
176
|
-
useLoadDescendents,
|
|
177
|
-
useNavTreeItemState,
|
|
178
|
-
useNavTreeModel,
|
|
179
|
-
useNavTreeState
|
|
180
|
-
};
|
|
181
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/hooks/useActions.ts", "../../../../src/hooks/useLoadDescendents.ts", "../../../../src/hooks/useNavTreeModel.ts", "../../../../src/hooks/useNavTreeState.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { useMemo } from 'react';\n\nimport { useAppGraph } from '@dxos/app-toolkit/ui';\nimport { Graph, Node, useActions as useGraphActions } from '@dxos/plugin-graph';\n\nimport { type FlattenedActions } from '#types';\n\n/**\n * Flattens grouped actions and filters to the list-item dispositions rendered as\n * navtree item actions. Shared by row (`NavTreeItemColumns`) and header (`L1Panel`)\n * so both apply the same normalization rule.\n */\nexport const getListActions = ({ actions, groupedActions }: FlattenedActions): Node.Action[] =>\n actions\n .flatMap((action) => (Node.isAction(action) ? [action] : (groupedActions[action.id] ?? [])))\n .filter((action) => ['list-item', 'list-item-primary'].includes(action.properties?.disposition));\n\n/** Returns flattened actions and grouped sub-actions for a given graph node. */\nexport const useActions = (node: Node.Node): FlattenedActions => {\n const { graph } = useAppGraph();\n const actions = useGraphActions(graph, node.id);\n\n return useMemo(() => {\n return actions.reduce(\n (acc: FlattenedActions, arg) => {\n if (arg.properties.disposition === 'item') {\n return acc;\n }\n\n acc.actions.push(arg);\n if (!Node.isAction(arg)) {\n const actionGroup = Graph.getActions(graph, arg.id);\n acc.groupedActions[arg.id] = actionGroup;\n }\n return acc;\n },\n { actions: [], groupedActions: {} },\n );\n }, [actions]);\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useEffect } from 'react';\n\nimport { type Node } from '@dxos/app-graph';\nimport { useAppGraph } from '@dxos/app-toolkit/ui';\nimport { Graph } from '@dxos/plugin-graph';\n\n/**\n * Expands a root node in the app graph.\n */\nexport const useLoadDescendents = (root?: Node.Node) => {\n const { graph } = useAppGraph();\n useEffect(() => {\n if (!root) {\n return;\n }\n\n Graph.expand(graph, root.id, 'child');\n }, [graph, root]);\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Atom } from '@effect-atom/atom-react';\nimport * as Option from 'effect/Option';\nimport { useMemo } from 'react';\n\nimport { useAppGraph } from '@dxos/app-toolkit/ui';\nimport { PLANK_COMPANION_TYPE } from '@dxos/plugin-deck';\nimport { type Node } from '@dxos/plugin-graph';\nimport { Path, type TreeModel } from '@dxos/react-ui-list';\nimport { mx } from '@dxos/ui-theme';\n\nimport { type NavTreeItemGraphNode } from '#types';\n\nimport { filterItems } from '../util';\nimport { useNavTreeState } from './useNavTreeState';\n\n// TODO(wittjosiah): Move companion/hidden nodes to their own edge categories so this filter is unnecessary.\nconst isVisibleChild = (node: Node.Node): boolean =>\n node.type !== PLANK_COMPANION_TYPE && node.properties.disposition !== 'hidden';\n\n/** Create an atom family for item display props keyed by path. */\nconst createItemPropsFamily = (graph: ReturnType<typeof useAppGraph>['graph']) =>\n Atom.family((pathKey: string) => {\n const path = Path.parts(pathKey);\n const id = Path.last(pathKey);\n return Atom.make((get) => {\n const nodeOpt = get(graph.node(id));\n const node = Option.getOrElse(nodeOpt, () => undefined);\n if (!node) {\n return { id, label: id };\n }\n const safeChildren = get(graph.connections(node.id, 'child')).filter((child) => !path.includes(child.id));\n const visibleChildren = safeChildren.filter(isVisibleChild);\n const parentOf =\n visibleChildren.length > 0\n ? visibleChildren.map((child) => child.id)\n : node.properties.role === 'branch'\n ? []\n : undefined;\n const parentId = path.length >= 2 ? path[path.length - 2] : undefined;\n const parentNode = parentId ? Option.getOrElse(get(graph.node(parentId)), () => undefined) : undefined;\n const droppable =\n node.properties.droppable === false || parentNode?.properties.childrenDroppable === false ? false : undefined;\n\n const disposition = node.properties.disposition as string | undefined;\n const isGroup = disposition === 'group';\n\n return {\n id: node.id,\n parentOf: isGroup ? undefined : parentOf,\n disposition,\n disabled: isGroup || node.properties.disabled,\n draggable: isGroup ? false : node.properties.draggable,\n droppable: isGroup ? false : droppable,\n label: node.properties.label ?? node.id,\n className: mx(node.properties.className, node.properties.modified && 'italic'),\n headingClassName: node.properties.headingClassName,\n icon: node.properties.icon,\n iconHue: node.properties.iconHue,\n testId: node.properties.testId,\n count: node.properties.count,\n modifiedCount: node.properties.modifiedCount,\n };\n }).pipe(Atom.keepAlive);\n });\n\n/** Create an atom family for outbound child IDs keyed by parent ID (pre-sorted by position on write). */\nconst createChildIdsFamily = (graph: ReturnType<typeof useAppGraph>['graph']) =>\n Atom.family((id: string) =>\n Atom.make((get) => get(graph.connections(id, 'child')).map((child) => child.id)).pipe(Atom.keepAlive),\n );\n\n/** Create an atom family for item resolution keyed by ID. */\nconst createItemFamily = (graph: ReturnType<typeof useAppGraph>['graph']) =>\n Atom.family((id: string) =>\n Atom.make((get) => {\n const node = Option.getOrElse(get(graph.node(id)), () => undefined);\n return node && filterItems(node) ? node : undefined;\n }).pipe(Atom.keepAlive),\n );\n\n/** Create an atom family for open state keyed by path. */\nconst createItemOpenFamily = (getItemAtom: ReturnType<typeof useNavTreeState>['getItemAtom']) =>\n Atom.family((pathKey: string) => {\n const path = Path.parts(pathKey);\n const stateAtom = getItemAtom(path);\n return Atom.make((get) => get(stateAtom).open).pipe(Atom.keepAlive);\n });\n\n/** Create an atom family for current (selected) state keyed by path. */\nconst createItemCurrentFamily = (getItemAtom: ReturnType<typeof useNavTreeState>['getItemAtom']) =>\n Atom.family((pathKey: string) => {\n const path = Path.parts(pathKey);\n const stateAtom = getItemAtom(path);\n return Atom.make((get) => get(stateAtom).current).pipe(Atom.keepAlive);\n });\n\n/**\n * Creates a TreeModel backed by the app graph and navtree state.\n */\nexport const useNavTreeModel = (rootId: string): TreeModel<NavTreeItemGraphNode> => {\n const { graph } = useAppGraph();\n const { getItemAtom } = useNavTreeState();\n\n const itemPropsFamily = useMemo(() => createItemPropsFamily(graph), [graph]);\n const childIdsFamily = useMemo(() => createChildIdsFamily(graph), [graph]);\n const itemFamily = useMemo(() => createItemFamily(graph), [graph]);\n const itemOpenFamily = useMemo(() => createItemOpenFamily(getItemAtom), [getItemAtom]);\n const itemCurrentFamily = useMemo(() => createItemCurrentFamily(getItemAtom), [getItemAtom]);\n\n return useMemo(\n () => ({\n item: (id: string) => itemFamily(id),\n itemProps: (path: string[]) => itemPropsFamily(Path.create(...path)),\n itemOpen: (path: string[]) => itemOpenFamily(Path.create(...path)),\n itemCurrent: (path: string[]) => itemCurrentFamily(Path.create(...path)),\n childIds: (parentId?: string) => childIdsFamily(parentId ?? rootId),\n }),\n [itemFamily, itemPropsFamily, itemOpenFamily, itemCurrentFamily, childIdsFamily, rootId],\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Atom, useAtomValue } from '@effect-atom/atom-react';\nimport { useMemo } from 'react';\n\nimport { useCapability } from '@dxos/app-framework/ui';\n\nimport { NavTreeCapabilities } from '#types';\n\nexport type UseNavTreeStateResult = {\n getItem: (path: string[]) => NavTreeCapabilities.NavTreeItemState;\n getItemAtom: (path: string[]) => Atom.Atom<NavTreeCapabilities.NavTreeItemState>;\n setItem: (path: string[], key: 'open' | 'current', next: boolean) => void;\n};\n\n/**\n * Hook that provides access to navtree state functions.\n * For reactive subscriptions, use `useNavTreeItemState` or `useAtomValue(getItemAtom(path))`.\n */\nexport const useNavTreeState = (): UseNavTreeStateResult => {\n return useCapability(NavTreeCapabilities.State);\n};\n\n/**\n * Hook that subscribes to a single navtree item's state.\n * Use this for fine-grained reactivity.\n */\nexport const useNavTreeItemState = (path: string[]): NavTreeCapabilities.NavTreeItemState => {\n const { getItemAtom } = useCapability(NavTreeCapabilities.State);\n const pathKey = useMemo(() => path.join('~'), [path]);\n const atom = useMemo(() => getItemAtom(path), [getItemAtom, pathKey]);\n return useAtomValue(atom);\n};\n"],
|
|
5
|
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BH,WAAAA,GAAc;IAACA;GAAY;AAE3F,SAAOU,SACL,OAAO;IACLK,MAAM,CAACvD,OAAeoD,WAAWpD,EAAAA;IACjCwD,WAAW,CAAC3D,SAAmBoD,gBAAgBnD,KAAK2D,OAAM,GAAI5D,IAAAA,CAAAA;IAC9D6D,UAAU,CAAC7D,SAAmBwD,eAAevD,KAAK2D,OAAM,GAAI5D,IAAAA,CAAAA;IAC5D8D,aAAa,CAAC9D,SAAmByD,kBAAkBxD,KAAK2D,OAAM,GAAI5D,IAAAA,CAAAA;IAClE+D,UAAU,CAAC1C,aAAsBiC,eAAejC,YAAY4B,MAAAA;EAC9D,IACA;IAACM;IAAYH;IAAiBI;IAAgBC;IAAmBH;IAAgBL;GAAO;AAE5F;",
|
|
6
|
-
"names": ["useMemo", "useAppGraph", "Graph", "Node", "useActions", "useGraphActions", "getListActions", "actions", "groupedActions", "flatMap", "action", "isAction", "id", "filter", "includes", "properties", "disposition", "node", "graph", "reduce", "acc", "arg", "push", "actionGroup", "getActions", "useEffect", "useAppGraph", "Graph", "useLoadDescendents", "root", "graph", "expand", "id", "Atom", "Option", "useMemo", "useAppGraph", "PLANK_COMPANION_TYPE", "Path", "mx", "useAtomValue", "useMemo", "useCapability", "NavTreeCapabilities", "useNavTreeState", "State", "useNavTreeItemState", "path", "getItemAtom", "pathKey", "join", "atom", "isVisibleChild", "node", "type", "PLANK_COMPANION_TYPE", "properties", "disposition", "createItemPropsFamily", "graph", "Atom", "family", "pathKey", "path", "Path", "parts", "id", "last", "make", "get", "nodeOpt", "getOrElse", "undefined", "label", "safeChildren", "connections", "filter", "child", "includes", "visibleChildren", "parentOf", "length", "map", "role", "parentId", "parentNode", "droppable", "childrenDroppable", "isGroup", "disabled", "draggable", "className", "mx", "modified", "headingClassName", "icon", "iconHue", "testId", "count", "modifiedCount", "pipe", "keepAlive", "createChildIdsFamily", "createItemFamily", "filterItems", "createItemOpenFamily", "getItemAtom", "stateAtom", "open", "createItemCurrentFamily", "current", "useNavTreeModel", "rootId", "useAppGraph", "useNavTreeState", "itemPropsFamily", "useMemo", "childIdsFamily", "itemFamily", "itemOpenFamily", "itemCurrentFamily", "item", "itemProps", "create", "itemOpen", "itemCurrent", "childIds"]
|
|
7
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
COMMANDS_DIALOG,
|
|
3
|
-
KEY_BINDING,
|
|
4
|
-
meta
|
|
5
|
-
} from "./chunk-IRQMJLRY.mjs";
|
|
6
|
-
import {
|
|
7
|
-
NavTreeCapabilities_exports,
|
|
8
|
-
NavTreeEvents_exports
|
|
9
|
-
} from "./chunk-BAVI2K7A.mjs";
|
|
10
|
-
import {
|
|
11
|
-
filterItems,
|
|
12
|
-
getChildren,
|
|
13
|
-
getParent,
|
|
14
|
-
getPersistenceParent,
|
|
15
|
-
l0ItemType,
|
|
16
|
-
resolveMigrationOperation,
|
|
17
|
-
sortActions
|
|
18
|
-
} from "./chunk-JOSNCOV4.mjs";
|
|
19
|
-
import "./chunk-J5LGTIGS.mjs";
|
|
20
|
-
export {
|
|
21
|
-
COMMANDS_DIALOG,
|
|
22
|
-
KEY_BINDING,
|
|
23
|
-
NavTreeCapabilities_exports as NavTreeCapabilities,
|
|
24
|
-
NavTreeEvents_exports as NavTreeEvents,
|
|
25
|
-
filterItems,
|
|
26
|
-
getChildren,
|
|
27
|
-
getParent,
|
|
28
|
-
getPersistenceParent,
|
|
29
|
-
l0ItemType,
|
|
30
|
-
meta,
|
|
31
|
-
resolveMigrationOperation,
|
|
32
|
-
sortActions
|
|
33
|
-
};
|
|
34
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
-
|
|
3
|
-
// src/capabilities/keyboard.ts
|
|
4
|
-
import * as Effect from "effect/Effect";
|
|
5
|
-
import { Capabilities, Capability } from "@dxos/app-framework";
|
|
6
|
-
import { AppCapabilities } from "@dxos/app-toolkit";
|
|
7
|
-
import { debounce } from "@dxos/async";
|
|
8
|
-
import { Keyboard } from "@dxos/keyboard";
|
|
9
|
-
import { Graph, Node, runAction } from "@dxos/plugin-graph";
|
|
10
|
-
import { getHostPlatform } from "@dxos/util";
|
|
11
|
-
import { KEY_BINDING } from "#meta";
|
|
12
|
-
var keyboard_default = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
13
|
-
const { graph } = yield* Capability.get(AppCapabilities.AppGraph);
|
|
14
|
-
const invoker = yield* Capability.get(Capabilities.OperationInvoker);
|
|
15
|
-
const pluginContext = yield* Capability.Service;
|
|
16
|
-
const visitor = (node, path) => {
|
|
17
|
-
let shortcut;
|
|
18
|
-
if (typeof node.properties.keyBinding === "object") {
|
|
19
|
-
const availablePlatforms = Object.keys(node.properties.keyBinding);
|
|
20
|
-
const platform = getHostPlatform();
|
|
21
|
-
shortcut = availablePlatforms.includes(platform) ? node.properties.keyBinding[platform] : platform === "ios" ? node.properties.keyBinding.macos : platform === "linux" || platform === "unknown" ? node.properties.keyBinding.windows : void 0;
|
|
22
|
-
} else {
|
|
23
|
-
shortcut = node.properties.keyBinding;
|
|
24
|
-
}
|
|
25
|
-
if (shortcut && Node.isAction(node)) {
|
|
26
|
-
Keyboard.singleton.getContext(path.slice(0, -1).join("/")).bind({
|
|
27
|
-
shortcut,
|
|
28
|
-
handler: () => void runAction(invoker, pluginContext, node, {
|
|
29
|
-
parent: node,
|
|
30
|
-
caller: KEY_BINDING
|
|
31
|
-
}),
|
|
32
|
-
data: node.properties.label
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
const syncBindings = () => {
|
|
37
|
-
Graph.traverse(graph, {
|
|
38
|
-
relation: [
|
|
39
|
-
"child",
|
|
40
|
-
"action"
|
|
41
|
-
],
|
|
42
|
-
visitor
|
|
43
|
-
});
|
|
44
|
-
};
|
|
45
|
-
const eventHandler = debounce(syncBindings, 500);
|
|
46
|
-
const unsubscribe = graph.onNodeChanged.on(eventHandler);
|
|
47
|
-
syncBindings();
|
|
48
|
-
Keyboard.singleton.initialize();
|
|
49
|
-
Keyboard.singleton.setCurrentContext(Node.RootId);
|
|
50
|
-
return Capability.contributes(Capabilities.Null, null, () => Effect.sync(() => {
|
|
51
|
-
unsubscribe();
|
|
52
|
-
Keyboard.singleton.destroy();
|
|
53
|
-
}));
|
|
54
|
-
}));
|
|
55
|
-
export {
|
|
56
|
-
keyboard_default as default
|
|
57
|
-
};
|
|
58
|
-
//# sourceMappingURL=keyboard-JM2HCF5N.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/keyboard.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { AppCapabilities } from '@dxos/app-toolkit';\nimport { debounce } from '@dxos/async';\nimport { Keyboard } from '@dxos/keyboard';\nimport { Graph, Node, runAction } from '@dxos/plugin-graph';\nimport { getHostPlatform } from '@dxos/util';\n\nimport { KEY_BINDING } from '#meta';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const { graph } = yield* Capability.get(AppCapabilities.AppGraph);\n const invoker = yield* Capability.get(Capabilities.OperationInvoker);\n const pluginContext = yield* Capability.Service;\n\n // TODO(wittjosiah): Factor out.\n // TODO(wittjosiah): Handle removal of actions.\n const visitor = (node: Node.Node, path: string[]) => {\n let shortcut: string | undefined;\n if (typeof node.properties.keyBinding === 'object') {\n const availablePlatforms = Object.keys(node.properties.keyBinding);\n const platform = getHostPlatform();\n shortcut = availablePlatforms.includes(platform)\n ? node.properties.keyBinding[platform]\n : platform === 'ios'\n ? node.properties.keyBinding.macos // Fallback to macos if ios-specific bindings not provided.\n : platform === 'linux' || platform === 'unknown'\n ? node.properties.keyBinding.windows // Fallback to windows if platform-specific bindings not provided.\n : undefined;\n } else {\n shortcut = node.properties.keyBinding;\n }\n\n if (shortcut && Node.isAction(node)) {\n Keyboard.singleton.getContext(path.slice(0, -1).join('/')).bind({\n shortcut,\n handler: () => void runAction(invoker, pluginContext, node, { parent: node, caller: KEY_BINDING }),\n data: node.properties.label,\n });\n }\n };\n\n const syncBindings = () => {\n Graph.traverse(graph, { relation: ['child', 'action'], visitor });\n };\n\n const eventHandler = debounce(syncBindings, 500);\n\n const unsubscribe = graph.onNodeChanged.on(eventHandler);\n syncBindings();\n\n // TODO(burdon): Create context and plugin.\n Keyboard.singleton.initialize();\n Keyboard.singleton.setCurrentContext(Node.RootId);\n\n return Capability.contributes(Capabilities.Null, null, () =>\n Effect.sync(() => {\n unsubscribe();\n Keyboard.singleton.destroy();\n }),\n );\n }),\n);\n"],
|
|
5
|
-
"mappings": ";;;AAIA,YAAYA,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,uBAAuB;AAChC,SAASC,gBAAgB;AACzB,SAASC,gBAAgB;AACzB,SAASC,OAAOC,MAAMC,iBAAiB;AACvC,SAASC,uBAAuB;AAEhC,SAASC,mBAAmB;AAE5B,IAAA,mBAAeR,WAAWS,WACjBC,kBAAW,aAAA;AAChB,QAAM,EAAEC,MAAK,IAAK,OAAOX,WAAWY,IAAIX,gBAAgBY,QAAQ;AAChE,QAAMC,UAAU,OAAOd,WAAWY,IAAIb,aAAagB,gBAAgB;AACnE,QAAMC,gBAAgB,OAAOhB,WAAWiB;AAIxC,QAAMC,UAAU,CAACC,MAAiBC,SAAAA;AAChC,QAAIC;AACJ,QAAI,OAAOF,KAAKG,WAAWC,eAAe,UAAU;AAClD,YAAMC,qBAAqBC,OAAOC,KAAKP,KAAKG,WAAWC,UAAU;AACjE,YAAMI,WAAWpB,gBAAAA;AACjBc,iBAAWG,mBAAmBI,SAASD,QAAAA,IACnCR,KAAKG,WAAWC,WAAWI,QAAAA,IAC3BA,aAAa,QACXR,KAAKG,WAAWC,WAAWM,QAC3BF,aAAa,WAAWA,aAAa,YACnCR,KAAKG,WAAWC,WAAWO,UAC3BC;IACV,OAAO;AACLV,iBAAWF,KAAKG,WAAWC;IAC7B;AAEA,QAAIF,YAAYhB,KAAK2B,SAASb,IAAAA,GAAO;AACnChB,eAAS8B,UAAUC,WAAWd,KAAKe,MAAM,GAAG,EAAC,EAAGC,KAAK,GAAA,CAAA,EAAMC,KAAK;QAC9DhB;QACAiB,SAAS,MAAM,KAAKhC,UAAUQ,SAASE,eAAeG,MAAM;UAAEoB,QAAQpB;UAAMqB,QAAQhC;QAAY,CAAA;QAChGiC,MAAMtB,KAAKG,WAAWoB;MACxB,CAAA;IACF;EACF;AAEA,QAAMC,eAAe,MAAA;AACnBvC,UAAMwC,SAASjC,OAAO;MAAEkC,UAAU;QAAC;QAAS;;MAAW3B;IAAQ,CAAA;EACjE;AAEA,QAAM4B,eAAe5C,SAASyC,cAAc,GAAA;AAE5C,QAAMI,cAAcpC,MAAMqC,cAAcC,GAAGH,YAAAA;AAC3CH,eAAAA;AAGAxC,WAAS8B,UAAUiB,WAAU;AAC7B/C,WAAS8B,UAAUkB,kBAAkB9C,KAAK+C,MAAM;AAEhD,SAAOpD,WAAWqD,YAAYtD,aAAauD,MAAM,MAAM,MAC9CC,YAAK,MAAA;AACVR,gBAAAA;AACA5C,aAAS8B,UAAUuB,QAAO;EAC5B,CAAA,CAAA;AAEJ,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "Capabilities", "Capability", "AppCapabilities", "debounce", "Keyboard", "Graph", "Node", "runAction", "getHostPlatform", "KEY_BINDING", "makeModule", "fnUntraced", "graph", "get", "AppGraph", "invoker", "OperationInvoker", "pluginContext", "Service", "visitor", "node", "path", "shortcut", "properties", "keyBinding", "availablePlatforms", "Object", "keys", "platform", "includes", "macos", "windows", "undefined", "isAction", "singleton", "getContext", "slice", "join", "bind", "handler", "parent", "caller", "data", "label", "syncBindings", "traverse", "relation", "eventHandler", "unsubscribe", "onNodeChanged", "on", "initialize", "setCurrentContext", "RootId", "contributes", "Null", "sync", "destroy"]
|
|
7
|
-
}
|