@dxos/plugin-deck 0.7.4 → 0.7.5-labs.071a3e2

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 (173) hide show
  1. package/dist/lib/browser/app-graph-builder-CI6ZFMNL.mjs +147 -0
  2. package/dist/lib/browser/app-graph-builder-CI6ZFMNL.mjs.map +7 -0
  3. package/dist/lib/browser/check-app-scheme-S3EYUPMF.mjs +33 -0
  4. package/dist/lib/browser/check-app-scheme-S3EYUPMF.mjs.map +7 -0
  5. package/dist/lib/browser/chunk-BTDY6SES.mjs +1119 -0
  6. package/dist/lib/browser/chunk-BTDY6SES.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-FZOBKOA2.mjs +24 -0
  8. package/dist/lib/browser/chunk-FZOBKOA2.mjs.map +7 -0
  9. package/dist/lib/browser/chunk-M2L53AIH.mjs +126 -0
  10. package/dist/lib/browser/chunk-M2L53AIH.mjs.map +7 -0
  11. package/dist/lib/browser/{chunk-GVOGPULO.mjs → chunk-N7TEPFVR.mjs} +5 -4
  12. package/dist/lib/browser/chunk-N7TEPFVR.mjs.map +7 -0
  13. package/dist/lib/browser/chunk-YQ2GWTDU.mjs +17 -0
  14. package/dist/lib/browser/chunk-YQ2GWTDU.mjs.map +7 -0
  15. package/dist/lib/browser/index.mjs +100 -1807
  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-HIHLRMCW.mjs +46 -0
  21. package/dist/lib/browser/react-root-HIHLRMCW.mjs.map +7 -0
  22. package/dist/lib/browser/react-surface-4QVWKQYY.mjs +38 -0
  23. package/dist/lib/browser/react-surface-4QVWKQYY.mjs.map +7 -0
  24. package/dist/lib/browser/settings-WACNLCPB.mjs +28 -0
  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/tools-5LDJNU56.mjs +51 -0
  29. package/dist/lib/browser/tools-5LDJNU56.mjs.map +7 -0
  30. package/dist/lib/browser/types.mjs +20 -3
  31. package/dist/lib/browser/url-handler-HLF42IHP.mjs +70 -0
  32. package/dist/lib/browser/url-handler-HLF42IHP.mjs.map +7 -0
  33. package/dist/types/src/DeckPlugin.d.ts +1 -14
  34. package/dist/types/src/DeckPlugin.d.ts.map +1 -1
  35. package/dist/types/src/capabilities/app-graph-builder.d.ts +181 -0
  36. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
  37. package/dist/types/src/capabilities/capabilities.d.ts +142 -0
  38. package/dist/types/src/capabilities/capabilities.d.ts.map +1 -0
  39. package/dist/types/src/capabilities/check-app-scheme.d.ts +4 -0
  40. package/dist/types/src/capabilities/check-app-scheme.d.ts.map +1 -0
  41. package/dist/types/src/capabilities/index.d.ts +190 -0
  42. package/dist/types/src/capabilities/index.d.ts.map +1 -0
  43. package/dist/types/src/capabilities/intent-resolver.d.ts +4 -0
  44. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -0
  45. package/dist/types/src/capabilities/react-root.d.ts +7 -0
  46. package/dist/types/src/capabilities/react-root.d.ts.map +1 -0
  47. package/dist/types/src/capabilities/react-surface.d.ts +4 -0
  48. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  49. package/dist/types/src/capabilities/set-active.d.ts +9 -0
  50. package/dist/types/src/capabilities/set-active.d.ts.map +1 -0
  51. package/dist/types/src/capabilities/settings.d.ts +4 -0
  52. package/dist/types/src/capabilities/settings.d.ts.map +1 -0
  53. package/dist/types/src/capabilities/state.d.ts +76 -0
  54. package/dist/types/src/capabilities/state.d.ts.map +1 -0
  55. package/dist/types/src/capabilities/tools.d.ts +10 -0
  56. package/dist/types/src/capabilities/tools.d.ts.map +1 -0
  57. package/dist/types/src/capabilities/url-handler.d.ts +4 -0
  58. package/dist/types/src/capabilities/url-handler.d.ts.map +1 -0
  59. package/dist/types/src/components/DeckLayout/ActiveNode.d.ts.map +1 -1
  60. package/dist/types/src/components/DeckLayout/Banner.d.ts +6 -0
  61. package/dist/types/src/components/DeckLayout/Banner.d.ts.map +1 -0
  62. package/dist/types/src/components/DeckLayout/ComplementarySidebar.d.ts.map +1 -1
  63. package/dist/types/src/components/DeckLayout/ContentEmpty.d.ts.map +1 -1
  64. package/dist/types/src/components/DeckLayout/DeckLayout.d.ts +1 -4
  65. package/dist/types/src/components/DeckLayout/DeckLayout.d.ts.map +1 -1
  66. package/dist/types/src/components/DeckLayout/Fullscreen.d.ts.map +1 -1
  67. package/dist/types/src/components/DeckLayout/NodePlankHeading.d.ts +3 -3
  68. package/dist/types/src/components/DeckLayout/NodePlankHeading.d.ts.map +1 -1
  69. package/dist/types/src/components/DeckLayout/Plank.d.ts +8 -6
  70. package/dist/types/src/components/DeckLayout/Plank.d.ts.map +1 -1
  71. package/dist/types/src/components/DeckLayout/PlankControls.d.ts +2 -2
  72. package/dist/types/src/components/DeckLayout/PlankControls.d.ts.map +1 -1
  73. package/dist/types/src/components/DeckLayout/PlankError.d.ts +4 -3
  74. package/dist/types/src/components/DeckLayout/PlankError.d.ts.map +1 -1
  75. package/dist/types/src/components/DeckLayout/Sidebar.d.ts +1 -5
  76. package/dist/types/src/components/DeckLayout/Sidebar.d.ts.map +1 -1
  77. package/dist/types/src/components/DeckLayout/SidebarButton.d.ts +8 -0
  78. package/dist/types/src/components/DeckLayout/SidebarButton.d.ts.map +1 -0
  79. package/dist/types/src/components/DeckLayout/StatusBar.d.ts.map +1 -1
  80. package/dist/types/src/components/DeckLayout/Toast.d.ts +2 -2
  81. package/dist/types/src/components/DeckLayout/Toast.d.ts.map +1 -1
  82. package/dist/types/src/components/DeckLayout/Topbar.d.ts +3 -0
  83. package/dist/types/src/components/DeckLayout/Topbar.d.ts.map +1 -0
  84. package/dist/types/src/components/fragments.d.ts +4 -0
  85. package/dist/types/src/components/fragments.d.ts.map +1 -0
  86. package/dist/types/src/components/index.d.ts +0 -2
  87. package/dist/types/src/components/index.d.ts.map +1 -1
  88. package/dist/types/src/events.d.ts +4 -0
  89. package/dist/types/src/events.d.ts.map +1 -0
  90. package/dist/types/src/hooks/useMainSize.d.ts +2 -2
  91. package/dist/types/src/index.d.ts +3 -2
  92. package/dist/types/src/index.d.ts.map +1 -1
  93. package/dist/types/src/layout.d.ts +5 -19
  94. package/dist/types/src/layout.d.ts.map +1 -1
  95. package/dist/types/src/meta.d.ts +4 -4
  96. package/dist/types/src/meta.d.ts.map +1 -1
  97. package/dist/types/src/translations.d.ts +7 -2
  98. package/dist/types/src/translations.d.ts.map +1 -1
  99. package/dist/types/src/types.d.ts +130 -17
  100. package/dist/types/src/types.d.ts.map +1 -1
  101. package/dist/types/src/util/index.d.ts +3 -2
  102. package/dist/types/src/util/index.d.ts.map +1 -1
  103. package/dist/types/src/util/layoutAppliesTopbar.d.ts +2 -0
  104. package/dist/types/src/util/layoutAppliesTopbar.d.ts.map +1 -0
  105. package/dist/types/src/util/useBreakpoints.d.ts +2 -0
  106. package/dist/types/src/util/useBreakpoints.d.ts.map +1 -0
  107. package/dist/types/src/util/useHoistStatusbar.d.ts +2 -0
  108. package/dist/types/src/util/useHoistStatusbar.d.ts.map +1 -0
  109. package/dist/types/tsconfig.tsbuildinfo +1 -0
  110. package/package.json +32 -36
  111. package/src/DeckPlugin.ts +83 -0
  112. package/src/capabilities/app-graph-builder.ts +109 -0
  113. package/src/capabilities/capabilities.ts +18 -0
  114. package/src/capabilities/check-app-scheme.ts +44 -0
  115. package/src/capabilities/index.ts +17 -0
  116. package/src/capabilities/intent-resolver.ts +350 -0
  117. package/src/capabilities/react-root.tsx +48 -0
  118. package/src/capabilities/react-surface.tsx +31 -0
  119. package/src/capabilities/set-active.ts +43 -0
  120. package/src/capabilities/settings.ts +21 -0
  121. package/src/capabilities/state.ts +102 -0
  122. package/src/capabilities/tools.ts +61 -0
  123. package/src/capabilities/url-handler.ts +63 -0
  124. package/src/components/DeckLayout/ActiveNode.tsx +3 -4
  125. package/src/components/DeckLayout/Banner.tsx +37 -0
  126. package/src/components/DeckLayout/ComplementarySidebar.tsx +130 -56
  127. package/src/components/DeckLayout/ContentEmpty.tsx +9 -4
  128. package/src/components/DeckLayout/DeckLayout.tsx +116 -83
  129. package/src/components/DeckLayout/Fullscreen.tsx +3 -4
  130. package/src/components/DeckLayout/NodePlankHeading.tsx +66 -93
  131. package/src/components/DeckLayout/Plank.tsx +36 -43
  132. package/src/components/DeckLayout/PlankControls.tsx +12 -13
  133. package/src/components/DeckLayout/PlankError.tsx +6 -5
  134. package/src/components/DeckLayout/Sidebar.tsx +19 -26
  135. package/src/components/DeckLayout/SidebarButton.tsx +68 -0
  136. package/src/components/DeckLayout/StatusBar.tsx +6 -12
  137. package/src/components/DeckLayout/Toast.tsx +21 -8
  138. package/src/components/DeckLayout/Topbar.tsx +11 -0
  139. package/src/components/LayoutSettings.tsx +8 -8
  140. package/src/components/fragments.ts +14 -0
  141. package/src/components/index.ts +0 -2
  142. package/src/events.ts +11 -0
  143. package/src/hooks/useMainSize.ts +3 -3
  144. package/src/index.ts +3 -4
  145. package/src/layout.ts +43 -212
  146. package/src/meta.ts +3 -2
  147. package/src/translations.ts +11 -6
  148. package/src/types.ts +110 -34
  149. package/src/util/index.ts +3 -2
  150. package/src/util/layoutAppliesTopbar.ts +7 -0
  151. package/src/util/useBreakpoints.ts +11 -0
  152. package/src/util/useHoistStatusbar.ts +24 -0
  153. package/dist/lib/browser/chunk-GVOGPULO.mjs.map +0 -7
  154. package/dist/lib/browser/chunk-NIRHDTX4.mjs +0 -17
  155. package/dist/lib/browser/chunk-NIRHDTX4.mjs.map +0 -7
  156. package/dist/lib/browser/meta.mjs +0 -9
  157. package/dist/lib/browser/meta.mjs.map +0 -7
  158. package/dist/types/src/components/DeckContext.d.ts +0 -8
  159. package/dist/types/src/components/DeckContext.d.ts.map +0 -1
  160. package/dist/types/src/components/LayoutContext.d.ts +0 -5
  161. package/dist/types/src/components/LayoutContext.d.ts.map +0 -1
  162. package/dist/types/src/layout.test.d.ts +0 -2
  163. package/dist/types/src/layout.test.d.ts.map +0 -1
  164. package/dist/types/src/util/check-app-scheme.d.ts +0 -2
  165. package/dist/types/src/util/check-app-scheme.d.ts.map +0 -1
  166. package/dist/types/src/util/layout-parts.d.ts +0 -7
  167. package/dist/types/src/util/layout-parts.d.ts.map +0 -1
  168. package/src/DeckPlugin.tsx +0 -657
  169. package/src/components/DeckContext.ts +0 -14
  170. package/src/components/LayoutContext.ts +0 -12
  171. package/src/layout.test.ts +0 -380
  172. package/src/util/check-app-scheme.ts +0 -21
  173. package/src/util/layout-parts.ts +0 -12
@@ -0,0 +1,4 @@
1
+ export declare namespace DeckEvents {
2
+ const StateReady: import("@dxos/app-framework").ActivationEvent;
3
+ }
4
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/events.ts"],"names":[],"mappings":"AAQA,yBAAiB,UAAU,CAAC;IACnB,MAAM,UAAU,+CAAwD,CAAC;CACjF"}
@@ -1,5 +1,5 @@
1
1
  export declare const useMainSize: () => {
2
- 'data-sidebar-inline-start-state': string;
3
- 'data-sidebar-inline-end-state': string;
2
+ 'data-sidebar-inline-start-state': import("@dxos/react-ui").SidebarState;
3
+ 'data-sidebar-inline-end-state': import("@dxos/react-ui").SidebarState;
4
4
  };
5
5
  //# sourceMappingURL=useMainSize.d.ts.map
@@ -1,4 +1,5 @@
1
- import { DeckPlugin } from './DeckPlugin';
2
- export default DeckPlugin;
1
+ export { DeckCapabilities } from './capabilities';
2
+ export { DeckEvents } from './events';
3
3
  export * from './DeckPlugin';
4
+ export * from './meta';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,eAAe,UAAU,CAAC;AAE1B,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC"}
@@ -1,25 +1,11 @@
1
- import { type LayoutAdjustment, type LayoutCoordinate, type LayoutEntry, type LayoutPart, type LayoutParts } from '@dxos/app-framework';
2
- import { type NewPlankPositioning } from './types';
1
+ import { type DeckAction, type NewPlankPositioning } from './types';
3
2
  type OpenLayoutEntryOptions = {
3
+ key?: string;
4
4
  positioning?: NewPlankPositioning;
5
5
  pivotId?: string;
6
6
  };
7
- export declare const openEntry: (layout: LayoutParts, part: LayoutPart, entry: LayoutEntry, options?: OpenLayoutEntryOptions) => LayoutParts;
8
- export declare const closeEntry: (layout: LayoutParts, layoutCoordinate: LayoutCoordinate) => LayoutParts;
9
- export declare const incrementPlank: (layout: LayoutParts, adjustment: LayoutAdjustment) => LayoutParts;
10
- export declare const removePart: (layout: LayoutParts, part: LayoutPart) => LayoutParts;
11
- export declare const mergeLayoutParts: (...layoutParts: LayoutParts[]) => LayoutParts;
12
- export declare const uriToSoloPart: (uri: string) => LayoutParts | undefined;
13
- export declare const soloPartToUri: (layout: LayoutParts) => string;
14
- /**
15
- * Converts a URI string into a LayoutParts object.
16
- * @deprecated Keeping these as a reference for now. We should remove these once we're sure we don't need them.
17
- */
18
- export declare const uriToActiveParts: (uri: string) => LayoutParts;
19
- /**
20
- * Converts a LayoutParts object into a URI string.
21
- * @deprecated Keeping these as a reference for now. We should remove these once we're sure we don't need them.
22
- */
23
- export declare const activePartsToUri: (activeParts: LayoutParts) => string;
7
+ export declare const openEntry: (deck: string[], entryId: string, options?: OpenLayoutEntryOptions) => string[];
8
+ export declare const closeEntry: (deck: string[], entryId: string) => string[];
9
+ export declare const incrementPlank: (deck: string[], adjustment: DeckAction.Adjustment) => string[];
24
10
  export {};
25
11
  //# sourceMappingURL=layout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/layout.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,WAAW,EAKjB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAQnD,KAAK,sBAAsB,GAAG;IAAE,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtF,eAAO,MAAM,SAAS,WACZ,WAAW,QACb,UAAU,SACT,WAAW,YACR,sBAAsB,KAC/B,WAwCF,CAAC;AAEF,eAAO,MAAM,UAAU,WAAY,WAAW,oBAAoB,gBAAgB,KAAG,WAoBpF,CAAC;AAEF,eAAO,MAAM,cAAc,WAAY,WAAW,cAAc,gBAAgB,KAAG,WA+BlF,CAAC;AAEF,eAAO,MAAM,UAAU,WAAY,WAAW,QAAQ,UAAU,KAAG,WAIlE,CAAC;AAEF,eAAO,MAAM,gBAAgB,mBAAoB,WAAW,EAAE,KAAG,WAyBhE,CAAC;AAgBF,eAAO,MAAM,aAAa,QAAS,MAAM,KAAG,WAAW,GAAG,SAYzD,CAAC;AAEF,eAAO,MAAM,aAAa,WAAY,WAAW,KAAG,MAQnD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,QAAS,MAAM,KAAG,WAgB9C,CAAC;AAiBF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,gBAAiB,WAAW,KAAG,MAK3D,CAAC"}
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/layout.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEpE,KAAK,sBAAsB,GAAG;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpG,eAAO,MAAM,SAAS,SAAU,MAAM,EAAE,WAAW,MAAM,YAAY,sBAAsB,KAAG,MAAM,EAsCnG,CAAC;AAEF,eAAO,MAAM,UAAU,SAAU,MAAM,EAAE,WAAW,MAAM,KAAG,MAAM,EAOlE,CAAC;AAEF,eAAO,MAAM,cAAc,SAAU,MAAM,EAAE,cAAc,UAAU,CAAC,UAAU,KAAG,MAAM,EAmBxF,CAAC"}
@@ -1,7 +1,7 @@
1
- export declare const DECK_PLUGIN = "dxos.org/plugin/deck";
2
- declare const _default: {
3
- id: string;
1
+ export declare const DECK_PLUGIN: "dxos.org/plugin/deck";
2
+ export declare const meta: {
3
+ id: "dxos.org/plugin/deck";
4
4
  name: string;
5
+ icon: string;
5
6
  };
6
- export default _default;
7
7
  //# sourceMappingURL=meta.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,WAAW,yBAAyB,CAAC;;;;;AAElD,wBAGuB"}
1
+ {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,WAAW,EAAG,sBAA+B,CAAC;AAE3D,eAAO,MAAM,IAAI;;;;CAIK,CAAC"}
@@ -1,16 +1,18 @@
1
1
  declare const _default: {
2
2
  'en-US': {
3
3
  "dxos.org/plugin/deck": {
4
+ 'plugin name': string;
4
5
  'main header label': string;
5
6
  'open navigation sidebar label': string;
7
+ 'collapse navigation sidebar label': string;
6
8
  'open complementary sidebar label': string;
9
+ 'close complementary sidebar label': string;
7
10
  'plugin error message': string;
8
11
  'content fallback message': string;
9
12
  'content fallback description': string;
10
13
  'toggle fullscreen label': string;
11
14
  'settings show hints label': string;
12
15
  'settings native redirect label': string;
13
- 'settings custom slots': string;
14
16
  'settings new plank position start label': string;
15
17
  'settings new plank position end label': string;
16
18
  'select new plank positioning placeholder': string;
@@ -39,7 +41,10 @@ declare const _default: {
39
41
  'select overscroll placeholder': string;
40
42
  'settings overscroll centering label': string;
41
43
  'settings overscroll none label': string;
42
- 'settings flat deck': string;
44
+ 'settings enable ide-style statusbar label': string;
45
+ 'close current label': string;
46
+ 'close others label': string;
47
+ 'close all label': string;
43
48
  };
44
49
  };
45
50
  }[];
@@ -1 +1 @@
1
- {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,wBA+CE"}
1
+ {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,wBAoDE"}
@@ -1,4 +1,4 @@
1
- import type { Plugin, GraphBuilderProvides, IntentResolverProvides, LayoutProvides, LocationProvides, SettingsProvides, SurfaceProvides, TranslationsProvides } from '@dxos/app-framework';
1
+ import { S } from '@dxos/echo-schema';
2
2
  import { type Label } from '@dxos/react-ui';
3
3
  export declare const NewPlankPositions: readonly ["start", "end"];
4
4
  export type NewPlankPositioning = (typeof NewPlankPositions)[number];
@@ -9,20 +9,133 @@ export type Panel = {
9
9
  label: Label;
10
10
  icon: string;
11
11
  };
12
- export type PanelProvides = {
13
- complementary: {
14
- panels: Panel[];
15
- };
16
- };
17
- export declare const parsePanelPlugin: (plugin?: Plugin) => Plugin<PanelProvides> | undefined;
18
- export type DeckSettingsProps = {
19
- showHints: boolean;
20
- customSlots: boolean;
21
- flatDeck: boolean;
22
- enableNativeRedirect: boolean;
23
- disableDeck: boolean;
24
- newPlankPositioning: NewPlankPositioning;
25
- overscroll: Overscroll;
26
- };
27
- export type DeckPluginProvides = SurfaceProvides & IntentResolverProvides & GraphBuilderProvides & TranslationsProvides & SettingsProvides<DeckSettingsProps> & LayoutProvides & LocationProvides;
12
+ export declare const DeckSettingsSchema: S.mutable<S.Struct<{
13
+ showHints: typeof S.Boolean;
14
+ enableNativeRedirect: typeof S.Boolean;
15
+ enableIdeStyleStatusbar: typeof S.Boolean;
16
+ newPlankPositioning: S.Literal<["start", "end"]>;
17
+ overscroll: S.Literal<["none", "centering"]>;
18
+ }>>;
19
+ export type DeckSettingsProps = S.Schema.Type<typeof DeckSettingsSchema>;
20
+ declare const LayoutMode: S.Union<[S.Literal<["deck"]>, S.Literal<["solo"]>, S.Literal<["fullscreen"]>]>;
21
+ export declare const isLayoutMode: (value: any) => value is LayoutMode;
22
+ export type LayoutMode = S.Schema.Type<typeof LayoutMode>;
23
+ export declare const PlankSizing: S.Record$<typeof S.String, typeof S.Number>;
24
+ export type PlankSizing = S.Schema.Type<typeof PlankSizing>;
25
+ export declare const Deck: S.Struct<{
26
+ initialized: S.SchemaClass<boolean, boolean, never>;
27
+ active: S.mutable<S.Array$<typeof S.String>>;
28
+ inactive: S.mutable<S.Array$<typeof S.String>>;
29
+ solo: S.optional<typeof S.String>;
30
+ fullscreen: typeof S.Boolean;
31
+ plankSizing: S.mutable<S.Record$<typeof S.String, typeof S.Number>>;
32
+ }>;
33
+ export type Deck = S.Schema.Type<typeof Deck>;
34
+ export declare const DeckState: S.mutable<S.Struct<{
35
+ sidebarState: S.Literal<["closed", "collapsed", "expanded"]>;
36
+ complementarySidebarState: S.Literal<["closed", "collapsed", "expanded"]>;
37
+ complementarySidebarPanel: S.optional<typeof S.String>;
38
+ dialogOpen: typeof S.Boolean;
39
+ /**
40
+ * Data to be passed to the dialog Surface.
41
+ */
42
+ dialogContent: S.optional<typeof S.Any>;
43
+ dialogBlockAlign: S.optional<S.Literal<["start", "center"]>>;
44
+ dialogType: S.optional<S.Literal<["default", "alert"]>>;
45
+ popoverOpen: typeof S.Boolean;
46
+ /**
47
+ * Data to be passed to the popover Surface.
48
+ */
49
+ popoverContent: S.optional<typeof S.Any>;
50
+ popoverAnchorId: S.optional<typeof S.String>;
51
+ toasts: S.mutable<S.Array$<S.Struct<{
52
+ id: S.SchemaClass<string, string, never>;
53
+ title: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
54
+ ns: typeof S.String;
55
+ count: S.optional<typeof S.Number>;
56
+ }>>]>>]>>;
57
+ description: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
58
+ ns: typeof S.String;
59
+ count: S.optional<typeof S.Number>;
60
+ }>>]>>]>>;
61
+ icon: S.optional<S.SchemaClass<string, string, never>>;
62
+ duration: S.optional<S.SchemaClass<number, number, never>>;
63
+ closeLabel: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
64
+ ns: typeof S.String;
65
+ count: S.optional<typeof S.Number>;
66
+ }>>]>>]>>;
67
+ actionLabel: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
68
+ ns: typeof S.String;
69
+ count: S.optional<typeof S.Number>;
70
+ }>>]>>]>>;
71
+ actionAlt: S.optional<S.Union<[typeof S.String, S.mutable<S.Tuple<[typeof S.String, S.mutable<S.Struct<{
72
+ ns: typeof S.String;
73
+ count: S.optional<typeof S.Number>;
74
+ }>>]>>]>>;
75
+ onAction: S.optional<S.SchemaClass<any, any, never>>;
76
+ }>>>;
77
+ currentUndoId: S.optional<typeof S.String>;
78
+ activeDeck: typeof S.String;
79
+ decks: S.mutable<S.Record$<typeof S.String, S.mutable<S.Struct<{
80
+ initialized: S.SchemaClass<boolean, boolean, never>;
81
+ active: S.mutable<S.Array$<typeof S.String>>;
82
+ inactive: S.mutable<S.Array$<typeof S.String>>;
83
+ solo: S.optional<typeof S.String>;
84
+ fullscreen: typeof S.Boolean;
85
+ plankSizing: S.mutable<S.Record$<typeof S.String, typeof S.Number>>;
86
+ }>>>>;
87
+ previousMode: S.mutable<S.Record$<typeof S.String, S.Union<[S.Literal<["deck"]>, S.Literal<["solo"]>, S.Literal<["fullscreen"]>]>>>;
88
+ deck: S.mutable<S.Struct<{
89
+ initialized: S.SchemaClass<boolean, boolean, never>;
90
+ active: S.mutable<S.Array$<typeof S.String>>;
91
+ inactive: S.mutable<S.Array$<typeof S.String>>;
92
+ solo: S.optional<typeof S.String>;
93
+ fullscreen: typeof S.Boolean;
94
+ plankSizing: S.mutable<S.Record$<typeof S.String, typeof S.Number>>;
95
+ }>>;
96
+ /**
97
+ * The identifier of a component to scroll into view when it is mounted.
98
+ */
99
+ scrollIntoView: S.optional<typeof S.String>;
100
+ }>>;
101
+ export type DeckState = S.Schema.Type<typeof DeckState>;
102
+ export declare const getMode: (deck: Deck) => LayoutMode;
103
+ export declare const SLUG_PATH_SEPARATOR = "~";
104
+ export declare const DECK_ACTION: string;
105
+ export declare namespace DeckAction {
106
+ const PartAdjustmentSchema: S.Union<[S.Literal<["close"]>, S.Literal<["solo"]>, S.Literal<["increment-start"]>, S.Literal<["increment-end"]>]>;
107
+ export type PartAdjustment = S.Schema.Type<typeof PartAdjustmentSchema>;
108
+ export const Adjustment: S.mutable<S.Struct<{
109
+ id: typeof S.String;
110
+ type: S.Union<[S.Literal<["close"]>, S.Literal<["solo"]>, S.Literal<["increment-start"]>, S.Literal<["increment-end"]>]>;
111
+ }>>;
112
+ export type Adjustment = S.Schema.Type<typeof Adjustment>;
113
+ const Adjust_base: S.TaggedClass<Adjust, `${string}/adjust`, {
114
+ readonly _tag: S.tag<`${string}/adjust`>;
115
+ } & {
116
+ input: S.mutable<S.Struct<{
117
+ id: typeof S.String;
118
+ type: S.Union<[S.Literal<["close"]>, S.Literal<["solo"]>, S.Literal<["increment-start"]>, S.Literal<["increment-end"]>]>;
119
+ }>>;
120
+ output: typeof S.Void;
121
+ }>;
122
+ /**
123
+ * An atomic transaction to apply to the deck, describing which element to move to which location.
124
+ */
125
+ export class Adjust extends Adjust_base {
126
+ }
127
+ const UpdatePlankSize_base: S.TaggedClass<UpdatePlankSize, `${string}/update-plank-size`, {
128
+ readonly _tag: S.tag<`${string}/update-plank-size`>;
129
+ } & {
130
+ input: S.Struct<{
131
+ id: typeof S.String;
132
+ size: typeof S.Number;
133
+ }>;
134
+ output: typeof S.Void;
135
+ }>;
136
+ export class UpdatePlankSize extends UpdatePlankSize_base {
137
+ }
138
+ export {};
139
+ }
140
+ export {};
28
141
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,MAAM,EACN,oBAAoB,EACpB,sBAAsB,EACtB,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAG5C,eAAO,MAAM,iBAAiB,2BAA4B,CAAC;AAC3D,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAErE,eAAO,MAAM,iBAAiB,gCAAiC,CAAC;AAChE,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAG5D,MAAM,MAAM,KAAK,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAG/D,MAAM,MAAM,aAAa,GAAG;IAC1B,aAAa,EAAE;QACb,MAAM,E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1
  export * from './overscroll';
2
+ export * from './useBreakpoints';
3
+ export * from './layoutAppliesTopbar';
4
+ export * from './useHoistStatusbar';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/util/index.ts"],"names":[],"mappings":"AAIA,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/util/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const layoutAppliesTopbar: (breakpoint: string) => boolean;
2
+ //# sourceMappingURL=layoutAppliesTopbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layoutAppliesTopbar.d.ts","sourceRoot":"","sources":["../../../../src/util/layoutAppliesTopbar.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,mBAAmB,eAAgB,MAAM,YAErD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const useBreakpoints: () => "desktop" | "tablet" | "mobile";
2
+ //# sourceMappingURL=useBreakpoints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useBreakpoints.d.ts","sourceRoot":"","sources":["../../../../src/util/useBreakpoints.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,uCAI1B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const useHoistStatusbar: (breakpoint: string) => boolean;
2
+ //# sourceMappingURL=useHoistStatusbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useHoistStatusbar.d.ts","sourceRoot":"","sources":["../../../../src/util/useHoistStatusbar.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,iBAAiB,eAAgB,MAAM,YAYnD,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":"5.7.3"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-deck",
3
- "version": "0.7.4",
3
+ "version": "0.7.5-labs.071a3e2",
4
4
  "description": "DXOS Surface plugin for the main application layout.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -12,10 +12,6 @@
12
12
  "types": "./dist/types/src/index.d.ts",
13
13
  "browser": "./dist/lib/browser/index.mjs"
14
14
  },
15
- "./meta": {
16
- "types": "./dist/types/src/meta.d.ts",
17
- "browser": "./dist/lib/browser/meta.mjs"
18
- },
19
15
  "./types": {
20
16
  "types": "./dist/types/src/types.d.ts",
21
17
  "browser": "./dist/lib/browser/types.mjs"
@@ -24,9 +20,6 @@
24
20
  "types": "dist/types/src/index.d.ts",
25
21
  "typesVersions": {
26
22
  "*": {
27
- "meta": [
28
- "dist/types/src/meta.d.ts"
29
- ],
30
23
  "types": [
31
24
  "dist/types/src/types.d.ts"
32
25
  ]
@@ -37,31 +30,34 @@
37
30
  "src"
38
31
  ],
39
32
  "dependencies": {
40
- "@fluentui/react-tabster": "^9.19.0",
33
+ "@fluentui/react-tabster": "9.23.3",
41
34
  "@preact/signals-core": "^1.6.0",
35
+ "effect": "^3.12.3",
42
36
  "immer": "^10.1.1",
43
- "@dxos/app-framework": "0.7.4",
44
- "@dxos/async": "0.7.4",
45
- "@dxos/echo-schema": "0.7.4",
46
- "@dxos/echo-signals": "0.7.4",
47
- "@dxos/debug": "0.7.4",
48
- "@dxos/invariant": "0.7.4",
49
- "@dxos/keyboard": "0.7.4",
50
- "@dxos/live-object": "0.7.4",
51
- "@dxos/log": "0.7.4",
52
- "@dxos/plugin-attention": "0.7.4",
53
- "@dxos/local-storage": "0.7.4",
54
- "@dxos/plugin-client": "0.7.4",
55
- "@dxos/plugin-observability": "0.7.4",
56
- "@dxos/plugin-theme": "0.7.4",
57
- "@dxos/plugin-graph": "0.7.4",
58
- "@dxos/react-ui-attention": "0.7.4",
59
- "@dxos/react-client": "0.7.4",
60
- "@dxos/react-ui-form": "0.7.4",
61
- "@dxos/react-ui-stack": "0.7.4",
62
- "@dxos/react-ui-mosaic": "0.7.4",
63
- "@dxos/util": "0.7.4",
64
- "@dxos/react-ui-text-tooltip": "0.7.4"
37
+ "@dxos/app-framework": "0.7.5-labs.071a3e2",
38
+ "@dxos/artifact": "0.7.5-labs.071a3e2",
39
+ "@dxos/async": "0.7.5-labs.071a3e2",
40
+ "@dxos/echo-schema": "0.7.5-labs.071a3e2",
41
+ "@dxos/debug": "0.7.5-labs.071a3e2",
42
+ "@dxos/invariant": "0.7.5-labs.071a3e2",
43
+ "@dxos/keyboard": "0.7.5-labs.071a3e2",
44
+ "@dxos/live-object": "0.7.5-labs.071a3e2",
45
+ "@dxos/echo-signals": "0.7.5-labs.071a3e2",
46
+ "@dxos/local-storage": "0.7.5-labs.071a3e2",
47
+ "@dxos/log": "0.7.5-labs.071a3e2",
48
+ "@dxos/plugin-attention": "0.7.5-labs.071a3e2",
49
+ "@dxos/plugin-graph": "0.7.5-labs.071a3e2",
50
+ "@dxos/plugin-client": "0.7.5-labs.071a3e2",
51
+ "@dxos/plugin-observability": "0.7.5-labs.071a3e2",
52
+ "@dxos/plugin-theme": "0.7.5-labs.071a3e2",
53
+ "@dxos/react-client": "0.7.5-labs.071a3e2",
54
+ "@dxos/react-ui-form": "0.7.5-labs.071a3e2",
55
+ "@dxos/react-ui-attention": "0.7.5-labs.071a3e2",
56
+ "@dxos/react-ui-mosaic": "0.7.5-labs.071a3e2",
57
+ "@dxos/react-ui-stack": "0.7.5-labs.071a3e2",
58
+ "@dxos/react-ui-text-tooltip": "0.7.5-labs.071a3e2",
59
+ "@dxos/util": "0.7.5-labs.071a3e2",
60
+ "@dxos/react-ui-tabs": "0.7.5-labs.071a3e2"
65
61
  },
66
62
  "devDependencies": {
67
63
  "@phosphor-icons/react": "^2.1.5",
@@ -70,16 +66,16 @@
70
66
  "react": "~18.2.0",
71
67
  "react-dom": "~18.2.0",
72
68
  "vite": "5.4.7",
73
- "@dxos/react-ui": "0.7.4",
74
- "@dxos/react-ui-theme": "0.7.4",
75
- "@dxos/storybook-utils": "0.7.4"
69
+ "@dxos/react-ui": "0.7.5-labs.071a3e2",
70
+ "@dxos/storybook-utils": "0.7.5-labs.071a3e2",
71
+ "@dxos/react-ui-theme": "0.7.5-labs.071a3e2"
76
72
  },
77
73
  "peerDependencies": {
78
74
  "@phosphor-icons/react": "^2.0.5",
79
75
  "react": "~18.2.0",
80
76
  "react-dom": "~18.2.0",
81
- "@dxos/react-ui": "0.7.4",
82
- "@dxos/react-ui-theme": "0.7.4"
77
+ "@dxos/react-ui-theme": "0.7.5-labs.071a3e2",
78
+ "@dxos/react-ui": "0.7.5-labs.071a3e2"
83
79
  },
84
80
  "publishConfig": {
85
81
  "access": "public"
@@ -0,0 +1,83 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { setAutoFreeze } from 'immer';
6
+
7
+ import { allOf, Capabilities, contributes, defineModule, definePlugin, Events, oneOf } from '@dxos/app-framework';
8
+ import { translations as stackTranslations } from '@dxos/react-ui-stack';
9
+
10
+ import {
11
+ AppGraphBuilder,
12
+ CheckAppScheme,
13
+ DeckSettings,
14
+ DeckState,
15
+ LayoutIntentResolver,
16
+ ReactRoot,
17
+ ReactSurface,
18
+ Tools,
19
+ UrlHandler,
20
+ } from './capabilities';
21
+ import { DeckEvents } from './events';
22
+ import { meta } from './meta';
23
+ import translations from './translations';
24
+
25
+ // NOTE(Zan): When producing values with immer, we shouldn't auto-freeze them because
26
+ // our signal implementation needs to add some hidden properties to the produced values.
27
+ // TODO(Zan): Move this to a more global location if we use immer more broadly.
28
+ setAutoFreeze(false);
29
+
30
+ export const DeckPlugin = () =>
31
+ definePlugin(meta, [
32
+ defineModule({
33
+ id: `${meta.id}/module/check-app-scheme`,
34
+ activatesOn: Events.SettingsReady,
35
+ activate: CheckAppScheme,
36
+ }),
37
+ defineModule({
38
+ id: `${meta.id}/module/settings`,
39
+ activatesOn: Events.SetupSettings,
40
+ activate: DeckSettings,
41
+ }),
42
+ defineModule({
43
+ id: `${meta.id}/module/layout`,
44
+ activatesOn: oneOf(Events.Startup, Events.SetupAppGraph),
45
+ activatesAfter: [Events.LayoutReady, DeckEvents.StateReady],
46
+ activate: DeckState,
47
+ }),
48
+ defineModule({
49
+ id: `${meta.id}/module/translations`,
50
+ activatesOn: Events.SetupTranslations,
51
+ activate: () => contributes(Capabilities.Translations, [...translations, ...stackTranslations]),
52
+ }),
53
+ defineModule({
54
+ id: `${meta.id}/module/react-root`,
55
+ activatesOn: Events.Startup,
56
+ activate: ReactRoot,
57
+ }),
58
+ defineModule({
59
+ id: `${meta.id}/module/react-surface`,
60
+ activatesOn: Events.SetupSurfaces,
61
+ activate: ReactSurface,
62
+ }),
63
+ defineModule({
64
+ id: `${meta.id}/module/layout-intent-resolver`,
65
+ activatesOn: Events.SetupIntents,
66
+ activate: LayoutIntentResolver,
67
+ }),
68
+ defineModule({
69
+ id: `${meta.id}/module/app-graph-builder`,
70
+ activatesOn: Events.SetupAppGraph,
71
+ activate: AppGraphBuilder,
72
+ }),
73
+ defineModule({
74
+ id: `${meta.id}/module/tools`,
75
+ activatesOn: Events.Startup,
76
+ activate: Tools,
77
+ }),
78
+ defineModule({
79
+ id: `${meta.id}/module/url`,
80
+ activatesOn: allOf(Events.DispatcherReady, DeckEvents.StateReady),
81
+ activate: UrlHandler,
82
+ }),
83
+ ]);
@@ -0,0 +1,109 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Capabilities, contributes, createIntent, LayoutAction, type PluginsContext } from '@dxos/app-framework';
6
+ import { AttentionCapabilities } from '@dxos/plugin-attention';
7
+ import { createExtension, type Node, ROOT_ID } from '@dxos/plugin-graph';
8
+
9
+ import { DeckCapabilities } from './capabilities';
10
+ import { DECK_PLUGIN } from '../meta';
11
+
12
+ export default (context: PluginsContext) =>
13
+ contributes(
14
+ Capabilities.AppGraphBuilder,
15
+ createExtension({
16
+ id: DECK_PLUGIN,
17
+ filter: (node): node is Node<null> => node.id === ROOT_ID,
18
+ actions: () => {
19
+ const state = context.requestCapability(DeckCapabilities.MutableDeckState);
20
+
21
+ // NOTE(Zan): This is currently disabled.
22
+ // TODO(Zan): Fullscreen needs to know the active node and provide that to the layout part.
23
+ const _fullscreen = {
24
+ id: `${LayoutAction.UpdateLayout._tag}/fullscreen`,
25
+ data: async () => {
26
+ const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
27
+ await dispatch(createIntent(LayoutAction.SetLayoutMode, { part: 'mode', options: { mode: 'fullscreen' } }));
28
+ },
29
+ properties: {
30
+ label: ['toggle fullscreen label', { ns: DECK_PLUGIN }],
31
+ icon: 'ph--arrows-out--regular',
32
+ keyBinding: {
33
+ macos: 'ctrl+meta+f',
34
+ windows: 'shift+ctrl+f',
35
+ },
36
+ },
37
+ };
38
+
39
+ const closeCurrent = {
40
+ id: `${LayoutAction.Close._tag}/current`,
41
+ data: async () => {
42
+ const attention = context.requestCapability(AttentionCapabilities.Attention);
43
+ const attended = attention.current.at(-1);
44
+ if (attended) {
45
+ const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
46
+ await dispatch(
47
+ createIntent(LayoutAction.Close, { part: 'main', subject: [attended], options: { state: false } }),
48
+ );
49
+ }
50
+ },
51
+ properties: {
52
+ label: ['close current label', { ns: DECK_PLUGIN }],
53
+ icon: 'ph--x--regular',
54
+ },
55
+ };
56
+
57
+ const closeOthers = {
58
+ id: `${LayoutAction.Close._tag}/others`,
59
+ data: async () => {
60
+ const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
61
+ const attention = context.requestCapability(AttentionCapabilities.Attention);
62
+ const attended = attention.current.at(-1);
63
+ const ids = state.deck.active.filter((id) => id !== attended) ?? [];
64
+ await dispatch(createIntent(LayoutAction.Close, { part: 'main', subject: ids, options: { state: false } }));
65
+ },
66
+ properties: {
67
+ label: ['close others label', { ns: DECK_PLUGIN }],
68
+ icon: 'ph--x-square--regular',
69
+ },
70
+ };
71
+
72
+ const closeAll = {
73
+ id: `${LayoutAction.Close._tag}/all`,
74
+ data: async () => {
75
+ const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
76
+ await dispatch(
77
+ createIntent(LayoutAction.Close, {
78
+ part: 'main',
79
+ subject: state.deck.active,
80
+ options: { state: false },
81
+ }),
82
+ );
83
+ },
84
+ properties: {
85
+ label: ['close all label', { ns: DECK_PLUGIN }],
86
+ icon: 'ph--x-circle--regular',
87
+ },
88
+ };
89
+
90
+ const toggleSidebar = {
91
+ id: `${LayoutAction.UpdateSidebar._tag}/nav`,
92
+ data: async () => {
93
+ state.sidebarState = state.sidebarState === 'expanded' ? 'collapsed' : 'expanded';
94
+ },
95
+ properties: {
96
+ label: [
97
+ state.sidebarState === 'expanded' ? 'collapse navigation sidebar label' : 'open navigation sidebar label',
98
+ { ns: DECK_PLUGIN },
99
+ ],
100
+ icon: 'ph--sidebar--regular',
101
+ disposition: 'pin-end',
102
+ l0Breakpoint: 'lg',
103
+ },
104
+ };
105
+
106
+ return !state.deck.solo ? [closeCurrent, closeOthers, closeAll, toggleSidebar] : [toggleSidebar];
107
+ },
108
+ }),
109
+ );