@dxos/plugin-deck 0.6.14-staging.54a8bab → 0.6.14-staging.7b35391

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 (32) hide show
  1. package/dist/lib/browser/index.mjs +354 -314
  2. package/dist/lib/browser/index.mjs.map +4 -4
  3. package/dist/lib/browser/meta.json +1 -1
  4. package/dist/types/src/DeckPlugin.d.ts.map +1 -1
  5. package/dist/types/src/components/DeckLayout/ComplementarySidebar.d.ts +1 -2
  6. package/dist/types/src/components/DeckLayout/ComplementarySidebar.d.ts.map +1 -1
  7. package/dist/types/src/components/DeckLayout/DeckLayout.d.ts +1 -7
  8. package/dist/types/src/components/DeckLayout/DeckLayout.d.ts.map +1 -1
  9. package/dist/types/src/components/DeckLayout/NodePlankHeading.d.ts +3 -4
  10. package/dist/types/src/components/DeckLayout/NodePlankHeading.d.ts.map +1 -1
  11. package/dist/types/src/components/DeckLayout/Plank.d.ts +3 -3
  12. package/dist/types/src/components/DeckLayout/Plank.d.ts.map +1 -1
  13. package/dist/types/src/components/DeckLayout/PlankControls.d.ts +19 -0
  14. package/dist/types/src/components/DeckLayout/PlankControls.d.ts.map +1 -0
  15. package/dist/types/src/components/DeckLayout/PlankError.d.ts +1 -2
  16. package/dist/types/src/components/DeckLayout/PlankError.d.ts.map +1 -1
  17. package/dist/types/src/translations.d.ts +7 -0
  18. package/dist/types/src/translations.d.ts.map +1 -1
  19. package/dist/types/src/util/overscroll.d.ts +1 -2
  20. package/dist/types/src/util/overscroll.d.ts.map +1 -1
  21. package/package.json +27 -27
  22. package/src/DeckPlugin.tsx +5 -33
  23. package/src/components/DeckLayout/ComplementarySidebar.tsx +18 -23
  24. package/src/components/DeckLayout/DeckLayout.tsx +139 -136
  25. package/src/components/DeckLayout/NodePlankHeading.tsx +30 -17
  26. package/src/components/DeckLayout/Plank.tsx +50 -91
  27. package/src/components/DeckLayout/PlankControls.tsx +133 -0
  28. package/src/components/DeckLayout/PlankError.tsx +6 -8
  29. package/src/components/DeckLayout/PlankLoading.tsx +1 -1
  30. package/src/components/DeckLayout/Toast.tsx +1 -1
  31. package/src/translations.ts +11 -3
  32. package/src/util/overscroll.ts +9 -30
@@ -11,18 +11,17 @@ import {
11
11
  // packages/plugins/plugin-deck/src/DeckPlugin.tsx
12
12
  import { batch } from "@preact/signals-core";
13
13
  import { setAutoFreeze } from "immer";
14
- import React15 from "react";
15
- import { IntentAction, LayoutAction as LayoutAction3, NavigationAction as NavigationAction4, parseGraphPlugin, parseIntentPlugin, resolvePlugin, Toast as ToastSchema, SLUG_PATH_SEPARATOR as SLUG_PATH_SEPARATOR4, isLayoutParts, isLayoutAdjustment, isLayoutMode, openIds as openIds2, filterPlugins } from "@dxos/app-framework";
14
+ import React16 from "react";
15
+ import { IntentAction, LayoutAction as LayoutAction2, NavigationAction as NavigationAction3, parseGraphPlugin, parseIntentPlugin, resolvePlugin, Toast as ToastSchema, SLUG_PATH_SEPARATOR as SLUG_PATH_SEPARATOR4, isLayoutParts, isLayoutAdjustment, isLayoutMode, openIds as openIds2, filterPlugins } from "@dxos/app-framework";
16
16
  import { create, getTypename, isReactiveObject } from "@dxos/echo-schema";
17
17
  import { scheduledEffect } from "@dxos/echo-signals/core";
18
18
  import { LocalStorageStore } from "@dxos/local-storage";
19
19
  import { log } from "@dxos/log";
20
20
  import { parseAttentionPlugin } from "@dxos/plugin-attention";
21
- import { parseClientPlugin } from "@dxos/plugin-client";
22
21
  import { createExtension } from "@dxos/plugin-graph";
23
22
  import { ObservabilityAction } from "@dxos/plugin-observability/meta";
24
23
  import { fullyQualifiedId } from "@dxos/react-client/echo";
25
- import { translations as deckTranslations } from "@dxos/react-ui-deck";
24
+ import { translations as stackTranslations } from "@dxos/react-ui-stack";
26
25
 
27
26
  // packages/plugins/plugin-deck/src/components/DeckLayout/constants.ts
28
27
  var NAV_ID = "NavTree";
@@ -31,10 +30,10 @@ var SURFACE_PREFIX = "surface:";
31
30
  // packages/plugins/plugin-deck/src/components/DeckLayout/DeckLayout.tsx
32
31
  import { Sidebar as MenuIcon } from "@phosphor-icons/react";
33
32
  import { untracked } from "@preact/signals-core";
34
- import React13, { useCallback as useCallback2, useEffect as useEffect5, useMemo as useMemo5, useRef as useRef2 } from "react";
33
+ import React14, { useCallback as useCallback2, useEffect as useEffect5, useMemo as useMemo5, useRef as useRef2, Fragment as Fragment2 } from "react";
35
34
  import { Surface as Surface9, firstIdInPart, usePlugin } from "@dxos/app-framework";
36
35
  import { Button as Button3, Dialog, Main as Main3, Popover as Popover2, useOnTransition, useTranslation as useTranslation5 } from "@dxos/react-ui";
37
- import { Deck } from "@dxos/react-ui-deck";
36
+ import { Stack, StackContext as StackContext2, DEFAULT_HORIZONTAL_SIZE } from "@dxos/react-ui-stack";
38
37
  import { getSize, mainPaddingTransitions as mainPaddingTransitions2 } from "@dxos/react-ui-theme";
39
38
 
40
39
  // packages/plugins/plugin-deck/src/components/DeckLayout/ActiveNode.tsx
@@ -123,23 +122,99 @@ var ActiveNode = () => {
123
122
  };
124
123
 
125
124
  // packages/plugins/plugin-deck/src/components/DeckLayout/ComplementarySidebar.tsx
126
- import React5, { useMemo as useMemo2 } from "react";
125
+ import React6, { useMemo as useMemo2 } from "react";
127
126
  import { NavigationAction as NavigationAction2, SLUG_PATH_SEPARATOR as SLUG_PATH_SEPARATOR2, Surface as Surface3, useIntentDispatcher as useIntentDispatcher2 } from "@dxos/app-framework";
128
127
  import { useGraph as useGraph3 } from "@dxos/plugin-graph";
129
128
  import { Main } from "@dxos/react-ui";
130
129
  import { useAttended as useAttended2 } from "@dxos/react-ui-attention";
131
- import { deckGrid } from "@dxos/react-ui-deck";
130
+ import { railGridHorizontal, StackContext } from "@dxos/react-ui-stack";
132
131
  import { mx as mx2 } from "@dxos/react-ui-theme";
133
132
 
134
133
  // packages/plugins/plugin-deck/src/components/DeckLayout/NodePlankHeading.tsx
135
- import React2, { Fragment, memo, useEffect as useEffect3, useMemo } from "react";
134
+ import React3, { Fragment, memo, useEffect as useEffect3, useMemo } from "react";
136
135
  import { LayoutAction, NavigationAction, SLUG_PATH_SEPARATOR, Surface as Surface2, useIntentDispatcher } from "@dxos/app-framework";
137
136
  import { useGraph as useGraph2 } from "@dxos/plugin-graph";
138
- import { Icon, Popover, toLocalizedString, useMediaQuery, useTranslation } from "@dxos/react-ui";
139
- import { PlankHeading } from "@dxos/react-ui-deck";
137
+ import { Icon as Icon2, Popover, toLocalizedString, useMediaQuery, useTranslation as useTranslation2, IconButton } from "@dxos/react-ui";
138
+ import { StackItem } from "@dxos/react-ui-stack";
140
139
  import { TextTooltip } from "@dxos/react-ui-text-tooltip";
141
- var NodePlankHeading = /* @__PURE__ */ memo(({ coordinate, node, canIncrementStart, canIncrementEnd, popoverAnchorId, pending, flatDeck, actions = [] }) => {
140
+
141
+ // packages/plugins/plugin-deck/src/components/DeckLayout/PlankControls.tsx
142
+ import React2, { forwardRef } from "react";
143
+ import { Button, ButtonGroup, Icon, Tooltip, useTranslation } from "@dxos/react-ui";
144
+ var PlankControl = ({ icon, label, ...props }) => {
145
+ return /* @__PURE__ */ React2.createElement(Tooltip.Root, null, /* @__PURE__ */ React2.createElement(Tooltip.Trigger, {
146
+ asChild: true
147
+ }, /* @__PURE__ */ React2.createElement(Button, {
148
+ variant: "ghost",
149
+ ...props
150
+ }, /* @__PURE__ */ React2.createElement("span", {
151
+ className: "sr-only"
152
+ }, label), /* @__PURE__ */ React2.createElement(Icon, {
153
+ icon
154
+ }))), /* @__PURE__ */ React2.createElement(Tooltip.Portal, null, /* @__PURE__ */ React2.createElement(Tooltip.Content, {
155
+ side: "bottom",
156
+ classNames: "z-[70]"
157
+ }, label)));
158
+ };
159
+ var PlankControls = /* @__PURE__ */ forwardRef(({ onClick, variant = "default", capabilities: can, isSolo, pin, close = false, children, ...props }, forwardedRef) => {
142
160
  const { t } = useTranslation(DECK_PLUGIN);
161
+ const buttonClassNames = variant === "hide-disabled" ? "disabled:hidden !p-1" : "!p-1";
162
+ return /* @__PURE__ */ React2.createElement(ButtonGroup, {
163
+ ...props,
164
+ ref: forwardedRef
165
+ }, pin && !isSolo && [
166
+ "both",
167
+ "start"
168
+ ].includes(pin) && /* @__PURE__ */ React2.createElement(PlankControl, {
169
+ label: t("pin start label"),
170
+ variant: "ghost",
171
+ classNames: buttonClassNames,
172
+ onClick: () => onClick?.("pin-start"),
173
+ icon: "ph--caret-line-left--regular"
174
+ }), can.solo && /* @__PURE__ */ React2.createElement(PlankControl, {
175
+ label: t("solo plank label"),
176
+ classNames: buttonClassNames,
177
+ onClick: () => onClick?.("solo"),
178
+ icon: isSolo ? "ph--arrows-in--regular" : "ph--arrows-out--regular"
179
+ }), !isSolo && can.solo && /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(PlankControl, {
180
+ label: t("increment start label"),
181
+ disabled: !can.incrementStart,
182
+ classNames: buttonClassNames,
183
+ onClick: () => onClick?.("increment-start"),
184
+ icon: "ph--caret-left--regular"
185
+ }), /* @__PURE__ */ React2.createElement(PlankControl, {
186
+ label: t("increment end label"),
187
+ disabled: !can.incrementEnd,
188
+ classNames: buttonClassNames,
189
+ onClick: () => onClick?.("increment-end"),
190
+ icon: "ph--caret-right--regular"
191
+ })), pin && !isSolo && [
192
+ "both",
193
+ "end"
194
+ ].includes(pin) && /* @__PURE__ */ React2.createElement(PlankControl, {
195
+ label: t("pin end label"),
196
+ classNames: buttonClassNames,
197
+ onClick: () => onClick?.("pin-end"),
198
+ icon: "ph--caret-line-right--regular"
199
+ }), close && !isSolo && /* @__PURE__ */ React2.createElement(PlankControl, {
200
+ label: t(`${typeof close === "string" ? "minify" : "close"} label`),
201
+ classNames: buttonClassNames,
202
+ onClick: () => onClick?.("close"),
203
+ "data-testid": "plankHeading.close",
204
+ icon: close === "minify-start" ? "ph--caret-line-left--regular" : close === "minify-end" ? "ph--caret-line-right--regular" : "ph--minus--regular"
205
+ }), children);
206
+ });
207
+
208
+ // packages/plugins/plugin-deck/src/components/LayoutContext.ts
209
+ import { createContext, useContext } from "react";
210
+ import { raise } from "@dxos/debug";
211
+ var LayoutContext = createContext(null);
212
+ var useLayout = () => useContext(LayoutContext) ?? raise(new Error("Missing LayoutContext"));
213
+
214
+ // packages/plugins/plugin-deck/src/components/DeckLayout/NodePlankHeading.tsx
215
+ var NodePlankHeading = /* @__PURE__ */ memo(({ coordinate, node, canIncrementStart, canIncrementEnd, popoverAnchorId, pending, actions = [] }) => {
216
+ const layoutContext = useLayout();
217
+ const { t } = useTranslation2(DECK_PLUGIN);
143
218
  const { graph } = useGraph2();
144
219
  const icon = node?.properties?.icon ?? "ph--placeholder--regular";
145
220
  const label = pending ? t("pending heading") : toLocalizedString(node?.properties?.label ?? [
@@ -171,9 +246,9 @@ var NodePlankHeading = /* @__PURE__ */ memo(({ coordinate, node, canIncrementSta
171
246
  canIncrementStart,
172
247
  canIncrementEnd
173
248
  ]);
174
- return /* @__PURE__ */ React2.createElement(PlankHeading.Root, (layoutPart !== "main" || !flatDeck) && {
175
- classNames: "pie-1 border-b border-separator"
176
- }, /* @__PURE__ */ React2.createElement(ActionRoot, null, node ? /* @__PURE__ */ React2.createElement(PlankHeading.ActionsMenu, {
249
+ return /* @__PURE__ */ React3.createElement(StackItem.Heading, {
250
+ classNames: "pie-1"
251
+ }, /* @__PURE__ */ React3.createElement(ActionRoot, null, node ? /* @__PURE__ */ React3.createElement(StackItem.Sigil, {
177
252
  icon,
178
253
  related: layoutPart === "complementary",
179
254
  attendableId,
@@ -186,35 +261,36 @@ var NodePlankHeading = /* @__PURE__ */ memo(({ coordinate, node, canIncrementSta
186
261
  node: action,
187
262
  caller: DECK_PLUGIN
188
263
  })
189
- }, /* @__PURE__ */ React2.createElement(Surface2, {
264
+ }, /* @__PURE__ */ React3.createElement(Surface2, {
190
265
  role: "menu-footer",
191
266
  data: {
192
267
  object: node.data
193
268
  }
194
- })) : /* @__PURE__ */ React2.createElement(PlankHeading.Button, null, /* @__PURE__ */ React2.createElement("span", {
269
+ })) : /* @__PURE__ */ React3.createElement(StackItem.SigilButton, null, /* @__PURE__ */ React3.createElement("span", {
195
270
  className: "sr-only"
196
- }, label), /* @__PURE__ */ React2.createElement(Icon, {
271
+ }, label), /* @__PURE__ */ React3.createElement(Icon2, {
197
272
  icon,
198
273
  size: 5
199
- }))), /* @__PURE__ */ React2.createElement(TextTooltip, {
274
+ }))), /* @__PURE__ */ React3.createElement(TextTooltip, {
200
275
  text: label,
201
276
  onlyWhenTruncating: true
202
- }, /* @__PURE__ */ React2.createElement(PlankHeading.Label, {
277
+ }, /* @__PURE__ */ React3.createElement(StackItem.HeadingLabel, {
203
278
  attendableId,
204
279
  related: layoutPart === "complementary",
205
280
  ...pending && {
206
281
  classNames: "text-description"
207
282
  }
208
283
  }, label)), node && layoutPart !== "complementary" && // TODO(Zan): What are we doing with layout coordinate here?
209
- /* @__PURE__ */ React2.createElement(Surface2, {
284
+ /* @__PURE__ */ React3.createElement(Surface2, {
210
285
  role: "navbar-end",
211
286
  direction: "inline-reverse",
212
287
  data: {
213
288
  object: node.data
214
289
  }
215
- }), /* @__PURE__ */ React2.createElement(PlankHeading.Controls, {
290
+ }), /* @__PURE__ */ React3.createElement(PlankControls, {
216
291
  capabilities,
217
292
  isSolo: layoutPart === "solo",
293
+ classNames: "mx-1",
218
294
  onClick: (eventType) => {
219
295
  if (!layoutPart) {
220
296
  return;
@@ -264,22 +340,30 @@ var NodePlankHeading = /* @__PURE__ */ memo(({ coordinate, node, canIncrementSta
264
340
  }
265
341
  },
266
342
  close: layoutPart === "complementary" ? "minify-end" : true
267
- }));
343
+ }, layoutPart !== "complementary" && /* @__PURE__ */ React3.createElement(IconButton, {
344
+ iconOnly: true,
345
+ onClick: () => layoutContext.complementarySidebarOpen = !layoutContext.complementarySidebarOpen,
346
+ variant: "ghost",
347
+ label: t("open complementary sidebar label"),
348
+ classNames: "!p-1 -scale-x-100",
349
+ icon: "ph--sidebar--regular",
350
+ tooltipZIndex: "70"
351
+ })));
268
352
  });
269
353
 
270
354
  // packages/plugins/plugin-deck/src/components/DeckLayout/PlankError.tsx
271
- import React4, { useEffect as useEffect4, useState as useState2 } from "react";
272
- import { useTranslation as useTranslation2 } from "@dxos/react-ui";
355
+ import React5, { useEffect as useEffect4, useState as useState2 } from "react";
356
+ import { useTranslation as useTranslation3 } from "@dxos/react-ui";
273
357
  import { descriptionText, mx } from "@dxos/react-ui-theme";
274
358
 
275
359
  // packages/plugins/plugin-deck/src/components/DeckLayout/PlankLoading.tsx
276
- import React3 from "react";
360
+ import React4 from "react";
277
361
  import { Status } from "@dxos/react-ui";
278
362
  var PlankLoading = () => {
279
- return /* @__PURE__ */ React3.createElement("div", {
363
+ return /* @__PURE__ */ React4.createElement("div", {
280
364
  role: "none",
281
- className: "grid bs-[100dvh] place-items-center row-span-2"
282
- }, /* @__PURE__ */ React3.createElement(Status, {
365
+ className: "grid place-items-center attention-surface"
366
+ }, /* @__PURE__ */ React4.createElement(Status, {
283
367
  indeterminate: true,
284
368
  "aria-label": "Initializing"
285
369
  }));
@@ -287,43 +371,32 @@ var PlankLoading = () => {
287
371
 
288
372
  // packages/plugins/plugin-deck/src/components/DeckLayout/PlankError.tsx
289
373
  var PlankContentError = ({ error }) => {
290
- const { t } = useTranslation2(DECK_PLUGIN);
291
- return /* @__PURE__ */ React4.createElement("div", {
374
+ const { t } = useTranslation3(DECK_PLUGIN);
375
+ const errorString = error?.toString() ?? "";
376
+ return /* @__PURE__ */ React5.createElement("div", {
292
377
  role: "none",
293
- className: "grid place-items-center row-span-2"
294
- }, /* @__PURE__ */ React4.createElement("p", {
378
+ className: "overflow-auto p-8 attention-surface grid place-items-center"
379
+ }, /* @__PURE__ */ React5.createElement("p", {
295
380
  role: "alert",
296
- className: mx(
297
- descriptionText,
298
- // TODO(burdon): Factor out common styles for all dialogs.
299
- "overflow-hidden break-words",
300
- "place-self-center border border-dashed border-neutral-400/50 rounded-lg text-center p-8 font-normal text-lg"
301
- )
302
- }, error ? error.toString() : t("error fallback message")));
381
+ className: mx(descriptionText, "break-words border border-dashed border-separator rounded-lg p-8", errorString.length < 256 && "text-lg")
382
+ }, error ? errorString : t("error fallback message")));
303
383
  };
304
- var PlankError = ({ layoutCoordinate, node, error, flatDeck }) => {
384
+ var PlankError = ({ layoutCoordinate, node, error }) => {
305
385
  const [timedOut, setTimedOut] = useState2(false);
306
386
  useEffect4(() => {
307
387
  setTimeout(() => setTimedOut(true), 5e3);
308
388
  }, []);
309
- return /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(NodePlankHeading, {
389
+ return /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(NodePlankHeading, {
310
390
  coordinate: layoutCoordinate,
311
391
  node,
312
- pending: !timedOut,
313
- flatDeck
314
- }), timedOut ? /* @__PURE__ */ React4.createElement(PlankContentError, {
392
+ pending: !timedOut
393
+ }), timedOut ? /* @__PURE__ */ React5.createElement(PlankContentError, {
315
394
  error
316
- }) : /* @__PURE__ */ React4.createElement(PlankLoading, null));
395
+ }) : /* @__PURE__ */ React5.createElement(PlankLoading, null));
317
396
  };
318
397
 
319
- // packages/plugins/plugin-deck/src/components/LayoutContext.ts
320
- import { createContext, useContext } from "react";
321
- import { raise } from "@dxos/debug";
322
- var LayoutContext = createContext(null);
323
- var useLayout = () => useContext(LayoutContext) ?? raise(new Error("Missing LayoutContext"));
324
-
325
398
  // packages/plugins/plugin-deck/src/components/DeckLayout/ComplementarySidebar.tsx
326
- var ComplementarySidebar = ({ panels, current, flatDeck }) => {
399
+ var ComplementarySidebar = ({ panels, current }) => {
327
400
  const { popoverAnchorId } = useLayout();
328
401
  const attended = useAttended2();
329
402
  const panel = (panels.find((p) => p.id === current) ?? panels[0])?.id;
@@ -359,18 +432,24 @@ var ComplementarySidebar = ({ panels, current, flatDeck }) => {
359
432
  }), [
360
433
  id
361
434
  ]);
362
- return /* @__PURE__ */ React5.createElement(Main.ComplementarySidebar, null, /* @__PURE__ */ React5.createElement("div", {
435
+ return /* @__PURE__ */ React6.createElement(Main.ComplementarySidebar, null, /* @__PURE__ */ React6.createElement(StackContext.Provider, {
436
+ value: {
437
+ size: "contain",
438
+ orientation: "horizontal",
439
+ separators: true,
440
+ rail: true
441
+ }
442
+ }, /* @__PURE__ */ React6.createElement("div", {
363
443
  role: "none",
364
- className: mx2(deckGrid, "grid-cols-1 bs-full")
365
- }, /* @__PURE__ */ React5.createElement(NodePlankHeading, {
444
+ className: mx2(railGridHorizontal, "grid-cols-1 bs-full divide-y divide-separator")
445
+ }, /* @__PURE__ */ React6.createElement(NodePlankHeading, {
366
446
  coordinate,
367
447
  node,
368
448
  popoverAnchorId,
369
- flatDeck,
370
449
  actions
371
- }), /* @__PURE__ */ React5.createElement("div", {
372
- className: "row-span-2 divide-y divide-separator overflow-x-hidden overflow-y-scroll"
373
- }, node && /* @__PURE__ */ React5.createElement(Surface3, {
450
+ }), /* @__PURE__ */ React6.createElement("div", {
451
+ className: "divide-y divide-separator overflow-x-hidden overflow-y-scroll"
452
+ }, node && /* @__PURE__ */ React6.createElement(Surface3, {
374
453
  key: id,
375
454
  role: `complementary--${panel}`,
376
455
  limit: 1,
@@ -380,42 +459,42 @@ var ComplementarySidebar = ({ panels, current, flatDeck }) => {
380
459
  popoverAnchorId
381
460
  },
382
461
  fallback: PlankContentError,
383
- placeholder: /* @__PURE__ */ React5.createElement(PlankLoading, null)
384
- }))));
462
+ placeholder: /* @__PURE__ */ React6.createElement(PlankLoading, null)
463
+ })))));
385
464
  };
386
465
 
387
466
  // packages/plugins/plugin-deck/src/components/DeckLayout/ContentEmpty.tsx
388
- import React6 from "react";
467
+ import React7 from "react";
389
468
  import { Surface as Surface4 } from "@dxos/app-framework";
390
469
  var ContentEmpty = () => {
391
- return /* @__PURE__ */ React6.createElement("div", {
470
+ return /* @__PURE__ */ React7.createElement("div", {
392
471
  role: "none",
393
472
  className: "min-bs-screen is-dvw sm:is-full flex items-center justify-center p-8",
394
473
  "data-testid": "layoutPlugin.firstRunMessage"
395
- }, /* @__PURE__ */ React6.createElement("div", {
474
+ }, /* @__PURE__ */ React7.createElement("div", {
396
475
  role: "none",
397
476
  className: "grid place-items-center grid-rows-[min-content_min-content]"
398
- }, /* @__PURE__ */ React6.createElement(Surface4, {
477
+ }, /* @__PURE__ */ React7.createElement(Surface4, {
399
478
  role: "keyshortcuts"
400
479
  })));
401
480
  };
402
481
 
403
482
  // packages/plugins/plugin-deck/src/components/DeckLayout/Fullscreen.tsx
404
- import React8 from "react";
483
+ import React9 from "react";
405
484
  import { Surface as Surface5 } from "@dxos/app-framework";
406
485
  import { useGraph as useGraph4 } from "@dxos/plugin-graph";
407
486
  import { fixedInsetFlexLayout } from "@dxos/react-ui-theme";
408
487
 
409
488
  // packages/plugins/plugin-deck/src/components/DeckLayout/Fallback.tsx
410
- import React7 from "react";
411
- import { useTranslation as useTranslation3 } from "@dxos/react-ui";
489
+ import React8 from "react";
490
+ import { useTranslation as useTranslation4 } from "@dxos/react-ui";
412
491
  import { errorText, mx as mx3 } from "@dxos/react-ui-theme";
413
492
  var Fallback = () => {
414
- const { t } = useTranslation3(DECK_PLUGIN);
415
- return /* @__PURE__ */ React7.createElement("div", {
493
+ const { t } = useTranslation4(DECK_PLUGIN);
494
+ return /* @__PURE__ */ React8.createElement("div", {
416
495
  role: "none",
417
496
  className: "min-bs-screen is-full flex items-center justify-center p-8"
418
- }, /* @__PURE__ */ React7.createElement("p", {
497
+ }, /* @__PURE__ */ React8.createElement("p", {
419
498
  role: "alert",
420
499
  className: mx3(errorText, "border border-error-400/50 rounded-lg flex items-center justify-center p-8 font-normal text-lg")
421
500
  }, t("plugin error message")));
@@ -425,10 +504,10 @@ var Fallback = () => {
425
504
  var Fullscreen = ({ id }) => {
426
505
  const { graph } = useGraph4();
427
506
  const fullScreenNode = useNode(graph, id);
428
- return /* @__PURE__ */ React8.createElement("div", {
507
+ return /* @__PURE__ */ React9.createElement("div", {
429
508
  role: "none",
430
509
  className: fixedInsetFlexLayout
431
- }, /* @__PURE__ */ React8.createElement(Surface5, {
510
+ }, /* @__PURE__ */ React9.createElement(Surface5, {
432
511
  role: "main",
433
512
  limit: 1,
434
513
  fallback: Fallback,
@@ -440,15 +519,13 @@ var Fullscreen = ({ id }) => {
440
519
  };
441
520
 
442
521
  // packages/plugins/plugin-deck/src/components/DeckLayout/Plank.tsx
443
- import { Plus } from "@phosphor-icons/react";
444
- import React9, { memo as memo2, useCallback, useLayoutEffect, useMemo as useMemo3, useRef } from "react";
445
- import { LayoutAction as LayoutAction2, NavigationAction as NavigationAction3, Surface as Surface6, useIntentDispatcher as useIntentDispatcher3, indexInPart, partLength } from "@dxos/app-framework";
522
+ import React10, { memo as memo2, useCallback, useLayoutEffect, useMemo as useMemo3, useRef } from "react";
523
+ import { Surface as Surface6, useIntentDispatcher as useIntentDispatcher3, indexInPart, partLength } from "@dxos/app-framework";
446
524
  import { debounce } from "@dxos/async";
447
525
  import { useGraph as useGraph5 } from "@dxos/plugin-graph";
448
- import { Button, Tooltip, useTranslation as useTranslation4 } from "@dxos/react-ui";
449
526
  import { useAttendableAttributes } from "@dxos/react-ui-attention";
450
- import { Plank as NaturalPlank } from "@dxos/react-ui-deck";
451
- import { mainIntrinsicSize } from "@dxos/react-ui-theme";
527
+ import { StackItem as StackItem2, railGridHorizontal as railGridHorizontal2 } from "@dxos/react-ui-stack";
528
+ import { mainIntrinsicSize, mx as mx4 } from "@dxos/react-ui-theme";
452
529
 
453
530
  // packages/plugins/plugin-deck/src/components/DeckContext.ts
454
531
  import { createContext as createContext2, useContext as useContext2 } from "react";
@@ -458,8 +535,7 @@ var useDeckContext = () => useContext2(DeckContext) ?? raise2(new Error("Missing
458
535
 
459
536
  // packages/plugins/plugin-deck/src/components/DeckLayout/Plank.tsx
460
537
  var UNKNOWN_ID = "unknown_id";
461
- var Plank = /* @__PURE__ */ memo2(({ entry, layoutParts, part, flatDeck, searchEnabled, layoutMode }) => {
462
- const { t } = useTranslation4(DECK_PLUGIN);
538
+ var Plank = /* @__PURE__ */ memo2(({ entry, layoutParts, part, layoutMode, order, last }) => {
463
539
  const dispatch = useIntentDispatcher3();
464
540
  const coordinate = useMemo3(() => ({
465
541
  part,
@@ -473,20 +549,23 @@ var Plank = /* @__PURE__ */ memo2(({ entry, layoutParts, part, flatDeck, searchE
473
549
  const { graph } = useGraph5();
474
550
  const node = useNode(graph, entry?.id);
475
551
  const rootElement = useRef(null);
476
- const resizeable = layoutMode === "deck";
552
+ const canResize = layoutMode === "deck";
553
+ const Root = part === "solo" ? "article" : StackItem2.Root;
477
554
  const attendableAttrs = useAttendableAttributes(coordinate.entryId);
478
555
  const index = indexInPart(layoutParts, coordinate);
479
556
  const length = partLength(layoutParts, part);
480
557
  const canIncrementStart = part === "main" && index !== void 0 && index > 0 && length !== void 0 && length > 1;
481
558
  const canIncrementEnd = part === "main" && index !== void 0 && index < length - 1 && length !== void 0;
482
559
  const size = plankSizing?.[coordinate.entryId];
483
- const setSize = useCallback(debounce((newSize) => dispatch({
484
- action: DeckAction.UPDATE_PLANK_SIZE,
485
- data: {
486
- id: coordinate.entryId,
487
- size: newSize
488
- }
489
- }), 200), [
560
+ const setSize = useCallback(debounce((nextSize) => {
561
+ return dispatch({
562
+ action: DeckAction.UPDATE_PLANK_SIZE,
563
+ data: {
564
+ id: coordinate.entryId,
565
+ size: nextSize
566
+ }
567
+ });
568
+ }, 200), [
490
569
  dispatch,
491
570
  coordinate.entryId
492
571
  ]);
@@ -511,7 +590,7 @@ var Plank = /* @__PURE__ */ memo2(({ entry, layoutParts, part, flatDeck, searchE
511
590
  layoutMode
512
591
  ]);
513
592
  const isSolo = layoutMode === "solo" && part === "solo";
514
- const isSuppressed = layoutMode === "solo" && part !== "solo" || layoutMode === "deck" && part === "solo" || coordinate.entryId === UNKNOWN_ID;
593
+ const isAttendable = isSolo || layoutMode === "deck" && part === "main";
515
594
  const sizeAttrs = useMainSize();
516
595
  const data = useMemo3(() => node && {
517
596
  ...entry?.path ? {
@@ -529,82 +608,46 @@ var Plank = /* @__PURE__ */ memo2(({ entry, layoutParts, part, flatDeck, searchE
529
608
  coordinate,
530
609
  popoverAnchorId
531
610
  ]);
532
- const placeholder = useMemo3(() => /* @__PURE__ */ React9.createElement(PlankLoading, null), []);
533
- return /* @__PURE__ */ React9.createElement(NaturalPlank.Root, {
534
- size,
535
- setSize,
536
- classNames: [
537
- isSuppressed && "!sr-only"
538
- ],
539
- ...attendableAttrs,
540
- ...isSuppressed && {
541
- inert: ""
611
+ const placeholder = useMemo3(() => /* @__PURE__ */ React10.createElement(PlankLoading, null), []);
612
+ const className = mx4("attention-surface relative", isSolo && mainIntrinsicSize, isSolo && railGridHorizontal2, isSolo && "grid absolute inset-0 divide-separator divide-y", last && "!border-li border-separator");
613
+ return /* @__PURE__ */ React10.createElement(Root, {
614
+ ref: rootElement,
615
+ "data-testid": "deck.plank",
616
+ tabIndex: 0,
617
+ ...part === "solo" ? {
618
+ ...sizeAttrs,
619
+ className
620
+ } : {
621
+ item: {
622
+ id: entry?.id ?? "never"
623
+ },
624
+ size,
625
+ onSizeChange: setSize,
626
+ classNames: className,
627
+ order,
628
+ role: "article"
542
629
  },
543
- onKeyDown: handleKeyDown,
544
- ref: rootElement
545
- }, /* @__PURE__ */ React9.createElement(NaturalPlank.Content, {
546
- ...isSolo && sizeAttrs,
547
- classNames: [
548
- isSolo && mainIntrinsicSize,
549
- !flatDeck && "bg-base"
550
- ],
551
- style: isSolo ? {
552
- inlineSize: ""
553
- } : {}
554
- }, node ? /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement(NodePlankHeading, {
630
+ ...isAttendable ? attendableAttrs : {},
631
+ onKeyDown: handleKeyDown
632
+ }, node ? /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(NodePlankHeading, {
555
633
  coordinate,
556
634
  node,
557
635
  canIncrementStart,
558
636
  canIncrementEnd,
559
- popoverAnchorId,
560
- flatDeck
561
- }), /* @__PURE__ */ React9.createElement(Surface6, {
637
+ popoverAnchorId
638
+ }), /* @__PURE__ */ React10.createElement(Surface6, {
562
639
  role: "article",
563
640
  data,
564
641
  limit: 1,
565
642
  fallback: PlankContentError,
566
643
  placeholder
567
- })) : /* @__PURE__ */ React9.createElement(PlankError, {
568
- layoutCoordinate: coordinate,
569
- flatDeck
570
- })), searchEnabled && resizeable ? /* @__PURE__ */ React9.createElement("div", {
571
- role: "none",
572
- className: "grid grid-rows-subgrid row-span-3"
573
- }, /* @__PURE__ */ React9.createElement(Tooltip.Root, null, /* @__PURE__ */ React9.createElement(Tooltip.Trigger, {
574
- asChild: true
575
- }, /* @__PURE__ */ React9.createElement(Button, {
576
- "data-testid": "plankHeading.open",
577
- variant: "ghost",
578
- classNames: "p-1 w-fit",
579
- onClick: () => dispatch([
580
- {
581
- action: LayoutAction2.SET_LAYOUT,
582
- data: {
583
- element: "dialog",
584
- component: "dxos.org/plugin/search/Dialog",
585
- dialogBlockAlign: "start",
586
- subject: {
587
- action: NavigationAction3.SET,
588
- position: "add-after",
589
- coordinate
590
- }
591
- }
592
- }
593
- ])
594
- }, /* @__PURE__ */ React9.createElement("span", {
595
- className: "sr-only"
596
- }, t("insert plank label")), /* @__PURE__ */ React9.createElement(Plus, null))), /* @__PURE__ */ React9.createElement(Tooltip.Portal, null, /* @__PURE__ */ React9.createElement(Tooltip.Content, {
597
- side: "bottom",
598
- classNames: "z-[70]"
599
- }, t("insert plank label")))), /* @__PURE__ */ React9.createElement(NaturalPlank.ResizeHandle, {
600
- classNames: "row-start-[toolbar-start] row-end-[content-end]"
601
- })) : resizeable ? /* @__PURE__ */ React9.createElement(NaturalPlank.ResizeHandle, {
602
- classNames: "row-span-3"
603
- }) : null);
644
+ })) : /* @__PURE__ */ React10.createElement(PlankError, {
645
+ layoutCoordinate: coordinate
646
+ }), canResize && /* @__PURE__ */ React10.createElement(StackItem2.ResizeHandle, null));
604
647
  });
605
648
 
606
649
  // packages/plugins/plugin-deck/src/components/DeckLayout/Sidebar.tsx
607
- import React10, { useMemo as useMemo4 } from "react";
650
+ import React11, { useMemo as useMemo4 } from "react";
608
651
  import { openIds, Surface as Surface7 } from "@dxos/app-framework";
609
652
  import { Main as Main2 } from "@dxos/react-ui";
610
653
  var Sidebar = ({ layoutParts }) => {
@@ -627,7 +670,7 @@ var Sidebar = ({ layoutParts }) => {
627
670
  popoverAnchorId,
628
671
  activeIds
629
672
  ]);
630
- return /* @__PURE__ */ React10.createElement(Main2.NavigationSidebar, null, /* @__PURE__ */ React10.createElement(Surface7, {
673
+ return /* @__PURE__ */ React11.createElement(Main2.NavigationSidebar, null, /* @__PURE__ */ React11.createElement(Surface7, {
631
674
  role: "navigation",
632
675
  data: {
633
676
  ...navigationData
@@ -637,51 +680,51 @@ var Sidebar = ({ layoutParts }) => {
637
680
  };
638
681
 
639
682
  // packages/plugins/plugin-deck/src/components/DeckLayout/StatusBar.tsx
640
- import React11 from "react";
683
+ import React12 from "react";
641
684
  import { Surface as Surface8 } from "@dxos/app-framework";
642
- import { mainPadding, mainPaddingTransitions, mx as mx4 } from "@dxos/react-ui-theme";
685
+ import { mainPadding, mainPaddingTransitions, mx as mx5 } from "@dxos/react-ui-theme";
643
686
  var StatusBar = ({ showHints }) => {
644
687
  const sizeAttrs = useMainSize();
645
- return /* @__PURE__ */ React11.createElement("div", {
688
+ return /* @__PURE__ */ React12.createElement("div", {
646
689
  role: "none",
647
690
  ...sizeAttrs,
648
- className: mx4("fixed flex justify-between block-end-0 inset-inline-0 items-center border-bs border-separator z-[2]", mainPadding, mainPaddingTransitions)
649
- }, /* @__PURE__ */ React11.createElement("div", {
691
+ className: mx5("fixed flex justify-between block-end-0 inset-inline-0 items-center border-bs border-separator z-[2]", mainPadding, mainPaddingTransitions)
692
+ }, /* @__PURE__ */ React12.createElement("div", {
650
693
  role: "none"
651
- }, showHints && /* @__PURE__ */ React11.createElement(Surface8, {
694
+ }, showHints && /* @__PURE__ */ React12.createElement(Surface8, {
652
695
  role: "hints",
653
696
  limit: 1
654
- })), /* @__PURE__ */ React11.createElement(Surface8, {
697
+ })), /* @__PURE__ */ React12.createElement(Surface8, {
655
698
  role: "status-bar",
656
699
  limit: 1
657
700
  }));
658
701
  };
659
702
 
660
703
  // packages/plugins/plugin-deck/src/components/DeckLayout/Toast.tsx
661
- import React12 from "react";
662
- import { Button as Button2, Icon as Icon2, Toast as NaturalToast } from "@dxos/react-ui";
704
+ import React13 from "react";
705
+ import { Button as Button2, Icon as Icon3, Toast as NaturalToast } from "@dxos/react-ui";
663
706
  var Toast = ({ id, title, description, icon, duration, actionLabel, actionAlt, closeLabel, onAction, onOpenChange }) => {
664
- return /* @__PURE__ */ React12.createElement(NaturalToast.Root, {
707
+ return /* @__PURE__ */ React13.createElement(NaturalToast.Root, {
665
708
  "data-testid": id,
666
709
  defaultOpen: true,
667
710
  duration,
668
711
  onOpenChange
669
- }, /* @__PURE__ */ React12.createElement(NaturalToast.Body, null, /* @__PURE__ */ React12.createElement(NaturalToast.Title, {
712
+ }, /* @__PURE__ */ React13.createElement(NaturalToast.Body, null, /* @__PURE__ */ React13.createElement(NaturalToast.Title, {
670
713
  classNames: "items-center"
671
- }, /* @__PURE__ */ React12.createElement(Icon2, {
714
+ }, icon && /* @__PURE__ */ React13.createElement(Icon3, {
672
715
  icon,
673
716
  size: 5,
674
717
  classNames: "inline mr-1"
675
- }), /* @__PURE__ */ React12.createElement("span", null, title)), description && /* @__PURE__ */ React12.createElement(NaturalToast.Description, null, description)), /* @__PURE__ */ React12.createElement(NaturalToast.Actions, null, onAction && actionAlt && actionLabel && /* @__PURE__ */ React12.createElement(NaturalToast.Action, {
718
+ }), /* @__PURE__ */ React13.createElement("span", null, title)), description && /* @__PURE__ */ React13.createElement(NaturalToast.Description, null, description)), /* @__PURE__ */ React13.createElement(NaturalToast.Actions, null, onAction && actionAlt && actionLabel && /* @__PURE__ */ React13.createElement(NaturalToast.Action, {
676
719
  altText: actionAlt,
677
720
  asChild: true
678
- }, /* @__PURE__ */ React12.createElement(Button2, {
721
+ }, /* @__PURE__ */ React13.createElement(Button2, {
679
722
  "data-testid": "toast.action",
680
723
  variant: "primary",
681
724
  onClick: () => onAction?.()
682
- }, actionLabel)), closeLabel && /* @__PURE__ */ React12.createElement(NaturalToast.Close, {
725
+ }, actionLabel)), closeLabel && /* @__PURE__ */ React13.createElement(NaturalToast.Close, {
683
726
  asChild: true
684
- }, /* @__PURE__ */ React12.createElement(Button2, {
727
+ }, /* @__PURE__ */ React13.createElement(Button2, {
685
728
  "data-testid": "toast.close"
686
729
  }, closeLabel))));
687
730
  };
@@ -705,53 +748,50 @@ var checkAppScheme = (url) => {
705
748
  var getEffectivePart = (partName, layoutMode) => layoutMode === "solo" && partName === "main" ? "solo" : partName;
706
749
 
707
750
  // packages/plugins/plugin-deck/src/util/overscroll.ts
708
- import { PLANK_DEFAULTS } from "@dxos/react-ui-deck";
709
- var calculateOverscroll = (planks, plankSizing, sidebarOpen, complementarySidebarOpen) => {
710
- if (!planks?.length) {
751
+ var calculateOverscroll = (planksCount) => {
752
+ if (!planksCount) {
711
753
  return {
712
754
  paddingInlineStart: 0,
713
755
  paddingInlineEnd: 0
714
756
  };
715
757
  }
716
- const sidebarWidth = sidebarOpen ? "270px" : "0px";
717
- const complementarySidebarWidth = complementarySidebarOpen ? "360px" : "0px";
718
- const getPlankSize = (id) => (plankSizing[id] ?? PLANK_DEFAULTS.size).toFixed(2) + "rem";
719
- if (planks.length === 1) {
720
- const plank = planks[0];
721
- const plankSize = getPlankSize(plank.id);
722
- const overscrollPadding = `max(0px, calc(((100dvw - ${sidebarWidth} - ${complementarySidebarWidth} - (${plankSize} + 20px)) / 2)))`;
758
+ if (planksCount === 1) {
759
+ const overscrollPadding = "max(0px, calc(((100dvw - var(--dx-main-sidebarWidth) - var(--dx-main-complementaryWidth) - (var(--dx-main-contentFirstWidth) + 1px)) / 2)))";
723
760
  return {
724
761
  paddingInlineStart: overscrollPadding,
725
762
  paddingInlineEnd: overscrollPadding
726
763
  };
727
764
  } else {
728
- const first = planks[0];
729
- const firstSize = getPlankSize(first.id);
730
- const last = planks[planks.length - 1];
731
- const lastSize = getPlankSize(last.id);
732
765
  return {
733
- paddingInlineStart: `max(0px, calc(((100dvw - (${firstSize} + 20px)) / 2) - ${sidebarWidth}))`,
734
- paddingInlineEnd: `max(0px, calc(((100dvw - (${lastSize} + 20px)) / 2) - ${complementarySidebarWidth}))`
766
+ paddingInlineStart: "max(0px, calc(((100dvw - (var(--dx-main-contentFirstWidth) + 1px)) / 2) - var(--dx-main-sidebarWidth)))",
767
+ paddingInlineEnd: "max(0px, calc(((100dvw - (var(--dx-main-contentLastWidth) + 1px)) / 2) - var(--dx-main-complementaryWidth)))"
735
768
  };
736
769
  }
737
770
  };
738
771
 
739
772
  // packages/plugins/plugin-deck/src/components/DeckLayout/DeckLayout.tsx
740
- var DeckLayout = ({ layoutParts, toasts, flatDeck, overscroll, showHints, slots, panels, onDismissToast }) => {
773
+ var PlankSeparator = ({ index }) => index > 0 ? /* @__PURE__ */ React14.createElement("span", {
774
+ role: "separator",
775
+ className: "row-span-2 bg-deck is-4",
776
+ style: {
777
+ gridColumn: index * 2
778
+ }
779
+ }) : null;
780
+ var DeckLayout = ({ layoutParts, toasts, overscroll, showHints, panels, onDismissToast }) => {
741
781
  const context = useLayout();
742
782
  const { layoutMode, sidebarOpen, complementarySidebarOpen, dialogOpen, dialogContent, dialogBlockAlign, popoverOpen, popoverContent, popoverAnchorId } = context;
743
783
  const { t } = useTranslation5(DECK_PLUGIN);
744
784
  const { plankSizing } = useDeckContext();
745
785
  const attentionPlugin = usePlugin("dxos.org/plugin/attention");
746
- const searchPlugin = usePlugin("dxos.org/plugin/search");
747
786
  const fullScreenSlug = useMemo5(() => firstIdInPart(layoutParts, "fullScreen"), [
748
787
  layoutParts
749
788
  ]);
750
789
  const scrollLeftRef = useRef2();
751
790
  const deckRef = useRef2(null);
791
+ const isSoloModeLoaded = layoutMode === "solo" && Boolean(layoutParts.solo?.[0]);
752
792
  useEffect5(() => {
753
793
  const attended = untracked(() => attentionPlugin?.provides.attention.attended ?? []);
754
- const firstId = layoutMode === "solo" ? firstIdInPart(layoutParts, "solo") : firstIdInPart(layoutParts, "main");
794
+ const firstId = isSoloModeLoaded ? firstIdInPart(layoutParts, "solo") : firstIdInPart(layoutParts, "main");
755
795
  if (attended.length === 0 && firstId) {
756
796
  document.querySelector(`article[data-attendable-id="${firstId}"] button`)?.focus();
757
797
  }
@@ -778,26 +818,18 @@ var DeckLayout = ({ layoutParts, toasts, flatDeck, overscroll, showHints, slots,
778
818
  }, [
779
819
  layoutMode
780
820
  ]);
781
- const isEmpty = layoutParts.main?.length === 0 && layoutParts.solo?.length === 0;
821
+ const isEmpty = (layoutParts.main?.length ?? 0) === 0 && (layoutParts.solo?.length ?? 0) === 0;
782
822
  const padding = useMemo5(() => {
783
823
  if (layoutMode === "deck" && overscroll === "centering") {
784
- return calculateOverscroll(layoutParts.main, plankSizing, sidebarOpen, complementarySidebarOpen);
824
+ return calculateOverscroll(layoutParts.main?.length ?? 0);
785
825
  }
786
826
  return {};
787
827
  }, [
788
828
  layoutMode,
789
829
  overscroll,
790
- layoutParts.main,
791
- plankSizing,
792
- sidebarOpen,
793
- complementarySidebarOpen
830
+ layoutParts.main
794
831
  ]);
795
- if (layoutMode === "fullscreen") {
796
- return /* @__PURE__ */ React13.createElement(Fullscreen, {
797
- id: fullScreenSlug
798
- });
799
- }
800
- return /* @__PURE__ */ React13.createElement(Popover2.Root, {
832
+ return /* @__PURE__ */ React14.createElement(Popover2.Root, {
801
833
  modal: true,
802
834
  open: !!(popoverAnchorId && popoverOpen),
803
835
  onOpenChange: (nextOpen) => {
@@ -808,97 +840,111 @@ var DeckLayout = ({ layoutParts, toasts, flatDeck, overscroll, showHints, slots,
808
840
  context.popoverAnchorId = void 0;
809
841
  }
810
842
  }
811
- }, /* @__PURE__ */ React13.createElement(ActiveNode, null), /* @__PURE__ */ React13.createElement(Main3.Root, {
843
+ }, /* @__PURE__ */ React14.createElement(ActiveNode, null), layoutMode === "fullscreen" && /* @__PURE__ */ React14.createElement(Fullscreen, {
844
+ id: fullScreenSlug
845
+ }), layoutMode !== "fullscreen" && /* @__PURE__ */ React14.createElement(Main3.Root, {
812
846
  navigationSidebarOpen: context.sidebarOpen,
813
847
  onNavigationSidebarOpenChange: (next) => context.sidebarOpen = next,
814
848
  complementarySidebarOpen: context.complementarySidebarOpen,
815
849
  onComplementarySidebarOpenChange: (next) => context.complementarySidebarOpen = next
816
- }, /* @__PURE__ */ React13.createElement(Main3.Notch, {
850
+ }, /* @__PURE__ */ React14.createElement(Main3.Notch, {
817
851
  classNames: "z-[21]"
818
- }, /* @__PURE__ */ React13.createElement(Surface9, {
852
+ }, /* @__PURE__ */ React14.createElement(Surface9, {
819
853
  role: "notch-start"
820
- }), /* @__PURE__ */ React13.createElement(Button3, {
854
+ }), /* @__PURE__ */ React14.createElement(Button3, {
821
855
  onClick: () => context.sidebarOpen = !context.sidebarOpen,
822
856
  variant: "ghost",
823
857
  classNames: "p-1"
824
- }, /* @__PURE__ */ React13.createElement("span", {
825
- className: "sr-only"
826
- }, t("open navigation sidebar label")), /* @__PURE__ */ React13.createElement(MenuIcon, {
827
- weight: "light",
828
- className: getSize(5)
829
- })), /* @__PURE__ */ React13.createElement(Button3, {
830
- onClick: () => context.complementarySidebarOpen = !context.complementarySidebarOpen,
831
- variant: "ghost",
832
- classNames: "p-1"
833
- }, /* @__PURE__ */ React13.createElement("span", {
858
+ }, /* @__PURE__ */ React14.createElement("span", {
834
859
  className: "sr-only"
835
- }, t("open complementary sidebar label")), /* @__PURE__ */ React13.createElement(MenuIcon, {
836
- mirrored: true,
860
+ }, t("open navigation sidebar label")), /* @__PURE__ */ React14.createElement(MenuIcon, {
837
861
  weight: "light",
838
862
  className: getSize(5)
839
- })), /* @__PURE__ */ React13.createElement(Surface9, {
863
+ })), /* @__PURE__ */ React14.createElement(Surface9, {
840
864
  role: "notch-end"
841
- })), /* @__PURE__ */ React13.createElement(Sidebar, {
865
+ })), /* @__PURE__ */ React14.createElement(Sidebar, {
842
866
  layoutParts
843
- }), /* @__PURE__ */ React13.createElement(ComplementarySidebar, {
867
+ }), /* @__PURE__ */ React14.createElement(ComplementarySidebar, {
844
868
  panels,
845
- current: layoutParts.complementary?.[0].id,
846
- flatDeck
847
- }), /* @__PURE__ */ React13.createElement(Main3.Overlay, null), isEmpty && /* @__PURE__ */ React13.createElement(Main3.Content, {
869
+ current: layoutParts.complementary?.[0].id
870
+ }), /* @__PURE__ */ React14.createElement(Main3.Overlay, null), isEmpty && /* @__PURE__ */ React14.createElement(Main3.Content, {
848
871
  handlesFocus: true
849
- }, /* @__PURE__ */ React13.createElement(ContentEmpty, null)), !isEmpty && /* @__PURE__ */ React13.createElement(Main3.Content, {
872
+ }, /* @__PURE__ */ React14.createElement(ContentEmpty, null)), !isEmpty && /* @__PURE__ */ React14.createElement(Main3.Content, {
850
873
  bounce: true,
851
874
  classNames: "grid block-end-[--statusbar-size]",
852
- handlesFocus: true
853
- }, /* @__PURE__ */ React13.createElement("div", {
875
+ handlesFocus: true,
876
+ style: {
877
+ "--dx-main-sidebarWidth": sidebarOpen ? "var(--nav-sidebar-size)" : "0px",
878
+ "--dx-main-complementaryWidth": complementarySidebarOpen ? "var(--complementary-sidebar-size)" : "0px",
879
+ "--dx-main-contentFirstWidth": `${plankSizing[layoutParts.main?.[0]?.id ?? "never"] ?? DEFAULT_HORIZONTAL_SIZE}rem`,
880
+ "--dx-main-contentLastWidth": `${plankSizing[layoutParts.main?.[(layoutParts.main?.length ?? 1) - 1]?.id ?? "never"] ?? DEFAULT_HORIZONTAL_SIZE}rem`
881
+ }
882
+ }, /* @__PURE__ */ React14.createElement("div", {
854
883
  role: "none",
855
- className: "relative"
856
- }, /* @__PURE__ */ React13.createElement(Deck.Root, {
857
- style: padding,
884
+ className: !isSoloModeLoaded ? "relative bg-deck overflow-hidden" : "sr-only",
885
+ ...isSoloModeLoaded && {
886
+ inert: ""
887
+ }
888
+ }, /* @__PURE__ */ React14.createElement(Stack, {
889
+ orientation: "horizontal",
890
+ size: "contain",
858
891
  classNames: [
859
- !flatDeck && "bg-deck",
860
- mainPaddingTransitions2,
861
- "absolute inset-0",
862
- slots?.wallpaper?.classNames
892
+ "absolute inset-block-0 -inset-inline-px",
893
+ mainPaddingTransitions2
863
894
  ],
864
- solo: layoutMode === "solo",
865
895
  onScroll: handleScroll,
896
+ itemsCount: 2 * (layoutParts.main?.length ?? 0) - 1,
897
+ style: padding,
866
898
  ref: deckRef
867
- }, /* @__PURE__ */ React13.createElement(Plank, {
868
- entry: layoutParts.solo?.[0],
869
- layoutParts,
870
- part: "solo",
871
- layoutMode,
872
- flatDeck,
873
- searchEnabled: !!searchPlugin
874
- }), layoutParts.main?.map((layoutEntry) => /* @__PURE__ */ React13.createElement(Plank, {
875
- key: layoutEntry.id,
899
+ }, layoutParts.main?.map((layoutEntry, index) => /* @__PURE__ */ React14.createElement(Fragment2, {
900
+ key: layoutEntry.id
901
+ }, /* @__PURE__ */ React14.createElement(PlankSeparator, {
902
+ index
903
+ }), /* @__PURE__ */ React14.createElement(Plank, {
876
904
  entry: layoutEntry,
877
905
  layoutParts,
878
906
  part: "main",
879
907
  layoutMode,
880
- flatDeck,
881
- searchEnabled: !!searchPlugin
882
- }))))), /* @__PURE__ */ React13.createElement(StatusBar, {
908
+ order: index * 2 + 1,
909
+ last: index === layoutParts.main.length - 1
910
+ }))))), /* @__PURE__ */ React14.createElement("div", {
911
+ role: "none",
912
+ className: isSoloModeLoaded ? "relative bg-deck overflow-hidden" : "sr-only",
913
+ ...!isSoloModeLoaded && {
914
+ inert: ""
915
+ }
916
+ }, /* @__PURE__ */ React14.createElement(StackContext2.Provider, {
917
+ value: {
918
+ size: "contain",
919
+ orientation: "horizontal",
920
+ separators: true,
921
+ rail: true
922
+ }
923
+ }, /* @__PURE__ */ React14.createElement(Plank, {
924
+ entry: layoutParts.solo?.[0],
925
+ layoutParts,
926
+ part: "solo",
927
+ layoutMode
928
+ })))), /* @__PURE__ */ React14.createElement(StatusBar, {
883
929
  showHints
884
- }), /* @__PURE__ */ React13.createElement(Popover2.Portal, null, /* @__PURE__ */ React13.createElement(Popover2.Content, {
930
+ })), /* @__PURE__ */ React14.createElement(Popover2.Portal, null, /* @__PURE__ */ React14.createElement(Popover2.Content, {
885
931
  classNames: "z-[60]",
886
932
  onEscapeKeyDown: () => {
887
933
  context.popoverOpen = false;
888
934
  context.popoverAnchorId = void 0;
889
935
  }
890
- }, /* @__PURE__ */ React13.createElement(Popover2.Viewport, null, /* @__PURE__ */ React13.createElement(Surface9, {
936
+ }, /* @__PURE__ */ React14.createElement(Popover2.Viewport, null, /* @__PURE__ */ React14.createElement(Surface9, {
891
937
  role: "popover",
892
938
  data: popoverContent
893
- })), /* @__PURE__ */ React13.createElement(Popover2.Arrow, null))), /* @__PURE__ */ React13.createElement(Dialog.Root, {
939
+ })), /* @__PURE__ */ React14.createElement(Popover2.Arrow, null))), /* @__PURE__ */ React14.createElement(Dialog.Root, {
894
940
  open: dialogOpen,
895
941
  onOpenChange: (nextOpen) => context.dialogOpen = nextOpen
896
- }, /* @__PURE__ */ React13.createElement(Dialog.Overlay, {
942
+ }, /* @__PURE__ */ React14.createElement(Dialog.Overlay, {
897
943
  blockAlign: dialogBlockAlign
898
- }, /* @__PURE__ */ React13.createElement(Surface9, {
944
+ }, /* @__PURE__ */ React14.createElement(Surface9, {
899
945
  role: "dialog",
900
946
  data: dialogContent
901
- }))), toasts?.map((toast) => /* @__PURE__ */ React13.createElement(Toast, {
947
+ }))), toasts?.map((toast) => /* @__PURE__ */ React14.createElement(Toast, {
902
948
  ...toast,
903
949
  key: toast.id,
904
950
  onOpenChange: (open) => {
@@ -907,54 +953,54 @@ var DeckLayout = ({ layoutParts, toasts, flatDeck, overscroll, showHints, slots,
907
953
  }
908
954
  return open;
909
955
  }
910
- }))));
956
+ })));
911
957
  };
912
958
 
913
959
  // packages/plugins/plugin-deck/src/components/LayoutSettings.tsx
914
- import React14 from "react";
960
+ import React15 from "react";
915
961
  import { Input, Select, useTranslation as useTranslation6 } from "@dxos/react-ui";
916
962
  import { DeprecatedFormInput } from "@dxos/react-ui-data";
917
963
  var isSocket = !!globalThis.__args;
918
964
  var LayoutSettings = ({ settings }) => {
919
965
  const { t } = useTranslation6(DECK_PLUGIN);
920
- return /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(DeprecatedFormInput, {
966
+ return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(DeprecatedFormInput, {
921
967
  label: t("select new plank positioning label")
922
- }, /* @__PURE__ */ React14.createElement(Select.Root, {
968
+ }, /* @__PURE__ */ React15.createElement(Select.Root, {
923
969
  value: settings.newPlankPositioning ?? "start",
924
970
  onValueChange: (value) => settings.newPlankPositioning = value
925
- }, /* @__PURE__ */ React14.createElement(Select.TriggerButton, {
971
+ }, /* @__PURE__ */ React15.createElement(Select.TriggerButton, {
926
972
  placeholder: t("select new plank positioning placeholder")
927
- }), /* @__PURE__ */ React14.createElement(Select.Portal, null, /* @__PURE__ */ React14.createElement(Select.Content, null, /* @__PURE__ */ React14.createElement(Select.Viewport, null, NewPlankPositions.map((position) => /* @__PURE__ */ React14.createElement(Select.Option, {
973
+ }), /* @__PURE__ */ React15.createElement(Select.Portal, null, /* @__PURE__ */ React15.createElement(Select.Content, null, /* @__PURE__ */ React15.createElement(Select.Viewport, null, NewPlankPositions.map((position) => /* @__PURE__ */ React15.createElement(Select.Option, {
928
974
  key: position,
929
975
  value: position
930
- }, t(`settings new plank position ${position} label`)))))))), /* @__PURE__ */ React14.createElement(DeprecatedFormInput, {
976
+ }, t(`settings new plank position ${position} label`)))))))), /* @__PURE__ */ React15.createElement(DeprecatedFormInput, {
931
977
  label: t("settings overscroll label")
932
- }, /* @__PURE__ */ React14.createElement(Select.Root, {
978
+ }, /* @__PURE__ */ React15.createElement(Select.Root, {
933
979
  value: settings.overscroll ?? "none",
934
980
  onValueChange: (value) => settings.overscroll = value
935
- }, /* @__PURE__ */ React14.createElement(Select.TriggerButton, {
981
+ }, /* @__PURE__ */ React15.createElement(Select.TriggerButton, {
936
982
  placeholder: t("select overscroll placeholder")
937
- }), /* @__PURE__ */ React14.createElement(Select.Portal, null, /* @__PURE__ */ React14.createElement(Select.Content, null, /* @__PURE__ */ React14.createElement(Select.Viewport, null, OverscrollOptions.map((option) => /* @__PURE__ */ React14.createElement(Select.Option, {
983
+ }), /* @__PURE__ */ React15.createElement(Select.Portal, null, /* @__PURE__ */ React15.createElement(Select.Content, null, /* @__PURE__ */ React15.createElement(Select.Viewport, null, OverscrollOptions.map((option) => /* @__PURE__ */ React15.createElement(Select.Option, {
938
984
  key: option,
939
985
  value: option
940
- }, t(`settings overscroll ${option} label`)))))))), /* @__PURE__ */ React14.createElement(DeprecatedFormInput, {
986
+ }, t(`settings overscroll ${option} label`)))))))), /* @__PURE__ */ React15.createElement(DeprecatedFormInput, {
941
987
  label: t("settings show hints label")
942
- }, /* @__PURE__ */ React14.createElement(Input.Switch, {
988
+ }, /* @__PURE__ */ React15.createElement(Input.Switch, {
943
989
  checked: settings.showHints,
944
990
  onCheckedChange: (checked) => settings.showHints = checked
945
- })), !isSocket && /* @__PURE__ */ React14.createElement(DeprecatedFormInput, {
991
+ })), !isSocket && /* @__PURE__ */ React15.createElement(DeprecatedFormInput, {
946
992
  label: t("settings native redirect label")
947
- }, /* @__PURE__ */ React14.createElement(Input.Switch, {
993
+ }, /* @__PURE__ */ React15.createElement(Input.Switch, {
948
994
  checked: settings.enableNativeRedirect,
949
995
  onCheckedChange: (checked) => settings.enableNativeRedirect = checked
950
- })), /* @__PURE__ */ React14.createElement(DeprecatedFormInput, {
996
+ })), /* @__PURE__ */ React15.createElement(DeprecatedFormInput, {
951
997
  label: t("settings custom slots")
952
- }, /* @__PURE__ */ React14.createElement(Input.Switch, {
998
+ }, /* @__PURE__ */ React15.createElement(Input.Switch, {
953
999
  checked: settings.customSlots,
954
1000
  onCheckedChange: (checked) => settings.customSlots = checked
955
- })), /* @__PURE__ */ React14.createElement(DeprecatedFormInput, {
1001
+ })), /* @__PURE__ */ React15.createElement(DeprecatedFormInput, {
956
1002
  label: t("settings flat deck")
957
- }, /* @__PURE__ */ React14.createElement(Input.Switch, {
1003
+ }, /* @__PURE__ */ React15.createElement(Input.Switch, {
958
1004
  checked: settings.flatDeck,
959
1005
  onCheckedChange: (checked) => settings.flatDeck = checked
960
1006
  })));
@@ -1111,8 +1157,8 @@ var translations_default = [
1111
1157
  "en-US": {
1112
1158
  [DECK_PLUGIN]: {
1113
1159
  "main header label": "Main header",
1114
- "open navigation sidebar label": "Open navigation sidebar.",
1115
- "open complementary sidebar label": "Open complementary sidebar.",
1160
+ "open navigation sidebar label": "Open navigation sidebar",
1161
+ "open complementary sidebar label": "Open complementary sidebar",
1116
1162
  "plugin error message": "Content failed to render.",
1117
1163
  "content fallback message": "Unsupported",
1118
1164
  "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.",
@@ -1135,7 +1181,14 @@ var translations_default = [
1135
1181
  "reload required message": "Reload required.",
1136
1182
  "pending heading": "Loading\u2026",
1137
1183
  "insert plank label": "Open",
1138
- "solo plank label": "Solo",
1184
+ "resize label": "Drag to resize",
1185
+ "pin start label": "Pin to the left sidebar",
1186
+ "pin end label": "Pin to the right sidebar",
1187
+ "increment start label": "Move to the left",
1188
+ "increment end label": "Move to the right",
1189
+ "solo plank label": "Toggle solo mode",
1190
+ "close label": "Close",
1191
+ "minify label": "Minify",
1139
1192
  "settings overscroll label": "Plank Overscrolling",
1140
1193
  "select overscroll placeholder": "Select plank overscrolling behavior",
1141
1194
  "settings overscroll centering label": "Centering",
@@ -1150,11 +1203,6 @@ var translations_default = [
1150
1203
  var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-deck/src/DeckPlugin.tsx";
1151
1204
  var isSocket2 = !!globalThis.__args;
1152
1205
  var appScheme = "composer://";
1153
- var customSlots = {
1154
- wallpaper: {
1155
- classNames: "bg-cover bg-no-repeat dark:bg-[url(https://cdn.midjourney.com/3865ba61-f98a-4d94-b91a-1763ead01f4f/0_0.jpeg)]"
1156
- }
1157
- };
1158
1206
  setAutoFreeze(false);
1159
1207
  var DECK_ACTION = "dxos.org/plugin/deck";
1160
1208
  var DeckAction;
@@ -1165,7 +1213,6 @@ var DeckPlugin = ({ observability } = {}) => {
1165
1213
  let graphPlugin;
1166
1214
  let intentPlugin;
1167
1215
  let attentionPlugin;
1168
- let clientPlugin;
1169
1216
  const unsubscriptionCallbacks = [];
1170
1217
  let currentUndoId;
1171
1218
  let handleNavigation;
@@ -1278,7 +1325,6 @@ var DeckPlugin = ({ observability } = {}) => {
1278
1325
  intentPlugin = resolvePlugin(plugins, parseIntentPlugin);
1279
1326
  graphPlugin = resolvePlugin(plugins, parseGraphPlugin);
1280
1327
  attentionPlugin = resolvePlugin(plugins, parseAttentionPlugin);
1281
- clientPlugin = resolvePlugin(plugins, parseClientPlugin);
1282
1328
  layout.prop({
1283
1329
  key: "layoutMode",
1284
1330
  type: LocalStorageStore.enum()
@@ -1301,11 +1347,6 @@ var DeckPlugin = ({ observability } = {}) => {
1301
1347
  type: LocalStorageStore.json()
1302
1348
  });
1303
1349
  panels.push(...filterPlugins(plugins, parsePanelPlugin).flatMap((plugin) => plugin.provides.complementary.panels));
1304
- unsubscriptionCallbacks.push(clientPlugin?.provides.client.shell.onReset(() => {
1305
- layout.expunge();
1306
- location.expunge();
1307
- deck.expunge();
1308
- }));
1309
1350
  settings.prop({
1310
1351
  key: "showHints",
1311
1352
  type: LocalStorageStore.bool()
@@ -1346,11 +1387,12 @@ var DeckPlugin = ({ observability } = {}) => {
1346
1387
  window.location.pathname = "/";
1347
1388
  return;
1348
1389
  }
1390
+ const startingLayout = removePart(location.values.active, "solo");
1349
1391
  const layoutFromUri = uriToSoloPart(pathname);
1350
1392
  if (!layoutFromUri) {
1393
+ handleSetLocation(startingLayout);
1351
1394
  return;
1352
1395
  }
1353
- const startingLayout = removePart(location.values.active, "solo");
1354
1396
  handleSetLocation(mergeLayoutParts(layoutFromUri, startingLayout));
1355
1397
  layout.values.layoutMode = "solo";
1356
1398
  };
@@ -1375,7 +1417,7 @@ var DeckPlugin = ({ observability } = {}) => {
1375
1417
  location: location.values,
1376
1418
  translations: [
1377
1419
  ...translations_default,
1378
- ...deckTranslations
1420
+ ...stackTranslations
1379
1421
  ],
1380
1422
  graph: {
1381
1423
  builder: () => {
@@ -1386,11 +1428,11 @@ var DeckPlugin = ({ observability } = {}) => {
1386
1428
  filter: (node) => false,
1387
1429
  actions: () => [
1388
1430
  {
1389
- id: `${LayoutAction3.SET_LAYOUT_MODE}/fullscreen`,
1431
+ id: `${LayoutAction2.SET_LAYOUT_MODE}/fullscreen`,
1390
1432
  data: async () => {
1391
1433
  await intentPlugin?.provides.intent.dispatch({
1392
1434
  plugin: DECK_PLUGIN,
1393
- action: LayoutAction3.SET_LAYOUT_MODE,
1435
+ action: LayoutAction2.SET_LAYOUT_MODE,
1394
1436
  data: {
1395
1437
  layoutMode: "fullscreen"
1396
1438
  }
@@ -1414,18 +1456,16 @@ var DeckPlugin = ({ observability } = {}) => {
1414
1456
  });
1415
1457
  }
1416
1458
  },
1417
- context: (props) => /* @__PURE__ */ React15.createElement(LayoutContext.Provider, {
1459
+ context: (props) => /* @__PURE__ */ React16.createElement(LayoutContext.Provider, {
1418
1460
  value: layout.values
1419
- }, /* @__PURE__ */ React15.createElement(DeckContext.Provider, {
1461
+ }, /* @__PURE__ */ React16.createElement(DeckContext.Provider, {
1420
1462
  value: deck.values
1421
1463
  }, props.children)),
1422
1464
  root: () => {
1423
- return /* @__PURE__ */ React15.createElement(DeckLayout, {
1465
+ return /* @__PURE__ */ React16.createElement(DeckLayout, {
1424
1466
  layoutParts: location.values.active,
1425
1467
  showHints: settings.values.showHints,
1426
1468
  overscroll: settings.values.overscroll,
1427
- flatDeck: settings.values.flatDeck,
1428
- slots: settings.values.customSlots ? customSlots : void 0,
1429
1469
  toasts: layout.values.toasts,
1430
1470
  panels,
1431
1471
  onDismissToast: (id) => {
@@ -1445,7 +1485,7 @@ var DeckPlugin = ({ observability } = {}) => {
1445
1485
  component: ({ data, role }) => {
1446
1486
  switch (role) {
1447
1487
  case "settings":
1448
- return data.plugin === meta_default.id ? /* @__PURE__ */ React15.createElement(LayoutSettings, {
1488
+ return data.plugin === meta_default.id ? /* @__PURE__ */ React16.createElement(LayoutSettings, {
1449
1489
  settings: settings.values
1450
1490
  }) : null;
1451
1491
  }
@@ -1455,10 +1495,10 @@ var DeckPlugin = ({ observability } = {}) => {
1455
1495
  intent: {
1456
1496
  resolver: (intent) => {
1457
1497
  switch (intent.action) {
1458
- case LayoutAction3.SET_LAYOUT: {
1498
+ case LayoutAction2.SET_LAYOUT: {
1459
1499
  return intent.data && handleSetLayout(intent.data);
1460
1500
  }
1461
- case LayoutAction3.SET_LAYOUT_MODE: {
1501
+ case LayoutAction2.SET_LAYOUT_MODE: {
1462
1502
  return batch(() => {
1463
1503
  if (!intent.data) {
1464
1504
  return;
@@ -1475,7 +1515,7 @@ var DeckPlugin = ({ observability } = {}) => {
1475
1515
  } else {
1476
1516
  log.warn("Invalid layout mode", intent?.data?.layoutMode, {
1477
1517
  F: __dxlog_file,
1478
- L: 406,
1518
+ L: 378,
1479
1519
  S: void 0,
1480
1520
  C: (f, a) => f(...a)
1481
1521
  });
@@ -1485,7 +1525,7 @@ var DeckPlugin = ({ observability } = {}) => {
1485
1525
  };
1486
1526
  });
1487
1527
  }
1488
- case LayoutAction3.SCROLL_INTO_VIEW: {
1528
+ case LayoutAction2.SCROLL_INTO_VIEW: {
1489
1529
  layout.values.scrollIntoView = intent.data?.id ?? void 0;
1490
1530
  return void 0;
1491
1531
  }
@@ -1521,7 +1561,7 @@ var DeckPlugin = ({ observability } = {}) => {
1521
1561
  data: true
1522
1562
  };
1523
1563
  }
1524
- case NavigationAction4.OPEN: {
1564
+ case NavigationAction3.OPEN: {
1525
1565
  const previouslyOpenIds = new Set(openIds2(location.values.active));
1526
1566
  const layoutMode = layout.values.layoutMode;
1527
1567
  batch(() => {
@@ -1570,7 +1610,7 @@ var DeckPlugin = ({ observability } = {}) => {
1570
1610
  intents: [
1571
1611
  newlyOpen.length > 0 ? [
1572
1612
  {
1573
- action: LayoutAction3.SCROLL_INTO_VIEW,
1613
+ action: LayoutAction2.SCROLL_INTO_VIEW,
1574
1614
  data: {
1575
1615
  id: newlyOpen[0]
1576
1616
  }
@@ -1578,7 +1618,7 @@ var DeckPlugin = ({ observability } = {}) => {
1578
1618
  ] : [],
1579
1619
  intent.data?.object ? [
1580
1620
  {
1581
- action: NavigationAction4.EXPOSE,
1621
+ action: NavigationAction3.EXPOSE,
1582
1622
  data: {
1583
1623
  id: fullyQualifiedId(intent.data.object)
1584
1624
  }
@@ -1601,7 +1641,7 @@ var DeckPlugin = ({ observability } = {}) => {
1601
1641
  ]
1602
1642
  };
1603
1643
  }
1604
- case NavigationAction4.ADD_TO_ACTIVE: {
1644
+ case NavigationAction3.ADD_TO_ACTIVE: {
1605
1645
  const data = intent.data;
1606
1646
  const layoutEntry = {
1607
1647
  id: data.id
@@ -1615,7 +1655,7 @@ var DeckPlugin = ({ observability } = {}) => {
1615
1655
  if (data.scrollIntoView && layout.values.layoutMode === "deck") {
1616
1656
  intents.push([
1617
1657
  {
1618
- action: LayoutAction3.SCROLL_INTO_VIEW,
1658
+ action: LayoutAction2.SCROLL_INTO_VIEW,
1619
1659
  data: {
1620
1660
  id: data.id
1621
1661
  }
@@ -1627,7 +1667,7 @@ var DeckPlugin = ({ observability } = {}) => {
1627
1667
  intents
1628
1668
  };
1629
1669
  }
1630
- case NavigationAction4.CLOSE: {
1670
+ case NavigationAction3.CLOSE: {
1631
1671
  return batch(() => {
1632
1672
  if (!intent.data) {
1633
1673
  return;
@@ -1659,7 +1699,7 @@ var DeckPlugin = ({ observability } = {}) => {
1659
1699
  });
1660
1700
  }
1661
1701
  // TODO(wittjosiah): Factor out.
1662
- case NavigationAction4.SET: {
1702
+ case NavigationAction3.SET: {
1663
1703
  return batch(() => {
1664
1704
  if (isLayoutParts(intent.data?.activeParts)) {
1665
1705
  handleSetLocation(intent.data.activeParts);
@@ -1669,7 +1709,7 @@ var DeckPlugin = ({ observability } = {}) => {
1669
1709
  };
1670
1710
  });
1671
1711
  }
1672
- case NavigationAction4.ADJUST: {
1712
+ case NavigationAction3.ADJUST: {
1673
1713
  return batch(() => {
1674
1714
  if (isLayoutAdjustment(intent.data)) {
1675
1715
  const adjustment = intent.data;
@@ -1687,13 +1727,13 @@ var DeckPlugin = ({ observability } = {}) => {
1687
1727
  intents: [
1688
1728
  [
1689
1729
  {
1690
- action: LayoutAction3.SET_LAYOUT_MODE,
1730
+ action: LayoutAction2.SET_LAYOUT_MODE,
1691
1731
  data: {
1692
1732
  layoutMode: "solo"
1693
1733
  }
1694
1734
  },
1695
1735
  {
1696
- action: NavigationAction4.OPEN,
1736
+ action: NavigationAction3.OPEN,
1697
1737
  data: {
1698
1738
  activeParts: {
1699
1739
  solo: [
@@ -1711,13 +1751,13 @@ var DeckPlugin = ({ observability } = {}) => {
1711
1751
  intents: [
1712
1752
  [
1713
1753
  {
1714
- action: LayoutAction3.SET_LAYOUT_MODE,
1754
+ action: LayoutAction2.SET_LAYOUT_MODE,
1715
1755
  data: {
1716
1756
  layoutMode: "deck"
1717
1757
  }
1718
1758
  },
1719
1759
  {
1720
- action: NavigationAction4.CLOSE,
1760
+ action: NavigationAction3.CLOSE,
1721
1761
  data: {
1722
1762
  activeParts: {
1723
1763
  solo: [
@@ -1727,7 +1767,7 @@ var DeckPlugin = ({ observability } = {}) => {
1727
1767
  }
1728
1768
  },
1729
1769
  {
1730
- action: NavigationAction4.OPEN,
1770
+ action: NavigationAction3.OPEN,
1731
1771
  data: {
1732
1772
  noToggle: true,
1733
1773
  activeParts: {
@@ -1738,7 +1778,7 @@ var DeckPlugin = ({ observability } = {}) => {
1738
1778
  }
1739
1779
  },
1740
1780
  {
1741
- action: LayoutAction3.SCROLL_INTO_VIEW,
1781
+ action: LayoutAction2.SCROLL_INTO_VIEW,
1742
1782
  data: {
1743
1783
  id: entryId
1744
1784
  }