@dxos/plugin-deck 0.6.14-main.2b6a0f3 → 0.6.14-main.f49f251

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.
@@ -391,11 +391,13 @@ var ComplementarySidebar = ({ panel, flatDeck }) => {
391
391
  flatDeck,
392
392
  actions
393
393
  }), /* @__PURE__ */ React5.createElement("div", {
394
- className: "row-span-2 divide-y divide-separator"
394
+ className: "row-span-2 divide-y divide-separator overflow-x-hidden overflow-y-scroll"
395
395
  }, node && /* @__PURE__ */ React5.createElement(Surface3, {
396
+ key: id,
396
397
  role: `complementary--${part}`,
397
398
  data: {
398
- subject: node.properties.object,
399
+ id,
400
+ subject: node.properties.object ?? node.properties.space,
399
401
  popoverAnchorId
400
402
  },
401
403
  fallback: PlankContentError,
@@ -622,29 +624,25 @@ var Plank = /* @__PURE__ */ memo2(({ entry, layoutParts, part, flatDeck, searchE
622
624
  import React10, { useMemo as useMemo4 } from "react";
623
625
  import { openIds, Surface as Surface7 } from "@dxos/app-framework";
624
626
  import { Main as Main2 } from "@dxos/react-ui";
625
- import { useAttended as useAttended3 } from "@dxos/react-ui-attention";
626
627
  var Sidebar = ({ layoutParts }) => {
627
628
  const { layoutMode, popoverAnchorId } = useLayout();
628
- const attended = useAttended3();
629
629
  const activeIds = useMemo4(() => {
630
630
  if (layoutMode === "solo") {
631
- return new Set(layoutParts?.solo?.map((e) => e.id) ?? []);
631
+ return Array.from(new Set(layoutParts?.solo?.map((e) => e.id) ?? []));
632
632
  } else if (layoutMode === "deck") {
633
- return new Set(layoutParts?.main?.map((e) => e.id) ?? []);
633
+ return Array.from(new Set(layoutParts?.main?.map((e) => e.id) ?? []));
634
634
  }
635
- return new Set(openIds(layoutParts));
635
+ return Array.from(new Set(openIds(layoutParts)));
636
636
  }, [
637
637
  layoutParts,
638
638
  layoutMode
639
639
  ]);
640
640
  const navigationData = useMemo4(() => ({
641
641
  popoverAnchorId,
642
- activeIds,
643
- attended
642
+ activeIds
644
643
  }), [
645
644
  popoverAnchorId,
646
- activeIds,
647
- attended
645
+ activeIds
648
646
  ]);
649
647
  return /* @__PURE__ */ React10.createElement(Main2.NavigationSidebar, null, /* @__PURE__ */ React10.createElement(Surface7, {
650
648
  role: "navigation",
@@ -932,8 +930,8 @@ var DeckLayout = ({ layoutParts, toasts, flatDeck, overscroll, showHints, slots,
932
930
 
933
931
  // packages/plugins/plugin-deck/src/components/LayoutSettings.tsx
934
932
  import React14 from "react";
935
- import { SettingsValue } from "@dxos/plugin-settings";
936
933
  import { Input, Select, useTranslation as useTranslation6 } from "@dxos/react-ui";
934
+ import { FormInput } from "@dxos/react-ui-data";
937
935
 
938
936
  // packages/plugins/plugin-deck/src/types.ts
939
937
  var NewPlankPositions = [
@@ -949,7 +947,7 @@ var OverscrollOptions = [
949
947
  var isSocket = !!globalThis.__args;
950
948
  var LayoutSettings = ({ settings }) => {
951
949
  const { t } = useTranslation6(DECK_PLUGIN);
952
- return /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(SettingsValue, {
950
+ return /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(FormInput, {
953
951
  label: t("select new plank positioning label")
954
952
  }, /* @__PURE__ */ React14.createElement(Select.Root, {
955
953
  value: settings.newPlankPositioning ?? "start",
@@ -959,7 +957,7 @@ var LayoutSettings = ({ settings }) => {
959
957
  }), /* @__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, {
960
958
  key: position,
961
959
  value: position
962
- }, t(`settings new plank position ${position} label`)))))))), /* @__PURE__ */ React14.createElement(SettingsValue, {
960
+ }, t(`settings new plank position ${position} label`)))))))), /* @__PURE__ */ React14.createElement(FormInput, {
963
961
  label: t("settings overscroll label")
964
962
  }, /* @__PURE__ */ React14.createElement(Select.Root, {
965
963
  value: settings.overscroll ?? "none",
@@ -969,22 +967,22 @@ var LayoutSettings = ({ settings }) => {
969
967
  }), /* @__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, {
970
968
  key: option,
971
969
  value: option
972
- }, t(`settings overscroll ${option} label`)))))))), /* @__PURE__ */ React14.createElement(SettingsValue, {
970
+ }, t(`settings overscroll ${option} label`)))))))), /* @__PURE__ */ React14.createElement(FormInput, {
973
971
  label: t("settings show hints label")
974
972
  }, /* @__PURE__ */ React14.createElement(Input.Switch, {
975
973
  checked: settings.showHints,
976
974
  onCheckedChange: (checked) => settings.showHints = checked
977
- })), !isSocket && /* @__PURE__ */ React14.createElement(SettingsValue, {
975
+ })), !isSocket && /* @__PURE__ */ React14.createElement(FormInput, {
978
976
  label: t("settings native redirect label")
979
977
  }, /* @__PURE__ */ React14.createElement(Input.Switch, {
980
978
  checked: settings.enableNativeRedirect,
981
979
  onCheckedChange: (checked) => settings.enableNativeRedirect = checked
982
- })), /* @__PURE__ */ React14.createElement(SettingsValue, {
980
+ })), /* @__PURE__ */ React14.createElement(FormInput, {
983
981
  label: t("settings custom slots")
984
982
  }, /* @__PURE__ */ React14.createElement(Input.Switch, {
985
983
  checked: settings.customSlots,
986
984
  onCheckedChange: (checked) => settings.customSlots = checked
987
- })), /* @__PURE__ */ React14.createElement(SettingsValue, {
985
+ })), /* @__PURE__ */ React14.createElement(FormInput, {
988
986
  label: t("settings flat deck")
989
987
  }, /* @__PURE__ */ React14.createElement(Input.Switch, {
990
988
  checked: settings.flatDeck,
@@ -1317,29 +1315,23 @@ var DeckPlugin = ({ observability } = {}) => {
1317
1315
  clientPlugin = resolvePlugin(plugins, parseClientPlugin);
1318
1316
  layout.prop({
1319
1317
  key: "layoutMode",
1320
- storageKey: "layout-mode",
1321
1318
  type: LocalStorageStore.enum()
1322
1319
  }).prop({
1323
1320
  key: "sidebarOpen",
1324
- storageKey: "sidebar-open",
1325
1321
  type: LocalStorageStore.bool()
1326
1322
  }).prop({
1327
1323
  key: "complementarySidebarOpen",
1328
- storageKey: "complementary-sidebar-open",
1329
1324
  type: LocalStorageStore.bool()
1330
1325
  });
1331
1326
  deck.prop({
1332
1327
  key: "plankSizing",
1333
- storageKey: "plank-sizing",
1334
1328
  type: LocalStorageStore.json()
1335
1329
  });
1336
1330
  location.prop({
1337
1331
  key: "active",
1338
- storageKey: "active",
1339
1332
  type: LocalStorageStore.json()
1340
1333
  }).prop({
1341
1334
  key: "closed",
1342
- storageKey: "closed",
1343
1335
  type: LocalStorageStore.json()
1344
1336
  });
1345
1337
  unsubscriptionCallbacks.push(clientPlugin?.provides.client.shell.onReset(() => {
@@ -1349,31 +1341,24 @@ var DeckPlugin = ({ observability } = {}) => {
1349
1341
  }));
1350
1342
  settings.prop({
1351
1343
  key: "showHints",
1352
- storageKey: "show-hints",
1353
1344
  type: LocalStorageStore.bool()
1354
1345
  }).prop({
1355
1346
  key: "customSlots",
1356
- storageKey: "customSlots",
1357
1347
  type: LocalStorageStore.bool()
1358
1348
  }).prop({
1359
1349
  key: "flatDeck",
1360
- storageKey: "flatDeck",
1361
1350
  type: LocalStorageStore.bool()
1362
1351
  }).prop({
1363
1352
  key: "enableNativeRedirect",
1364
- storageKey: "enable-native-redirect",
1365
1353
  type: LocalStorageStore.bool()
1366
1354
  }).prop({
1367
1355
  key: "disableDeck",
1368
- storageKey: "disable-deck",
1369
1356
  type: LocalStorageStore.bool()
1370
1357
  }).prop({
1371
1358
  key: "newPlankPositioning",
1372
- storageKey: "newPlankPositioning",
1373
1359
  type: LocalStorageStore.enum()
1374
1360
  }).prop({
1375
1361
  key: "overscroll",
1376
- storageKey: "overscroll",
1377
1362
  type: LocalStorageStore.enum()
1378
1363
  });
1379
1364
  if (!isSocket2 && settings.values.enableNativeRedirect) {
@@ -1522,7 +1507,7 @@ var DeckPlugin = ({ observability } = {}) => {
1522
1507
  } else {
1523
1508
  log.warn("Invalid layout mode", intent?.data?.layoutMode, {
1524
1509
  F: __dxlog_file,
1525
- L: 404,
1510
+ L: 392,
1526
1511
  S: void 0,
1527
1512
  C: (f, a) => f(...a)
1528
1513
  });