@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/capabilities/settings/settings.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes } from '@dxos/app-framework';\nimport { create } from '@dxos/live-object';\n\nimport { DECK_PLUGIN } from '../../meta';\nimport { DeckSettingsSchema, type DeckSettingsProps } from '../../types';\n\nexport default () => {\n const settings = create<DeckSettingsProps>({\n showHints: false,\n customSlots: false,\n flatDeck: false,\n enableNativeRedirect: false,\n newPlankPositioning: 'start',\n overscroll: 'centering',\n });\n\n return contributes(Capabilities.Settings, { schema: DeckSettingsSchema, prefix: DECK_PLUGIN, value: settings });\n};\n"],
5
- "mappings": ";;;;;;;;AAIA,SAASA,cAAcC,mBAAmB;AAC1C,SAASC,cAAc;AAKvB,IAAA,mBAAe,MAAA;AACb,QAAMC,WAAWC,OAA0B;IACzCC,WAAW;IACXC,aAAa;IACbC,UAAU;IACVC,sBAAsB;IACtBC,qBAAqB;IACrBC,YAAY;EACd,CAAA;AAEA,SAAOC,YAAYC,aAAaC,UAAU;IAAEC,QAAQC;IAAoBC,QAAQC;IAAaC,OAAOf;EAAS,CAAA;AAC/G;",
6
- "names": ["Capabilities", "contributes", "create", "settings", "create", "showHints", "customSlots", "flatDeck", "enableNativeRedirect", "newPlankPositioning", "overscroll", "contributes", "Capabilities", "Settings", "schema", "DeckSettingsSchema", "prefix", "DECK_PLUGIN", "value"]
7
- }
@@ -1,34 +0,0 @@
1
- // packages/plugins/plugin-deck/src/capabilities/layout/state.ts
2
- import { Capabilities, contributes } from "@dxos/app-framework";
3
- import { LocalStorageStore } from "@dxos/local-storage";
4
- var LAYOUT_KEY = "dxos.org/settings/layout";
5
- var state_default = () => {
6
- const layout = new LocalStorageStore(LAYOUT_KEY, {
7
- layoutMode: "solo",
8
- sidebarOpen: true,
9
- complementarySidebarOpen: false,
10
- dialogContent: null,
11
- dialogOpen: false,
12
- dialogBlockAlign: void 0,
13
- dialogType: void 0,
14
- popoverContent: null,
15
- popoverAnchorId: void 0,
16
- popoverOpen: false,
17
- toasts: []
18
- });
19
- layout.prop({
20
- key: "layoutMode",
21
- type: LocalStorageStore.enum()
22
- }).prop({
23
- key: "sidebarOpen",
24
- type: LocalStorageStore.bool()
25
- }).prop({
26
- key: "complementarySidebarOpen",
27
- type: LocalStorageStore.bool()
28
- });
29
- return contributes(Capabilities.Layout, layout.values, () => layout.close());
30
- };
31
- export {
32
- state_default as default
33
- };
34
- //# sourceMappingURL=state-7I5BD7SE.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/layout/state.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes, type LayoutMode, type Layout } from '@dxos/app-framework';\nimport { LocalStorageStore } from '@dxos/local-storage';\n\n// NOTE: The key is this currently for backwards compatibility of storage.\nconst LAYOUT_KEY = 'dxos.org/settings/layout';\n\nexport default () => {\n const layout = new LocalStorageStore<Layout>(LAYOUT_KEY, {\n layoutMode: 'solo',\n sidebarOpen: true,\n complementarySidebarOpen: false,\n dialogContent: null,\n dialogOpen: false,\n dialogBlockAlign: undefined,\n dialogType: undefined,\n popoverContent: null,\n popoverAnchorId: undefined,\n popoverOpen: false,\n toasts: [],\n });\n\n layout\n .prop({ key: 'layoutMode', type: LocalStorageStore.enum<LayoutMode>() })\n .prop({ key: 'sidebarOpen', type: LocalStorageStore.bool() })\n .prop({ key: 'complementarySidebarOpen', type: LocalStorageStore.bool() });\n\n return contributes(Capabilities.Layout, layout.values, () => layout.close());\n};\n"],
5
- "mappings": ";AAIA,SAASA,cAAcC,mBAAiD;AACxE,SAASC,yBAAyB;AAGlC,IAAMC,aAAa;AAEnB,IAAA,gBAAe,MAAA;AACb,QAAMC,SAAS,IAAIC,kBAA0BF,YAAY;IACvDG,YAAY;IACZC,aAAa;IACbC,0BAA0B;IAC1BC,eAAe;IACfC,YAAY;IACZC,kBAAkBC;IAClBC,YAAYD;IACZE,gBAAgB;IAChBC,iBAAiBH;IACjBI,aAAa;IACbC,QAAQ,CAAA;EACV,CAAA;AAEAb,SACGc,KAAK;IAAEC,KAAK;IAAcC,MAAMf,kBAAkBgB,KAAI;EAAe,CAAA,EACrEH,KAAK;IAAEC,KAAK;IAAeC,MAAMf,kBAAkBiB,KAAI;EAAG,CAAA,EAC1DJ,KAAK;IAAEC,KAAK;IAA4BC,MAAMf,kBAAkBiB,KAAI;EAAG,CAAA;AAE1E,SAAOC,YAAYC,aAAaC,QAAQrB,OAAOsB,QAAQ,MAAMtB,OAAOuB,MAAK,CAAA;AAC3E;",
6
- "names": ["Capabilities", "contributes", "LocalStorageStore", "LAYOUT_KEY", "layout", "LocalStorageStore", "layoutMode", "sidebarOpen", "complementarySidebarOpen", "dialogContent", "dialogOpen", "dialogBlockAlign", "undefined", "dialogType", "popoverContent", "popoverAnchorId", "popoverOpen", "toasts", "prop", "key", "type", "enum", "bool", "contributes", "Capabilities", "Layout", "values", "close"]
7
- }
@@ -1,76 +0,0 @@
1
- import {
2
- mergeLayoutParts,
3
- removePart,
4
- setLocation,
5
- soloPartToUri,
6
- uriToSoloPart
7
- } from "./chunk-4C2AFTET.mjs";
8
- import {
9
- NAV_ID
10
- } from "./chunk-2M4PXYNB.mjs";
11
- import "./chunk-2PJNBVCY.mjs";
12
- import "./chunk-KY5WXIXY.mjs";
13
- import "./chunk-JQJ5UWVB.mjs";
14
-
15
- // packages/plugins/plugin-deck/src/capabilities/navigation/url-handler.ts
16
- import { Capabilities, contributes, createIntent, LayoutAction } from "@dxos/app-framework";
17
- import { scheduledEffect } from "@dxos/echo-signals/core";
18
- import { AttentionCapabilities } from "@dxos/plugin-attention";
19
- var url_handler_default = async (context) => {
20
- const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher) ?? {};
21
- const location = context.requestCapability(Capabilities.MutableLocation);
22
- const layout = context.requestCapability(Capabilities.MutableLayout);
23
- const attention = context.requestCapability(AttentionCapabilities.Attention);
24
- const handleNavigation = async () => {
25
- const setLocation2 = (next) => setLocation({
26
- next,
27
- layout,
28
- location,
29
- attention
30
- });
31
- const pathname = window.location.pathname;
32
- if (pathname === "/reset") {
33
- setLocation2({
34
- sidebar: [
35
- {
36
- id: NAV_ID
37
- }
38
- ]
39
- });
40
- location.closed = [];
41
- layout.layoutMode = "solo";
42
- window.location.pathname = "/";
43
- return;
44
- }
45
- const startingLayout = removePart(location.active, "solo");
46
- const layoutFromUri = uriToSoloPart(pathname);
47
- if (!layoutFromUri) {
48
- const toAttend2 = setLocation2(startingLayout);
49
- layout.layoutMode = "deck";
50
- await dispatch?.(createIntent(LayoutAction.ScrollIntoView, {
51
- id: toAttend2
52
- }));
53
- return;
54
- }
55
- const toAttend = setLocation2(mergeLayoutParts(layoutFromUri, startingLayout));
56
- layout.layoutMode = "solo";
57
- await dispatch?.(createIntent(LayoutAction.ScrollIntoView, {
58
- id: toAttend
59
- }));
60
- };
61
- await handleNavigation();
62
- window.addEventListener("popstate", handleNavigation);
63
- const unsubscribe = scheduledEffect(() => ({
64
- selectedPath: soloPartToUri(location.active)
65
- }), ({ selectedPath }) => {
66
- history.pushState(null, "", `/${selectedPath}${window.location.search}`);
67
- });
68
- return contributes(Capabilities.Null, null, () => {
69
- window.removeEventListener("popstate", handleNavigation);
70
- unsubscribe();
71
- });
72
- };
73
- export {
74
- url_handler_default as default
75
- };
76
- //# sourceMappingURL=url-handler-Z5B7LD3N.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/navigation/url-handler.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport {\n Capabilities,\n contributes,\n createIntent,\n LayoutAction,\n type LayoutParts,\n type PluginsContext,\n} from '@dxos/app-framework';\nimport { scheduledEffect } from '@dxos/echo-signals/core';\nimport { AttentionCapabilities } from '@dxos/plugin-attention';\n\nimport { setLocation as naturalSetLocation } from './set-location';\nimport { NAV_ID } from '../../components';\nimport { mergeLayoutParts, removePart, soloPartToUri, uriToSoloPart } from '../../layout';\n\nexport default async (context: PluginsContext) => {\n const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher) ?? {};\n const location = context.requestCapability(Capabilities.MutableLocation);\n const layout = context.requestCapability(Capabilities.MutableLayout);\n const attention = context.requestCapability(AttentionCapabilities.Attention);\n\n const handleNavigation = async () => {\n const setLocation = (next: LayoutParts) => naturalSetLocation({ next, layout, location, attention });\n\n const pathname = window.location.pathname;\n if (pathname === '/reset') {\n setLocation({ sidebar: [{ id: NAV_ID }] });\n location.closed = [];\n layout.layoutMode = 'solo';\n window.location.pathname = '/';\n return;\n }\n\n const startingLayout = removePart(location.active, 'solo');\n const layoutFromUri = uriToSoloPart(pathname);\n if (!layoutFromUri) {\n const toAttend = setLocation(startingLayout);\n layout.layoutMode = 'deck';\n await dispatch?.(createIntent(LayoutAction.ScrollIntoView, { id: toAttend }));\n return;\n }\n\n const toAttend = setLocation(mergeLayoutParts(layoutFromUri, startingLayout));\n layout.layoutMode = 'solo';\n await dispatch?.(createIntent(LayoutAction.ScrollIntoView, { id: toAttend }));\n };\n\n await handleNavigation();\n window.addEventListener('popstate', handleNavigation);\n\n const unsubscribe = scheduledEffect(\n () => ({ selectedPath: soloPartToUri(location.active) }),\n ({ selectedPath }) => {\n // TODO(thure): In some browsers, this only preserves the most recent state change, even though this is not `history.replace`…\n history.pushState(null, '', `/${selectedPath}${window.location.search}`);\n },\n );\n\n return contributes(Capabilities.Null, null, () => {\n window.removeEventListener('popstate', handleNavigation);\n unsubscribe();\n });\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;AAIA,SACEA,cACAC,aACAC,cACAC,oBAGK;AACP,SAASC,uBAAuB;AAChC,SAASC,6BAA6B;AAMtC,IAAA,sBAAe,OAAOC,YAAAA;AACpB,QAAM,EAAEC,iBAAiBC,SAAQ,IAAKF,QAAQG,kBAAkBC,aAAaC,gBAAgB,KAAK,CAAC;AACnG,QAAMC,WAAWN,QAAQG,kBAAkBC,aAAa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sB,gBAAAA;EACF,CAAA;AACF;",
6
- "names": ["Capabilities", "contributes", "createIntent", "LayoutAction", "scheduledEffect", "AttentionCapabilities", "context", "dispatchPromise", "dispatch", "requestCapability", "Capabilities", "IntentDispatcher", "location", "MutableLocation", "layout", "MutableLayout", "attention", "AttentionCapabilities", "Attention", "handleNavigation", "setLocation", "next", "naturalSetLocation", "pathname", "window", "sidebar", "id", "NAV_ID", "closed", "layoutMode", "startingLayout", "removePart", "active", "layoutFromUri", "uriToSoloPart", "toAttend", "createIntent", "LayoutAction", "ScrollIntoView", "mergeLayoutParts", "addEventListener", "unsubscribe", "scheduledEffect", "selectedPath", "soloPartToUri", "history", "pushState", "search", "contributes", "Null", "removeEventListener"]
7
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-graph-builder.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/layout/app-graph-builder.ts"],"names":[],"mappings":"AAIA,OAAO,EAOL,KAAK,cAAc,EACpB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAmB,KAAK,IAAI,EAAW,MAAM,oBAAoB,CAAC;kCAIhD,cAAc;;wBAmF2iD,qCAAY;sBAAyC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,uCAAiB;;;wBAAwF,qCAAY;sBAAyC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,uCAAiB;;;wBAA2F,qCAAY;sBAAyC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,uCAAiB;;;wBAAwF,qCAAY;sBAAyC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,uCAAiB;;;wBAA2F,qCAAY;sBAAyC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,uCAAiB;;;wBAAwF,qCAAY;sBAAyC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,uCAAiB;;;wBAA2F,qCAAY;s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AgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,uCAAiB;;;wBAAwF,qCAAY;sBAAyC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,uCAAiB;;AAnF1/S,wBAkFI"}
@@ -1,4 +0,0 @@
1
- import { type DeckContextType } from '../../components';
2
- declare const _default: () => import("@dxos/app-framework").Capability<import("packages/common/util/dist/types/src").DeepReadonly<DeckContextType>>;
3
- export default _default;
4
- //# sourceMappingURL=deck.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deck.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/layout/deck.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;;AAMxD,wBAWE"}
@@ -1,229 +0,0 @@
1
- export declare const DeckState: (props?: unknown) => Promise<import("@dxos/app-framework").Capability<import("packages/common/util/dist/types/src").DeepReadonly<import("../../components").DeckContextType>>>;
2
- export declare const AppGraphBuilder: (props?: import("@dxos/app-framework").PluginsContext | undefined) => Promise<import("@dxos/app-framework").Capability<Readonly<{
3
- id: string;
4
- disposition: import("packages/common/util/dist/types/src").Disposition;
5
- resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
6
- connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
7
- relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
8
- type?: string;
9
- filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
10
- }> | Readonly<{
11
- id: string;
12
- disposition: import("packages/common/util/dist/types/src").Disposition;
13
- resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
14
- connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
15
- relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
16
- type?: string;
17
- filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
18
- }>[] | (Readonly<{
19
- id: string;
20
- disposition: import("packages/common/util/dist/types/src").Disposition;
21
- resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
22
- connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
23
- relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
24
- type?: string;
25
- filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
26
- }> | Readonly<{
27
- id: string;
28
- disposition: import("packages/common/util/dist/types/src").Disposition;
29
- resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
30
- connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
31
- relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
32
- type?: string;
33
- filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
34
- }>[] | (Readonly<{
35
- id: string;
36
- disposition: import("packages/common/util/dist/types/src").Disposition;
37
- resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
38
- connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
39
- relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
40
- type?: string;
41
- filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
42
- }> | Readonly<{
43
- id: string;
44
- disposition: import("packages/common/util/dist/types/src").Disposition;
45
- resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
46
- connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
47
- relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
48
- type?: string;
49
- filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
50
- }>[] | (Readonly<{
51
- id: string;
52
- disposition: import("packages/common/util/dist/types/src").Disposition;
53
- resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
54
- connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
55
- relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
56
- type?: string;
57
- filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
58
- }> | Readonly<{
59
- id: string;
60
- disposition: import("packages/common/util/dist/types/src").Disposition;
61
- resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
62
- connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
63
- relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
64
- type?: string;
65
- filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
66
- }>[] | (Readonly<{
67
- id: string;
68
- disposition: import("packages/common/util/dist/types/src").Disposition;
69
- resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
70
- connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
71
- relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
72
- type?: string;
73
- filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
74
- }> | Readonly<{
75
- id: string;
76
- disposition: import("packages/common/util/dist/types/src").Disposition;
77
- resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
78
- connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
79
- relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
80
- type?: string;
81
- filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
82
- }>[] | (Readonly<{
83
- id: string;
84
- disposition: import("packages/common/util/dist/types/src").Disposition;
85
- resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
86
- connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
87
- relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
88
- type?: string;
89
- filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
90
- }> | Readonly<{
91
- id: string;
92
- disposition: import("packages/common/util/dist/types/src").Disposition;
93
- resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
94
- connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
95
- relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
96
- type?: string;
97
- filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
98
- }>[] | (Readonly<{
99
- id: string;
100
- disposition: import("packages/common/util/dist/types/src").Disposition;
101
- resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
102
- connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
103
- relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
104
- type?: string;
105
- filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
106
- }> | Readonly<{
107
- id: string;
108
- disposition: import("packages/common/util/dist/types/src").Disposition;
109
- resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
110
- connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
111
- relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
112
- type?: string;
113
- filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
114
- }>[] | (Readonly<{
115
- id: string;
116
- disposition: import("packages/common/util/dist/types/src").Disposition;
117
- resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
118
- connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
119
- relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
120
- type?: string;
121
- filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
122
- }> | Readonly<{
123
- id: string;
124
- disposition: import("packages/common/util/dist/types/src").Disposition;
125
- resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
126
- connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
127
- relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
128
- type?: string;
129
- filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
130
- }>[] | (Readonly<{
131
- id: string;
132
- disposition: import("packages/common/util/dist/types/src").Disposition;
133
- resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
134
- connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
135
- relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
136
- type?: string;
137
- filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
138
- }> | Readonly<{
139
- id: string;
140
- disposition: import("packages/common/util/dist/types/src").Disposition;
141
- resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
142
- connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
143
- relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
144
- type?: string;
145
- filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
146
- }>[] | (Readonly<{
147
- id: string;
148
- disposition: import("packages/common/util/dist/types/src").Disposition;
149
- resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
150
- connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
151
- relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
152
- type?: string;
153
- filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
154
- }> | Readonly<{
155
- id: string;
156
- disposition: import("packages/common/util/dist/types/src").Disposition;
157
- resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
158
- connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
159
- relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
160
- type?: string;
161
- filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
162
- }>[] | (any[] | Readonly<{
163
- id: string;
164
- disposition: import("packages/common/util/dist/types/src").Disposition;
165
- resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
166
- connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
167
- relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
168
- type?: string;
169
- filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
170
- }> | Readonly<{
171
- id: string;
172
- disposition: import("packages/common/util/dist/types/src").Disposition;
173
- resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
174
- connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
175
- relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
176
- type?: string;
177
- filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
178
- }>[])[])[])[])[])[])[])[])[])[])[]>>;
179
- export declare const LayoutIntentResolver: (props?: import("@dxos/app-framework").PluginsContext | undefined) => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").Capabilities.IntentResolver>>;
180
- export declare const LayoutState: (props?: unknown) => Promise<import("@dxos/app-framework").Capability<import("packages/core/echo/live-object/dist/types/src").ReactiveObject<{
181
- complementarySidebarOpen: boolean;
182
- layoutMode: "solo" | "deck" | "fullscreen";
183
- sidebarOpen: boolean;
184
- complementarySidebarContent?: any;
185
- dialogOpen: boolean;
186
- dialogContent?: any;
187
- dialogBlockAlign?: "center" | "start" | undefined;
188
- dialogType?: "alert" | "default" | undefined;
189
- popoverOpen: boolean;
190
- popoverContent?: any;
191
- popoverAnchorId?: string | undefined;
192
- toasts: {
193
- readonly id: string;
194
- readonly title?: string | [string, {
195
- ns: string;
196
- count?: number | undefined;
197
- }] | undefined;
198
- readonly icon?: string | undefined;
199
- readonly description?: string | [string, {
200
- ns: string;
201
- count?: number | undefined;
202
- }] | undefined;
203
- readonly duration?: number | undefined;
204
- readonly closeLabel?: string | [string, {
205
- ns: string;
206
- count?: number | undefined;
207
- }] | undefined;
208
- readonly actionLabel?: string | [string, {
209
- ns: string;
210
- count?: number | undefined;
211
- }] | undefined;
212
- readonly actionAlt?: string | [string, {
213
- ns: string;
214
- count?: number | undefined;
215
- }] | undefined;
216
- readonly onAction?: any;
217
- }[];
218
- scrollIntoView?: string | undefined;
219
- }>>>;
220
- export declare const ReactContext: (props?: unknown) => Promise<import("@dxos/app-framework").Capability<Readonly<{
221
- id: string;
222
- dependsOn?: string[];
223
- context: import("react").FC<import("react").PropsWithChildren>;
224
- }>>>;
225
- export declare const ReactRoot: (props?: unknown) => Promise<import("@dxos/app-framework").Capability<Readonly<{
226
- id: string;
227
- root: import("react").FC<import("react").PropsWithChildren>;
228
- }>>>;
229
- //# sourceMapp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qBAAqB,CAAC;kCAQJ,cAAc;AAAvC,wBAuGK"}
@@ -1,8 +0,0 @@
1
- import React, { type PropsWithChildren } from 'react';
2
- declare const _default: () => import("@dxos/app-framework").Capability<Readonly<{
3
- id: string;
4
- dependsOn?: string[];
5
- context: React.FC<PropsWithChildren>;
6
- }>>;
7
- export default _default;
8
- //# sourceMappingURL=react-context.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"react-context.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/layout/react-context.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;;;;;;AAQtD,wBAaK"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"react-root.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/layout/react-root.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAsB,MAAM,OAAO,CAAC;;;;;AAS3C,wBAsCK"}
@@ -1,42 +0,0 @@
1
- declare const _default: () => import("@dxos/app-framework").Capability<import("packages/core/echo/live-object/dist/types/src").ReactiveObject<{
2
- complementarySidebarOpen: boolean;
3
- layoutMode: "solo" | "deck" | "fullscreen";
4
- sidebarOpen: boolean;
5
- complementarySidebarContent?: any;
6
- dialogOpen: boolean;
7
- dialogContent?: any;
8
- dialogBlockAlign?: "center" | "start" | undefined;
9
- dialogType?: "alert" | "default" | undefined;
10
- popoverOpen: boolean;
11
- popoverContent?: any;
12
- popoverAnchorId?: string | undefined;
13
- toasts: {
14
- readonly id: string;
15
- readonly title?: string | [string, {
16
- ns: string;
17
- count?: number | undefined;
18
- }] | undefined;
19
- readonly icon?: string | undefined;
20
- readonly description?: string | [string, {
21
- ns: string;
22
- count?: number | undefined;
23
- }] | undefined;
24
- readonly duration?: number | undefined;
25
- readonly closeLabel?: string | [string, {
26
- ns: string;
27
- count?: number | undefined;
28
- }] | undefined;
29
- readonly actionLabel?: string | [string, {
30
- ns: string;
31
- count?: number | undefined;
32
- }] | undefined;
33
- readonly actionAlt?: string | [string, {
34
- ns: string;
35
- count?: number | undefined;
36
- }] | undefined;
37
- readonly onAction?: any;
38
- }[];
39
- scrollIntoView?: string | undefined;
40
- }>>;
41
- export default _default;
42
- //# sourceMappingURL=state.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/layout/state.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,wBAqBE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"check-app-scheme.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/navigation/check-app-scheme.ts"],"names":[],"mappings":"AAOA,OAAO,EAA6B,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;kCA4BtD,cAAc;AAA7C,wBAQE"}
@@ -1,5 +0,0 @@
1
- export declare const CheckAppScheme: (props?: import("@dxos/app-framework").PluginsContext | undefined) => Promise<import("@dxos/app-framework").Capability<null>>;
2
- export declare const LocationState: (props?: unknown) => Promise<import("@dxos/app-framework").Capability<import("packages/common/util/dist/types/src").DeepReadonly<import("@dxos/app-framework").Capabilities.MutableLocation>>>;
3
- export declare const NavigationIntentResolver: (props?: import("@dxos/app-framework").PluginsContext | undefined) => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").Capabilities.IntentResolver>>;
4
- export declare const UrlHandler: (props?: import("@dxos/app-framework").PluginsContext | undefined) => Promise<import("@dxos/app-framework").Capability<null>>;
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/navigation/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,+HAA2C,CAAC;AACvE,eAAO,MAAM,aAAa,gMAAmC,CAAC;AAC9D,eAAO,MAAM,wBAAwB,oLAA0C,CAAC;AAChF,eAAO,MAAM,UAAU,+HAAsC,CAAC"}
@@ -1,4 +0,0 @@
1
- import { Capabilities, type PluginsContext } from '@dxos/app-framework';
2
- declare const _default: (context: PluginsContext) => import("@dxos/app-framework").Capability<Capabilities.IntentResolver>;
3
- export default _default;
4
- //# sourceMappingURL=intent-resolver.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"intent-resolver.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/navigation/intent-resolver.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,YAAY,EAWZ,KAAK,cAAc,EACpB,MAAM,qBAAqB,CAAC;kCAYJ,cAAc;AAAvC,wBAuLK"}
@@ -1,4 +0,0 @@
1
- import { Capabilities } from '@dxos/app-framework';
2
- declare const _default: () => import("@dxos/app-framework").Capability<import("packages/common/util/dist/types/src").DeepReadonly<Capabilities.MutableLocation>>;
3
- export default _default;
4
- //# sourceMappingURL=location.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"location.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/navigation/location.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAiC,MAAM,qBAAqB,CAAC;;AAQlF,wBAeE"}
@@ -1,10 +0,0 @@
1
- import { type Layout, type LayoutParts, type Capabilities } from '@dxos/app-framework';
2
- import { type AttentionManager } from '@dxos/plugin-attention';
3
- export type SetLocationOptions = {
4
- next: LayoutParts;
5
- location: Capabilities.MutableLocation;
6
- layout: Layout;
7
- attention?: AttentionManager;
8
- };
9
- export declare const setLocation: ({ next, location, layout, attention }: SetLocationOptions) => string | undefined;
10
- //# sourceMappingURL=set-location.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"set-location.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/navigation/set-location.ts"],"names":[],"mappings":"AAIA,OAAO,EAAW,KAAK,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAChG,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,WAAW,CAAC;IAClB,QAAQ,EAAE,YAAY,CAAC,eAAe,CAAC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,WAAW,0CAA2C,kBAAkB,uBAuBpF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"url-handler.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/navigation/url-handler.ts"],"names":[],"mappings":"AAIA,OAAO,EAML,KAAK,cAAc,EACpB,MAAM,qBAAqB,CAAC;kCAQE,cAAc;AAA7C,wBA+CE"}
@@ -1,3 +0,0 @@
1
- export declare const ReactSurface: (props?: unknown) => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").Capabilities.ReactSurface>>;
2
- export declare const DeckSettings: (props?: unknown) => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").Capabilities.Settings>>;
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/settings/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY,iIAAwC,CAAC;AAClE,eAAO,MAAM,YAAY,6HAAmC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/settings/react-surface.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAA8B,MAAM,qBAAqB,CAAC;;AAM/E,wBAUK"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/settings/settings.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAe,MAAM,qBAAqB,CAAC;;AAMhE,wBAWE"}
@@ -1,11 +0,0 @@
1
- import { type Context } from 'react';
2
- import { type LayoutMode } from '@dxos/app-framework';
3
- export type PlankSizing = Record<string, number>;
4
- export type DeckContextType = {
5
- plankSizing: PlankSizing;
6
- currentUndoId: string | undefined;
7
- layoutModeHistory: LayoutMode[];
8
- };
9
- export declare const DeckContext: Context<DeckContextType | null>;
10
- export declare const useDeckContext: () => DeckContextType;
11
- //# sourceMappingURL=DeckContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DeckContext.d.ts","sourceRoot":"","sources":["../../../../src/components/DeckContext.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAA6B,MAAM,OAAO,CAAC;AAEhE,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGtD,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACjD,MAAM,MAAM,eAAe,GAAG;IAC5B,WAAW,EAAE,WAAW,CAAC;IACzB,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,iBAAiB,EAAE,UAAU,EAAE,CAAC;CACjC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,OAAO,CAAC,eAAe,GAAG,IAAI,CAA+C,CAAC;AAExG,eAAO,MAAM,cAAc,QAAO,eAAqF,CAAC"}
@@ -1,5 +0,0 @@
1
- import { type Context } from 'react';
2
- import type { Layout } from '@dxos/app-framework';
3
- export declare const LayoutContext: Context<Layout | null>;
4
- export declare const useLayout: () => Layout;
5
- //# sourceMappingURL=LayoutContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LayoutContext.d.ts","sourceRoot":"","sources":["../../../../src/components/LayoutContext.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAA6B,MAAM,OAAO,CAAC;AAEhE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGlD,eAAO,MAAM,aAAa,EAAE,OAAO,CAAC,MAAM,GAAG,IAAI,CAAsC,CAAC;AAExF,eAAO,MAAM,SAAS,QAAO,MAAgF,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=layout.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"layout.test.d.ts","sourceRoot":"","sources":["../../../src/layout.test.ts"],"names":[],"mappings":""}
@@ -1,7 +0,0 @@
1
- import { type LayoutMode, type LayoutPart } from '@dxos/app-framework';
2
- /**
3
- * If in solo mode and the part is the main part, open it in solo mode.
4
- * From the dispatch POV we refer to both 'solo' and 'main' as 'main'.
5
- */
6
- export declare const getEffectivePart: (partName: LayoutPart, layoutMode: LayoutMode) => LayoutPart;
7
- //# sourceMappingURL=layout-parts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"layout-parts.d.ts","sourceRoot":"","sources":["../../../../src/util/layout-parts.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEvE;;;GAGG;AACH,eAAO,MAAM,gBAAgB,aAAc,UAAU,cAAc,UAAU,KAAG,UACd,CAAC"}
@@ -1,25 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { contributes } from '@dxos/app-framework';
6
- import { LocalStorageStore } from '@dxos/local-storage';
7
-
8
- import { type DeckContextType } from '../../components';
9
- import { DeckCapabilities } from '../capabilities';
10
-
11
- // NOTE: The key is this currently for backwards compatibility of storage.
12
- const DECK_KEY = 'dxos.org/settings/deck';
13
-
14
- export default () => {
15
- const deck = new LocalStorageStore<DeckContextType>(DECK_KEY, {
16
- plankSizing: {},
17
- currentUndoId: undefined,
18
- // TODO(Zan): Cap depth!
19
- layoutModeHistory: [],
20
- });
21
-
22
- deck.prop({ key: 'plankSizing', type: LocalStorageStore.json<Record<string, number>>() });
23
-
24
- return contributes(DeckCapabilities.DeckState, deck.values, () => deck.close());
25
- };