@dxos/plugin-deck 0.8.1-staging.391c573 → 0.8.1-staging.9eaf14f

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 (176) hide show
  1. package/dist/lib/browser/{app-graph-builder-IYHAGFA3.mjs → app-graph-builder-VYZ4IWI3.mjs} +3 -3
  2. package/dist/lib/browser/{check-app-scheme-S3EYUPMF.mjs → check-app-scheme-SEYECDHI.mjs} +2 -2
  3. package/dist/lib/browser/{chunk-YCKJNTKG.mjs → chunk-6ZSOFCPP.mjs} +26 -6
  4. package/dist/lib/browser/chunk-6ZSOFCPP.mjs.map +7 -0
  5. package/dist/lib/browser/chunk-B4LOJUWW.mjs +24 -0
  6. package/dist/lib/browser/{chunk-Z23S33X6.mjs → chunk-FJBMNSUC.mjs} +638 -483
  7. package/dist/lib/browser/chunk-FJBMNSUC.mjs.map +7 -0
  8. package/dist/lib/browser/chunk-FLOVGNYB.mjs +81 -0
  9. package/dist/lib/browser/chunk-FLOVGNYB.mjs.map +7 -0
  10. package/dist/lib/browser/{chunk-N7TEPFVR.mjs → chunk-NSATFAEE.mjs} +3 -3
  11. package/dist/lib/browser/{chunk-N7TEPFVR.mjs.map → chunk-NSATFAEE.mjs.map} +2 -2
  12. package/dist/lib/browser/{chunk-FYKBOM3C.mjs → chunk-RJNCG4ND.mjs} +66 -40
  13. package/dist/lib/browser/chunk-RJNCG4ND.mjs.map +7 -0
  14. package/dist/lib/browser/{chunk-22AQ5IVX.mjs → chunk-XMCG42ID.mjs} +2 -3
  15. package/dist/lib/browser/chunk-XMCG42ID.mjs.map +7 -0
  16. package/dist/lib/browser/index.mjs +14 -9
  17. package/dist/lib/browser/index.mjs.map +3 -3
  18. package/dist/lib/browser/{intent-resolver-P5BVUQKU.mjs → intent-resolver-UDYKO2QW.mjs} +78 -88
  19. package/dist/lib/browser/intent-resolver-UDYKO2QW.mjs.map +7 -0
  20. package/dist/lib/browser/meta.json +1 -1
  21. package/dist/lib/browser/{react-root-EP4UF3KA.mjs → react-root-XLXN2VEW.mjs} +8 -10
  22. package/dist/lib/browser/react-root-XLXN2VEW.mjs.map +7 -0
  23. package/dist/lib/browser/{react-surface-5B3RLJCD.mjs → react-surface-WNGMZL7I.mjs} +11 -10
  24. package/dist/lib/browser/react-surface-WNGMZL7I.mjs.map +7 -0
  25. package/dist/lib/browser/{settings-X3P2HKQJ.mjs → settings-HMDGSBGO.mjs} +5 -4
  26. package/dist/lib/browser/settings-HMDGSBGO.mjs.map +7 -0
  27. package/dist/lib/browser/{state-2MOTLKVR.mjs → state-7TN26M42.mjs} +7 -11
  28. package/dist/lib/browser/state-7TN26M42.mjs.map +7 -0
  29. package/dist/lib/browser/tools-SC6QEN7R.mjs +78 -0
  30. package/dist/lib/browser/tools-SC6QEN7R.mjs.map +7 -0
  31. package/dist/lib/browser/types.mjs +12 -6
  32. package/dist/lib/browser/{url-handler-MVHTKUYA.mjs → url-handler-ODG4B6NX.mjs} +7 -9
  33. package/dist/lib/browser/url-handler-ODG4B6NX.mjs.map +7 -0
  34. package/dist/types/src/DeckPlugin.d.ts.map +1 -1
  35. package/dist/types/src/capabilities/capabilities.d.ts +36 -14
  36. package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
  37. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
  38. package/dist/types/src/capabilities/react-root.d.ts.map +1 -1
  39. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  40. package/dist/types/src/capabilities/settings.d.ts.map +1 -1
  41. package/dist/types/src/capabilities/state.d.ts +18 -6
  42. package/dist/types/src/capabilities/state.d.ts.map +1 -1
  43. package/dist/types/src/capabilities/tools.d.ts +1 -0
  44. package/dist/types/src/capabilities/tools.d.ts.map +1 -1
  45. package/dist/types/src/capabilities/url-handler.d.ts.map +1 -1
  46. package/dist/types/src/components/DeckLayout/ActiveNode.d.ts.map +1 -1
  47. package/dist/types/src/components/DeckLayout/Banner.d.ts.map +1 -1
  48. package/dist/types/src/components/DeckLayout/DeckLayout.d.ts +1 -4
  49. package/dist/types/src/components/DeckLayout/DeckLayout.d.ts.map +1 -1
  50. package/dist/types/src/components/DeckLayout/Toast.d.ts.map +1 -1
  51. package/dist/types/src/components/DeckLayout/index.d.ts +1 -0
  52. package/dist/types/src/components/DeckLayout/index.d.ts.map +1 -1
  53. package/dist/types/src/components/DeckSettings/DeckSettings.d.ts +6 -0
  54. package/dist/types/src/components/DeckSettings/DeckSettings.d.ts.map +1 -0
  55. package/dist/types/src/components/DeckSettings/index.d.ts +2 -0
  56. package/dist/types/src/components/DeckSettings/index.d.ts.map +1 -0
  57. package/dist/types/src/components/Plank/Plank.d.ts +14 -0
  58. package/dist/types/src/components/Plank/Plank.d.ts.map +1 -0
  59. package/dist/types/src/components/Plank/Plank.stories.d.ts +8 -0
  60. package/dist/types/src/components/Plank/Plank.stories.d.ts.map +1 -0
  61. package/dist/types/src/components/{DeckLayout → Plank}/PlankControls.d.ts +8 -1
  62. package/dist/types/src/components/Plank/PlankControls.d.ts.map +1 -0
  63. package/dist/types/src/components/{DeckLayout → Plank}/PlankError.d.ts +2 -2
  64. package/dist/types/src/components/Plank/PlankError.d.ts.map +1 -0
  65. package/dist/types/src/components/Plank/PlankHeading.d.ts +20 -0
  66. package/dist/types/src/components/Plank/PlankHeading.d.ts.map +1 -0
  67. package/dist/types/src/components/Plank/PlankLoading.d.ts.map +1 -0
  68. package/dist/types/src/components/Plank/index.d.ts +6 -0
  69. package/dist/types/src/components/Plank/index.d.ts.map +1 -0
  70. package/dist/types/src/components/Sidebar/ComplementarySidebar.d.ts.map +1 -0
  71. package/dist/types/src/components/Sidebar/Sidebar.d.ts.map +1 -0
  72. package/dist/types/src/components/Sidebar/SidebarButton.d.ts.map +1 -0
  73. package/dist/types/src/components/Sidebar/index.d.ts +4 -0
  74. package/dist/types/src/components/Sidebar/index.d.ts.map +1 -0
  75. package/dist/types/src/components/index.d.ts +1 -1
  76. package/dist/types/src/components/index.d.ts.map +1 -1
  77. package/dist/types/src/events.d.ts +0 -1
  78. package/dist/types/src/events.d.ts.map +1 -1
  79. package/dist/types/src/hooks/index.d.ts +0 -1
  80. package/dist/types/src/hooks/index.d.ts.map +1 -1
  81. package/dist/types/src/index.d.ts +1 -0
  82. package/dist/types/src/index.d.ts.map +1 -1
  83. package/dist/types/src/layout.d.ts +7 -1
  84. package/dist/types/src/layout.d.ts.map +1 -1
  85. package/dist/types/src/meta.d.ts +2 -5
  86. package/dist/types/src/meta.d.ts.map +1 -1
  87. package/dist/types/src/translations.d.ts +4 -0
  88. package/dist/types/src/translations.d.ts.map +1 -1
  89. package/dist/types/src/types.d.ts +50 -48
  90. package/dist/types/src/types.d.ts.map +1 -1
  91. package/dist/types/src/util/index.d.ts +1 -0
  92. package/dist/types/src/util/index.d.ts.map +1 -1
  93. package/dist/types/src/util/set-active.d.ts +2 -2
  94. package/dist/types/src/util/set-active.d.ts.map +1 -1
  95. package/dist/types/src/util/useCompanions.d.ts +8 -0
  96. package/dist/types/src/util/useCompanions.d.ts.map +1 -0
  97. package/dist/types/src/util/useHoistStatusbar.d.ts.map +1 -1
  98. package/package.json +28 -29
  99. package/src/DeckPlugin.ts +0 -1
  100. package/src/capabilities/capabilities.ts +3 -4
  101. package/src/capabilities/intent-resolver.ts +63 -9
  102. package/src/capabilities/react-root.tsx +1 -9
  103. package/src/capabilities/react-surface.tsx +3 -4
  104. package/src/capabilities/settings.ts +7 -2
  105. package/src/capabilities/state.ts +4 -11
  106. package/src/capabilities/tools.ts +34 -22
  107. package/src/capabilities/url-handler.ts +2 -8
  108. package/src/components/DeckLayout/ActiveNode.tsx +2 -1
  109. package/src/components/DeckLayout/Banner.tsx +5 -3
  110. package/src/components/DeckLayout/ContentEmpty.tsx +1 -1
  111. package/src/components/DeckLayout/DeckLayout.tsx +58 -24
  112. package/src/components/DeckLayout/Fullscreen.tsx +1 -1
  113. package/src/components/DeckLayout/Toast.tsx +1 -1
  114. package/src/components/DeckLayout/index.ts +2 -0
  115. package/src/components/{LayoutSettings.tsx → DeckSettings/DeckSettings.tsx} +15 -10
  116. package/src/components/DeckSettings/index.ts +5 -0
  117. package/src/components/Plank/Plank.stories.tsx +43 -0
  118. package/src/components/Plank/Plank.tsx +230 -0
  119. package/src/components/{DeckLayout → Plank}/PlankControls.tsx +73 -27
  120. package/src/components/{DeckLayout → Plank}/PlankError.tsx +3 -3
  121. package/src/components/Plank/PlankHeading.tsx +207 -0
  122. package/src/components/Plank/index.ts +9 -0
  123. package/src/components/{DeckLayout → Sidebar}/ComplementarySidebar.tsx +65 -81
  124. package/src/components/Sidebar/index.ts +7 -0
  125. package/src/components/index.ts +1 -1
  126. package/src/events.ts +0 -1
  127. package/src/hooks/index.ts +0 -1
  128. package/src/index.ts +1 -0
  129. package/src/layout.ts +19 -2
  130. package/src/meta.ts +4 -4
  131. package/src/translations.ts +4 -0
  132. package/src/types.ts +81 -79
  133. package/src/util/index.ts +1 -0
  134. package/src/util/set-active.ts +2 -2
  135. package/src/util/useCompanions.ts +18 -0
  136. package/src/util/useHoistStatusbar.ts +2 -2
  137. package/dist/lib/browser/chunk-22AQ5IVX.mjs.map +0 -7
  138. package/dist/lib/browser/chunk-FYKBOM3C.mjs.map +0 -7
  139. package/dist/lib/browser/chunk-IZ5RPJ6T.mjs +0 -24
  140. package/dist/lib/browser/chunk-YCKJNTKG.mjs.map +0 -7
  141. package/dist/lib/browser/chunk-Z23S33X6.mjs.map +0 -7
  142. package/dist/lib/browser/intent-resolver-P5BVUQKU.mjs.map +0 -7
  143. package/dist/lib/browser/react-root-EP4UF3KA.mjs.map +0 -7
  144. package/dist/lib/browser/react-surface-5B3RLJCD.mjs.map +0 -7
  145. package/dist/lib/browser/settings-X3P2HKQJ.mjs.map +0 -7
  146. package/dist/lib/browser/state-2MOTLKVR.mjs.map +0 -7
  147. package/dist/lib/browser/tools-64LXGLYR.mjs +0 -59
  148. package/dist/lib/browser/tools-64LXGLYR.mjs.map +0 -7
  149. package/dist/lib/browser/url-handler-MVHTKUYA.mjs.map +0 -7
  150. package/dist/types/src/components/DeckLayout/ComplementarySidebar.d.ts.map +0 -1
  151. package/dist/types/src/components/DeckLayout/NodePlankHeading.d.ts +0 -15
  152. package/dist/types/src/components/DeckLayout/NodePlankHeading.d.ts.map +0 -1
  153. package/dist/types/src/components/DeckLayout/Plank.d.ts +0 -13
  154. package/dist/types/src/components/DeckLayout/Plank.d.ts.map +0 -1
  155. package/dist/types/src/components/DeckLayout/PlankControls.d.ts.map +0 -1
  156. package/dist/types/src/components/DeckLayout/PlankError.d.ts.map +0 -1
  157. package/dist/types/src/components/DeckLayout/PlankLoading.d.ts.map +0 -1
  158. package/dist/types/src/components/DeckLayout/Sidebar.d.ts.map +0 -1
  159. package/dist/types/src/components/DeckLayout/SidebarButton.d.ts.map +0 -1
  160. package/dist/types/src/components/LayoutSettings.d.ts +0 -6
  161. package/dist/types/src/components/LayoutSettings.d.ts.map +0 -1
  162. package/dist/types/src/hooks/useNode.d.ts +0 -11
  163. package/dist/types/src/hooks/useNode.d.ts.map +0 -1
  164. package/src/components/DeckLayout/NodePlankHeading.tsx +0 -148
  165. package/src/components/DeckLayout/Plank.tsx +0 -149
  166. package/src/hooks/useNode.ts +0 -46
  167. /package/dist/lib/browser/{app-graph-builder-IYHAGFA3.mjs.map → app-graph-builder-VYZ4IWI3.mjs.map} +0 -0
  168. /package/dist/lib/browser/{check-app-scheme-S3EYUPMF.mjs.map → check-app-scheme-SEYECDHI.mjs.map} +0 -0
  169. /package/dist/lib/browser/{chunk-IZ5RPJ6T.mjs.map → chunk-B4LOJUWW.mjs.map} +0 -0
  170. /package/dist/types/src/components/{DeckLayout → Plank}/PlankLoading.d.ts +0 -0
  171. /package/dist/types/src/components/{DeckLayout → Sidebar}/ComplementarySidebar.d.ts +0 -0
  172. /package/dist/types/src/components/{DeckLayout → Sidebar}/Sidebar.d.ts +0 -0
  173. /package/dist/types/src/components/{DeckLayout → Sidebar}/SidebarButton.d.ts +0 -0
  174. /package/src/components/{DeckLayout → Plank}/PlankLoading.tsx +0 -0
  175. /package/src/components/{DeckLayout → Sidebar}/Sidebar.tsx +0 -0
  176. /package/src/components/{DeckLayout → Sidebar}/SidebarButton.tsx +0 -0
@@ -0,0 +1,7 @@
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 { create } from '@dxos/live-object';\nimport { LocalStorageStore } from '@dxos/local-storage';\nimport { type SidebarState } from '@dxos/react-ui';\n\nimport { DeckCapabilities } from './capabilities';\nimport { DECK_PLUGIN } from '../meta';\nimport { getMode, type DeckState, type DeckPluginState, defaultDeck } from '../types';\n\nconst boolean = /true|false/;\n\n// TODO(thure, 18 Feb 2025): Remove after the next release.\n\nconst migrateSidebarStateDefaults = {\n [`${DECK_PLUGIN}/complementary-sidebar-state`]: 'expanded',\n [`${DECK_PLUGIN}/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\nexport default () => {\n migrateSidebarState();\n\n const state = new LocalStorageStore<DeckPluginState>(DECK_PLUGIN, {\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 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 = create<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"],
5
+ "mappings": ";;;;;;;;;;;;AAIA,SAASA,cAAcC,mBAAmB;AAC1C,SAASC,iBAAiB;AAC1B,SAASC,cAAc;AACvB,SAASC,yBAAyB;;AAOlC,IAAMC,UAAU;AAIhB,IAAMC,8BAA8B;EAClC,CAAC,GAAGC,WAAAA,8BAAyC,GAAG;EAChD,CAAC,GAAGA,WAAAA,gBAA2B,GAAG;AACpC;AAEA,IAAMC,sBAAsB,MAAA;AAC1BC,SAAOC,QAAQJ,2BAAAA,EAA6BK,QAAQ,CAAC,CAACC,KAAKC,YAAAA,MAAa;AACtE,QAAIR,QAAQS,KAAKC,aAAaC,QAAQJ,GAAAA,KAAQ,OAAA,GAAU;AACtDG,mBAAaE,QAAQL,KAAKC,YAAAA;IAC5B;EACF,CAAA;AACF;AAEA,IAAA,gBAAe,MAAA;AACbL,sBAAAA;AAEA,QAAMU,QAAQ,IAAIC,kBAAmCZ,aAAa;IAChEa,cAAc;IACdC,2BAA2B;IAC3BC,2BAA2BC;IAC3BC,eAAe;IACfC,YAAY;IACZC,kBAAkBH;IAClBI,YAAYJ;IACZK,gBAAgB;IAChBC,iBAAiBN;IACjBO,aAAa;IACbC,QAAQ,CAAA;IACRC,eAAeT;IACfU,YAAY;IACZC,cAAc;IACdC,OAAO;MACLC,SAAS;QAAE,GAAGC;MAAY;IAC5B;IACA,IAAIC,OAAO;AACT,YAAMA,OAAO,KAAKH,MAAM,KAAKF,UAAU;AACvCM,gBAAUD,MAAM,mBAAmB,KAAKL,UAAU,IAAE;;;;;;;;;AACpD,aAAOK;IACT;IACAE,cAAc,CAAC;IACfC,gBAAgBlB;EAClB,CAAA;AAEAL,QACGwB,KAAK;IAAE9B,KAAK;IAAgB+B,MAAMxB,kBAAkByB,KAAI;EAAiB,CAAA,EACzEF,KAAK;IAAE9B,KAAK;IAA6B+B,MAAMxB,kBAAkByB,KAAI;EAAiB,CAAA,EACtFF,KAAK;IAAE9B,KAAK;IAA6B+B,MAAMxB,kBAAkB0B,OAAO;MAAEC,gBAAgB;IAAK,CAAA;EAAG,CAAA,EAClGJ,KAAK;IAAE9B,KAAK;IAAS+B,MAAMxB,kBAAkB4B,KAAI;EAA8B,CAAA,EAC/EL,KAAK;IAAE9B,KAAK;IAAc+B,MAAMxB,kBAAkB0B,OAAM;EAAG,CAAA,EAC3DH,KAAK;IAAE9B,KAAK;IAAgB+B,MAAMxB,kBAAkB0B,OAAM;EAAG,CAAA;AAEhE,QAAMG,SAASC,OAA4B;IACzC,IAAIC,OAAO;AACT,aAAOC,QAAQjC,MAAMkC,OAAOd,IAAI;IAClC;IACA,IAAIb,aAAa;AACf,aAAOP,MAAMkC,OAAO3B;IACtB;IACA,IAAI4B,cAAc;AAChB,aAAOnC,MAAMkC,OAAOhC,iBAAiB;IACvC;IACA,IAAIkC,2BAA2B;AAC7B,aAAOpC,MAAMkC,OAAO/B,8BAA8B;IACpD;IACA,IAAIkC,YAAY;AACd,aAAOrC,MAAMkC,OAAOnB;IACtB;IACA,IAAIuB,SAAS;AACX,aAAOtC,MAAMkC,OAAOd,KAAKmB,OAAO;QAACvC,MAAMkC,OAAOd,KAAKmB;UAAQvC,MAAMkC,OAAOd,KAAKkB;IAC/E;IACA,IAAIE,WAAW;AACb,aAAOxC,MAAMkC,OAAOd,KAAKoB;IAC3B;IACA,IAAIjB,iBAAiB;AACnB,aAAOvB,MAAMkC,OAAOX;IACtB;EACF,CAAA;AAEA,SAAO;IACLkB,YAAYC,iBAAiBC,WAAW3C,MAAMkC,QAAQ,MAAMlC,MAAM4C,MAAK,CAAA;IACvEH,YAAYI,aAAaC,QAAQhB,MAAAA;;AAErC;",
6
+ "names": ["Capabilities", "contributes", "invariant", "create", "LocalStorageStore", "boolean", "migrateSidebarStateDefaults", "DECK_PLUGIN", "migrateSidebarState", "Object", "entries", "forEach", "key", "defaultValue", "test", "localStorage", "getItem", "setItem", "state", "LocalStorageStore", "sidebarState", "complementarySidebarState", "complementarySidebarPanel", "undefined", "dialogContent", "dialogOpen", "dialogBlockAlign", "dialogType", "popoverContent", "popoverAnchorId", "popoverOpen", "toasts", "currentUndoId", "activeDeck", "previousDeck", "decks", "default", "defaultDeck", "deck", "invariant", "previousMode", "scrollIntoView", "prop", "type", "enum", "string", "allowUndefined", "json", "layout", "create", "mode", "getMode", "values", "sidebarOpen", "complementarySidebarOpen", "workspace", "active", "solo", "inactive", "contributes", "DeckCapabilities", "DeckState", "close", "Capabilities", "Layout"]
7
+ }
@@ -0,0 +1,78 @@
1
+ import {
2
+ DeckAction
3
+ } from "./chunk-RJNCG4ND.mjs";
4
+ import {
5
+ meta
6
+ } from "./chunk-NSATFAEE.mjs";
7
+
8
+ // packages/plugins/plugin-deck/src/capabilities/tools.ts
9
+ import { contributes, createIntent, Capabilities, LayoutAction } from "@dxos/app-framework";
10
+ import { defineTool, ToolResult } from "@dxos/artifact";
11
+ import { S } from "@dxos/echo-schema";
12
+ import { invariant } from "@dxos/invariant";
13
+ var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-deck/src/capabilities/tools.ts";
14
+ var tools_default = () => contributes(Capabilities.Tools, [
15
+ defineTool(meta.id, {
16
+ name: "show",
17
+ description: `
18
+ Show an item as a companion to an existing plank. This will make the item appear alongside the primary content.
19
+ When supplying IDs, they must be fully qualified like space:object.
20
+ `,
21
+ caption: "Showing item...",
22
+ // TODO(wittjosiah): Refactor Layout/Navigation/Deck actions so that they can be used directly.
23
+ schema: S.Struct({
24
+ id: S.String.annotations({
25
+ description: "The ID of the item to show."
26
+ })
27
+ }),
28
+ execute: async ({ id }, { extensions }) => {
29
+ invariant(extensions?.pivotId, "No pivot ID", {
30
+ F: __dxlog_file,
31
+ L: 44,
32
+ S: void 0,
33
+ A: [
34
+ "extensions?.pivotId",
35
+ "'No pivot ID'"
36
+ ]
37
+ });
38
+ invariant(extensions?.dispatch, "No intent dispatcher", {
39
+ F: __dxlog_file,
40
+ L: 45,
41
+ S: void 0,
42
+ A: [
43
+ "extensions?.dispatch",
44
+ "'No intent dispatcher'"
45
+ ]
46
+ });
47
+ if (extensions.part === "deck") {
48
+ const { data, error } = await extensions.dispatch(createIntent(DeckAction.ChangeCompanion, {
49
+ primary: extensions.pivotId,
50
+ companion: id
51
+ }));
52
+ if (error) {
53
+ return ToolResult.Error(error.message);
54
+ }
55
+ return ToolResult.Success(data);
56
+ } else {
57
+ const { data, error } = await extensions.dispatch(createIntent(LayoutAction.Open, {
58
+ subject: [
59
+ id
60
+ ],
61
+ part: "main",
62
+ options: {
63
+ pivotId: extensions.pivotId,
64
+ positioning: "end"
65
+ }
66
+ }));
67
+ if (error) {
68
+ return ToolResult.Error(error.message);
69
+ }
70
+ return ToolResult.Success(data);
71
+ }
72
+ }
73
+ })
74
+ ]);
75
+ export {
76
+ tools_default as default
77
+ };
78
+ //# sourceMappingURL=tools-SC6QEN7R.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/tools.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport {\n contributes,\n createIntent,\n Capabilities,\n LayoutAction,\n type PromiseIntentDispatcher,\n} from '@dxos/app-framework';\nimport { defineTool, ToolResult } from '@dxos/artifact';\nimport { S } from '@dxos/echo-schema';\nimport { invariant } from '@dxos/invariant';\n\nimport { meta } from '../meta';\nimport { DeckAction } from '../types';\n\n// TODO(burdon): Factor out.\ndeclare global {\n interface ToolContextExtensions {\n dispatch?: PromiseIntentDispatcher;\n pivotId?: string;\n part?: 'deck' | 'dialog';\n }\n}\n\nexport default () =>\n contributes(Capabilities.Tools, [\n defineTool(meta.id, {\n name: 'show',\n description: `\n Show an item as a companion to an existing plank. This will make the item appear alongside the primary content.\n When supplying IDs, they must be fully qualified like space:object.\n `,\n caption: 'Showing item...',\n // TODO(wittjosiah): Refactor Layout/Navigation/Deck actions so that they can be used directly.\n schema: S.Struct({\n id: S.String.annotations({\n description: 'The ID of the item to show.',\n }),\n }),\n execute: async ({ id }, { extensions }) => {\n invariant(extensions?.pivotId, 'No pivot ID');\n invariant(extensions?.dispatch, 'No intent dispatcher');\n\n if (extensions.part === 'deck') {\n const { data, error } = await extensions.dispatch(\n createIntent(DeckAction.ChangeCompanion, {\n primary: extensions.pivotId,\n companion: id,\n }),\n );\n if (error) {\n return ToolResult.Error(error.message);\n }\n\n return ToolResult.Success(data);\n } else {\n const { data, error } = await extensions.dispatch(\n createIntent(LayoutAction.Open, {\n subject: [id],\n part: 'main',\n options: {\n pivotId: extensions.pivotId,\n positioning: 'end',\n },\n }),\n );\n if (error) {\n return ToolResult.Error(error.message);\n }\n\n return ToolResult.Success(data);\n }\n },\n }),\n ]);\n"],
5
+ "mappings": ";;;;;;;;AAIA,SACEA,aACAC,cACAC,cACAC,oBAEK;AACP,SAASC,YAAYC,kBAAkB;AACvC,SAASC,SAAS;AAClB,SAASC,iBAAiB;;AAc1B,IAAA,gBAAe,MACbC,YAAYC,aAAaC,OAAO;EAC9BC,WAAWC,KAAKC,IAAI;IAClBC,MAAM;IACNC,aAAa;;;;IAIbC,SAAS;;IAETC,QAAQC,EAAEC,OAAO;MACfN,IAAIK,EAAEE,OAAOC,YAAY;QACvBN,aAAa;MACf,CAAA;IACF,CAAA;IACAO,SAAS,OAAO,EAAET,GAAE,GAAI,EAAEU,WAAU,MAAE;AACpCC,gBAAUD,YAAYE,SAAS,eAAA;;;;;;;;;AAC/BD,gBAAUD,YAAYG,UAAU,wBAAA;;;;;;;;;AAEhC,UAAIH,WAAWI,SAAS,QAAQ;AAC9B,cAAM,EAAEC,MAAMC,MAAK,IAAK,MAAMN,WAAWG,SACvCI,aAAaC,WAAWC,iBAAiB;UACvCC,SAASV,WAAWE;UACpBS,WAAWrB;QACb,CAAA,CAAA;AAEF,YAAIgB,OAAO;AACT,iBAAOM,WAAWC,MAAMP,MAAMQ,OAAO;QACvC;AAEA,eAAOF,WAAWG,QAAQV,IAAAA;MAC5B,OAAO;AACL,cAAM,EAAEA,MAAMC,MAAK,IAAK,MAAMN,WAAWG,SACvCI,aAAaS,aAAaC,MAAM;UAC9BC,SAAS;YAAC5B;;UACVc,MAAM;UACNe,SAAS;YACPjB,SAASF,WAAWE;YACpBkB,aAAa;UACf;QACF,CAAA,CAAA;AAEF,YAAId,OAAO;AACT,iBAAOM,WAAWC,MAAMP,MAAMQ,OAAO;QACvC;AAEA,eAAOF,WAAWG,QAAQV,IAAAA;MAC5B;IACF;EACF,CAAA;CACD;",
6
+ "names": ["contributes", "createIntent", "Capabilities", "LayoutAction", "defineTool", "ToolResult", "S", "invariant", "contributes", "Capabilities", "Tools", "defineTool", "meta", "id", "name", "description", "caption", "schema", "S", "Struct", "String", "annotations", "execute", "extensions", "invariant", "pivotId", "dispatch", "part", "data", "error", "createIntent", "DeckAction", "ChangeCompanion", "primary", "companion", "ToolResult", "Error", "message", "Success", "LayoutAction", "Open", "subject", "options", "positioning"]
7
+ }
@@ -1,27 +1,33 @@
1
1
  import {
2
+ ATTENDABLE_PATH_SEPARATOR,
2
3
  DECK_ACTION,
3
- Deck,
4
+ DECK_COMPANION_TYPE,
4
5
  DeckAction,
6
+ DeckPluginState,
5
7
  DeckSettingsSchema,
6
8
  DeckState,
7
9
  NewPlankPositions,
8
10
  OverscrollOptions,
11
+ PLANK_COMPANION_TYPE,
9
12
  PlankSizing,
10
- SLUG_PATH_SEPARATOR,
13
+ defaultDeck,
11
14
  getMode,
12
15
  isLayoutMode
13
- } from "./chunk-FYKBOM3C.mjs";
14
- import "./chunk-N7TEPFVR.mjs";
16
+ } from "./chunk-RJNCG4ND.mjs";
17
+ import "./chunk-NSATFAEE.mjs";
15
18
  export {
19
+ ATTENDABLE_PATH_SEPARATOR,
16
20
  DECK_ACTION,
17
- Deck,
21
+ DECK_COMPANION_TYPE,
18
22
  DeckAction,
23
+ DeckPluginState,
19
24
  DeckSettingsSchema,
20
25
  DeckState,
21
26
  NewPlankPositions,
22
27
  OverscrollOptions,
28
+ PLANK_COMPANION_TYPE,
23
29
  PlankSizing,
24
- SLUG_PATH_SEPARATOR,
30
+ defaultDeck,
25
31
  getMode,
26
32
  isLayoutMode
27
33
  };
@@ -1,7 +1,10 @@
1
1
  import {
2
2
  DeckCapabilities
3
- } from "./chunk-22AQ5IVX.mjs";
4
- import "./chunk-N7TEPFVR.mjs";
3
+ } from "./chunk-XMCG42ID.mjs";
4
+ import {
5
+ defaultDeck
6
+ } from "./chunk-RJNCG4ND.mjs";
7
+ import "./chunk-NSATFAEE.mjs";
5
8
 
6
9
  // packages/plugins/plugin-deck/src/capabilities/url-handler.ts
7
10
  import { Capabilities, contributes, createIntent, LayoutAction } from "@dxos/app-framework";
@@ -15,12 +18,7 @@ var url_handler_default = async (context) => {
15
18
  state.activeDeck = "default";
16
19
  state.decks = {
17
20
  default: {
18
- initialized: false,
19
- active: [],
20
- inactive: [],
21
- fullscreen: false,
22
- solo: void 0,
23
- plankSizing: {}
21
+ ...defaultDeck
24
22
  }
25
23
  };
26
24
  window.location.pathname = "/";
@@ -69,4 +67,4 @@ var url_handler_default = async (context) => {
69
67
  export {
70
68
  url_handler_default as default
71
69
  };
72
- //# sourceMappingURL=url-handler-MVHTKUYA.mjs.map
70
+ //# sourceMappingURL=url-handler-ODG4B6NX.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/url-handler.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes, createIntent, LayoutAction, type PluginsContext } from '@dxos/app-framework';\nimport { scheduledEffect } from '@dxos/echo-signals/core';\n\nimport { DeckCapabilities } from './capabilities';\nimport { defaultDeck } from '../types';\n\n// TODO(wittjosiah): Cleanup the url handling. May justify introducing routing capabilities.\nexport default async (context: PluginsContext) => {\n const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher) ?? {};\n const state = context.requestCapability(DeckCapabilities.MutableDeckState);\n\n const handleNavigation = async () => {\n const pathname = window.location.pathname;\n if (pathname === '/reset') {\n state.activeDeck = 'default';\n state.decks = {\n default: { ...defaultDeck },\n };\n window.location.pathname = '/';\n return;\n }\n\n const [_, nextDeck, nextSolo] = pathname.split('/');\n if (nextDeck && nextDeck !== state.activeDeck) {\n await dispatch(createIntent(LayoutAction.SwitchWorkspace, { part: 'workspace', subject: nextDeck }));\n }\n\n if (nextSolo && nextSolo !== state.deck.solo) {\n await dispatch(\n createIntent(LayoutAction.SetLayoutMode, { part: 'mode', subject: nextSolo, options: { mode: 'solo' } }),\n );\n } else if (!nextSolo && state.deck.solo) {\n await dispatch(createIntent(LayoutAction.SetLayoutMode, { part: 'mode', options: { mode: 'deck' } }));\n }\n };\n\n await handleNavigation();\n window.addEventListener('popstate', handleNavigation);\n\n const unsubscribe = scheduledEffect(\n () => ({ solo: state.deck.solo, activeDeck: state.activeDeck }),\n ({ solo, activeDeck }) => {\n const path = solo ? `/${activeDeck}/${solo}` : `/${activeDeck}`;\n if (window.location.pathname !== path) {\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, '', `${path}${window.location.search}`);\n }\n },\n );\n\n return contributes(Capabilities.Null, null, () => {\n window.removeEventListener('popstate', handleNavigation);\n unsubscribe();\n });\n};\n"],
5
+ "mappings": ";;;;;;;;;AAIA,SAASA,cAAcC,aAAaC,cAAcC,oBAAyC;AAC3F,SAASC,uBAAuB;AAMhC,IAAA,sBAAe,OAAOC,YAAAA;AACpB,QAAM,EAAEC,iBAAiBC,SAAQ,IAAKF,QAAQG,kBAAkBC,aAAaC,gBAAgB,KAAK,CAAC;AACnG,QAAMC,QAAQN,QAAQG,kBAAkBI,iBAAiBC,gBAAgB;AAEzE,QAAMC,mBAAmB,YAAA;AACvB,UAAMC,WAAWC,OAAOC,SAASF;AACjC,QAAIA,aAAa,UAAU;AACzBJ,YAAMO,aAAa;AACnBP,YAAMQ,QAAQ;QACZC,SAAS;UAAE,GAAGC;QAAY;MAC5B;AACAL,aAAOC,SAASF,WAAW;AAC3B;IACF;AAEA,UAAM,CAACO,GAAGC,UAAUC,QAAAA,IAAYT,SAASU,MAAM,GAAA;AAC/C,QAAIF,YAAYA,aAAaZ,MAAMO,YAAY;AAC7C,YAAMX,SAASmB,aAAaC,aAAaC,iBAAiB;QAAEC,MAAM;QAAaC,SAASP;MAAS,CAAA,CAAA;IACnG;AAEA,QAAIC,YAAYA,aAAab,MAAMoB,KAAKC,MAAM;AAC5C,YAAMzB,SACJmB,aAAaC,aAAaM,eAAe;QAAEJ,MAAM;QAAQC,SAASN;QAAUU,SAAS;UAAEC,MAAM;QAAO;MAAE,CAAA,CAAA;IAE1G,WAAW,CAACX,YAAYb,MAAMoB,KAAKC,MAAM;AACvC,YAAMzB,SAASmB,aAAaC,aAAaM,eAAe;QAAEJ,MAAM;QAAQK,SAAS;UAAEC,MAAM;QAAO;MAAE,CAAA,CAAA;IACpG;EACF;AAEA,QAAMrB,iBAAAA;AACNE,SAAOoB,iBAAiB,YAAYtB,gBAAAA;AAEpC,QAAMuB,cAAcC,gBAClB,OAAO;IAAEN,MAAMrB,MAAMoB,KAAKC;IAAMd,YAAYP,MAAMO;EAAW,IAC7D,CAAC,EAAEc,MAAMd,WAAU,MAAE;AACnB,UAAMqB,OAAOP,OAAO,IAAId,UAAAA,IAAcc,IAAAA,KAAS,IAAId,UAAAA;AACnD,QAAIF,OAAOC,SAASF,aAAawB,MAAM;AAErCC,cAAQC,UAAU,MAAM,IAAI,GAAGF,IAAAA,GAAOvB,OAAOC,SAASyB,MAAM,EAAE;IAChE;EACF,CAAA;AAGF,SAAOC,YAAYlC,aAAamC,MAAM,MAAM,MAAA;AAC1C5B,WAAO6B,oBAAoB,YAAY/B,gBAAAA;AACvCuB,gBAAAA;EACF,CAAA;AACF;",
6
+ "names": ["Capabilities", "contributes", "createIntent", "LayoutAction", "scheduledEffect", "context", "dispatchPromise", "dispatch", "requestCapability", "Capabilities", "IntentDispatcher", "state", "DeckCapabilities", "MutableDeckState", "handleNavigation", "pathname", "window", "location", "activeDeck", "decks", "default", "defaultDeck", "_", "nextDeck", "nextSolo", "split", "createIntent", "LayoutAction", "SwitchWorkspace", "part", "subject", "deck", "solo", "SetLayoutMode", "options", "mode", "addEventListener", "unsubscribe", "scheduledEffect", "path", "history", "pushState", "search", "contributes", "Null", "removeEventListener"]
7
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"DeckPlugin.d.ts","sourceRoot":"","sources":["../../../src/DeckPlugin.ts"],"names":[],"mappings":"AA6BA,eAAO,MAAM,UAAU,4CAyDnB,CAAC"}
1
+ {"version":3,"file":"DeckPlugin.d.ts","sourceRoot":"","sources":["../../../src/DeckPlugin.ts"],"names":[],"mappings":"AA6BA,eAAO,MAAM,UAAU,4CAwDnB,CAAC"}
@@ -1,16 +1,21 @@
1
1
  import { type DeepReadonly } from '@dxos/util';
2
- import { type Panel } from '../types';
3
2
  export declare namespace DeckCapabilities {
4
3
  const DeckState: import("@dxos/app-framework").InterfaceDef<DeepReadonly<{
5
4
  deck: {
6
5
  solo?: string | undefined;
7
- fullscreen: boolean;
8
6
  initialized: boolean;
9
7
  active: string[];
8
+ activeCompanions?: {
9
+ [x: string]: string;
10
+ } | undefined;
10
11
  inactive: string[];
12
+ fullscreen: boolean;
11
13
  plankSizing: {
12
14
  [x: string]: number;
13
15
  };
16
+ companionFrameSizing: {
17
+ [x: string]: number;
18
+ };
14
19
  };
15
20
  sidebarState: "closed" | "collapsed" | "expanded";
16
21
  complementarySidebarState: "closed" | "collapsed" | "expanded";
@@ -24,12 +29,12 @@ export declare namespace DeckCapabilities {
24
29
  popoverContent?: any;
25
30
  popoverAnchorId?: string | undefined;
26
31
  toasts: {
27
- readonly description?: string | [string, {
32
+ readonly id: string;
33
+ readonly title?: string | [string, {
28
34
  ns: string;
29
35
  count?: number | undefined;
30
36
  }] | undefined;
31
- readonly id: string;
32
- readonly title?: string | [string, {
37
+ readonly description?: string | [string, {
33
38
  ns: string;
34
39
  count?: number | undefined;
35
40
  }] | undefined;
@@ -55,30 +60,42 @@ export declare namespace DeckCapabilities {
55
60
  decks: {
56
61
  [x: string]: {
57
62
  solo?: string | undefined;
58
- fullscreen: boolean;
59
63
  initialized: boolean;
60
64
  active: string[];
65
+ activeCompanions?: {
66
+ [x: string]: string;
67
+ } | undefined;
61
68
  inactive: string[];
69
+ fullscreen: boolean;
62
70
  plankSizing: {
63
71
  [x: string]: number;
64
72
  };
73
+ companionFrameSizing: {
74
+ [x: string]: number;
75
+ };
65
76
  };
66
77
  };
67
78
  previousMode: {
68
- [x: string]: "deck" | "solo" | "fullscreen";
79
+ [x: string]: "solo" | "deck" | "fullscreen";
69
80
  };
70
81
  scrollIntoView?: string | undefined;
71
82
  }>>;
72
83
  const MutableDeckState: import("@dxos/app-framework").InterfaceDef<{
73
84
  deck: {
74
85
  solo?: string | undefined;
75
- fullscreen: boolean;
76
86
  initialized: boolean;
77
87
  active: string[];
88
+ activeCompanions?: {
89
+ [x: string]: string;
90
+ } | undefined;
78
91
  inactive: string[];
92
+ fullscreen: boolean;
79
93
  plankSizing: {
80
94
  [x: string]: number;
81
95
  };
96
+ companionFrameSizing: {
97
+ [x: string]: number;
98
+ };
82
99
  };
83
100
  sidebarState: "closed" | "collapsed" | "expanded";
84
101
  complementarySidebarState: "closed" | "collapsed" | "expanded";
@@ -92,12 +109,12 @@ export declare namespace DeckCapabilities {
92
109
  popoverContent?: any;
93
110
  popoverAnchorId?: string | undefined;
94
111
  toasts: {
95
- readonly description?: string | [string, {
112
+ readonly id: string;
113
+ readonly title?: string | [string, {
96
114
  ns: string;
97
115
  count?: number | undefined;
98
116
  }] | undefined;
99
- readonly id: string;
100
- readonly title?: string | [string, {
117
+ readonly description?: string | [string, {
101
118
  ns: string;
102
119
  count?: number | undefined;
103
120
  }] | undefined;
@@ -123,20 +140,25 @@ export declare namespace DeckCapabilities {
123
140
  decks: {
124
141
  [x: string]: {
125
142
  solo?: string | undefined;
126
- fullscreen: boolean;
127
143
  initialized: boolean;
128
144
  active: string[];
145
+ activeCompanions?: {
146
+ [x: string]: string;
147
+ } | undefined;
129
148
  inactive: string[];
149
+ fullscreen: boolean;
130
150
  plankSizing: {
131
151
  [x: string]: number;
132
152
  };
153
+ companionFrameSizing: {
154
+ [x: string]: number;
155
+ };
133
156
  };
134
157
  };
135
158
  previousMode: {
136
- [x: string]: "deck" | "solo" | "fullscreen";
159
+ [x: string]: "solo" | "deck" | "fullscreen";
137
160
  };
138
161
  scrollIntoView?: string | undefined;
139
162
  }>;
140
- const ComplementaryPanel: import("@dxos/app-framework").InterfaceDef<Panel>;
141
163
  }
142
164
  //# sourceMappingURL=capabilities.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/capabilities.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAG/C,OAAO,EAAkB,KAAK,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtD,yBAAiB,gBAAgB,CAAC;IACzB,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAA+E,CAAC;IAC/F,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAiE,CAAC;IACxF,MAAM,kBAAkB,mDAA2E,CAAC;CAC5G"}
1
+ {"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/capabilities.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAK/C,yBAAiB,gBAAgB,CAAC;IACzB,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAqF,CAAC;IACrG,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAuE,CAAC;CACtG"}
@@ -1 +1 @@
1
- {"version":3,"file":"intent-resolver.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/intent-resolver.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,YAAY,EAKZ,KAAK,cAAc,EAGpB,MAAM,qBAAqB,CAAC;kCAcJ,cAAc;AAAvC,wBAiVK"}
1
+ {"version":3,"file":"intent-resolver.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/intent-resolver.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,YAAY,EAKZ,KAAK,cAAc,EAGpB,MAAM,qBAAqB,CAAC;kCAwBJ,cAAc;AAAvC,wBA6XK"}
@@ -1 +1 @@
1
- {"version":3,"file":"react-root.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-root.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAsB,MAAM,OAAO,CAAC;;;;;AAS3C,wBAgCK"}
1
+ {"version":3,"file":"react-root.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-root.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAsB,MAAM,OAAO,CAAC;;;;;AAQ3C,wBAyBK"}
@@ -1 +1 @@
1
- {"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAA8B,MAAM,qBAAqB,CAAC;;AAQ/E,wBAgBK"}
1
+ {"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAA8B,MAAM,qBAAqB,CAAC;;AAO/E,wBAgBK"}
@@ -1 +1 @@
1
- {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/settings.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAe,MAAM,qBAAqB,CAAC;;AAMhE,wBAUE"}
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/settings.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAe,MAAM,qBAAqB,CAAC;;AAMhE,wBAeE"}
@@ -1,13 +1,19 @@
1
1
  declare const _default: () => (import("@dxos/app-framework").Capability<import("@dxos/util").DeepReadonly<{
2
2
  deck: {
3
3
  solo?: string | undefined;
4
- fullscreen: boolean;
5
4
  initialized: boolean;
6
5
  active: string[];
6
+ activeCompanions?: {
7
+ [x: string]: string;
8
+ } | undefined;
7
9
  inactive: string[];
10
+ fullscreen: boolean;
8
11
  plankSizing: {
9
12
  [x: string]: number;
10
13
  };
14
+ companionFrameSizing: {
15
+ [x: string]: number;
16
+ };
11
17
  };
12
18
  sidebarState: "closed" | "collapsed" | "expanded";
13
19
  complementarySidebarState: "closed" | "collapsed" | "expanded";
@@ -21,12 +27,12 @@ declare const _default: () => (import("@dxos/app-framework").Capability<import("
21
27
  popoverContent?: any;
22
28
  popoverAnchorId?: string | undefined;
23
29
  toasts: {
24
- readonly description?: string | [string, {
30
+ readonly id: string;
31
+ readonly title?: string | [string, {
25
32
  ns: string;
26
33
  count?: number | undefined;
27
34
  }] | undefined;
28
- readonly id: string;
29
- readonly title?: string | [string, {
35
+ readonly description?: string | [string, {
30
36
  ns: string;
31
37
  count?: number | undefined;
32
38
  }] | undefined;
@@ -52,17 +58,23 @@ declare const _default: () => (import("@dxos/app-framework").Capability<import("
52
58
  decks: {
53
59
  [x: string]: {
54
60
  solo?: string | undefined;
55
- fullscreen: boolean;
56
61
  initialized: boolean;
57
62
  active: string[];
63
+ activeCompanions?: {
64
+ [x: string]: string;
65
+ } | undefined;
58
66
  inactive: string[];
67
+ fullscreen: boolean;
59
68
  plankSizing: {
60
69
  [x: string]: number;
61
70
  };
71
+ companionFrameSizing: {
72
+ [x: string]: number;
73
+ };
62
74
  };
63
75
  };
64
76
  previousMode: {
65
- [x: string]: "deck" | "solo" | "fullscreen";
77
+ [x: string]: "solo" | "deck" | "fullscreen";
66
78
  };
67
79
  scrollIntoView?: string | undefined;
68
80
  }>> | import("@dxos/app-framework").Capability<import("@dxos/live-object").ReactiveObject<Readonly<{
@@ -1 +1 @@
1
- {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/state.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,wBA4EE"}
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/state.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,wBAqEE"}
@@ -3,6 +3,7 @@ declare global {
3
3
  interface ToolContextExtensions {
4
4
  dispatch?: PromiseIntentDispatcher;
5
5
  pivotId?: string;
6
+ part?: 'deck' | 'dialog';
6
7
  }
7
8
  }
8
9
  declare const _default: () => import("@dxos/app-framework").Capability<import("@dxos/artifact").Tool[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/tools.ts"],"names":[],"mappings":"AAIA,OAAO,EAKL,KAAK,uBAAuB,EAC7B,MAAM,qBAAqB,CAAC;AAQ7B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,QAAQ,CAAC,EAAE,uBAAuB,CAAC;QACnC,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB;CACF;;AAED,wBAwCK"}
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/tools.ts"],"names":[],"mappings":"AAIA,OAAO,EAKL,KAAK,uBAAuB,EAC7B,MAAM,qBAAqB,CAAC;AAS7B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,QAAQ,CAAC,EAAE,uBAAuB,CAAC;QACnC,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;KAC1B;CACF;;AAED,wBAkDK"}
@@ -1 +1 @@
1
- {"version":3,"file":"url-handler.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/url-handler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAyD,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;kCAMlF,cAAc;AAA7C,wBAsDE"}
1
+ {"version":3,"file":"url-handler.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/url-handler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAyD,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;kCAOlF,cAAc;AAA7C,wBA+CE"}
@@ -1 +1 @@
1
- {"version":3,"file":"ActiveNode.d.ts","sourceRoot":"","sources":["../../../../../src/components/DeckLayout/ActiveNode.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,eAAO,MAAM,UAAU,yBAatB,CAAC"}
1
+ {"version":3,"file":"ActiveNode.d.ts","sourceRoot":"","sources":["../../../../../src/components/DeckLayout/ActiveNode.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,eAAO,MAAM,UAAU,yBAatB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../../../src/components/DeckLayout/Banner.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAKtD,eAAO,MAAM,MAAM,4BAA6B,eAAe,CAAC;IAAE,OAAO,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;CAAE,CAAC,sBAwBlG,CAAC"}
1
+ {"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../../../src/components/DeckLayout/Banner.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAkB,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAMtE,eAAO,MAAM,MAAM,4BAA6B,eAAe,CAAC;IAAE,OAAO,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;CAAE,CAAC,sBAyBlG,CAAC"}
@@ -1,9 +1,6 @@
1
1
  import React from 'react';
2
- import { type Overscroll } from '../../types';
3
2
  export type DeckLayoutProps = {
4
- overscroll: Overscroll;
5
- showHints: boolean;
6
3
  onDismissToast: (id: string) => void;
7
4
  };
8
- export declare const DeckLayout: ({ overscroll, showHints, onDismissToast }: DeckLayoutProps) => React.JSX.Element;
5
+ export declare const DeckLayout: ({ onDismissToast }: DeckLayoutProps) => React.JSX.Element;
9
6
  //# sourceMappingURL=DeckLayout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DeckLayout.d.ts","sourceRoot":"","sources":["../../../../../src/components/DeckLayout/DeckLayout.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAoF,MAAM,OAAO,CAAC;AAmCzG,OAAO,EAAW,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAIvD,MAAM,MAAM,eAAe,GAAG;IAC5B,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,EAAE,OAAO,CAAC;IACnB,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC,CAAC;AAKF,eAAO,MAAM,UAAU,8CAA+C,eAAe,sBAsRpF,CAAC"}
1
+ {"version":3,"file":"DeckLayout.d.ts","sourceRoot":"","sources":["../../../../../src/components/DeckLayout/DeckLayout.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAoF,MAAM,OAAO,CAAC;AAsCzG,MAAM,MAAM,eAAe,GAAG;IAC5B,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC,CAAC;AAKF,eAAO,MAAM,UAAU,uBAAwB,eAAe,sBA2T7D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../../../src/components/DeckLayout/Toast.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAML,KAAK,cAAc,EACpB,MAAM,gBAAgB,CAAC;AAKxB,eAAO,MAAM,KAAK,4GAWf,YAAY,CAAC,KAAK,GAAG,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,sBA8B3D,CAAC"}
1
+ {"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../../../src/components/DeckLayout/Toast.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAIL,KAAK,cAAc,EAGpB,MAAM,gBAAgB,CAAC;AAKxB,eAAO,MAAM,KAAK,4GAWf,YAAY,CAAC,KAAK,GAAG,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,sBA8B3D,CAAC"}
@@ -1,3 +1,4 @@
1
1
  export { NAV_ID } from './constants';
2
+ export * from './Banner';
2
3
  export * from './DeckLayout';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/DeckLayout/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/DeckLayout/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { type DeckSettingsProps } from '../../types';
3
+ export declare const DeckSettings: ({ settings }: {
4
+ settings: DeckSettingsProps;
5
+ }) => React.JSX.Element;
6
+ //# sourceMappingURL=DeckSettings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeckSettings.d.ts","sourceRoot":"","sources":["../../../../../src/components/DeckSettings/DeckSettings.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EACL,KAAK,iBAAiB,EAKvB,MAAM,aAAa,CAAC;AAIrB,eAAO,MAAM,YAAY,iBAAkB;IAAE,QAAQ,EAAE,iBAAiB,CAAA;CAAE,sBAmEzE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './DeckSettings';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/DeckSettings/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { type LayoutMode, type Part, type DeckSettingsProps } from '../../types';
3
+ export type PlankProps = {
4
+ id?: string;
5
+ companionId?: string;
6
+ part: Part;
7
+ path?: string[];
8
+ order?: number;
9
+ active?: string[];
10
+ layoutMode: LayoutMode;
11
+ settings?: DeckSettingsProps;
12
+ };
13
+ export declare const Plank: ({ id, ...props }: PlankProps) => React.JSX.Element;
14
+ //# sourceMappingURL=Plank.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Plank.d.ts","sourceRoot":"","sources":["../../../../../src/components/Plank/Plank.tsx"],"names":[],"mappings":"AAIA,OAAO,KASN,MAAM,OAAO,CAAC;AAsBf,OAAO,EAAc,KAAK,UAAU,EAAE,KAAK,IAAI,EAAqB,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAKhH,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;CAC9B,CAAC;AAqJF,eAAO,MAAM,KAAK,qBAAmC,UAAU,sBA+B9D,CAAC"}
@@ -0,0 +1,8 @@
1
+ import '@dxos-theme';
2
+ import { type StoryObj, type Meta } from '@storybook/react';
3
+ import { Plank } from './Plank';
4
+ declare const meta: Meta<typeof Plank>;
5
+ export default meta;
6
+ type Story = StoryObj<typeof meta>;
7
+ export declare const Default: Story;
8
+ //# sourceMappingURL=Plank.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Plank.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Plank/Plank.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAO5D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAIhC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CAc5B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC"}
@@ -1,11 +1,13 @@
1
1
  import React from 'react';
2
2
  import { type ButtonGroupProps } from '@dxos/react-ui';
3
- import { type DeckAction } from '../../types';
3
+ import { DeckAction } from '../../types';
4
4
  export type PlankControlHandler = (event: DeckAction.PartAdjustment) => void;
5
5
  export type PlankCapabilities = {
6
6
  incrementStart?: boolean;
7
7
  incrementEnd?: boolean;
8
+ deck?: boolean;
8
9
  solo?: boolean;
10
+ companion?: boolean;
9
11
  };
10
12
  export type PlankControlsProps = Omit<ButtonGroupProps, 'onClick'> & {
11
13
  onClick?: PlankControlHandler;
@@ -15,5 +17,10 @@ export type PlankControlsProps = Omit<ButtonGroupProps, 'onClick'> & {
15
17
  isSolo?: boolean;
16
18
  pin?: 'start' | 'end' | 'both';
17
19
  };
20
+ type PlankComplimentControlsProps = {
21
+ primary?: string;
22
+ };
23
+ export declare const PlankCompanionControls: React.ForwardRefExoticComponent<PlankComplimentControlsProps & React.RefAttributes<HTMLDivElement>>;
18
24
  export declare const PlankControls: React.ForwardRefExoticComponent<Omit<PlankControlsProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
25
+ export {};
19
26
  //# sourceMappingURL=PlankControls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlankControls.d.ts","sourceRoot":"","sources":["../../../../../src/components/Plank/PlankControls.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAkC,MAAM,OAAO,CAAC;AAIvD,OAAO,EAGL,KAAK,gBAAgB,EAKtB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,MAAM,mBAAmB,GAAG,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,KAAK,IAAI,CAAC;AAE7E,MAAM,MAAM,iBAAiB,GAAG;IAC9B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,GAAG;IACnE,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,OAAO,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC;IACtC,KAAK,CAAC,EAAE,OAAO,GAAG,cAAc,GAAG,YAAY,CAAC;IAChD,YAAY,EAAE,iBAAiB,CAAC;IAChC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;CAChC,CAAC;AAoBF,KAAK,4BAA4B,GAAG;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,sBAAsB,qGAqBlC,CAAC;AAKF,eAAO,MAAM,aAAa,wGAyFzB,CAAC"}
@@ -1,12 +1,12 @@
1
1
  import React from 'react';
2
2
  import { type Node } from '@dxos/plugin-graph';
3
- import { type NodePlankHeadingProps } from './NodePlankHeading';
3
+ import { type PlankHeadingProps } from './PlankHeading';
4
4
  export declare const PlankContentError: ({ error }: {
5
5
  error?: Error;
6
6
  }) => React.JSX.Element;
7
7
  export declare const PlankError: ({ id, part, node, error, }: {
8
8
  id: string;
9
- part: NodePlankHeadingProps["part"];
9
+ part: PlankHeadingProps["part"];
10
10
  node?: Node;
11
11
  error?: Error;
12
12
  }) => React.JSX.Element;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlankError.d.ts","sourceRoot":"","sources":["../../../../../src/components/Plank/PlankError.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAI/C,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAItE,eAAO,MAAM,iBAAiB,cAAe;IAAE,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,sBAiB7D,CAAC;AAEF,eAAO,MAAM,UAAU,+BAKpB;IACD,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAChC,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,sBAWA,CAAC"}
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import { type Node } from '@dxos/plugin-graph';
3
+ import { type StackItemSigilAction } from '@dxos/react-ui-stack';
4
+ import { type ResolvedPart } from '../../types';
5
+ export type PlankHeadingProps = {
6
+ id: string;
7
+ part: ResolvedPart;
8
+ node?: Node;
9
+ deckEnabled?: boolean;
10
+ canIncrementStart?: boolean;
11
+ canIncrementEnd?: boolean;
12
+ popoverAnchorId?: string;
13
+ primaryId?: string;
14
+ pending?: boolean;
15
+ companioned?: 'primary' | 'companion';
16
+ companions?: Node[];
17
+ actions?: StackItemSigilAction[];
18
+ };
19
+ export declare const PlankHeading: React.MemoExoticComponent<({ id, part, node, deckEnabled, canIncrementStart, canIncrementEnd, popoverAnchorId, primaryId, pending, companioned, companions, actions, }: PlankHeadingProps) => React.JSX.Element>;
20
+ //# sourceMappingURL=PlankHeading.d.ts.map