@dxos/plugin-deck 0.7.5-main.9d2a38b → 0.7.5-main.e9bb01b

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 (204) hide show
  1. package/dist/lib/browser/{app-graph-builder-67VRUD5K.mjs → app-graph-builder-CI6ZFMNL.mjs} +57 -31
  2. package/dist/lib/browser/app-graph-builder-CI6ZFMNL.mjs.map +7 -0
  3. package/dist/lib/browser/{check-app-scheme-GEX6W2R5.mjs → check-app-scheme-S3EYUPMF.mjs} +3 -3
  4. package/dist/lib/browser/{check-app-scheme-GEX6W2R5.mjs.map → check-app-scheme-S3EYUPMF.mjs.map} +2 -2
  5. package/dist/lib/browser/chunk-M2L53AIH.mjs +126 -0
  6. package/dist/lib/browser/chunk-M2L53AIH.mjs.map +7 -0
  7. package/dist/lib/browser/{chunk-JQJ5UWVB.mjs → chunk-N7TEPFVR.mjs} +3 -2
  8. package/dist/lib/browser/{chunk-JQJ5UWVB.mjs.map → chunk-N7TEPFVR.mjs.map} +3 -3
  9. package/dist/lib/browser/chunk-NYZJCVAU.mjs +22 -0
  10. package/dist/lib/browser/chunk-NYZJCVAU.mjs.map +7 -0
  11. package/dist/lib/browser/chunk-WXNLVMK2.mjs +1119 -0
  12. package/dist/lib/browser/chunk-WXNLVMK2.mjs.map +7 -0
  13. package/dist/lib/browser/{chunk-5VFDMW5M.mjs → chunk-YQ2GWTDU.mjs} +2 -2
  14. package/dist/lib/browser/chunk-YQ2GWTDU.mjs.map +7 -0
  15. package/dist/lib/browser/index.mjs +32 -78
  16. package/dist/lib/browser/index.mjs.map +4 -4
  17. package/dist/lib/browser/intent-resolver-CSXFDKTC.mjs +494 -0
  18. package/dist/lib/browser/intent-resolver-CSXFDKTC.mjs.map +7 -0
  19. package/dist/lib/browser/meta.json +1 -1
  20. package/dist/lib/browser/{react-root-UL7ZDRVZ.mjs → react-root-ECDQZYQT.mjs} +10 -14
  21. package/dist/lib/browser/react-root-ECDQZYQT.mjs.map +7 -0
  22. package/dist/lib/browser/react-surface-4WIQZW2S.mjs +38 -0
  23. package/dist/lib/browser/react-surface-4WIQZW2S.mjs.map +7 -0
  24. package/dist/lib/browser/{settings-FNWW6WIJ.mjs → settings-WACNLCPB.mjs} +6 -7
  25. package/dist/lib/browser/settings-WACNLCPB.mjs.map +7 -0
  26. package/dist/lib/browser/state-VPOYUKK6.mjs +117 -0
  27. package/dist/lib/browser/state-VPOYUKK6.mjs.map +7 -0
  28. package/dist/lib/browser/types.mjs +16 -4
  29. package/dist/lib/browser/url-handler-HLF42IHP.mjs +70 -0
  30. package/dist/lib/browser/url-handler-HLF42IHP.mjs.map +7 -0
  31. package/dist/types/src/DeckPlugin.d.ts.map +1 -1
  32. package/dist/types/src/capabilities/{layout/app-graph-builder.d.ts → app-graph-builder.d.ts} +22 -22
  33. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
  34. package/dist/types/src/capabilities/capabilities.d.ts +132 -3
  35. package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
  36. package/dist/types/src/capabilities/check-app-scheme.d.ts.map +1 -0
  37. package/dist/types/src/capabilities/index.d.ts +187 -3
  38. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  39. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -0
  40. package/dist/types/src/capabilities/react-root.d.ts.map +1 -0
  41. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  42. package/dist/types/src/capabilities/set-active.d.ts +9 -0
  43. package/dist/types/src/capabilities/set-active.d.ts.map +1 -0
  44. package/dist/types/src/capabilities/settings.d.ts.map +1 -0
  45. package/dist/types/src/capabilities/state.d.ts +76 -0
  46. package/dist/types/src/capabilities/state.d.ts.map +1 -0
  47. package/dist/types/src/capabilities/url-handler.d.ts.map +1 -0
  48. package/dist/types/src/components/DeckLayout/ActiveNode.d.ts.map +1 -1
  49. package/dist/types/src/components/DeckLayout/ComplementarySidebar.d.ts.map +1 -1
  50. package/dist/types/src/components/DeckLayout/ContentEmpty.d.ts.map +1 -1
  51. package/dist/types/src/components/DeckLayout/DeckLayout.d.ts +1 -4
  52. package/dist/types/src/components/DeckLayout/DeckLayout.d.ts.map +1 -1
  53. package/dist/types/src/components/DeckLayout/Fullscreen.d.ts.map +1 -1
  54. package/dist/types/src/components/DeckLayout/NodePlankHeading.d.ts +3 -3
  55. package/dist/types/src/components/DeckLayout/NodePlankHeading.d.ts.map +1 -1
  56. package/dist/types/src/components/DeckLayout/Plank.d.ts +8 -6
  57. package/dist/types/src/components/DeckLayout/Plank.d.ts.map +1 -1
  58. package/dist/types/src/components/DeckLayout/PlankControls.d.ts +2 -2
  59. package/dist/types/src/components/DeckLayout/PlankControls.d.ts.map +1 -1
  60. package/dist/types/src/components/DeckLayout/PlankError.d.ts +4 -3
  61. package/dist/types/src/components/DeckLayout/PlankError.d.ts.map +1 -1
  62. package/dist/types/src/components/DeckLayout/Sidebar.d.ts.map +1 -1
  63. package/dist/types/src/components/DeckLayout/SidebarButton.d.ts +5 -3
  64. package/dist/types/src/components/DeckLayout/SidebarButton.d.ts.map +1 -1
  65. package/dist/types/src/components/DeckLayout/StatusBar.d.ts.map +1 -1
  66. package/dist/types/src/components/DeckLayout/Toast.d.ts +2 -2
  67. package/dist/types/src/components/DeckLayout/Toast.d.ts.map +1 -1
  68. package/dist/types/src/components/fragments.d.ts +2 -0
  69. package/dist/types/src/components/fragments.d.ts.map +1 -1
  70. package/dist/types/src/components/index.d.ts +0 -2
  71. package/dist/types/src/components/index.d.ts.map +1 -1
  72. package/dist/types/src/hooks/useMainSize.d.ts +2 -2
  73. package/dist/types/src/layout.d.ts +5 -19
  74. package/dist/types/src/layout.d.ts.map +1 -1
  75. package/dist/types/src/meta.d.ts +1 -0
  76. package/dist/types/src/meta.d.ts.map +1 -1
  77. package/dist/types/src/translations.d.ts +3 -3
  78. package/dist/types/src/types.d.ts +107 -2
  79. package/dist/types/src/types.d.ts.map +1 -1
  80. package/dist/types/src/util/index.d.ts +2 -1
  81. package/dist/types/src/util/index.d.ts.map +1 -1
  82. package/dist/types/src/util/layoutAppliesTopbar.d.ts +2 -0
  83. package/dist/types/src/util/layoutAppliesTopbar.d.ts.map +1 -0
  84. package/dist/types/src/util/useHoistStatusbar.d.ts.map +1 -1
  85. package/package.json +30 -30
  86. package/src/DeckPlugin.ts +12 -58
  87. package/src/capabilities/{layout/app-graph-builder.ts → app-graph-builder.ts} +36 -28
  88. package/src/capabilities/capabilities.ts +4 -3
  89. package/src/capabilities/{navigation/check-app-scheme.ts → check-app-scheme.ts} +2 -2
  90. package/src/capabilities/index.ts +11 -3
  91. package/src/capabilities/intent-resolver.ts +350 -0
  92. package/src/capabilities/{layout/react-root.tsx → react-root.tsx} +7 -11
  93. package/src/capabilities/react-surface.tsx +31 -0
  94. package/src/capabilities/set-active.ts +43 -0
  95. package/src/capabilities/{settings/settings.ts → settings.ts} +4 -5
  96. package/src/capabilities/state.ts +102 -0
  97. package/src/capabilities/url-handler.ts +63 -0
  98. package/src/components/DeckLayout/ActiveNode.tsx +2 -3
  99. package/src/components/DeckLayout/ComplementarySidebar.tsx +118 -67
  100. package/src/components/DeckLayout/ContentEmpty.tsx +7 -10
  101. package/src/components/DeckLayout/DeckLayout.tsx +103 -61
  102. package/src/components/DeckLayout/Fullscreen.tsx +2 -3
  103. package/src/components/DeckLayout/NodePlankHeading.tsx +57 -65
  104. package/src/components/DeckLayout/Plank.tsx +32 -41
  105. package/src/components/DeckLayout/PlankControls.tsx +11 -10
  106. package/src/components/DeckLayout/PlankError.tsx +6 -5
  107. package/src/components/DeckLayout/Sidebar.tsx +17 -20
  108. package/src/components/DeckLayout/SidebarButton.tsx +25 -31
  109. package/src/components/DeckLayout/StatusBar.tsx +5 -11
  110. package/src/components/DeckLayout/Toast.tsx +2 -2
  111. package/src/components/LayoutSettings.tsx +8 -8
  112. package/src/components/fragments.ts +8 -0
  113. package/src/components/index.ts +0 -2
  114. package/src/hooks/useMainSize.ts +3 -3
  115. package/src/layout.ts +43 -212
  116. package/src/meta.ts +1 -0
  117. package/src/translations.ts +8 -8
  118. package/src/types.ts +88 -2
  119. package/src/util/index.ts +2 -1
  120. package/src/util/layoutAppliesTopbar.ts +7 -0
  121. package/src/util/useHoistStatusbar.ts +17 -8
  122. package/dist/lib/browser/app-graph-builder-67VRUD5K.mjs.map +0 -7
  123. package/dist/lib/browser/chunk-2M4PXYNB.mjs +0 -1052
  124. package/dist/lib/browser/chunk-2M4PXYNB.mjs.map +0 -7
  125. package/dist/lib/browser/chunk-2PJNBVCY.mjs +0 -39
  126. package/dist/lib/browser/chunk-2PJNBVCY.mjs.map +0 -7
  127. package/dist/lib/browser/chunk-4C2AFTET.mjs +0 -186
  128. package/dist/lib/browser/chunk-4C2AFTET.mjs.map +0 -7
  129. package/dist/lib/browser/chunk-5VFDMW5M.mjs.map +0 -7
  130. package/dist/lib/browser/chunk-KY5WXIXY.mjs +0 -44
  131. package/dist/lib/browser/chunk-KY5WXIXY.mjs.map +0 -7
  132. package/dist/lib/browser/deck-PLCSKPGL.mjs +0 -26
  133. package/dist/lib/browser/deck-PLCSKPGL.mjs.map +0 -7
  134. package/dist/lib/browser/intent-resolver-FVOQSTBX.mjs +0 -152
  135. package/dist/lib/browser/intent-resolver-FVOQSTBX.mjs.map +0 -7
  136. package/dist/lib/browser/intent-resolver-K7GW4A2I.mjs +0 -249
  137. package/dist/lib/browser/intent-resolver-K7GW4A2I.mjs.map +0 -7
  138. package/dist/lib/browser/location-QHRBQBQN.mjs +0 -35
  139. package/dist/lib/browser/location-QHRBQBQN.mjs.map +0 -7
  140. package/dist/lib/browser/react-context-3BDW7W2N.mjs +0 -32
  141. package/dist/lib/browser/react-context-3BDW7W2N.mjs.map +0 -7
  142. package/dist/lib/browser/react-root-UL7ZDRVZ.mjs.map +0 -7
  143. package/dist/lib/browser/react-surface-VPNOGGNN.mjs +0 -28
  144. package/dist/lib/browser/react-surface-VPNOGGNN.mjs.map +0 -7
  145. package/dist/lib/browser/settings-FNWW6WIJ.mjs.map +0 -7
  146. package/dist/lib/browser/state-7I5BD7SE.mjs +0 -34
  147. package/dist/lib/browser/state-7I5BD7SE.mjs.map +0 -7
  148. package/dist/lib/browser/url-handler-Z5B7LD3N.mjs +0 -76
  149. package/dist/lib/browser/url-handler-Z5B7LD3N.mjs.map +0 -7
  150. package/dist/types/src/capabilities/layout/app-graph-builder.d.ts.map +0 -1
  151. package/dist/types/src/capabilities/layout/deck.d.ts +0 -4
  152. package/dist/types/src/capabilities/layout/deck.d.ts.map +0 -1
  153. package/dist/types/src/capabilities/layout/index.d.ts +0 -229
  154. package/dist/types/src/capabilities/layout/index.d.ts.map +0 -1
  155. package/dist/types/src/capabilities/layout/intent-resolver.d.ts.map +0 -1
  156. package/dist/types/src/capabilities/layout/react-context.d.ts +0 -8
  157. package/dist/types/src/capabilities/layout/react-context.d.ts.map +0 -1
  158. package/dist/types/src/capabilities/layout/react-root.d.ts.map +0 -1
  159. package/dist/types/src/capabilities/layout/state.d.ts +0 -42
  160. package/dist/types/src/capabilities/layout/state.d.ts.map +0 -1
  161. package/dist/types/src/capabilities/navigation/check-app-scheme.d.ts.map +0 -1
  162. package/dist/types/src/capabilities/navigation/index.d.ts +0 -5
  163. package/dist/types/src/capabilities/navigation/index.d.ts.map +0 -1
  164. package/dist/types/src/capabilities/navigation/intent-resolver.d.ts +0 -4
  165. package/dist/types/src/capabilities/navigation/intent-resolver.d.ts.map +0 -1
  166. package/dist/types/src/capabilities/navigation/location.d.ts +0 -4
  167. package/dist/types/src/capabilities/navigation/location.d.ts.map +0 -1
  168. package/dist/types/src/capabilities/navigation/set-location.d.ts +0 -10
  169. package/dist/types/src/capabilities/navigation/set-location.d.ts.map +0 -1
  170. package/dist/types/src/capabilities/navigation/url-handler.d.ts.map +0 -1
  171. package/dist/types/src/capabilities/settings/index.d.ts +0 -3
  172. package/dist/types/src/capabilities/settings/index.d.ts.map +0 -1
  173. package/dist/types/src/capabilities/settings/react-surface.d.ts.map +0 -1
  174. package/dist/types/src/capabilities/settings/settings.d.ts.map +0 -1
  175. package/dist/types/src/components/DeckContext.d.ts +0 -11
  176. package/dist/types/src/components/DeckContext.d.ts.map +0 -1
  177. package/dist/types/src/components/LayoutContext.d.ts +0 -5
  178. package/dist/types/src/components/LayoutContext.d.ts.map +0 -1
  179. package/dist/types/src/layout.test.d.ts +0 -2
  180. package/dist/types/src/layout.test.d.ts.map +0 -1
  181. package/dist/types/src/util/layout-parts.d.ts +0 -7
  182. package/dist/types/src/util/layout-parts.d.ts.map +0 -1
  183. package/src/capabilities/layout/deck.ts +0 -25
  184. package/src/capabilities/layout/index.ts +0 -12
  185. package/src/capabilities/layout/intent-resolver.ts +0 -128
  186. package/src/capabilities/layout/react-context.tsx +0 -26
  187. package/src/capabilities/layout/state.ts +0 -32
  188. package/src/capabilities/navigation/index.ts +0 -10
  189. package/src/capabilities/navigation/intent-resolver.ts +0 -216
  190. package/src/capabilities/navigation/location.ts +0 -28
  191. package/src/capabilities/navigation/set-location.ts +0 -38
  192. package/src/capabilities/navigation/url-handler.ts +0 -67
  193. package/src/capabilities/settings/index.ts +0 -8
  194. package/src/capabilities/settings/react-surface.tsx +0 -23
  195. package/src/components/DeckContext.ts +0 -19
  196. package/src/components/LayoutContext.ts +0 -12
  197. package/src/layout.test.ts +0 -380
  198. package/src/util/layout-parts.ts +0 -12
  199. /package/dist/types/src/capabilities/{navigation/check-app-scheme.d.ts → check-app-scheme.d.ts} +0 -0
  200. /package/dist/types/src/capabilities/{layout/intent-resolver.d.ts → intent-resolver.d.ts} +0 -0
  201. /package/dist/types/src/capabilities/{layout/react-root.d.ts → react-root.d.ts} +0 -0
  202. /package/dist/types/src/capabilities/{settings/react-surface.d.ts → react-surface.d.ts} +0 -0
  203. /package/dist/types/src/capabilities/{settings/settings.d.ts → settings.d.ts} +0 -0
  204. /package/dist/types/src/capabilities/{navigation/url-handler.d.ts → url-handler.d.ts} +0 -0
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/components/DeckLayout/constants.ts", "../../../src/components/LayoutContext.ts", "../../../src/components/DeckContext.ts", "../../../src/components/DeckLayout/DeckLayout.tsx", "../../../src/components/DeckLayout/ActiveNode.tsx", "../../../src/hooks/useNode.ts", "../../../src/hooks/useNodeActionExpander.ts", "../../../src/hooks/useMainSize.ts", "../../../src/components/DeckLayout/ComplementarySidebar.tsx", "../../../src/components/DeckLayout/PlankError.tsx", "../../../src/components/DeckLayout/NodePlankHeading.tsx", "../../../src/components/DeckLayout/PlankControls.tsx", "../../../src/components/DeckLayout/SidebarButton.tsx", "../../../src/components/fragments.ts", "../../../src/components/DeckLayout/PlankLoading.tsx", "../../../src/components/DeckLayout/ContentEmpty.tsx", "../../../src/components/DeckLayout/Fullscreen.tsx", "../../../src/components/DeckLayout/Fallback.tsx", "../../../src/components/DeckLayout/Plank.tsx", "../../../src/components/DeckLayout/Sidebar.tsx", "../../../src/components/DeckLayout/Banner.tsx", "../../../src/util/useHoistStatusbar.ts", "../../../src/components/DeckLayout/StatusBar.tsx", "../../../src/components/DeckLayout/Toast.tsx", "../../../src/components/DeckLayout/Topbar.tsx", "../../../src/components/LayoutSettings.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nexport const NAV_ID = 'NavTree';\nexport const SURFACE_PREFIX = 'surface:';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Context, createContext, useContext } from 'react';\n\nimport type { Layout } from '@dxos/app-framework';\nimport { raise } from '@dxos/debug';\n\nexport const LayoutContext: Context<Layout | null> = createContext<Layout | null>(null);\n\nexport const useLayout = (): Layout => useContext(LayoutContext) ?? raise(new Error('Missing LayoutContext'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Context, createContext, useContext } from 'react';\n\nimport { type LayoutMode } from '@dxos/app-framework';\nimport { raise } from '@dxos/debug';\n\nexport type PlankSizing = Record<string, number>;\nexport type DeckContextType = {\n plankSizing: PlankSizing;\n currentUndoId: string | undefined;\n layoutModeHistory: LayoutMode[];\n};\n\nexport const DeckContext: Context<DeckContextType | null> = createContext<DeckContextType | null>(null);\n\nexport const useDeckContext = (): DeckContextType => useContext(DeckContext) ?? raise(new Error('Missing DeckContext'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { untracked } from '@preact/signals-core';\nimport React, { useCallback, useEffect, useMemo, useRef, type UIEvent, Fragment } from 'react';\n\nimport {\n firstIdInPart,\n Surface,\n usePluginManager,\n type LayoutParts,\n type Toast as ToastSchema,\n} from '@dxos/app-framework';\nimport { AttentionCapabilities } from '@dxos/plugin-attention';\nimport { AlertDialog, Dialog as NaturalDialog, Main, Popover, useOnTransition, type MainProps } from '@dxos/react-ui';\nimport { Stack, StackContext, DEFAULT_HORIZONTAL_SIZE } from '@dxos/react-ui-stack';\nimport { mainPaddingTransitions } from '@dxos/react-ui-theme';\n\nimport { ActiveNode } from './ActiveNode';\nimport { ComplementarySidebar, type ComplementarySidebarProps } from './ComplementarySidebar';\nimport { ContentEmpty } from './ContentEmpty';\nimport { Fullscreen } from './Fullscreen';\nimport { Plank } from './Plank';\nimport { Sidebar } from './Sidebar';\nimport { StatusBar } from './StatusBar';\nimport { Toast } from './Toast';\nimport { Topbar } from './Topbar';\nimport { type Overscroll } from '../../types';\nimport { calculateOverscroll, useBreakpoints } from '../../util';\nimport { useHoistStatusbar } from '../../util/useHoistStatusbar';\nimport { useDeckContext } from '../DeckContext';\nimport { useLayout } from '../LayoutContext';\n\nexport type DeckLayoutProps = {\n layoutParts: LayoutParts;\n toasts: ToastSchema[];\n overscroll: Overscroll;\n showHints: boolean;\n onDismissToast: (id: string) => void;\n} & Pick<ComplementarySidebarProps, 'panels'>;\n\nconst PlankSeparator = ({ index }: { index: number }) =>\n index > 0 ? <span role='separator' className='row-span-2 bg-deck is-4' style={{ gridColumn: index * 2 }} /> : null;\n\nexport const DeckLayout = ({ layoutParts, toasts, overscroll, showHints, panels, onDismissToast }: DeckLayoutProps) => {\n const context = useLayout();\n const {\n layoutMode,\n sidebarOpen,\n complementarySidebarOpen,\n dialogOpen,\n dialogContent,\n dialogBlockAlign,\n dialogType,\n popoverOpen,\n popoverContent,\n popoverAnchorId,\n } = context;\n const breakpoint = useBreakpoints();\n const hoistStatusbar = useHoistStatusbar(breakpoint);\n const { plankSizing } = useDeckContext();\n const pluginManager = usePluginManager();\n const fullScreenSlug = useMemo(() => firstIdInPart(layoutParts, 'fullScreen'), [layoutParts]);\n\n const scrollLeftRef = useRef<number | null>();\n const deckRef = useRef<HTMLDivElement>(null);\n\n const isSoloModeLoaded = layoutMode === 'solo' && Boolean(layoutParts.solo?.[0]);\n\n // Ensure the first plank is attended when the deck is first rendered.\n useEffect(() => {\n // NOTE: Not `useAttended` so that the layout component is not re-rendered when the attended list changes.\n const attended = untracked(() => {\n const attention = pluginManager.context.requestCapability(AttentionCapabilities.Attention);\n return attention.current;\n });\n const firstId = isSoloModeLoaded ? firstIdInPart(layoutParts, 'solo') : firstIdInPart(layoutParts, 'main');\n if (attended.length === 0 && firstId) {\n // TODO(wittjosiah): Focusing the type button is a workaround.\n // If the plank is directly focused on first load the focus ring appears.\n document.querySelector<HTMLElement>(`article[data-attendable-id=\"${firstId}\"] button`)?.focus();\n }\n }, []);\n\n /**\n * Clear scroll restoration state if the window is resized\n */\n const handleResize = useCallback(() => {\n scrollLeftRef.current = null;\n }, []);\n\n useEffect(() => {\n window.addEventListener('resize', handleResize);\n return () => window.removeEventListener('resize', handleResize);\n }, [handleResize]);\n\n const restoreScroll = useCallback(() => {\n if (deckRef.current && scrollLeftRef.current != null) {\n deckRef.current.scrollLeft = scrollLeftRef.current;\n }\n }, []);\n\n useOnTransition(layoutMode, (mode) => mode !== 'deck', 'deck', restoreScroll);\n\n /**\n * Save scroll position as the user scrolls\n */\n const handleScroll = useCallback(\n (event: UIEvent) => {\n if (layoutMode === 'deck' && event.currentTarget === event.target) {\n scrollLeftRef.current = (event.target as HTMLDivElement).scrollLeft;\n }\n },\n [layoutMode],\n );\n\n const isEmpty = (layoutParts.main?.length ?? 0) === 0 && (layoutParts.solo?.length ?? 0) === 0;\n\n const padding = useMemo(() => {\n if (layoutMode === 'deck' && overscroll === 'centering') {\n return calculateOverscroll(layoutParts.main?.length ?? 0);\n }\n return {};\n }, [layoutMode, overscroll, layoutParts.main]);\n\n const Dialog = dialogType === 'alert' ? AlertDialog : NaturalDialog;\n\n return (\n <Popover.Root\n modal\n open={!!(popoverAnchorId && popoverOpen)}\n onOpenChange={(nextOpen) => {\n if (nextOpen && popoverAnchorId) {\n context.popoverOpen = true;\n } else {\n context.popoverOpen = false;\n context.popoverAnchorId = undefined;\n }\n }}\n >\n <ActiveNode />\n\n {layoutMode === 'fullscreen' && <Fullscreen id={fullScreenSlug} />}\n\n {layoutMode !== 'fullscreen' && (\n <Main.Root\n navigationSidebarOpen={context.sidebarOpen}\n onNavigationSidebarOpenChange={(next) => (context.sidebarOpen = next)}\n complementarySidebarOpen={context.complementarySidebarOpen}\n onComplementarySidebarOpenChange={(next) => (context.complementarySidebarOpen = next)}\n >\n {/* Left sidebar. */}\n <Sidebar />\n\n {/* Right sidebar. */}\n <ComplementarySidebar panels={panels} current={layoutParts.complementary?.[0].id} />\n\n {/* Dialog overlay to dismiss dialogs. */}\n <Main.Overlay />\n\n {/* No content. */}\n {isEmpty && (\n <Main.Content handlesFocus>\n <ContentEmpty />\n </Main.Content>\n )}\n\n {/* Solo/deck mode. */}\n {!isEmpty && (\n <Main.Content\n bounce\n classNames={[\n 'grid !block-start-[env(safe-area-inset-top)] lg:!block-start-[calc(env(safe-area-inset-top)+var(--rail-size))]',\n hoistStatusbar && 'lg:block-end-[--statusbar-size]',\n ]}\n handlesFocus\n style={\n {\n '--dx-main-sidebarWidth': sidebarOpen ? 'var(--nav-sidebar-size)' : '0px',\n '--dx-main-complementaryWidth': complementarySidebarOpen\n ? 'var(--complementary-sidebar-size)'\n : '0px',\n '--dx-main-contentFirstWidth': `${plankSizing[layoutParts.main?.[0]?.id ?? 'never'] ?? DEFAULT_HORIZONTAL_SIZE}rem`,\n '--dx-main-contentLastWidth': `${plankSizing[layoutParts.main?.[(layoutParts.main?.length ?? 1) - 1]?.id ?? 'never'] ?? DEFAULT_HORIZONTAL_SIZE}rem`,\n } as MainProps['style']\n }\n >\n <div\n role='none'\n className={!isSoloModeLoaded ? 'relative bg-deck overflow-hidden' : 'sr-only'}\n {...(isSoloModeLoaded && { inert: '' })}\n >\n <Stack\n orientation='horizontal'\n size='contain'\n classNames={['absolute inset-block-0 -inset-inline-px', mainPaddingTransitions]}\n onScroll={handleScroll}\n itemsCount={2 * (layoutParts.main?.length ?? 0) - 1}\n style={padding}\n ref={deckRef}\n >\n {layoutParts.main?.map((layoutEntry, index) => (\n <Fragment key={layoutEntry.id}>\n <PlankSeparator index={index} />\n <Plank\n entry={layoutEntry}\n layoutParts={layoutParts}\n part='main'\n layoutMode={layoutMode}\n order={index * 2 + 1}\n />\n </Fragment>\n ))}\n </Stack>\n </div>\n <div\n role='none'\n className={isSoloModeLoaded ? 'relative bg-deck overflow-hidden' : 'sr-only'}\n {...(!isSoloModeLoaded && { inert: '' })}\n >\n <StackContext.Provider value={{ size: 'contain', orientation: 'horizontal', rail: true }}>\n <Plank entry={layoutParts.solo?.[0]} layoutParts={layoutParts} part='solo' layoutMode={layoutMode} />\n </StackContext.Provider>\n </div>\n </Main.Content>\n )}\n\n {/* Status bar. */}\n {breakpoint === 'desktop' && <Topbar />}\n {hoistStatusbar && <StatusBar showHints={showHints} />}\n </Main.Root>\n )}\n\n {/* Global popovers. */}\n <Popover.Portal>\n <Popover.Content\n onEscapeKeyDown={() => {\n context.popoverOpen = false;\n context.popoverAnchorId = undefined;\n }}\n >\n <Popover.Viewport>\n <Surface role='popover' data={popoverContent} limit={1} />\n </Popover.Viewport>\n <Popover.Arrow />\n </Popover.Content>\n </Popover.Portal>\n\n {/* Global dialog. */}\n <Dialog.Root open={dialogOpen} onOpenChange={(nextOpen) => (context.dialogOpen = nextOpen)}>\n <Dialog.Overlay blockAlign={dialogBlockAlign}>\n <Surface role='dialog' data={dialogContent} limit={1} />\n </Dialog.Overlay>\n </Dialog.Root>\n\n {/* Global toasts. */}\n {toasts?.map((toast) => (\n <Toast\n {...toast}\n key={toast.id}\n onOpenChange={(open) => {\n if (!open) {\n onDismissToast(toast.id);\n }\n\n return open;\n }}\n />\n ))}\n </Popover.Root>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Surface } from '@dxos/app-framework';\nimport { useGraph } from '@dxos/plugin-graph';\nimport { useAttended } from '@dxos/react-ui-attention';\n\nimport { useNode, useNodeActionExpander } from '../../hooks';\n\n// TODO(burdon): Factor out to effect in plugin set document title.\nexport const ActiveNode = () => {\n const [id] = useAttended();\n const { graph } = useGraph();\n const activeNode = useNode(graph, id);\n useNodeActionExpander(activeNode);\n\n return (\n <div role='none' className='sr-only'>\n {/* TODO(wittjosiah): Weird that this is a surface, feel like it's not really render logic.\n Probably this lives in React-land currently in order to access translations? */}\n <Surface role='document-title' data={{ subject: activeNode }} limit={1} />\n </div>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { useEffect, useState } from 'react';\n\nimport { type Graph, type Node } from '@dxos/plugin-graph';\n\n/**\n * React hook to get a node from the graph.\n *\n * @param graph Graph to find the node in.\n * @param id Id of the node to find.\n * @param timeout Optional timeout in milliseconds to wait for the node to be found.\n * @returns Node if found, undefined otherwise.\n */\n// TODO(wittjosiah): Factor out.\nexport const useNode = <T = any>(graph: Graph, id?: string, timeout?: number): Node<T> | undefined => {\n const [nodeState, setNodeState] = useState<Node<T> | undefined>(id ? graph.findNode(id, false) : undefined);\n\n useEffect(() => {\n if (!id && nodeState) {\n setNodeState(undefined);\n }\n\n if (nodeState?.id === id || !id) {\n return;\n }\n\n // Set timeout did not seem to effectively not block the UI thread.\n const frame = requestAnimationFrame(async () => {\n try {\n const node = await graph.waitForNode(id, timeout);\n if (node) {\n setNodeState(node);\n }\n } catch {}\n });\n\n return () => cancelAnimationFrame(frame);\n }, [graph, id, timeout, nodeState?.id]);\n\n return nodeState;\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { useEffect } from 'react';\n\nimport { ACTION_GROUP_TYPE, ACTION_TYPE, getGraph, type Node } from '@dxos/plugin-graph';\n\nconst expandNodeActions = async (node: Node) => {\n const graph = getGraph(node);\n await graph.expand(node, 'outbound', ACTION_GROUP_TYPE);\n await graph.expand(node, 'outbound', ACTION_TYPE);\n};\n\nexport const useNodeActionExpander = (node?: Node) => {\n useEffect(() => {\n if (node) {\n const frame = requestAnimationFrame(() => {\n void expandNodeActions(node);\n });\n return () => cancelAnimationFrame(frame);\n }\n }, [node]);\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { useMainContext } from '@dxos/react-ui';\n\nexport const useMainSize = () => {\n const { navigationSidebarOpen, complementarySidebarOpen } = useMainContext('DeckPluginPlank');\n return {\n 'data-sidebar-inline-start-state': navigationSidebarOpen ? 'open' : 'closed',\n 'data-sidebar-inline-end-state': complementarySidebarOpen ? 'open' : 'closed',\n };\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport { createIntent, NavigationAction, SLUG_PATH_SEPARATOR, Surface, useIntentDispatcher } from '@dxos/app-framework';\nimport { useGraph } from '@dxos/plugin-graph';\nimport { Main, ScrollArea, useTranslation, toLocalizedString } from '@dxos/react-ui';\nimport { useAttended } from '@dxos/react-ui-attention';\nimport { railGridHorizontal, StackContext, StackItem } from '@dxos/react-ui-stack';\nimport { Tabs } from '@dxos/react-ui-tabs';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { PlankContentError } from './PlankError';\nimport { PlankLoading } from './PlankLoading';\nimport { CloseComplementarySidebarButton } from './SidebarButton';\nimport { useNode, useNodeActionExpander } from '../../hooks';\nimport { DECK_PLUGIN } from '../../meta';\nimport { type Panel } from '../../types';\nimport { useLayout } from '../LayoutContext';\n\nexport type ComplementarySidebarProps = {\n panels: Panel[];\n current?: string;\n};\n\nexport const ComplementarySidebar = ({ panels, current }: ComplementarySidebarProps) => {\n const { popoverAnchorId } = useLayout();\n const attended = useAttended();\n const panelIds = useMemo(() => panels.map((p) => p.id), [panels]);\n const activePanelId = panelIds.find((p) => p === current) ?? panels[0].id;\n const activeEntryId = attended[0] ? `${attended[0]}${SLUG_PATH_SEPARATOR}${activePanelId}` : undefined;\n const { graph } = useGraph();\n const node = useNode(graph, activeEntryId);\n const { t } = useTranslation(DECK_PLUGIN);\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n useNodeActionExpander(node);\n\n const [internalValue, setInternalValue] = useState(activePanelId);\n\n useEffect(() => {\n setInternalValue(activePanelId);\n }, [activePanelId]);\n\n const handleValueChange = useCallback(\n (nextValue: string) => {\n setInternalValue(nextValue);\n void dispatch(createIntent(NavigationAction.Open, { activeParts: { complementary: nextValue } }));\n },\n [dispatch],\n );\n\n // TODO(burdon): Scroll area should be controlled by surface.\n return (\n <Main.ComplementarySidebar classNames='lg:block-start-[calc(env(safe-area-inset-top)+var(--rail-size))]'>\n <StackContext.Provider value={{ size: 'contain', orientation: 'horizontal', rail: true }}>\n <div role='none' className={mx(railGridHorizontal, 'grid grid-cols-[100%] bs-full')}>\n <Tabs.Root\n orientation='horizontal'\n value={internalValue}\n onValueChange={handleValueChange}\n attendableId={attended[0]}\n classNames='contents'\n >\n <StackItem.Heading classNames='border-be border-separator grid grid-cols-[1fr_min-content] items-stretch'>\n <ScrollArea.Root classNames='flex-1 min-is-0'>\n <ScrollArea.Viewport>\n <Tabs.Tablist classNames='bs-[--rail-content] is-min items-stretch pis-[max(.5rem,env(safe-area-inset-left))] sm:pis-2'>\n {panels.map((panel) => (\n <Tabs.Tab key={panel.id} value={panel.id} classNames='!min-bs-0'>\n {toLocalizedString(panel.label, t)}\n </Tabs.Tab>\n ))}\n </Tabs.Tablist>\n <ScrollArea.Scrollbar orientation='horizontal'>\n <ScrollArea.Thumb />\n </ScrollArea.Scrollbar>\n </ScrollArea.Viewport>\n </ScrollArea.Root>\n <CloseComplementarySidebarButton />\n </StackItem.Heading>\n <ScrollArea.Root>\n <ScrollArea.Viewport>\n {panels.map((panel) => (\n <Tabs.Tabpanel key={panel.id} value={panel.id} classNames='pbe-[env(safe-area-inset-bottom)]'>\n {panel.id === activePanelId && node && (\n <Surface\n key={activeEntryId}\n role={`complementary--${activePanelId}`}\n data={{\n id: activeEntryId,\n subject: node.properties.object ?? node.properties.space,\n popoverAnchorId,\n }}\n fallback={PlankContentError}\n placeholder={<PlankLoading />}\n />\n )}\n </Tabs.Tabpanel>\n ))}\n <ScrollArea.Scrollbar orientation='vertical'>\n <ScrollArea.Thumb />\n </ScrollArea.Scrollbar>\n </ScrollArea.Viewport>\n </ScrollArea.Root>\n </Tabs.Root>\n </div>\n </StackContext.Provider>\n </Main.ComplementarySidebar>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useEffect, useState } from 'react';\n\nimport { type LayoutCoordinate } from '@dxos/app-framework';\nimport { type Node } from '@dxos/plugin-graph';\nimport { useTranslation } from '@dxos/react-ui';\nimport { descriptionText, mx } from '@dxos/react-ui-theme';\n\nimport { NodePlankHeading } from './NodePlankHeading';\nimport { PlankLoading } from './PlankLoading';\nimport { DECK_PLUGIN } from '../../meta';\n\nexport const PlankContentError = ({ error }: { error?: Error }) => {\n const { t } = useTranslation(DECK_PLUGIN);\n const errorString = error?.toString() ?? '';\n return (\n <div role='none' className='overflow-auto p-8 attention-surface grid place-items-center'>\n <p\n role='alert'\n className={mx(\n descriptionText,\n 'break-words border border-dashed border-separator rounded-lg p-8',\n errorString.length < 256 && 'text-lg',\n )}\n >\n {error ? errorString : t('error fallback message')}\n </p>\n </div>\n );\n};\n\nexport const PlankError = ({\n layoutCoordinate,\n node,\n error,\n}: {\n layoutCoordinate: LayoutCoordinate;\n node?: Node;\n error?: Error;\n}) => {\n const [timedOut, setTimedOut] = useState(false);\n useEffect(() => {\n setTimeout(() => setTimedOut(true), 5e3);\n }, []);\n return (\n <>\n <NodePlankHeading coordinate={layoutCoordinate} node={node} pending={!timedOut} />\n {timedOut ? <PlankContentError error={error} /> : <PlankLoading />}\n </>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { Fragment, memo, useEffect, useMemo } from 'react';\n\nimport {\n createIntent,\n LayoutAction,\n NavigationAction,\n SLUG_PATH_SEPARATOR,\n Surface,\n useIntentDispatcher,\n type LayoutCoordinate,\n} from '@dxos/app-framework';\nimport { type Node, useGraph } from '@dxos/plugin-graph';\nimport { Icon, Popover, toLocalizedString, useTranslation } from '@dxos/react-ui';\nimport { StackItem, type StackItemSigilAction } from '@dxos/react-ui-stack';\nimport { TextTooltip } from '@dxos/react-ui-text-tooltip';\n\nimport { PlankControls } from './PlankControls';\nimport { ToggleComplementarySidebarButton, ToggleSidebarButton } from './SidebarButton';\nimport { DECK_PLUGIN } from '../../meta';\nimport { useBreakpoints } from '../../util';\nimport { soloInlinePadding } from '../fragments';\n\nexport type NodePlankHeadingProps = {\n coordinate: LayoutCoordinate;\n node?: Node;\n canIncrementStart?: boolean;\n canIncrementEnd?: boolean;\n popoverAnchorId?: string;\n pending?: boolean;\n actions?: StackItemSigilAction[];\n};\n\nexport const NodePlankHeading = memo(\n ({\n coordinate,\n node,\n canIncrementStart,\n canIncrementEnd,\n popoverAnchorId,\n pending,\n actions = [],\n }: NodePlankHeadingProps) => {\n const { t } = useTranslation(DECK_PLUGIN);\n const { graph } = useGraph();\n const icon = node?.properties?.icon ?? 'ph--placeholder--regular';\n const label = pending\n ? t('pending heading')\n : toLocalizedString(node?.properties?.label ?? ['plank heading fallback label', { ns: DECK_PLUGIN }], t);\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n const ActionRoot = node && popoverAnchorId === `dxos.org/ui/${DECK_PLUGIN}/${node.id}` ? Popover.Anchor : Fragment;\n const breakpoint = useBreakpoints();\n\n useEffect(() => {\n const frame = requestAnimationFrame(() => {\n // Load actions for the node.\n node && graph.actions(node);\n });\n\n return () => cancelAnimationFrame(frame);\n }, [node]);\n\n const layoutPart = coordinate.part;\n // NOTE(Zan): Node ids may now contain a path like `${space}:${id}~comments`\n const attendableId = coordinate.entryId.split(SLUG_PATH_SEPARATOR).at(0);\n const capabilities = useMemo(\n () => ({\n solo: layoutPart === 'solo' || layoutPart === 'main',\n incrementStart: canIncrementStart,\n incrementEnd: canIncrementEnd,\n }),\n [breakpoint, layoutPart, canIncrementStart, canIncrementEnd],\n );\n\n return (\n <StackItem.Heading\n classNames={[\n 'plb-1 border-be border-separator items-stretch gap-1',\n layoutPart === 'solo' ? soloInlinePadding : 'pli-1',\n ]}\n >\n <ActionRoot>\n {node ? (\n <StackItem.Sigil\n icon={icon}\n related={layoutPart === 'complementary'}\n attendableId={attendableId}\n triggerLabel={t('actions menu label')}\n actions={[actions, graph.actions(node)].filter((a) => a.length > 0)}\n onAction={(action) =>\n typeof action.data === 'function' && action.data?.({ node: action as Node, caller: DECK_PLUGIN })\n }\n >\n <Surface role='menu-footer' data={{ subject: node.data }} />\n </StackItem.Sigil>\n ) : (\n <StackItem.SigilButton>\n <span className='sr-only'>{label}</span>\n <Icon icon={icon} size={5} />\n </StackItem.SigilButton>\n )}\n </ActionRoot>\n {breakpoint !== 'desktop' && <ToggleSidebarButton />}\n <TextTooltip text={label} onlyWhenTruncating>\n <StackItem.HeadingLabel\n attendableId={attendableId}\n related={layoutPart === 'complementary'}\n {...(pending && { classNames: 'text-description' })}\n >\n {label}\n </StackItem.HeadingLabel>\n </TextTooltip>\n {node && layoutPart !== 'complementary' && (\n // TODO(Zan): What are we doing with layout coordinate here?\n <Surface role='navbar-end' data={{ subject: node.data }} />\n )}\n {/* NOTE(thure): Pinning & unpinning are temporarily disabled */}\n <PlankControls\n capabilities={capabilities}\n isSolo={layoutPart === 'solo'}\n onClick={(eventType) => {\n if (!layoutPart) {\n return;\n }\n\n // TODO(Zan): Update this to use the new layout actions.\n if (eventType === 'solo') {\n return dispatch(\n createIntent(NavigationAction.Adjust, {\n type: eventType,\n layoutCoordinate: { part: 'main', entryId: coordinate.entryId },\n }),\n );\n } else if (eventType === 'close') {\n if (layoutPart === 'complementary') {\n return dispatch(createIntent(LayoutAction.SetLayout, { element: 'complementary', state: false }));\n } else {\n return dispatch(\n createIntent(NavigationAction.Close, { activeParts: { [layoutPart]: [coordinate.entryId] } }),\n );\n }\n } else {\n return dispatch(createIntent(NavigationAction.Adjust, { type: eventType, layoutCoordinate: coordinate }));\n }\n }}\n close={layoutPart === 'complementary' ? 'minify-end' : true}\n >\n <ToggleComplementarySidebarButton />\n </PlankControls>\n </StackItem.Heading>\n );\n },\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { forwardRef } from 'react';\n\nimport { type PartAdjustment } from '@dxos/app-framework';\nimport {\n Button,\n ButtonGroup,\n type ButtonGroupProps,\n type ButtonProps,\n Icon,\n Tooltip,\n useTranslation,\n} from '@dxos/react-ui';\n\nimport { DECK_PLUGIN } from '../../meta';\n\nexport type PlankControlHandler = (event: PartAdjustment) => void;\n\nexport type PlankCapabilities = {\n incrementStart?: boolean;\n incrementEnd?: boolean;\n solo?: boolean;\n};\n\nexport type PlankControlsProps = Omit<ButtonGroupProps, 'onClick'> & {\n onClick?: PlankControlHandler;\n variant?: 'hide-disabled' | 'default';\n close?: boolean | 'minify-start' | 'minify-end';\n capabilities: PlankCapabilities;\n isSolo?: boolean;\n pin?: 'start' | 'end' | 'both';\n};\n\nconst PlankControl = ({ icon, label, ...props }: Omit<ButtonProps, 'children'> & { label: string; icon: string }) => {\n return (\n <Tooltip.Root>\n <Tooltip.Trigger asChild>\n <Button variant='ghost' {...props}>\n <span className='sr-only'>{label}</span>\n <Icon icon={icon} size={4} />\n </Button>\n </Tooltip.Trigger>\n <Tooltip.Portal>\n <Tooltip.Content side='bottom'>{label}</Tooltip.Content>\n </Tooltip.Portal>\n </Tooltip.Root>\n );\n};\n\n// TODO(wittjosiah): Duplicate of stack LayoutControls?\n// Translations were to be duplicated between packages.\nexport const PlankControls = forwardRef<HTMLDivElement, PlankControlsProps>(\n (\n { onClick, variant = 'default', capabilities: can, isSolo, pin, close = false, children, ...props },\n forwardedRef,\n ) => {\n const { t } = useTranslation(DECK_PLUGIN);\n const buttonClassNames = variant === 'hide-disabled' ? 'disabled:hidden !pli-2 !plb-3' : '!pli-2 !plb-3';\n\n return (\n <ButtonGroup {...props} ref={forwardedRef}>\n {pin && !isSolo && ['both', 'start'].includes(pin) && (\n <PlankControl\n label={t('pin start label')}\n variant='ghost'\n classNames={buttonClassNames}\n onClick={() => onClick?.('pin-start')}\n icon='ph--caret-line-left--regular'\n />\n )}\n\n {can.solo && (\n <PlankControl\n label={isSolo ? t('show deck plank label') : t('show solo plank label')}\n classNames={buttonClassNames}\n onClick={() => onClick?.('solo')}\n icon={isSolo ? 'ph--arrow-u-down-left--regular' : 'ph--arrows-out--regular'}\n />\n )}\n\n {!isSolo && can.solo && (\n <>\n <PlankControl\n label={t('increment start label')}\n disabled={!can.incrementStart}\n classNames={buttonClassNames}\n onClick={() => onClick?.('increment-start')}\n icon='ph--caret-left--regular'\n />\n <PlankControl\n label={t('increment end label')}\n disabled={!can.incrementEnd}\n classNames={buttonClassNames}\n onClick={() => onClick?.('increment-end')}\n icon='ph--caret-right--regular'\n />\n </>\n )}\n\n {pin && !isSolo && ['both', 'end'].includes(pin) && (\n <PlankControl\n label={t('pin end label')}\n classNames={buttonClassNames}\n onClick={() => onClick?.('pin-end')}\n icon='ph--caret-line-right--regular'\n />\n )}\n\n {close && !isSolo && (\n <PlankControl\n label={t(`${typeof close === 'string' ? 'minify' : 'close'} label`)}\n classNames={buttonClassNames}\n onClick={() => onClick?.('close')}\n data-testid='plankHeading.close'\n icon={\n close === 'minify-start'\n ? 'ph--caret-line-left--regular'\n : close === 'minify-end'\n ? 'ph--caret-line-right--regular'\n : 'ph--x--regular'\n }\n />\n )}\n {children}\n </ButtonGroup>\n );\n },\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { IconButton, useTranslation } from '@dxos/react-ui';\n\nimport { DECK_PLUGIN } from '../../meta';\nimport { useLayout } from '../LayoutContext';\n\nexport const ToggleSidebarButton = () => {\n const layoutContext = useLayout();\n const { t } = useTranslation(DECK_PLUGIN);\n return (\n <IconButton\n variant='ghost'\n iconOnly\n icon='ph--sidebar--regular'\n size={4}\n label={t('open navigation sidebar label')}\n onClick={() => (layoutContext.sidebarOpen = !layoutContext.sidebarOpen)}\n classNames='!pli-2 order-first'\n />\n );\n};\n\nexport const CloseSidebarButton = () => {\n const layoutContext = useLayout();\n const { t } = useTranslation(DECK_PLUGIN);\n return (\n <IconButton\n variant='ghost'\n iconOnly\n icon='ph--caret-line-left--regular'\n size={4}\n label={t('close navigation sidebar label')}\n onClick={() => (layoutContext.sidebarOpen = false)}\n classNames='!rounded-none !pli-1 ch-focus-ring-inset pie-[max(.5rem,env(safe-area-inset-left))]'\n />\n );\n};\n\nexport const ToggleComplementarySidebarButton = () => {\n const layoutContext = useLayout();\n const { t } = useTranslation(DECK_PLUGIN);\n return (\n <IconButton\n iconOnly\n onClick={() => (layoutContext.complementarySidebarOpen = !layoutContext.complementarySidebarOpen)}\n variant='ghost'\n label={t('open complementary sidebar label')}\n classNames='!pli-2 !plb-3 [&>svg]:-scale-x-100'\n icon='ph--sidebar-simple--regular'\n size={4}\n />\n );\n};\n\nexport const CloseComplementarySidebarButton = () => {\n const layoutContext = useLayout();\n const { t } = useTranslation(DECK_PLUGIN);\n return (\n <IconButton\n iconOnly\n variant='ghost'\n size={4}\n icon='ph--caret-line-right--regular'\n label={t('close complementary sidebar label')}\n classNames='!rounded-none border-is border-separator ch-focus-ring-inset pie-2 lg:pie-[max(.5rem,env(safe-area-inset-right))]'\n onClick={() => (layoutContext.complementarySidebarOpen = false)}\n />\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nexport const soloInlinePadding =\n 'pis-[calc(env(safe-area-inset-left)+.25rem)] pie-[calc(env(safe-area-inset-left)+.25rem)]';\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 PlankLoading = () => {\n return <div role='none' className='grid place-items-center attention-surface' />;\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Surface } from '@dxos/app-framework';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { ToggleSidebarButton } from './SidebarButton';\nimport { soloInlinePadding } from '../fragments';\n\nexport const ContentEmpty = () => {\n return (\n <div\n role='none'\n className='min-bs-screen is-dvw sm:is-full p-8 grid grid-rows-[var(--rail-size)_1fr]'\n data-testid='layoutPlugin.firstRunMessage'\n >\n <div role='toolbar' className={mx(soloInlinePadding, 'flex items-stretch')}>\n <ToggleSidebarButton />\n <span role='none' className='grow' />\n </div>\n <div role='none' className='grid place-items-center'>\n <Surface role='keyshortcuts' />\n </div>\n </div>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Surface } from '@dxos/app-framework';\nimport { useGraph } from '@dxos/plugin-graph';\nimport { fixedInsetFlexLayout } from '@dxos/react-ui-theme';\n\nimport { Fallback } from './Fallback';\nimport { SURFACE_PREFIX } from './constants';\nimport { useNode } from '../../hooks';\n\nexport const Fullscreen = ({ id }: { id?: string }) => {\n const { graph } = useGraph();\n const fullScreenNode = useNode(graph, id);\n\n return (\n <div role='none' className={fixedInsetFlexLayout}>\n <Surface\n role='main'\n limit={1}\n fallback={Fallback}\n data={{\n subject: fullScreenNode?.data,\n component: id?.startsWith(SURFACE_PREFIX) ? id.slice(SURFACE_PREFIX.length) : undefined,\n }}\n />\n </div>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { useTranslation } from '@dxos/react-ui';\nimport { errorText, mx } from '@dxos/react-ui-theme';\n\nimport { DECK_PLUGIN } from '../../meta';\n\nexport const Fallback = () => {\n const { t } = useTranslation(DECK_PLUGIN);\n\n return (\n <div role='none' className='min-bs-screen is-full flex items-center justify-center p-8'>\n <p\n role='alert'\n className={mx(\n errorText,\n 'border border-error-400/50 rounded-lg flex items-center justify-center p-8 font-normal text-lg',\n )}\n >\n {t('plugin error message')}\n </p>\n </div>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { type KeyboardEvent, memo, useCallback, useLayoutEffect, useMemo, useRef } from 'react';\n\nimport {\n createIntent,\n indexInPart,\n LayoutAction,\n partLength,\n Surface,\n useIntentDispatcher,\n type Layout,\n type LayoutCoordinate,\n type LayoutEntry,\n type LayoutPart,\n type LayoutParts,\n} from '@dxos/app-framework';\nimport { debounce } from '@dxos/async';\nimport { useGraph } from '@dxos/plugin-graph';\nimport { useAttendableAttributes } from '@dxos/react-ui-attention';\nimport { StackItem, railGridHorizontal } from '@dxos/react-ui-stack';\nimport { mainIntrinsicSize, mx } from '@dxos/react-ui-theme';\n\nimport { NodePlankHeading } from './NodePlankHeading';\nimport { PlankContentError, PlankError } from './PlankError';\nimport { PlankLoading } from './PlankLoading';\nimport { useNode, useMainSize } from '../../hooks';\nimport { DeckAction } from '../../types';\nimport { useDeckContext } from '../DeckContext';\nimport { useLayout } from '../LayoutContext';\n\nconst UNKNOWN_ID = 'unknown_id';\n\nexport type PlankProps = {\n entry?: LayoutEntry;\n layoutParts: LayoutParts;\n // TODO(wittjosiah): Remove. Pass in LayoutCoordinate instead of LayoutEntry.\n part: LayoutPart;\n layoutMode: Layout['layoutMode'];\n order?: number;\n};\n\nexport const Plank = memo(({ entry, layoutParts, part, layoutMode, order }: PlankProps) => {\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n const coordinate: LayoutCoordinate = useMemo(() => ({ part, entryId: entry?.id ?? UNKNOWN_ID }), [entry?.id, part]);\n const { popoverAnchorId, scrollIntoView } = useLayout();\n const { plankSizing } = useDeckContext();\n const { graph } = useGraph();\n const node = useNode(graph, entry?.id);\n const rootElement = useRef<HTMLDivElement | null>(null);\n const canResize = layoutMode === 'deck';\n const Root = part === 'solo' ? 'article' : StackItem.Root;\n\n const attendableAttrs = useAttendableAttributes(coordinate.entryId);\n const index = indexInPart(layoutParts, coordinate);\n const length = partLength(layoutParts, part);\n const canIncrementStart = part === 'main' && index !== undefined && index > 0 && length !== undefined && length > 1;\n const canIncrementEnd = part === 'main' && index !== undefined && index < length - 1 && length !== undefined;\n\n const size = plankSizing?.[coordinate.entryId] as number | undefined;\n const setSize = useCallback(\n debounce((nextSize: number) => {\n return dispatch(createIntent(DeckAction.UpdatePlankSize, { id: coordinate.entryId, size: nextSize }));\n }, 200),\n [dispatch, coordinate.entryId],\n );\n\n // TODO(thure): Tabster’s focus group should handle moving focus to Main, but something is blocking it.\n const handleKeyDown = useCallback((event: KeyboardEvent) => {\n if (event.target === event.currentTarget && event.key === 'Escape') {\n rootElement.current?.closest('main')?.focus();\n }\n }, []);\n\n useLayoutEffect(() => {\n if (scrollIntoView === coordinate.entryId) {\n // TODO(wittjosiah): When focused on page load, the focus is always visible.\n // Forcing focus to something smaller than the plank prevents large focus ring in the interim.\n const focusable = rootElement.current?.querySelector('button') || rootElement.current;\n focusable?.focus({ preventScroll: true });\n layoutMode === 'deck' && focusable?.scrollIntoView({ behavior: 'smooth', inline: 'center' });\n // Clear the scroll into view state once it has been actioned.\n void dispatch(createIntent(LayoutAction.ScrollIntoView, { id: undefined }));\n }\n }, [coordinate.entryId, scrollIntoView, layoutMode]);\n\n const isSolo = layoutMode === 'solo' && part === 'solo';\n const isAttendable = isSolo || (layoutMode === 'deck' && part === 'main');\n\n const sizeAttrs = useMainSize();\n\n const data = useMemo(\n () =>\n node && {\n subject: node.data,\n path: entry?.path,\n coordinate,\n popoverAnchorId,\n },\n [node, node?.data, entry?.path, coordinate, popoverAnchorId],\n );\n\n // TODO(wittjosiah): Change prop to accept a component.\n const placeholder = useMemo(() => <PlankLoading />, []);\n\n const className = mx(\n 'attention-surface relative',\n isSolo && mainIntrinsicSize,\n isSolo && railGridHorizontal,\n isSolo ? 'grid absolute inset-0' : '!border-separator border-li',\n );\n\n return (\n <Root\n ref={rootElement}\n data-testid='deck.plank'\n tabIndex={0}\n {...(part === 'solo'\n ? ({ ...sizeAttrs, className } as any)\n : {\n item: { id: entry?.id ?? 'never' },\n size,\n onSizeChange: setSize,\n classNames: className,\n order,\n role: 'article',\n })}\n {...(isAttendable ? attendableAttrs : {})}\n onKeyDown={handleKeyDown}\n >\n {node ? (\n <>\n <NodePlankHeading\n coordinate={coordinate}\n node={node}\n canIncrementStart={canIncrementStart}\n canIncrementEnd={canIncrementEnd}\n popoverAnchorId={popoverAnchorId}\n />\n <Surface\n key={node.id}\n role='article'\n data={data}\n limit={1}\n fallback={PlankContentError}\n placeholder={placeholder}\n />\n </>\n ) : (\n <PlankError layoutCoordinate={coordinate} />\n )}\n {canResize && <StackItem.ResizeHandle />}\n </Root>\n );\n});\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useMemo } from 'react';\n\nimport { Surface } from '@dxos/app-framework';\nimport { Main } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { Banner } from './Banner';\nimport { useBreakpoints } from '../../util';\nimport { useHoistStatusbar } from '../../util/useHoistStatusbar';\nimport { useLayout } from '../LayoutContext';\n\nexport const Sidebar = () => {\n const layoutContext = useLayout();\n const { popoverAnchorId } = layoutContext;\n const breakpoint = useBreakpoints();\n const hoistStatusbar = useHoistStatusbar(breakpoint);\n\n const navigationData = useMemo(() => ({ popoverAnchorId }), [popoverAnchorId]);\n\n return (\n <Main.NavigationSidebar classNames='grid grid-cols-1 grid-rows-[var(--rail-size)_var(--rail-action)_1fr_min-content_min-content] md:grid-rows-[var(--rail-size)_var(--rail-action)_1fr_min-content] lg:grid-rows-[1fr_min-content] overflow-hidden lg:block-start-[calc(env(safe-area-inset-top)+var(--rail-size))]'>\n {breakpoint !== 'desktop' && (\n <>\n <Banner variant='sidebar' />\n <Surface role='search-input' limit={1} />\n </>\n )}\n <div role='none' className={mx('!overflow-y-auto', breakpoint !== 'desktop' && 'border-be border-separator')}>\n <Surface role='navigation' data={navigationData} limit={1} />\n </div>\n {!hoistStatusbar && <Surface role='status-bar--sidebar-footer' limit={1} />}\n </Main.NavigationSidebar>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Surface } from '@dxos/app-framework';\nimport { type ThemedClassName } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { CloseSidebarButton, ToggleSidebarButton } from './SidebarButton';\n\nexport const Banner = ({ variant, classNames }: ThemedClassName<{ variant?: 'topbar' | 'sidebar' }>) => {\n return (\n <header\n className={mx(\n 'flex items-stretch relative plb-1 pis-1 pie-2',\n variant === 'topbar' &&\n 'fixed inset-inline-0 block-start-[env(safe-area-inset-top)] bs-[--rail-size] border-be border-separator',\n classNames,\n )}\n >\n {variant === 'sidebar' ? <CloseSidebarButton /> : <ToggleSidebarButton />}\n <span className='self-center grow mis-1'>Composer</span>\n {variant === 'topbar' && (\n <div role='none' className='absolute inset-0 pointer-events-none'>\n <div role='none' className='grid bs-full pointer-fine:p-1 max-is-md mli-auto pointer-events-auto'>\n <Surface role='search-input' limit={1} />\n </div>\n </div>\n )}\n <span role='none' className='grow' />\n <Surface role='header-end' limit={1} />\n <Surface role='notch-start' limit={1} />\n </header>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useLayoutEffect, useState } from 'react';\n\nexport const useHoistStatusbar = (breakpoint: string) => {\n const [safeAreaBottom, setSafeAreaBottom] = useState(Infinity);\n useLayoutEffect(\n () =>\n setSafeAreaBottom(parseFloat(getComputedStyle(document.documentElement).getPropertyValue('--safe-area-bottom'))),\n [],\n );\n return Number.isFinite(safeAreaBottom) && safeAreaBottom < 1 && breakpoint === 'desktop';\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Surface } from '@dxos/app-framework';\nimport { mainPadding, mainPaddingTransitions, mx } from '@dxos/react-ui-theme';\n\nimport { useMainSize } from '../../hooks';\n\nexport const StatusBar = ({ showHints }: { showHints?: boolean }) => {\n const sizeAttrs = useMainSize();\n return (\n <div\n role='contentinfo'\n {...sizeAttrs}\n className={mx(\n 'fixed block-end-0 inset-inline-0 flex justify-between items-center border-bs border-separator z-[2] pbe-[env(safe-area-inset-bottom)]',\n mainPadding,\n mainPaddingTransitions,\n )}\n >\n <div role='none'>{showHints && <Surface role='hints' limit={1} />}</div>\n <Surface role='status-bar' limit={1} />\n </div>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport type { Toast as ToastProps } from '@dxos/app-framework';\nimport {\n Button,\n Icon,\n Toast as NaturalToast,\n toLocalizedString,\n useTranslation,\n type ToastRootProps,\n} from '@dxos/react-ui';\n\nimport { DECK_PLUGIN } from '../../meta';\n\n// TODO(wittjosiah): Render remaining duration as a progress bar within the toast.\nexport const Toast = ({\n id,\n title,\n description,\n icon,\n duration,\n actionLabel,\n actionAlt,\n closeLabel,\n onAction,\n onOpenChange,\n}: ToastProps & Pick<ToastRootProps, 'onOpenChange'>) => {\n const { t } = useTranslation(DECK_PLUGIN);\n\n return (\n <NaturalToast.Root data-testid={id} defaultOpen duration={duration} onOpenChange={onOpenChange}>\n <NaturalToast.Body>\n <NaturalToast.Title classNames='items-center'>\n {icon && <Icon icon={icon} size={5} classNames='inline mr-1' />}\n {title && <span>{toLocalizedString(title, t)}</span>}\n </NaturalToast.Title>\n {description && (\n <NaturalToast.Description>{description && toLocalizedString(description, t)}</NaturalToast.Description>\n )}\n </NaturalToast.Body>\n <NaturalToast.Actions>\n {onAction && actionAlt && actionLabel && (\n <NaturalToast.Action altText={toLocalizedString(actionAlt, t)} asChild>\n <Button data-testid='toast.action' variant='primary' onClick={() => onAction?.()}>\n {toLocalizedString(actionLabel, t)}\n </Button>\n </NaturalToast.Action>\n )}\n {closeLabel && (\n <NaturalToast.Close asChild>\n <Button data-testid='toast.close'>{toLocalizedString(closeLabel, t)}</Button>\n </NaturalToast.Close>\n )}\n </NaturalToast.Actions>\n </NaturalToast.Root>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Banner } from './Banner';\n\nexport const Topbar = () => {\n return <Banner variant='topbar' />;\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Input, Select, useTranslation } from '@dxos/react-ui';\nimport { DeprecatedFormInput } from '@dxos/react-ui-form';\n\nimport { DECK_PLUGIN } from '../meta';\nimport {\n type NewPlankPositioning,\n NewPlankPositions,\n type DeckSettingsProps,\n type Overscroll,\n OverscrollOptions,\n} from '../types';\n\nconst isSocket = !!(globalThis as any).__args;\n\nexport const LayoutSettings = ({ settings }: { settings: DeckSettingsProps }) => {\n const { t } = useTranslation(DECK_PLUGIN);\n\n return (\n <>\n <DeprecatedFormInput label={t('select new plank positioning label')}>\n <Select.Root\n value={settings.newPlankPositioning ?? 'start'}\n onValueChange={(value) => (settings.newPlankPositioning = value as NewPlankPositioning)}\n >\n <Select.TriggerButton placeholder={t('select new plank positioning placeholder')} />\n <Select.Portal>\n <Select.Content>\n <Select.Viewport>\n {NewPlankPositions.map((position) => (\n <Select.Option key={position} value={position}>\n {t(`settings new plank position ${position} label`)}\n </Select.Option>\n ))}\n </Select.Viewport>\n </Select.Content>\n </Select.Portal>\n </Select.Root>\n </DeprecatedFormInput>\n <DeprecatedFormInput label={t('settings overscroll label')}>\n <Select.Root\n value={settings.overscroll ?? 'none'}\n onValueChange={(value) => (settings.overscroll = value as Overscroll)}\n >\n <Select.TriggerButton placeholder={t('select overscroll placeholder')} />\n <Select.Portal>\n <Select.Content>\n <Select.Viewport>\n {OverscrollOptions.map((option) => (\n <Select.Option key={option} value={option}>\n {t(`settings overscroll ${option} label`)}\n </Select.Option>\n ))}\n </Select.Viewport>\n </Select.Content>\n </Select.Portal>\n </Select.Root>\n </DeprecatedFormInput>\n <DeprecatedFormInput label={t('settings show hints label')}>\n <Input.Switch checked={settings.showHints} onCheckedChange={(checked) => (settings.showHints = checked)} />\n </DeprecatedFormInput>\n {!isSocket && (\n <DeprecatedFormInput label={t('settings native redirect label')}>\n <Input.Switch\n checked={settings.enableNativeRedirect}\n onCheckedChange={(checked) => (settings.enableNativeRedirect = checked)}\n />\n </DeprecatedFormInput>\n )}\n <DeprecatedFormInput label={t('settings custom slots')}>\n <Input.Switch checked={settings.customSlots} onCheckedChange={(checked) => (settings.customSlots = checked)} />\n </DeprecatedFormInput>\n <DeprecatedFormInput label={t('settings flat deck')}>\n <Input.Switch checked={settings.flatDeck} onCheckedChange={(checked) => (settings.flatDeck = checked)} />\n </DeprecatedFormInput>\n </>\n );\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;AAIO,IAAMA,SAAS;AACf,IAAMC,iBAAiB;;;ACD9B,SAAuBC,eAAeC,kBAAkB;AAGxD,SAASC,aAAa;AAEf,IAAMC,gBAAwCC,cAA6B,IAAA;AAE3E,IAAMC,YAAY,MAAcC,WAAWH,aAAAA,KAAkBI,MAAM,IAAIC,MAAM,uBAAA,CAAA;;;ACPpF,SAAuBC,iBAAAA,gBAAeC,cAAAA,mBAAkB;AAGxD,SAASC,SAAAA,cAAa;AASf,IAAMC,cAA+CC,eAAsC,IAAA;AAE3F,IAAMC,iBAAiB,MAAuBC,YAAWH,WAAAA,KAAgBI,OAAM,IAAIC,MAAM,qBAAA,CAAA;;;ACdhG,SAASC,iBAAiB;AAC1B,OAAOC,WAASC,eAAAA,cAAaC,aAAAA,YAAWC,WAAAA,UAASC,UAAAA,SAAsBC,YAAAA,iBAAgB;AAEvF,SACEC,eACAC,WAAAA,WACAC,wBAGK;AACP,SAASC,6BAA6B;AACtC,SAASC,aAAaC,UAAUC,eAAeC,QAAAA,OAAMC,WAAAA,UAASC,uBAAuC;AACrG,SAASC,OAAOC,gBAAAA,eAAcC,+BAA+B;AAC7D,SAASC,0BAAAA,+BAA8B;;;ACbvC,OAAOC,WAAW;AAElB,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,SAAS+B,cAAcJ;OAErG,gBAAAvB,QAAA,cAACC,qBAAAA;IAAoBC,OAAOL,EAAE,oBAAA;KAC5B,gBAAAG,QAAA,cAACqB,MAAMC,QAAM;IAACC,SAAS3B,SAASgC;IAAUH,iBAAiB,CAACF,YAAa3B,SAASgC,WAAWL;;AAIrG;",
6
- "names": ["NAV_ID", "SURFACE_PREFIX", "createContext", "useContext", "raise", "LayoutContext", "createContext", "useLayout", "useContext", "raise", "Error", "createContext", "useContext", "raise", "DeckContext", "createContext", "useDeckContext", "useContext", "raise", "Error", "untracked", "React", "useCallback", "useEffect", "useMemo", "useRef", "Fragment", "firstIdInPart", "Surface", "usePluginManager", "AttentionCapabilities", "AlertDialog", "Dialog", "NaturalDialog", "Main", "Popover", "useOnTransition", "Stack", "StackContext", "DEFAULT_HORIZONTAL_SIZE", "mainPaddingTransitions", "React", "Surface", "useGraph", "useAttended", "useEffect", "useState", "useNode", "graph", "id", "timeout", "nodeState", "setNodeState", "useState", "findNode", "undefined", "useEffect", "frame", "requestAnimationFrame", "node", "waitForNode", "cancelAnimationFrame", "useEffect", "ACTION_GROUP_TYPE", "ACTION_TYPE", "getGraph", "expandNodeActions", "node", "graph", "getGraph", "expand", "ACTION_GROUP_TYPE", "ACTION_TYPE", "useNodeActionExpander", "useEffect", "frame", "requestAnimationFrame", "cancelAnimationFrame", "useMainContext", "useMainSize", "navigationSidebarOpen", "complementarySidebarOpen", "useMainContext", "ActiveNode", "id", "useAttended", "graph", "useGraph", "activeNode", "useNode", "useNodeActionExpander", "div", "role", "className", "Surface", "data", "subject", "limit", "React", "useCallback", "useEffect", "useMemo", "useState", "createIntent", "NavigationAction", "SLUG_PATH_SEPARATOR", "Surface", "useIntentDispatcher", "useGraph", "Main", "ScrollArea", "useTranslation", "toLocalizedString", "useAttended", "railGridHorizontal", "StackContext", "StackItem", "Tabs", "mx", "React", "useEffect", "useState", "useTranslation", "descriptionText", "mx", "React", "Fragment", "memo", "useEffect", "useMemo", "createIntent", "LayoutAction", "NavigationAction", "SLUG_PATH_SEPARATOR", "Surface", "useIntentDispatcher", "useGraph", "Icon", "Popover", "toLocalizedString", "useTranslation", "StackItem", "TextTooltip", "React", "forwardRef", "Button", "ButtonGroup", "Icon", "Tooltip", "useTranslation", "PlankControl", "icon", "label", "props", "React", "Tooltip", "Root", "Trigger", "asChild", "Button", "variant", "span", "className", "Icon", "size", "Portal", "Content", "side", "PlankControls", "forwardRef", "onClick", "capabilities", "can", "isSolo", "pin", "close", "children", "forwardedRef", "t", "useTranslation", "DECK_PLUGIN", "buttonClassNames", "ButtonGroup", "ref", "includes", "classNames", "solo", "disabled", "incrementStart", "incrementEnd", "data-testid", "React", "IconButton", "useTranslation", "ToggleSidebarButton", "layoutContext", "useLayout", "t", "useTranslation", "DECK_PLUGIN", "React", "IconButton", "variant", "iconOnly", "icon", "size", "label", "onClick", "sidebarOpen", "classNames", "CloseSidebarButton", "ToggleComplementarySidebarButton", "complementarySidebarOpen", "CloseComplementarySidebarButton", "soloInlinePadding", "NodePlankHeading", "memo", "coordinate", "node", "canIncrementStart", "canIncrementEnd", "popoverAnchorId", "pending", "actions", "t", "useTranslation", "DECK_PLUGIN", "graph", "useGraph", "icon", "properties", "label", "toLocalizedString", "ns", "dispatchPromise", "dispatch", "useIntentDispatcher", "ActionRoot", "id", "Popover", "Anchor", "Fragment", "breakpoint", "useBreakpoints", "useEffect", "frame", "requestAnimationFrame", "cancelAnimationFrame", "layoutPart", "part", "attendableId", "entryId", "split", "SLUG_PATH_SEPARATOR", "at", "capabilities", "useMemo", "solo", "incrementStart", "incrementEnd", "React", "StackItem", "Heading", "classNames", "soloInlinePadding", "Sigil", "related", "triggerLabel", "filter", "a", "length", "onAction", "action", "data", "caller", "Surface", "role", "subject", "SigilButton", "span", "className", "Icon", "size", "ToggleSidebarButton", "TextTooltip", "text", "onlyWhenTruncating", "HeadingLabel", "PlankControls", "isSolo", "onClick", "eventType", "createIntent", "NavigationAction", "Adjust", "type", "layoutCoordinate", "LayoutAction", "SetLayout", "element", "state", "Close", "activeParts", "close", "ToggleComplementarySidebarButton", "React", "PlankLoading", "React", "div", "role", "className", "PlankContentError", "error", "t", "useTranslation", "DECK_PLUGIN", "errorString", "toString", "React", "div", "role", "className", "p", "mx", "descriptionText", "length", "PlankError", "layoutCoordinate", "node", "timedOut", "setTimedOut", "useState", "useEffect", "setTimeout", "NodePlankHeading", "coordinate", "pending", "PlankLoading", "ComplementarySidebar", "panels", "current", "popoverAnchorId", "useLayout", "attended", "useAttended", "panelIds", "useMemo", "map", "p", "id", "activePanelId", "find", "activeEntryId", "SLUG_PATH_SEPARATOR", "undefined", "graph", "useGraph", "node", "useNode", "t", "useTranslation", "DECK_PLUGIN", "dispatchPromise", "dispatch", "useIntentDispatcher", "useNodeActionExpander", "internalValue", "setInternalValue", "useState", "useEffect", "handleValueChange", "useCallback", "nextValue", "createIntent", "NavigationAction", "Open", "activeParts", "complementary", "React", "Main", "classNames", "StackContext", "Provider", "value", "size", "orientation", "rail", "div", "role", "className", "mx", "railGridHorizontal", "Tabs", "Root", "onValueChange", "attendableId", "StackItem", "Heading", "ScrollArea", "Viewport", "Tablist", "panel", "Tab", "key", "toLocalizedString", "label", "Scrollbar", "Thumb", "CloseComplementarySidebarButton", "Tabpanel", "Surface", "data", "subject", "properties", "object", "space", "fallback", "PlankContentError", "placeholder", "PlankLoading", "React", "Surface", "mx", "ContentEmpty", "React", "div", "role", "className", "data-testid", "mx", "soloInlinePadding", "ToggleSidebarButton", "span", "Surface", "React", "Surface", "useGraph", "fixedInsetFlexLayout", "React", "useTranslation", "errorText", "mx", "Fallback", "t", "useTranslation", "DECK_PLUGIN", "React", "div", "role", "className", "p", "mx", "errorText", "Fullscreen", "id", "graph", "useGraph", "fullScreenNode", "useNode", "React", "div", "role", "className", "fixedInsetFlexLayout", "Surface", "limit", "fallback", "Fallback", "data", "subject", "component", "startsWith", "SURFACE_PREFIX", "slice", "length", "undefined", "React", "memo", "useCallback", "useLayoutEffect", "useMemo", "useRef", "createIntent", "indexInPart", "LayoutAction", "partLength", "Surface", "useIntentDispatcher", "debounce", "useGraph", "useAttendableAttributes", "StackItem", "railGridHorizontal", "mainIntrinsicSize", "mx", "UNKNOWN_ID", "Plank", "memo", "entry", "layoutParts", "part", "layoutMode", "order", "dispatchPromise", "dispatch", "useIntentDispatcher", "coordinate", "useMemo", "entryId", "id", "popoverAnchorId", "scrollIntoView", "useLayout", "plankSizing", "useDeckContext", "graph", "useGraph", "node", "useNode", "rootElement", "useRef", "canResize", "Root", "StackItem", "attendableAttrs", "useAttendableAttributes", "index", "indexInPart", "length", "partLength", "canIncrementStart", "undefined", "canIncrementEnd", "size", "setSize", "useCallback", "debounce", "nextSize", "createIntent", "DeckAction", "UpdatePlankSize", "handleKeyDown", "event", "target", "currentTarget", "key", "current", "closest", "focus", "useLayoutEffect", "focusable", "querySelector", "preventScroll", "behavior", "inline", "LayoutAction", "ScrollIntoView", "isSolo", "isAttendable", "sizeAttrs", "useMainSize", "data", "subject", "path", "placeholder", "React", "PlankLoading", "className", "mx", "mainIntrinsicSize", "railGridHorizontal", "ref", "data-testid", "tabIndex", "item", "onSizeChange", "classNames", "role", "onKeyDown", "NodePlankHeading", "Surface", "limit", "fallback", "PlankContentError", "PlankError", "layoutCoordinate", "ResizeHandle", "React", "useMemo", "Surface", "Main", "mx", "React", "Surface", "mx", "Banner", "variant", "classNames", "React", "header", "className", "mx", "CloseSidebarButton", "ToggleSidebarButton", "span", "div", "role", "Surface", "limit", "useLayoutEffect", "useState", "useHoistStatusbar", "breakpoint", "safeAreaBottom", "setSafeAreaBottom", "useState", "Infinity", "useLayoutEffect", "parseFloat", "getComputedStyle", "document", "documentElement", "getPropertyValue", "Number", "isFinite", "Sidebar", "layoutContext", "useLayout", "popoverAnchorId", "breakpoint", "useBreakpoints", "hoistStatusbar", "useHoistStatusbar", "navigationData", "useMemo", "React", "Main", "NavigationSidebar", "classNames", "Banner", "variant", "Surface", "role", "limit", "div", "className", "mx", "data", "React", "Surface", "mainPadding", "mainPaddingTransitions", "mx", "StatusBar", "showHints", "sizeAttrs", "useMainSize", "React", "div", "role", "className", "mx", "mainPadding", "mainPaddingTransitions", "Surface", "limit", "React", "Button", "Icon", "Toast", "NaturalToast", "toLocalizedString", "useTranslation", "Toast", "id", "title", "description", "icon", "duration", "actionLabel", "actionAlt", "closeLabel", "onAction", "onOpenChange", "t", "useTranslation", "DECK_PLUGIN", "React", "NaturalToast", "Root", "data-testid", "defaultOpen", "Body", "Title", "classNames", "Icon", "size", "span", "toLocalizedString", "Description", "Actions", "Action", "altText", "asChild", "Button", "variant", "onClick", "Close", "React", "Topbar", "React", "Banner", "variant", "PlankSeparator", "index", "React", "span", "role", "className", "style", "gridColumn", "DeckLayout", "layoutParts", "toasts", "overscroll", "showHints", "panels", "onDismissToast", "context", "useLayout", "layoutMode", "sidebarOpen", "complementarySidebarOpen", "dialogOpen", "dialogContent", "dialogBlockAlign", "dialogType", "popoverOpen", "popoverContent", "popoverAnchorId", "breakpoint", "useBreakpoints", "hoistStatusbar", "useHoistStatusbar", "plankSizing", "useDeckContext", "pluginManager", "usePluginManager", "fullScreenSlug", "useMemo", "firstIdInPart", "scrollLeftRef", "useRef", "deckRef", "isSoloModeLoaded", "Boolean", "solo", "useEffect", "attended", "untracked", "attention", "requestCapability", "AttentionCapabilities", "Attention", "current", "firstId", "length", "document", "querySelector", "focus", "handleResize", "useCallback", "window", "addEventListener", "removeEventListener", "restoreScroll", "scrollLeft", "useOnTransition", "mode", "handleScroll", "event", "currentTarget", "target", "isEmpty", "main", "padding", "calculateOverscroll", "Dialog", "AlertDialog", "NaturalDialog", "Popover", "Root", "modal", "open", "onOpenChange", "nextOpen", "undefined", "ActiveNode", "Fullscreen", "id", "Main", "navigationSidebarOpen", "onNavigationSidebarOpenChange", "next", "onComplementarySidebarOpenChange", "Sidebar", "ComplementarySidebar", "complementary", "Overlay", "Content", "handlesFocus", "ContentEmpty", "bounce", "classNames", "DEFAULT_HORIZONTAL_SIZE", "div", "inert", "Stack", "orientation", "size", "mainPaddingTransitions", "onScroll", "itemsCount", "ref", "map", "layoutEntry", "Fragment", "key", "Plank", "entry", "part", "order", "StackContext", "Provider", "value", "rail", "Topbar", "StatusBar", "Portal", "onEscapeKeyDown", "Viewport", "Surface", "data", "limit", "Arrow", "blockAlign", "toast", "Toast", "React", "Input", "Select", "useTranslation", "DeprecatedFormInput", "isSocket", "globalThis", "__args", "LayoutSettings", "settings", "t", "useTranslation", "DECK_PLUGIN", "React", "DeprecatedFormInput", "label", "Select", "Root", "value", "newPlankPositioning", "onValueChange", "TriggerButton", "placeholder", "Portal", "Content", "Viewport", "NewPlankPositions", "map", "position", "Option", "key", "overscroll", "OverscrollOptions", "option", "Input", "Switch", "checked", "showHints", "onCheckedChange", "enableNativeRedirect", "customSlots", "flatDeck"]
7
- }
@@ -1,39 +0,0 @@
1
- // packages/plugins/plugin-deck/src/util/layout-parts.ts
2
- var getEffectivePart = (partName, layoutMode) => layoutMode === "solo" && partName === "main" ? "solo" : partName;
3
-
4
- // packages/plugins/plugin-deck/src/util/overscroll.ts
5
- var calculateOverscroll = (planksCount) => {
6
- if (!planksCount) {
7
- return {
8
- paddingInlineStart: 0,
9
- paddingInlineEnd: 0
10
- };
11
- }
12
- if (planksCount === 1) {
13
- const overscrollPadding = "max(0px, calc(((100dvw - var(--dx-main-sidebarWidth) - var(--dx-main-complementaryWidth) - (var(--dx-main-contentFirstWidth) + 1px)) / 2)))";
14
- return {
15
- paddingInlineStart: overscrollPadding,
16
- paddingInlineEnd: overscrollPadding
17
- };
18
- } else {
19
- return {
20
- paddingInlineStart: "max(0px, calc(((100dvw - (var(--dx-main-contentFirstWidth) + 1px)) / 2) - var(--dx-main-sidebarWidth)))",
21
- paddingInlineEnd: "max(0px, calc(((100dvw - (var(--dx-main-contentLastWidth) + 1px)) / 2) - var(--dx-main-complementaryWidth)))"
22
- };
23
- }
24
- };
25
-
26
- // packages/plugins/plugin-deck/src/util/useBreakpoints.ts
27
- import { useMediaQuery } from "@dxos/react-ui";
28
- var useBreakpoints = () => {
29
- const [isNotMobile] = useMediaQuery("md");
30
- const [isDesktop] = useMediaQuery("lg");
31
- return isDesktop ? "desktop" : isNotMobile ? "tablet" : "mobile";
32
- };
33
-
34
- export {
35
- getEffectivePart,
36
- calculateOverscroll,
37
- useBreakpoints
38
- };
39
- //# sourceMappingURL=chunk-2PJNBVCY.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/util/layout-parts.ts", "../../../src/util/overscroll.ts", "../../../src/util/useBreakpoints.ts"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { type LayoutMode, type LayoutPart } from '@dxos/app-framework';\n\n/**\n * If in solo mode and the part is the main part, open it in solo mode.\n * From the dispatch POV we refer to both 'solo' and 'main' as 'main'.\n */\nexport const getEffectivePart = (partName: LayoutPart, layoutMode: LayoutMode): LayoutPart =>\n layoutMode === 'solo' && partName === 'main' ? 'solo' : partName;\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport type { CSSProperties } from 'react';\n\n/**\n * ┌────────────────────────────────────────────────────────────────────────────────────────────────────┐\n * | Overscroll Padding Calculation for Centering Planks on Screen. │\n * ├────────────────────────────────────────────────────────────────────────────────────────────────────┤\n * │ NOTE(Zan): I found the way you calculate the overscroll padding to center a plank on the screen │\n * │ at the edges of the scroll context a bit confusing, so I've diagrammed it here. │\n * │ │\n * │ Multiple Planks: │\n * │ ─────────────── │\n * | Use the following overscroll padding calculation centering the boundary planks on the SCREEN. │\n * │ │\n * │ Left Padding: Right Padding: │\n * │ ┌───┬────┬──────────────────┬──────┐ ┌──────┬──────────────────┬────┬───┐ │\n * │ │ │████│ Ideal │ │ │ │ Ideal │████│ │ │\n * │ │ S │█PL█│ first │ │ │ │ last │█PR█│ C │ │\n * │ │ │████│ plank │ │ │ │ plank │████│ │ │\n * │ └───┴────┴──────────────────┴──────┘ └──────┴──────────────────┴────┴───┘ │\n * │ <--------- screen width -----------> <---------- screen width ----------> │\n * │ │\n * │ PL = ((screen width - Plank Width) / 2) - S │\n * │ PR = ((screen width - Plank Width) / 2) - C │\n * │ │\n * │ S = Sidebar width C = Complementary sidebar width │\n * │ PL = Padding Left PR = Padding Right │\n * │ │\n * │ Single Plank: │\n * │ ───────────── │\n * │ For a single plank we use the following overscroll padding calculation to center the plank in │\n * │ the content area: │\n * │ │\n * │ ┌───┬───────────────────────┬───┬───────────────────────┬───┐ │\n * │ │ │███████████████████████│ │███████████████████████│ │ │\n * │ │ S │█████ Left Padding ████│ P │████ Right Padding ████│ C │ │\n * │ │ │███████████████████████│ │███████████████████████│ │ │\n * │ └───┴───────────────────────┴───┴───────────────────────┴───┘ │\n * │ <------------------------ screen width ---------------------> │\n * │ │\n * │ Left/Right Padding Width = (screen width - S - P - C) / 2 │\n * │ │\n * │ S = Sidebar width (may be 0) │\n * │ P = Plank width (centered) │\n * │ C = Complementary sidebar width (may be 0) │\n * └────────────────────────────────────────────────────────────────────────────────────────────────────┘\n */\nexport const calculateOverscroll = (\n planksCount: number,\n): Pick<CSSProperties, 'paddingInlineStart' | 'paddingInlineEnd'> | undefined => {\n if (!planksCount) {\n return { paddingInlineStart: 0, paddingInlineEnd: 0 };\n }\n if (planksCount === 1) {\n const overscrollPadding =\n 'max(0px, calc(((100dvw - var(--dx-main-sidebarWidth) - var(--dx-main-complementaryWidth) - (var(--dx-main-contentFirstWidth) + 1px)) / 2)))';\n return { paddingInlineStart: overscrollPadding, paddingInlineEnd: overscrollPadding };\n } else {\n return {\n paddingInlineStart:\n 'max(0px, calc(((100dvw - (var(--dx-main-contentFirstWidth) + 1px)) / 2) - var(--dx-main-sidebarWidth)))',\n paddingInlineEnd:\n 'max(0px, calc(((100dvw - (var(--dx-main-contentLastWidth) + 1px)) / 2) - var(--dx-main-complementaryWidth)))',\n };\n }\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useMediaQuery } from '@dxos/react-ui';\n\nexport const useBreakpoints = () => {\n const [isNotMobile] = useMediaQuery('md');\n const [isDesktop] = useMediaQuery('lg');\n return isDesktop ? 'desktop' : isNotMobile ? 'tablet' : 'mobile';\n};\n"],
5
- "mappings": ";AAUO,IAAMA,mBAAmB,CAACC,UAAsBC,eACrDA,eAAe,UAAUD,aAAa,SAAS,SAASA;;;ACuCnD,IAAME,sBAAsB,CACjCC,gBAAAA;AAEA,MAAI,CAACA,aAAa;AAChB,WAAO;MAAEC,oBAAoB;MAAGC,kBAAkB;IAAE;EACtD;AACA,MAAIF,gBAAgB,GAAG;AACrB,UAAMG,oBACJ;AACF,WAAO;MAAEF,oBAAoBE;MAAmBD,kBAAkBC;IAAkB;EACtF,OAAO;AACL,WAAO;MACLF,oBACE;MACFC,kBACE;IACJ;EACF;AACF;;;AChEA,SAASE,qBAAqB;AAEvB,IAAMC,iBAAiB,MAAA;AAC5B,QAAM,CAACC,WAAAA,IAAeC,cAAc,IAAA;AACpC,QAAM,CAACC,SAAAA,IAAaD,cAAc,IAAA;AAClC,SAAOC,YAAY,YAAYF,cAAc,WAAW;AAC1D;",
6
- "names": ["getEffectivePart", "partName", "layoutMode", "calculateOverscroll", "planksCount", "paddingInlineStart", "paddingInlineEnd", "overscrollPadding", "useMediaQuery", "useBreakpoints", "isNotMobile", "useMediaQuery", "isDesktop"]
7
- }
@@ -1,186 +0,0 @@
1
- // packages/plugins/plugin-deck/src/capabilities/navigation/set-location.ts
2
- import { openIds } from "@dxos/app-framework";
3
- var setLocation = ({ next, location, layout, attention }) => {
4
- const part = layout.layoutMode === "solo" ? "solo" : "main";
5
- const ids = openIds(next, [
6
- part
7
- ]);
8
- const current = openIds(location.active, [
9
- part
10
- ]);
11
- const removed = current.filter((id) => !ids.includes(id));
12
- const closed = Array.from(/* @__PURE__ */ new Set([
13
- ...location.closed.filter((id) => !ids.includes(id)),
14
- ...removed
15
- ]));
16
- location.closed = closed;
17
- location.active = next;
18
- if (attention) {
19
- const attended = attention.current;
20
- const [attendedId] = Array.from(attended);
21
- const isAttendedAvailable = !!attendedId && ids.includes(attendedId);
22
- if (!isAttendedAvailable) {
23
- const currentIds = location.active[part]?.map(({ id }) => id) ?? [];
24
- const attendedIndex = currentIds.indexOf(attendedId);
25
- const index = attendedIndex === -1 ? 0 : attendedIndex >= ids.length ? ids.length - 1 : attendedIndex;
26
- return next[part]?.[index].id;
27
- }
28
- }
29
- };
30
-
31
- // packages/plugins/plugin-deck/src/layout.ts
32
- import { produce } from "immer";
33
- import { SLUG_ENTRY_SEPARATOR, SLUG_KEY_VALUE_SEPARATOR, SLUG_LIST_SEPARATOR, SLUG_PATH_SEPARATOR } from "@dxos/app-framework";
34
- var partsThatSupportIncrement = [
35
- "main"
36
- ];
37
- var openEntry = (layout, part, entry, options) => {
38
- return produce(layout, (draft) => {
39
- const layoutPart = draft[part];
40
- if (!layoutPart) {
41
- draft[part] = [
42
- entry
43
- ];
44
- return;
45
- }
46
- if (part === "main") {
47
- if (layoutPart.find((e) => e.id === entry.id)) {
48
- return;
49
- }
50
- const plankPositioning = options?.positioning ?? "start";
51
- const pivotId = options?.pivotId;
52
- if (pivotId) {
53
- const pivotIndex = layoutPart.findIndex((e) => e.id === pivotId);
54
- if (pivotIndex !== -1) {
55
- if (plankPositioning === "start") {
56
- layoutPart.splice(pivotIndex, 0, entry);
57
- } else {
58
- layoutPart.splice(pivotIndex + 1, 0, entry);
59
- }
60
- return;
61
- }
62
- }
63
- if (plankPositioning === "start") {
64
- layoutPart.unshift(entry);
65
- } else {
66
- layoutPart.push(entry);
67
- }
68
- } else {
69
- draft[part] = [
70
- entry
71
- ];
72
- }
73
- });
74
- };
75
- var closeEntry = (layout, layoutCoordinate) => {
76
- return produce(layout, (draft) => {
77
- const { part, entryId: slugId } = layoutCoordinate;
78
- const layoutPart = draft[part];
79
- if (!layoutPart) {
80
- return;
81
- }
82
- const index = layoutPart.findIndex((entry) => entry.id === slugId);
83
- if (index === -1) {
84
- return;
85
- }
86
- if (layoutPart.length === 1) {
87
- delete draft[part];
88
- } else {
89
- layoutPart.splice(index, 1);
90
- }
91
- });
92
- };
93
- var incrementPlank = (layout, adjustment) => {
94
- return produce(layout, (draft) => {
95
- const { layoutCoordinate, type } = adjustment;
96
- const { part, entryId } = layoutCoordinate;
97
- if (partsThatSupportIncrement.includes(part) === false) {
98
- return;
99
- }
100
- const layoutPart = draft[part];
101
- if (!layoutPart) {
102
- return;
103
- }
104
- const index = layoutPart.findIndex((entry) => entry.id === entryId);
105
- if (index === -1 || type === "increment-start" && index === 0 || type === "increment-end" && index === layoutPart.length - 1) {
106
- return;
107
- }
108
- if (type === "increment-start") {
109
- [layoutPart[index - 1], layoutPart[index]] = [
110
- layoutPart[index],
111
- layoutPart[index - 1]
112
- ];
113
- } else if (type === "increment-end") {
114
- [layoutPart[index], layoutPart[index + 1]] = [
115
- layoutPart[index + 1],
116
- layoutPart[index]
117
- ];
118
- }
119
- });
120
- };
121
- var removePart = (layout, part) => {
122
- return produce(layout, (draft) => {
123
- delete draft[part];
124
- });
125
- };
126
- var mergeLayoutParts = (...layoutParts) => {
127
- return layoutParts.reduce((merged, current) => produce(merged, (draft) => {
128
- Object.entries(current).forEach(([part, entries]) => {
129
- const typedPart = part;
130
- if (!draft[typedPart]) {
131
- draft[typedPart] = [];
132
- }
133
- const partEntries = draft[typedPart];
134
- entries.forEach((entry) => {
135
- const existingIndex = partEntries.findIndex((e) => e.id === entry.id);
136
- if (existingIndex !== -1) {
137
- partEntries[existingIndex] = entry;
138
- } else {
139
- partEntries.push(entry);
140
- }
141
- });
142
- });
143
- }), {});
144
- };
145
- var parseLayoutEntry = (itemString) => {
146
- const [id, path] = itemString.split(SLUG_PATH_SEPARATOR);
147
- const entry = {
148
- id
149
- };
150
- if (path) {
151
- entry.path = path;
152
- }
153
- return entry;
154
- };
155
- var uriToSoloPart = (uri) => {
156
- const parts = uri.split("/");
157
- const slug = parts[parts.length - 1];
158
- if (slug.length > 0) {
159
- return {
160
- solo: [
161
- parseLayoutEntry(slug)
162
- ]
163
- };
164
- }
165
- return void 0;
166
- };
167
- var soloPartToUri = (layout) => {
168
- const soloPart = layout?.solo;
169
- if (!soloPart || soloPart.length === 0) {
170
- return "";
171
- }
172
- const entry = soloPart[0];
173
- return `${entry.id}${entry.path ? SLUG_PATH_SEPARATOR + entry.path : ""}`;
174
- };
175
-
176
- export {
177
- setLocation,
178
- openEntry,
179
- closeEntry,
180
- incrementPlank,
181
- removePart,
182
- mergeLayoutParts,
183
- uriToSoloPart,
184
- soloPartToUri
185
- };
186
- //# sourceMappingURL=chunk-4C2AFTET.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/navigation/set-location.ts", "../../../src/layout.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { openIds, type Layout, type LayoutParts, type Capabilities } from '@dxos/app-framework';\nimport { type AttentionManager } from '@dxos/plugin-attention';\n\nexport type SetLocationOptions = {\n next: LayoutParts;\n location: Capabilities.MutableLocation;\n layout: Layout;\n attention?: AttentionManager;\n};\n\nexport const setLocation = ({ next, location, layout, attention }: SetLocationOptions) => {\n const part = layout.layoutMode === 'solo' ? 'solo' : 'main';\n const ids = openIds(next, [part]);\n\n const current = openIds(location.active, [part]);\n const removed = current.filter((id) => !ids.includes(id));\n const closed = Array.from(new Set([...location.closed.filter((id) => !ids.includes(id)), ...removed]));\n\n location.closed = closed;\n location.active = next;\n\n if (attention) {\n const attended = attention.current;\n const [attendedId] = Array.from(attended);\n const isAttendedAvailable = !!attendedId && ids.includes(attendedId);\n if (!isAttendedAvailable) {\n const currentIds = location.active[part]?.map(({ id }) => id) ?? [];\n const attendedIndex = currentIds.indexOf(attendedId);\n // If outside of bounds, focus on the first/last plank, otherwise focus on the new plank in the same position.\n const index = attendedIndex === -1 ? 0 : attendedIndex >= ids.length ? ids.length - 1 : attendedIndex;\n return next[part]?.[index].id;\n }\n }\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { produce } from 'immer';\n\nimport {\n type LayoutAdjustment,\n type LayoutCoordinate,\n type LayoutEntry,\n type LayoutPart,\n type LayoutParts,\n SLUG_ENTRY_SEPARATOR,\n SLUG_KEY_VALUE_SEPARATOR,\n SLUG_LIST_SEPARATOR,\n SLUG_PATH_SEPARATOR,\n} from '@dxos/app-framework';\n\nimport { type NewPlankPositioning } from './types';\n\n// Part feature support\nconst partsThatSupportIncrement = ['main'] as LayoutPart[];\n\n//\n// --- Layout Parts Manipulation ----------------------------------------------\n\ntype OpenLayoutEntryOptions = { positioning?: NewPlankPositioning; pivotId?: string };\n\nexport const openEntry = (\n layout: LayoutParts,\n part: LayoutPart,\n entry: LayoutEntry,\n options?: OpenLayoutEntryOptions,\n): LayoutParts => {\n return produce(layout, (draft) => {\n const layoutPart = draft[part];\n // If the part doesn't exist, create it.\n if (!layoutPart) {\n draft[part] = [entry];\n return;\n }\n if (part === 'main') {\n // Check that the entry is not already in the part\n if (layoutPart.find((e) => e.id === entry.id)) {\n return;\n }\n\n const plankPositioning = options?.positioning ?? 'start';\n const pivotId = options?.pivotId;\n\n if (pivotId) {\n const pivotIndex = layoutPart.findIndex((e) => e.id === pivotId);\n if (pivotIndex !== -1) {\n if (plankPositioning === 'start') {\n layoutPart.splice(pivotIndex, 0, entry);\n } else {\n layoutPart.splice(pivotIndex + 1, 0, entry);\n }\n return;\n }\n }\n\n // If no pivot found or provided, fall back to original behavior\n if (plankPositioning === 'start') {\n layoutPart.unshift(entry);\n } else {\n layoutPart.push(entry);\n }\n } else {\n // If the part is not main, we're going to replace the single entry in the part with the new entry.\n draft[part] = [entry];\n }\n });\n};\n\nexport const closeEntry = (layout: LayoutParts, layoutCoordinate: LayoutCoordinate): LayoutParts => {\n return produce(layout, (draft) => {\n const { part, entryId: slugId } = layoutCoordinate;\n const layoutPart = draft[part];\n if (!layoutPart) {\n return;\n }\n\n const index = layoutPart.findIndex((entry) => entry.id === slugId);\n if (index === -1) {\n return;\n }\n\n // If there's only one entry in the layout part, remove the whole part from the layout.\n if (layoutPart.length === 1) {\n delete draft[part];\n } else {\n layoutPart.splice(index, 1);\n }\n });\n};\n\nexport const incrementPlank = (layout: LayoutParts, adjustment: LayoutAdjustment): LayoutParts => {\n return produce(layout, (draft) => {\n const { layoutCoordinate, type } = adjustment;\n const { part, entryId } = layoutCoordinate;\n\n // Only allow adjustments in the 'main' part\n if (partsThatSupportIncrement.includes(part) === false) {\n return;\n }\n\n const layoutPart = draft[part];\n if (!layoutPart) {\n return;\n }\n const index = layoutPart.findIndex((entry) => entry.id === entryId);\n if (\n index === -1 ||\n (type === 'increment-start' && index === 0) ||\n (type === 'increment-end' && index === layoutPart.length - 1)\n ) {\n return;\n }\n\n if (type === 'increment-start') {\n // Swap the current item with the previous item.\n [layoutPart[index - 1], layoutPart[index]] = [layoutPart[index], layoutPart[index - 1]];\n } else if (type === 'increment-end') {\n // Swap the current item with the next item.\n [layoutPart[index], layoutPart[index + 1]] = [layoutPart[index + 1], layoutPart[index]];\n }\n });\n};\n\nexport const removePart = (layout: LayoutParts, part: LayoutPart): LayoutParts => {\n return produce(layout, (draft) => {\n delete draft[part];\n });\n};\n\nexport const mergeLayoutParts = (...layoutParts: LayoutParts[]): LayoutParts => {\n return layoutParts.reduce(\n (merged, current) =>\n produce(merged, (draft) => {\n Object.entries(current).forEach(([part, entries]) => {\n const typedPart = part as LayoutPart;\n\n if (!draft[typedPart]) {\n draft[typedPart] = [];\n }\n\n const partEntries = draft[typedPart] as LayoutEntry[];\n\n entries.forEach((entry) => {\n const existingIndex = partEntries.findIndex((e) => e.id === entry.id);\n if (existingIndex !== -1) {\n partEntries[existingIndex] = entry;\n } else {\n partEntries.push(entry);\n }\n });\n });\n }),\n {} as LayoutParts,\n );\n};\n\n//\n// URI Projection\n//\n\nconst parseLayoutEntry = (itemString: string): LayoutEntry => {\n // Layout entries are in the form of 'id~path' or just 'id'\n const [id, path] = itemString.split(SLUG_PATH_SEPARATOR);\n const entry: LayoutEntry = { id };\n if (path) {\n entry.path = path;\n }\n return entry;\n};\n\nexport const uriToSoloPart = (uri: string): LayoutParts | undefined => {\n // Now after the domain part, there will be a single ID with an optional path\n const parts = uri.split('/');\n const slug = parts[parts.length - 1]; // Take the last part of the URI\n\n if (slug.length > 0) {\n return {\n solo: [parseLayoutEntry(slug)],\n };\n }\n\n return undefined;\n};\n\nexport const soloPartToUri = (layout: LayoutParts): string => {\n const soloPart = layout?.solo;\n if (!soloPart || soloPart.length === 0) {\n return '';\n }\n\n const entry = soloPart[0];\n return `${entry.id}${entry.path ? SLUG_PATH_SEPARATOR + entry.path : ''}`;\n};\n\n/**\n * Converts a URI string into a LayoutParts object.\n * @deprecated Keeping these as a reference for now. We should remove these once we're sure we don't need them.\n */\nexport const uriToActiveParts = (uri: string): LayoutParts => {\n const parts = uri.split('/');\n const slug = parts[parts.length - 1]; // Take the last part of the URI\n\n if (!slug) {\n return {}; // Return an empty object if the slug is empty\n }\n\n return slug.split(SLUG_ENTRY_SEPARATOR).reduce((acc: LayoutParts, partDescriptor) => {\n const [part, layoutEntry] = partDescriptor.split(SLUG_KEY_VALUE_SEPARATOR);\n if (part && layoutEntry) {\n // TODO(Zan): Remove this cast.\n acc[part as LayoutPart] = layoutEntry.split(SLUG_LIST_SEPARATOR).map(parseLayoutEntry);\n }\n return acc;\n }, {} as LayoutParts);\n};\n\nconst formatLayoutEntry = ({ id, path }: LayoutEntry): string => {\n // NOTE(Zan): Format = `[SOLO_INDICATOR] ID [PATH_SEPARATOR PATH]`.\n let entry = '';\n entry += id;\n if (path) {\n entry += `${SLUG_PATH_SEPARATOR}${path}`;\n }\n return entry;\n};\n\nconst formatPartDescriptor = (part: LayoutPart, layoutEntries: LayoutEntry[]): string => {\n const formattedEntries = layoutEntries.map(formatLayoutEntry).join(SLUG_LIST_SEPARATOR);\n return `${part}${SLUG_KEY_VALUE_SEPARATOR}${formattedEntries}`;\n};\n\n/**\n * Converts a LayoutParts object into a URI string.\n * @deprecated Keeping these as a reference for now. We should remove these once we're sure we don't need them.\n */\nexport const activePartsToUri = (activeParts: LayoutParts): string => {\n return Object.entries(activeParts)\n .filter(([, layoutEntries]) => layoutEntries.length > 0) // Only include non-empty parts\n .map(([part, layoutEntries]) => formatPartDescriptor(part as LayoutPart, layoutEntries))\n .join(SLUG_ENTRY_SEPARATOR);\n};\n"],
5
- "mappings": ";AAIA,SAASA,eAAiE;AAUnE,IAAMC,cAAc,CAAC,EAAEC,MAAMC,UAAUC,QAAQC,UAAS,MAAsB;AACnF,QAAMC,OAAOF,OAAOG,eAAe,SAAS,SAAS;AACrD,QAAMC,MAAMC,QAAQP,MAAM;IAACI;GAAK;AAEhC,QAAMI,UAAUD,QAAQN,SAASQ,QAAQ;IAACL;GAAK;AAC/C,QAAMM,UAAUF,QAAQG,OAAO,CAACC,OAAO,CAACN,IAAIO,SAASD,EAAAA,CAAAA;AACrD,QAAME,SAASC,MAAMC,KAAK,oBAAIC,IAAI;OAAIhB,SAASa,OAAOH,OAAO,CAACC,OAAO,CAACN,IAAIO,SAASD,EAAAA,CAAAA;OAASF;GAAQ,CAAA;AAEpGT,WAASa,SAASA;AAClBb,WAASQ,SAAST;AAElB,MAAIG,WAAW;AACb,UAAMe,WAAWf,UAAUK;AAC3B,UAAM,CAACW,UAAAA,IAAcJ,MAAMC,KAAKE,QAAAA;AAChC,UAAME,sBAAsB,CAAC,CAACD,cAAcb,IAAIO,SAASM,UAAAA;AACzD,QAAI,CAACC,qBAAqB;AACxB,YAAMC,aAAapB,SAASQ,OAAOL,IAAAA,GAAOkB,IAAI,CAAC,EAAEV,GAAE,MAAOA,EAAAA,KAAO,CAAA;AACjE,YAAMW,gBAAgBF,WAAWG,QAAQL,UAAAA;AAEzC,YAAMM,QAAQF,kBAAkB,KAAK,IAAIA,iBAAiBjB,IAAIoB,SAASpB,IAAIoB,SAAS,IAAIH;AACxF,aAAOvB,KAAKI,IAAAA,IAAQqB,KAAAA,EAAOb;IAC7B;EACF;AACF;;;ACjCA,SAASe,eAAe;AAExB,SAMEC,sBAC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Q;AAC9C,YAAME,YAAYpC;AAElB,UAAI,CAACI,MAAMgC,SAAAA,GAAY;AACrBhC,cAAMgC,SAAAA,IAAa,CAAA;MACrB;AAEA,YAAMC,cAAcjC,MAAMgC,SAAAA;AAE1BF,cAAQC,QAAQ,CAAClC,UAAAA;AACf,cAAMqC,gBAAgBD,YAAYxB,UAAU,CAACN,MAAMA,EAAEC,OAAOP,MAAMO,EAAE;AACpE,YAAI8B,kBAAkB,IAAI;AACxBD,sBAAYC,aAAAA,IAAiBrC;QAC/B,OAAO;AACLoC,sBAAYrB,KAAKf,KAAAA;QACnB;MACF,CAAA;IACF,CAAA;EACF,CAAA,GACF,CAAC,CAAA;AAEL;AAMA,IAAMsC,mBAAmB,CAACC,eAAAA;AAExB,QAAM,CAAChC,IAAIiC,IAAAA,IAAQD,WAAWE,MAAMC,mBAAAA;AACpC,QAAM1C,QAAqB;IAAEO;EAAG;AAChC,MAAIiC,MAAM;AACRxC,UAAMwC,OAAOA;EACf;AACA,SAAOxC;AACT;AAEO,IAAM2C,gBAAgB,CAACC,QAAAA;AAE5B,QAAMC,QAAQD,IAAIH,MAAM,GAAA;AACxB,QAAMK,OAAOD,MAAMA,MAAMxB,SAAS,CAAA;AAElC,MAAIyB,KAAKzB,SAAS,GAAG;AACnB,WAAO;MACL0B,MAAM;QAACT,iBAAiBQ,IAAAA;;IAC1B;EACF;AAEA,SAAOE;AACT;AAEO,IAAMC,gBAAgB,CAACnD,WAAAA;AAC5B,QAAMoD,WAAWpD,QAAQiD;AACzB,MAAI,CAACG,YAAYA,SAAS7B,WAAW,GAAG;AACtC,WAAO;EACT;AAEA,QAAMrB,QAAQkD,SAAS,CAAA;AACvB,SAAO,GAAGlD,MAAMO,EAAE,GAAGP,MAAMwC,OAAOE,sBAAsB1C,MAAMwC,OAAO,EAAA;AACvE;",
6
- "names": ["openIds", "setLocation", "next", "location", "layout", "attention", "part", "layoutMode", "ids", "openIds", "current", "active", "removed", "filter", "id", "includes", "closed", "Array", "from", "Set", "attended", "attendedId", "isAttendedAvailable", "currentIds", "map", "attendedIndex", "indexOf", "index", "length", "produce", "SLUG_ENTRY_SEPARATOR", "SLUG_KEY_VALUE_SEPARATOR", "SLUG_LIST_SEPARATOR", "SLUG_PATH_SEPARATOR", "partsThatSupportIncrement", "openEntry", "layout", "part", "entry", "options", "produce", "draft", "layoutPart", "find", "e", "id", "plankPositioning", "positioning", "pivotId", "pivotIndex", "findIndex", "splice", "unshift", "push", "closeEntry", "layoutCoordinate", "entryId", "slugId", "index", "length", "incrementPlank", "adjustment", "type", "includes", "removePart", "mergeLayoutParts", "layoutParts", "reduce", "merged", "current", "Object", "entries", "forEach", "typedPart", "partEntries", "existingIndex", "parseLayoutEntry", "itemString", "path", "split", "SLUG_PATH_SEPARATOR", "uriToSoloPart", "uri", "parts", "slug", "solo", "undefined", "soloPartToUri", "soloPart"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/capabilities.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { defineCapability, type Label } from '@dxos/app-framework';\nimport { type DeepReadonly } from '@dxos/util';\n\nimport { type DeckContextType } from '../components';\nimport { DECK_PLUGIN } from '../meta';\n\nexport namespace DeckCapabilities {\n export const DeckState = defineCapability<DeepReadonly<DeckContextType>>(`${DECK_PLUGIN}/capability/state`);\n export const MutableDeckState = defineCapability<DeckContextType>(`${DECK_PLUGIN}/capability/state`);\n export const ComplementaryPanel = defineCapability<{ id: string; label: Label; icon: string }>(\n `${DECK_PLUGIN}/capability/complementary-panel`,\n );\n}\n"],
5
- "mappings": ";;;;;AAIA,SAASA,wBAAoC;;UAM5BC,mBAAAA;oBACFC,YAAYC,iBAAgD,GAAGC,WAAAA,mBAA8B;oBAC7FC,mBAAmBF,iBAAkC,GAAGC,WAAAA,mBAA8B;oBACtFE,qBAAqBH,iBAChC,GAAGC,WAAAA,iCAA4C;AAEnD,GANiBH,qBAAAA,mBAAAA,CAAAA,EAAAA;",
6
- "names": ["defineCapability", "DeckCapabilities", "DeckState", "defineCapability", "DECK_PLUGIN", "MutableDeckState", "ComplementaryPanel"]
7
- }
@@ -1,44 +0,0 @@
1
- import {
2
- DECK_PLUGIN
3
- } from "./chunk-JQJ5UWVB.mjs";
4
-
5
- // packages/plugins/plugin-deck/src/types.ts
6
- import { S } from "@dxos/echo-schema";
7
- var NewPlankPositions = [
8
- "start",
9
- "end"
10
- ];
11
- var OverscrollOptions = [
12
- "none",
13
- "centering"
14
- ];
15
- var DeckSettingsSchema = S.mutable(S.Struct({
16
- showHints: S.Boolean,
17
- customSlots: S.Boolean,
18
- flatDeck: S.Boolean,
19
- enableNativeRedirect: S.Boolean,
20
- newPlankPositioning: S.Literal(...NewPlankPositions),
21
- overscroll: S.Literal(...OverscrollOptions)
22
- }));
23
- var DECK_ACTION = `${DECK_PLUGIN}/action`;
24
- var DeckAction;
25
- (function(DeckAction2) {
26
- class UpdatePlankSize extends S.TaggedClass()(`${DECK_ACTION}/update-plank-size`, {
27
- input: S.Struct({
28
- id: S.String,
29
- size: S.Number
30
- }),
31
- output: S.Void
32
- }) {
33
- }
34
- DeckAction2.UpdatePlankSize = UpdatePlankSize;
35
- })(DeckAction || (DeckAction = {}));
36
-
37
- export {
38
- NewPlankPositions,
39
- OverscrollOptions,
40
- DeckSettingsSchema,
41
- DECK_ACTION,
42
- DeckAction
43
- };
44
- //# sourceMappingURL=chunk-KY5WXIXY.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/types.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { S } from '@dxos/echo-schema';\nimport { type Label } from '@dxos/react-ui';\n\nimport { DECK_PLUGIN } from './meta';\n\n// TODO(Zan): In the future we should consider adding new planks adjacent to the attended plank.\nexport const NewPlankPositions = ['start', 'end'] as const;\nexport type NewPlankPositioning = (typeof NewPlankPositions)[number];\n\nexport const OverscrollOptions = ['none', 'centering'] as const;\nexport type Overscroll = (typeof OverscrollOptions)[number];\n\n// TODO(wittjosiah): Include a predicate for whether the panel is visible for the current subject.\nexport type Panel = { id: string; label: Label; icon: string };\n\nexport const DeckSettingsSchema = S.mutable(\n S.Struct({\n showHints: S.Boolean,\n customSlots: S.Boolean,\n flatDeck: S.Boolean,\n enableNativeRedirect: S.Boolean,\n newPlankPositioning: S.Literal(...NewPlankPositions),\n overscroll: S.Literal(...OverscrollOptions),\n }),\n);\n\nexport type DeckSettingsProps = S.Schema.Type<typeof DeckSettingsSchema>;\n\nexport const DECK_ACTION = `${DECK_PLUGIN}/action`;\n\nexport namespace DeckAction {\n export class UpdatePlankSize extends S.TaggedClass<UpdatePlankSize>()(`${DECK_ACTION}/update-plank-size`, {\n input: S.Struct({\n id: S.String,\n size: S.Number,\n }),\n output: S.Void,\n }) {}\n}\n"],
5
- "mappings": ";;;;;AAIA,SAASA,SAAS;AAMX,IAAMC,oBAAoB;EAAC;EAAS;;AAGpC,IAAMC,oBAAoB;EAAC;EAAQ;;AAMnC,IAAMC,qBAAqBC,EAAEC,QAClCD,EAAEE,OAAO;EACPC,WAAWH,EAAEI;EACbC,aAAaL,EAAEI;EACfE,UAAUN,EAAEI;EACZG,sBAAsBP,EAAEI;EACxBI,qBAAqBR,EAAES,QAAO,GAAIZ,iBAAAA;EAClCa,YAAYV,EAAES,QAAO,GAAIX,iBAAAA;AAC3B,CAAA,CAAA;AAKK,IAAMa,cAAc,GAAGC,WAAAA;;UAEbC,aAAAA;EACR,MAAMC,wBAAwBd,EAAEe,YAAW,EAAoB,GAAGJ,WAAAA,sBAAiC;IACxGK,OAAOhB,EAAEE,OAAO;MACde,IAAIjB,EAAEkB;MACNC,MAAMnB,EAAEoB;IACV,CAAA;IACAC,QAAQrB,EAAEsB;EACZ,CAAA,EAAA;EAAI;cANSR,kBAAAA;AAOf,GARiBD,eAAAA,aAAAA,CAAAA,EAAAA;",
6
- "names": ["S", "NewPlankPositions", "OverscrollOptions", "DeckSettingsSchema", "S", "mutable", "Struct", "showHints", "Boolean", "customSlots", "flatDeck", "enableNativeRedirect", "newPlankPositioning", "Literal", "overscroll", "DECK_ACTION", "DECK_PLUGIN", "DeckAction", "UpdatePlankSize", "TaggedClass", "input", "id", "String", "size", "Number", "output", "Void"]
7
- }