@dxos/plugin-deck 0.8.4-main.ae835ea → 0.8.4-main.bc674ce

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 (276) hide show
  1. package/dist/lib/browser/app-graph-builder-DTVCULQ4.mjs +120 -0
  2. package/dist/lib/browser/app-graph-builder-DTVCULQ4.mjs.map +7 -0
  3. package/dist/lib/browser/{check-app-scheme-HIEVFAAX.mjs → check-app-scheme-JSRXXIYF.mjs} +9 -9
  4. package/dist/lib/browser/check-app-scheme-JSRXXIYF.mjs.map +7 -0
  5. package/dist/lib/browser/{chunk-F3VCCHVL.mjs → chunk-ATFPDN6J.mjs} +149 -19
  6. package/dist/lib/browser/chunk-ATFPDN6J.mjs.map +7 -0
  7. package/dist/lib/browser/{chunk-CNTGBCMK.mjs → chunk-NHABISX2.mjs} +40 -33
  8. package/dist/lib/browser/chunk-NHABISX2.mjs.map +7 -0
  9. package/dist/lib/browser/chunk-S4A5UO4K.mjs +1448 -0
  10. package/dist/lib/browser/chunk-S4A5UO4K.mjs.map +7 -0
  11. package/dist/lib/browser/chunk-UNG4CLLP.mjs +161 -0
  12. package/dist/lib/browser/chunk-UNG4CLLP.mjs.map +7 -0
  13. package/dist/lib/browser/index.mjs +72 -66
  14. package/dist/lib/browser/index.mjs.map +4 -4
  15. package/dist/lib/browser/meta.json +1 -1
  16. package/dist/lib/browser/operation-resolver-CDYBLZJ4.mjs +595 -0
  17. package/dist/lib/browser/operation-resolver-CDYBLZJ4.mjs.map +7 -0
  18. package/dist/lib/browser/react-root-XDCMNENQ.mjs +47 -0
  19. package/dist/lib/browser/react-root-XDCMNENQ.mjs.map +7 -0
  20. package/dist/lib/browser/react-surface-HODERLOL.mjs +42 -0
  21. package/dist/lib/browser/react-surface-HODERLOL.mjs.map +7 -0
  22. package/dist/lib/browser/settings-OMHVGZ6V.mjs +37 -0
  23. package/dist/lib/browser/settings-OMHVGZ6V.mjs.map +7 -0
  24. package/dist/lib/browser/state-OC3BSB6E.mjs +103 -0
  25. package/dist/lib/browser/state-OC3BSB6E.mjs.map +7 -0
  26. package/dist/lib/browser/toolkit-R53LD3EA.mjs +53 -0
  27. package/dist/lib/browser/toolkit-R53LD3EA.mjs.map +7 -0
  28. package/dist/lib/browser/types/index.mjs +11 -4
  29. package/dist/lib/browser/url-handler-53TE6JZO.mjs +93 -0
  30. package/dist/lib/browser/url-handler-53TE6JZO.mjs.map +7 -0
  31. package/dist/lib/node-esm/app-graph-builder-473BNZDJ.mjs +121 -0
  32. package/dist/lib/node-esm/app-graph-builder-473BNZDJ.mjs.map +7 -0
  33. package/dist/lib/node-esm/check-app-scheme-IVYRHKRH.mjs +33 -0
  34. package/dist/lib/node-esm/check-app-scheme-IVYRHKRH.mjs.map +7 -0
  35. package/dist/lib/node-esm/chunk-ADPMWKLL.mjs +154 -0
  36. package/dist/lib/node-esm/chunk-ADPMWKLL.mjs.map +7 -0
  37. package/dist/lib/node-esm/chunk-D34L3ECT.mjs +1449 -0
  38. package/dist/lib/node-esm/chunk-D34L3ECT.mjs.map +7 -0
  39. package/dist/lib/node-esm/chunk-SKEVPQ7E.mjs +162 -0
  40. package/dist/lib/node-esm/chunk-SKEVPQ7E.mjs.map +7 -0
  41. package/dist/lib/node-esm/chunk-XAKTY3EB.mjs +294 -0
  42. package/dist/lib/node-esm/chunk-XAKTY3EB.mjs.map +7 -0
  43. package/dist/lib/node-esm/index.mjs +181 -0
  44. package/dist/lib/node-esm/index.mjs.map +7 -0
  45. package/dist/lib/node-esm/meta.json +1 -0
  46. package/dist/lib/node-esm/operation-resolver-WUOE33ID.mjs +596 -0
  47. package/dist/lib/node-esm/operation-resolver-WUOE33ID.mjs.map +7 -0
  48. package/dist/lib/node-esm/react-root-O6GZO62Z.mjs +48 -0
  49. package/dist/lib/node-esm/react-root-O6GZO62Z.mjs.map +7 -0
  50. package/dist/lib/node-esm/react-surface-IHDJDGC5.mjs +43 -0
  51. package/dist/lib/node-esm/react-surface-IHDJDGC5.mjs.map +7 -0
  52. package/dist/lib/node-esm/settings-2HB6FKIK.mjs +38 -0
  53. package/dist/lib/node-esm/settings-2HB6FKIK.mjs.map +7 -0
  54. package/dist/lib/node-esm/state-JRQ45ACJ.mjs +104 -0
  55. package/dist/lib/node-esm/state-JRQ45ACJ.mjs.map +7 -0
  56. package/dist/lib/node-esm/toolkit-JLPZNNKB.mjs +54 -0
  57. package/dist/lib/node-esm/toolkit-JLPZNNKB.mjs.map +7 -0
  58. package/dist/lib/node-esm/types/index.mjs +40 -0
  59. package/dist/lib/node-esm/url-handler-QGF2R24T.mjs +94 -0
  60. package/dist/lib/node-esm/url-handler-QGF2R24T.mjs.map +7 -0
  61. package/dist/types/src/DeckPlugin.d.ts +2 -1
  62. package/dist/types/src/DeckPlugin.d.ts.map +1 -1
  63. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
  64. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
  65. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
  66. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
  67. package/dist/types/src/capabilities/check-app-scheme/check-app-scheme.d.ts +5 -0
  68. package/dist/types/src/capabilities/check-app-scheme/check-app-scheme.d.ts.map +1 -0
  69. package/dist/types/src/capabilities/check-app-scheme/index.d.ts +3 -0
  70. package/dist/types/src/capabilities/check-app-scheme/index.d.ts.map +1 -0
  71. package/dist/types/src/capabilities/index.d.ts +8 -13
  72. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  73. package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
  74. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
  75. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
  76. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
  77. package/dist/types/src/capabilities/react-root/index.d.ts +6 -0
  78. package/dist/types/src/capabilities/react-root/index.d.ts.map +1 -0
  79. package/dist/types/src/capabilities/react-root/react-root.d.ts +9 -0
  80. package/dist/types/src/capabilities/react-root/react-root.d.ts.map +1 -0
  81. package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
  82. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
  83. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
  84. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
  85. package/dist/types/src/capabilities/settings/index.d.ts +19 -0
  86. package/dist/types/src/capabilities/settings/index.d.ts.map +1 -0
  87. package/dist/types/src/capabilities/settings/settings.d.ts +21 -0
  88. package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -0
  89. package/dist/types/src/capabilities/state/index.d.ts +172 -0
  90. package/dist/types/src/capabilities/state/index.d.ts.map +1 -0
  91. package/dist/types/src/capabilities/state/state.d.ts +175 -0
  92. package/dist/types/src/capabilities/state/state.d.ts.map +1 -0
  93. package/dist/types/src/capabilities/toolkit/index.d.ts +3 -0
  94. package/dist/types/src/capabilities/toolkit/index.d.ts.map +1 -0
  95. package/dist/types/src/capabilities/toolkit/toolkit.d.ts +26 -0
  96. package/dist/types/src/capabilities/toolkit/toolkit.d.ts.map +1 -0
  97. package/dist/types/src/capabilities/tools/index.d.ts +3 -0
  98. package/dist/types/src/capabilities/tools/index.d.ts.map +1 -0
  99. package/dist/types/src/capabilities/tools/tools.d.ts +12 -0
  100. package/dist/types/src/capabilities/tools/tools.d.ts.map +1 -0
  101. package/dist/types/src/capabilities/url-handler/index.d.ts +3 -0
  102. package/dist/types/src/capabilities/url-handler/index.d.ts.map +1 -0
  103. package/dist/types/src/capabilities/url-handler/url-handler.d.ts +5 -0
  104. package/dist/types/src/capabilities/url-handler/url-handler.d.ts.map +1 -0
  105. package/dist/types/src/components/DeckLayout/ContentEmpty.d.ts.map +1 -1
  106. package/dist/types/src/components/DeckLayout/DeckLayout.d.ts.map +1 -1
  107. package/dist/types/src/components/DeckLayout/DeckLayout.stories.d.ts +1 -1
  108. package/dist/types/src/components/DeckLayout/DeckLayout.stories.d.ts.map +1 -1
  109. package/dist/types/src/components/DeckLayout/DeckMain.d.ts.map +1 -1
  110. package/dist/types/src/components/DeckLayout/Dialog.d.ts.map +1 -1
  111. package/dist/types/src/components/DeckLayout/Popover.d.ts.map +1 -1
  112. package/dist/types/src/components/DeckLayout/Toast.d.ts +3 -3
  113. package/dist/types/src/components/DeckLayout/Toast.d.ts.map +1 -1
  114. package/dist/types/src/components/DeckSettings/DeckSettings.d.ts +4 -2
  115. package/dist/types/src/components/DeckSettings/DeckSettings.d.ts.map +1 -1
  116. package/dist/types/src/components/Plank/Plank.d.ts +3 -3
  117. package/dist/types/src/components/Plank/Plank.d.ts.map +1 -1
  118. package/dist/types/src/components/Plank/Plank.stories.d.ts +23 -5
  119. package/dist/types/src/components/Plank/Plank.stories.d.ts.map +1 -1
  120. package/dist/types/src/components/Plank/PlankControls.d.ts +1 -1
  121. package/dist/types/src/components/Plank/PlankControls.d.ts.map +1 -1
  122. package/dist/types/src/components/Plank/PlankError.d.ts +1 -1
  123. package/dist/types/src/components/Plank/PlankError.d.ts.map +1 -1
  124. package/dist/types/src/components/Plank/PlankHeading.d.ts +2 -2
  125. package/dist/types/src/components/Plank/PlankHeading.d.ts.map +1 -1
  126. package/dist/types/src/components/Sidebar/ComplementarySidebar.d.ts.map +1 -1
  127. package/dist/types/src/components/Sidebar/Sidebar.d.ts.map +1 -1
  128. package/dist/types/src/components/Sidebar/SidebarButton.d.ts.map +1 -1
  129. package/dist/types/src/hooks/index.d.ts +1 -0
  130. package/dist/types/src/hooks/index.d.ts.map +1 -1
  131. package/dist/types/src/hooks/useDeckCompanions.d.ts +3 -3
  132. package/dist/types/src/hooks/useDeckCompanions.d.ts.map +1 -1
  133. package/dist/types/src/hooks/useDeckState.d.ts +17 -0
  134. package/dist/types/src/hooks/useDeckState.d.ts.map +1 -0
  135. package/dist/types/src/hooks/useHoistStatusbar.d.ts +1 -1
  136. package/dist/types/src/hooks/useHoistStatusbar.d.ts.map +1 -1
  137. package/dist/types/src/hooks/useNodeActionExpander.d.ts +1 -1
  138. package/dist/types/src/hooks/useNodeActionExpander.d.ts.map +1 -1
  139. package/dist/types/src/index.d.ts +1 -2
  140. package/dist/types/src/index.d.ts.map +1 -1
  141. package/dist/types/src/meta.d.ts +2 -2
  142. package/dist/types/src/meta.d.ts.map +1 -1
  143. package/dist/types/src/translations.d.ts +1 -1
  144. package/dist/types/src/{capabilities → types}/capabilities.d.ts +96 -90
  145. package/dist/types/src/types/capabilities.d.ts.map +1 -0
  146. package/dist/types/src/types/events.d.ts +7 -0
  147. package/dist/types/src/types/events.d.ts.map +1 -0
  148. package/dist/types/src/types/index.d.ts +2 -0
  149. package/dist/types/src/types/index.d.ts.map +1 -1
  150. package/dist/types/src/types/schema.d.ts +86 -27
  151. package/dist/types/src/types/schema.d.ts.map +1 -1
  152. package/dist/types/src/util/set-active.d.ts +18 -3
  153. package/dist/types/src/util/set-active.d.ts.map +1 -1
  154. package/dist/types/tsconfig.tsbuildinfo +1 -1
  155. package/package.json +53 -47
  156. package/src/DeckPlugin.ts +27 -48
  157. package/src/capabilities/app-graph-builder/app-graph-builder.ts +118 -0
  158. package/src/capabilities/app-graph-builder/index.ts +7 -0
  159. package/src/capabilities/{check-app-scheme.ts → check-app-scheme/check-app-scheme.ts} +12 -11
  160. package/src/capabilities/check-app-scheme/index.ts +7 -0
  161. package/src/capabilities/index.ts +9 -14
  162. package/src/capabilities/operation-resolver/index.ts +10 -0
  163. package/src/capabilities/operation-resolver/operation-resolver.ts +555 -0
  164. package/src/capabilities/react-root/index.ts +7 -0
  165. package/src/capabilities/react-root/react-root.tsx +47 -0
  166. package/src/capabilities/react-surface/index.ts +7 -0
  167. package/src/capabilities/react-surface/react-surface.tsx +37 -0
  168. package/src/capabilities/settings/index.ts +7 -0
  169. package/src/capabilities/settings/settings.ts +38 -0
  170. package/src/capabilities/state/index.ts +7 -0
  171. package/src/capabilities/state/state.ts +104 -0
  172. package/src/capabilities/toolkit/index.ts +7 -0
  173. package/src/capabilities/toolkit/toolkit.ts +63 -0
  174. package/src/capabilities/tools/index.ts +7 -0
  175. package/src/capabilities/tools/tools.ts +92 -0
  176. package/src/capabilities/url-handler/index.ts +7 -0
  177. package/src/capabilities/url-handler/url-handler.ts +95 -0
  178. package/src/components/DeckLayout/ActiveNode.tsx +1 -1
  179. package/src/components/DeckLayout/Banner.tsx +3 -3
  180. package/src/components/DeckLayout/ContentEmpty.tsx +3 -4
  181. package/src/components/DeckLayout/DeckLayout.stories.tsx +18 -31
  182. package/src/components/DeckLayout/DeckLayout.tsx +13 -11
  183. package/src/components/DeckLayout/DeckMain.tsx +45 -44
  184. package/src/components/DeckLayout/Dialog.tsx +13 -10
  185. package/src/components/DeckLayout/Fallback.tsx +2 -2
  186. package/src/components/DeckLayout/Popover.tsx +44 -32
  187. package/src/components/DeckLayout/StatusBar.tsx +1 -1
  188. package/src/components/DeckLayout/Toast.tsx +5 -5
  189. package/src/components/DeckSettings/DeckSettings.tsx +18 -8
  190. package/src/components/Plank/Plank.stories.tsx +14 -6
  191. package/src/components/Plank/Plank.tsx +66 -49
  192. package/src/components/Plank/PlankControls.tsx +6 -6
  193. package/src/components/Plank/PlankError.tsx +2 -2
  194. package/src/components/Plank/PlankHeading.tsx +29 -35
  195. package/src/components/Sidebar/ComplementarySidebar.tsx +54 -27
  196. package/src/components/Sidebar/Sidebar.tsx +4 -4
  197. package/src/components/Sidebar/SidebarButton.tsx +35 -28
  198. package/src/components/fragments.ts +1 -1
  199. package/src/hooks/index.ts +1 -0
  200. package/src/hooks/useCompanions.ts +1 -1
  201. package/src/hooks/useDeckCompanions.ts +6 -4
  202. package/src/hooks/useDeckState.ts +82 -0
  203. package/src/hooks/useHoistStatusbar.ts +3 -5
  204. package/src/hooks/useNodeActionExpander.ts +4 -4
  205. package/src/index.ts +1 -2
  206. package/src/meta.ts +2 -2
  207. package/src/translations.ts +1 -1
  208. package/src/types/capabilities.ts +33 -0
  209. package/src/types/events.ts +20 -0
  210. package/src/types/index.ts +2 -0
  211. package/src/types/schema.ts +81 -11
  212. package/src/util/layoutAppliesTopbar.ts +1 -1
  213. package/src/util/set-active.ts +49 -29
  214. package/dist/lib/browser/app-graph-builder-PCMSER2O.mjs +0 -153
  215. package/dist/lib/browser/app-graph-builder-PCMSER2O.mjs.map +0 -7
  216. package/dist/lib/browser/check-app-scheme-HIEVFAAX.mjs.map +0 -7
  217. package/dist/lib/browser/chunk-27I7DJUG.mjs +0 -129
  218. package/dist/lib/browser/chunk-27I7DJUG.mjs.map +0 -7
  219. package/dist/lib/browser/chunk-5KMJPIQC.mjs +0 -16
  220. package/dist/lib/browser/chunk-5KMJPIQC.mjs.map +0 -7
  221. package/dist/lib/browser/chunk-CNTGBCMK.mjs.map +0 -7
  222. package/dist/lib/browser/chunk-F3VCCHVL.mjs.map +0 -7
  223. package/dist/lib/browser/chunk-MFFZK4LT.mjs +0 -127
  224. package/dist/lib/browser/chunk-MFFZK4LT.mjs.map +0 -7
  225. package/dist/lib/browser/chunk-SBJLGRJV.mjs +0 -1532
  226. package/dist/lib/browser/chunk-SBJLGRJV.mjs.map +0 -7
  227. package/dist/lib/browser/chunk-UXLU6CMW.mjs +0 -16
  228. package/dist/lib/browser/chunk-UXLU6CMW.mjs.map +0 -7
  229. package/dist/lib/browser/intent-resolver-Q3KETDSS.mjs +0 -524
  230. package/dist/lib/browser/intent-resolver-Q3KETDSS.mjs.map +0 -7
  231. package/dist/lib/browser/react-root-LU3662ME.mjs +0 -43
  232. package/dist/lib/browser/react-root-LU3662ME.mjs.map +0 -7
  233. package/dist/lib/browser/react-surface-TDBFPN5T.mjs +0 -40
  234. package/dist/lib/browser/react-surface-TDBFPN5T.mjs.map +0 -7
  235. package/dist/lib/browser/settings-SDPTOCCM.mjs +0 -30
  236. package/dist/lib/browser/settings-SDPTOCCM.mjs.map +0 -7
  237. package/dist/lib/browser/state-QTVNH7N6.mjs +0 -12
  238. package/dist/lib/browser/toolkit-TM2Y6YL2.mjs +0 -53
  239. package/dist/lib/browser/toolkit-TM2Y6YL2.mjs.map +0 -7
  240. package/dist/lib/browser/url-handler-QEYGYE2H.mjs +0 -70
  241. package/dist/lib/browser/url-handler-QEYGYE2H.mjs.map +0 -7
  242. package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
  243. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
  244. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  245. package/dist/types/src/capabilities/check-app-scheme.d.ts +0 -4
  246. package/dist/types/src/capabilities/check-app-scheme.d.ts.map +0 -1
  247. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  248. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  249. package/dist/types/src/capabilities/react-root.d.ts +0 -7
  250. package/dist/types/src/capabilities/react-root.d.ts.map +0 -1
  251. package/dist/types/src/capabilities/react-surface.d.ts +0 -4
  252. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  253. package/dist/types/src/capabilities/settings.d.ts +0 -4
  254. package/dist/types/src/capabilities/settings.d.ts.map +0 -1
  255. package/dist/types/src/capabilities/state.d.ts +0 -104
  256. package/dist/types/src/capabilities/state.d.ts.map +0 -1
  257. package/dist/types/src/capabilities/toolkit.d.ts +0 -23
  258. package/dist/types/src/capabilities/toolkit.d.ts.map +0 -1
  259. package/dist/types/src/capabilities/tools.d.ts +0 -11
  260. package/dist/types/src/capabilities/tools.d.ts.map +0 -1
  261. package/dist/types/src/capabilities/url-handler.d.ts +0 -4
  262. package/dist/types/src/capabilities/url-handler.d.ts.map +0 -1
  263. package/dist/types/src/events.d.ts +0 -4
  264. package/dist/types/src/events.d.ts.map +0 -1
  265. package/src/capabilities/app-graph-builder.ts +0 -143
  266. package/src/capabilities/capabilities.ts +0 -14
  267. package/src/capabilities/intent-resolver.ts +0 -472
  268. package/src/capabilities/react-root.tsx +0 -39
  269. package/src/capabilities/react-surface.tsx +0 -30
  270. package/src/capabilities/settings.ts +0 -27
  271. package/src/capabilities/state.ts +0 -108
  272. package/src/capabilities/toolkit.ts +0 -68
  273. package/src/capabilities/tools.ts +0 -84
  274. package/src/capabilities/url-handler.ts +0 -60
  275. package/src/events.ts +0 -11
  276. /package/dist/lib/{browser/state-QTVNH7N6.mjs.map → node-esm/types/index.mjs.map} +0 -0
@@ -1,153 +0,0 @@
1
- import {
2
- DeckCapabilities
3
- } from "./chunk-5KMJPIQC.mjs";
4
- import {
5
- meta
6
- } from "./chunk-UXLU6CMW.mjs";
7
-
8
- // src/capabilities/app-graph-builder.ts
9
- import { Rx } from "@effect-rx/rx-react";
10
- import * as Function from "effect/Function";
11
- import * as Option from "effect/Option";
12
- import { Capabilities, LayoutAction, contributes, createIntent } from "@dxos/app-framework";
13
- import { AttentionCapabilities } from "@dxos/plugin-attention";
14
- import { ROOT_ID, createExtension, rxFromSignal } from "@dxos/plugin-graph";
15
- var app_graph_builder_default = ((context) => contributes(Capabilities.AppGraphBuilder, createExtension({
16
- id: meta.id,
17
- actions: (node) => Rx.make((get) => Function.pipe(get(node), Option.flatMap((node2) => node2.id === ROOT_ID ? Option.some(node2) : Option.none()), Option.map(() => {
18
- const state = context.getCapability(DeckCapabilities.MutableDeckState);
19
- const _fullscreen = {
20
- id: `${LayoutAction.UpdateLayout._tag}/fullscreen`,
21
- data: async () => {
22
- const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
23
- await dispatch(createIntent(LayoutAction.SetLayoutMode, {
24
- part: "mode",
25
- options: {
26
- mode: "fullscreen"
27
- }
28
- }));
29
- },
30
- properties: {
31
- label: [
32
- "toggle fullscreen label",
33
- {
34
- ns: meta.id
35
- }
36
- ],
37
- icon: "ph--arrows-out--regular",
38
- keyBinding: {
39
- macos: "ctrl+meta+f",
40
- windows: "shift+ctrl+f"
41
- }
42
- }
43
- };
44
- const closeCurrent = {
45
- id: `${LayoutAction.Close._tag}/current`,
46
- data: async () => {
47
- const attention = context.getCapability(AttentionCapabilities.Attention);
48
- const attended = attention.current.at(-1);
49
- if (attended) {
50
- const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
51
- await dispatch(createIntent(LayoutAction.Close, {
52
- part: "main",
53
- subject: [
54
- attended
55
- ],
56
- options: {
57
- state: false
58
- }
59
- }));
60
- }
61
- },
62
- properties: {
63
- label: [
64
- "close current label",
65
- {
66
- ns: meta.id
67
- }
68
- ],
69
- icon: "ph--x--regular"
70
- }
71
- };
72
- const closeOthers = {
73
- id: `${LayoutAction.Close._tag}/others`,
74
- data: async () => {
75
- const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
76
- const attention = context.getCapability(AttentionCapabilities.Attention);
77
- const attended = attention.current.at(-1);
78
- const ids = state.deck.active.filter((id) => id !== attended) ?? [];
79
- await dispatch(createIntent(LayoutAction.Close, {
80
- part: "main",
81
- subject: ids,
82
- options: {
83
- state: false
84
- }
85
- }));
86
- },
87
- properties: {
88
- label: [
89
- "close others label",
90
- {
91
- ns: meta.id
92
- }
93
- ],
94
- icon: "ph--x-square--regular"
95
- }
96
- };
97
- const closeAll = {
98
- id: `${LayoutAction.Close._tag}/all`,
99
- data: async () => {
100
- const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
101
- await dispatch(createIntent(LayoutAction.Close, {
102
- part: "main",
103
- subject: state.deck.active,
104
- options: {
105
- state: false
106
- }
107
- }));
108
- },
109
- properties: {
110
- label: [
111
- "close all label",
112
- {
113
- ns: meta.id
114
- }
115
- ],
116
- icon: "ph--x-circle--regular"
117
- }
118
- };
119
- const toggleSidebar = {
120
- id: `${LayoutAction.UpdateSidebar._tag}/nav`,
121
- data: async () => {
122
- state.sidebarState = state.sidebarState === "expanded" ? "collapsed" : "expanded";
123
- },
124
- properties: {
125
- label: [
126
- get(rxFromSignal(() => state.sidebarState === "expanded" ? "collapse navigation sidebar label" : "open navigation sidebar label")),
127
- {
128
- ns: meta.id
129
- }
130
- ],
131
- icon: "ph--sidebar--regular",
132
- keyBinding: {
133
- macos: "meta+'"
134
- },
135
- disposition: "pin-end",
136
- position: "hoist",
137
- l0Breakpoint: "lg"
138
- }
139
- };
140
- return get(rxFromSignal(() => !state.deck.solo ? [
141
- closeCurrent,
142
- closeOthers,
143
- closeAll,
144
- toggleSidebar
145
- ] : [
146
- toggleSidebar
147
- ]));
148
- }), Option.getOrElse(() => [])))
149
- })));
150
- export {
151
- app_graph_builder_default as default
152
- };
153
- //# sourceMappingURL=app-graph-builder-PCMSER2O.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/app-graph-builder.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Rx } from '@effect-rx/rx-react';\nimport * as Function from 'effect/Function';\nimport * as Option from 'effect/Option';\n\nimport { Capabilities, LayoutAction, type PluginContext, contributes, createIntent } from '@dxos/app-framework';\nimport { AttentionCapabilities } from '@dxos/plugin-attention';\nimport { ROOT_ID, createExtension, rxFromSignal } from '@dxos/plugin-graph';\n\nimport { meta } from '../meta';\n\nimport { DeckCapabilities } from './capabilities';\n\nexport default (context: PluginContext) =>\n contributes(\n Capabilities.AppGraphBuilder,\n createExtension({\n id: meta.id,\n actions: (node) =>\n Rx.make((get) =>\n Function.pipe(\n get(node),\n Option.flatMap((node) => (node.id === ROOT_ID ? Option.some(node) : Option.none())),\n Option.map(() => {\n const state = context.getCapability(DeckCapabilities.MutableDeckState);\n\n // NOTE(Zan): This is currently disabled.\n // TODO(Zan): Fullscreen needs to know the active node and provide that to the layout part.\n const _fullscreen = {\n id: `${LayoutAction.UpdateLayout._tag}/fullscreen`,\n data: async () => {\n const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);\n await dispatch(\n createIntent(LayoutAction.SetLayoutMode, { part: 'mode', options: { mode: 'fullscreen' } }),\n );\n },\n properties: {\n label: ['toggle fullscreen label', { ns: meta.id }],\n icon: 'ph--arrows-out--regular',\n keyBinding: {\n macos: 'ctrl+meta+f',\n windows: 'shift+ctrl+f',\n },\n },\n };\n\n const closeCurrent = {\n id: `${LayoutAction.Close._tag}/current`,\n data: async () => {\n const attention = context.getCapability(AttentionCapabilities.Attention);\n const attended = attention.current.at(-1);\n if (attended) {\n const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);\n await dispatch(\n createIntent(LayoutAction.Close, {\n part: 'main',\n subject: [attended],\n options: { state: false },\n }),\n );\n }\n },\n properties: {\n label: ['close current label', { ns: meta.id }],\n icon: 'ph--x--regular',\n },\n };\n\n const closeOthers = {\n id: `${LayoutAction.Close._tag}/others`,\n data: async () => {\n const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);\n const attention = context.getCapability(AttentionCapabilities.Attention);\n const attended = attention.current.at(-1);\n const ids = state.deck.active.filter((id) => id !== attended) ?? [];\n await dispatch(\n createIntent(LayoutAction.Close, { part: 'main', subject: ids, options: { state: false } }),\n );\n },\n properties: {\n label: ['close others label', { ns: meta.id }],\n icon: 'ph--x-square--regular',\n },\n };\n\n const closeAll = {\n id: `${LayoutAction.Close._tag}/all`,\n data: async () => {\n const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);\n await dispatch(\n createIntent(LayoutAction.Close, {\n part: 'main',\n subject: state.deck.active,\n options: { state: false },\n }),\n );\n },\n properties: {\n label: ['close all label', { ns: meta.id }],\n icon: 'ph--x-circle--regular',\n },\n };\n\n const toggleSidebar = {\n id: `${LayoutAction.UpdateSidebar._tag}/nav`,\n data: async () => {\n state.sidebarState = state.sidebarState === 'expanded' ? 'collapsed' : 'expanded';\n },\n properties: {\n label: [\n get(\n rxFromSignal(() =>\n state.sidebarState === 'expanded'\n ? 'collapse navigation sidebar label'\n : 'open navigation sidebar label',\n ),\n ),\n { ns: meta.id },\n ],\n icon: 'ph--sidebar--regular',\n keyBinding: {\n macos: \"meta+'\",\n },\n disposition: 'pin-end',\n position: 'hoist',\n l0Breakpoint: 'lg',\n },\n };\n\n return get(\n rxFromSignal(() =>\n !state.deck.solo ? [closeCurrent, closeOthers, closeAll, toggleSidebar] : [toggleSidebar],\n ),\n );\n }),\n Option.getOrElse(() => []),\n ),\n ),\n }),\n );\n"],
5
- "mappings": ";;;;;;;;AAIA,SAASA,UAAU;AACnB,YAAYC,cAAc;AAC1B,YAAYC,YAAY;AAExB,SAASC,cAAcC,cAAkCC,aAAaC,oBAAoB;AAC1F,SAASC,6BAA6B;AACtC,SAASC,SAASC,iBAAiBC,oBAAoB;AAMvD,IAAA,6BAAe,CAACC,YACdC,YACEC,aAAaC,iBACbC,gBAAgB;EACdC,IAAIC,KAAKD;EACTE,SAAS,CAACC,SACRC,GAAGC,KAAK,CAACC,QACEC,cACPD,IAAIH,IAAAA,GACGK,eAAQ,CAACL,UAAUA,MAAKH,OAAOS,UAAiBC,YAAKP,KAAAA,IAAeQ,YAAI,CAAA,GACxEC,WAAI,MAAA;AACT,UAAMC,QAAQlB,QAAQmB,cAAcC,iBAAiBC,gBAAgB;AAIrE,UAAMC,cAAc;MAClBjB,IAAI,GAAGkB,aAAaC,aAAaC,IAAI;MACrCC,MAAM,YAAA;AACJ,cAAM,EAAEC,iBAAiBC,SAAQ,IAAK5B,QAAQmB,cAAcjB,aAAa2B,gBAAgB;AACzF,cAAMD,SACJE,aAAaP,aAAaQ,eAAe;UAAEC,MAAM;UAAQC,SAAS;YAAEC,MAAM;UAAa;QAAE,CAAA,CAAA;MAE7F;MACAC,YAAY;QACVC,OAAO;UAAC;UAA2B;YAAEC,IAAI/B,KAAKD;UAAG;;QACjDiC,MAAM;QACNC,YAAY;UACVC,OAAO;UACPC,SAAS;QACX;MACF;IACF;AAEA,UAAMC,eAAe;MACnBrC,IAAI,GAAGkB,aAAaoB,MAAMlB,IAAI;MAC9BC,MAAM,YAAA;AACJ,cAAMkB,YAAY5C,QAAQmB,cAAc0B,sBAAsBC,SAAS;AACvE,cAAMC,WAAWH,UAAUI,QAAQC,GAAG,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iB,YAAY;QACVC,OAAO;UAAC;UAAmB;YAAEC,IAAI/B,KAAKD;UAAG;;QACzCiC,MAAM;MACR;IACF;AAEA,UAAMmB,gBAAgB;MACpBpD,IAAI,GAAGkB,aAAamC,cAAcjC,IAAI;MACtCC,MAAM,YAAA;AACJR,cAAMyC,eAAezC,MAAMyC,iBAAiB,aAAa,cAAc;MACzE;MACAxB,YAAY;QACVC,OAAO;UACLzB,IACEiD,aAAa,MACX1C,MAAMyC,iBAAiB,aACnB,sCACA,+BAAA,CAAA;UAGR;YAAEtB,IAAI/B,KAAKD;UAAG;;QAEhBiC,MAAM;QACNC,YAAY;UACVC,OAAO;QACT;QACAqB,aAAa;QACbC,UAAU;QACVC,cAAc;MAChB;IACF;AAEA,WAAOpD,IACLiD,aAAa,MACX,CAAC1C,MAAMmC,KAAKW,OAAO;MAACtB;MAAcS;MAAaK;MAAUC;QAAiB;MAACA;KAAc,CAAA;EAG/F,CAAA,GACOQ,iBAAU,MAAM,CAAA,CAAE,CAAA,CAAA;AAGjC,CAAA,CAAA;",
6
- "names": ["Rx", "Function", "Option", "Capabilities", "LayoutAction", "contributes", "createIntent", "AttentionCapabilities", "ROOT_ID", "createExtension", "rxFromSignal", "context", "contributes", "Capabilities", "AppGraphBuilder", "createExtension", "id", "meta", "actions", "node", "Rx", "make", "get", "pipe", "flatMap", "ROOT_ID", "some", "none", "map", "state", "getCapability", "DeckCapabilities", "MutableDeckState", "_fullscreen", "LayoutAction", "UpdateLayout", "_tag", "data", "dispatchPromise", "dispatch", "IntentDispatcher", "createIntent", "SetLayoutMode", "part", "options", "mode", "properties", "label", "ns", "icon", "keyBinding", "macos", "windows", "closeCurrent", "Close", "attention", "AttentionCapabilities", "Attention", "attended", "current", "at", "subject", "closeOthers", "ids", "deck", "active", "filter", "closeAll", "toggleSidebar", "UpdateSidebar", "sidebarState", "rxFromSignal", "disposition", "position", "l0Breakpoint", "solo", "getOrElse"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/check-app-scheme.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, type PluginContext, contributes } from '@dxos/app-framework';\n\nimport { meta } from '../meta';\nimport { type DeckSettingsProps } from '../types';\n\nconst isSocket = !!(globalThis as any).__args;\n\n// TODO(mjamesderocher): Can we get this directly from Socket?\nconst appScheme = 'composer://';\n\n// TODO(mjamesderocher): Factor out as part of NavigationPlugin.\nconst checkAppScheme = (url: string) => {\n const iframe = document.createElement('iframe');\n iframe.style.display = 'none';\n document.body.appendChild(iframe);\n\n iframe.src = url + window.location.pathname.replace(/^\\/+/, '') + window.location.search;\n\n const timer = setTimeout(() => {\n document.body.removeChild(iframe);\n }, 3000);\n\n window.addEventListener('pagehide', (event) => {\n clearTimeout(timer);\n document.body.removeChild(iframe);\n });\n};\n\nexport default async (context: PluginContext) => {\n const settings = context.getCapability(Capabilities.SettingsStore).getStore<DeckSettingsProps>(meta.id)?.value;\n if (!isSocket && settings?.enableNativeRedirect) {\n checkAppScheme(appScheme);\n }\n\n return contributes(Capabilities.Null, null);\n};\n"],
5
- "mappings": ";;;;;AAIA,SAASA,cAAkCC,mBAAmB;AAK9D,IAAMC,WAAW,CAAC,CAAEC,WAAmBC;AAGvC,IAAMC,YAAY;AAGlB,IAAMC,iBAAiB,CAACC,QAAAA;AACtB,QAAMC,SAASC,SAASC,cAAc,QAAA;AACtCF,SAAOG,MAAMC,UAAU;AACvBH,WAASI,KAAKC,YAAYN,MAAAA;AAE1BA,SAAOO,MAAMR,MAAMS,OAAOC,SAASC,SAASC,QAAQ,QAAQ,EAAA,IAAMH,OAAOC,SAASG;AAElF,QAAMC,QAAQC,WAAW,MAAA;AACvBb,aAASI,KAAKU,YAAYf,MAAAA;EAC5B,GAAG,GAAA;AAEHQ,SAAOQ,iBAAiB,YAAY,CAACC,UAAAA;AACnCC,iBAAaL,KAAAA;AACbZ,aAASI,KAAKU,YAAYf,MAAAA;EAC5B,CAAA;AACF;AAEA,IAAA,4BAAe,OAAOmB,YAAAA;AACpB,QAAMC,WAAWD,QAAQE,cAAcC,aAAaC,aAAa,EAAEC,SAA4BC,KAAKC,EAAE,GAAGC;AACzG,MAAI,CAACjC,YAAY0B,UAAUQ,sBAAsB;AAC/C9B,mBAAeD,SAAAA;EACjB;AAEA,SAAOgC,YAAYP,aAAaQ,MAAM,IAAA;AACxC;",
6
- "names": ["Capabilities", "contributes", "isSocket", "globalThis", "__args", "appScheme", "checkAppScheme", "url", "iframe", "document", "createElement", "style", "display", "body", "appendChild", "src", "window", "location", "pathname", "replace", "search", "timer", "setTimeout", "removeChild", "addEventListener", "event", "clearTimeout", "context", "settings", "getCapability", "Capabilities", "SettingsStore", "getStore", "meta", "id", "value", "enableNativeRedirect", "contributes", "Null"]
7
- }
@@ -1,129 +0,0 @@
1
- import {
2
- DeckCapabilities
3
- } from "./chunk-5KMJPIQC.mjs";
4
- import {
5
- defaultDeck,
6
- getMode
7
- } from "./chunk-F3VCCHVL.mjs";
8
- import {
9
- meta
10
- } from "./chunk-UXLU6CMW.mjs";
11
-
12
- // src/capabilities/state.ts
13
- import { Capabilities, contributes } from "@dxos/app-framework";
14
- import { invariant } from "@dxos/invariant";
15
- import { live } from "@dxos/live-object";
16
- import { LocalStorageStore } from "@dxos/local-storage";
17
- var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-deck/src/capabilities/state.ts";
18
- var boolean = /true|false/;
19
- var migrateSidebarStateDefaults = {
20
- [`${meta.id}/complementary-sidebar-state`]: "expanded",
21
- [`${meta.id}/sidebar-state`]: "collapsed"
22
- };
23
- var migrateSidebarState = () => {
24
- Object.entries(migrateSidebarStateDefaults).forEach(([key, defaultValue]) => {
25
- if (boolean.test(localStorage.getItem(key) ?? "never")) {
26
- localStorage.setItem(key, defaultValue);
27
- }
28
- });
29
- };
30
- var DeckStateFactory = () => {
31
- migrateSidebarState();
32
- const state = new LocalStorageStore(meta.id, {
33
- sidebarState: "expanded",
34
- complementarySidebarState: "collapsed",
35
- complementarySidebarPanel: void 0,
36
- dialogContent: null,
37
- dialogOpen: false,
38
- dialogBlockAlign: void 0,
39
- dialogType: void 0,
40
- popoverContent: null,
41
- popoverAnchor: void 0,
42
- popoverAnchorId: void 0,
43
- popoverOpen: false,
44
- toasts: [],
45
- currentUndoId: void 0,
46
- activeDeck: "default",
47
- previousDeck: "default",
48
- decks: {
49
- default: {
50
- ...defaultDeck
51
- }
52
- },
53
- get deck() {
54
- const deck = this.decks[this.activeDeck];
55
- invariant(deck, `Deck not found: ${this.activeDeck}`, {
56
- F: __dxlog_file,
57
- L: 60,
58
- S: this,
59
- A: [
60
- "deck",
61
- "`Deck not found: ${this.activeDeck}`"
62
- ]
63
- });
64
- return deck;
65
- },
66
- previousMode: {},
67
- scrollIntoView: void 0
68
- });
69
- state.prop({
70
- key: "sidebarState",
71
- type: LocalStorageStore.enum()
72
- }).prop({
73
- key: "complementarySidebarState",
74
- type: LocalStorageStore.enum()
75
- }).prop({
76
- key: "complementarySidebarPanel",
77
- type: LocalStorageStore.string({
78
- allowUndefined: true
79
- })
80
- }).prop({
81
- key: "decks",
82
- type: LocalStorageStore.json()
83
- }).prop({
84
- key: "activeDeck",
85
- type: LocalStorageStore.string()
86
- }).prop({
87
- key: "previousDeck",
88
- type: LocalStorageStore.string()
89
- });
90
- const layout = live({
91
- get mode() {
92
- return getMode(state.values.deck);
93
- },
94
- get dialogOpen() {
95
- return state.values.dialogOpen;
96
- },
97
- get sidebarOpen() {
98
- return state.values.sidebarState === "expanded";
99
- },
100
- get complementarySidebarOpen() {
101
- return state.values.complementarySidebarState === "expanded";
102
- },
103
- get workspace() {
104
- return state.values.activeDeck;
105
- },
106
- get active() {
107
- return state.values.deck.solo ? [
108
- state.values.deck.solo
109
- ] : state.values.deck.active;
110
- },
111
- get inactive() {
112
- return state.values.deck.inactive;
113
- },
114
- get scrollIntoView() {
115
- return state.values.scrollIntoView;
116
- }
117
- });
118
- return [
119
- contributes(DeckCapabilities.DeckState, state.values, () => state.close()),
120
- contributes(Capabilities.Layout, layout)
121
- ];
122
- };
123
- var state_default = DeckStateFactory;
124
-
125
- export {
126
- DeckStateFactory,
127
- state_default
128
- };
129
- //# sourceMappingURL=chunk-27I7DJUG.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/state.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes } from '@dxos/app-framework';\nimport { invariant } from '@dxos/invariant';\nimport { live } from '@dxos/live-object';\nimport { LocalStorageStore } from '@dxos/local-storage';\nimport { type SidebarState } from '@dxos/react-ui';\n\nimport { meta } from '../meta';\nimport { type DeckPluginState, type DeckState, defaultDeck, getMode } from '../types';\n\nimport { DeckCapabilities } from './capabilities';\n\nconst boolean = /true|false/;\n\n// TODO(thure, 18 Feb 2025): Remove after the next release.\n\nconst migrateSidebarStateDefaults = {\n [`${meta.id}/complementary-sidebar-state`]: 'expanded',\n [`${meta.id}/sidebar-state`]: 'collapsed',\n};\n\nconst migrateSidebarState = () => {\n Object.entries(migrateSidebarStateDefaults).forEach(([key, defaultValue]) => {\n if (boolean.test(localStorage.getItem(key) ?? 'never')) {\n localStorage.setItem(key, defaultValue);\n }\n });\n};\n\n/**\n * @deprecated\n */\nexport const DeckStateFactory = () => {\n migrateSidebarState();\n\n const state = new LocalStorageStore<DeckPluginState>(meta.id, {\n sidebarState: 'expanded',\n complementarySidebarState: 'collapsed',\n complementarySidebarPanel: undefined,\n dialogContent: null,\n dialogOpen: false,\n dialogBlockAlign: undefined,\n dialogType: undefined,\n popoverContent: null,\n popoverAnchor: undefined,\n popoverAnchorId: undefined,\n popoverOpen: false,\n toasts: [],\n currentUndoId: undefined,\n activeDeck: 'default',\n previousDeck: 'default',\n decks: {\n default: { ...defaultDeck },\n },\n get deck() {\n const deck = this.decks[this.activeDeck];\n invariant(deck, `Deck not found: ${this.activeDeck}`);\n return deck;\n },\n previousMode: {},\n scrollIntoView: undefined,\n });\n\n state\n .prop({ key: 'sidebarState', type: LocalStorageStore.enum<SidebarState>() })\n .prop({ key: 'complementarySidebarState', type: LocalStorageStore.enum<SidebarState>() })\n .prop({ key: 'complementarySidebarPanel', type: LocalStorageStore.string({ allowUndefined: true }) })\n .prop({ key: 'decks', type: LocalStorageStore.json<Record<string, DeckState>>() })\n .prop({ key: 'activeDeck', type: LocalStorageStore.string() })\n .prop({ key: 'previousDeck', type: LocalStorageStore.string() });\n\n const layout = live<Capabilities.Layout>({\n get mode() {\n return getMode(state.values.deck);\n },\n get dialogOpen() {\n return state.values.dialogOpen;\n },\n get sidebarOpen() {\n return state.values.sidebarState === 'expanded';\n },\n get complementarySidebarOpen() {\n return state.values.complementarySidebarState === 'expanded';\n },\n get workspace() {\n return state.values.activeDeck;\n },\n get active() {\n return state.values.deck.solo ? [state.values.deck.solo] : state.values.deck.active;\n },\n get inactive() {\n return state.values.deck.inactive;\n },\n get scrollIntoView() {\n return state.values.scrollIntoView;\n },\n });\n\n return [\n contributes(DeckCapabilities.DeckState, state.values, () => state.close()),\n contributes(Capabilities.Layout, layout),\n ];\n};\n\nexport default DeckStateFactory;\n"],
5
- "mappings": ";;;;;;;;;;;;AAIA,SAASA,cAAcC,mBAAmB;AAC1C,SAASC,iBAAiB;AAC1B,SAASC,YAAY;AACrB,SAASC,yBAAyB;;AAQlC,IAAMC,UAAU;AAIhB,IAAMC,8BAA8B;EAClC,CAAC,GAAGC,KAAKC,EAAE,8BAA8B,GAAG;EAC5C,CAAC,GAAGD,KAAKC,EAAE,gBAAgB,GAAG;AAChC;AAEA,IAAMC,sBAAsB,MAAA;AAC1BC,SAAOC,QAAQL,2BAAAA,EAA6BM,QAAQ,CAAC,CAACC,KAAKC,YAAAA,MAAa;AACtE,QAAIT,QAAQU,KAAKC,aAAaC,QAAQJ,GAAAA,KAAQ,OAAA,GAAU;AACtDG,mBAAaE,QAAQL,KAAKC,YAAAA;IAC5B;EACF,CAAA;AAC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AOjC,iBAAiB;IACvC;IACA,IAAImC,2BAA2B;AAC7B,aAAOrC,MAAMmC,OAAOhC,8BAA8B;IACpD;IACA,IAAImC,YAAY;AACd,aAAOtC,MAAMmC,OAAOnB;IACtB;IACA,IAAIuB,SAAS;AACX,aAAOvC,MAAMmC,OAAOd,KAAKmB,OAAO;QAACxC,MAAMmC,OAAOd,KAAKmB;UAAQxC,MAAMmC,OAAOd,KAAKkB;IAC/E;IACA,IAAIE,WAAW;AACb,aAAOzC,MAAMmC,OAAOd,KAAKoB;IAC3B;IACA,IAAIjB,iBAAiB;AACnB,aAAOxB,MAAMmC,OAAOX;IACtB;EACF,CAAA;AAEA,SAAO;IACLkB,YAAYC,iBAAiBC,WAAW5C,MAAMmC,QAAQ,MAAMnC,MAAM6C,MAAK,CAAA;IACvEH,YAAYI,aAAaC,QAAQhB,MAAAA;;AAErC;AAEA,IAAA,gBAAehC;",
6
- "names": ["Capabilities", "contributes", "invariant", "live", "LocalStorageStore", "boolean", "migrateSidebarStateDefaults", "meta", "id", "migrateSidebarState", "Object", "entries", "forEach", "key", "defaultValue", "test", "localStorage", "getItem", "setItem", "DeckStateFactory", "state", "LocalStorageStore", "sidebarState", "complementarySidebarState", "complementarySidebarPanel", "undefined", "dialogContent", "dialogOpen", "dialogBlockAlign", "dialogType", "popoverContent", "popoverAnchor", "popoverAnchorId", "popoverOpen", "toasts", "currentUndoId", "activeDeck", "previousDeck", "decks", "default", "defaultDeck", "deck", "invariant", "previousMode", "scrollIntoView", "prop", "type", "enum", "string", "allowUndefined", "json", "layout", "live", "mode", "getMode", "values", "sidebarOpen", "complementarySidebarOpen", "workspace", "active", "solo", "inactive", "contributes", "DeckCapabilities", "DeckState", "close", "Capabilities", "Layout"]
7
- }
@@ -1,16 +0,0 @@
1
- import {
2
- meta
3
- } from "./chunk-UXLU6CMW.mjs";
4
-
5
- // src/capabilities/capabilities.ts
6
- import { defineCapability } from "@dxos/app-framework";
7
- (function(DeckCapabilities2) {
8
- DeckCapabilities2.DeckState = defineCapability(`${meta.id}/capability/state`);
9
- DeckCapabilities2.MutableDeckState = defineCapability(`${meta.id}/capability/state`);
10
- })(DeckCapabilities || (DeckCapabilities = {}));
11
- var DeckCapabilities;
12
-
13
- export {
14
- DeckCapabilities
15
- };
16
- //# sourceMappingURL=chunk-5KMJPIQC.mjs.map
@@ -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 } from '@dxos/app-framework';\nimport { type DeepReadonly } from '@dxos/util';\n\nimport { meta } from '../meta';\nimport { type DeckPluginState } from '../types';\n\nexport namespace DeckCapabilities {\n export const DeckState = defineCapability<DeepReadonly<DeckPluginState>>(`${meta.id}/capability/state`);\n export const MutableDeckState = defineCapability<DeckPluginState>(`${meta.id}/capability/state`);\n}\n"],
5
- "mappings": ";;;;;AAIA,SAASA,wBAAwB;UAMhBC,mBAAAA;oBACFC,YAAYC,iBAAgD,GAAGC,KAAKC,EAAE,mBAAmB;oBACzFC,mBAAmBH,iBAAkC,GAAGC,KAAKC,EAAE,mBAAmB;AACjG,GAHiBJ,qBAAAA,mBAAAA,CAAAA,EAAAA;;",
6
- "names": ["defineCapability", "DeckCapabilities", "DeckState", "defineCapability", "meta", "id", "MutableDeckState"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/layout.ts", "../../../src/util/set-active.ts", "../../../src/util/layoutAppliesTopbar.ts", "../../../src/util/overscroll.ts"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { produce } from 'immer';\n\nimport { ATTENDABLE_PATH_SEPARATOR } from '@dxos/react-ui-attention';\n\nimport { type DeckAction, type NewPlankPositioning } from './types';\n\nexport const createEntryId = (entryId: string, variant?: string) =>\n variant ? `${entryId}${ATTENDABLE_PATH_SEPARATOR}${variant}` : entryId;\n\nexport const parseEntryId = (entryId: string) => {\n const [id, variant] = entryId.split(ATTENDABLE_PATH_SEPARATOR);\n return { id, variant };\n};\n\ntype OpenLayoutEntryOptions = {\n key?: string;\n positioning?: NewPlankPositioning;\n pivotId?: string;\n variant?: string;\n};\n\nexport const openEntry = (deck: string[], _entryId: string, options?: OpenLayoutEntryOptions): string[] => {\n return produce(deck, (draft) => {\n const entryId = createEntryId(_entryId, options?.variant);\n\n // Check that the entry is not already in the part\n if (draft.find((id) => id === entryId)) {\n return;\n }\n\n const key = options?.key;\n const plankPositioning = options?.positioning ?? 'start';\n const pivotId = options?.pivotId;\n\n if (key) {\n const index = draft.findIndex((id) => id.split('+')[0] === key);\n if (index !== -1) {\n draft.splice(index, 1, entryId);\n return;\n }\n }\n\n if (pivotId) {\n const pivotIndex = draft.findIndex((id) => id === pivotId);\n if (pivotIndex !== -1) {\n if (plankPositioning === 'start') {\n draft.splice(pivotIndex, 0, entryId);\n } else {\n draft.splice(pivotIndex + 1, 0, entryId);\n }\n return;\n }\n }\n\n // If no pivot found or provided, fall back to original behavior\n if (plankPositioning === 'start') {\n draft.unshift(entryId);\n } else {\n draft.push(entryId);\n }\n });\n};\n\nexport const closeEntry = (deck: string[], entryId: string): string[] => {\n return produce(deck, (draft) => {\n const index = draft.findIndex((id) => id === entryId);\n if (index !== -1) {\n draft.splice(index, 1);\n }\n });\n};\n\nexport const incrementPlank = (deck: string[], adjustment: DeckAction.Adjustment): string[] => {\n return produce(deck, (draft) => {\n const index = draft.findIndex((id) => id === adjustment.id);\n if (\n index === -1 ||\n (adjustment.type === 'increment-start' && index === 0) ||\n (adjustment.type === 'increment-end' && index === draft.length - 1)\n ) {\n return;\n }\n\n if (adjustment.type === 'increment-start') {\n // Swap the current item with the previous item.\n [draft[index - 1], draft[index]] = [draft[index], draft[index - 1]];\n } else if (adjustment.type === 'increment-end') {\n // Swap the current item with the next item.\n [draft[index], draft[index + 1]] = [draft[index + 1], draft[index]];\n }\n });\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { batch } from '@preact/signals-core';\n\nimport { type AttentionManager } from '@dxos/plugin-attention';\n\nimport { type DeckPluginState } from '../types';\n\nexport type SetActiveOptions = {\n next: string[];\n state: DeckPluginState;\n attention?: AttentionManager;\n};\n\nexport const setActive = ({ next, state, attention }: SetActiveOptions) => {\n return batch(() => {\n const active = state.deck.solo ? [state.deck.solo] : state.deck.active;\n const removed = active.filter((id) => !next.includes(id));\n const closed = Array.from(new Set([...state.deck.inactive.filter((id) => !next.includes(id)), ...removed]));\n\n state.deck.inactive = closed;\n\n if (state.deck.solo || !state.deck.initialized) {\n state.deck.solo = next[0];\n } else {\n state.deck.active = next;\n }\n\n if (state.deck.fullscreen && !state.deck.solo) {\n state.deck.fullscreen = false;\n }\n\n if (attention) {\n const attended = attention.current;\n const [attendedId] = Array.from(attended);\n const isAttendedAvailable = !!attendedId && next.includes(attendedId);\n if (!isAttendedAvailable) {\n const attendedIndex = active.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 >= next.length ? next.length - 1 : attendedIndex;\n return next[index];\n }\n }\n });\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type LayoutMode } from '../types';\n\nexport const layoutAppliesTopbar = (breakpoint: string, layoutMode?: LayoutMode) => {\n return (\n document.body.getAttribute('data-platform') === 'win' &&\n breakpoint === 'desktop' &&\n layoutMode !== 'solo--fullscreen'\n );\n};\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"],
5
- "mappings": ";AAIA,SAASA,eAAe;AAExB,SAASC,iCAAiC;AAInC,IAAMC,gBAAgB,CAACC,SAAiBC,YAC7CA,UAAU,GAAGD,OAAAA,GAAUE,yBAAAA,GAA4BD,OAAAA,KAAYD;AAE1D,IAAMG,eAAe,CAACH,YAAAA;AAC3B,QAAM,CAACI,IAAIH,OAAAA,IAAWD,QAAQK,MAAMH,yBAAAA;AACpC,SAAO;IAAEE;IAAIH;EAAQ;AACvB;AASO,IAAMK,YAAY,CAACC,MAAgBC,UAAkBC,YAAAA;AAC1D,SAAOC,QAAQH,MAAM,CAACI,UAAAA;AACpB,UAAMX,UAAUD,cAAcS,UAAUC,SAASR,OAAAA;AAGjD,QAAIU,MAAMC,KAAK,CAACR,OAAOA,OAAOJ,OAAAA,GAAU;AACtC;IACF;AAEA,UAAMa,MAAMJ,SAASI;AACrB,UAAMC,mBAAmBL,SAASM,eAAe;AACjD,UAAMC,UAAUP,SAASO;AAEzB,QAAIH,KAAK;AACP,YAAMI,QAAQN,MAAMO,UAAU,CAACd,OAAOA,GAAGC,MAAM,GAAA,EAAK,CAAA,MAAOQ,GAAAA;AAC3D,UAAII,UAAU,IAAI;AAChBN,cAAMQ,OAAOF,OAAO,GAAGjB,OAAAA;AACvB;MACF;IACF;AAEA,QAAIgB,SAAS;AACX,YAAMI,aAAaT,MAAMO,UAAU,CAACd,OAAOA,OAAOY,OAAAA;AAClD,UAAII,eAAe,IAAI;AACrB,YAAIN,qBAAqB,SAAS;AAChCH,gBAAMQ,OAAOC,YAAY,GAAGpB,OAAAA;QAC9B,OAAO;AACLW,gBAAMQ,OAAOC,aAAa,GAAG,GAAGpB,O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AACF;",
6
- "names": ["produce", "ATTENDABLE_PATH_SEPARATOR", "createEntryId", "entryId", "variant", "ATTENDABLE_PATH_SEPARATOR", "parseEntryId", "id", "split", "openEntry", "deck", "_entryId", "options", "produce", "draft", "find", "key", "plankPositioning", "positioning", "pivotId", "index", "findIndex", "splice", "pivotIndex", "unshift", "push", "closeEntry", "incrementPlank", "adjustment", "type", "length", "batch", "setActive", "next", "state", "attention", "batch", "active", "deck", "solo", "removed", "filter", "id", "includes", "closed", "Array", "from", "Set", "inactive", "initialized", "fullscreen", "attended", "current", "attendedId", "isAttendedAvailable", "attendedIndex", "indexOf", "index", "length", "layoutAppliesTopbar", "breakpoint", "layoutMode", "document", "body", "getAttribute", "calculateOverscroll", "planksCount", "paddingInlineStart", "paddingInlineEnd", "overscrollPadding"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/types/schema.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { LayoutAction } from '@dxos/app-framework';\nimport { type DeepReadonly } from '@dxos/util';\n\nimport { meta } from '../meta';\n\nexport { ATTENDABLE_PATH_SEPARATOR } from '@dxos/react-ui-attention';\n\nexport const PLANK_COMPANION_TYPE = `${meta.id}/plank-companion`;\nexport const DECK_COMPANION_TYPE = `${meta.id}/deck-companion`;\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\nexport type Part = 'solo' | 'deck' | 'complementary';\nexport type ResolvedPart = Part | 'solo-primary' | 'solo-companion';\n\nexport const DeckSettingsSchema = Schema.Struct({\n showHints: Schema.optional(Schema.Boolean),\n enableDeck: Schema.optional(Schema.Boolean),\n enableStatusbar: Schema.optional(Schema.Boolean),\n enableNativeRedirect: Schema.optional(Schema.Boolean),\n newPlankPositioning: Schema.optional(Schema.Literal(...NewPlankPositions)),\n overscroll: Schema.optional(Schema.Literal(...OverscrollOptions)),\n // TODO(burdon): Rename layoutMode? (e.g., bento | encapsulated?)\n encapsulatedPlanks: Schema.optional(Schema.Boolean),\n}).pipe(Schema.mutable);\nexport type DeckSettingsProps = Schema.Schema.Type<typeof DeckSettingsSchema>;\n\nexport const PlankSizing = Schema.Record({ key: Schema.String, value: Schema.Number });\nexport type PlankSizing = Schema.Schema.Type<typeof PlankSizing>;\n\n// State of an individual deck.\nexport const DeckState = Schema.Struct({\n /** If false, the deck has not yet left solo mode and new planks should be soloed. */\n initialized: Schema.Boolean,\n active: Schema.mutable(Schema.Array(Schema.String)),\n // TODO(wittjosiah): Piping into both mutable and optional caused invalid typescript output.\n activeCompanions: Schema.optional(Schema.mutable(Schema.Record({ key: Schema.String, value: Schema.String }))),\n inactive: Schema.mutable(Schema.Array(Schema.String)),\n solo: Schema.optional(Schema.String),\n fullscreen: Schema.Boolean,\n plankSizing: Schema.mutable(PlankSizing),\n companionFrameSizing: Schema.mutable(PlankSizing),\n});\nexport type DeckState = Schema.Schema.Type<typeof DeckState>;\n\nexport const defaultDeck: DeckState = {\n initialized: false,\n active: [],\n activeCompanions: {},\n inactive: [],\n solo: undefined,\n fullscreen: false,\n plankSizing: {},\n companionFrameSizing: {},\n};\n\nconst LayoutMode = Schema.Literal('deck', 'solo', 'solo--fullscreen');\nexport type LayoutMode = Schema.Schema.Type<typeof LayoutMode>;\nexport const isLayoutMode = (value: any): value is LayoutMode => Schema.is(LayoutMode)(value);\n\nexport const getMode = (deck: DeckState | DeepReadonly<DeckState>): LayoutMode => {\n if (deck.solo) {\n return deck.fullscreen ? 'solo--fullscreen' : 'solo';\n }\n\n return 'deck';\n};\n\n// State of the deck plugin.\nexport const DeckPluginState = Schema.Struct({\n sidebarState: Schema.Literal('closed', 'collapsed', 'expanded'),\n complementarySidebarState: Schema.Literal('closed', 'collapsed', 'expanded'),\n complementarySidebarPanel: Schema.optional(Schema.String),\n\n dialogOpen: Schema.Boolean,\n dialogType: Schema.optional(Schema.Literal('default', 'alert')),\n dialogBlockAlign: Schema.optional(Schema.Literal('start', 'center', 'end')),\n dialogOverlayClasses: Schema.optional(Schema.String),\n dialogOverlayStyle: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n /** Data to be passed to the dialog Surface. */\n dialogContent: Schema.optional(Schema.Any),\n\n popoverOpen: Schema.Boolean,\n popoverSide: Schema.optional(Schema.Literal('top', 'right', 'bottom', 'left')),\n popoverAnchor: Schema.optional(Schema.Any),\n popoverAnchorId: Schema.optional(Schema.String),\n /** Data to be passed to the popover Surface. */\n popoverContent: Schema.optional(Schema.Any),\n\n toasts: Schema.mutable(Schema.Array(LayoutAction.Toast)),\n currentUndoId: Schema.optional(Schema.String),\n\n activeDeck: Schema.String,\n previousDeck: Schema.String,\n decks: Schema.mutable(Schema.Record({ key: Schema.String, value: Schema.mutable(DeckState) })),\n previousMode: Schema.mutable(Schema.Record({ key: Schema.String, value: LayoutMode })),\n deck: Schema.mutable(DeckState),\n\n /** The identifier of a component to scroll into view when it is mounted. */\n scrollIntoView: Schema.optional(Schema.String),\n}).pipe(Schema.mutable);\n\nexport type DeckPluginState = Schema.Schema.Type<typeof DeckPluginState>;\n\nexport namespace DeckAction {\n const PartAdjustmentSchema = Schema.Union(\n Schema.Literal('close').annotations({ description: 'Close the plank.' }),\n Schema.Literal('companion').annotations({ description: 'Open the companion plank.' }),\n Schema.Literal('solo').annotations({ description: 'Solo the plank.' }),\n Schema.Literal('solo--fullscreen').annotations({ description: 'Fullscreen the plank.' }),\n Schema.Literal('increment-start').annotations({ description: 'Move the plank towards the start of the deck.' }),\n Schema.Literal('increment-end').annotations({ description: 'Move the plank towards the end of the deck.' }),\n );\n export type PartAdjustment = Schema.Schema.Type<typeof PartAdjustmentSchema>;\n export const Adjustment = Schema.mutable(Schema.Struct({ id: Schema.String, type: PartAdjustmentSchema }));\n export type Adjustment = Schema.Schema.Type<typeof Adjustment>;\n\n // An atomic transaction to apply to the deck, describing which element to move to which location.\n export class Adjust extends Schema.TaggedClass<Adjust>()(`${meta.id}/action/adjust`, {\n input: Adjustment,\n output: Schema.Void,\n }) {}\n\n export class UpdatePlankSize extends Schema.TaggedClass<UpdatePlankSize>()(`${meta.id}/action/update-plank-size`, {\n input: Schema.Struct({\n id: Schema.String,\n size: Schema.Number,\n }),\n output: Schema.Void,\n }) {}\n\n export class ChangeCompanion extends Schema.TaggedClass<ChangeCompanion>()(`${meta.id}/action/change-companion`, {\n input: Schema.Struct({\n primary: Schema.String,\n companion: Schema.Union(Schema.String, Schema.Null),\n }),\n output: Schema.Void,\n }) {}\n}\n"],
5
- "mappings": ";;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,oBAAoB;AAK7B,SAASC,iCAAiC;AAEnC,IAAMC,uBAAuB,GAAGC,KAAKC,EAAE;AACvC,IAAMC,sBAAsB,GAAGF,KAAKC,EAAE;AAGtC,IAAME,oBAAoB;EAAC;EAAS;;AAGpC,IAAMC,oBAAoB;EAAC;EAAQ;;AAMnC,IAAMC,qBAA4BC,cAAO;EAC9CC,WAAkBC,gBAAgBC,cAAO;EACzCC,YAAmBF,gBAAgBC,cAAO;EAC1CE,iBAAwBH,gBAAgBC,cAAO;EAC/CG,sBAA6BJ,gBAAgBC,cAAO;EACpDI,qBAA4BL,gBAAgBM,eAAO,GAAIX,iBAAAA,CAAAA;EACvDY,YAAmBP,gBAAgBM,eAAO,GAAIV,iBAAAA,CAAAA;;EAE9CY,oBAA2BR,gBAAgBC,cAAO;AACpD,CAAA,EAAGQ,KAAYC,cAAO;AAGf,IAAMC,cAAqBC,cAAO;EAAEC,KAAYC;EAAQC,OAAcC;AAAO,CAAA;AAI7E,IAAMC,YAAmBnB,cAAO;;EAErCoB,aAAoBjB;EACpBkB,QAAeT,eAAeU,aAAaN,aAAM,CAAA;;EAEjDO,kBAAyBrB,gBAAgBU,eAAe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EAAI;cANSC,kBAAAA;EAQN,MAAME,wBAA+BN,mBAAW,EAAoB,GAAG3E,KAAKC,EAAE,4BAA4B;IAC/G2E,OAActE,cAAO;MACnB4E,SAAgB5D;MAChB6D,WAAkBd,aAAa/C,eAAe8D,WAAI;IACpD,CAAA;IACAP,QAAeC;EACjB,CAAA,EAAA;EAAI;cANSG,kBAAAA;AAOf,GAlCiBd,eAAAA,aAAAA,CAAAA,EAAAA;;",
6
- "names": ["Schema", "LayoutAction", "ATTENDABLE_PATH_SEPARATOR", "PLANK_COMPANION_TYPE", "meta", "id", "DECK_COMPANION_TYPE", "NewPlankPositions", "OverscrollOptions", "DeckSettingsSchema", "Struct", "showHints", "optional", "Boolean", "enableDeck", "enableStatusbar", "enableNativeRedirect", "newPlankPositioning", "Literal", "overscroll", "encapsulatedPlanks", "pipe", "mutable", "PlankSizing", "Record", "key", "String", "value", "Number", "DeckState", "initialized", "active", "Array", "activeCompanions", "inactive", "solo", "fullscreen", "plankSizing", "companionFrameSizing", "defaultDeck", "undefined", "LayoutMode", "isLayoutMode", "is", "getMode", "deck", "DeckPluginState", "sidebarState", "complementarySidebarState", "complementarySidebarPanel", "dialogOpen", "dialogType", "dialogBlockAlign", "dialogOverlayClasses", "dialogOverlayStyle", "Any", "dialogContent", "popoverOpen", "popoverSide", "popoverAnchor", "popoverAnchorId", "popoverContent", "toasts", "LayoutAction", "Toast", "currentUndoId", "activeDeck", "previousDeck", "decks", "previousMode", "scrollIntoView", "DeckAction", "PartAdjustmentSchema", "Union", "annotations", "description", "Adjustment", "type", "Adjust", "TaggedClass", "input", "output", "Void", "UpdatePlankSize", "size", "ChangeCompanion", "primary", "companion", "Null"]
7
- }
@@ -1,127 +0,0 @@
1
- import {
2
- ATTENDABLE_PATH_SEPARATOR,
3
- DECK_COMPANION_TYPE,
4
- PLANK_COMPANION_TYPE
5
- } from "./chunk-F3VCCHVL.mjs";
6
- import {
7
- meta
8
- } from "./chunk-UXLU6CMW.mjs";
9
-
10
- // src/hooks/useCompanions.ts
11
- import { useMemo } from "react";
12
- import { useAppGraph } from "@dxos/app-framework";
13
- import { useConnections } from "@dxos/plugin-graph";
14
- import { byPosition } from "@dxos/util";
15
- var useCompanions = (id) => {
16
- const { graph } = useAppGraph();
17
- const nodes = useConnections(graph, id);
18
- const companions = nodes.filter((node) => node.type === PLANK_COMPANION_TYPE);
19
- return useMemo(() => companions.toSorted((a, b) => byPosition(a.properties, b.properties)), [
20
- companions
21
- ]);
22
- };
23
-
24
- // src/hooks/useBreakpoints.ts
25
- import { useMediaQuery } from "@dxos/react-ui";
26
- var useBreakpoints = () => {
27
- const [isNotMobile] = useMediaQuery("md");
28
- const [isDesktop] = useMediaQuery("lg");
29
- return isDesktop ? "desktop" : isNotMobile ? "tablet" : "mobile";
30
- };
31
-
32
- // src/hooks/useDeckCompanions.ts
33
- import { useAppGraph as useAppGraph2 } from "@dxos/app-framework";
34
- import { ROOT_ID, useConnections as useConnections2 } from "@dxos/plugin-graph";
35
- import { byPosition as byPosition2 } from "@dxos/util";
36
- var getCompanionId = (id) => {
37
- const [_, companionId] = id.split(ATTENDABLE_PATH_SEPARATOR);
38
- return companionId ?? "never";
39
- };
40
- var useDeckCompanions = () => {
41
- const { graph } = useAppGraph2();
42
- const connections = useConnections2(graph, ROOT_ID);
43
- const companions = connections.filter((node) => node.type === DECK_COMPANION_TYPE);
44
- return companions.toSorted((a, b) => byPosition2(a.properties, b.properties));
45
- };
46
-
47
- // src/hooks/useHoistStatusbar.ts
48
- import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
49
- import { useMemo as useMemo2 } from "react";
50
- import { Capabilities, useCapability } from "@dxos/app-framework";
51
- import { useThemeContext } from "@dxos/react-ui";
52
- var useHoistStatusbar = (breakpoint, layoutMode) => {
53
- var _effect = _useSignals();
54
- try {
55
- const { safeAreaPadding } = useThemeContext();
56
- const enableStatusbar = useCapability(Capabilities.SettingsStore).getStore(meta.id)?.value.enableStatusbar;
57
- return useMemo2(() => {
58
- return breakpoint === "desktop" && layoutMode !== "solo--fullscreen" && !!enableStatusbar && safeAreaPadding?.bottom === 0;
59
- }, [
60
- enableStatusbar,
61
- breakpoint,
62
- safeAreaPadding?.bottom,
63
- layoutMode
64
- ]);
65
- } finally {
66
- _effect.f();
67
- }
68
- };
69
-
70
- // src/hooks/useMainSize.ts
71
- import { useMainContext } from "@dxos/react-ui";
72
- var useMainSize = () => {
73
- const { navigationSidebarState, complementarySidebarState } = useMainContext("DeckPluginPlank");
74
- return {
75
- "data-sidebar-inline-start-state": navigationSidebarState,
76
- "data-sidebar-inline-end-state": complementarySidebarState
77
- };
78
- };
79
-
80
- // src/hooks/useNodeActionExpander.ts
81
- import { useEffect } from "react";
82
- import { getGraph } from "@dxos/plugin-graph";
83
- var useNodeActionExpander = (node) => {
84
- useEffect(() => {
85
- if (node) {
86
- const frame = requestAnimationFrame(() => {
87
- const graph = getGraph(node);
88
- void graph.expand(node.id);
89
- });
90
- return () => cancelAnimationFrame(frame);
91
- }
92
- }, [
93
- node
94
- ]);
95
- };
96
-
97
- // src/capabilities/index.ts
98
- import { lazy } from "@dxos/app-framework";
99
- var AppGraphBuilder = lazy(() => import("./app-graph-builder-PCMSER2O.mjs"));
100
- var CheckAppScheme = lazy(() => import("./check-app-scheme-HIEVFAAX.mjs"));
101
- var DeckSettings = lazy(() => import("./settings-SDPTOCCM.mjs"));
102
- var DeckState = lazy(() => import("./state-QTVNH7N6.mjs"));
103
- var LayoutIntentResolver = lazy(() => import("./intent-resolver-Q3KETDSS.mjs"));
104
- var ReactRoot = lazy(() => import("./react-root-LU3662ME.mjs"));
105
- var ReactSurface = lazy(() => import("./react-surface-TDBFPN5T.mjs"));
106
- var Toolkit = lazy(() => import("./toolkit-TM2Y6YL2.mjs"));
107
- var UrlHandler = lazy(() => import("./url-handler-QEYGYE2H.mjs"));
108
-
109
- export {
110
- useBreakpoints,
111
- useCompanions,
112
- getCompanionId,
113
- useDeckCompanions,
114
- useHoistStatusbar,
115
- useMainSize,
116
- useNodeActionExpander,
117
- AppGraphBuilder,
118
- CheckAppScheme,
119
- DeckSettings,
120
- DeckState,
121
- LayoutIntentResolver,
122
- ReactRoot,
123
- ReactSurface,
124
- Toolkit,
125
- UrlHandler
126
- };
127
- //# sourceMappingURL=chunk-MFFZK4LT.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/hooks/useCompanions.ts", "../../../src/hooks/useBreakpoints.ts", "../../../src/hooks/useDeckCompanions.ts", "../../../src/hooks/useHoistStatusbar.ts", "../../../src/hooks/useMainSize.ts", "../../../src/hooks/useNodeActionExpander.ts", "../../../src/capabilities/index.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { useMemo } from 'react';\n\nimport { useAppGraph } from '@dxos/app-framework';\nimport { useConnections } from '@dxos/plugin-graph';\nimport { byPosition } from '@dxos/util';\n\nimport { PLANK_COMPANION_TYPE } from '../types';\n\nexport const useCompanions = (id?: string) => {\n const { graph } = useAppGraph();\n const nodes = useConnections(graph, id);\n const companions = nodes.filter((node) => node.type === PLANK_COMPANION_TYPE);\n return useMemo(() => companions.toSorted((a, b) => byPosition(a.properties, b.properties)), [companions]);\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { 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", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Label, useAppGraph } from '@dxos/app-framework';\nimport { type Node, ROOT_ID, useConnections } from '@dxos/plugin-graph';\nimport { type Position, byPosition } from '@dxos/util';\n\nimport { ATTENDABLE_PATH_SEPARATOR, DECK_COMPANION_TYPE } from '../types';\n\nexport const getCompanionId = (id: string) => {\n const [_, companionId] = id.split(ATTENDABLE_PATH_SEPARATOR);\n return companionId ?? 'never';\n};\n\nexport type DeckCompanion = Node<\n any,\n {\n label: Label;\n icon: string;\n // TODO(burdon): Scroll area should be controlled by surface.\n /** If true, the panel will not be wrapped in a scroll area. */\n fixed?: boolean;\n position?: Position;\n }\n>;\n\nexport const useDeckCompanions = (): DeckCompanion[] => {\n const { graph } = useAppGraph();\n const connections = useConnections(graph, ROOT_ID);\n const companions = connections.filter((node) => node.type === DECK_COMPANION_TYPE) as DeckCompanion[];\n return companions.toSorted((a, b) => byPosition(a.properties, b.properties));\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useMemo } from 'react';\n\nimport { Capabilities, useCapability } from '@dxos/app-framework';\nimport { useThemeContext } from '@dxos/react-ui';\n\nimport { meta } from '../meta';\nimport type { DeckSettingsProps, LayoutMode } from '../types';\n\nexport const useHoistStatusbar = (breakpoint: string, layoutMode?: LayoutMode): boolean => {\n const { safeAreaPadding } = useThemeContext();\n const enableStatusbar = useCapability(Capabilities.SettingsStore).getStore<DeckSettingsProps>(meta.id)?.value\n .enableStatusbar;\n\n return useMemo(() => {\n return (\n breakpoint === 'desktop' &&\n layoutMode !== 'solo--fullscreen' &&\n !!enableStatusbar &&\n safeAreaPadding?.bottom === 0\n );\n }, [enableStatusbar, breakpoint, safeAreaPadding?.bottom, layoutMode]);\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { useMainContext } from '@dxos/react-ui';\n\nexport const useMainSize = () => {\n const { navigationSidebarState, complementarySidebarState } = useMainContext('DeckPluginPlank');\n return {\n 'data-sidebar-inline-start-state': navigationSidebarState,\n 'data-sidebar-inline-end-state': complementarySidebarState,\n };\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { useEffect } from 'react';\n\nimport { type Node, getGraph } from '@dxos/plugin-graph';\n\nexport const useNodeActionExpander = (node?: Node) => {\n useEffect(() => {\n if (node) {\n const frame = requestAnimationFrame(() => {\n const graph = getGraph(node);\n void graph.expand(node.id);\n });\n return () => cancelAnimationFrame(frame);\n }\n }, [node]);\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const AppGraphBuilder = lazy(() => import('./app-graph-builder'));\nexport const CheckAppScheme = lazy(() => import('./check-app-scheme'));\nexport const DeckSettings = lazy(() => import('./settings'));\nexport const DeckState = lazy(() => import('./state'));\nexport const LayoutIntentResolver = lazy(() => import('./intent-resolver'));\nexport const ReactRoot = lazy(() => import('./react-root'));\nexport const ReactSurface = lazy(() => import('./react-surface'));\n// export const Tools = lazy(() => import('./tools'));\nexport const Toolkit = lazy(() => import('./toolkit'));\nexport const UrlHandler = lazy(() => import('./url-handler'));\n\nexport * from './capabilities';\nexport * from './state';\n"],
5
- "mappings": ";;;;;;;;;;AAIA,SAASA,eAAe;AAExB,SAASC,mBAAmB;AAC5B,SAASC,sBAAsB;AAC/B,SAASC,kBAAkB;AAIpB,IAAMC,gBAAgB,CAACC,OAAAA;AAC5B,QAAM,EAAEC,MAAK,IAAKC,YAAAA;AAClB,QAAMC,QAAQC,eAAeH,OAAOD,EAAAA;AACpC,QAAMK,aAAaF,MAAMG,OAAO,CAACC,SAASA,KAAKC,SAASC,oBAAAA;AACxD,SAAOC,QAAQ,MAAML,WAAWM,SAAS,CAACC,GAAGC,MAAMC,WAAWF,EAAEG,YAAYF,EAAEE,UAAU,CAAA,GAAI;IAACV;GAAW;AAC1G;;;ACbA,SAASW,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;;;ACNA,SAAqBG,eAAAA,oBAAmB;AACxC,SAAoBC,SAASC,kBAAAA,uBAAsB;AACnD,SAAwBC,cAAAA,mBAAkB;AAInC,IAAMC,iBAAiB,CAACC,OAAAA;AAC7B,QAAM,CAACC,GAAGC,WAAAA,IAAeF,GAAGG,MAAMC,yBAAAA;AAClC,SAAOF,eAA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M,OAAO,kCAAA,CAAA;AAC1C,IAAMC,iBAAiBD,KAAK,MAAM,OAAO,iCAAA,CAAA;AACzC,IAAME,eAAeF,KAAK,MAAM,OAAO,yBAAA,CAAA;AACvC,IAAMG,YAAYH,KAAK,MAAM,OAAO,sBAAA,CAAA;AACpC,IAAMI,uBAAuBJ,KAAK,MAAM,OAAO,gCAAA,CAAA;AAC/C,IAAMK,YAAYL,KAAK,MAAM,OAAO,2BAAA,CAAA;AACpC,IAAMM,eAAeN,KAAK,MAAM,OAAO,8BAAA,CAAA;AAEvC,IAAMO,UAAUP,KAAK,MAAM,OAAO,wBAAA,CAAA;AAClC,IAAMQ,aAAaR,KAAK,MAAM,OAAO,4BAAA,CAAA;",
6
- "names": ["useMemo", "useAppGraph", "useConnections", "byPosition", "useCompanions", "id", "graph", "useAppGraph", "nodes", "useConnections", "companions", "filter", "node", "type", "PLANK_COMPANION_TYPE", "useMemo", "toSorted", "a", "b", "byPosition", "properties", "useMediaQuery", "useBreakpoints", "isNotMobile", "useMediaQuery", "isDesktop", "useAppGraph", "ROOT_ID", "useConnections", "byPosition", "getCompanionId", "id", "_", "companionId", "split", "ATTENDABLE_PATH_SEPARATOR", "useDeckCompanions", "graph", "useAppGraph", "connections", "useConnections", "ROOT_ID", "companions", "filter", "node", "type", "DECK_COMPANION_TYPE", "toSorted", "a", "b", "byPosition", "properties", "useMemo", "Capabilities", "useCapability", "useThemeContext", "useHoistStatusbar", "breakpoint", "layoutMode", "safeAreaPadding", "useThemeContext", "enableStatusbar", "useCapability", "Capabilities", "SettingsStore", "getStore", "meta", "id", "value", "useMemo", "bottom", "useMainContext", "useMainSize", "navigationSidebarState", "complementarySidebarState", "useMainContext", "useEffect", "getGraph", "useNodeActionExpander", "node", "useEffect", "frame", "requestAnimationFrame", "graph", "getGraph", "expand", "id", "cancelAnimationFrame", "lazy", "AppGraphBuilder", "lazy", "CheckAppScheme", "DeckSettings", "DeckState", "LayoutIntentResolver", "ReactRoot", "ReactSurface", "Toolkit", "UrlHandler"]
7
- }