@dxos/plugin-deck 0.6.13-main.548ca8d → 0.6.13-staging.1e988a3

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 (40) hide show
  1. package/dist/lib/browser/{chunk-GVOGPULO.mjs → chunk-YVHGFQQR.mjs} +1 -1
  2. package/dist/lib/browser/chunk-YVHGFQQR.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +176 -226
  4. package/dist/lib/browser/index.mjs.map +3 -3
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/meta.mjs +1 -1
  7. package/dist/types/src/DeckPlugin.d.ts.map +1 -1
  8. package/dist/types/src/components/DeckLayout/ComplementarySidebar.d.ts +2 -2
  9. package/dist/types/src/components/DeckLayout/ComplementarySidebar.d.ts.map +1 -1
  10. package/dist/types/src/components/DeckLayout/DeckLayout.d.ts +4 -3
  11. package/dist/types/src/components/DeckLayout/DeckLayout.d.ts.map +1 -1
  12. package/dist/types/src/components/DeckLayout/NodePlankHeading.d.ts +3 -4
  13. package/dist/types/src/components/DeckLayout/NodePlankHeading.d.ts.map +1 -1
  14. package/dist/types/src/components/DeckLayout/Sidebar.d.ts +3 -2
  15. package/dist/types/src/components/DeckLayout/Sidebar.d.ts.map +1 -1
  16. package/dist/types/src/components/DeckLayout/StatusBar.d.ts +1 -3
  17. package/dist/types/src/components/DeckLayout/StatusBar.d.ts.map +1 -1
  18. package/dist/types/src/components/LayoutSettings.d.ts.map +1 -1
  19. package/dist/types/src/hooks/useNode.d.ts.map +1 -1
  20. package/dist/types/src/layout.d.ts.map +1 -1
  21. package/dist/types/src/meta.d.ts.map +1 -1
  22. package/dist/types/src/translations.d.ts +1 -3
  23. package/dist/types/src/translations.d.ts.map +1 -1
  24. package/dist/types/src/types.d.ts +1 -1
  25. package/dist/types/src/types.d.ts.map +1 -1
  26. package/package.json +29 -30
  27. package/src/DeckPlugin.tsx +71 -93
  28. package/src/components/DeckLayout/ComplementarySidebar.tsx +23 -67
  29. package/src/components/DeckLayout/DeckLayout.tsx +82 -56
  30. package/src/components/DeckLayout/NodePlankHeading.tsx +15 -15
  31. package/src/components/DeckLayout/Plank.tsx +3 -3
  32. package/src/components/DeckLayout/Sidebar.tsx +5 -6
  33. package/src/components/DeckLayout/StatusBar.tsx +2 -10
  34. package/src/components/LayoutSettings.tsx +8 -5
  35. package/src/hooks/useNode.ts +1 -5
  36. package/src/layout.ts +0 -1
  37. package/src/meta.ts +1 -3
  38. package/src/translations.ts +1 -3
  39. package/src/types.ts +1 -1
  40. package/dist/lib/browser/chunk-GVOGPULO.mjs.map +0 -7
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  DECK_PLUGIN,
3
3
  meta_default
4
- } from "./chunk-GVOGPULO.mjs";
4
+ } from "./chunk-YVHGFQQR.mjs";
5
5
 
6
6
  // packages/plugins/plugin-deck/src/DeckPlugin.tsx
7
- import { batch } from "@preact/signals-core";
7
+ import { ArrowsOut } from "@phosphor-icons/react";
8
+ import { batch, effect } from "@preact/signals-core";
8
9
  import { setAutoFreeze } from "immer";
9
10
  import React15 from "react";
10
- 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 } from "@dxos/app-framework";
11
+ import { IntentAction, LayoutAction as LayoutAction3, NavigationAction as NavigationAction3, parseGraphPlugin, parseIntentPlugin, resolvePlugin, Toast as ToastSchema, SLUG_PATH_SEPARATOR as SLUG_PATH_SEPARATOR5, isLayoutParts, isLayoutAdjustment, isLayoutMode, openIds as openIds2 } from "@dxos/app-framework";
11
12
  import { create, getTypename, isReactiveObject } from "@dxos/echo-schema";
12
- import { scheduledEffect } from "@dxos/echo-signals/core";
13
13
  import { LocalStorageStore } from "@dxos/local-storage";
14
14
  import { log } from "@dxos/log";
15
15
  import { parseAttentionPlugin } from "@dxos/plugin-attention";
@@ -18,6 +18,7 @@ import { createExtension } from "@dxos/plugin-graph";
18
18
  import { ObservabilityAction } from "@dxos/plugin-observability/meta";
19
19
  import { fullyQualifiedId } from "@dxos/react-client/echo";
20
20
  import { translations as deckTranslations } from "@dxos/react-ui-deck";
21
+ import { Mosaic } from "@dxos/react-ui-mosaic";
21
22
 
22
23
  // packages/plugins/plugin-deck/src/components/DeckLayout/constants.ts
23
24
  var NAV_ID = "NavTree";
@@ -25,10 +26,9 @@ var SURFACE_PREFIX = "surface:";
25
26
 
26
27
  // packages/plugins/plugin-deck/src/components/DeckLayout/DeckLayout.tsx
27
28
  import { Sidebar as MenuIcon } from "@phosphor-icons/react";
28
- import React13, { useCallback as useCallback2, useEffect as useEffect5, useMemo as useMemo3, useRef as useRef2 } from "react";
29
- import { Surface as Surface9, firstIdInPart, usePlugin } from "@dxos/app-framework";
30
- import { Button as Button3, Dialog, Main as Main3, Popover as Popover2, useOnTransition, useTranslation as useTranslation5 } from "@dxos/react-ui";
31
- import { useAttended as useAttended3 } from "@dxos/react-ui-attention";
29
+ import React13, { useCallback as useCallback2, useEffect as useEffect5, useMemo as useMemo2, useRef as useRef2, useState as useState3, useLayoutEffect as useLayoutEffect2 } from "react";
30
+ import { SLUG_PATH_SEPARATOR as SLUG_PATH_SEPARATOR3, Surface as Surface9, firstIdInPart, usePlugin } from "@dxos/app-framework";
31
+ import { Button as Button3, Dialog, Main as Main3, Popover as Popover2, useTranslation as useTranslation5 } from "@dxos/react-ui";
32
32
  import { Deck } from "@dxos/react-ui-deck";
33
33
  import { getSize } from "@dxos/react-ui-theme";
34
34
 
@@ -40,11 +40,8 @@ import { useGraph } from "@dxos/plugin-graph";
40
40
  // packages/plugins/plugin-deck/src/hooks/useNode.ts
41
41
  import { useEffect, useState } from "react";
42
42
  var useNode = (graph, id, timeout) => {
43
- const [nodeState, setNodeState] = useState(id ? graph.findNode(id, false) : void 0);
43
+ const [nodeState, setNodeState] = useState(id ? graph.findNode(id) : void 0);
44
44
  useEffect(() => {
45
- if (!id && nodeState) {
46
- setNodeState(void 0);
47
- }
48
45
  if (nodeState?.id === id || !id) {
49
46
  return;
50
47
  }
@@ -116,25 +113,36 @@ var ActiveNode = ({ id }) => {
116
113
  };
117
114
 
118
115
  // packages/plugins/plugin-deck/src/components/DeckLayout/ComplementarySidebar.tsx
119
- import React5, { useMemo } from "react";
120
- import { NavigationAction as NavigationAction2, SLUG_PATH_SEPARATOR as SLUG_PATH_SEPARATOR2, Surface as Surface3, useIntentDispatcher as useIntentDispatcher2 } from "@dxos/app-framework";
116
+ import React5 from "react";
117
+ import { SLUG_PATH_SEPARATOR as SLUG_PATH_SEPARATOR2, Surface as Surface3 } from "@dxos/app-framework";
121
118
  import { useGraph as useGraph3 } from "@dxos/plugin-graph";
122
119
  import { Main } from "@dxos/react-ui";
123
- import { useAttended } from "@dxos/react-ui-attention";
120
+ import { createAttendableAttributes } from "@dxos/react-ui-attention";
124
121
  import { deckGrid } from "@dxos/react-ui-deck";
125
122
  import { mx as mx2 } from "@dxos/react-ui-theme";
126
123
 
127
124
  // packages/plugins/plugin-deck/src/components/DeckLayout/NodePlankHeading.tsx
125
+ import { Placeholder } from "@phosphor-icons/react";
128
126
  import React2, { Fragment, useEffect as useEffect3 } from "react";
129
- import { LayoutAction, NavigationAction, SLUG_PATH_SEPARATOR, Surface as Surface2, useIntentDispatcher, indexInPart, partLength } from "@dxos/app-framework";
127
+ import { LayoutAction, NavigationAction, SLUG_COLLECTION_INDICATOR, SLUG_PATH_SEPARATOR, Surface as Surface2, useIntentDispatcher, indexInPart, partLength } from "@dxos/app-framework";
130
128
  import { useGraph as useGraph2 } from "@dxos/plugin-graph";
131
- import { Icon, Popover, toLocalizedString, useMediaQuery, useTranslation } from "@dxos/react-ui";
132
- import { PlankHeading } from "@dxos/react-ui-deck";
129
+ import { Popover, toLocalizedString, useMediaQuery, useTranslation } from "@dxos/react-ui";
130
+ import { PlankHeading, plankHeadingIconProps } from "@dxos/react-ui-deck";
133
131
  import { TextTooltip } from "@dxos/react-ui-text-tooltip";
134
- var NodePlankHeading = ({ node, id, layoutParts, layoutPart, popoverAnchorId, pending, flatDeck, actions = [] }) => {
132
+ var NodePlankHeading = ({
133
+ node,
134
+ id,
135
+ layoutParts,
136
+ layoutPart,
137
+ // TODO(wittjosiah): Unused?
138
+ layoutEntry,
139
+ popoverAnchorId,
140
+ pending,
141
+ flatDeck
142
+ }) => {
135
143
  const { t } = useTranslation(DECK_PLUGIN);
136
144
  const { graph } = useGraph2();
137
- const icon = node?.properties?.icon ?? "ph--placeholder--regular";
145
+ const Icon = node?.properties?.icon ?? Placeholder;
138
146
  const label = pending ? t("pending heading") : toLocalizedString(node?.properties?.label ?? [
139
147
  "plank heading fallback label",
140
148
  {
@@ -164,14 +172,10 @@ var NodePlankHeading = ({ node, id, layoutParts, layoutPart, popoverAnchorId, pe
164
172
  return /* @__PURE__ */ React2.createElement(PlankHeading.Root, (layoutPart !== "main" || !flatDeck) && {
165
173
  classNames: "pie-1 border-b border-separator"
166
174
  }, /* @__PURE__ */ React2.createElement(ActionRoot, null, node ? /* @__PURE__ */ React2.createElement(PlankHeading.ActionsMenu, {
167
- icon,
168
- related: layoutPart === "complementary",
175
+ Icon,
169
176
  attendableId,
170
177
  triggerLabel: t("actions menu label"),
171
- actions: [
172
- actions,
173
- graph.actions(node)
174
- ].filter((a) => a.length > 0),
178
+ actions: graph.actions(node),
175
179
  onAction: (action) => typeof action.data === "function" && action.data?.({
176
180
  node: action,
177
181
  caller: DECK_PLUGIN
@@ -183,15 +187,11 @@ var NodePlankHeading = ({ node, id, layoutParts, layoutPart, popoverAnchorId, pe
183
187
  }
184
188
  })) : /* @__PURE__ */ React2.createElement(PlankHeading.Button, null, /* @__PURE__ */ React2.createElement("span", {
185
189
  className: "sr-only"
186
- }, label), /* @__PURE__ */ React2.createElement(Icon, {
187
- icon,
188
- size: 5
189
- }))), /* @__PURE__ */ React2.createElement(TextTooltip, {
190
+ }, label), /* @__PURE__ */ React2.createElement(Icon, plankHeadingIconProps))), /* @__PURE__ */ React2.createElement(TextTooltip, {
190
191
  text: label,
191
192
  onlyWhenTruncating: true
192
193
  }, /* @__PURE__ */ React2.createElement(PlankHeading.Label, {
193
- attendableId,
194
- related: layoutPart === "complementary",
194
+ attendableId: node?.id,
195
195
  ...pending && {
196
196
  classNames: "text-description"
197
197
  }
@@ -237,6 +237,9 @@ var NodePlankHeading = ({ node, id, layoutParts, layoutPart, popoverAnchorId, pe
237
237
  action: NavigationAction.CLOSE,
238
238
  data: {
239
239
  activeParts: {
240
+ complementary: [
241
+ `${id}${SLUG_PATH_SEPARATOR}comments${SLUG_COLLECTION_INDICATOR}`
242
+ ],
240
243
  [layoutPart]: [
241
244
  id
242
245
  ]
@@ -250,7 +253,7 @@ var NodePlankHeading = ({ node, id, layoutParts, layoutPart, popoverAnchorId, pe
250
253
  }
251
254
  });
252
255
  },
253
- close: layoutPart === "complementary" ? "minify-end" : true
256
+ close: layoutCoordinate?.part === "complementary" ? "minify-end" : true
254
257
  }));
255
258
  };
256
259
 
@@ -311,68 +314,13 @@ var LayoutContext = createContext(null);
311
314
  var useLayout = () => useContext(LayoutContext) ?? raise(new Error("Missing LayoutContext"));
312
315
 
313
316
  // packages/plugins/plugin-deck/src/components/DeckLayout/ComplementarySidebar.tsx
314
- var panels = [
315
- "comments",
316
- "settings",
317
- "debug"
318
- ];
319
- var nodes = [
320
- {
321
- id: "comments",
322
- icon: "ph--chat-text--regular"
323
- },
324
- {
325
- id: "settings",
326
- icon: "ph--gear--regular"
327
- },
328
- {
329
- id: "debug",
330
- icon: "ph--bug--regular"
331
- }
332
- ];
333
- var getPanel = (part) => {
334
- if (part && panels.findIndex((panel) => panel === part) !== -1) {
335
- return part;
336
- } else {
337
- return "settings";
338
- }
339
- };
340
- var ComplementarySidebar = ({ layoutParts, flatDeck }) => {
317
+ var ComplementarySidebar = ({ id, layoutParts, flatDeck }) => {
341
318
  const { popoverAnchorId } = useLayout();
342
- const attended = useAttended();
343
- const part = getPanel(layoutParts.complementary?.[0].id);
344
- const id = attended[0] ? `${attended[0]}${SLUG_PATH_SEPARATOR2}${part}` : void 0;
345
319
  const { graph } = useGraph3();
346
320
  const node = useNode(graph, id);
347
- const dispatch = useIntentDispatcher2();
321
+ const complementaryAttrs = createAttendableAttributes(id?.split(SLUG_PATH_SEPARATOR2)[0] ?? "never");
348
322
  useNodeActionExpander(node);
349
- const actions = useMemo(() => nodes.map(({ id: id2, icon }) => ({
350
- id: `complementary-${id2}`,
351
- data: () => {
352
- void dispatch({
353
- action: NavigationAction2.OPEN,
354
- data: {
355
- activeParts: {
356
- complementary: id2
357
- }
358
- }
359
- });
360
- },
361
- properties: {
362
- label: [
363
- `${id2} label`,
364
- {
365
- ns: DECK_PLUGIN
366
- }
367
- ],
368
- icon,
369
- menuItemType: "toggle",
370
- isChecked: part === id2
371
- }
372
- })), [
373
- part
374
- ]);
375
- return /* @__PURE__ */ React5.createElement(Main.ComplementarySidebar, null, /* @__PURE__ */ React5.createElement("div", {
323
+ return /* @__PURE__ */ React5.createElement(Main.ComplementarySidebar, complementaryAttrs, node ? /* @__PURE__ */ React5.createElement("div", {
376
324
  role: "none",
377
325
  className: mx2(deckGrid, "grid-cols-1 bs-full")
378
326
  }, /* @__PURE__ */ React5.createElement(NodePlankHeading, {
@@ -381,18 +329,18 @@ var ComplementarySidebar = ({ layoutParts, flatDeck }) => {
381
329
  layoutParts,
382
330
  layoutPart: "complementary",
383
331
  popoverAnchorId,
384
- flatDeck,
385
- actions
386
- }), node && /* @__PURE__ */ React5.createElement(Surface3, {
387
- role: `complementary--${part}`,
332
+ flatDeck
333
+ }), /* @__PURE__ */ React5.createElement(Surface3, {
334
+ role: "article",
388
335
  data: {
389
- subject: node.properties.object,
336
+ subject: node.data,
337
+ part: "complementary",
390
338
  popoverAnchorId
391
339
  },
392
340
  limit: 1,
393
341
  fallback: PlankContentError,
394
342
  placeholder: /* @__PURE__ */ React5.createElement(PlankLoading, null)
395
- })));
343
+ })) : null);
396
344
  };
397
345
 
398
346
  // packages/plugins/plugin-deck/src/components/DeckLayout/ContentEmpty.tsx
@@ -453,11 +401,11 @@ var Fullscreen = ({ id }) => {
453
401
  // packages/plugins/plugin-deck/src/components/DeckLayout/Plank.tsx
454
402
  import { Plus } from "@phosphor-icons/react";
455
403
  import React9, { useCallback, useLayoutEffect, useRef } from "react";
456
- import { LayoutAction as LayoutAction2, NavigationAction as NavigationAction3, Surface as Surface6, useIntentDispatcher as useIntentDispatcher3 } from "@dxos/app-framework";
404
+ import { LayoutAction as LayoutAction2, NavigationAction as NavigationAction2, Surface as Surface6, useIntentDispatcher as useIntentDispatcher2 } from "@dxos/app-framework";
457
405
  import { debounce } from "@dxos/async";
458
406
  import { useGraph as useGraph5 } from "@dxos/plugin-graph";
459
407
  import { Button, Tooltip, useTranslation as useTranslation4 } from "@dxos/react-ui";
460
- import { useAttendableAttributes } from "@dxos/react-ui-attention";
408
+ import { createAttendableAttributes as createAttendableAttributes2 } from "@dxos/react-ui-attention";
461
409
  import { Plank as NaturalPlank } from "@dxos/react-ui-deck";
462
410
  import { mainIntrinsicSize } from "@dxos/react-ui-theme";
463
411
 
@@ -470,14 +418,14 @@ var useDeckContext = () => useContext2(DeckContext) ?? raise2(new Error("Missing
470
418
  // packages/plugins/plugin-deck/src/components/DeckLayout/Plank.tsx
471
419
  var Plank = ({ entry, layoutParts, part, flatDeck, searchEnabled, layoutMode }) => {
472
420
  const { t } = useTranslation4(DECK_PLUGIN);
473
- const dispatch = useIntentDispatcher3();
421
+ const dispatch = useIntentDispatcher2();
474
422
  const { popoverAnchorId, scrollIntoView } = useLayout();
475
423
  const { plankSizing } = useDeckContext();
476
424
  const { graph } = useGraph5();
477
425
  const node = useNode(graph, entry.id);
478
426
  const rootElement = useRef(null);
479
427
  const resizeable = layoutMode === "deck";
480
- const attendableAttrs = useAttendableAttributes(entry.id);
428
+ const attendableAttrs = createAttendableAttributes2(entry.id);
481
429
  const coordinate = {
482
430
  part,
483
431
  entryId: entry.id
@@ -515,7 +463,7 @@ var Plank = ({ entry, layoutParts, part, flatDeck, searchEnabled, layoutMode })
515
463
  layoutMode
516
464
  ]);
517
465
  const isSolo = layoutMode === "solo" && part === "solo";
518
- const isSuppressed = layoutMode === "solo" && part !== "solo" || layoutMode === "deck" && part === "solo";
466
+ const isSuppressed = layoutMode === "solo" && part !== "solo";
519
467
  const sizeAttrs = useMainSize();
520
468
  return /* @__PURE__ */ React9.createElement(NaturalPlank.Root, {
521
469
  size,
@@ -581,7 +529,7 @@ var Plank = ({ entry, layoutParts, part, flatDeck, searchEnabled, layoutMode })
581
529
  component: "dxos.org/plugin/search/Dialog",
582
530
  dialogBlockAlign: "start",
583
531
  subject: {
584
- action: NavigationAction3.SET,
532
+ action: NavigationAction2.SET,
585
533
  position: "add-after",
586
534
  coordinate
587
535
  }
@@ -601,14 +549,12 @@ var Plank = ({ entry, layoutParts, part, flatDeck, searchEnabled, layoutMode })
601
549
  };
602
550
 
603
551
  // packages/plugins/plugin-deck/src/components/DeckLayout/Sidebar.tsx
604
- import React10, { useMemo as useMemo2 } from "react";
552
+ import React10, { useMemo } from "react";
605
553
  import { openIds, Surface as Surface7 } from "@dxos/app-framework";
606
554
  import { Main as Main2 } from "@dxos/react-ui";
607
- import { useAttended as useAttended2 } from "@dxos/react-ui-attention";
608
- var Sidebar = ({ layoutParts }) => {
555
+ var Sidebar = ({ attention, layoutParts }) => {
609
556
  const { layoutMode, popoverAnchorId } = useLayout();
610
- const attended = useAttended2();
611
- const activeIds = useMemo2(() => {
557
+ const activeIds = useMemo(() => {
612
558
  if (layoutMode === "solo") {
613
559
  return new Set(layoutParts?.solo?.map((e) => e.id) ?? []);
614
560
  } else if (layoutMode === "deck") {
@@ -619,14 +565,14 @@ var Sidebar = ({ layoutParts }) => {
619
565
  layoutParts,
620
566
  layoutMode
621
567
  ]);
622
- const navigationData = useMemo2(() => ({
568
+ const navigationData = useMemo(() => ({
623
569
  popoverAnchorId,
624
570
  activeIds,
625
- attended
571
+ attended: attention.attended
626
572
  }), [
627
573
  popoverAnchorId,
628
574
  activeIds,
629
- attended
575
+ attention.attended
630
576
  ]);
631
577
  return /* @__PURE__ */ React10.createElement(Main2.NavigationSidebar, null, /* @__PURE__ */ React10.createElement(Surface7, {
632
578
  role: "navigation",
@@ -641,18 +587,13 @@ var Sidebar = ({ layoutParts }) => {
641
587
  import React11 from "react";
642
588
  import { Surface as Surface8 } from "@dxos/app-framework";
643
589
  import { mainPadding, mx as mx4 } from "@dxos/react-ui-theme";
644
- var StatusBar = ({ showHints }) => {
590
+ var StatusBar = () => {
645
591
  const sizeAttrs = useMainSize();
646
592
  return /* @__PURE__ */ React11.createElement("div", {
647
593
  role: "none",
648
594
  ...sizeAttrs,
649
- className: mx4("fixed flex justify-between block-end-0 inset-inline-0 items-center border-bs border-separator z-[2]", mainPadding)
650
- }, /* @__PURE__ */ React11.createElement("div", {
651
- role: "none"
652
- }, showHints && /* @__PURE__ */ React11.createElement(Surface8, {
653
- role: "hints",
654
- limit: 1
655
- })), /* @__PURE__ */ React11.createElement(Surface8, {
595
+ className: mx4("fixed block-end-0 inset-inline-0 z-[2]", mainPadding)
596
+ }, /* @__PURE__ */ React11.createElement(Surface8, {
656
597
  role: "status-bar",
657
598
  limit: 1
658
599
  }));
@@ -731,26 +672,20 @@ var calculateOverscroll = (planks, plankSizing, sidebarOpen, complementarySideba
731
672
  };
732
673
 
733
674
  // packages/plugins/plugin-deck/src/components/DeckLayout/DeckLayout.tsx
734
- var DeckLayout = ({ layoutParts, toasts, flatDeck, overscroll, showHints, slots, onDismissToast }) => {
675
+ var DeckLayout = ({ layoutParts, attention, toasts, flatDeck, overscroll, showHintsFooter, slots, onDismissToast }) => {
735
676
  const context = useLayout();
736
677
  const { layoutMode, sidebarOpen, complementarySidebarOpen, dialogOpen, dialogContent, dialogBlockAlign, popoverOpen, popoverContent, popoverAnchorId } = context;
737
678
  const { t } = useTranslation5(DECK_PLUGIN);
738
679
  const { plankSizing } = useDeckContext();
739
- const attended = useAttended3();
740
680
  const searchPlugin = usePlugin("dxos.org/plugin/search");
741
- const fullScreenSlug = useMemo3(() => firstIdInPart(layoutParts, "fullScreen"), [
681
+ const fullScreenSlug = useMemo2(() => firstIdInPart(layoutParts, "fullScreen"), [
742
682
  layoutParts
743
683
  ]);
744
- const scrollLeftRef = useRef2();
684
+ const [scrollLeft, setScrollLeft] = useState3(null);
745
685
  const deckRef = useRef2(null);
746
- useEffect5(() => {
747
- const firstId = layoutMode === "solo" ? firstIdInPart(layoutParts, "solo") : firstIdInPart(layoutParts, "main");
748
- if (attended.length === 0 && firstId) {
749
- document.querySelector(`article[data-attendable-id="${firstId}"] button`)?.focus();
750
- }
751
- }, []);
686
+ const restoreScrollRef = useRef2(false);
752
687
  const handleResize = useCallback2(() => {
753
- scrollLeftRef.current = null;
688
+ setScrollLeft(null);
754
689
  }, []);
755
690
  useEffect5(() => {
756
691
  window.addEventListener("resize", handleResize);
@@ -758,20 +693,36 @@ var DeckLayout = ({ layoutParts, toasts, flatDeck, overscroll, showHints, slots,
758
693
  }, [
759
694
  handleResize
760
695
  ]);
761
- const restoreScroll = useCallback2(() => {
762
- if (deckRef.current && scrollLeftRef.current != null) {
763
- deckRef.current.scrollLeft = scrollLeftRef.current;
696
+ useLayoutEffect2(() => {
697
+ if (layoutMode !== "deck") {
698
+ restoreScrollRef.current = true;
699
+ } else if (restoreScrollRef.current && deckRef.current && scrollLeft) {
700
+ deckRef.current.scrollLeft = scrollLeft;
701
+ restoreScrollRef.current = false;
764
702
  }
765
- }, []);
766
- useOnTransition(layoutMode, (mode) => mode !== "deck", "deck", restoreScroll);
703
+ }, [
704
+ layoutMode,
705
+ deckRef.current,
706
+ scrollLeft
707
+ ]);
767
708
  const handleScroll = useCallback2((event) => {
768
709
  if (layoutMode === "deck" && event.currentTarget === event.target) {
769
- scrollLeftRef.current = event.target.scrollLeft;
710
+ setScrollLeft(event.target.scrollLeft);
770
711
  }
771
712
  }, [
772
713
  layoutMode
773
714
  ]);
774
- const firstAttendedId = attended[0];
715
+ const complementarySlug = useMemo2(() => {
716
+ const entry = layoutParts.complementary?.at(0);
717
+ if (entry) {
718
+ return entry.path ? `${entry.id}${SLUG_PATH_SEPARATOR3}${entry.path}` : entry.id;
719
+ }
720
+ }, [
721
+ layoutParts
722
+ ]);
723
+ const firstAttendedId = useMemo2(() => Array.from(attention.attended ?? [])[0], [
724
+ attention.attended
725
+ ]);
775
726
  useEffect5(() => {
776
727
  if (layoutMode === "deck" && firstAttendedId) {
777
728
  }
@@ -779,20 +730,21 @@ var DeckLayout = ({ layoutParts, toasts, flatDeck, overscroll, showHints, slots,
779
730
  layoutMode,
780
731
  firstAttendedId
781
732
  ]);
782
- const isEmpty = layoutParts.main?.length === 0 && layoutParts.solo?.length === 0;
783
- const padding = useMemo3(() => {
784
- if (layoutMode === "deck" && overscroll === "centering") {
785
- return calculateOverscroll(layoutParts.main, plankSizing, sidebarOpen, complementarySidebarOpen);
733
+ const parts = useMemo2(() => {
734
+ const parts2 = [
735
+ ...layoutParts.main ?? []
736
+ ];
737
+ for (const part of layoutParts.solo ?? []) {
738
+ if (!parts2.find((entry) => entry.id === part.id)) {
739
+ parts2.push(part);
740
+ }
786
741
  }
787
- return {};
742
+ return parts2;
788
743
  }, [
789
- layoutMode,
790
- overscroll,
791
744
  layoutParts.main,
792
- plankSizing,
793
- sidebarOpen,
794
- complementarySidebarOpen
745
+ layoutParts.solo
795
746
  ]);
747
+ const padding = layoutMode === "deck" && overscroll === "centering" ? calculateOverscroll(layoutParts.main, plankSizing, sidebarOpen, complementarySidebarOpen) : {};
796
748
  if (layoutMode === "fullscreen") {
797
749
  return /* @__PURE__ */ React13.createElement(Fullscreen, {
798
750
  id: fullScreenSlug
@@ -814,13 +766,19 @@ var DeckLayout = ({ layoutParts, toasts, flatDeck, overscroll, showHints, slots,
814
766
  }), /* @__PURE__ */ React13.createElement(Main3.Root, {
815
767
  navigationSidebarOpen: context.sidebarOpen,
816
768
  onNavigationSidebarOpenChange: (next) => context.sidebarOpen = next,
817
- complementarySidebarOpen: context.complementarySidebarOpen,
818
- onComplementarySidebarOpenChange: (next) => context.complementarySidebarOpen = next
769
+ ...complementarySidebarOpen !== null && {
770
+ complementarySidebarOpen: (
771
+ /* complementaryAvailable && */
772
+ context.complementarySidebarOpen
773
+ ),
774
+ onComplementarySidebarOpenChange: (next) => context.complementarySidebarOpen = next
775
+ }
819
776
  }, /* @__PURE__ */ React13.createElement(Main3.Notch, {
820
777
  classNames: "z-[21]"
821
778
  }, /* @__PURE__ */ React13.createElement(Surface9, {
822
779
  role: "notch-start"
823
780
  }), /* @__PURE__ */ React13.createElement(Button3, {
781
+ // disabled={!sidebarAvailable}
824
782
  onClick: () => context.sidebarOpen = !context.sidebarOpen,
825
783
  variant: "ghost",
826
784
  classNames: "p-1"
@@ -830,6 +788,7 @@ var DeckLayout = ({ layoutParts, toasts, flatDeck, overscroll, showHints, slots,
830
788
  weight: "light",
831
789
  className: getSize(5)
832
790
  })), /* @__PURE__ */ React13.createElement(Button3, {
791
+ // disabled={!complementaryAvailable}
833
792
  onClick: () => context.complementarySidebarOpen = !context.complementarySidebarOpen,
834
793
  variant: "ghost",
835
794
  classNames: "p-1"
@@ -842,14 +801,15 @@ var DeckLayout = ({ layoutParts, toasts, flatDeck, overscroll, showHints, slots,
842
801
  })), /* @__PURE__ */ React13.createElement(Surface9, {
843
802
  role: "notch-end"
844
803
  })), /* @__PURE__ */ React13.createElement(Sidebar, {
804
+ attention,
845
805
  layoutParts
846
806
  }), /* @__PURE__ */ React13.createElement(ComplementarySidebar, {
847
- context: "comments",
807
+ id: complementarySlug,
848
808
  layoutParts,
849
809
  flatDeck
850
- }), /* @__PURE__ */ React13.createElement(Main3.Overlay, null), isEmpty && /* @__PURE__ */ React13.createElement(Main3.Content, {
810
+ }), /* @__PURE__ */ React13.createElement(Main3.Overlay, null), parts.length === 0 && /* @__PURE__ */ React13.createElement(Main3.Content, {
851
811
  handlesFocus: true
852
- }, /* @__PURE__ */ React13.createElement(ContentEmpty, null)), !isEmpty && /* @__PURE__ */ React13.createElement(Main3.Content, {
812
+ }, /* @__PURE__ */ React13.createElement(ContentEmpty, null)), parts.length !== 0 && /* @__PURE__ */ React13.createElement(Main3.Content, {
853
813
  bounce: true,
854
814
  classNames: "grid block-end-[--statusbar-size]",
855
815
  handlesFocus: true
@@ -866,26 +826,20 @@ var DeckLayout = ({ layoutParts, toasts, flatDeck, overscroll, showHints, slots,
866
826
  solo: layoutMode === "solo",
867
827
  onScroll: handleScroll,
868
828
  ref: deckRef
869
- }, /* @__PURE__ */ React13.createElement(Plank, {
870
- entry: layoutParts.solo?.[0] ?? {
871
- id: "unknown-solo"
872
- },
873
- layoutParts,
874
- part: "solo",
875
- layoutMode,
876
- flatDeck,
877
- searchEnabled: !!searchPlugin
878
- }), layoutParts.main?.map((layoutEntry) => /* @__PURE__ */ React13.createElement(Plank, {
829
+ }, parts.map((layoutEntry) => /* @__PURE__ */ React13.createElement(Plank, {
879
830
  key: layoutEntry.id,
880
831
  entry: layoutEntry,
881
832
  layoutParts,
882
- part: "main",
833
+ part: layoutMode === "solo" && layoutEntry.id === layoutParts.solo?.[0]?.id ? "solo" : "main",
883
834
  layoutMode,
884
835
  flatDeck,
885
836
  searchEnabled: !!searchPlugin
886
- }))))), /* @__PURE__ */ React13.createElement(StatusBar, {
887
- showHints
888
- }), /* @__PURE__ */ React13.createElement(Popover2.Portal, null, /* @__PURE__ */ React13.createElement(Popover2.Content, {
837
+ }))))), /* @__PURE__ */ React13.createElement(StatusBar, null), showHintsFooter && /* @__PURE__ */ React13.createElement("div", {
838
+ className: "fixed bottom-0 left-0 right-0 h-[32px] z-[1] flex justify-center"
839
+ }, /* @__PURE__ */ React13.createElement(Surface9, {
840
+ role: "hints",
841
+ limit: 1
842
+ })), /* @__PURE__ */ React13.createElement(Popover2.Portal, null, /* @__PURE__ */ React13.createElement(Popover2.Content, {
889
843
  classNames: "z-[60]",
890
844
  onEscapeKeyDown: () => {
891
845
  context.popoverOpen = false;
@@ -954,31 +908,31 @@ var LayoutSettings = ({ settings }) => {
954
908
  key: option,
955
909
  value: option
956
910
  }, t(`settings overscroll ${option} label`)))))))), /* @__PURE__ */ React14.createElement(SettingsValue, {
957
- label: t("settings show hints label")
911
+ label: t("settings show footer label")
958
912
  }, /* @__PURE__ */ React14.createElement(Input.Switch, {
959
- checked: settings.showHints,
960
- onCheckedChange: (checked) => settings.showHints = checked
913
+ checked: settings.showFooter,
914
+ onCheckedChange: (checked) => settings.showFooter = !!checked
961
915
  })), !isSocket && /* @__PURE__ */ React14.createElement(SettingsValue, {
962
916
  label: t("settings native redirect label")
963
917
  }, /* @__PURE__ */ React14.createElement(Input.Switch, {
964
918
  checked: settings.enableNativeRedirect,
965
- onCheckedChange: (checked) => settings.enableNativeRedirect = checked
919
+ onCheckedChange: (checked) => settings.enableNativeRedirect = !!checked
966
920
  })), /* @__PURE__ */ React14.createElement(SettingsValue, {
967
921
  label: t("settings custom slots")
968
922
  }, /* @__PURE__ */ React14.createElement(Input.Switch, {
969
923
  checked: settings.customSlots,
970
- onCheckedChange: (checked) => settings.customSlots = checked
924
+ onCheckedChange: (checked) => settings.customSlots = !!checked
971
925
  })), /* @__PURE__ */ React14.createElement(SettingsValue, {
972
926
  label: t("settings flat deck")
973
927
  }, /* @__PURE__ */ React14.createElement(Input.Switch, {
974
928
  checked: settings.flatDeck,
975
- onCheckedChange: (checked) => settings.flatDeck = checked
929
+ onCheckedChange: (checked) => settings.flatDeck = !!checked
976
930
  })));
977
931
  };
978
932
 
979
933
  // packages/plugins/plugin-deck/src/layout.ts
980
934
  import { produce } from "immer";
981
- import { SLUG_ENTRY_SEPARATOR, SLUG_KEY_VALUE_SEPARATOR, SLUG_LIST_SEPARATOR, SLUG_PATH_SEPARATOR as SLUG_PATH_SEPARATOR3 } from "@dxos/app-framework";
935
+ import { SLUG_ENTRY_SEPARATOR, SLUG_KEY_VALUE_SEPARATOR, SLUG_LIST_SEPARATOR, SLUG_PATH_SEPARATOR as SLUG_PATH_SEPARATOR4 } from "@dxos/app-framework";
982
936
  var partsThatSupportIncrement = [
983
937
  "main"
984
938
  ];
@@ -1091,7 +1045,7 @@ var mergeLayoutParts = (...layoutParts) => {
1091
1045
  }), {});
1092
1046
  };
1093
1047
  var parseLayoutEntry = (itemString) => {
1094
- const [id, path] = itemString.split(SLUG_PATH_SEPARATOR3);
1048
+ const [id, path] = itemString.split(SLUG_PATH_SEPARATOR4);
1095
1049
  const entry = {
1096
1050
  id
1097
1051
  };
@@ -1118,7 +1072,7 @@ var soloPartToUri = (layout) => {
1118
1072
  return "";
1119
1073
  }
1120
1074
  const entry = soloPart[0];
1121
- return `${entry.id}${entry.path ? SLUG_PATH_SEPARATOR3 + entry.path : ""}`;
1075
+ return `${entry.id}${entry.path ? SLUG_PATH_SEPARATOR4 + entry.path : ""}`;
1122
1076
  };
1123
1077
 
1124
1078
  // packages/plugins/plugin-deck/src/translations.ts
@@ -1134,7 +1088,7 @@ var translations_default = [
1134
1088
  "content fallback message": "Unsupported",
1135
1089
  "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.",
1136
1090
  "toggle fullscreen label": "Toggle fullscreen",
1137
- "settings show hints label": "Show hints",
1091
+ "settings show footer label": "Show footer (experimental)",
1138
1092
  "settings native redirect label": "Enable native url redirect (experimental)",
1139
1093
  "settings custom slots": "Theme option (experimental)",
1140
1094
  "settings new plank position start label": "Start",
@@ -1158,9 +1112,7 @@ var translations_default = [
1158
1112
  "select overscroll placeholder": "Select plank overscrolling behavior",
1159
1113
  "settings overscroll centering label": "Centering",
1160
1114
  "settings overscroll none label": "None",
1161
- "settings flat deck": "Flatten deck appearance",
1162
- "comments label": "Show Comments",
1163
- "settings label": "Show Settings"
1115
+ "settings flat deck": "Flatten deck appearance"
1164
1116
  }
1165
1117
  }
1166
1118
  }
@@ -1190,7 +1142,7 @@ var DeckPlugin = ({ observability } = {}) => {
1190
1142
  let currentUndoId;
1191
1143
  let handleNavigation;
1192
1144
  const settings = new LocalStorageStore("dxos.org/settings/layout", {
1193
- showHints: true,
1145
+ showFooter: false,
1194
1146
  customSlots: false,
1195
1147
  flatDeck: false,
1196
1148
  enableNativeRedirect: false,
@@ -1275,22 +1227,6 @@ var DeckPlugin = ({ observability } = {}) => {
1275
1227
  }
1276
1228
  }
1277
1229
  };
1278
- const handleSetLocation = (next) => {
1279
- if (attentionPlugin) {
1280
- const attended = attentionPlugin.provides.attention.attended;
1281
- const [attendedId] = Array.from(attended);
1282
- const ids = (layout.values.layoutMode === "deck" ? next.main : next.solo)?.map(({ id }) => id) ?? [];
1283
- const isAttendedAvailable = !!attendedId && ids.includes(attendedId);
1284
- if (!isAttendedAvailable) {
1285
- requestAnimationFrame(() => {
1286
- const nextAttended = layout.values.layoutMode === "solo" ? next.solo?.[0].id : next.main?.[0]?.id;
1287
- const article = document.querySelector(`article[data-attendable-id="${nextAttended}"]`);
1288
- article?.focus();
1289
- });
1290
- }
1291
- }
1292
- location.values.active = next;
1293
- };
1294
1230
  return {
1295
1231
  meta: meta_default,
1296
1232
  ready: async (plugins) => {
@@ -1331,8 +1267,8 @@ var DeckPlugin = ({ observability } = {}) => {
1331
1267
  deck.expunge();
1332
1268
  }));
1333
1269
  settings.prop({
1334
- key: "showHints",
1335
- storageKey: "show-hints",
1270
+ key: "showFooter",
1271
+ storageKey: "show-footer",
1336
1272
  type: LocalStorageStore.bool()
1337
1273
  }).prop({
1338
1274
  key: "customSlots",
@@ -1365,13 +1301,13 @@ var DeckPlugin = ({ observability } = {}) => {
1365
1301
  handleNavigation = async () => {
1366
1302
  const pathname = window.location.pathname;
1367
1303
  if (pathname === "/reset") {
1368
- handleSetLocation({
1304
+ location.values.active = {
1369
1305
  sidebar: [
1370
1306
  {
1371
1307
  id: NAV_ID
1372
1308
  }
1373
1309
  ]
1374
- });
1310
+ };
1375
1311
  location.values.closed = [];
1376
1312
  layout.values.layoutMode = "solo";
1377
1313
  window.location.pathname = "/";
@@ -1382,16 +1318,26 @@ var DeckPlugin = ({ observability } = {}) => {
1382
1318
  return;
1383
1319
  }
1384
1320
  const startingLayout = removePart(location.values.active, "solo");
1385
- handleSetLocation(mergeLayoutParts(layoutFromUri, startingLayout));
1321
+ location.values.active = mergeLayoutParts(layoutFromUri, startingLayout);
1386
1322
  layout.values.layoutMode = "solo";
1387
1323
  };
1388
1324
  await handleNavigation();
1389
1325
  window.addEventListener("popstate", handleNavigation);
1390
- unsubscriptionCallbacks.push(scheduledEffect(() => ({
1391
- selectedPath: soloPartToUri(location.values.active)
1392
- }), ({ selectedPath }) => {
1326
+ unsubscriptionCallbacks.push(effect(() => {
1327
+ const selectedPath = soloPartToUri(location.values.active);
1393
1328
  history.pushState(null, "", `/${selectedPath}${window.location.search}`);
1394
1329
  }));
1330
+ unsubscriptionCallbacks.push(effect(() => {
1331
+ const soloId = location.values.active.solo?.[0].id;
1332
+ if (layout.values.layoutMode === "solo" && soloId && layout.values.scrollIntoView !== soloId) {
1333
+ void intentPlugin?.provides.intent.dispatch({
1334
+ action: LayoutAction3.SCROLL_INTO_VIEW,
1335
+ data: {
1336
+ id: soloId
1337
+ }
1338
+ });
1339
+ }
1340
+ }));
1395
1341
  layoutModeHistory.values.push(`${layout.values.layoutMode}`);
1396
1342
  },
1397
1343
  unload: async () => {
@@ -1434,7 +1380,8 @@ var DeckPlugin = ({ observability } = {}) => {
1434
1380
  ns: DECK_PLUGIN
1435
1381
  }
1436
1382
  ],
1437
- icon: "ph--arrows-out--regular",
1383
+ icon: (props) => /* @__PURE__ */ React15.createElement(ArrowsOut, props),
1384
+ iconSymbol: "ph--arrows-out--regular",
1438
1385
  keyBinding: {
1439
1386
  macos: "ctrl+meta+f",
1440
1387
  windows: "shift+ctrl+f"
@@ -1451,9 +1398,12 @@ var DeckPlugin = ({ observability } = {}) => {
1451
1398
  value: deck.values
1452
1399
  }, props.children)),
1453
1400
  root: () => {
1454
- return /* @__PURE__ */ React15.createElement(DeckLayout, {
1401
+ return /* @__PURE__ */ React15.createElement(Mosaic.Root, null, /* @__PURE__ */ React15.createElement(DeckLayout, {
1402
+ attention: attentionPlugin?.provides.attention ?? {
1403
+ attended: /* @__PURE__ */ new Set()
1404
+ },
1455
1405
  layoutParts: location.values.active,
1456
- showHints: settings.values.showHints,
1406
+ showHintsFooter: settings.values.showFooter,
1457
1407
  overscroll: settings.values.overscroll,
1458
1408
  flatDeck: settings.values.flatDeck,
1459
1409
  slots: settings.values.customSlots ? customSlots : void 0,
@@ -1469,7 +1419,7 @@ var DeckPlugin = ({ observability } = {}) => {
1469
1419
  }, 1e3);
1470
1420
  }
1471
1421
  }
1472
- });
1422
+ }), /* @__PURE__ */ React15.createElement(Mosaic.DragOverlay, null));
1473
1423
  },
1474
1424
  surface: {
1475
1425
  component: ({ data, role }) => {
@@ -1505,7 +1455,7 @@ var DeckPlugin = ({ observability } = {}) => {
1505
1455
  } else {
1506
1456
  log.warn("Invalid layout mode", intent?.data?.layoutMode, {
1507
1457
  F: __dxlog_file,
1508
- L: 404,
1458
+ L: 390,
1509
1459
  S: void 0,
1510
1460
  C: (f, a) => f(...a)
1511
1461
  });
@@ -1551,7 +1501,7 @@ var DeckPlugin = ({ observability } = {}) => {
1551
1501
  data: true
1552
1502
  };
1553
1503
  }
1554
- case NavigationAction4.OPEN: {
1504
+ case NavigationAction3.OPEN: {
1555
1505
  const previouslyOpenIds = new Set(openIds2(location.values.active));
1556
1506
  const layoutMode = layout.values.layoutMode;
1557
1507
  batch(() => {
@@ -1560,7 +1510,7 @@ var DeckPlugin = ({ observability } = {}) => {
1560
1510
  }
1561
1511
  const processLayoutEntry = (partName, entryString, currentLayout) => {
1562
1512
  const toggle = true;
1563
- const [id, path] = entryString.split(SLUG_PATH_SEPARATOR4);
1513
+ const [id, path] = entryString.split(SLUG_PATH_SEPARATOR5);
1564
1514
  const layoutEntry = {
1565
1515
  id,
1566
1516
  ...path ? {
@@ -1589,7 +1539,7 @@ var DeckPlugin = ({ observability } = {}) => {
1589
1539
  newLayout = processLayoutEntry(partName, layoutEntries, newLayout);
1590
1540
  }
1591
1541
  });
1592
- handleSetLocation(newLayout);
1542
+ location.values.active = newLayout;
1593
1543
  });
1594
1544
  const ids = openIds2(location.values.active);
1595
1545
  const newlyOpen = ids.filter((i) => !previouslyOpenIds.has(i));
@@ -1608,7 +1558,7 @@ var DeckPlugin = ({ observability } = {}) => {
1608
1558
  ] : [],
1609
1559
  intent.data?.object ? [
1610
1560
  {
1611
- action: NavigationAction4.EXPOSE,
1561
+ action: NavigationAction3.EXPOSE,
1612
1562
  data: {
1613
1563
  id: fullyQualifiedId(intent.data.object)
1614
1564
  }
@@ -1631,16 +1581,16 @@ var DeckPlugin = ({ observability } = {}) => {
1631
1581
  ]
1632
1582
  };
1633
1583
  }
1634
- case NavigationAction4.ADD_TO_ACTIVE: {
1584
+ case NavigationAction3.ADD_TO_ACTIVE: {
1635
1585
  const data = intent.data;
1636
1586
  const layoutEntry = {
1637
1587
  id: data.id
1638
1588
  };
1639
1589
  const effectivePart = getEffectivePart(data.part, layout.values.layoutMode);
1640
- handleSetLocation(openEntry(location.values.active, effectivePart, layoutEntry, {
1590
+ location.values.active = openEntry(location.values.active, effectivePart, layoutEntry, {
1641
1591
  positioning: data.positioning ?? settings.values.newPlankPositioning,
1642
1592
  pivotId: data.pivotId
1643
- }));
1593
+ });
1644
1594
  const intents = [];
1645
1595
  if (data.scrollIntoView && layout.values.layoutMode === "deck") {
1646
1596
  intents.push([
@@ -1657,7 +1607,7 @@ var DeckPlugin = ({ observability } = {}) => {
1657
1607
  intents
1658
1608
  };
1659
1609
  }
1660
- case NavigationAction4.CLOSE: {
1610
+ case NavigationAction3.CLOSE: {
1661
1611
  return batch(() => {
1662
1612
  if (!intent.data) {
1663
1613
  return;
@@ -1682,32 +1632,32 @@ var DeckPlugin = ({ observability } = {}) => {
1682
1632
  });
1683
1633
  }
1684
1634
  });
1685
- handleSetLocation(newLayout);
1635
+ location.values.active = newLayout;
1686
1636
  return {
1687
1637
  data: true
1688
1638
  };
1689
1639
  });
1690
1640
  }
1691
1641
  // TODO(wittjosiah): Factor out.
1692
- case NavigationAction4.SET: {
1642
+ case NavigationAction3.SET: {
1693
1643
  return batch(() => {
1694
1644
  if (isLayoutParts(intent.data?.activeParts)) {
1695
- handleSetLocation(intent.data.activeParts);
1645
+ location.values.active = intent.data.activeParts;
1696
1646
  }
1697
1647
  return {
1698
1648
  data: true
1699
1649
  };
1700
1650
  });
1701
1651
  }
1702
- case NavigationAction4.ADJUST: {
1652
+ case NavigationAction3.ADJUST: {
1703
1653
  return batch(() => {
1704
1654
  if (isLayoutAdjustment(intent.data)) {
1705
1655
  const adjustment = intent.data;
1706
1656
  if (adjustment.type === "increment-end" || adjustment.type === "increment-start") {
1707
- handleSetLocation(incrementPlank(location.values.active, {
1657
+ location.values.active = incrementPlank(location.values.active, {
1708
1658
  type: adjustment.type,
1709
1659
  layoutCoordinate: adjustment.layoutCoordinate
1710
- }));
1660
+ });
1711
1661
  }
1712
1662
  if (adjustment.type === "solo") {
1713
1663
  const entryId = adjustment.layoutCoordinate.entryId;
@@ -1723,7 +1673,7 @@ var DeckPlugin = ({ observability } = {}) => {
1723
1673
  }
1724
1674
  },
1725
1675
  {
1726
- action: NavigationAction4.OPEN,
1676
+ action: NavigationAction3.OPEN,
1727
1677
  data: {
1728
1678
  activeParts: {
1729
1679
  solo: [
@@ -1747,7 +1697,7 @@ var DeckPlugin = ({ observability } = {}) => {
1747
1697
  }
1748
1698
  },
1749
1699
  {
1750
- action: NavigationAction4.CLOSE,
1700
+ action: NavigationAction3.CLOSE,
1751
1701
  data: {
1752
1702
  activeParts: {
1753
1703
  solo: [
@@ -1757,7 +1707,7 @@ var DeckPlugin = ({ observability } = {}) => {
1757
1707
  }
1758
1708
  },
1759
1709
  {
1760
- action: NavigationAction4.OPEN,
1710
+ action: NavigationAction3.OPEN,
1761
1711
  data: {
1762
1712
  noToggle: true,
1763
1713
  activeParts: {