@dxos/plugin-deck 0.8.4-main.b97322e → 0.8.4-main.bc674ce
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/app-graph-builder-DTVCULQ4.mjs +120 -0
- package/dist/lib/browser/app-graph-builder-DTVCULQ4.mjs.map +7 -0
- package/dist/lib/browser/{check-app-scheme-57U62A3A.mjs → check-app-scheme-JSRXXIYF.mjs} +9 -9
- package/dist/lib/browser/check-app-scheme-JSRXXIYF.mjs.map +7 -0
- package/dist/lib/browser/{chunk-F5BQOOEG.mjs → chunk-ATFPDN6J.mjs} +155 -23
- package/dist/lib/browser/chunk-ATFPDN6J.mjs.map +7 -0
- package/dist/lib/browser/{chunk-CNTGBCMK.mjs → chunk-NHABISX2.mjs} +40 -33
- package/dist/lib/browser/chunk-NHABISX2.mjs.map +7 -0
- package/dist/lib/browser/chunk-S4A5UO4K.mjs +1448 -0
- package/dist/lib/browser/chunk-S4A5UO4K.mjs.map +7 -0
- package/dist/lib/browser/chunk-UNG4CLLP.mjs +161 -0
- package/dist/lib/browser/chunk-UNG4CLLP.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +79 -67
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-CDYBLZJ4.mjs +595 -0
- package/dist/lib/browser/operation-resolver-CDYBLZJ4.mjs.map +7 -0
- package/dist/lib/browser/react-root-XDCMNENQ.mjs +47 -0
- package/dist/lib/browser/react-root-XDCMNENQ.mjs.map +7 -0
- package/dist/lib/browser/react-surface-HODERLOL.mjs +42 -0
- package/dist/lib/browser/react-surface-HODERLOL.mjs.map +7 -0
- package/dist/lib/browser/settings-OMHVGZ6V.mjs +37 -0
- package/dist/lib/browser/settings-OMHVGZ6V.mjs.map +7 -0
- package/dist/lib/browser/state-OC3BSB6E.mjs +103 -0
- package/dist/lib/browser/state-OC3BSB6E.mjs.map +7 -0
- package/dist/lib/browser/toolkit-R53LD3EA.mjs +53 -0
- package/dist/lib/browser/toolkit-R53LD3EA.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +11 -4
- package/dist/lib/browser/url-handler-53TE6JZO.mjs +93 -0
- package/dist/lib/browser/url-handler-53TE6JZO.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-473BNZDJ.mjs +121 -0
- package/dist/lib/node-esm/app-graph-builder-473BNZDJ.mjs.map +7 -0
- package/dist/lib/node-esm/check-app-scheme-IVYRHKRH.mjs +33 -0
- package/dist/lib/node-esm/check-app-scheme-IVYRHKRH.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-ADPMWKLL.mjs +154 -0
- package/dist/lib/node-esm/chunk-ADPMWKLL.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-D34L3ECT.mjs +1449 -0
- package/dist/lib/node-esm/chunk-D34L3ECT.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-SKEVPQ7E.mjs +162 -0
- package/dist/lib/node-esm/chunk-SKEVPQ7E.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-XAKTY3EB.mjs +294 -0
- package/dist/lib/node-esm/chunk-XAKTY3EB.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +181 -0
- package/dist/lib/node-esm/index.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -0
- package/dist/lib/node-esm/operation-resolver-WUOE33ID.mjs +596 -0
- package/dist/lib/node-esm/operation-resolver-WUOE33ID.mjs.map +7 -0
- package/dist/lib/node-esm/react-root-O6GZO62Z.mjs +48 -0
- package/dist/lib/node-esm/react-root-O6GZO62Z.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-IHDJDGC5.mjs +43 -0
- package/dist/lib/node-esm/react-surface-IHDJDGC5.mjs.map +7 -0
- package/dist/lib/node-esm/settings-2HB6FKIK.mjs +38 -0
- package/dist/lib/node-esm/settings-2HB6FKIK.mjs.map +7 -0
- package/dist/lib/node-esm/state-JRQ45ACJ.mjs +104 -0
- package/dist/lib/node-esm/state-JRQ45ACJ.mjs.map +7 -0
- package/dist/lib/node-esm/toolkit-JLPZNNKB.mjs +54 -0
- package/dist/lib/node-esm/toolkit-JLPZNNKB.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +40 -0
- package/dist/lib/node-esm/url-handler-QGF2R24T.mjs +94 -0
- package/dist/lib/node-esm/url-handler-QGF2R24T.mjs.map +7 -0
- package/dist/types/src/DeckPlugin.d.ts +2 -1
- package/dist/types/src/DeckPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/check-app-scheme/check-app-scheme.d.ts +5 -0
- package/dist/types/src/capabilities/check-app-scheme/check-app-scheme.d.ts.map +1 -0
- package/dist/types/src/capabilities/check-app-scheme/index.d.ts +3 -0
- package/dist/types/src/capabilities/check-app-scheme/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +8 -13
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-root/index.d.ts +6 -0
- package/dist/types/src/capabilities/react-root/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-root/react-root.d.ts +9 -0
- package/dist/types/src/capabilities/react-root/react-root.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/index.d.ts +19 -0
- package/dist/types/src/capabilities/settings/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/settings.d.ts +21 -0
- package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/index.d.ts +172 -0
- package/dist/types/src/capabilities/state/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/state.d.ts +175 -0
- package/dist/types/src/capabilities/state/state.d.ts.map +1 -0
- package/dist/types/src/capabilities/toolkit/index.d.ts +3 -0
- package/dist/types/src/capabilities/toolkit/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/toolkit/toolkit.d.ts +26 -0
- package/dist/types/src/capabilities/toolkit/toolkit.d.ts.map +1 -0
- package/dist/types/src/capabilities/tools/index.d.ts +3 -0
- package/dist/types/src/capabilities/tools/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/tools/tools.d.ts +12 -0
- package/dist/types/src/capabilities/tools/tools.d.ts.map +1 -0
- package/dist/types/src/capabilities/url-handler/index.d.ts +3 -0
- package/dist/types/src/capabilities/url-handler/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/url-handler/url-handler.d.ts +5 -0
- package/dist/types/src/capabilities/url-handler/url-handler.d.ts.map +1 -0
- package/dist/types/src/components/DeckLayout/Banner.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/ContentEmpty.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/DeckLayout.d.ts +2 -3
- package/dist/types/src/components/DeckLayout/DeckLayout.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/DeckLayout.stories.d.ts +74 -0
- package/dist/types/src/components/DeckLayout/DeckLayout.stories.d.ts.map +1 -0
- package/dist/types/src/components/DeckLayout/DeckMain.d.ts +3 -0
- package/dist/types/src/components/DeckLayout/DeckMain.d.ts.map +1 -0
- package/dist/types/src/components/DeckLayout/Dialog.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Popover.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Toast.d.ts +7 -2
- package/dist/types/src/components/DeckLayout/Toast.d.ts.map +1 -1
- package/dist/types/src/components/DeckSettings/DeckSettings.d.ts +4 -2
- package/dist/types/src/components/DeckSettings/DeckSettings.d.ts.map +1 -1
- package/dist/types/src/components/Plank/Plank.d.ts +4 -4
- package/dist/types/src/components/Plank/Plank.d.ts.map +1 -1
- package/dist/types/src/components/Plank/Plank.stories.d.ts +104 -5
- package/dist/types/src/components/Plank/Plank.stories.d.ts.map +1 -1
- package/dist/types/src/components/Plank/PlankControls.d.ts +1 -1
- package/dist/types/src/components/Plank/PlankControls.d.ts.map +1 -1
- package/dist/types/src/components/Plank/PlankError.d.ts +1 -1
- package/dist/types/src/components/Plank/PlankError.d.ts.map +1 -1
- package/dist/types/src/components/Plank/PlankHeading.d.ts +3 -3
- package/dist/types/src/components/Plank/PlankHeading.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/ComplementarySidebar.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/Sidebar.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/SidebarButton.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +1 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useDeckCompanions.d.ts +3 -3
- package/dist/types/src/hooks/useDeckCompanions.d.ts.map +1 -1
- package/dist/types/src/hooks/useDeckState.d.ts +17 -0
- package/dist/types/src/hooks/useDeckState.d.ts.map +1 -0
- package/dist/types/src/hooks/useHoistStatusbar.d.ts +1 -1
- package/dist/types/src/hooks/useHoistStatusbar.d.ts.map +1 -1
- package/dist/types/src/hooks/useNodeActionExpander.d.ts +1 -1
- package/dist/types/src/hooks/useNodeActionExpander.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -3
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +3 -1
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/{capabilities → types}/capabilities.d.ts +96 -90
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/events.d.ts +7 -0
- package/dist/types/src/types/events.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +2 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +90 -30
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/src/util/set-active.d.ts +18 -3
- package/dist/types/src/util/set-active.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +56 -46
- package/src/DeckPlugin.ts +45 -61
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +118 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/{check-app-scheme.ts → check-app-scheme/check-app-scheme.ts} +12 -11
- package/src/capabilities/check-app-scheme/index.ts +7 -0
- package/src/capabilities/index.ts +9 -13
- package/src/capabilities/operation-resolver/index.ts +10 -0
- package/src/capabilities/operation-resolver/operation-resolver.ts +555 -0
- package/src/capabilities/react-root/index.ts +7 -0
- package/src/capabilities/react-root/react-root.tsx +47 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +37 -0
- package/src/capabilities/settings/index.ts +7 -0
- package/src/capabilities/settings/settings.ts +38 -0
- package/src/capabilities/state/index.ts +7 -0
- package/src/capabilities/state/state.ts +104 -0
- package/src/capabilities/toolkit/index.ts +7 -0
- package/src/capabilities/toolkit/toolkit.ts +63 -0
- package/src/capabilities/tools/index.ts +7 -0
- package/src/capabilities/tools/tools.ts +92 -0
- package/src/capabilities/url-handler/index.ts +7 -0
- package/src/capabilities/url-handler/url-handler.ts +95 -0
- package/src/components/DeckLayout/ActiveNode.tsx +1 -1
- package/src/components/DeckLayout/Banner.tsx +6 -6
- package/src/components/DeckLayout/ContentEmpty.tsx +4 -5
- package/src/components/DeckLayout/DeckLayout.stories.tsx +51 -0
- package/src/components/DeckLayout/DeckLayout.tsx +18 -285
- package/src/components/DeckLayout/DeckMain.tsx +286 -0
- package/src/components/DeckLayout/Dialog.tsx +13 -10
- package/src/components/DeckLayout/Fallback.tsx +4 -4
- package/src/components/DeckLayout/Popover.tsx +44 -32
- package/src/components/DeckLayout/StatusBar.tsx +1 -1
- package/src/components/DeckLayout/Toast.tsx +30 -5
- package/src/components/DeckSettings/DeckSettings.tsx +91 -66
- package/src/components/Plank/Plank.stories.tsx +23 -16
- package/src/components/Plank/Plank.tsx +89 -56
- package/src/components/Plank/PlankControls.tsx +9 -9
- package/src/components/Plank/PlankError.tsx +5 -4
- package/src/components/Plank/PlankHeading.tsx +38 -42
- package/src/components/Sidebar/ComplementarySidebar.tsx +61 -33
- package/src/components/Sidebar/Sidebar.tsx +6 -6
- package/src/components/Sidebar/SidebarButton.tsx +39 -32
- package/src/components/fragments.ts +1 -1
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useCompanions.ts +1 -1
- package/src/hooks/useDeckCompanions.ts +7 -5
- package/src/hooks/useDeckState.ts +82 -0
- package/src/hooks/useHoistStatusbar.ts +4 -5
- package/src/hooks/useNodeActionExpander.ts +4 -4
- package/src/index.ts +1 -2
- package/src/meta.ts +8 -5
- package/src/translations.ts +3 -1
- package/src/types/capabilities.ts +33 -0
- package/src/types/events.ts +20 -0
- package/src/types/index.ts +2 -0
- package/src/types/schema.ts +86 -14
- package/src/util/layoutAppliesTopbar.ts +1 -1
- package/src/util/set-active.ts +49 -29
- package/dist/lib/browser/app-graph-builder-JTFSDT2I.mjs +0 -152
- package/dist/lib/browser/app-graph-builder-JTFSDT2I.mjs.map +0 -7
- package/dist/lib/browser/check-app-scheme-57U62A3A.mjs.map +0 -7
- package/dist/lib/browser/chunk-CNTGBCMK.mjs.map +0 -7
- package/dist/lib/browser/chunk-D7KTFCUV.mjs +0 -1494
- package/dist/lib/browser/chunk-D7KTFCUV.mjs.map +0 -7
- package/dist/lib/browser/chunk-F5BQOOEG.mjs.map +0 -7
- package/dist/lib/browser/chunk-JFTXENFN.mjs +0 -129
- package/dist/lib/browser/chunk-JFTXENFN.mjs.map +0 -7
- package/dist/lib/browser/chunk-M57WD3V6.mjs +0 -16
- package/dist/lib/browser/chunk-M57WD3V6.mjs.map +0 -7
- package/dist/lib/browser/chunk-QDZO4AJ4.mjs +0 -127
- package/dist/lib/browser/chunk-QDZO4AJ4.mjs.map +0 -7
- package/dist/lib/browser/chunk-Z5KITAZW.mjs +0 -13
- package/dist/lib/browser/chunk-Z5KITAZW.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-P2OBK5HK.mjs +0 -521
- package/dist/lib/browser/intent-resolver-P2OBK5HK.mjs.map +0 -7
- package/dist/lib/browser/react-root-PO64J7ML.mjs +0 -43
- package/dist/lib/browser/react-root-PO64J7ML.mjs.map +0 -7
- package/dist/lib/browser/react-surface-E45YOVF5.mjs +0 -40
- package/dist/lib/browser/react-surface-E45YOVF5.mjs.map +0 -7
- package/dist/lib/browser/settings-6AJZPZPM.mjs +0 -29
- package/dist/lib/browser/settings-6AJZPZPM.mjs.map +0 -7
- package/dist/lib/browser/state-MVDYX77Y.mjs +0 -12
- package/dist/lib/browser/tools-TKQDPCHJ.mjs +0 -88
- package/dist/lib/browser/tools-TKQDPCHJ.mjs.map +0 -7
- package/dist/lib/browser/url-handler-7L7M6IKH.mjs +0 -70
- package/dist/lib/browser/url-handler-7L7M6IKH.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/check-app-scheme.d.ts +0 -4
- package/dist/types/src/capabilities/check-app-scheme.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-root.d.ts +0 -7
- package/dist/types/src/capabilities/react-root.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -4
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings.d.ts +0 -4
- package/dist/types/src/capabilities/settings.d.ts.map +0 -1
- package/dist/types/src/capabilities/state.d.ts +0 -101
- package/dist/types/src/capabilities/state.d.ts.map +0 -1
- package/dist/types/src/capabilities/tools.d.ts +0 -11
- package/dist/types/src/capabilities/tools.d.ts.map +0 -1
- package/dist/types/src/capabilities/url-handler.d.ts +0 -4
- package/dist/types/src/capabilities/url-handler.d.ts.map +0 -1
- package/dist/types/src/events.d.ts +0 -4
- package/dist/types/src/events.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder.ts +0 -141
- package/src/capabilities/capabilities.ts +0 -14
- package/src/capabilities/intent-resolver.ts +0 -468
- package/src/capabilities/react-root.tsx +0 -38
- package/src/capabilities/react-surface.tsx +0 -30
- package/src/capabilities/settings.ts +0 -26
- package/src/capabilities/state.ts +0 -104
- package/src/capabilities/tools.ts +0 -81
- package/src/capabilities/url-handler.ts +0 -59
- package/src/events.ts +0 -11
- /package/dist/lib/{browser/state-MVDYX77Y.mjs.map → node-esm/types/index.mjs.map} +0 -0
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// src/types/capabilities.ts
|
|
4
|
+
import * as Effect from "effect/Effect";
|
|
5
|
+
import { Capability, Common } from "@dxos/app-framework";
|
|
6
|
+
import { invariant } from "@dxos/invariant";
|
|
7
|
+
|
|
8
|
+
// src/meta.ts
|
|
9
|
+
import { trim } from "@dxos/util";
|
|
10
|
+
var meta = {
|
|
11
|
+
id: "dxos.org/plugin/deck",
|
|
12
|
+
name: "Layout",
|
|
13
|
+
description: trim`
|
|
14
|
+
Flexible layout system for arranging workspace views in tabs, splits, and panels.
|
|
15
|
+
Customize your workspace organization with drag-and-drop layout management.
|
|
16
|
+
`,
|
|
17
|
+
icon: "ph--layout--regular"
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// src/types/capabilities.ts
|
|
21
|
+
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-deck/src/types/capabilities.ts";
|
|
22
|
+
(function(DeckCapabilities2) {
|
|
23
|
+
DeckCapabilities2.Settings = Capability.make(`${meta.id}/capability/settings`);
|
|
24
|
+
DeckCapabilities2.State = Capability.make(`${meta.id}/capability/state`);
|
|
25
|
+
DeckCapabilities2.EphemeralState = Capability.make(`${meta.id}/capability/ephemeral-state`);
|
|
26
|
+
DeckCapabilities2.getDeck = () => Effect.gen(function* () {
|
|
27
|
+
const state = yield* Common.Capability.getAtomValue(DeckCapabilities2.State);
|
|
28
|
+
const deck = state.decks[state.activeDeck];
|
|
29
|
+
invariant(deck, `Deck not found: ${state.activeDeck}`, {
|
|
30
|
+
F: __dxlog_file,
|
|
31
|
+
L: 30,
|
|
32
|
+
S: this,
|
|
33
|
+
A: [
|
|
34
|
+
"deck",
|
|
35
|
+
"`Deck not found: ${state.activeDeck}`"
|
|
36
|
+
]
|
|
37
|
+
});
|
|
38
|
+
return deck;
|
|
39
|
+
});
|
|
40
|
+
})(DeckCapabilities || (DeckCapabilities = {}));
|
|
41
|
+
var DeckCapabilities;
|
|
42
|
+
|
|
43
|
+
// src/types/events.ts
|
|
44
|
+
import { Common as Common2 } from "@dxos/app-framework";
|
|
45
|
+
(function(DeckEvents2) {
|
|
46
|
+
DeckEvents2.StateReady = Common2.ActivationEvent.createStateEvent(`${meta.id}/state-ready`);
|
|
47
|
+
DeckEvents2.SettingsReady = Common2.ActivationEvent.createSettingsEvent(DeckCapabilities.Settings.identifier);
|
|
48
|
+
})(DeckEvents || (DeckEvents = {}));
|
|
49
|
+
var DeckEvents;
|
|
50
|
+
|
|
51
|
+
// src/types/schema.ts
|
|
52
|
+
import * as Schema from "effect/Schema";
|
|
53
|
+
import { Capability as Capability2, Common as Common3 } from "@dxos/app-framework";
|
|
54
|
+
import { Operation } from "@dxos/operation";
|
|
55
|
+
import { ATTENDABLE_PATH_SEPARATOR } from "@dxos/react-ui-attention";
|
|
56
|
+
var PLANK_COMPANION_TYPE = `${meta.id}/plank-companion`;
|
|
57
|
+
var DECK_COMPANION_TYPE = `${meta.id}/deck-companion`;
|
|
58
|
+
var NewPlankPositions = [
|
|
59
|
+
"start",
|
|
60
|
+
"end"
|
|
61
|
+
];
|
|
62
|
+
var OverscrollOptions = [
|
|
63
|
+
"none",
|
|
64
|
+
"centering"
|
|
65
|
+
];
|
|
66
|
+
var DeckSettingsSchema = Schema.Struct({
|
|
67
|
+
showHints: Schema.optional(Schema.Boolean),
|
|
68
|
+
enableDeck: Schema.optional(Schema.Boolean),
|
|
69
|
+
enableStatusbar: Schema.optional(Schema.Boolean),
|
|
70
|
+
enableNativeRedirect: Schema.optional(Schema.Boolean),
|
|
71
|
+
newPlankPositioning: Schema.optional(Schema.Literal(...NewPlankPositions)),
|
|
72
|
+
overscroll: Schema.optional(Schema.Literal(...OverscrollOptions)),
|
|
73
|
+
// TODO(burdon): Rename layoutMode? (e.g., bento | encapsulated?)
|
|
74
|
+
encapsulatedPlanks: Schema.optional(Schema.Boolean)
|
|
75
|
+
}).pipe(Schema.mutable);
|
|
76
|
+
var PlankSizing = Schema.Record({
|
|
77
|
+
key: Schema.String,
|
|
78
|
+
value: Schema.Number
|
|
79
|
+
});
|
|
80
|
+
var DeckState = Schema.Struct({
|
|
81
|
+
/** If false, the deck has not yet left solo mode and new planks should be soloed. */
|
|
82
|
+
initialized: Schema.Boolean,
|
|
83
|
+
active: Schema.mutable(Schema.Array(Schema.String)),
|
|
84
|
+
// TODO(wittjosiah): Piping into both mutable and optional caused invalid typescript output.
|
|
85
|
+
activeCompanions: Schema.optional(Schema.mutable(Schema.Record({
|
|
86
|
+
key: Schema.String,
|
|
87
|
+
value: Schema.String
|
|
88
|
+
}))),
|
|
89
|
+
inactive: Schema.mutable(Schema.Array(Schema.String)),
|
|
90
|
+
solo: Schema.optional(Schema.String),
|
|
91
|
+
fullscreen: Schema.Boolean,
|
|
92
|
+
plankSizing: Schema.mutable(PlankSizing),
|
|
93
|
+
companionFrameSizing: Schema.mutable(PlankSizing)
|
|
94
|
+
});
|
|
95
|
+
var defaultDeck = {
|
|
96
|
+
initialized: false,
|
|
97
|
+
active: [],
|
|
98
|
+
activeCompanions: {},
|
|
99
|
+
inactive: [],
|
|
100
|
+
solo: void 0,
|
|
101
|
+
fullscreen: false,
|
|
102
|
+
plankSizing: {},
|
|
103
|
+
companionFrameSizing: {}
|
|
104
|
+
};
|
|
105
|
+
var LayoutMode = Schema.Literal("deck", "solo", "solo--fullscreen");
|
|
106
|
+
var isLayoutMode = (value) => Schema.is(LayoutMode)(value);
|
|
107
|
+
var getMode = (deck) => {
|
|
108
|
+
if (deck.solo) {
|
|
109
|
+
return deck.fullscreen ? "solo--fullscreen" : "solo";
|
|
110
|
+
}
|
|
111
|
+
return "deck";
|
|
112
|
+
};
|
|
113
|
+
var DeckStateSchema = Schema.Struct({
|
|
114
|
+
sidebarState: Schema.Literal("closed", "collapsed", "expanded"),
|
|
115
|
+
complementarySidebarState: Schema.Literal("closed", "collapsed", "expanded"),
|
|
116
|
+
complementarySidebarPanel: Schema.optional(Schema.String),
|
|
117
|
+
activeDeck: Schema.String,
|
|
118
|
+
previousDeck: Schema.String,
|
|
119
|
+
decks: Schema.mutable(Schema.Record({
|
|
120
|
+
key: Schema.String,
|
|
121
|
+
value: Schema.mutable(DeckState)
|
|
122
|
+
})),
|
|
123
|
+
previousMode: Schema.mutable(Schema.Record({
|
|
124
|
+
key: Schema.String,
|
|
125
|
+
value: LayoutMode
|
|
126
|
+
}))
|
|
127
|
+
}).pipe(Schema.mutable);
|
|
128
|
+
var DeckEphemeralStateSchema = Schema.Struct({
|
|
129
|
+
dialogOpen: Schema.Boolean,
|
|
130
|
+
dialogType: Schema.optional(Schema.Literal("default", "alert")),
|
|
131
|
+
dialogBlockAlign: Schema.optional(Schema.Literal("start", "center", "end")),
|
|
132
|
+
dialogOverlayClasses: Schema.optional(Schema.String),
|
|
133
|
+
dialogOverlayStyle: Schema.optional(Schema.Record({
|
|
134
|
+
key: Schema.String,
|
|
135
|
+
value: Schema.Any
|
|
136
|
+
})),
|
|
137
|
+
/** Data to be passed to the dialog Surface. */
|
|
138
|
+
dialogContent: Schema.optional(Schema.Any),
|
|
139
|
+
popoverOpen: Schema.Boolean,
|
|
140
|
+
popoverSide: Schema.optional(Schema.Literal("top", "right", "bottom", "left")),
|
|
141
|
+
popoverAnchor: Schema.optional(Schema.Any),
|
|
142
|
+
popoverAnchorId: Schema.optional(Schema.String),
|
|
143
|
+
popoverKind: Schema.optional(Schema.Literal("base", "card")),
|
|
144
|
+
popoverTitle: Schema.optional(Common3.Label.annotations({
|
|
145
|
+
description: "The title of the popover."
|
|
146
|
+
})),
|
|
147
|
+
/** Data to be passed to the popover Surface. */
|
|
148
|
+
popoverContent: Schema.optional(Schema.Any),
|
|
149
|
+
toasts: Schema.mutable(Schema.Array(Common3.LayoutOperation.Toast)),
|
|
150
|
+
currentUndoId: Schema.optional(Schema.String),
|
|
151
|
+
/** The identifier of a component to scroll into view when it is mounted. */
|
|
152
|
+
scrollIntoView: Schema.optional(Schema.String)
|
|
153
|
+
}).pipe(Schema.mutable);
|
|
154
|
+
(function(DeckAction2) {
|
|
155
|
+
const PartAdjustmentSchema = Schema.Union(Schema.Literal("close").annotations({
|
|
156
|
+
description: "Close the plank."
|
|
157
|
+
}), Schema.Literal("companion").annotations({
|
|
158
|
+
description: "Open the companion plank."
|
|
159
|
+
}), Schema.Literal("solo").annotations({
|
|
160
|
+
description: "Solo the plank."
|
|
161
|
+
}), Schema.Literal("solo--fullscreen").annotations({
|
|
162
|
+
description: "Fullscreen the plank."
|
|
163
|
+
}), Schema.Literal("increment-start").annotations({
|
|
164
|
+
description: "Move the plank towards the start of the deck."
|
|
165
|
+
}), Schema.Literal("increment-end").annotations({
|
|
166
|
+
description: "Move the plank towards the end of the deck."
|
|
167
|
+
}));
|
|
168
|
+
DeckAction2.Adjustment = Schema.mutable(Schema.Struct({
|
|
169
|
+
id: Schema.String,
|
|
170
|
+
type: PartAdjustmentSchema
|
|
171
|
+
}));
|
|
172
|
+
class Adjust extends Schema.TaggedClass()(`${meta.id}/action/adjust`, {
|
|
173
|
+
input: DeckAction2.Adjustment,
|
|
174
|
+
output: Schema.Void
|
|
175
|
+
}) {
|
|
176
|
+
}
|
|
177
|
+
DeckAction2.Adjust = Adjust;
|
|
178
|
+
class UpdatePlankSize extends Schema.TaggedClass()(`${meta.id}/action/update-plank-size`, {
|
|
179
|
+
input: Schema.Struct({
|
|
180
|
+
id: Schema.String,
|
|
181
|
+
size: Schema.Number
|
|
182
|
+
}),
|
|
183
|
+
output: Schema.Void
|
|
184
|
+
}) {
|
|
185
|
+
}
|
|
186
|
+
DeckAction2.UpdatePlankSize = UpdatePlankSize;
|
|
187
|
+
class ChangeCompanion extends Schema.TaggedClass()(`${meta.id}/action/change-companion`, {
|
|
188
|
+
input: Schema.Struct({
|
|
189
|
+
primary: Schema.String,
|
|
190
|
+
companion: Schema.Union(Schema.String, Schema.Null)
|
|
191
|
+
}),
|
|
192
|
+
output: Schema.Void
|
|
193
|
+
}) {
|
|
194
|
+
}
|
|
195
|
+
DeckAction2.ChangeCompanion = ChangeCompanion;
|
|
196
|
+
})(DeckAction || (DeckAction = {}));
|
|
197
|
+
(function(DeckOperation2) {
|
|
198
|
+
const PartAdjustmentSchema = Schema.Union(Schema.Literal("close").annotations({
|
|
199
|
+
description: "Close the plank."
|
|
200
|
+
}), Schema.Literal("companion").annotations({
|
|
201
|
+
description: "Open the companion plank."
|
|
202
|
+
}), Schema.Literal("solo").annotations({
|
|
203
|
+
description: "Solo the plank."
|
|
204
|
+
}), Schema.Literal("solo--fullscreen").annotations({
|
|
205
|
+
description: "Fullscreen the plank."
|
|
206
|
+
}), Schema.Literal("increment-start").annotations({
|
|
207
|
+
description: "Move the plank towards the start of the deck."
|
|
208
|
+
}), Schema.Literal("increment-end").annotations({
|
|
209
|
+
description: "Move the plank towards the end of the deck."
|
|
210
|
+
}));
|
|
211
|
+
DeckOperation2.Adjust = Operation.make({
|
|
212
|
+
meta: {
|
|
213
|
+
key: `${meta.id}/operation/adjust`,
|
|
214
|
+
name: "Adjust",
|
|
215
|
+
description: "Adjust the layout of a plank."
|
|
216
|
+
},
|
|
217
|
+
services: [
|
|
218
|
+
Capability2.Service
|
|
219
|
+
],
|
|
220
|
+
schema: {
|
|
221
|
+
input: Schema.Struct({
|
|
222
|
+
id: Schema.String.annotations({
|
|
223
|
+
description: "The id of the plank to adjust."
|
|
224
|
+
}),
|
|
225
|
+
type: PartAdjustmentSchema.annotations({
|
|
226
|
+
description: "The type of adjustment to make."
|
|
227
|
+
})
|
|
228
|
+
}),
|
|
229
|
+
output: Schema.Void
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
DeckOperation2.UpdatePlankSize = Operation.make({
|
|
233
|
+
meta: {
|
|
234
|
+
key: `${meta.id}/operation/update-plank-size`,
|
|
235
|
+
name: "Update Plank Size",
|
|
236
|
+
description: "Update the size of a plank."
|
|
237
|
+
},
|
|
238
|
+
services: [
|
|
239
|
+
Capability2.Service
|
|
240
|
+
],
|
|
241
|
+
schema: {
|
|
242
|
+
input: Schema.Struct({
|
|
243
|
+
id: Schema.String.annotations({
|
|
244
|
+
description: "The id of the plank to resize."
|
|
245
|
+
}),
|
|
246
|
+
size: Schema.Number.annotations({
|
|
247
|
+
description: "The new size of the plank."
|
|
248
|
+
})
|
|
249
|
+
}),
|
|
250
|
+
output: Schema.Void
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
DeckOperation2.ChangeCompanion = Operation.make({
|
|
254
|
+
meta: {
|
|
255
|
+
key: `${meta.id}/operation/change-companion`,
|
|
256
|
+
name: "Change Companion",
|
|
257
|
+
description: "Change the companion plank for a primary plank."
|
|
258
|
+
},
|
|
259
|
+
services: [
|
|
260
|
+
Capability2.Service
|
|
261
|
+
],
|
|
262
|
+
schema: {
|
|
263
|
+
input: Schema.Struct({
|
|
264
|
+
primary: Schema.String,
|
|
265
|
+
companion: Schema.Union(Schema.String, Schema.Null)
|
|
266
|
+
}),
|
|
267
|
+
output: Schema.Void
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
})(DeckOperation || (DeckOperation = {}));
|
|
271
|
+
var DeckAction;
|
|
272
|
+
var DeckOperation;
|
|
273
|
+
|
|
274
|
+
export {
|
|
275
|
+
meta,
|
|
276
|
+
DeckCapabilities,
|
|
277
|
+
DeckEvents,
|
|
278
|
+
PLANK_COMPANION_TYPE,
|
|
279
|
+
DECK_COMPANION_TYPE,
|
|
280
|
+
NewPlankPositions,
|
|
281
|
+
OverscrollOptions,
|
|
282
|
+
DeckSettingsSchema,
|
|
283
|
+
PlankSizing,
|
|
284
|
+
DeckState,
|
|
285
|
+
defaultDeck,
|
|
286
|
+
isLayoutMode,
|
|
287
|
+
getMode,
|
|
288
|
+
DeckStateSchema,
|
|
289
|
+
DeckEphemeralStateSchema,
|
|
290
|
+
DeckAction,
|
|
291
|
+
DeckOperation,
|
|
292
|
+
ATTENDABLE_PATH_SEPARATOR
|
|
293
|
+
};
|
|
294
|
+
//# sourceMappingURL=chunk-XAKTY3EB.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/types/capabilities.ts", "../../../src/meta.ts", "../../../src/types/events.ts", "../../../src/types/schema.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Atom } from '@effect-atom/atom-react';\nimport * as Effect from 'effect/Effect';\n\nimport { Capability, Common } from '@dxos/app-framework';\nimport { invariant } from '@dxos/invariant';\n\nimport { meta } from '../meta';\nimport { type DeckEphemeralStateProps, type DeckSettingsProps, type DeckState, type DeckStateProps } from '../types';\n\nexport namespace DeckCapabilities {\n export const Settings = Capability.make<Atom.Writable<DeckSettingsProps>>(`${meta.id}/capability/settings`);\n\n /** Persisted state (stored in KVS/localStorage). */\n export const State = Capability.make<Atom.Writable<DeckStateProps>>(`${meta.id}/capability/state`);\n\n /** Transient/ephemeral state (not persisted). */\n export const EphemeralState = Capability.make<Atom.Writable<DeckEphemeralStateProps>>(\n `${meta.id}/capability/ephemeral-state`,\n );\n\n /** Get the current active deck from state. */\n export const getDeck = (): Effect.Effect<DeckState, Error, Capability.Service> =>\n Effect.gen(function* () {\n const state = yield* Common.Capability.getAtomValue(State);\n const deck = state.decks[state.activeDeck];\n invariant(deck, `Deck not found: ${state.activeDeck}`);\n return deck;\n });\n}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'dxos.org/plugin/deck',\n name: 'Layout',\n description: trim`\n Flexible layout system for arranging workspace views in tabs, splits, and panels.\n Customize your workspace organization with drag-and-drop layout management.\n `,\n icon: 'ph--layout--regular',\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type ActivationEvent, Common } from '@dxos/app-framework';\n\nimport { meta } from '../meta';\n\nimport { DeckCapabilities } from './capabilities';\n\nexport namespace DeckEvents {\n export const StateReady: ActivationEvent.ActivationEvent = Common.ActivationEvent.createStateEvent(\n `${meta.id}/state-ready`,\n );\n\n /** Fired when DeckSettings capability is ready. */\n export const SettingsReady: ActivationEvent.ActivationEvent = Common.ActivationEvent.createSettingsEvent(\n DeckCapabilities.Settings.identifier,\n );\n}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Capability, Common } from '@dxos/app-framework';\nimport { Operation } from '@dxos/operation';\nimport { type DeepReadonly } from '@dxos/util';\n\nimport { meta } from '../meta';\n\nexport { ATTENDABLE_PATH_SEPARATOR } from '@dxos/react-ui-attention';\n\nexport const PLANK_COMPANION_TYPE = `${meta.id}/plank-companion`;\nexport const DECK_COMPANION_TYPE = `${meta.id}/deck-companion`;\n\n// TODO(Zan): In the future we should consider adding new planks adjacent to the attended plank.\nexport const NewPlankPositions = ['start', 'end'] as const;\nexport type NewPlankPositioning = (typeof NewPlankPositions)[number];\n\nexport const OverscrollOptions = ['none', 'centering'] as const;\nexport type Overscroll = (typeof OverscrollOptions)[number];\n\nexport type Part = 'solo' | 'deck' | 'complementary';\nexport type ResolvedPart = Part | 'solo-primary' | 'solo-companion';\n\nexport const DeckSettingsSchema = Schema.Struct({\n showHints: Schema.optional(Schema.Boolean),\n enableDeck: Schema.optional(Schema.Boolean),\n enableStatusbar: Schema.optional(Schema.Boolean),\n enableNativeRedirect: Schema.optional(Schema.Boolean),\n newPlankPositioning: Schema.optional(Schema.Literal(...NewPlankPositions)),\n overscroll: Schema.optional(Schema.Literal(...OverscrollOptions)),\n // TODO(burdon): Rename layoutMode? (e.g., bento | encapsulated?)\n encapsulatedPlanks: Schema.optional(Schema.Boolean),\n}).pipe(Schema.mutable);\nexport type DeckSettingsProps = Schema.Schema.Type<typeof DeckSettingsSchema>;\n\nexport const PlankSizing = Schema.Record({ key: Schema.String, value: Schema.Number });\nexport type PlankSizing = Schema.Schema.Type<typeof PlankSizing>;\n\n// State of an individual deck.\nexport const DeckState = Schema.Struct({\n /** If false, the deck has not yet left solo mode and new planks should be soloed. */\n initialized: Schema.Boolean,\n active: Schema.mutable(Schema.Array(Schema.String)),\n // TODO(wittjosiah): Piping into both mutable and optional caused invalid typescript output.\n activeCompanions: Schema.optional(Schema.mutable(Schema.Record({ key: Schema.String, value: Schema.String }))),\n inactive: Schema.mutable(Schema.Array(Schema.String)),\n solo: Schema.optional(Schema.String),\n fullscreen: Schema.Boolean,\n plankSizing: Schema.mutable(PlankSizing),\n companionFrameSizing: Schema.mutable(PlankSizing),\n});\nexport type DeckState = Schema.Schema.Type<typeof DeckState>;\n\nexport const defaultDeck: DeckState = {\n initialized: false,\n active: [],\n activeCompanions: {},\n inactive: [],\n solo: undefined,\n fullscreen: false,\n plankSizing: {},\n companionFrameSizing: {},\n};\n\nconst LayoutMode = Schema.Literal('deck', 'solo', 'solo--fullscreen');\nexport type LayoutMode = Schema.Schema.Type<typeof LayoutMode>;\nexport const isLayoutMode = (value: any): value is LayoutMode => Schema.is(LayoutMode)(value);\n\nexport const getMode = (deck: DeckState | DeepReadonly<DeckState>): LayoutMode => {\n if (deck.solo) {\n return deck.fullscreen ? 'solo--fullscreen' : 'solo';\n }\n\n return 'deck';\n};\n\n// Persisted plugin state (stored in KVS/localStorage).\nexport const DeckStateSchema = Schema.Struct({\n sidebarState: Schema.Literal('closed', 'collapsed', 'expanded'),\n complementarySidebarState: Schema.Literal('closed', 'collapsed', 'expanded'),\n complementarySidebarPanel: Schema.optional(Schema.String),\n activeDeck: Schema.String,\n previousDeck: Schema.String,\n decks: Schema.mutable(Schema.Record({ key: Schema.String, value: Schema.mutable(DeckState) })),\n previousMode: Schema.mutable(Schema.Record({ key: Schema.String, value: LayoutMode })),\n}).pipe(Schema.mutable);\nexport type DeckStateProps = Schema.Schema.Type<typeof DeckStateSchema>;\n\n// Transient/ephemeral plugin state (not persisted).\nexport const DeckEphemeralStateSchema = Schema.Struct({\n dialogOpen: Schema.Boolean,\n dialogType: Schema.optional(Schema.Literal('default', 'alert')),\n dialogBlockAlign: Schema.optional(Schema.Literal('start', 'center', 'end')),\n dialogOverlayClasses: Schema.optional(Schema.String),\n dialogOverlayStyle: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n /** Data to be passed to the dialog Surface. */\n dialogContent: Schema.optional(Schema.Any),\n\n popoverOpen: Schema.Boolean,\n popoverSide: Schema.optional(Schema.Literal('top', 'right', 'bottom', 'left')),\n popoverAnchor: Schema.optional(Schema.Any),\n popoverAnchorId: Schema.optional(Schema.String),\n popoverKind: Schema.optional(Schema.Literal('base', 'card')),\n popoverTitle: Schema.optional(Common.Label.annotations({ description: 'The title of the popover.' })),\n /** Data to be passed to the popover Surface. */\n popoverContent: Schema.optional(Schema.Any),\n\n toasts: Schema.mutable(Schema.Array(Common.LayoutOperation.Toast)),\n currentUndoId: Schema.optional(Schema.String),\n\n /** The identifier of a component to scroll into view when it is mounted. */\n scrollIntoView: Schema.optional(Schema.String),\n}).pipe(Schema.mutable);\nexport type DeckEphemeralStateProps = Schema.Schema.Type<typeof DeckEphemeralStateSchema>;\n\n// Combined state type (for convenience in components that need both).\nexport type DeckPluginState = DeckStateProps & DeckEphemeralStateProps;\n\nexport namespace DeckAction {\n const PartAdjustmentSchema = Schema.Union(\n Schema.Literal('close').annotations({ description: 'Close the plank.' }),\n Schema.Literal('companion').annotations({ description: 'Open the companion plank.' }),\n Schema.Literal('solo').annotations({ description: 'Solo the plank.' }),\n Schema.Literal('solo--fullscreen').annotations({ description: 'Fullscreen the plank.' }),\n Schema.Literal('increment-start').annotations({ description: 'Move the plank towards the start of the deck.' }),\n Schema.Literal('increment-end').annotations({ description: 'Move the plank towards the end of the deck.' }),\n );\n export type PartAdjustment = Schema.Schema.Type<typeof PartAdjustmentSchema>;\n export const Adjustment = Schema.mutable(Schema.Struct({ id: Schema.String, type: PartAdjustmentSchema }));\n export type Adjustment = Schema.Schema.Type<typeof Adjustment>;\n\n // An atomic transaction to apply to the deck, describing which element to move to which location.\n export class Adjust extends Schema.TaggedClass<Adjust>()(`${meta.id}/action/adjust`, {\n input: Adjustment,\n output: Schema.Void,\n }) {}\n\n export class UpdatePlankSize extends Schema.TaggedClass<UpdatePlankSize>()(`${meta.id}/action/update-plank-size`, {\n input: Schema.Struct({\n id: Schema.String,\n size: Schema.Number,\n }),\n output: Schema.Void,\n }) {}\n\n export class ChangeCompanion extends Schema.TaggedClass<ChangeCompanion>()(`${meta.id}/action/change-companion`, {\n input: Schema.Struct({\n primary: Schema.String,\n companion: Schema.Union(Schema.String, Schema.Null),\n }),\n output: Schema.Void,\n }) {}\n}\n\n/**\n * Operations for the Deck plugin.\n */\nexport namespace DeckOperation {\n const PartAdjustmentSchema = Schema.Union(\n Schema.Literal('close').annotations({ description: 'Close the plank.' }),\n Schema.Literal('companion').annotations({ description: 'Open the companion plank.' }),\n Schema.Literal('solo').annotations({ description: 'Solo the plank.' }),\n Schema.Literal('solo--fullscreen').annotations({ description: 'Fullscreen the plank.' }),\n Schema.Literal('increment-start').annotations({ description: 'Move the plank towards the start of the deck.' }),\n Schema.Literal('increment-end').annotations({ description: 'Move the plank towards the end of the deck.' }),\n );\n export type PartAdjustment = Schema.Schema.Type<typeof PartAdjustmentSchema>;\n\n export const Adjust = Operation.make({\n meta: {\n key: `${meta.id}/operation/adjust`,\n name: 'Adjust',\n description: 'Adjust the layout of a plank.',\n },\n services: [Capability.Service],\n schema: {\n input: Schema.Struct({\n id: Schema.String.annotations({ description: 'The id of the plank to adjust.' }),\n type: PartAdjustmentSchema.annotations({ description: 'The type of adjustment to make.' }),\n }),\n output: Schema.Void,\n },\n });\n\n export const UpdatePlankSize = Operation.make({\n meta: {\n key: `${meta.id}/operation/update-plank-size`,\n name: 'Update Plank Size',\n description: 'Update the size of a plank.',\n },\n services: [Capability.Service],\n schema: {\n input: Schema.Struct({\n id: Schema.String.annotations({ description: 'The id of the plank to resize.' }),\n size: Schema.Number.annotations({ description: 'The new size of the plank.' }),\n }),\n output: Schema.Void,\n },\n });\n\n export const ChangeCompanion = Operation.make({\n meta: {\n key: `${meta.id}/operation/change-companion`,\n name: 'Change Companion',\n description: 'Change the companion plank for a primary plank.',\n },\n services: [Capability.Service],\n schema: {\n input: Schema.Struct({\n primary: Schema.String,\n companion: Schema.Union(Schema.String, Schema.Null),\n }),\n output: Schema.Void,\n },\n });\n}\n"],
|
|
5
|
+
"mappings": ";;;AAKA,YAAYA,YAAY;AAExB,SAASC,YAAYC,cAAc;AACnC,SAASC,iBAAiB;;;ACH1B,SAASC,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaC;;;;EAI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rB,KAAKC,EAAE;MACf4F,MAAM;MACN1B,aAAa;IACf;IACA2B,UAAU;MAACC,YAAWC;;IACtBC,QAAQ;MACNhB,OAAc3E,cAAO;QACnBL,IAAWqB,cAAO4C,YAAY;UAAEC,aAAa;QAAiC,CAAA;QAC9EW,MAAMH,qBAAqBT,YAAY;UAAEC,aAAa;QAAkC,CAAA;MAC1F,CAAA;MACAe,QAAeC;IACjB;EACF,CAAA;iBAEaC,kBAAkBO,UAAUC,KAAK;IAC5C5F,MAAM;MACJqB,KAAK,GAAGrB,KAAKC,EAAE;MACf4F,MAAM;MACN1B,aAAa;IACf;IACA2B,UAAU;MAACC,YAAWC;;IACtBC,QAAQ;MACNhB,OAAc3E,cAAO;QACnBL,IAAWqB,cAAO4C,YAAY;UAAEC,aAAa;QAAiC,CAAA;QAC9EkB,MAAa7D,cAAO0C,YAAY;UAAEC,aAAa;QAA6B,CAAA;MAC9E,CAAA;MACAe,QAAeC;IACjB;EACF,CAAA;iBAEaG,kBAAkBK,UAAUC,KAAK;IAC5C5F,MAAM;MACJqB,KAAK,GAAGrB,KAAKC,EAAE;MACf4F,MAAM;MACN1B,aAAa;IACf;IACA2B,UAAU;MAACC,YAAWC;;IACtBC,QAAQ;MACNhB,OAAc3E,cAAO;QACnBiF,SAAgBjE;QAChBkE,WAAkBZ,aAAatD,eAAemE,WAAI;MACpD,CAAA;MACAP,QAAeC;IACjB;EACF,CAAA;AACF,GA1DiBO,kBAAAA,gBAAAA,CAAAA,EAAAA;;;",
|
|
6
|
+
"names": ["Effect", "Capability", "Common", "invariant", "trim", "meta", "id", "name", "description", "trim", "icon", "DeckCapabilities", "Settings", "Capability", "make", "meta", "id", "State", "EphemeralState", "getDeck", "gen", "state", "Common", "getAtomValue", "deck", "decks", "activeDeck", "invariant", "Common", "DeckEvents", "StateReady", "Common", "ActivationEvent", "createStateEvent", "meta", "id", "SettingsReady", "createSettingsEvent", "DeckCapabilities", "Settings", "identifier", "Schema", "Capability", "Common", "Operation", "ATTENDABLE_PATH_SEPARATOR", "PLANK_COMPANION_TYPE", "meta", "id", "DECK_COMPANION_TYPE", "NewPlankPositions", "OverscrollOptions", "DeckSettingsSchema", "Struct", "showHints", "optional", "Boolean", "enableDeck", "enableStatusbar", "enableNativeRedirect", "newPlankPositioning", "Literal", "overscroll", "encapsulatedPlanks", "pipe", "mutable", "PlankSizing", "Record", "key", "String", "value", "Number", "DeckState", "initialized", "active", "Array", "activeCompanions", "inactive", "solo", "fullscreen", "plankSizing", "companionFrameSizing", "defaultDeck", "undefined", "LayoutMode", "isLayoutMode", "is", "getMode", "deck", "DeckStateSchema", "sidebarState", "complementarySidebarState", "complementarySidebarPanel", "activeDeck", "previousDeck", "decks", "previousMode", "DeckEphemeralStateSchema", "dialogOpen", "dialogType", "dialogBlockAlign", "dialogOverlayClasses", "dialogOverlayStyle", "Any", "dialogContent", "popoverOpen", "popoverSide", "popoverAnchor", "popoverAnchorId", "popoverKind", "popoverTitle", "Common", "Label", "annotations", "description", "popoverContent", "toasts", "LayoutOperation", "Toast", "currentUndoId", "scrollIntoView", "DeckAction", "PartAdjustmentSchema", "Union", "Adjustment", "type", "Adjust", "TaggedClass", "input", "output", "Void", "UpdatePlankSize", "size", "ChangeCompanion", "primary", "companion", "Null", "DeckOperation", "Operation", "make", "name", "services", "Capability", "Service", "schema"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
useCompanions
|
|
4
|
+
} from "./chunk-SKEVPQ7E.mjs";
|
|
5
|
+
import {
|
|
6
|
+
DeckCapabilities,
|
|
7
|
+
DeckEvents,
|
|
8
|
+
meta
|
|
9
|
+
} from "./chunk-XAKTY3EB.mjs";
|
|
10
|
+
|
|
11
|
+
// src/DeckPlugin.ts
|
|
12
|
+
import { setAutoFreeze } from "immer";
|
|
13
|
+
import { ActivationEvent, Common, Plugin } from "@dxos/app-framework";
|
|
14
|
+
import { translations as stackTranslations } from "@dxos/react-ui-stack";
|
|
15
|
+
|
|
16
|
+
// src/capabilities/app-graph-builder/index.ts
|
|
17
|
+
import { Capability } from "@dxos/app-framework";
|
|
18
|
+
var AppGraphBuilder = Capability.lazy("AppGraphBuilder", () => import("./app-graph-builder-473BNZDJ.mjs"));
|
|
19
|
+
|
|
20
|
+
// src/capabilities/check-app-scheme/index.ts
|
|
21
|
+
import { Capability as Capability2 } from "@dxos/app-framework";
|
|
22
|
+
var CheckAppScheme = Capability2.lazy("CheckAppScheme", () => import("./check-app-scheme-IVYRHKRH.mjs"));
|
|
23
|
+
|
|
24
|
+
// src/capabilities/operation-resolver/index.ts
|
|
25
|
+
import { Capability as Capability$ } from "@dxos/app-framework";
|
|
26
|
+
var LayoutOperationResolver = Capability$.lazy("LayoutOperationResolver", () => import("./operation-resolver-WUOE33ID.mjs"));
|
|
27
|
+
|
|
28
|
+
// src/capabilities/react-root/index.ts
|
|
29
|
+
import { Capability as Capability3 } from "@dxos/app-framework";
|
|
30
|
+
var ReactRoot = Capability3.lazy("ReactRoot", () => import("./react-root-O6GZO62Z.mjs"));
|
|
31
|
+
|
|
32
|
+
// src/capabilities/react-surface/index.ts
|
|
33
|
+
import { Capability as Capability4 } from "@dxos/app-framework";
|
|
34
|
+
var ReactSurface = Capability4.lazy("ReactSurface", () => import("./react-surface-IHDJDGC5.mjs"));
|
|
35
|
+
|
|
36
|
+
// src/capabilities/settings/index.ts
|
|
37
|
+
import { Capability as Capability5 } from "@dxos/app-framework";
|
|
38
|
+
var DeckSettings = Capability5.lazy("DeckSettings", () => import("./settings-2HB6FKIK.mjs"));
|
|
39
|
+
|
|
40
|
+
// src/capabilities/state/index.ts
|
|
41
|
+
import { Capability as Capability6 } from "@dxos/app-framework";
|
|
42
|
+
var DeckState = Capability6.lazy("DeckState", () => import("./state-JRQ45ACJ.mjs"));
|
|
43
|
+
|
|
44
|
+
// src/capabilities/toolkit/index.ts
|
|
45
|
+
import { Capability as Capability7 } from "@dxos/app-framework";
|
|
46
|
+
var Toolkit = Capability7.lazy("Toolkit", () => import("./toolkit-JLPZNNKB.mjs"));
|
|
47
|
+
|
|
48
|
+
// src/capabilities/url-handler/index.ts
|
|
49
|
+
import { Capability as Capability8 } from "@dxos/app-framework";
|
|
50
|
+
var UrlHandler = Capability8.lazy("UrlHandler", () => import("./url-handler-QGF2R24T.mjs"));
|
|
51
|
+
|
|
52
|
+
// src/translations.ts
|
|
53
|
+
var translations = [
|
|
54
|
+
{
|
|
55
|
+
"en-US": {
|
|
56
|
+
[meta.id]: {
|
|
57
|
+
"plugin name": "Deck",
|
|
58
|
+
"settings title": "Deck settings",
|
|
59
|
+
"main header label": "Main header",
|
|
60
|
+
"open navigation sidebar label": "Open sidebar",
|
|
61
|
+
"collapse navigation sidebar label": "Minimize sidebar",
|
|
62
|
+
"open complementary sidebar label": "Open context sidebar",
|
|
63
|
+
"close complementary sidebar label": "Minimize context sidebar",
|
|
64
|
+
"sidebar title": "Navigation sidebar",
|
|
65
|
+
"complementary sidebar title": "Context sidebar",
|
|
66
|
+
"plugin error message": "Content failed to render.",
|
|
67
|
+
"content fallback message": "Unsupported",
|
|
68
|
+
"content fallback description": "No plugin had a response for the address you navigated\xA0to. Double-check the URL, and ensure you\u2019ve enabled a plugin that supports the\xA0object.",
|
|
69
|
+
"toggle fullscreen label": "Toggle fullscreen",
|
|
70
|
+
"settings show hints label": "Show hints",
|
|
71
|
+
"settings native redirect label": "Enable native url redirect (experimental)",
|
|
72
|
+
"settings new plank position start label": "Start",
|
|
73
|
+
"settings new plank position end label": "End",
|
|
74
|
+
"select new plank positioning placeholder": "Select new plank positioning",
|
|
75
|
+
"select new plank positioning label": "New plank positioning",
|
|
76
|
+
"undo available label": "Click to undo previous action.",
|
|
77
|
+
"undo action label": "Undo",
|
|
78
|
+
"undo action alt": "Undo previous action",
|
|
79
|
+
"undo close label": "Dismiss",
|
|
80
|
+
"error fallback message": "Unable to open this object",
|
|
81
|
+
"plank heading fallback label": "Untitled",
|
|
82
|
+
"actions menu label": "Options",
|
|
83
|
+
"settings deck label": "Disable deck",
|
|
84
|
+
"pending heading": "Loading\u2026",
|
|
85
|
+
"insert plank label": "Open",
|
|
86
|
+
"resize label": "Drag to resize",
|
|
87
|
+
"pin start label": "Pin to the left sidebar",
|
|
88
|
+
"pin end label": "Pin to the right sidebar",
|
|
89
|
+
"increment start label": "Move to the left",
|
|
90
|
+
"increment end label": "Move to the right",
|
|
91
|
+
"show deck plank label": "Return to deck",
|
|
92
|
+
"show solo plank label": "Maximize",
|
|
93
|
+
"exit fullscreen label": "Exit fullscreen",
|
|
94
|
+
"show fullscreen plank label": "Fullscreen",
|
|
95
|
+
"close label": "Close",
|
|
96
|
+
"minify label": "Minify",
|
|
97
|
+
"open companion label": "Open companion",
|
|
98
|
+
"close companion label": "Close companion",
|
|
99
|
+
"settings overscroll label": "Plank scrolling",
|
|
100
|
+
"select overscroll placeholder": "Select plank scrolling behavior",
|
|
101
|
+
"settings overscroll centering label": "Centering",
|
|
102
|
+
"settings overscroll none label": "None",
|
|
103
|
+
"settings enable statusbar label": "Show status bar",
|
|
104
|
+
"settings enable deck label": "Enable Deck",
|
|
105
|
+
"settings encapsulated planks label": "Encapsulated planks",
|
|
106
|
+
"close current label": "Close current plank",
|
|
107
|
+
"close others label": "Close other planks",
|
|
108
|
+
"close all label": "Close all planks",
|
|
109
|
+
"companion plank heading fallback label": "Related"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
];
|
|
114
|
+
|
|
115
|
+
// src/DeckPlugin.ts
|
|
116
|
+
setAutoFreeze(false);
|
|
117
|
+
var DeckPlugin = Plugin.define(meta).pipe(
|
|
118
|
+
Plugin.addModule({
|
|
119
|
+
activatesOn: Common.ActivationEvent.SetupSettings,
|
|
120
|
+
activatesAfter: [
|
|
121
|
+
DeckEvents.SettingsReady
|
|
122
|
+
],
|
|
123
|
+
activate: DeckSettings
|
|
124
|
+
}),
|
|
125
|
+
Plugin.addModule({
|
|
126
|
+
activatesOn: DeckEvents.SettingsReady,
|
|
127
|
+
activate: CheckAppScheme
|
|
128
|
+
}),
|
|
129
|
+
Plugin.addModule({
|
|
130
|
+
// TODO(wittjosiah): Does not integrate with settings store.
|
|
131
|
+
// Should this be a different event?
|
|
132
|
+
// Should settings store be renamed to be more generic?
|
|
133
|
+
activatesOn: ActivationEvent.oneOf(Common.ActivationEvent.SetupSettings, Common.ActivationEvent.SetupAppGraph),
|
|
134
|
+
activatesAfter: [
|
|
135
|
+
Common.ActivationEvent.LayoutReady,
|
|
136
|
+
DeckEvents.StateReady
|
|
137
|
+
],
|
|
138
|
+
activate: DeckState
|
|
139
|
+
}),
|
|
140
|
+
Common.Plugin.addTranslationsModule({
|
|
141
|
+
translations: [
|
|
142
|
+
...translations,
|
|
143
|
+
...stackTranslations
|
|
144
|
+
]
|
|
145
|
+
}),
|
|
146
|
+
Plugin.addModule({
|
|
147
|
+
activatesOn: Common.ActivationEvent.Startup,
|
|
148
|
+
activate: ReactRoot
|
|
149
|
+
}),
|
|
150
|
+
Common.Plugin.addSurfaceModule({
|
|
151
|
+
activate: ReactSurface
|
|
152
|
+
}),
|
|
153
|
+
Common.Plugin.addOperationResolverModule({
|
|
154
|
+
activate: LayoutOperationResolver
|
|
155
|
+
}),
|
|
156
|
+
Common.Plugin.addAppGraphModule({
|
|
157
|
+
activate: AppGraphBuilder
|
|
158
|
+
}),
|
|
159
|
+
// Plugin.addModule({
|
|
160
|
+
// activatesOn: Events.SetupArtifactDefinition,
|
|
161
|
+
// activate: Tools,
|
|
162
|
+
// }),
|
|
163
|
+
Plugin.addModule({
|
|
164
|
+
// TODO(wittjosiah): Shouldn't use the startup event.
|
|
165
|
+
activatesOn: Common.ActivationEvent.Startup,
|
|
166
|
+
activate: Toolkit
|
|
167
|
+
}),
|
|
168
|
+
Plugin.addModule({
|
|
169
|
+
activatesOn: ActivationEvent.allOf(Common.ActivationEvent.OperationInvokerReady, DeckEvents.StateReady),
|
|
170
|
+
activate: UrlHandler
|
|
171
|
+
}),
|
|
172
|
+
Plugin.make
|
|
173
|
+
);
|
|
174
|
+
export {
|
|
175
|
+
DeckCapabilities,
|
|
176
|
+
DeckEvents,
|
|
177
|
+
DeckPlugin,
|
|
178
|
+
meta,
|
|
179
|
+
useCompanions
|
|
180
|
+
};
|
|
181
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/DeckPlugin.ts", "../../../src/capabilities/app-graph-builder/index.ts", "../../../src/capabilities/check-app-scheme/index.ts", "../../../src/capabilities/operation-resolver/index.ts", "../../../src/capabilities/react-root/index.ts", "../../../src/capabilities/react-surface/index.ts", "../../../src/capabilities/settings/index.ts", "../../../src/capabilities/state/index.ts", "../../../src/capabilities/toolkit/index.ts", "../../../src/capabilities/url-handler/index.ts", "../../../src/translations.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { setAutoFreeze } from 'immer';\n\nimport { ActivationEvent, Common, Plugin } from '@dxos/app-framework';\nimport { translations as stackTranslations } from '@dxos/react-ui-stack';\n\nimport {\n AppGraphBuilder,\n CheckAppScheme,\n DeckSettings,\n DeckState,\n LayoutOperationResolver,\n ReactRoot,\n ReactSurface,\n Toolkit,\n UrlHandler,\n} from './capabilities';\nimport { meta } from './meta';\nimport { translations } from './translations';\nimport { DeckEvents } from './types';\n\n// NOTE(Zan): When producing values with immer, we shouldn't auto-freeze them because\n// our signal implementation needs to add some hidden properties to the produced values.\n// TODO(Zan): Move this to a more global location if we use immer more broadly.\nsetAutoFreeze(false);\n\nexport const DeckPlugin = Plugin.define(meta).pipe(\n Plugin.addModule({\n activatesOn: Common.ActivationEvent.SetupSettings,\n activatesAfter: [DeckEvents.SettingsReady],\n activate: DeckSettings,\n }),\n Plugin.addModule({\n activatesOn: DeckEvents.SettingsReady,\n activate: CheckAppScheme,\n }),\n Plugin.addModule({\n // TODO(wittjosiah): Does not integrate with settings store.\n // Should this be a different event?\n // Should settings store be renamed to be more generic?\n activatesOn: ActivationEvent.oneOf(Common.ActivationEvent.SetupSettings, Common.ActivationEvent.SetupAppGraph),\n activatesAfter: [Common.ActivationEvent.LayoutReady, DeckEvents.StateReady],\n activate: DeckState,\n }),\n Common.Plugin.addTranslationsModule({ translations: [...translations, ...stackTranslations] }),\n Plugin.addModule({\n activatesOn: Common.ActivationEvent.Startup,\n activate: ReactRoot,\n }),\n Common.Plugin.addSurfaceModule({ activate: ReactSurface }),\n Common.Plugin.addOperationResolverModule({ activate: LayoutOperationResolver }),\n Common.Plugin.addAppGraphModule({ activate: AppGraphBuilder }),\n // Plugin.addModule({\n // activatesOn: Events.SetupArtifactDefinition,\n // activate: Tools,\n // }),\n Plugin.addModule({\n // TODO(wittjosiah): Shouldn't use the startup event.\n activatesOn: Common.ActivationEvent.Startup,\n activate: Toolkit,\n }),\n Plugin.addModule({\n activatesOn: ActivationEvent.allOf(Common.ActivationEvent.OperationInvokerReady, DeckEvents.StateReady),\n activate: UrlHandler,\n }),\n Plugin.make,\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const CheckAppScheme = Capability.lazy('CheckAppScheme', () => import('./check-app-scheme'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Capability, Capability as Capability$ } from '@dxos/app-framework';\n\nexport const LayoutOperationResolver: Capability.LazyCapability = Capability$.lazy(\n 'LayoutOperationResolver',\n () => import('./operation-resolver'),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const ReactRoot = Capability.lazy('ReactRoot', () => import('./react-root'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const DeckSettings = Capability.lazy('DeckSettings', () => import('./settings'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const DeckState = Capability.lazy('DeckState', () => import('./state'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const Toolkit = Capability.lazy('Toolkit', () => import('./toolkit'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const UrlHandler = Capability.lazy('UrlHandler', () => import('./url-handler'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nimport { meta } from './meta';\n\nexport const translations = [\n {\n 'en-US': {\n [meta.id]: {\n 'plugin name': 'Deck',\n 'settings title': 'Deck settings',\n 'main header label': 'Main header',\n 'open navigation sidebar label': 'Open sidebar',\n 'collapse navigation sidebar label': 'Minimize sidebar',\n 'open complementary sidebar label': 'Open context sidebar',\n 'close complementary sidebar label': 'Minimize context sidebar',\n 'sidebar title': 'Navigation sidebar',\n 'complementary sidebar title': 'Context sidebar',\n 'plugin error message': 'Content failed to render.',\n 'content fallback message': 'Unsupported',\n 'content fallback description':\n 'No plugin had a response for the address you navigated to. Double-check the URL, and ensure you’ve enabled a plugin that supports the object.',\n 'toggle fullscreen label': 'Toggle fullscreen',\n 'settings show hints label': 'Show hints',\n 'settings native redirect label': 'Enable native url redirect (experimental)',\n 'settings new plank position start label': 'Start',\n 'settings new plank position end label': 'End',\n 'select new plank positioning placeholder': 'Select new plank positioning',\n 'select new plank positioning label': 'New plank positioning',\n 'undo available label': 'Click to undo previous action.',\n 'undo action label': 'Undo',\n 'undo action alt': 'Undo previous action',\n 'undo close label': 'Dismiss',\n 'error fallback message': 'Unable to open this object',\n 'plank heading fallback label': 'Untitled',\n 'actions menu label': 'Options',\n 'settings deck label': 'Disable deck',\n 'pending heading': 'Loading…',\n 'insert plank label': 'Open',\n 'resize label': 'Drag to resize',\n 'pin start label': 'Pin to the left sidebar',\n 'pin end label': 'Pin to the right sidebar',\n 'increment start label': 'Move to the left',\n 'increment end label': 'Move to the right',\n 'show deck plank label': 'Return to deck',\n 'show solo plank label': 'Maximize',\n 'exit fullscreen label': 'Exit fullscreen',\n 'show fullscreen plank label': 'Fullscreen',\n 'close label': 'Close',\n 'minify label': 'Minify',\n 'open companion label': 'Open companion',\n 'close companion label': 'Close companion',\n 'settings overscroll label': 'Plank scrolling',\n 'select overscroll placeholder': 'Select plank scrolling behavior',\n 'settings overscroll centering label': 'Centering',\n 'settings overscroll none label': 'None',\n 'settings enable statusbar label': 'Show status bar',\n 'settings enable deck label': 'Enable Deck',\n 'settings encapsulated planks label': 'Encapsulated planks',\n 'close current label': 'Close current plank',\n 'close others label': 'Close other planks',\n 'close all label': 'Close all planks',\n 'companion plank heading fallback label': 'Related',\n },\n },\n },\n] as const satisfies Resource[];\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;AAIA,SAASA,qBAAqB;AAE9B,SAASC,iBAAiBC,QAAQC,cAAc;AAChD,SAASC,gBAAgBC,yBAAyB;;;ACHlD,SAASC,kBAAkB;AAEpB,IAAMC,kBAAkBC,WAAWC,KAAK,mBAAmB,MAAM,OAAO,kCAAA,CAAA;;;ACF/E,SAASC,cAAAA,mBAAkB;AAEpB,IAAMC,iBAAiBC,YAAWC,KAAK,kBAAkB,MAAM,OAAO,iCAAA,CAAA;;;ACF7E,SAA0BC,cAAcC,mBAAmB;AAEpD,IAAMC,0BAAqDC,YAAYC,KAC5E,2BACA,MAAM,OAAO,mCAAA,CAAA;;;ACJf,SAASC,cAAAA,mBAAkB;AAEpB,IAAMC,YAAYC,YAAWC,KAAK,aAAa,MAAM,OAAO,2BAAA,CAAA;;;ACFnE,SAASC,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BAA8B;QAC9B,sCAAsC;QACtC,uBAAuB;QACvB,sBAAsB;QACtB,mBAAmB;QACnB,0CAA0C;MAC5C;IACF;EACF;;;;AVzCFC,cAAc,KAAA;AAEP,IAAMC,aAAaC,OAAOC,OAAOC,IAAAA,EAAMC;EAC5CH,OAAOI,UAAU;IACfC,aAAaC,OAAOC,gBAAgBC;IACpCC,gBAAgB;MAACC,WAAWC;;IAC5BC,UAAUC;EACZ,CAAA;EACAb,OAAOI,UAAU;IACfC,aAAaK,WAAWC;IACxBC,UAAUE;EACZ,CAAA;EACAd,OAAOI,UAAU;;;;IAIfC,aAAaE,gBAAgBQ,MAAMT,OAAOC,gBAAgBC,eAAeF,OAAOC,gBAAgBS,aAAa;IAC7GP,gBAAgB;MAACH,OAAOC,gBAAgBU;MAAaP,WAAWQ;;IAChEN,UAAUO;EACZ,CAAA;EACAb,OAAON,OAAOoB,sBAAsB;IAAEC,cAAc;SAAIA;SAAiBC;;EAAmB,CAAA;EAC5FtB,OAAOI,UAAU;IACfC,aAAaC,OAAOC,gBAAgBgB;IACpCX,UAAUY;EACZ,CAAA;EACAlB,OAAON,OAAOyB,iBAAiB;IAAEb,UAAUc;EAAa,CAAA;EACxDpB,OAAON,OAAO2B,2BAA2B;IAAEf,UAAUgB;EAAwB,CAAA;EAC7EtB,OAAON,OAAO6B,kBAAkB;IAAEjB,UAAUkB;EAAgB,CAAA;;;;;EAK5D9B,OAAOI,UAAU;;IAEfC,aAAaC,OAAOC,gBAAgBgB;IACpCX,UAAUmB;EACZ,CAAA;EACA/B,OAAOI,UAAU;IACfC,aAAaE,gBAAgByB,MAAM1B,OAAOC,gBAAgB0B,uBAAuBvB,WAAWQ,UAAU;IACtGN,UAAUsB;EACZ,CAAA;EACAlC,OAAOmC;AAAI;",
|
|
6
|
+
"names": ["setAutoFreeze", "ActivationEvent", "Common", "Plugin", "translations", "stackTranslations", "Capability", "AppGraphBuilder", "Capability", "lazy", "Capability", "CheckAppScheme", "Capability", "lazy", "Capability", "Capability$", "LayoutOperationResolver", "Capability$", "lazy", "Capability", "ReactRoot", "Capability", "lazy", "Capability", "ReactSurface", "Capability", "lazy", "Capability", "DeckSettings", "Capability", "lazy", "Capability", "DeckState", "Capability", "lazy", "Capability", "Toolkit", "Capability", "lazy", "Capability", "UrlHandler", "Capability", "lazy", "translations", "meta", "id", "setAutoFreeze", "DeckPlugin", "Plugin", "define", "meta", "pipe", "addModule", "activatesOn", "Common", "ActivationEvent", "SetupSettings", "activatesAfter", "DeckEvents", "SettingsReady", "activate", "DeckSettings", "CheckAppScheme", "oneOf", "SetupAppGraph", "LayoutReady", "StateReady", "DeckState", "addTranslationsModule", "translations", "stackTranslations", "Startup", "ReactRoot", "addSurfaceModule", "ReactSurface", "addOperationResolverModule", "LayoutOperationResolver", "addAppGraphModule", "AppGraphBuilder", "Toolkit", "allOf", "OperationInvokerReady", "UrlHandler", "make"]
|
|
7
|
+
}
|