@dxos/plugin-space 0.6.12-staging.e11e696 → 0.6.13-main.548ca8d

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 (65) hide show
  1. package/dist/lib/browser/{chunk-LZEGRS7H.mjs → chunk-AVLRQF6L.mjs} +1 -1
  2. package/dist/lib/browser/chunk-AVLRQF6L.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-WBMH5WIP.mjs → chunk-QK5I2EPF.mjs} +10 -3
  4. package/dist/lib/browser/chunk-QK5I2EPF.mjs.map +7 -0
  5. package/dist/lib/browser/index.mjs +278 -245
  6. package/dist/lib/browser/index.mjs.map +4 -4
  7. package/dist/lib/browser/meta.json +1 -1
  8. package/dist/lib/browser/meta.mjs +1 -1
  9. package/dist/lib/browser/types/index.mjs +1 -1
  10. package/dist/lib/node/{chunk-GF3SRAQM.cjs → chunk-HE2GHO6Z.cjs} +13 -6
  11. package/dist/lib/node/chunk-HE2GHO6Z.cjs.map +7 -0
  12. package/dist/lib/node/{chunk-6CNYF6YU.cjs → chunk-P4XUXM7Y.cjs} +4 -4
  13. package/dist/lib/node/chunk-P4XUXM7Y.cjs.map +7 -0
  14. package/dist/lib/node/index.cjs +467 -433
  15. package/dist/lib/node/index.cjs.map +4 -4
  16. package/dist/lib/node/meta.cjs +5 -5
  17. package/dist/lib/node/meta.cjs.map +1 -1
  18. package/dist/lib/node/meta.json +1 -1
  19. package/dist/lib/node/types/index.cjs +11 -11
  20. package/dist/lib/node/types/index.cjs.map +1 -1
  21. package/dist/lib/node-esm/{chunk-N5VC55UM.mjs → chunk-2TR4WD6U.mjs} +10 -3
  22. package/dist/lib/node-esm/chunk-2TR4WD6U.mjs.map +7 -0
  23. package/dist/lib/node-esm/{chunk-GM2YUC77.mjs → chunk-YPQGKWHJ.mjs} +1 -1
  24. package/dist/lib/node-esm/chunk-YPQGKWHJ.mjs.map +7 -0
  25. package/dist/lib/node-esm/index.mjs +278 -245
  26. package/dist/lib/node-esm/index.mjs.map +4 -4
  27. package/dist/lib/node-esm/meta.json +1 -1
  28. package/dist/lib/node-esm/meta.mjs +1 -1
  29. package/dist/lib/node-esm/types/index.mjs +1 -1
  30. package/dist/types/src/SpacePlugin.d.ts.map +1 -1
  31. package/dist/types/src/components/FallbackSettings.d.ts +8 -0
  32. package/dist/types/src/components/FallbackSettings.d.ts.map +1 -0
  33. package/dist/types/src/components/ShareSpaceButton.stories.d.ts +2 -0
  34. package/dist/types/src/components/ShareSpaceButton.stories.d.ts.map +1 -1
  35. package/dist/types/src/components/SpacePresence.stories.d.ts +2 -0
  36. package/dist/types/src/components/SpacePresence.stories.d.ts.map +1 -1
  37. package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts +2 -0
  38. package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts.map +1 -1
  39. package/dist/types/src/components/index.d.ts +1 -2
  40. package/dist/types/src/components/index.d.ts.map +1 -1
  41. package/dist/types/src/meta.d.ts.map +1 -1
  42. package/dist/types/src/translations.d.ts +2 -0
  43. package/dist/types/src/translations.d.ts.map +1 -1
  44. package/dist/types/src/types/thread.d.ts +1 -0
  45. package/dist/types/src/types/thread.d.ts.map +1 -1
  46. package/package.json +34 -33
  47. package/src/SpacePlugin.tsx +103 -60
  48. package/src/components/FallbackSettings.tsx +35 -0
  49. package/src/components/index.ts +1 -2
  50. package/src/meta.ts +3 -1
  51. package/src/translations.ts +2 -0
  52. package/src/types/collection.ts +1 -1
  53. package/src/types/thread.ts +2 -1
  54. package/dist/lib/browser/chunk-LZEGRS7H.mjs.map +0 -7
  55. package/dist/lib/browser/chunk-WBMH5WIP.mjs.map +0 -7
  56. package/dist/lib/node/chunk-6CNYF6YU.cjs.map +0 -7
  57. package/dist/lib/node/chunk-GF3SRAQM.cjs.map +0 -7
  58. package/dist/lib/node-esm/chunk-GM2YUC77.mjs.map +0 -7
  59. package/dist/lib/node-esm/chunk-N5VC55UM.mjs.map +0 -7
  60. package/dist/types/src/components/EmptySpace.d.ts +0 -3
  61. package/dist/types/src/components/EmptySpace.d.ts.map +0 -1
  62. package/dist/types/src/components/EmptyTree.d.ts +0 -3
  63. package/dist/types/src/components/EmptyTree.d.ts.map +0 -1
  64. package/src/components/EmptySpace.tsx +0 -25
  65. package/src/components/EmptyTree.tsx +0 -25
@@ -3,7 +3,7 @@ import {
3
3
  SPACE_PLUGIN_SHORT_ID,
4
4
  SpaceAction,
5
5
  meta_default
6
- } from "./chunk-LZEGRS7H.mjs";
6
+ } from "./chunk-AVLRQF6L.mjs";
7
7
  import {
8
8
  ActorSchema,
9
9
  ChannelType,
@@ -15,23 +15,24 @@ import {
15
15
  ThreadStatus,
16
16
  ThreadType,
17
17
  parseSpaceInitPlugin
18
- } from "./chunk-WBMH5WIP.mjs";
18
+ } from "./chunk-QK5I2EPF.mjs";
19
19
 
20
20
  // packages/plugins/plugin-space/src/SpacePlugin.tsx
21
- import { effect, signal } from "@preact/signals-core";
22
- import React18 from "react";
21
+ import { signal } from "@preact/signals-core";
22
+ import React17 from "react";
23
23
  import { LayoutAction as LayoutAction2, NavigationAction as NavigationAction3, Surface as Surface2, firstIdInPart, openIds, parseGraphPlugin, parseIntentPlugin as parseIntentPlugin3, parseMetadataResolverPlugin, parseNavigationPlugin as parseNavigationPlugin2, resolvePlugin } from "@dxos/app-framework";
24
24
  import { EventSubscriptions } from "@dxos/async";
25
25
  import { isReactiveObject as isReactiveObject2 } from "@dxos/echo-schema";
26
+ import { scheduledEffect } from "@dxos/echo-signals/core";
26
27
  import { LocalStorageStore } from "@dxos/local-storage";
27
28
  import { log as log2 } from "@dxos/log";
28
29
  import { Migrations as Migrations2 } from "@dxos/migrations";
29
30
  import { parseAttentionPlugin } from "@dxos/plugin-attention";
30
31
  import { parseClientPlugin } from "@dxos/plugin-client";
31
- import { createExtension, isGraphNode, memoize as memoize2, toSignal } from "@dxos/plugin-graph";
32
+ import { createExtension, memoize as memoize2, toSignal } from "@dxos/plugin-graph";
32
33
  import { ObservabilityAction } from "@dxos/plugin-observability/meta";
33
34
  import { PublicKey as PublicKey2 } from "@dxos/react-client";
34
- import { Expando, Filter, SpaceState as SpaceState3, create as create2, fullyQualifiedId as fullyQualifiedId4, getSpace as getSpace4, getTypename as getTypename2, isEchoObject as isEchoObject2, isSpace as isSpace2, loadObjectReferences } from "@dxos/react-client/echo";
35
+ import { Expando, Filter, SpaceState as SpaceState3, create as create2, fullyQualifiedId as fullyQualifiedId4, getSpace as getSpace4, getTypename as getTypename2, isEchoObject as isEchoObject2, isSpace as isSpace2, loadObjectReferences, parseFullyQualifiedId } from "@dxos/react-client/echo";
35
36
  import { Dialog } from "@dxos/react-ui";
36
37
  import { ClipboardProvider as ClipboardProvider2, InvitationManager, osTranslations } from "@dxos/shell/react";
37
38
  import { ComplexMap as ComplexMap2, nonNullable, reduceGroupBy } from "@dxos/util";
@@ -159,36 +160,32 @@ var CollectionSection = ({ collection }) => {
159
160
  }, collection.name ?? t("unnamed collection label")));
160
161
  };
161
162
 
162
- // packages/plugins/plugin-space/src/components/EmptySpace.tsx
163
+ // packages/plugins/plugin-space/src/components/FallbackSettings.tsx
163
164
  import React4 from "react";
164
- import { useTranslation as useTranslation4 } from "@dxos/react-ui";
165
- import { descriptionText as descriptionText2, mx as mx3 } from "@dxos/react-ui-theme";
166
- var EmptySpace = () => {
165
+ import { Input, useTranslation as useTranslation4 } from "@dxos/react-ui";
166
+ var FallbackSettings = ({ object }) => {
167
167
  const { t } = useTranslation4(SPACE_PLUGIN);
168
168
  return /* @__PURE__ */ React4.createElement("div", {
169
+ role: "form",
170
+ className: "p-3 flex flex-col gap-2"
171
+ }, /* @__PURE__ */ React4.createElement("div", {
169
172
  role: "none",
170
- className: mx3("p-2 mli-2 mbe-2 text-center border border-dashed border-neutral-400/50 rounded-lg", descriptionText2)
171
- }, t("empty space message"));
172
- };
173
-
174
- // packages/plugins/plugin-space/src/components/EmptyTree.tsx
175
- import React5 from "react";
176
- import { useTranslation as useTranslation5 } from "@dxos/react-ui";
177
- import { descriptionText as descriptionText3, mx as mx4 } from "@dxos/react-ui-theme";
178
- var EmptyTree = () => {
179
- const { t } = useTranslation5(SPACE_PLUGIN);
180
- return /* @__PURE__ */ React5.createElement("div", {
181
- role: "none",
182
- className: mx4("p-2 mli-2 mbe-2 text-center border border-dashed border-neutral-400/50 rounded-lg", descriptionText3)
183
- }, t("empty tree message"));
173
+ className: "space-b-1"
174
+ }, /* @__PURE__ */ React4.createElement(Input.Root, null, /* @__PURE__ */ React4.createElement(Input.Label, null, t("name label")), /* @__PURE__ */ React4.createElement(Input.TextInput, {
175
+ placeholder: t("name placeholder"),
176
+ value: object.name,
177
+ onChange: (event) => {
178
+ object.name = event.target.value;
179
+ }
180
+ }))));
184
181
  };
185
182
 
186
183
  // packages/plugins/plugin-space/src/components/MenuFooter.tsx
187
184
  import { Planet } from "@phosphor-icons/react";
188
- import React6 from "react";
185
+ import React5 from "react";
189
186
  import { getSpace as getSpace2 } from "@dxos/client/echo";
190
187
  import { useClient as useClient2 } from "@dxos/react-client";
191
- import { DropdownMenu, toLocalizedString, useTranslation as useTranslation6 } from "@dxos/react-ui";
188
+ import { DropdownMenu, toLocalizedString, useTranslation as useTranslation5 } from "@dxos/react-ui";
192
189
 
193
190
  // packages/plugins/plugin-space/src/util.tsx
194
191
  import { NavigationAction as NavigationAction2 } from "@dxos/app-framework";
@@ -746,31 +743,31 @@ var cloneObject = async (object, resolve) => {
746
743
 
747
744
  // packages/plugins/plugin-space/src/components/MenuFooter.tsx
748
745
  var MenuFooter = ({ object }) => {
749
- const { t } = useTranslation6(SPACE_PLUGIN);
746
+ const { t } = useTranslation5(SPACE_PLUGIN);
750
747
  const client = useClient2();
751
748
  const space = getSpace2(object);
752
749
  const spaceName = space ? getSpaceDisplayName(space, {
753
750
  personal: client.spaces.default === space
754
751
  }) : "";
755
- return space ? /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(DropdownMenu.Separator, null), /* @__PURE__ */ React6.createElement(DropdownMenu.GroupLabel, null, t("menu footer label")), /* @__PURE__ */ React6.createElement("dl", {
752
+ return space ? /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(DropdownMenu.Separator, null), /* @__PURE__ */ React5.createElement(DropdownMenu.GroupLabel, null, t("menu footer label")), /* @__PURE__ */ React5.createElement("dl", {
756
753
  className: "pis-2 mbe-2 text-xs grid grid-cols-[max-content_1fr] gap-2"
757
- }, /* @__PURE__ */ React6.createElement("dt", {
754
+ }, /* @__PURE__ */ React5.createElement("dt", {
758
755
  className: "uppercase text-[.75em] tracking-wide font-medium mbs-px self-start"
759
- }, t("location label")), /* @__PURE__ */ React6.createElement("dd", {
756
+ }, t("location label")), /* @__PURE__ */ React5.createElement("dd", {
760
757
  className: "line-clamp-3"
761
- }, /* @__PURE__ */ React6.createElement(Planet, {
758
+ }, /* @__PURE__ */ React5.createElement(Planet, {
762
759
  className: "inline-block mie-1"
763
760
  }), toLocalizedString(spaceName, t)))) : null;
764
761
  };
765
762
 
766
763
  // packages/plugins/plugin-space/src/components/MissingObject.tsx
767
- import React7, { useEffect as useEffect2, useState as useState2 } from "react";
764
+ import React6, { useEffect as useEffect2, useState as useState2 } from "react";
768
765
  import { parseIntentPlugin as parseIntentPlugin2, useResolvePlugin as useResolvePlugin2 } from "@dxos/app-framework";
769
- import { Status, useTranslation as useTranslation7 } from "@dxos/react-ui";
770
- import { baseSurface as baseSurface2, descriptionText as descriptionText4, mx as mx5 } from "@dxos/react-ui-theme";
766
+ import { Status, useTranslation as useTranslation6 } from "@dxos/react-ui";
767
+ import { baseSurface as baseSurface2, descriptionText as descriptionText2, mx as mx3 } from "@dxos/react-ui-theme";
771
768
  var WAIT_FOR_OBJECT_TIMEOUT2 = 1e3;
772
769
  var MissingObject = ({ id }) => {
773
- const { t } = useTranslation7(SPACE_PLUGIN);
770
+ const { t } = useTranslation6(SPACE_PLUGIN);
774
771
  const [waiting, setWaiting] = useState2(false);
775
772
  const intentPlugin = useResolvePlugin2(parseIntentPlugin2);
776
773
  useEffect2(() => {
@@ -792,13 +789,13 @@ var MissingObject = ({ id }) => {
792
789
  intentPlugin,
793
790
  id
794
791
  ]);
795
- return /* @__PURE__ */ React7.createElement("div", {
792
+ return /* @__PURE__ */ React6.createElement("div", {
796
793
  role: "none",
797
- className: mx5(baseSurface2, "min-bs-screen is-full flex items-center justify-center p-8")
798
- }, waiting ? /* @__PURE__ */ React7.createElement("p", {
794
+ className: mx3(baseSurface2, "min-bs-screen is-full flex items-center justify-center p-8")
795
+ }, waiting ? /* @__PURE__ */ React6.createElement("p", {
799
796
  role: "alert",
800
- className: mx5(descriptionText4, "border border-dashed border-neutral-400/50 rounded-lg flex items-center justify-center p-8 font-normal text-lg")
801
- }, t("missing object message")) : /* @__PURE__ */ React7.createElement(Status, {
797
+ className: mx3(descriptionText2, "border border-dashed border-neutral-400/50 rounded-lg flex items-center justify-center p-8 font-normal text-lg")
798
+ }, t("missing object message")) : /* @__PURE__ */ React6.createElement(Status, {
802
799
  indeterminate: true,
803
800
  "aria-label": "Initializing"
804
801
  }));
@@ -806,10 +803,10 @@ var MissingObject = ({ id }) => {
806
803
 
807
804
  // packages/plugins/plugin-space/src/components/PersistenceStatus.tsx
808
805
  import { ArrowsCounterClockwise, CheckCircle as CheckCircle2, Warning } from "@phosphor-icons/react";
809
- import React8, { useEffect as useEffect3, useState as useState3 } from "react";
806
+ import React7, { useEffect as useEffect3, useState as useState3 } from "react";
810
807
  import { debounce } from "@dxos/async";
811
- import { Tooltip, useTranslation as useTranslation8 } from "@dxos/react-ui";
812
- import { getSize as getSize2, mx as mx6, staticPlaceholderText, warningText } from "@dxos/react-ui-theme";
808
+ import { Tooltip, useTranslation as useTranslation7 } from "@dxos/react-ui";
809
+ import { getSize as getSize2, mx as mx4, staticPlaceholderText, warningText } from "@dxos/react-ui-theme";
813
810
  var Status2;
814
811
  (function(Status3) {
815
812
  Status3[Status3["PERSISTED_LOCALLY"] = 0] = "PERSISTED_LOCALLY";
@@ -817,7 +814,7 @@ var Status2;
817
814
  Status3[Status3["ERROR"] = 2] = "ERROR";
818
815
  })(Status2 || (Status2 = {}));
819
816
  var PersistenceStatus = ({ db }) => {
820
- const { t } = useTranslation8(SPACE_PLUGIN);
817
+ const { t } = useTranslation7(SPACE_PLUGIN);
821
818
  const [displayMessage, setDisplayMessage] = useState3(false);
822
819
  const [status, naturalSetStatus] = useState3(0);
823
820
  const [prevStatus, setPrevStatus] = useState3(0);
@@ -834,45 +831,45 @@ var PersistenceStatus = ({ db }) => {
834
831
  ]);
835
832
  switch (status) {
836
833
  case 2:
837
- return /* @__PURE__ */ React8.createElement("div", {
834
+ return /* @__PURE__ */ React7.createElement("div", {
838
835
  className: "flex items-center"
839
- }, /* @__PURE__ */ React8.createElement(Warning, {
840
- className: mx6(getSize2(4), "me-1")
841
- }), /* @__PURE__ */ React8.createElement("span", {
842
- className: mx6("text-sm", warningText)
836
+ }, /* @__PURE__ */ React7.createElement(Warning, {
837
+ className: mx4(getSize2(4), "me-1")
838
+ }), /* @__PURE__ */ React7.createElement("span", {
839
+ className: mx4("text-sm", warningText)
843
840
  }, t("persistence error label")));
844
841
  case 1:
845
- return /* @__PURE__ */ React8.createElement("div", {
842
+ return /* @__PURE__ */ React7.createElement("div", {
846
843
  className: "flex items-center"
847
- }, /* @__PURE__ */ React8.createElement(ArrowsCounterClockwise, {
848
- className: mx6(getSize2(4), "me-1")
849
- }), /* @__PURE__ */ React8.createElement("span", {
850
- className: mx6("text-sm", staticPlaceholderText)
844
+ }, /* @__PURE__ */ React7.createElement(ArrowsCounterClockwise, {
845
+ className: mx4(getSize2(4), "me-1")
846
+ }), /* @__PURE__ */ React7.createElement("span", {
847
+ className: mx4("text-sm", staticPlaceholderText)
851
848
  }, t("persistence pending label")));
852
849
  case 0:
853
850
  default:
854
- return /* @__PURE__ */ React8.createElement(Tooltip.Root, {
851
+ return /* @__PURE__ */ React7.createElement(Tooltip.Root, {
855
852
  delayDuration: 400
856
- }, /* @__PURE__ */ React8.createElement(Tooltip.Trigger, {
853
+ }, /* @__PURE__ */ React7.createElement(Tooltip.Trigger, {
857
854
  role: "status",
858
855
  className: "flex items-center"
859
- }, /* @__PURE__ */ React8.createElement(CheckCircle2, {
860
- className: mx6(getSize2(4), "me-1")
861
- }), displayMessage && /* @__PURE__ */ React8.createElement("span", {
862
- className: mx6("text-sm", staticPlaceholderText)
863
- }, t("persisted locally label"))), /* @__PURE__ */ React8.createElement(Tooltip.Portal, null, /* @__PURE__ */ React8.createElement(Tooltip.Content, {
856
+ }, /* @__PURE__ */ React7.createElement(CheckCircle2, {
857
+ className: mx4(getSize2(4), "me-1")
858
+ }), displayMessage && /* @__PURE__ */ React7.createElement("span", {
859
+ className: mx4("text-sm", staticPlaceholderText)
860
+ }, t("persisted locally label"))), /* @__PURE__ */ React7.createElement(Tooltip.Portal, null, /* @__PURE__ */ React7.createElement(Tooltip.Content, {
864
861
  classNames: "z-10"
865
- }, t("persisted locally message"), /* @__PURE__ */ React8.createElement(Tooltip.Arrow, null))));
862
+ }, t("persisted locally message"), /* @__PURE__ */ React7.createElement(Tooltip.Arrow, null))));
866
863
  }
867
864
  };
868
865
 
869
866
  // packages/plugins/plugin-space/src/components/PopoverRenameObject.tsx
870
- import React9, { useCallback, useRef, useState as useState4 } from "react";
867
+ import React8, { useCallback, useRef, useState as useState4 } from "react";
871
868
  import { log } from "@dxos/log";
872
- import { Button as Button2, Input, Popover, useTranslation as useTranslation9 } from "@dxos/react-ui";
869
+ import { Button as Button2, Input as Input2, Popover, useTranslation as useTranslation8 } from "@dxos/react-ui";
873
870
  var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/PopoverRenameObject.tsx";
874
871
  var PopoverRenameObject = ({ object: obj }) => {
875
- const { t } = useTranslation9(SPACE_PLUGIN);
872
+ const { t } = useTranslation8(SPACE_PLUGIN);
876
873
  const doneButton = useRef(null);
877
874
  const object = obj;
878
875
  const [name, setName] = useState4(object.name || object.title || "");
@@ -897,23 +894,23 @@ var PopoverRenameObject = ({ object: obj }) => {
897
894
  object,
898
895
  name
899
896
  ]);
900
- return /* @__PURE__ */ React9.createElement("div", {
897
+ return /* @__PURE__ */ React8.createElement("div", {
901
898
  role: "none",
902
899
  className: "p-1 flex gap-2"
903
- }, /* @__PURE__ */ React9.createElement("div", {
900
+ }, /* @__PURE__ */ React8.createElement("div", {
904
901
  role: "none",
905
902
  className: "flex-1"
906
- }, /* @__PURE__ */ React9.createElement(Input.Root, null, /* @__PURE__ */ React9.createElement(Input.Label, {
903
+ }, /* @__PURE__ */ React8.createElement(Input2.Root, null, /* @__PURE__ */ React8.createElement(Input2.Label, {
907
904
  srOnly: true
908
- }, t("object name label")), /* @__PURE__ */ React9.createElement(Input.TextInput, {
905
+ }, t("object name label")), /* @__PURE__ */ React8.createElement(Input2.TextInput, {
909
906
  placeholder: t("object title placeholder"),
910
907
  value: name,
911
908
  "data-testid": "spacePlugin.renameObject.input",
912
909
  onChange: ({ target: { value } }) => setName(value),
913
910
  onKeyDown: ({ key }) => key === "Enter" && doneButton.current?.click()
914
- }))), /* @__PURE__ */ React9.createElement(Popover.Close, {
911
+ }))), /* @__PURE__ */ React8.createElement(Popover.Close, {
915
912
  asChild: true
916
- }, /* @__PURE__ */ React9.createElement(Button2, {
913
+ }, /* @__PURE__ */ React8.createElement(Button2, {
917
914
  ref: doneButton,
918
915
  classNames: "self-stretch",
919
916
  onClick: handleDone
@@ -923,10 +920,10 @@ var PopoverRenameObject = ({ object: obj }) => {
923
920
  };
924
921
 
925
922
  // packages/plugins/plugin-space/src/components/PopoverRenameSpace.tsx
926
- import React10, { useCallback as useCallback2, useRef as useRef2, useState as useState5 } from "react";
927
- import { Button as Button3, Input as Input2, Popover as Popover2, useTranslation as useTranslation10 } from "@dxos/react-ui";
923
+ import React9, { useCallback as useCallback2, useRef as useRef2, useState as useState5 } from "react";
924
+ import { Button as Button3, Input as Input3, Popover as Popover2, useTranslation as useTranslation9 } from "@dxos/react-ui";
928
925
  var PopoverRenameSpace = ({ space }) => {
929
- const { t } = useTranslation10(SPACE_PLUGIN);
926
+ const { t } = useTranslation9(SPACE_PLUGIN);
930
927
  const doneButton = useRef2(null);
931
928
  const [name, setName] = useState5(space.properties.name ?? "");
932
929
  const handleDone = useCallback2(() => {
@@ -935,24 +932,24 @@ var PopoverRenameSpace = ({ space }) => {
935
932
  space,
936
933
  name
937
934
  ]);
938
- return /* @__PURE__ */ React10.createElement("div", {
935
+ return /* @__PURE__ */ React9.createElement("div", {
939
936
  role: "none",
940
937
  className: "p-1 flex gap-2"
941
- }, /* @__PURE__ */ React10.createElement("div", {
938
+ }, /* @__PURE__ */ React9.createElement("div", {
942
939
  role: "none",
943
940
  className: "flex-1"
944
- }, /* @__PURE__ */ React10.createElement(Input2.Root, null, /* @__PURE__ */ React10.createElement(Input2.Label, {
941
+ }, /* @__PURE__ */ React9.createElement(Input3.Root, null, /* @__PURE__ */ React9.createElement(Input3.Label, {
945
942
  srOnly: true
946
- }, t("space name label")), /* @__PURE__ */ React10.createElement(Input2.TextInput, {
943
+ }, t("space name label")), /* @__PURE__ */ React9.createElement(Input3.TextInput, {
947
944
  defaultValue: space.properties.name ?? "",
948
945
  placeholder: t("unnamed space label"),
949
946
  onChange: ({ target: { value } }) => setName(value),
950
947
  // TODO(wittjosiah): Ideally this should access the popover context to close the popover.
951
948
  // Currently this is not possible because Radix does not expose the popover context.
952
949
  onKeyDown: ({ key }) => key === "Enter" && doneButton.current?.click()
953
- }))), /* @__PURE__ */ React10.createElement(Popover2.Close, {
950
+ }))), /* @__PURE__ */ React9.createElement(Popover2.Close, {
954
951
  asChild: true
955
- }, /* @__PURE__ */ React10.createElement(Button3, {
952
+ }, /* @__PURE__ */ React9.createElement(Button3, {
956
953
  ref: doneButton,
957
954
  classNames: "self-stretch",
958
955
  onClick: handleDone
@@ -962,12 +959,12 @@ var PopoverRenameSpace = ({ space }) => {
962
959
  };
963
960
 
964
961
  // packages/plugins/plugin-space/src/components/ShareSpaceButton.tsx
965
- import React11 from "react";
962
+ import React10 from "react";
966
963
  import { useIntentDispatcher } from "@dxos/app-framework";
967
- import { Button as Button4, useTranslation as useTranslation11 } from "@dxos/react-ui";
964
+ import { Button as Button4, useTranslation as useTranslation10 } from "@dxos/react-ui";
968
965
  var ShareSpaceButton = ({ spaceId }) => {
969
966
  const dispatch = useIntentDispatcher();
970
- return /* @__PURE__ */ React11.createElement(ShareSpaceButtonImpl, {
967
+ return /* @__PURE__ */ React10.createElement(ShareSpaceButtonImpl, {
971
968
  onClick: () => dispatch({
972
969
  action: SpaceAction.SHARE,
973
970
  data: {
@@ -977,8 +974,8 @@ var ShareSpaceButton = ({ spaceId }) => {
977
974
  });
978
975
  };
979
976
  var ShareSpaceButtonImpl = ({ onClick }) => {
980
- const { t } = useTranslation11(SPACE_PLUGIN);
981
- return /* @__PURE__ */ React11.createElement(Button4, {
977
+ const { t } = useTranslation10(SPACE_PLUGIN);
978
+ return /* @__PURE__ */ React10.createElement(Button4, {
982
979
  "data-testid": "spacePlugin.shareSpaceButton",
983
980
  onClick,
984
981
  classNames: "mli-1"
@@ -987,30 +984,30 @@ var ShareSpaceButtonImpl = ({ onClick }) => {
987
984
 
988
985
  // packages/plugins/plugin-space/src/components/SpaceMain/SpaceMain.tsx
989
986
  import { Command } from "@phosphor-icons/react";
990
- import React13 from "react";
987
+ import React12 from "react";
991
988
  import { Surface } from "@dxos/app-framework";
992
989
  import { SpaceState as SpaceState2 } from "@dxos/react-client/echo";
993
- import { Main, useTranslation as useTranslation13 } from "@dxos/react-ui";
994
- import { getSize as getSize4, mx as mx8, topbarBlockPaddingStart } from "@dxos/react-ui-theme";
990
+ import { Main, useTranslation as useTranslation12 } from "@dxos/react-ui";
991
+ import { getSize as getSize4, mx as mx6, topbarBlockPaddingStart } from "@dxos/react-ui-theme";
995
992
  import { ClipboardProvider } from "@dxos/shell/react";
996
993
 
997
994
  // packages/plugins/plugin-space/src/components/SpaceMain/SpaceMembersSection.tsx
998
995
  import { CaretDown, Check, UserPlus, UsersThree } from "@phosphor-icons/react";
999
- import React12, { useCallback as useCallback3, useState as useState6 } from "react";
996
+ import React11, { useCallback as useCallback3, useState as useState6 } from "react";
1000
997
  import { LayoutAction, useIntent } from "@dxos/app-framework";
1001
998
  import { useMembers, SpaceMember, useSpaceInvitations } from "@dxos/react-client/echo";
1002
999
  import { InvitationEncoder } from "@dxos/react-client/invitations";
1003
1000
  import { Invitation } from "@dxos/react-client/invitations";
1004
- import { Button as Button5, ButtonGroup, DropdownMenu as DropdownMenu2, List, useTranslation as useTranslation12 } from "@dxos/react-ui";
1005
- import { descriptionText as descriptionText5, getSize as getSize3, mx as mx7 } from "@dxos/react-ui-theme";
1001
+ import { Button as Button5, ButtonGroup, DropdownMenu as DropdownMenu2, List, useTranslation as useTranslation11 } from "@dxos/react-ui";
1002
+ import { descriptionText as descriptionText3, getSize as getSize3, mx as mx5 } from "@dxos/react-ui-theme";
1006
1003
  import { InvitationListItem, IdentityListItem } from "@dxos/shell/react";
1007
1004
  var activeActionKeyStorageKey = "dxos:react-shell/space-manager/active-action";
1008
1005
  var Presence = SpaceMember.PresenceState;
1009
1006
  var handleCreateInvitationUrl = (invitationCode) => `${origin}?spaceInvitationCode=${invitationCode}`;
1010
1007
  var SpaceMemberList = ({ members }) => {
1011
- return members.length > 0 ? /* @__PURE__ */ React12.createElement(List, {
1008
+ return members.length > 0 ? /* @__PURE__ */ React11.createElement(List, {
1012
1009
  classNames: "col-start-2 col-end-5 gap-y-1 grid grid-cols-subgrid items-center"
1013
- }, members.map((member) => /* @__PURE__ */ React12.createElement(IdentityListItem, {
1010
+ }, members.map((member) => /* @__PURE__ */ React11.createElement(IdentityListItem, {
1014
1011
  classNames: "contents",
1015
1012
  key: member.identity.identityKey.toHex(),
1016
1013
  identity: member.identity,
@@ -1018,7 +1015,7 @@ var SpaceMemberList = ({ members }) => {
1018
1015
  }))) : null;
1019
1016
  };
1020
1017
  var SpaceMembersSection = ({ space }) => {
1021
- const { t } = useTranslation12(SPACE_PLUGIN);
1018
+ const { t } = useTranslation11(SPACE_PLUGIN);
1022
1019
  const invitations = useSpaceInvitations(space.key);
1023
1020
  const { dispatch } = useIntent();
1024
1021
  const handleCloseDialog = () => dispatch({
@@ -1096,103 +1093,103 @@ var SpaceMembersSection = ({ space }) => {
1096
1093
  [Presence.ONLINE]: [],
1097
1094
  [Presence.OFFLINE]: []
1098
1095
  });
1099
- return /* @__PURE__ */ React12.createElement("section", {
1096
+ return /* @__PURE__ */ React11.createElement("section", {
1100
1097
  className: "mbe-4 col-span-3 grid gap-y-2 grid-cols-subgrid auto-rows-min"
1101
- }, /* @__PURE__ */ React12.createElement("h2", {
1098
+ }, /* @__PURE__ */ React11.createElement("h2", {
1102
1099
  className: "contents"
1103
- }, /* @__PURE__ */ React12.createElement(UsersThree, {
1100
+ }, /* @__PURE__ */ React11.createElement(UsersThree, {
1104
1101
  weight: "duotone",
1105
- className: mx7(getSize3(5), "place-self-center")
1106
- }), /* @__PURE__ */ React12.createElement("span", {
1102
+ className: mx5(getSize3(5), "place-self-center")
1103
+ }), /* @__PURE__ */ React11.createElement("span", {
1107
1104
  className: "text-lg col-span-2"
1108
- }, t("space members label"))), /* @__PURE__ */ React12.createElement("h3", {
1105
+ }, t("space members label"))), /* @__PURE__ */ React11.createElement("h3", {
1109
1106
  className: "col-start-2 col-span-3 text-sm italic text-description"
1110
- }, t("invitations heading")), invitations.length > 0 && /* @__PURE__ */ React12.createElement(List, {
1107
+ }, t("invitations heading")), invitations.length > 0 && /* @__PURE__ */ React11.createElement(List, {
1111
1108
  classNames: "col-start-2 col-span-2 gap-y-2 grid grid-cols-[var(--rail-size)_1fr_var(--rail-action)_var(--rail-action)]"
1112
- }, invitations.map((invitation) => /* @__PURE__ */ React12.createElement(InvitationListItem, {
1109
+ }, invitations.map((invitation) => /* @__PURE__ */ React11.createElement(InvitationListItem, {
1113
1110
  reverseEffects: true,
1114
1111
  classNames: "pis-0 pie-0 gap-0 col-span-4 grid grid-cols-subgrid",
1115
1112
  key: invitation.get().invitationId,
1116
1113
  invitation,
1117
1114
  send: handleInvitationSelect,
1118
1115
  createInvitationUrl: handleCreateInvitationUrl
1119
- }))), /* @__PURE__ */ React12.createElement(ButtonGroup, {
1116
+ }))), /* @__PURE__ */ React11.createElement(ButtonGroup, {
1120
1117
  classNames: "col-start-2 col-end-4 grid grid-cols-[1fr_var(--rail-action)] place-self-grow gap-px"
1121
- }, /* @__PURE__ */ React12.createElement(Button5, {
1118
+ }, /* @__PURE__ */ React11.createElement(Button5, {
1122
1119
  classNames: "gap-2",
1123
1120
  onClick: activeAction.onClick
1124
- }, /* @__PURE__ */ React12.createElement(activeAction.icon, {
1121
+ }, /* @__PURE__ */ React11.createElement(activeAction.icon, {
1125
1122
  className: getSize3(5)
1126
- }), /* @__PURE__ */ React12.createElement("span", null, t(activeAction.label, {
1123
+ }), /* @__PURE__ */ React11.createElement("span", null, t(activeAction.label, {
1127
1124
  ns: "os"
1128
- }))), /* @__PURE__ */ React12.createElement(DropdownMenu2.Root, null, /* @__PURE__ */ React12.createElement(DropdownMenu2.Trigger, {
1125
+ }))), /* @__PURE__ */ React11.createElement(DropdownMenu2.Root, null, /* @__PURE__ */ React11.createElement(DropdownMenu2.Trigger, {
1129
1126
  asChild: true
1130
- }, /* @__PURE__ */ React12.createElement(Button5, {
1127
+ }, /* @__PURE__ */ React11.createElement(Button5, {
1131
1128
  classNames: "pli-0"
1132
- }, /* @__PURE__ */ React12.createElement(CaretDown, {
1129
+ }, /* @__PURE__ */ React11.createElement(CaretDown, {
1133
1130
  className: getSize3(4)
1134
- }))), /* @__PURE__ */ React12.createElement(DropdownMenu2.Content, null, /* @__PURE__ */ React12.createElement(DropdownMenu2.Viewport, null, Object.entries(inviteActions).map(([id, action]) => {
1135
- return /* @__PURE__ */ React12.createElement(DropdownMenu2.CheckboxItem, {
1131
+ }))), /* @__PURE__ */ React11.createElement(DropdownMenu2.Content, null, /* @__PURE__ */ React11.createElement(DropdownMenu2.Viewport, null, Object.entries(inviteActions).map(([id, action]) => {
1132
+ return /* @__PURE__ */ React11.createElement(DropdownMenu2.CheckboxItem, {
1136
1133
  key: id,
1137
1134
  "aria-labelledby": `${id}__label`,
1138
1135
  "aria-describedby": `${id}__description`,
1139
1136
  checked: activeActionKey === id,
1140
1137
  onCheckedChange: (checked) => checked && setActiveActionKey(id),
1141
1138
  classNames: "gap-2"
1142
- }, action.icon && /* @__PURE__ */ React12.createElement(action.icon, {
1139
+ }, action.icon && /* @__PURE__ */ React11.createElement(action.icon, {
1143
1140
  className: getSize3(5)
1144
- }), /* @__PURE__ */ React12.createElement("div", {
1141
+ }), /* @__PURE__ */ React11.createElement("div", {
1145
1142
  role: "none",
1146
1143
  className: "flex-1 min-is-0 space-b-1"
1147
- }, /* @__PURE__ */ React12.createElement("p", {
1144
+ }, /* @__PURE__ */ React11.createElement("p", {
1148
1145
  id: `${id}__label`
1149
1146
  }, t(action.label, {
1150
1147
  ns: "os"
1151
- })), action.description && /* @__PURE__ */ React12.createElement("p", {
1148
+ })), action.description && /* @__PURE__ */ React11.createElement("p", {
1152
1149
  id: `${id}__description`,
1153
- className: descriptionText5
1150
+ className: descriptionText3
1154
1151
  }, t(action.description, {
1155
1152
  ns: "os"
1156
- }))), /* @__PURE__ */ React12.createElement(DropdownMenu2.ItemIndicator, {
1153
+ }))), /* @__PURE__ */ React11.createElement(DropdownMenu2.ItemIndicator, {
1157
1154
  asChild: true
1158
- }, /* @__PURE__ */ React12.createElement(Check, {
1155
+ }, /* @__PURE__ */ React11.createElement(Check, {
1159
1156
  className: getSize3(4)
1160
1157
  })));
1161
- })), /* @__PURE__ */ React12.createElement(DropdownMenu2.Arrow, null)))), members[Presence.ONLINE].length + members[Presence.OFFLINE].length < 1 ? /* @__PURE__ */ React12.createElement("p", {
1162
- className: mx7(descriptionText5, "text-center is-full mlb-2")
1158
+ })), /* @__PURE__ */ React11.createElement(DropdownMenu2.Arrow, null)))), members[Presence.ONLINE].length + members[Presence.OFFLINE].length < 1 ? /* @__PURE__ */ React11.createElement("p", {
1159
+ className: mx5(descriptionText3, "text-center is-full mlb-2")
1163
1160
  }, t("empty space members message", {
1164
1161
  ns: "os"
1165
- })) : /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement("h3", {
1162
+ })) : /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement("h3", {
1166
1163
  className: "col-start-2 col-end-5 text-sm italic text-description"
1167
1164
  }, t("active space members heading", {
1168
1165
  count: members[Presence.ONLINE].length
1169
- })), /* @__PURE__ */ React12.createElement(SpaceMemberList, {
1166
+ })), /* @__PURE__ */ React11.createElement(SpaceMemberList, {
1170
1167
  members: members[Presence.ONLINE]
1171
- }), /* @__PURE__ */ React12.createElement("h3", {
1168
+ }), /* @__PURE__ */ React11.createElement("h3", {
1172
1169
  className: "col-start-2 col-end-5 text-sm italic text-description"
1173
1170
  }, t("inactive space members heading", {
1174
1171
  count: members[Presence.OFFLINE].length
1175
- })), /* @__PURE__ */ React12.createElement(SpaceMemberList, {
1172
+ })), /* @__PURE__ */ React11.createElement(SpaceMemberList, {
1176
1173
  members: members[Presence.OFFLINE]
1177
1174
  })));
1178
1175
  };
1179
1176
 
1180
1177
  // packages/plugins/plugin-space/src/components/SpaceMain/SpaceMain.tsx
1181
1178
  var KeyShortcuts = () => {
1182
- const { t } = useTranslation13(SPACE_PLUGIN);
1183
- return /* @__PURE__ */ React13.createElement("section", {
1179
+ const { t } = useTranslation12(SPACE_PLUGIN);
1180
+ return /* @__PURE__ */ React12.createElement("section", {
1184
1181
  className: "mbe-4 col-span-4 md:col-start-5 md:col-end-7 grid grid-cols-subgrid gap-y-2 auto-rows-min"
1185
- }, /* @__PURE__ */ React13.createElement("h2", {
1182
+ }, /* @__PURE__ */ React12.createElement("h2", {
1186
1183
  className: "contents"
1187
- }, /* @__PURE__ */ React13.createElement(Command, {
1184
+ }, /* @__PURE__ */ React12.createElement(Command, {
1188
1185
  weight: "duotone",
1189
- className: mx8(getSize4(5), "place-self-center")
1190
- }), /* @__PURE__ */ React13.createElement("span", {
1186
+ className: mx6(getSize4(5), "place-self-center")
1187
+ }), /* @__PURE__ */ React12.createElement("span", {
1191
1188
  className: "text-lg col-span-2 md:col-span-1"
1192
- }, t("keyshortcuts label"))), /* @__PURE__ */ React13.createElement("div", {
1189
+ }, t("keyshortcuts label"))), /* @__PURE__ */ React12.createElement("div", {
1193
1190
  role: "none",
1194
1191
  className: "col-start-2 col-end-4 md:col-end-5 pie-2"
1195
- }, /* @__PURE__ */ React13.createElement(Surface, {
1192
+ }, /* @__PURE__ */ React12.createElement(Surface, {
1196
1193
  role: "keyshortcuts"
1197
1194
  })));
1198
1195
  };
@@ -1201,7 +1198,7 @@ var SpaceMain = ({ space, role }) => {
1201
1198
  const state = space.state.get();
1202
1199
  const ready = state === SpaceState2.SPACE_READY;
1203
1200
  const Root = role === "main" ? Main.Content : "div";
1204
- return /* @__PURE__ */ React13.createElement(ClipboardProvider, null, /* @__PURE__ */ React13.createElement(Root, {
1201
+ return /* @__PURE__ */ React12.createElement(ClipboardProvider, null, /* @__PURE__ */ React12.createElement(Root, {
1205
1202
  ...role === "main" ? {
1206
1203
  classNames: [
1207
1204
  topbarBlockPaddingStart,
@@ -1210,23 +1207,23 @@ var SpaceMain = ({ space, role }) => {
1210
1207
  ]
1211
1208
  } : {
1212
1209
  role: "none",
1213
- className: mx8(topbarBlockPaddingStart, "row-span-2", spaceMainLayout)
1210
+ className: mx6(topbarBlockPaddingStart, "row-span-2", spaceMainLayout)
1214
1211
  },
1215
1212
  "data-testid": `spacePlugin.${role}`,
1216
1213
  "data-isready": ready ? "true" : "false"
1217
- }, ready && /* @__PURE__ */ React13.createElement(SpaceMembersSection, {
1214
+ }, ready && /* @__PURE__ */ React12.createElement(SpaceMembersSection, {
1218
1215
  space
1219
- }), /* @__PURE__ */ React13.createElement(KeyShortcuts, null)));
1216
+ }), /* @__PURE__ */ React12.createElement(KeyShortcuts, null)));
1220
1217
  };
1221
1218
 
1222
1219
  // packages/plugins/plugin-space/src/components/SpacePresence.tsx
1223
- import React14, { useCallback as useCallback4, useEffect as useEffect4, useState as useState7 } from "react";
1220
+ import React13, { useCallback as useCallback4, useEffect as useEffect4, useState as useState7 } from "react";
1224
1221
  import { usePlugin } from "@dxos/app-framework";
1225
1222
  import { generateName } from "@dxos/display-name";
1226
1223
  import { PublicKey, useClient as useClient3 } from "@dxos/react-client";
1227
1224
  import { getSpace as getSpace3, useMembers as useMembers2, fullyQualifiedId as fullyQualifiedId3 } from "@dxos/react-client/echo";
1228
1225
  import { useIdentity } from "@dxos/react-client/halo";
1229
- import { Avatar, AvatarGroup, AvatarGroupItem, Tooltip as Tooltip2, useDensityContext, useTranslation as useTranslation14, List as List2, ListItem, useDefaultValue } from "@dxos/react-ui";
1226
+ import { Avatar, AvatarGroup, AvatarGroupItem, Tooltip as Tooltip2, useDensityContext, useTranslation as useTranslation13, List as List2, ListItem, useDefaultValue } from "@dxos/react-ui";
1230
1227
  import { AttentionGlyph } from "@dxos/react-ui-attention";
1231
1228
  import { ComplexMap, keyToFallback } from "@dxos/util";
1232
1229
  var REFRESH_INTERVAL = 5e3;
@@ -1264,9 +1261,9 @@ var SpacePresence = ({ object, spaceKey }) => {
1264
1261
  lastSeen
1265
1262
  };
1266
1263
  }).toSorted((a, b) => a.lastSeen - b.lastSeen);
1267
- return density === "fine" ? /* @__PURE__ */ React14.createElement(SmallPresence, {
1264
+ return density === "fine" ? /* @__PURE__ */ React13.createElement(SmallPresence, {
1268
1265
  count: membersForObject.length
1269
- }) : /* @__PURE__ */ React14.createElement(FullPresence, {
1266
+ }) : /* @__PURE__ */ React13.createElement(FullPresence, {
1270
1267
  members: membersForObject
1271
1268
  });
1272
1269
  };
@@ -1276,38 +1273,38 @@ var FullPresence = (props) => {
1276
1273
  if (members.length === 0) {
1277
1274
  return null;
1278
1275
  }
1279
- return /* @__PURE__ */ React14.createElement(AvatarGroup.Root, {
1276
+ return /* @__PURE__ */ React13.createElement(AvatarGroup.Root, {
1280
1277
  size,
1281
1278
  classNames: "mbs-2 mie-4",
1282
1279
  "data-testid": "spacePlugin.presence"
1283
- }, members.slice(0, 3).map((member, i) => /* @__PURE__ */ React14.createElement(Tooltip2.Root, {
1280
+ }, members.slice(0, 3).map((member, i) => /* @__PURE__ */ React13.createElement(Tooltip2.Root, {
1284
1281
  key: member.identity.identityKey.toHex()
1285
- }, /* @__PURE__ */ React14.createElement(Tooltip2.Trigger, null, /* @__PURE__ */ React14.createElement(PrensenceAvatar, {
1282
+ }, /* @__PURE__ */ React13.createElement(Tooltip2.Trigger, null, /* @__PURE__ */ React13.createElement(PrensenceAvatar, {
1286
1283
  identity: member.identity,
1287
1284
  group: true,
1288
1285
  match: member.currentlyAttended,
1289
1286
  index: members.length - i,
1290
1287
  onClick: () => onMemberClick?.(member)
1291
- })), /* @__PURE__ */ React14.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React14.createElement(Tooltip2.Content, {
1288
+ })), /* @__PURE__ */ React13.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React13.createElement(Tooltip2.Content, {
1292
1289
  side: "bottom"
1293
- }, /* @__PURE__ */ React14.createElement("span", null, getName(member.identity)), /* @__PURE__ */ React14.createElement(Tooltip2.Arrow, null))))), members.length > 3 && /* @__PURE__ */ React14.createElement(Tooltip2.Root, null, /* @__PURE__ */ React14.createElement(Tooltip2.Trigger, null, /* @__PURE__ */ React14.createElement(AvatarGroupItem.Root, {
1290
+ }, /* @__PURE__ */ React13.createElement("span", null, getName(member.identity)), /* @__PURE__ */ React13.createElement(Tooltip2.Arrow, null))))), members.length > 3 && /* @__PURE__ */ React13.createElement(Tooltip2.Root, null, /* @__PURE__ */ React13.createElement(Tooltip2.Trigger, null, /* @__PURE__ */ React13.createElement(AvatarGroupItem.Root, {
1294
1291
  status: "inactive"
1295
- }, /* @__PURE__ */ React14.createElement(Avatar.Frame, {
1292
+ }, /* @__PURE__ */ React13.createElement(Avatar.Frame, {
1296
1293
  style: {
1297
1294
  zIndex: members.length - 4
1298
1295
  }
1299
- }, /* @__PURE__ */ React14.createElement(Avatar.Fallback, {
1296
+ }, /* @__PURE__ */ React13.createElement(Avatar.Fallback, {
1300
1297
  text: `+${members.length - 3}`
1301
- })))), /* @__PURE__ */ React14.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React14.createElement(Tooltip2.Content, {
1298
+ })))), /* @__PURE__ */ React13.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React13.createElement(Tooltip2.Content, {
1302
1299
  side: "bottom"
1303
- }, /* @__PURE__ */ React14.createElement(Tooltip2.Arrow, null), /* @__PURE__ */ React14.createElement(List2, {
1300
+ }, /* @__PURE__ */ React13.createElement(Tooltip2.Arrow, null), /* @__PURE__ */ React13.createElement(List2, {
1304
1301
  classNames: "max-h-56 overflow-y-auto"
1305
- }, members.map((member) => /* @__PURE__ */ React14.createElement(ListItem.Root, {
1302
+ }, members.map((member) => /* @__PURE__ */ React13.createElement(ListItem.Root, {
1306
1303
  key: member.identity.identityKey.toHex(),
1307
1304
  classNames: "flex gap-2 items-center cursor-pointer mbe-2",
1308
1305
  onClick: () => onMemberClick?.(member),
1309
1306
  "data-testid": "identity-list-item"
1310
- }, /* @__PURE__ */ React14.createElement(PrensenceAvatar, {
1307
+ }, /* @__PURE__ */ React13.createElement(PrensenceAvatar, {
1311
1308
  identity: member.identity,
1312
1309
  showName: true,
1313
1310
  match: member.currentlyAttended
@@ -1317,10 +1314,10 @@ var PrensenceAvatar = ({ identity, showName, match, group, index, onClick }) =>
1317
1314
  const Root = group ? AvatarGroupItem.Root : Avatar.Root;
1318
1315
  const status = match ? "current" : "active";
1319
1316
  const fallbackValue = keyToFallback(identity.identityKey);
1320
- return /* @__PURE__ */ React14.createElement(Root, {
1317
+ return /* @__PURE__ */ React13.createElement(Root, {
1321
1318
  status,
1322
1319
  hue: identity.profile?.data?.hue || fallbackValue.hue
1323
- }, /* @__PURE__ */ React14.createElement(Avatar.Frame, {
1320
+ }, /* @__PURE__ */ React13.createElement(Avatar.Frame, {
1324
1321
  "data-testid": "spacePlugin.presence.member",
1325
1322
  "data-status": status,
1326
1323
  ...index ? {
@@ -1329,9 +1326,9 @@ var PrensenceAvatar = ({ identity, showName, match, group, index, onClick }) =>
1329
1326
  }
1330
1327
  } : {},
1331
1328
  onClick: () => onClick?.()
1332
- }, /* @__PURE__ */ React14.createElement(Avatar.Fallback, {
1329
+ }, /* @__PURE__ */ React13.createElement(Avatar.Fallback, {
1333
1330
  text: identity.profile?.data?.emoji || fallbackValue.emoji
1334
- })), showName && /* @__PURE__ */ React14.createElement(Avatar.Label, {
1331
+ })), showName && /* @__PURE__ */ React13.createElement(Avatar.Label, {
1335
1332
  classNames: "text-sm truncate pli-2"
1336
1333
  }, getName(identity)));
1337
1334
  };
@@ -1342,37 +1339,37 @@ var SmallPresenceLive = ({ viewers }) => {
1342
1339
  return () => clearInterval(interval);
1343
1340
  }, []);
1344
1341
  const activeViewers = viewers ? Array.from(viewers.values()).filter(({ lastSeen }) => moment - lastSeen < ACTIVITY_DURATION) : [];
1345
- return /* @__PURE__ */ React14.createElement(SmallPresence, {
1342
+ return /* @__PURE__ */ React13.createElement(SmallPresence, {
1346
1343
  count: activeViewers.length
1347
1344
  });
1348
1345
  };
1349
1346
  var SmallPresence = ({ count }) => {
1350
- const { t } = useTranslation14(SPACE_PLUGIN);
1351
- return /* @__PURE__ */ React14.createElement(Tooltip2.Root, null, /* @__PURE__ */ React14.createElement(Tooltip2.Trigger, {
1347
+ const { t } = useTranslation13(SPACE_PLUGIN);
1348
+ return /* @__PURE__ */ React13.createElement(Tooltip2.Root, null, /* @__PURE__ */ React13.createElement(Tooltip2.Trigger, {
1352
1349
  asChild: true
1353
- }, /* @__PURE__ */ React14.createElement(AttentionGlyph, {
1350
+ }, /* @__PURE__ */ React13.createElement(AttentionGlyph, {
1354
1351
  presence: count > 1 ? "many" : count === 1 ? "one" : "none",
1355
1352
  classNames: "self-center mie-1"
1356
- })), /* @__PURE__ */ React14.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React14.createElement(Tooltip2.Content, {
1353
+ })), /* @__PURE__ */ React13.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React13.createElement(Tooltip2.Content, {
1357
1354
  side: "bottom",
1358
1355
  classNames: "z-[70]"
1359
- }, /* @__PURE__ */ React14.createElement("span", null, t("presence label", {
1356
+ }, /* @__PURE__ */ React13.createElement("span", null, t("presence label", {
1360
1357
  count
1361
- })), /* @__PURE__ */ React14.createElement(Tooltip2.Arrow, null))));
1358
+ })), /* @__PURE__ */ React13.createElement(Tooltip2.Arrow, null))));
1362
1359
  };
1363
1360
 
1364
1361
  // packages/plugins/plugin-space/src/components/SpaceSettings.tsx
1365
- import React15 from "react";
1362
+ import React14 from "react";
1366
1363
  import { useIntentDispatcher as useIntentDispatcher2, useResolvePlugins } from "@dxos/app-framework";
1367
1364
  import { SettingsValue } from "@dxos/plugin-settings";
1368
- import { Input as Input3, Select, toLocalizedString as toLocalizedString2, useTranslation as useTranslation15 } from "@dxos/react-ui";
1365
+ import { Input as Input4, Select, toLocalizedString as toLocalizedString2, useTranslation as useTranslation14 } from "@dxos/react-ui";
1369
1366
  var SpaceSettings = ({ settings }) => {
1370
- const { t } = useTranslation15(SPACE_PLUGIN);
1367
+ const { t } = useTranslation14(SPACE_PLUGIN);
1371
1368
  const dispatch = useIntentDispatcher2();
1372
1369
  const plugins = useResolvePlugins(parseSpaceInitPlugin);
1373
- return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(SettingsValue, {
1370
+ return /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(SettingsValue, {
1374
1371
  label: t("show hidden spaces label")
1375
- }, /* @__PURE__ */ React15.createElement(Input3.Switch, {
1372
+ }, /* @__PURE__ */ React14.createElement(Input4.Switch, {
1376
1373
  checked: settings.showHidden,
1377
1374
  onCheckedChange: (checked) => dispatch({
1378
1375
  plugin: SPACE_PLUGIN,
@@ -1381,28 +1378,28 @@ var SpaceSettings = ({ settings }) => {
1381
1378
  state: !!checked
1382
1379
  }
1383
1380
  })
1384
- })), /* @__PURE__ */ React15.createElement(SettingsValue, {
1381
+ })), /* @__PURE__ */ React14.createElement(SettingsValue, {
1385
1382
  label: t("default on space create label")
1386
- }, /* @__PURE__ */ React15.createElement(Select.Root, {
1383
+ }, /* @__PURE__ */ React14.createElement(Select.Root, {
1387
1384
  value: settings.onSpaceCreate,
1388
1385
  onValueChange: (value) => {
1389
1386
  settings.onSpaceCreate = value;
1390
1387
  }
1391
- }, /* @__PURE__ */ React15.createElement(Select.TriggerButton, null), /* @__PURE__ */ React15.createElement(Select.Portal, null, /* @__PURE__ */ React15.createElement(Select.Content, null, /* @__PURE__ */ React15.createElement(Select.Viewport, null, plugins.map(({ provides: { space: { onSpaceCreate } } }) => /* @__PURE__ */ React15.createElement(Select.Option, {
1388
+ }, /* @__PURE__ */ React14.createElement(Select.TriggerButton, null), /* @__PURE__ */ React14.createElement(Select.Portal, null, /* @__PURE__ */ React14.createElement(Select.Content, null, /* @__PURE__ */ React14.createElement(Select.Viewport, null, plugins.map(({ provides: { space: { onSpaceCreate } } }) => /* @__PURE__ */ React14.createElement(Select.Option, {
1392
1389
  key: onSpaceCreate.action,
1393
1390
  value: onSpaceCreate.action
1394
1391
  }, toLocalizedString2(onSpaceCreate.label, t)))))))));
1395
1392
  };
1396
1393
 
1397
1394
  // packages/plugins/plugin-space/src/components/SaveStatus.tsx
1398
- import React16, { useEffect as useEffect5, useState as useState8 } from "react";
1395
+ import React15, { useEffect as useEffect5, useState as useState8 } from "react";
1399
1396
  import { Context } from "@dxos/context";
1400
1397
  import { StatusBar } from "@dxos/plugin-status-bar";
1401
1398
  import { useClient as useClient4 } from "@dxos/react-client";
1402
- import { Icon, useTranslation as useTranslation16 } from "@dxos/react-ui";
1399
+ import { Icon, useTranslation as useTranslation15 } from "@dxos/react-ui";
1403
1400
  var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/SaveStatus.tsx";
1404
1401
  var SaveStatus = () => {
1405
- const { t } = useTranslation16(SPACE_PLUGIN);
1402
+ const { t } = useTranslation15(SPACE_PLUGIN);
1406
1403
  const client = useClient4();
1407
1404
  const [state, setState] = useState8("saved");
1408
1405
  useEffect5(() => {
@@ -1410,9 +1407,9 @@ var SaveStatus = () => {
1410
1407
  setState(state2);
1411
1408
  });
1412
1409
  }, []);
1413
- return /* @__PURE__ */ React16.createElement(StatusBar.Item, {
1410
+ return /* @__PURE__ */ React15.createElement(StatusBar.Item, {
1414
1411
  title: state === "saving" ? t("saving label") : t("saved label")
1415
- }, /* @__PURE__ */ React16.createElement(Icon, {
1412
+ }, /* @__PURE__ */ React15.createElement(Icon, {
1416
1413
  icon: state === "saving" ? "ph--arrows-clockwise--regular" : "ph--check-circle--regular",
1417
1414
  size: 4
1418
1415
  }));
@@ -1477,11 +1474,11 @@ var createSpaceSaveTracker = (space, cb) => {
1477
1474
  };
1478
1475
 
1479
1476
  // packages/plugins/plugin-space/src/components/SyncStatus/SyncStatus.tsx
1480
- import React17, { useEffect as useEffect7, useState as useState10 } from "react";
1477
+ import React16, { useEffect as useEffect7, useState as useState10 } from "react";
1481
1478
  import { StatusBar as StatusBar2 } from "@dxos/plugin-status-bar";
1482
- import { Icon as Icon2, Popover as Popover3, useTranslation as useTranslation17 } from "@dxos/react-ui";
1479
+ import { Icon as Icon2, Popover as Popover3, useTranslation as useTranslation16 } from "@dxos/react-ui";
1483
1480
  import { SyntaxHighlighter } from "@dxos/react-ui-syntax-highlighter";
1484
- import { mx as mx9 } from "@dxos/react-ui-theme";
1481
+ import { mx as mx7 } from "@dxos/react-ui-theme";
1485
1482
 
1486
1483
  // packages/plugins/plugin-space/src/components/SyncStatus/types.ts
1487
1484
  import { useEffect as useEffect6, useState as useState9 } from "react";
@@ -1553,7 +1550,7 @@ var styles = {
1553
1550
  };
1554
1551
  var SyncStatus = () => {
1555
1552
  const state = useSyncState();
1556
- return /* @__PURE__ */ React17.createElement(SyncStatusIndicator, {
1553
+ return /* @__PURE__ */ React16.createElement(SyncStatusIndicator, {
1557
1554
  state
1558
1555
  });
1559
1556
  };
@@ -1576,30 +1573,30 @@ var SyncStatusIndicator = ({ state }) => {
1576
1573
  needsToUpload,
1577
1574
  needsToDownload
1578
1575
  ]);
1579
- return /* @__PURE__ */ React17.createElement(StatusBar2.Item, null, /* @__PURE__ */ React17.createElement(Popover3.Root, null, /* @__PURE__ */ React17.createElement(Popover3.Trigger, null, /* @__PURE__ */ React17.createElement(Icon2, {
1576
+ return /* @__PURE__ */ React16.createElement(StatusBar2.Item, null, /* @__PURE__ */ React16.createElement(Popover3.Root, null, /* @__PURE__ */ React16.createElement(Popover3.Trigger, null, /* @__PURE__ */ React16.createElement(Icon2, {
1580
1577
  icon: offline ? "ph--cloud-x--regular" : needsToUpload ? "ph--cloud-arrow-up--regular" : needsToDownload ? "ph--cloud-arrow-down--regular" : "ph--cloud-check--regular",
1581
1578
  size: 4,
1582
1579
  classNames
1583
- })), /* @__PURE__ */ React17.createElement(Popover3.Content, null, /* @__PURE__ */ React17.createElement(SyncStatusDetail, {
1580
+ })), /* @__PURE__ */ React16.createElement(Popover3.Content, null, /* @__PURE__ */ React16.createElement(SyncStatusDetail, {
1584
1581
  state,
1585
1582
  summary,
1586
1583
  debug: false
1587
1584
  }))));
1588
1585
  };
1589
1586
  var SyncStatusDetail = ({ classNames, state, summary, debug }) => {
1590
- const { t } = useTranslation17(SPACE_PLUGIN);
1587
+ const { t } = useTranslation16(SPACE_PLUGIN);
1591
1588
  const entries = Object.entries(state).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0);
1592
- return /* @__PURE__ */ React17.createElement("div", {
1593
- className: mx9("flex flex-col text-xs min-w-[16rem]", classNames)
1594
- }, /* @__PURE__ */ React17.createElement("h1", {
1589
+ return /* @__PURE__ */ React16.createElement("div", {
1590
+ className: mx7("flex flex-col text-xs min-w-[16rem]", classNames)
1591
+ }, /* @__PURE__ */ React16.createElement("h1", {
1595
1592
  className: "p-2"
1596
- }, t("sync status title")), /* @__PURE__ */ React17.createElement("div", {
1593
+ }, t("sync status title")), /* @__PURE__ */ React16.createElement("div", {
1597
1594
  className: "flex flex-col gap-[2px] my-[2px]"
1598
- }, entries.map(([spaceId, state2]) => /* @__PURE__ */ React17.createElement(SpaceRow, {
1595
+ }, entries.map(([spaceId, state2]) => /* @__PURE__ */ React16.createElement(SpaceRow, {
1599
1596
  key: spaceId,
1600
1597
  spaceId,
1601
1598
  state: state2
1602
- }))), debug && /* @__PURE__ */ React17.createElement(SyntaxHighlighter, {
1599
+ }))), debug && /* @__PURE__ */ React16.createElement(SyntaxHighlighter, {
1603
1600
  language: "json"
1604
1601
  }, JSON.stringify(summary, null, 2)));
1605
1602
  };
@@ -1629,17 +1626,17 @@ var useActive = (count) => {
1629
1626
  var SpaceRow = ({ spaceId, state: { localDocumentCount, remoteDocumentCount, missingOnLocal, missingOnRemote } }) => {
1630
1627
  const downActive = useActive(localDocumentCount);
1631
1628
  const upActive = useActive(remoteDocumentCount);
1632
- return /* @__PURE__ */ React17.createElement("div", {
1633
- className: mx9("flex items-center mx-[2px] gap-[2px] cursor-pointer", styles.barHover),
1629
+ return /* @__PURE__ */ React16.createElement("div", {
1630
+ className: mx7("flex items-center mx-[2px] gap-[2px] cursor-pointer", styles.barHover),
1634
1631
  title: spaceId,
1635
1632
  onClick: () => {
1636
1633
  void navigator.clipboard.writeText(spaceId);
1637
1634
  }
1638
- }, /* @__PURE__ */ React17.createElement(Icon2, {
1635
+ }, /* @__PURE__ */ React16.createElement(Icon2, {
1639
1636
  icon: "ph--arrow-fat-line-left--regular",
1640
1637
  size: 3,
1641
- classNames: mx9(downActive && "animate-[pulse_1s_infinite]")
1642
- }), /* @__PURE__ */ React17.createElement(Candle, {
1638
+ classNames: mx7(downActive && "animate-[pulse_1s_infinite]")
1639
+ }), /* @__PURE__ */ React16.createElement(Candle, {
1643
1640
  up: {
1644
1641
  count: remoteDocumentCount,
1645
1642
  total: remoteDocumentCount + missingOnRemote
@@ -1649,37 +1646,37 @@ var SpaceRow = ({ spaceId, state: { localDocumentCount, remoteDocumentCount, mis
1649
1646
  total: localDocumentCount + missingOnLocal
1650
1647
  },
1651
1648
  title: spaceId
1652
- }), /* @__PURE__ */ React17.createElement(Icon2, {
1649
+ }), /* @__PURE__ */ React16.createElement(Icon2, {
1653
1650
  icon: "ph--arrow-fat-line-right--regular",
1654
1651
  size: 3,
1655
- classNames: mx9(upActive && "animate-[pulse_1s_step-start_infinite]")
1652
+ classNames: mx7(upActive && "animate-[pulse_1s_step-start_infinite]")
1656
1653
  }));
1657
1654
  };
1658
1655
  var Candle = ({ classNames, up, down }) => {
1659
- return /* @__PURE__ */ React17.createElement("div", {
1660
- className: mx9("grid grid-cols-[1fr_2rem_1fr] w-full h-3", classNames)
1661
- }, /* @__PURE__ */ React17.createElement(Bar, {
1656
+ return /* @__PURE__ */ React16.createElement("div", {
1657
+ className: mx7("grid grid-cols-[1fr_2rem_1fr] w-full h-3", classNames)
1658
+ }, /* @__PURE__ */ React16.createElement(Bar, {
1662
1659
  classNames: "justify-end",
1663
1660
  ...up
1664
- }), /* @__PURE__ */ React17.createElement("div", {
1661
+ }), /* @__PURE__ */ React16.createElement("div", {
1665
1662
  className: "relative"
1666
- }, /* @__PURE__ */ React17.createElement("div", {
1667
- className: mx9("absolute inset-0 flex items-center justify-center text-xs", styles.barBg)
1668
- }, up.total)), /* @__PURE__ */ React17.createElement(Bar, down));
1663
+ }, /* @__PURE__ */ React16.createElement("div", {
1664
+ className: mx7("absolute inset-0 flex items-center justify-center text-xs", styles.barBg)
1665
+ }, up.total)), /* @__PURE__ */ React16.createElement(Bar, down));
1669
1666
  };
1670
1667
  var Bar = ({ classNames, count, total }) => {
1671
1668
  let p = count / total * 100;
1672
1669
  if (count < total) {
1673
1670
  p = Math.min(p, 95);
1674
1671
  }
1675
- return /* @__PURE__ */ React17.createElement("div", {
1676
- className: mx9("relative flex w-full", styles.barBg, classNames)
1677
- }, /* @__PURE__ */ React17.createElement("div", {
1678
- className: mx9("shrink-0", styles.barFg),
1672
+ return /* @__PURE__ */ React16.createElement("div", {
1673
+ className: mx7("relative flex w-full", styles.barBg, classNames)
1674
+ }, /* @__PURE__ */ React16.createElement("div", {
1675
+ className: mx7("shrink-0", styles.barFg),
1679
1676
  style: {
1680
1677
  width: `${p}%`
1681
1678
  }
1682
- }), count !== total && /* @__PURE__ */ React17.createElement("div", {
1679
+ }), count !== total && /* @__PURE__ */ React16.createElement("div", {
1683
1680
  className: "absolute top-0 bottom-0 flex items-center mx-0.5 text-black text-xs"
1684
1681
  }, count));
1685
1682
  };
@@ -1765,7 +1762,9 @@ var translations_default = [
1765
1762
  "remove deleted objects alt": "Permanently remove deleted objects to free up space.",
1766
1763
  "copy link label": "Copy link",
1767
1764
  "default on space create label": "On space create",
1768
- "sync status title": "Sync status"
1765
+ "sync status title": "Sync status",
1766
+ "name label": "Name",
1767
+ "name placeholder": "Name"
1769
1768
  }
1770
1769
  }
1771
1770
  }
@@ -1821,17 +1820,21 @@ var SpacePlugin = ({ firstRun, onFirstRun } = {}) => {
1821
1820
  await defaultSpace.internal.migrate();
1822
1821
  }
1823
1822
  spaces.filter((space) => space.state.get() === SpaceState3.SPACE_READY).forEach((space) => {
1824
- subscriptions.add(effect(() => {
1825
- state.values.spaceNames[space.id] = space.properties.name;
1826
- }));
1823
+ subscriptions.add(scheduledEffect(() => ({
1824
+ name: space.properties.name
1825
+ }), ({ name }) => state.values.spaceNames[space.id] = name));
1827
1826
  });
1828
1827
  }).unsubscribe);
1829
- subscriptions.add(effect(() => {
1828
+ subscriptions.add(scheduledEffect(() => ({
1829
+ ids: openIds(location.active),
1830
+ removed: location.closed ? [
1831
+ location.closed
1832
+ ].flat() : []
1833
+ }), ({ ids, removed }) => {
1830
1834
  const send = () => {
1831
1835
  const spaces = client.spaces.get();
1832
1836
  const identity = client.halo.identity.get();
1833
1837
  if (identity && location.active) {
1834
- const ids = openIds(location.active);
1835
1838
  const idsBySpace = reduceGroupBy(ids, (id) => {
1836
1839
  const [spaceId] = id.split(":");
1837
1840
  return spaceId;
@@ -1846,9 +1849,6 @@ var SpacePlugin = ({ firstRun, onFirstRun } = {}) => {
1846
1849
  if (!space) {
1847
1850
  continue;
1848
1851
  }
1849
- const removed = location.closed ? [
1850
- location.closed
1851
- ].flat() : [];
1852
1852
  void space.postMessage("viewing", {
1853
1853
  identityKey: identity.identityKey.toHex(),
1854
1854
  attended: attention.attended ? [
@@ -1862,7 +1862,7 @@ var SpacePlugin = ({ firstRun, onFirstRun } = {}) => {
1862
1862
  err: err.message
1863
1863
  }, {
1864
1864
  F: __dxlog_file5,
1865
- L: 225,
1865
+ L: 228,
1866
1866
  S: void 0,
1867
1867
  C: (f, a) => f(...a)
1868
1868
  });
@@ -1971,7 +1971,7 @@ var SpacePlugin = ({ firstRun, onFirstRun } = {}) => {
1971
1971
  ...translations_default,
1972
1972
  osTranslations
1973
1973
  ],
1974
- root: () => state.values.awaiting ? /* @__PURE__ */ React18.createElement(AwaitingObject, {
1974
+ root: () => state.values.awaiting ? /* @__PURE__ */ React17.createElement(AwaitingObject, {
1975
1975
  id: state.values.awaiting
1976
1976
  }) : null,
1977
1977
  metadata: {
@@ -2003,7 +2003,7 @@ var SpacePlugin = ({ firstRun, onFirstRun } = {}) => {
2003
2003
  switch (role) {
2004
2004
  case "article":
2005
2005
  case "main":
2006
- return isSpace2(primary) && primary.state.get() === SpaceState3.SPACE_READY ? /* @__PURE__ */ React18.createElement(Surface2, {
2006
+ return isSpace2(primary) && primary.state.get() === SpaceState3.SPACE_READY ? /* @__PURE__ */ React17.createElement(Surface2, {
2007
2007
  data: {
2008
2008
  active: primary.properties[CollectionType.typename],
2009
2009
  id: primary.id
@@ -2011,26 +2011,20 @@ var SpacePlugin = ({ firstRun, onFirstRun } = {}) => {
2011
2011
  role,
2012
2012
  ...rest
2013
2013
  }) : primary instanceof CollectionType ? {
2014
- node: /* @__PURE__ */ React18.createElement(CollectionMain, {
2014
+ node: /* @__PURE__ */ React17.createElement(CollectionMain, {
2015
2015
  collection: primary
2016
2016
  }),
2017
2017
  disposition: "fallback"
2018
- } : typeof primary === "string" && primary.length === OBJECT_ID_LENGTH ? /* @__PURE__ */ React18.createElement(MissingObject, {
2018
+ } : typeof primary === "string" && primary.length === OBJECT_ID_LENGTH ? /* @__PURE__ */ React17.createElement(MissingObject, {
2019
2019
  id: primary
2020
2020
  }) : null;
2021
- // TODO(burdon): Add role name syntax to minimal plugin docs.
2022
- case "tree--empty":
2023
- switch (true) {
2024
- case data.plugin === SPACE_PLUGIN:
2025
- return /* @__PURE__ */ React18.createElement(EmptyTree, null);
2026
- case (isGraphNode(data.activeNode) && isSpace2(data.activeNode.data)):
2027
- return /* @__PURE__ */ React18.createElement(EmptySpace, null);
2028
- default:
2029
- return null;
2030
- }
2021
+ case "complementary--settings":
2022
+ return isEchoObject2(data.subject) ? /* @__PURE__ */ React17.createElement(FallbackSettings, {
2023
+ object: data.subject
2024
+ }) : null;
2031
2025
  case "dialog":
2032
2026
  if (data.component === "dxos.org/plugin/space/InvitationManagerDialog") {
2033
- return /* @__PURE__ */ React18.createElement(Dialog.Content, null, /* @__PURE__ */ React18.createElement(ClipboardProvider2, null, /* @__PURE__ */ React18.createElement(InvitationManager, {
2027
+ return /* @__PURE__ */ React17.createElement(Dialog.Content, null, /* @__PURE__ */ React17.createElement(ClipboardProvider2, null, /* @__PURE__ */ React17.createElement(InvitationManager, {
2034
2028
  active: true,
2035
2029
  ...data.subject
2036
2030
  })));
@@ -2039,20 +2033,21 @@ var SpacePlugin = ({ firstRun, onFirstRun } = {}) => {
2039
2033
  }
2040
2034
  case "popover":
2041
2035
  if (data.component === "dxos.org/plugin/space/RenameSpacePopover" && isSpace2(data.subject)) {
2042
- return /* @__PURE__ */ React18.createElement(PopoverRenameSpace, {
2036
+ return /* @__PURE__ */ React17.createElement(PopoverRenameSpace, {
2043
2037
  space: data.subject
2044
2038
  });
2045
2039
  }
2046
2040
  if (data.component === "dxos.org/plugin/space/RenameObjectPopover" && isReactiveObject2(data.subject)) {
2047
- return /* @__PURE__ */ React18.createElement(PopoverRenameObject, {
2041
+ return /* @__PURE__ */ React17.createElement(PopoverRenameObject, {
2048
2042
  object: data.subject
2049
2043
  });
2050
2044
  }
2051
2045
  return null;
2046
+ // TODO(burdon): Add role name syntax to minimal plugin docs.
2052
2047
  case "presence--glyph": {
2053
- return isReactiveObject2(data.object) ? /* @__PURE__ */ React18.createElement(SmallPresenceLive, {
2048
+ return isReactiveObject2(data.object) ? /* @__PURE__ */ React17.createElement(SmallPresenceLive, {
2054
2049
  viewers: state.values.viewersByObject[fullyQualifiedId4(data.object)]
2055
- }) : /* @__PURE__ */ React18.createElement(SmallPresence, {
2050
+ }) : /* @__PURE__ */ React17.createElement(SmallPresence, {
2056
2051
  count: 0
2057
2052
  });
2058
2053
  }
@@ -2066,32 +2061,32 @@ var SpacePlugin = ({ firstRun, onFirstRun } = {}) => {
2066
2061
  const space = isSpace2(data.object) ? data.object : getSpace4(data.object);
2067
2062
  const object = isSpace2(data.object) ? data.object.state.get() === SpaceState3.SPACE_READY ? space?.properties[CollectionType.typename] : void 0 : data.object;
2068
2063
  return space && object ? {
2069
- node: /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(SpacePresence, {
2064
+ node: /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(SpacePresence, {
2070
2065
  object
2071
- }), space.properties[COMPOSER_SPACE_LOCK] ? null : /* @__PURE__ */ React18.createElement(ShareSpaceButton, {
2066
+ }), space.properties[COMPOSER_SPACE_LOCK] ? null : /* @__PURE__ */ React17.createElement(ShareSpaceButton, {
2072
2067
  spaceId: space.id
2073
2068
  })),
2074
2069
  disposition: "hoist"
2075
2070
  } : null;
2076
2071
  }
2077
2072
  case "section":
2078
- return data.object instanceof CollectionType ? /* @__PURE__ */ React18.createElement(CollectionSection, {
2073
+ return data.object instanceof CollectionType ? /* @__PURE__ */ React17.createElement(CollectionSection, {
2079
2074
  collection: data.object
2080
2075
  }) : null;
2081
2076
  case "settings":
2082
- return data.plugin === meta_default.id ? /* @__PURE__ */ React18.createElement(SpaceSettings, {
2077
+ return data.plugin === meta_default.id ? /* @__PURE__ */ React17.createElement(SpaceSettings, {
2083
2078
  settings: settings.values
2084
2079
  }) : null;
2085
2080
  case "menu-footer":
2086
2081
  if (!isEchoObject2(data.object)) {
2087
2082
  return null;
2088
2083
  } else {
2089
- return /* @__PURE__ */ React18.createElement(MenuFooter, {
2084
+ return /* @__PURE__ */ React17.createElement(MenuFooter, {
2090
2085
  object: data.object
2091
2086
  });
2092
2087
  }
2093
2088
  case "status": {
2094
- return /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(SyncStatus, null), /* @__PURE__ */ React18.createElement(SaveStatus, null));
2089
+ return /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(SyncStatus, null), /* @__PURE__ */ React17.createElement(SaveStatus, null));
2095
2090
  }
2096
2091
  default:
2097
2092
  return null;
@@ -2153,7 +2148,7 @@ var SpacePlugin = ({ firstRun, onFirstRun } = {}) => {
2153
2148
  } else {
2154
2149
  log2.warn("spaces order object not found", void 0, {
2155
2150
  F: __dxlog_file5,
2156
- L: 528,
2151
+ L: 525,
2157
2152
  S: void 0,
2158
2153
  C: (f, a) => f(...a)
2159
2154
  });
@@ -2342,6 +2337,45 @@ var SpacePlugin = ({ firstRun, onFirstRun } = {}) => {
2342
2337
  resolve
2343
2338
  })).filter(nonNullable);
2344
2339
  }
2340
+ }),
2341
+ // Create nodes for object settings.
2342
+ createExtension({
2343
+ id: `${SPACE_PLUGIN}/settings-for-subject`,
2344
+ resolver: ({ id }) => {
2345
+ if (!id.endsWith("~settings")) {
2346
+ return;
2347
+ }
2348
+ const [subjectId] = id.split("~");
2349
+ const [spaceId, objectId] = parseFullyQualifiedId(subjectId);
2350
+ const space = client.spaces.get().find((space2) => space2.id === spaceId);
2351
+ const object = toSignal((onChange) => {
2352
+ const timeout = setTimeout(async () => {
2353
+ await space?.db.loadObjectById(objectId);
2354
+ onChange();
2355
+ });
2356
+ return () => clearTimeout(timeout);
2357
+ }, () => space?.db.getObjectById(objectId), subjectId);
2358
+ if (!object || !subjectId) {
2359
+ return;
2360
+ }
2361
+ const meta = resolve(getTypename2(object) ?? "");
2362
+ const label = meta.label?.(object) || object.name || meta.placeholder || [
2363
+ "unnamed object settings label",
2364
+ {
2365
+ ns: SPACE_PLUGIN
2366
+ }
2367
+ ];
2368
+ return {
2369
+ id,
2370
+ type: "orphan-settings-for-subject",
2371
+ data: null,
2372
+ properties: {
2373
+ icon: "ph--gear--regular",
2374
+ label,
2375
+ object
2376
+ }
2377
+ };
2378
+ }
2345
2379
  })
2346
2380
  ];
2347
2381
  },
@@ -2903,8 +2937,7 @@ export {
2903
2937
  CollectionSection,
2904
2938
  CollectionType,
2905
2939
  ContactType,
2906
- EmptySpace,
2907
- EmptyTree,
2940
+ FallbackSettings,
2908
2941
  FullPresence,
2909
2942
  MenuFooter,
2910
2943
  MessageState,