@dxos/plugin-space 0.6.13 → 0.6.14-main.2b6a0f3

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 (94) hide show
  1. package/dist/lib/browser/{chunk-DTVUOG2C.mjs → chunk-47SVNCZM.mjs} +24 -5
  2. package/dist/lib/browser/chunk-47SVNCZM.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-LZEGRS7H.mjs → chunk-AVLRQF6L.mjs} +1 -1
  4. package/dist/lib/browser/chunk-AVLRQF6L.mjs.map +7 -0
  5. package/dist/lib/browser/index.mjs +609 -250
  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 +7 -3
  10. package/dist/lib/node/{chunk-CVZPI2P3.cjs → chunk-CTYDNFGG.cjs} +30 -9
  11. package/dist/lib/node/chunk-CTYDNFGG.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 +827 -471
  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 +14 -10
  20. package/dist/lib/node/types/index.cjs.map +2 -2
  21. package/dist/lib/node-esm/chunk-PLPMYTLC.mjs +116 -0
  22. package/dist/lib/node-esm/chunk-PLPMYTLC.mjs.map +7 -0
  23. package/dist/lib/node-esm/chunk-YPQGKWHJ.mjs +37 -0
  24. package/dist/lib/node-esm/chunk-YPQGKWHJ.mjs.map +7 -0
  25. package/dist/lib/node-esm/index.mjs +3000 -0
  26. package/dist/lib/node-esm/index.mjs.map +7 -0
  27. package/dist/lib/node-esm/meta.json +1 -0
  28. package/dist/lib/node-esm/meta.mjs +14 -0
  29. package/dist/lib/node-esm/meta.mjs.map +7 -0
  30. package/dist/lib/node-esm/types/index.mjs +26 -0
  31. package/dist/lib/node-esm/types/index.mjs.map +7 -0
  32. package/dist/types/src/SpacePlugin.d.ts.map +1 -1
  33. package/dist/types/src/components/DefaultObjectSettings.d.ts +7 -0
  34. package/dist/types/src/components/DefaultObjectSettings.d.ts.map +1 -0
  35. package/dist/types/src/components/MenuFooter.d.ts +1 -1
  36. package/dist/types/src/components/MenuFooter.d.ts.map +1 -1
  37. package/dist/types/src/components/SaveStatus.d.ts +3 -0
  38. package/dist/types/src/components/SaveStatus.d.ts.map +1 -0
  39. package/dist/types/src/components/ShareSpaceButton.stories.d.ts +3 -91
  40. package/dist/types/src/components/ShareSpaceButton.stories.d.ts.map +1 -1
  41. package/dist/types/src/components/SpaceMain/SpaceMain.d.ts.map +1 -1
  42. package/dist/types/src/components/SpacePresence.stories.d.ts +4 -92
  43. package/dist/types/src/components/SpacePresence.stories.d.ts.map +1 -1
  44. package/dist/types/src/components/SpaceSettings.d.ts.map +1 -1
  45. package/dist/types/src/components/SyncStatus/SyncStatus.d.ts +13 -0
  46. package/dist/types/src/components/SyncStatus/SyncStatus.d.ts.map +1 -0
  47. package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts +24 -0
  48. package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts.map +1 -0
  49. package/dist/types/src/components/SyncStatus/index.d.ts +2 -0
  50. package/dist/types/src/components/SyncStatus/index.d.ts.map +1 -0
  51. package/dist/types/src/components/SyncStatus/types.d.ts +14 -0
  52. package/dist/types/src/components/SyncStatus/types.d.ts.map +1 -0
  53. package/dist/types/src/components/index.d.ts +3 -2
  54. package/dist/types/src/components/index.d.ts.map +1 -1
  55. package/dist/types/src/meta.d.ts.map +1 -1
  56. package/dist/types/src/translations.d.ts +6 -0
  57. package/dist/types/src/translations.d.ts.map +1 -1
  58. package/dist/types/src/types/thread.d.ts +15 -1
  59. package/dist/types/src/types/thread.d.ts.map +1 -1
  60. package/dist/types/src/types/types.d.ts +18 -1
  61. package/dist/types/src/types/types.d.ts.map +1 -1
  62. package/dist/types/src/util.d.ts +3 -6
  63. package/dist/types/src/util.d.ts.map +1 -1
  64. package/package.json +45 -36
  65. package/src/SpacePlugin.tsx +173 -90
  66. package/src/components/DefaultObjectSettings.tsx +32 -0
  67. package/src/components/MenuFooter.tsx +2 -2
  68. package/src/components/SaveStatus.tsx +95 -0
  69. package/src/components/ShareSpaceButton.stories.tsx +11 -7
  70. package/src/components/SpaceMain/SpaceMain.tsx +1 -22
  71. package/src/components/SpacePresence.stories.tsx +11 -9
  72. package/src/components/SpacePresence.tsx +1 -1
  73. package/src/components/SpaceSettings.tsx +32 -3
  74. package/src/components/SyncStatus/SyncStatus.stories.tsx +65 -0
  75. package/src/components/SyncStatus/SyncStatus.tsx +188 -0
  76. package/src/components/SyncStatus/index.ts +5 -0
  77. package/src/components/SyncStatus/types.ts +77 -0
  78. package/src/components/index.ts +3 -2
  79. package/src/meta.ts +3 -1
  80. package/src/translations.ts +6 -0
  81. package/src/types/collection.ts +1 -1
  82. package/src/types/thread.ts +12 -2
  83. package/src/types/types.ts +25 -1
  84. package/src/util.tsx +20 -55
  85. package/dist/lib/browser/chunk-DTVUOG2C.mjs.map +0 -7
  86. package/dist/lib/browser/chunk-LZEGRS7H.mjs.map +0 -7
  87. package/dist/lib/node/chunk-6CNYF6YU.cjs.map +0 -7
  88. package/dist/lib/node/chunk-CVZPI2P3.cjs.map +0 -7
  89. package/dist/types/src/components/EmptySpace.d.ts +0 -3
  90. package/dist/types/src/components/EmptySpace.d.ts.map +0 -1
  91. package/dist/types/src/components/EmptyTree.d.ts +0 -3
  92. package/dist/types/src/components/EmptyTree.d.ts.map +0 -1
  93. package/src/components/EmptySpace.tsx +0 -25
  94. package/src/components/EmptyTree.tsx +0 -25
@@ -3,36 +3,38 @@ 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,
10
10
  CollectionType,
11
11
  ContactType,
12
+ MessageState,
12
13
  MessageType,
13
14
  SPACE_DIRECTORY_HANDLE,
14
15
  ThreadStatus,
15
- ThreadType
16
- } from "./chunk-DTVUOG2C.mjs";
16
+ ThreadType,
17
+ parseSpaceInitPlugin
18
+ } from "./chunk-47SVNCZM.mjs";
17
19
 
18
20
  // packages/plugins/plugin-space/src/SpacePlugin.tsx
19
- import { Plus as Plus2, SignIn, CardsThree as CardsThree2, Warning as Warning2 } from "@phosphor-icons/react";
20
- import { effect, signal } from "@preact/signals-core";
21
+ import { signal } from "@preact/signals-core";
21
22
  import React17 from "react";
22
- import { LayoutAction as LayoutAction2, Surface as Surface2, NavigationAction as NavigationAction3, openIds, firstIdInPart, parseIntentPlugin as parseIntentPlugin3, parseNavigationPlugin as parseNavigationPlugin2, parseMetadataResolverPlugin, resolvePlugin, parseGraphPlugin } from "@dxos/app-framework";
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";
23
24
  import { EventSubscriptions } from "@dxos/async";
24
25
  import { isReactiveObject as isReactiveObject2 } from "@dxos/echo-schema";
26
+ import { scheduledEffect } from "@dxos/echo-signals/core";
25
27
  import { LocalStorageStore } from "@dxos/local-storage";
26
28
  import { log as log2 } from "@dxos/log";
27
29
  import { Migrations as Migrations2 } from "@dxos/migrations";
28
30
  import { parseAttentionPlugin } from "@dxos/plugin-attention";
29
31
  import { parseClientPlugin } from "@dxos/plugin-client";
30
- import { createExtension, isGraphNode, memoize as memoize2, toSignal } from "@dxos/plugin-graph";
32
+ import { createExtension, memoize as memoize2, toSignal } from "@dxos/plugin-graph";
31
33
  import { ObservabilityAction } from "@dxos/plugin-observability/meta";
32
34
  import { PublicKey as PublicKey2 } from "@dxos/react-client";
33
- import { create as create2, Expando, Filter, fullyQualifiedId as fullyQualifiedId4, getSpace as getSpace4, getTypename as getTypename2, isEchoObject as isEchoObject2, isSpace as isSpace2, loadObjectReferences, SpaceState as SpaceState3 } 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";
34
36
  import { Dialog } from "@dxos/react-ui";
35
- import { InvitationManager, osTranslations, ClipboardProvider as ClipboardProvider2 } from "@dxos/shell/react";
37
+ import { ClipboardProvider as ClipboardProvider2, InvitationManager, osTranslations } from "@dxos/shell/react";
36
38
  import { ComplexMap as ComplexMap2, nonNullable, reduceGroupBy } from "@dxos/util";
37
39
 
38
40
  // packages/plugins/plugin-space/src/components/AwaitingObject.tsx
@@ -158,46 +160,37 @@ var CollectionSection = ({ collection }) => {
158
160
  }, collection.name ?? t("unnamed collection label")));
159
161
  };
160
162
 
161
- // packages/plugins/plugin-space/src/components/EmptySpace.tsx
163
+ // packages/plugins/plugin-space/src/components/DefaultObjectSettings.tsx
162
164
  import React4 from "react";
163
- import { useTranslation as useTranslation4 } from "@dxos/react-ui";
164
- import { descriptionText as descriptionText2, mx as mx3 } from "@dxos/react-ui-theme";
165
- var EmptySpace = () => {
165
+ import { Input, useTranslation as useTranslation4 } from "@dxos/react-ui";
166
+ var DefaultObjectSettings = ({ object }) => {
166
167
  const { t } = useTranslation4(SPACE_PLUGIN);
167
168
  return /* @__PURE__ */ React4.createElement("div", {
168
- role: "none",
169
- className: mx3("p-2 mli-2 mbe-2 text-center border border-dashed border-neutral-400/50 rounded-lg", descriptionText2)
170
- }, t("empty space message"));
171
- };
172
-
173
- // packages/plugins/plugin-space/src/components/EmptyTree.tsx
174
- import React5 from "react";
175
- import { useTranslation as useTranslation5 } from "@dxos/react-ui";
176
- import { descriptionText as descriptionText3, mx as mx4 } from "@dxos/react-ui-theme";
177
- var EmptyTree = () => {
178
- const { t } = useTranslation5(SPACE_PLUGIN);
179
- return /* @__PURE__ */ React5.createElement("div", {
180
- role: "none",
181
- className: mx4("p-2 mli-2 mbe-2 text-center border border-dashed border-neutral-400/50 rounded-lg", descriptionText3)
182
- }, t("empty tree message"));
169
+ role: "form",
170
+ className: "flex flex-col w-full p-2 gap-1"
171
+ }, /* @__PURE__ */ React4.createElement(Input.Root, null, /* @__PURE__ */ React4.createElement(Input.Label, null, t("name label")), /* @__PURE__ */ React4.createElement(Input.TextInput, {
172
+ placeholder: t("name placeholder"),
173
+ value: object.name,
174
+ onChange: (event) => {
175
+ object.name = event.target.value;
176
+ }
177
+ })));
183
178
  };
184
179
 
185
180
  // packages/plugins/plugin-space/src/components/MenuFooter.tsx
186
- import { Planet as Planet2 } from "@phosphor-icons/react";
187
- import React7 from "react";
181
+ import { Planet } from "@phosphor-icons/react";
182
+ import React5 from "react";
188
183
  import { getSpace as getSpace2 } from "@dxos/client/echo";
189
184
  import { useClient as useClient2 } from "@dxos/react-client";
190
- import { DropdownMenu, toLocalizedString, useTranslation as useTranslation6 } from "@dxos/react-ui";
185
+ import { DropdownMenu, toLocalizedString, useTranslation as useTranslation5 } from "@dxos/react-ui";
191
186
 
192
187
  // packages/plugins/plugin-space/src/util.tsx
193
- import { CardsThree, Database, PencilSimpleLine, Planet, Plus, Trash, Users, X, ClockCounterClockwise, LockSimpleOpen, LockSimple, Placeholder, Link } from "@phosphor-icons/react";
194
- import React6 from "react";
195
188
  import { NavigationAction as NavigationAction2 } from "@dxos/app-framework";
196
- import { create, isReactiveObject, getTypename, getSchema, getEchoObjectAnnotation, EXPANDO_TYPENAME } from "@dxos/echo-schema";
189
+ import { create, isReactiveObject, getTypename, getSchema, getObjectAnnotation, EXPANDO_TYPENAME } from "@dxos/echo-schema";
197
190
  import { invariant } from "@dxos/invariant";
198
191
  import { Migrations } from "@dxos/migrations";
199
192
  import { ACTION_TYPE, ACTION_GROUP_TYPE, actionGroupSymbol, getGraph, cleanup, memoize } from "@dxos/plugin-graph";
200
- import { SpaceState, fullyQualifiedId as fullyQualifiedId2, getSpace, isEchoObject, isSpace } from "@dxos/react-client/echo";
193
+ import { fullyQualifiedId as fullyQualifiedId2, getSpace, isEchoObject, isSpace, SpaceState } from "@dxos/react-client/echo";
201
194
  var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/util.tsx";
202
195
  var SPACES = `${SPACE_PLUGIN}-spaces`;
203
196
  var SPACE_TYPE = "dxos.org/type/Space";
@@ -284,8 +277,7 @@ var constructSpaceNode = ({ space, personal, namesCache, resolve }) => {
284
277
  namesCache
285
278
  }),
286
279
  description: space.state.get() === SpaceState.SPACE_READY && space.properties.description,
287
- icon: (props) => /* @__PURE__ */ React6.createElement(Planet, props),
288
- iconSymbol: "ph--planet--regular",
280
+ icon: "ph--planet--regular",
289
281
  disabled: space.state.get() !== SpaceState.SPACE_READY || hasPendingMigration,
290
282
  testId: "spacePlugin.space"
291
283
  }
@@ -311,8 +303,7 @@ var constructSpaceActionGroups = ({ space, dispatch }) => {
311
303
  ns: SPACE_PLUGIN
312
304
  }
313
305
  ],
314
- icon: (props) => /* @__PURE__ */ React6.createElement(Plus, props),
315
- iconSymbol: "ph--plus--regular",
306
+ icon: "ph--plus--regular",
316
307
  disposition: "toolbar",
317
308
  // TODO(wittjosiah): This is currently a navtree feature. Address this with cmd+k integration.
318
309
  // mainAreaDisposition: 'in-flow',
@@ -346,8 +337,7 @@ var constructSpaceActionGroups = ({ space, dispatch }) => {
346
337
  ns: SPACE_PLUGIN
347
338
  }
348
339
  ],
349
- icon: (props) => /* @__PURE__ */ React6.createElement(CardsThree, props),
350
- iconSymbol: "ph--cards-three--regular",
340
+ icon: "ph--cards-three--regular",
351
341
  testId: "spacePlugin.createCollection"
352
342
  }
353
343
  }
@@ -381,8 +371,7 @@ var constructSpaceActions = ({ space, dispatch, personal, migrating }) => {
381
371
  ns: SPACE_PLUGIN
382
372
  }
383
373
  ],
384
- icon: (props) => /* @__PURE__ */ React6.createElement(Database, props),
385
- iconSymbol: "ph--database--regular",
374
+ icon: "ph--database--regular",
386
375
  disposition: "toolbar",
387
376
  mainAreaDisposition: "in-flow",
388
377
  disabled: migrating || Migrations.running(space)
@@ -413,8 +402,7 @@ var constructSpaceActions = ({ space, dispatch, personal, migrating }) => {
413
402
  ns: SPACE_PLUGIN
414
403
  }
415
404
  ],
416
- icon: (props) => /* @__PURE__ */ React6.createElement(Users, props),
417
- iconSymbol: "ph--users--regular",
405
+ icon: "ph--users--regular",
418
406
  disabled: locked,
419
407
  keyBinding: {
420
408
  macos: "meta+.",
@@ -441,8 +429,7 @@ var constructSpaceActions = ({ space, dispatch, personal, migrating }) => {
441
429
  ns: SPACE_PLUGIN
442
430
  }
443
431
  ],
444
- icon: locked ? (props) => /* @__PURE__ */ React6.createElement(LockSimpleOpen, props) : (props) => /* @__PURE__ */ React6.createElement(LockSimple, props),
445
- iconSymbol: locked ? "ph--lock-simple-open--regular" : "ph--lock-simple--regular"
432
+ icon: locked ? "ph--lock-simple-open--regular" : "ph--lock-simple--regular"
446
433
  }
447
434
  }, {
448
435
  id: getId(SpaceAction.RENAME),
@@ -464,8 +451,7 @@ var constructSpaceActions = ({ space, dispatch, personal, migrating }) => {
464
451
  ns: SPACE_PLUGIN
465
452
  }
466
453
  ],
467
- icon: (props) => /* @__PURE__ */ React6.createElement(PencilSimpleLine, props),
468
- iconSymbol: "ph--pencil-simple-line--regular",
454
+ icon: "ph--pencil-simple-line--regular",
469
455
  keyBinding: {
470
456
  macos: "shift+F6",
471
457
  windows: "shift+F6"
@@ -494,8 +480,7 @@ var constructSpaceActions = ({ space, dispatch, personal, migrating }) => {
494
480
  ns: SPACE_PLUGIN
495
481
  }
496
482
  ],
497
- icon: (props) => /* @__PURE__ */ React6.createElement(X, props),
498
- iconSymbol: "ph--x--regular",
483
+ icon: "ph--x--regular",
499
484
  mainAreaDisposition: "menu",
500
485
  disabled: personal
501
486
  }
@@ -521,8 +506,7 @@ var constructSpaceActions = ({ space, dispatch, personal, migrating }) => {
521
506
  ns: SPACE_PLUGIN
522
507
  }
523
508
  ],
524
- icon: (props) => /* @__PURE__ */ React6.createElement(ClockCounterClockwise, props),
525
- iconSymbol: "ph--clock-counter-clockwise--regular",
509
+ icon: "ph--clock-counter-clockwise--regular",
526
510
  disposition: "toolbar",
527
511
  mainAreaDisposition: "in-flow"
528
512
  }
@@ -556,8 +540,7 @@ var createObjectNode = ({ object, space, resolve }) => {
556
540
  ns: SPACE_PLUGIN
557
541
  }
558
542
  ],
559
- icon: metadata.icon ?? (() => /* @__PURE__ */ React6.createElement(Placeholder, null)),
560
- iconSymbol: metadata.iconSymbol ?? "ph--placeholder--regular",
543
+ icon: metadata.icon ?? "ph--placeholder--regular",
561
544
  testId: "spacePlugin.object",
562
545
  persistenceClass: "echo",
563
546
  persistenceKey: space?.id
@@ -582,8 +565,7 @@ var constructObjectActionGroups = ({ object, dispatch }) => {
582
565
  ns: SPACE_PLUGIN
583
566
  }
584
567
  ],
585
- icon: (props) => /* @__PURE__ */ React6.createElement(Plus, props),
586
- iconSymbol: "ph--plus--regular",
568
+ icon: "ph--plus--regular",
587
569
  disposition: "toolbar",
588
570
  // TODO(wittjosiah): This is currently a navtree feature. Address this with cmd+k integration.
589
571
  // mainAreaDisposition: 'in-flow',
@@ -617,8 +599,7 @@ var constructObjectActionGroups = ({ object, dispatch }) => {
617
599
  ns: SPACE_PLUGIN
618
600
  }
619
601
  ],
620
- icon: (props) => /* @__PURE__ */ React6.createElement(CardsThree, props),
621
- iconSymbol: "ph--cards-three--regular",
602
+ icon: "ph--cards-three--regular",
622
603
  testId: "spacePlugin.createCollection"
623
604
  }
624
605
  }
@@ -650,8 +631,7 @@ var constructObjectActions = ({ node, dispatch }) => {
650
631
  ns: SPACE_PLUGIN
651
632
  }
652
633
  ],
653
- icon: (props) => /* @__PURE__ */ React6.createElement(PencilSimpleLine, props),
654
- iconSymbol: "ph--pencil-simple-line--regular",
634
+ icon: "ph--pencil-simple-line--regular",
655
635
  // TODO(wittjosiah): Doesn't work.
656
636
  // keyBinding: 'shift+F6',
657
637
  testId: "spacePlugin.renameObject"
@@ -682,8 +662,7 @@ var constructObjectActions = ({ node, dispatch }) => {
682
662
  ns: SPACE_PLUGIN
683
663
  }
684
664
  ],
685
- icon: (props) => /* @__PURE__ */ React6.createElement(Trash, props),
686
- iconSymbol: "ph--trash--regular",
665
+ icon: "ph--trash--regular",
687
666
  keyBinding: object instanceof CollectionType ? void 0 : "shift+meta+Backspace",
688
667
  testId: "spacePlugin.deleteObject"
689
668
  }
@@ -702,8 +681,7 @@ var constructObjectActions = ({ node, dispatch }) => {
702
681
  ns: SPACE_PLUGIN
703
682
  }
704
683
  ],
705
- icon: (props) => /* @__PURE__ */ React6.createElement(Link, props),
706
- iconSymbol: "ph--link--regular",
684
+ icon: "ph--link--regular",
707
685
  testId: "spacePlugin.copyLink"
708
686
  }
709
687
  }
@@ -739,12 +717,12 @@ var getNestedObjects = async (object, resolve) => {
739
717
  };
740
718
  var cloneObject = async (object, resolve) => {
741
719
  const schema = getSchema(object);
742
- const typename = schema ? getEchoObjectAnnotation(schema)?.typename ?? EXPANDO_TYPENAME : EXPANDO_TYPENAME;
720
+ const typename = schema ? getObjectAnnotation(schema)?.typename ?? EXPANDO_TYPENAME : EXPANDO_TYPENAME;
743
721
  const metadata = resolve(typename);
744
722
  const serializer = metadata.serializer;
745
723
  invariant(serializer, `No serializer for type: ${typename}`, {
746
724
  F: __dxlog_file,
747
- L: 639,
725
+ L: 604,
748
726
  S: void 0,
749
727
  A: [
750
728
  "serializer",
@@ -762,31 +740,31 @@ var cloneObject = async (object, resolve) => {
762
740
 
763
741
  // packages/plugins/plugin-space/src/components/MenuFooter.tsx
764
742
  var MenuFooter = ({ object }) => {
765
- const { t } = useTranslation6(SPACE_PLUGIN);
743
+ const { t } = useTranslation5(SPACE_PLUGIN);
766
744
  const client = useClient2();
767
745
  const space = getSpace2(object);
768
746
  const spaceName = space ? getSpaceDisplayName(space, {
769
747
  personal: client.spaces.default === space
770
748
  }) : "";
771
- return space ? /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement(DropdownMenu.Separator, null), /* @__PURE__ */ React7.createElement(DropdownMenu.GroupLabel, null, t("menu footer label")), /* @__PURE__ */ React7.createElement("dl", {
749
+ 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", {
772
750
  className: "pis-2 mbe-2 text-xs grid grid-cols-[max-content_1fr] gap-2"
773
- }, /* @__PURE__ */ React7.createElement("dt", {
751
+ }, /* @__PURE__ */ React5.createElement("dt", {
774
752
  className: "uppercase text-[.75em] tracking-wide font-medium mbs-px self-start"
775
- }, t("location label")), /* @__PURE__ */ React7.createElement("dd", {
753
+ }, t("location label")), /* @__PURE__ */ React5.createElement("dd", {
776
754
  className: "line-clamp-3"
777
- }, /* @__PURE__ */ React7.createElement(Planet2, {
755
+ }, /* @__PURE__ */ React5.createElement(Planet, {
778
756
  className: "inline-block mie-1"
779
757
  }), toLocalizedString(spaceName, t)))) : null;
780
758
  };
781
759
 
782
760
  // packages/plugins/plugin-space/src/components/MissingObject.tsx
783
- import React8, { useEffect as useEffect2, useState as useState2 } from "react";
761
+ import React6, { useEffect as useEffect2, useState as useState2 } from "react";
784
762
  import { parseIntentPlugin as parseIntentPlugin2, useResolvePlugin as useResolvePlugin2 } from "@dxos/app-framework";
785
- import { Status, useTranslation as useTranslation7 } from "@dxos/react-ui";
786
- import { baseSurface as baseSurface2, descriptionText as descriptionText4, mx as mx5 } from "@dxos/react-ui-theme";
763
+ import { Status, useTranslation as useTranslation6 } from "@dxos/react-ui";
764
+ import { baseSurface as baseSurface2, descriptionText as descriptionText2, mx as mx3 } from "@dxos/react-ui-theme";
787
765
  var WAIT_FOR_OBJECT_TIMEOUT2 = 1e3;
788
766
  var MissingObject = ({ id }) => {
789
- const { t } = useTranslation7(SPACE_PLUGIN);
767
+ const { t } = useTranslation6(SPACE_PLUGIN);
790
768
  const [waiting, setWaiting] = useState2(false);
791
769
  const intentPlugin = useResolvePlugin2(parseIntentPlugin2);
792
770
  useEffect2(() => {
@@ -808,13 +786,13 @@ var MissingObject = ({ id }) => {
808
786
  intentPlugin,
809
787
  id
810
788
  ]);
811
- return /* @__PURE__ */ React8.createElement("div", {
789
+ return /* @__PURE__ */ React6.createElement("div", {
812
790
  role: "none",
813
- className: mx5(baseSurface2, "min-bs-screen is-full flex items-center justify-center p-8")
814
- }, waiting ? /* @__PURE__ */ React8.createElement("p", {
791
+ className: mx3(baseSurface2, "min-bs-screen is-full flex items-center justify-center p-8")
792
+ }, waiting ? /* @__PURE__ */ React6.createElement("p", {
815
793
  role: "alert",
816
- className: mx5(descriptionText4, "border border-dashed border-neutral-400/50 rounded-lg flex items-center justify-center p-8 font-normal text-lg")
817
- }, t("missing object message")) : /* @__PURE__ */ React8.createElement(Status, {
794
+ className: mx3(descriptionText2, "border border-dashed border-neutral-400/50 rounded-lg flex items-center justify-center p-8 font-normal text-lg")
795
+ }, t("missing object message")) : /* @__PURE__ */ React6.createElement(Status, {
818
796
  indeterminate: true,
819
797
  "aria-label": "Initializing"
820
798
  }));
@@ -822,10 +800,10 @@ var MissingObject = ({ id }) => {
822
800
 
823
801
  // packages/plugins/plugin-space/src/components/PersistenceStatus.tsx
824
802
  import { ArrowsCounterClockwise, CheckCircle as CheckCircle2, Warning } from "@phosphor-icons/react";
825
- import React9, { useEffect as useEffect3, useState as useState3 } from "react";
803
+ import React7, { useEffect as useEffect3, useState as useState3 } from "react";
826
804
  import { debounce } from "@dxos/async";
827
- import { Tooltip, useTranslation as useTranslation8 } from "@dxos/react-ui";
828
- import { getSize as getSize2, mx as mx6, staticPlaceholderText, warningText } from "@dxos/react-ui-theme";
805
+ import { Tooltip, useTranslation as useTranslation7 } from "@dxos/react-ui";
806
+ import { getSize as getSize2, mx as mx4, staticPlaceholderText, warningText } from "@dxos/react-ui-theme";
829
807
  var Status2;
830
808
  (function(Status3) {
831
809
  Status3[Status3["PERSISTED_LOCALLY"] = 0] = "PERSISTED_LOCALLY";
@@ -833,7 +811,7 @@ var Status2;
833
811
  Status3[Status3["ERROR"] = 2] = "ERROR";
834
812
  })(Status2 || (Status2 = {}));
835
813
  var PersistenceStatus = ({ db }) => {
836
- const { t } = useTranslation8(SPACE_PLUGIN);
814
+ const { t } = useTranslation7(SPACE_PLUGIN);
837
815
  const [displayMessage, setDisplayMessage] = useState3(false);
838
816
  const [status, naturalSetStatus] = useState3(0);
839
817
  const [prevStatus, setPrevStatus] = useState3(0);
@@ -850,45 +828,45 @@ var PersistenceStatus = ({ db }) => {
850
828
  ]);
851
829
  switch (status) {
852
830
  case 2:
853
- return /* @__PURE__ */ React9.createElement("div", {
831
+ return /* @__PURE__ */ React7.createElement("div", {
854
832
  className: "flex items-center"
855
- }, /* @__PURE__ */ React9.createElement(Warning, {
856
- className: mx6(getSize2(4), "me-1")
857
- }), /* @__PURE__ */ React9.createElement("span", {
858
- className: mx6("text-sm", warningText)
833
+ }, /* @__PURE__ */ React7.createElement(Warning, {
834
+ className: mx4(getSize2(4), "me-1")
835
+ }), /* @__PURE__ */ React7.createElement("span", {
836
+ className: mx4("text-sm", warningText)
859
837
  }, t("persistence error label")));
860
838
  case 1:
861
- return /* @__PURE__ */ React9.createElement("div", {
839
+ return /* @__PURE__ */ React7.createElement("div", {
862
840
  className: "flex items-center"
863
- }, /* @__PURE__ */ React9.createElement(ArrowsCounterClockwise, {
864
- className: mx6(getSize2(4), "me-1")
865
- }), /* @__PURE__ */ React9.createElement("span", {
866
- className: mx6("text-sm", staticPlaceholderText)
841
+ }, /* @__PURE__ */ React7.createElement(ArrowsCounterClockwise, {
842
+ className: mx4(getSize2(4), "me-1")
843
+ }), /* @__PURE__ */ React7.createElement("span", {
844
+ className: mx4("text-sm", staticPlaceholderText)
867
845
  }, t("persistence pending label")));
868
846
  case 0:
869
847
  default:
870
- return /* @__PURE__ */ React9.createElement(Tooltip.Root, {
848
+ return /* @__PURE__ */ React7.createElement(Tooltip.Root, {
871
849
  delayDuration: 400
872
- }, /* @__PURE__ */ React9.createElement(Tooltip.Trigger, {
850
+ }, /* @__PURE__ */ React7.createElement(Tooltip.Trigger, {
873
851
  role: "status",
874
852
  className: "flex items-center"
875
- }, /* @__PURE__ */ React9.createElement(CheckCircle2, {
876
- className: mx6(getSize2(4), "me-1")
877
- }), displayMessage && /* @__PURE__ */ React9.createElement("span", {
878
- className: mx6("text-sm", staticPlaceholderText)
879
- }, t("persisted locally label"))), /* @__PURE__ */ React9.createElement(Tooltip.Portal, null, /* @__PURE__ */ React9.createElement(Tooltip.Content, {
853
+ }, /* @__PURE__ */ React7.createElement(CheckCircle2, {
854
+ className: mx4(getSize2(4), "me-1")
855
+ }), displayMessage && /* @__PURE__ */ React7.createElement("span", {
856
+ className: mx4("text-sm", staticPlaceholderText)
857
+ }, t("persisted locally label"))), /* @__PURE__ */ React7.createElement(Tooltip.Portal, null, /* @__PURE__ */ React7.createElement(Tooltip.Content, {
880
858
  classNames: "z-10"
881
- }, t("persisted locally message"), /* @__PURE__ */ React9.createElement(Tooltip.Arrow, null))));
859
+ }, t("persisted locally message"), /* @__PURE__ */ React7.createElement(Tooltip.Arrow, null))));
882
860
  }
883
861
  };
884
862
 
885
863
  // packages/plugins/plugin-space/src/components/PopoverRenameObject.tsx
886
- import React10, { useCallback, useRef, useState as useState4 } from "react";
864
+ import React8, { useCallback, useRef, useState as useState4 } from "react";
887
865
  import { log } from "@dxos/log";
888
- import { Button as Button2, Input, Popover, useTranslation as useTranslation9 } from "@dxos/react-ui";
866
+ import { Button as Button2, Input as Input2, Popover, useTranslation as useTranslation8 } from "@dxos/react-ui";
889
867
  var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/PopoverRenameObject.tsx";
890
868
  var PopoverRenameObject = ({ object: obj }) => {
891
- const { t } = useTranslation9(SPACE_PLUGIN);
869
+ const { t } = useTranslation8(SPACE_PLUGIN);
892
870
  const doneButton = useRef(null);
893
871
  const object = obj;
894
872
  const [name, setName] = useState4(object.name || object.title || "");
@@ -913,23 +891,23 @@ var PopoverRenameObject = ({ object: obj }) => {
913
891
  object,
914
892
  name
915
893
  ]);
916
- return /* @__PURE__ */ React10.createElement("div", {
894
+ return /* @__PURE__ */ React8.createElement("div", {
917
895
  role: "none",
918
896
  className: "p-1 flex gap-2"
919
- }, /* @__PURE__ */ React10.createElement("div", {
897
+ }, /* @__PURE__ */ React8.createElement("div", {
920
898
  role: "none",
921
899
  className: "flex-1"
922
- }, /* @__PURE__ */ React10.createElement(Input.Root, null, /* @__PURE__ */ React10.createElement(Input.Label, {
900
+ }, /* @__PURE__ */ React8.createElement(Input2.Root, null, /* @__PURE__ */ React8.createElement(Input2.Label, {
923
901
  srOnly: true
924
- }, t("object name label")), /* @__PURE__ */ React10.createElement(Input.TextInput, {
902
+ }, t("object name label")), /* @__PURE__ */ React8.createElement(Input2.TextInput, {
925
903
  placeholder: t("object title placeholder"),
926
904
  value: name,
927
905
  "data-testid": "spacePlugin.renameObject.input",
928
906
  onChange: ({ target: { value } }) => setName(value),
929
907
  onKeyDown: ({ key }) => key === "Enter" && doneButton.current?.click()
930
- }))), /* @__PURE__ */ React10.createElement(Popover.Close, {
908
+ }))), /* @__PURE__ */ React8.createElement(Popover.Close, {
931
909
  asChild: true
932
- }, /* @__PURE__ */ React10.createElement(Button2, {
910
+ }, /* @__PURE__ */ React8.createElement(Button2, {
933
911
  ref: doneButton,
934
912
  classNames: "self-stretch",
935
913
  onClick: handleDone
@@ -939,10 +917,10 @@ var PopoverRenameObject = ({ object: obj }) => {
939
917
  };
940
918
 
941
919
  // packages/plugins/plugin-space/src/components/PopoverRenameSpace.tsx
942
- import React11, { useCallback as useCallback2, useRef as useRef2, useState as useState5 } from "react";
943
- import { Button as Button3, Input as Input2, Popover as Popover2, useTranslation as useTranslation10 } from "@dxos/react-ui";
920
+ import React9, { useCallback as useCallback2, useRef as useRef2, useState as useState5 } from "react";
921
+ import { Button as Button3, Input as Input3, Popover as Popover2, useTranslation as useTranslation9 } from "@dxos/react-ui";
944
922
  var PopoverRenameSpace = ({ space }) => {
945
- const { t } = useTranslation10(SPACE_PLUGIN);
923
+ const { t } = useTranslation9(SPACE_PLUGIN);
946
924
  const doneButton = useRef2(null);
947
925
  const [name, setName] = useState5(space.properties.name ?? "");
948
926
  const handleDone = useCallback2(() => {
@@ -951,24 +929,24 @@ var PopoverRenameSpace = ({ space }) => {
951
929
  space,
952
930
  name
953
931
  ]);
954
- return /* @__PURE__ */ React11.createElement("div", {
932
+ return /* @__PURE__ */ React9.createElement("div", {
955
933
  role: "none",
956
934
  className: "p-1 flex gap-2"
957
- }, /* @__PURE__ */ React11.createElement("div", {
935
+ }, /* @__PURE__ */ React9.createElement("div", {
958
936
  role: "none",
959
937
  className: "flex-1"
960
- }, /* @__PURE__ */ React11.createElement(Input2.Root, null, /* @__PURE__ */ React11.createElement(Input2.Label, {
938
+ }, /* @__PURE__ */ React9.createElement(Input3.Root, null, /* @__PURE__ */ React9.createElement(Input3.Label, {
961
939
  srOnly: true
962
- }, t("space name label")), /* @__PURE__ */ React11.createElement(Input2.TextInput, {
940
+ }, t("space name label")), /* @__PURE__ */ React9.createElement(Input3.TextInput, {
963
941
  defaultValue: space.properties.name ?? "",
964
942
  placeholder: t("unnamed space label"),
965
943
  onChange: ({ target: { value } }) => setName(value),
966
944
  // TODO(wittjosiah): Ideally this should access the popover context to close the popover.
967
945
  // Currently this is not possible because Radix does not expose the popover context.
968
946
  onKeyDown: ({ key }) => key === "Enter" && doneButton.current?.click()
969
- }))), /* @__PURE__ */ React11.createElement(Popover2.Close, {
947
+ }))), /* @__PURE__ */ React9.createElement(Popover2.Close, {
970
948
  asChild: true
971
- }, /* @__PURE__ */ React11.createElement(Button3, {
949
+ }, /* @__PURE__ */ React9.createElement(Button3, {
972
950
  ref: doneButton,
973
951
  classNames: "self-stretch",
974
952
  onClick: handleDone
@@ -978,12 +956,12 @@ var PopoverRenameSpace = ({ space }) => {
978
956
  };
979
957
 
980
958
  // packages/plugins/plugin-space/src/components/ShareSpaceButton.tsx
981
- import React12 from "react";
959
+ import React10 from "react";
982
960
  import { useIntentDispatcher } from "@dxos/app-framework";
983
- import { Button as Button4, useTranslation as useTranslation11 } from "@dxos/react-ui";
961
+ import { Button as Button4, useTranslation as useTranslation10 } from "@dxos/react-ui";
984
962
  var ShareSpaceButton = ({ spaceId }) => {
985
963
  const dispatch = useIntentDispatcher();
986
- return /* @__PURE__ */ React12.createElement(ShareSpaceButtonImpl, {
964
+ return /* @__PURE__ */ React10.createElement(ShareSpaceButtonImpl, {
987
965
  onClick: () => dispatch({
988
966
  action: SpaceAction.SHARE,
989
967
  data: {
@@ -993,8 +971,8 @@ var ShareSpaceButton = ({ spaceId }) => {
993
971
  });
994
972
  };
995
973
  var ShareSpaceButtonImpl = ({ onClick }) => {
996
- const { t } = useTranslation11(SPACE_PLUGIN);
997
- return /* @__PURE__ */ React12.createElement(Button4, {
974
+ const { t } = useTranslation10(SPACE_PLUGIN);
975
+ return /* @__PURE__ */ React10.createElement(Button4, {
998
976
  "data-testid": "spacePlugin.shareSpaceButton",
999
977
  onClick,
1000
978
  classNames: "mli-1"
@@ -1003,30 +981,30 @@ var ShareSpaceButtonImpl = ({ onClick }) => {
1003
981
 
1004
982
  // packages/plugins/plugin-space/src/components/SpaceMain/SpaceMain.tsx
1005
983
  import { Command } from "@phosphor-icons/react";
1006
- import React14 from "react";
984
+ import React12 from "react";
1007
985
  import { Surface } from "@dxos/app-framework";
1008
986
  import { SpaceState as SpaceState2 } from "@dxos/react-client/echo";
1009
- import { Button as Button6, Main, useTranslation as useTranslation13, toLocalizedString as toLocalizedString2 } from "@dxos/react-ui";
1010
- import { getSize as getSize4, mx as mx8, topbarBlockPaddingStart } from "@dxos/react-ui-theme";
987
+ import { Main, useTranslation as useTranslation12 } from "@dxos/react-ui";
988
+ import { getSize as getSize4, mx as mx6, topbarBlockPaddingStart } from "@dxos/react-ui-theme";
1011
989
  import { ClipboardProvider } from "@dxos/shell/react";
1012
990
 
1013
991
  // packages/plugins/plugin-space/src/components/SpaceMain/SpaceMembersSection.tsx
1014
992
  import { CaretDown, Check, UserPlus, UsersThree } from "@phosphor-icons/react";
1015
- import React13, { useCallback as useCallback3, useState as useState6 } from "react";
993
+ import React11, { useCallback as useCallback3, useState as useState6 } from "react";
1016
994
  import { LayoutAction, useIntent } from "@dxos/app-framework";
1017
995
  import { useMembers, SpaceMember, useSpaceInvitations } from "@dxos/react-client/echo";
1018
996
  import { InvitationEncoder } from "@dxos/react-client/invitations";
1019
997
  import { Invitation } from "@dxos/react-client/invitations";
1020
- import { Button as Button5, ButtonGroup, DropdownMenu as DropdownMenu2, List, useTranslation as useTranslation12 } from "@dxos/react-ui";
1021
- import { descriptionText as descriptionText5, getSize as getSize3, mx as mx7 } from "@dxos/react-ui-theme";
998
+ import { Button as Button5, ButtonGroup, DropdownMenu as DropdownMenu2, List, useTranslation as useTranslation11 } from "@dxos/react-ui";
999
+ import { descriptionText as descriptionText3, getSize as getSize3, mx as mx5 } from "@dxos/react-ui-theme";
1022
1000
  import { InvitationListItem, IdentityListItem } from "@dxos/shell/react";
1023
1001
  var activeActionKeyStorageKey = "dxos:react-shell/space-manager/active-action";
1024
1002
  var Presence = SpaceMember.PresenceState;
1025
1003
  var handleCreateInvitationUrl = (invitationCode) => `${origin}?spaceInvitationCode=${invitationCode}`;
1026
1004
  var SpaceMemberList = ({ members }) => {
1027
- return members.length > 0 ? /* @__PURE__ */ React13.createElement(List, {
1005
+ return members.length > 0 ? /* @__PURE__ */ React11.createElement(List, {
1028
1006
  classNames: "col-start-2 col-end-5 gap-y-1 grid grid-cols-subgrid items-center"
1029
- }, members.map((member) => /* @__PURE__ */ React13.createElement(IdentityListItem, {
1007
+ }, members.map((member) => /* @__PURE__ */ React11.createElement(IdentityListItem, {
1030
1008
  classNames: "contents",
1031
1009
  key: member.identity.identityKey.toHex(),
1032
1010
  identity: member.identity,
@@ -1034,7 +1012,7 @@ var SpaceMemberList = ({ members }) => {
1034
1012
  }))) : null;
1035
1013
  };
1036
1014
  var SpaceMembersSection = ({ space }) => {
1037
- const { t } = useTranslation12(SPACE_PLUGIN);
1015
+ const { t } = useTranslation11(SPACE_PLUGIN);
1038
1016
  const invitations = useSpaceInvitations(space.key);
1039
1017
  const { dispatch } = useIntent();
1040
1018
  const handleCloseDialog = () => dispatch({
@@ -1112,103 +1090,103 @@ var SpaceMembersSection = ({ space }) => {
1112
1090
  [Presence.ONLINE]: [],
1113
1091
  [Presence.OFFLINE]: []
1114
1092
  });
1115
- return /* @__PURE__ */ React13.createElement("section", {
1093
+ return /* @__PURE__ */ React11.createElement("section", {
1116
1094
  className: "mbe-4 col-span-3 grid gap-y-2 grid-cols-subgrid auto-rows-min"
1117
- }, /* @__PURE__ */ React13.createElement("h2", {
1095
+ }, /* @__PURE__ */ React11.createElement("h2", {
1118
1096
  className: "contents"
1119
- }, /* @__PURE__ */ React13.createElement(UsersThree, {
1097
+ }, /* @__PURE__ */ React11.createElement(UsersThree, {
1120
1098
  weight: "duotone",
1121
- className: mx7(getSize3(5), "place-self-center")
1122
- }), /* @__PURE__ */ React13.createElement("span", {
1099
+ className: mx5(getSize3(5), "place-self-center")
1100
+ }), /* @__PURE__ */ React11.createElement("span", {
1123
1101
  className: "text-lg col-span-2"
1124
- }, t("space members label"))), /* @__PURE__ */ React13.createElement("h3", {
1102
+ }, t("space members label"))), /* @__PURE__ */ React11.createElement("h3", {
1125
1103
  className: "col-start-2 col-span-3 text-sm italic text-description"
1126
- }, t("invitations heading")), invitations.length > 0 && /* @__PURE__ */ React13.createElement(List, {
1104
+ }, t("invitations heading")), invitations.length > 0 && /* @__PURE__ */ React11.createElement(List, {
1127
1105
  classNames: "col-start-2 col-span-2 gap-y-2 grid grid-cols-[var(--rail-size)_1fr_var(--rail-action)_var(--rail-action)]"
1128
- }, invitations.map((invitation) => /* @__PURE__ */ React13.createElement(InvitationListItem, {
1106
+ }, invitations.map((invitation) => /* @__PURE__ */ React11.createElement(InvitationListItem, {
1129
1107
  reverseEffects: true,
1130
1108
  classNames: "pis-0 pie-0 gap-0 col-span-4 grid grid-cols-subgrid",
1131
1109
  key: invitation.get().invitationId,
1132
1110
  invitation,
1133
1111
  send: handleInvitationSelect,
1134
1112
  createInvitationUrl: handleCreateInvitationUrl
1135
- }))), /* @__PURE__ */ React13.createElement(ButtonGroup, {
1113
+ }))), /* @__PURE__ */ React11.createElement(ButtonGroup, {
1136
1114
  classNames: "col-start-2 col-end-4 grid grid-cols-[1fr_var(--rail-action)] place-self-grow gap-px"
1137
- }, /* @__PURE__ */ React13.createElement(Button5, {
1115
+ }, /* @__PURE__ */ React11.createElement(Button5, {
1138
1116
  classNames: "gap-2",
1139
1117
  onClick: activeAction.onClick
1140
- }, /* @__PURE__ */ React13.createElement(activeAction.icon, {
1118
+ }, /* @__PURE__ */ React11.createElement(activeAction.icon, {
1141
1119
  className: getSize3(5)
1142
- }), /* @__PURE__ */ React13.createElement("span", null, t(activeAction.label, {
1120
+ }), /* @__PURE__ */ React11.createElement("span", null, t(activeAction.label, {
1143
1121
  ns: "os"
1144
- }))), /* @__PURE__ */ React13.createElement(DropdownMenu2.Root, null, /* @__PURE__ */ React13.createElement(DropdownMenu2.Trigger, {
1122
+ }))), /* @__PURE__ */ React11.createElement(DropdownMenu2.Root, null, /* @__PURE__ */ React11.createElement(DropdownMenu2.Trigger, {
1145
1123
  asChild: true
1146
- }, /* @__PURE__ */ React13.createElement(Button5, {
1124
+ }, /* @__PURE__ */ React11.createElement(Button5, {
1147
1125
  classNames: "pli-0"
1148
- }, /* @__PURE__ */ React13.createElement(CaretDown, {
1126
+ }, /* @__PURE__ */ React11.createElement(CaretDown, {
1149
1127
  className: getSize3(4)
1150
- }))), /* @__PURE__ */ React13.createElement(DropdownMenu2.Content, null, /* @__PURE__ */ React13.createElement(DropdownMenu2.Viewport, null, Object.entries(inviteActions).map(([id, action]) => {
1151
- return /* @__PURE__ */ React13.createElement(DropdownMenu2.CheckboxItem, {
1128
+ }))), /* @__PURE__ */ React11.createElement(DropdownMenu2.Content, null, /* @__PURE__ */ React11.createElement(DropdownMenu2.Viewport, null, Object.entries(inviteActions).map(([id, action]) => {
1129
+ return /* @__PURE__ */ React11.createElement(DropdownMenu2.CheckboxItem, {
1152
1130
  key: id,
1153
1131
  "aria-labelledby": `${id}__label`,
1154
1132
  "aria-describedby": `${id}__description`,
1155
1133
  checked: activeActionKey === id,
1156
1134
  onCheckedChange: (checked) => checked && setActiveActionKey(id),
1157
1135
  classNames: "gap-2"
1158
- }, action.icon && /* @__PURE__ */ React13.createElement(action.icon, {
1136
+ }, action.icon && /* @__PURE__ */ React11.createElement(action.icon, {
1159
1137
  className: getSize3(5)
1160
- }), /* @__PURE__ */ React13.createElement("div", {
1138
+ }), /* @__PURE__ */ React11.createElement("div", {
1161
1139
  role: "none",
1162
1140
  className: "flex-1 min-is-0 space-b-1"
1163
- }, /* @__PURE__ */ React13.createElement("p", {
1141
+ }, /* @__PURE__ */ React11.createElement("p", {
1164
1142
  id: `${id}__label`
1165
1143
  }, t(action.label, {
1166
1144
  ns: "os"
1167
- })), action.description && /* @__PURE__ */ React13.createElement("p", {
1145
+ })), action.description && /* @__PURE__ */ React11.createElement("p", {
1168
1146
  id: `${id}__description`,
1169
- className: descriptionText5
1147
+ className: descriptionText3
1170
1148
  }, t(action.description, {
1171
1149
  ns: "os"
1172
- }))), /* @__PURE__ */ React13.createElement(DropdownMenu2.ItemIndicator, {
1150
+ }))), /* @__PURE__ */ React11.createElement(DropdownMenu2.ItemIndicator, {
1173
1151
  asChild: true
1174
- }, /* @__PURE__ */ React13.createElement(Check, {
1152
+ }, /* @__PURE__ */ React11.createElement(Check, {
1175
1153
  className: getSize3(4)
1176
1154
  })));
1177
- })), /* @__PURE__ */ React13.createElement(DropdownMenu2.Arrow, null)))), members[Presence.ONLINE].length + members[Presence.OFFLINE].length < 1 ? /* @__PURE__ */ React13.createElement("p", {
1178
- className: mx7(descriptionText5, "text-center is-full mlb-2")
1155
+ })), /* @__PURE__ */ React11.createElement(DropdownMenu2.Arrow, null)))), members[Presence.ONLINE].length + members[Presence.OFFLINE].length < 1 ? /* @__PURE__ */ React11.createElement("p", {
1156
+ className: mx5(descriptionText3, "text-center is-full mlb-2")
1179
1157
  }, t("empty space members message", {
1180
1158
  ns: "os"
1181
- })) : /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement("h3", {
1159
+ })) : /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement("h3", {
1182
1160
  className: "col-start-2 col-end-5 text-sm italic text-description"
1183
1161
  }, t("active space members heading", {
1184
1162
  count: members[Presence.ONLINE].length
1185
- })), /* @__PURE__ */ React13.createElement(SpaceMemberList, {
1163
+ })), /* @__PURE__ */ React11.createElement(SpaceMemberList, {
1186
1164
  members: members[Presence.ONLINE]
1187
- }), /* @__PURE__ */ React13.createElement("h3", {
1165
+ }), /* @__PURE__ */ React11.createElement("h3", {
1188
1166
  className: "col-start-2 col-end-5 text-sm italic text-description"
1189
1167
  }, t("inactive space members heading", {
1190
1168
  count: members[Presence.OFFLINE].length
1191
- })), /* @__PURE__ */ React13.createElement(SpaceMemberList, {
1169
+ })), /* @__PURE__ */ React11.createElement(SpaceMemberList, {
1192
1170
  members: members[Presence.OFFLINE]
1193
1171
  })));
1194
1172
  };
1195
1173
 
1196
1174
  // packages/plugins/plugin-space/src/components/SpaceMain/SpaceMain.tsx
1197
1175
  var KeyShortcuts = () => {
1198
- const { t } = useTranslation13(SPACE_PLUGIN);
1199
- return /* @__PURE__ */ React14.createElement("section", {
1176
+ const { t } = useTranslation12(SPACE_PLUGIN);
1177
+ return /* @__PURE__ */ React12.createElement("section", {
1200
1178
  className: "mbe-4 col-span-4 md:col-start-5 md:col-end-7 grid grid-cols-subgrid gap-y-2 auto-rows-min"
1201
- }, /* @__PURE__ */ React14.createElement("h2", {
1179
+ }, /* @__PURE__ */ React12.createElement("h2", {
1202
1180
  className: "contents"
1203
- }, /* @__PURE__ */ React14.createElement(Command, {
1181
+ }, /* @__PURE__ */ React12.createElement(Command, {
1204
1182
  weight: "duotone",
1205
- className: mx8(getSize4(5), "place-self-center")
1206
- }), /* @__PURE__ */ React14.createElement("span", {
1183
+ className: mx6(getSize4(5), "place-self-center")
1184
+ }), /* @__PURE__ */ React12.createElement("span", {
1207
1185
  className: "text-lg col-span-2 md:col-span-1"
1208
- }, t("keyshortcuts label"))), /* @__PURE__ */ React14.createElement("div", {
1186
+ }, t("keyshortcuts label"))), /* @__PURE__ */ React12.createElement("div", {
1209
1187
  role: "none",
1210
1188
  className: "col-start-2 col-end-4 md:col-end-5 pie-2"
1211
- }, /* @__PURE__ */ React14.createElement(Surface, {
1189
+ }, /* @__PURE__ */ React12.createElement(Surface, {
1212
1190
  role: "keyshortcuts"
1213
1191
  })));
1214
1192
  };
@@ -1217,7 +1195,7 @@ var SpaceMain = ({ space, role }) => {
1217
1195
  const state = space.state.get();
1218
1196
  const ready = state === SpaceState2.SPACE_READY;
1219
1197
  const Root = role === "main" ? Main.Content : "div";
1220
- return /* @__PURE__ */ React14.createElement(ClipboardProvider, null, /* @__PURE__ */ React14.createElement(Root, {
1198
+ return /* @__PURE__ */ React12.createElement(ClipboardProvider, null, /* @__PURE__ */ React12.createElement(Root, {
1221
1199
  ...role === "main" ? {
1222
1200
  classNames: [
1223
1201
  topbarBlockPaddingStart,
@@ -1226,23 +1204,23 @@ var SpaceMain = ({ space, role }) => {
1226
1204
  ]
1227
1205
  } : {
1228
1206
  role: "none",
1229
- className: mx8(topbarBlockPaddingStart, "row-span-2", spaceMainLayout)
1207
+ className: mx6(topbarBlockPaddingStart, "row-span-2", spaceMainLayout)
1230
1208
  },
1231
1209
  "data-testid": `spacePlugin.${role}`,
1232
1210
  "data-isready": ready ? "true" : "false"
1233
- }, ready && /* @__PURE__ */ React14.createElement(SpaceMembersSection, {
1211
+ }, ready && /* @__PURE__ */ React12.createElement(SpaceMembersSection, {
1234
1212
  space
1235
- }), /* @__PURE__ */ React14.createElement(KeyShortcuts, null)));
1213
+ }), /* @__PURE__ */ React12.createElement(KeyShortcuts, null)));
1236
1214
  };
1237
1215
 
1238
1216
  // packages/plugins/plugin-space/src/components/SpacePresence.tsx
1239
- import React15, { useCallback as useCallback4, useEffect as useEffect4, useState as useState7 } from "react";
1217
+ import React13, { useCallback as useCallback4, useEffect as useEffect4, useState as useState7 } from "react";
1240
1218
  import { usePlugin } from "@dxos/app-framework";
1241
1219
  import { generateName } from "@dxos/display-name";
1242
1220
  import { PublicKey, useClient as useClient3 } from "@dxos/react-client";
1243
1221
  import { getSpace as getSpace3, useMembers as useMembers2, fullyQualifiedId as fullyQualifiedId3 } from "@dxos/react-client/echo";
1244
1222
  import { useIdentity } from "@dxos/react-client/halo";
1245
- import { Avatar, AvatarGroup, AvatarGroupItem, Tooltip as Tooltip2, useDensityContext, useTranslation as useTranslation14, List as List2, ListItem, useDefaultValue } from "@dxos/react-ui";
1223
+ import { Avatar, AvatarGroup, AvatarGroupItem, Tooltip as Tooltip2, useDensityContext, useTranslation as useTranslation13, List as List2, ListItem, useDefaultValue } from "@dxos/react-ui";
1246
1224
  import { AttentionGlyph } from "@dxos/react-ui-attention";
1247
1225
  import { ComplexMap, keyToFallback } from "@dxos/util";
1248
1226
  var REFRESH_INTERVAL = 5e3;
@@ -1280,50 +1258,50 @@ var SpacePresence = ({ object, spaceKey }) => {
1280
1258
  lastSeen
1281
1259
  };
1282
1260
  }).toSorted((a, b) => a.lastSeen - b.lastSeen);
1283
- return density === "fine" ? /* @__PURE__ */ React15.createElement(SmallPresence, {
1261
+ return density === "fine" ? /* @__PURE__ */ React13.createElement(SmallPresence, {
1284
1262
  count: membersForObject.length
1285
- }) : /* @__PURE__ */ React15.createElement(FullPresence, {
1263
+ }) : /* @__PURE__ */ React13.createElement(FullPresence, {
1286
1264
  members: membersForObject
1287
1265
  });
1288
1266
  };
1289
1267
  var FullPresence = (props) => {
1290
1268
  const { size = 9, onMemberClick } = props;
1291
- const members = useDefaultValue(props.members, []);
1269
+ const members = useDefaultValue(props.members, () => []);
1292
1270
  if (members.length === 0) {
1293
1271
  return null;
1294
1272
  }
1295
- return /* @__PURE__ */ React15.createElement(AvatarGroup.Root, {
1273
+ return /* @__PURE__ */ React13.createElement(AvatarGroup.Root, {
1296
1274
  size,
1297
1275
  classNames: "mbs-2 mie-4",
1298
1276
  "data-testid": "spacePlugin.presence"
1299
- }, members.slice(0, 3).map((member, i) => /* @__PURE__ */ React15.createElement(Tooltip2.Root, {
1277
+ }, members.slice(0, 3).map((member, i) => /* @__PURE__ */ React13.createElement(Tooltip2.Root, {
1300
1278
  key: member.identity.identityKey.toHex()
1301
- }, /* @__PURE__ */ React15.createElement(Tooltip2.Trigger, null, /* @__PURE__ */ React15.createElement(PrensenceAvatar, {
1279
+ }, /* @__PURE__ */ React13.createElement(Tooltip2.Trigger, null, /* @__PURE__ */ React13.createElement(PrensenceAvatar, {
1302
1280
  identity: member.identity,
1303
1281
  group: true,
1304
1282
  match: member.currentlyAttended,
1305
1283
  index: members.length - i,
1306
1284
  onClick: () => onMemberClick?.(member)
1307
- })), /* @__PURE__ */ React15.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React15.createElement(Tooltip2.Content, {
1285
+ })), /* @__PURE__ */ React13.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React13.createElement(Tooltip2.Content, {
1308
1286
  side: "bottom"
1309
- }, /* @__PURE__ */ React15.createElement("span", null, getName(member.identity)), /* @__PURE__ */ React15.createElement(Tooltip2.Arrow, null))))), members.length > 3 && /* @__PURE__ */ React15.createElement(Tooltip2.Root, null, /* @__PURE__ */ React15.createElement(Tooltip2.Trigger, null, /* @__PURE__ */ React15.createElement(AvatarGroupItem.Root, {
1287
+ }, /* @__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, {
1310
1288
  status: "inactive"
1311
- }, /* @__PURE__ */ React15.createElement(Avatar.Frame, {
1289
+ }, /* @__PURE__ */ React13.createElement(Avatar.Frame, {
1312
1290
  style: {
1313
1291
  zIndex: members.length - 4
1314
1292
  }
1315
- }, /* @__PURE__ */ React15.createElement(Avatar.Fallback, {
1293
+ }, /* @__PURE__ */ React13.createElement(Avatar.Fallback, {
1316
1294
  text: `+${members.length - 3}`
1317
- })))), /* @__PURE__ */ React15.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React15.createElement(Tooltip2.Content, {
1295
+ })))), /* @__PURE__ */ React13.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React13.createElement(Tooltip2.Content, {
1318
1296
  side: "bottom"
1319
- }, /* @__PURE__ */ React15.createElement(Tooltip2.Arrow, null), /* @__PURE__ */ React15.createElement(List2, {
1297
+ }, /* @__PURE__ */ React13.createElement(Tooltip2.Arrow, null), /* @__PURE__ */ React13.createElement(List2, {
1320
1298
  classNames: "max-h-56 overflow-y-auto"
1321
- }, members.map((member) => /* @__PURE__ */ React15.createElement(ListItem.Root, {
1299
+ }, members.map((member) => /* @__PURE__ */ React13.createElement(ListItem.Root, {
1322
1300
  key: member.identity.identityKey.toHex(),
1323
1301
  classNames: "flex gap-2 items-center cursor-pointer mbe-2",
1324
1302
  onClick: () => onMemberClick?.(member),
1325
1303
  "data-testid": "identity-list-item"
1326
- }, /* @__PURE__ */ React15.createElement(PrensenceAvatar, {
1304
+ }, /* @__PURE__ */ React13.createElement(PrensenceAvatar, {
1327
1305
  identity: member.identity,
1328
1306
  showName: true,
1329
1307
  match: member.currentlyAttended
@@ -1333,10 +1311,10 @@ var PrensenceAvatar = ({ identity, showName, match, group, index, onClick }) =>
1333
1311
  const Root = group ? AvatarGroupItem.Root : Avatar.Root;
1334
1312
  const status = match ? "current" : "active";
1335
1313
  const fallbackValue = keyToFallback(identity.identityKey);
1336
- return /* @__PURE__ */ React15.createElement(Root, {
1314
+ return /* @__PURE__ */ React13.createElement(Root, {
1337
1315
  status,
1338
1316
  hue: identity.profile?.data?.hue || fallbackValue.hue
1339
- }, /* @__PURE__ */ React15.createElement(Avatar.Frame, {
1317
+ }, /* @__PURE__ */ React13.createElement(Avatar.Frame, {
1340
1318
  "data-testid": "spacePlugin.presence.member",
1341
1319
  "data-status": status,
1342
1320
  ...index ? {
@@ -1345,9 +1323,9 @@ var PrensenceAvatar = ({ identity, showName, match, group, index, onClick }) =>
1345
1323
  }
1346
1324
  } : {},
1347
1325
  onClick: () => onClick?.()
1348
- }, /* @__PURE__ */ React15.createElement(Avatar.Fallback, {
1326
+ }, /* @__PURE__ */ React13.createElement(Avatar.Fallback, {
1349
1327
  text: identity.profile?.data?.emoji || fallbackValue.emoji
1350
- })), showName && /* @__PURE__ */ React15.createElement(Avatar.Label, {
1328
+ })), showName && /* @__PURE__ */ React13.createElement(Avatar.Label, {
1351
1329
  classNames: "text-sm truncate pli-2"
1352
1330
  }, getName(identity)));
1353
1331
  };
@@ -1358,36 +1336,37 @@ var SmallPresenceLive = ({ viewers }) => {
1358
1336
  return () => clearInterval(interval);
1359
1337
  }, []);
1360
1338
  const activeViewers = viewers ? Array.from(viewers.values()).filter(({ lastSeen }) => moment - lastSeen < ACTIVITY_DURATION) : [];
1361
- return /* @__PURE__ */ React15.createElement(SmallPresence, {
1339
+ return /* @__PURE__ */ React13.createElement(SmallPresence, {
1362
1340
  count: activeViewers.length
1363
1341
  });
1364
1342
  };
1365
1343
  var SmallPresence = ({ count }) => {
1366
- const { t } = useTranslation14(SPACE_PLUGIN);
1367
- return /* @__PURE__ */ React15.createElement(Tooltip2.Root, null, /* @__PURE__ */ React15.createElement(Tooltip2.Trigger, {
1344
+ const { t } = useTranslation13(SPACE_PLUGIN);
1345
+ return /* @__PURE__ */ React13.createElement(Tooltip2.Root, null, /* @__PURE__ */ React13.createElement(Tooltip2.Trigger, {
1368
1346
  asChild: true
1369
- }, /* @__PURE__ */ React15.createElement(AttentionGlyph, {
1347
+ }, /* @__PURE__ */ React13.createElement(AttentionGlyph, {
1370
1348
  presence: count > 1 ? "many" : count === 1 ? "one" : "none",
1371
1349
  classNames: "self-center mie-1"
1372
- })), /* @__PURE__ */ React15.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React15.createElement(Tooltip2.Content, {
1350
+ })), /* @__PURE__ */ React13.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React13.createElement(Tooltip2.Content, {
1373
1351
  side: "bottom",
1374
1352
  classNames: "z-[70]"
1375
- }, /* @__PURE__ */ React15.createElement("span", null, t("presence label", {
1353
+ }, /* @__PURE__ */ React13.createElement("span", null, t("presence label", {
1376
1354
  count
1377
- })), /* @__PURE__ */ React15.createElement(Tooltip2.Arrow, null))));
1355
+ })), /* @__PURE__ */ React13.createElement(Tooltip2.Arrow, null))));
1378
1356
  };
1379
1357
 
1380
1358
  // packages/plugins/plugin-space/src/components/SpaceSettings.tsx
1381
- import React16 from "react";
1382
- import { useIntentDispatcher as useIntentDispatcher2 } from "@dxos/app-framework";
1359
+ import React14 from "react";
1360
+ import { useIntentDispatcher as useIntentDispatcher2, useResolvePlugins } from "@dxos/app-framework";
1383
1361
  import { SettingsValue } from "@dxos/plugin-settings";
1384
- import { Input as Input3, useTranslation as useTranslation15 } from "@dxos/react-ui";
1362
+ import { Input as Input4, Select, toLocalizedString as toLocalizedString2, useTranslation as useTranslation14 } from "@dxos/react-ui";
1385
1363
  var SpaceSettings = ({ settings }) => {
1386
- const { t } = useTranslation15(SPACE_PLUGIN);
1364
+ const { t } = useTranslation14(SPACE_PLUGIN);
1387
1365
  const dispatch = useIntentDispatcher2();
1388
- return /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(SettingsValue, {
1366
+ const plugins = useResolvePlugins(parseSpaceInitPlugin);
1367
+ return /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(SettingsValue, {
1389
1368
  label: t("show hidden spaces label")
1390
- }, /* @__PURE__ */ React16.createElement(Input3.Switch, {
1369
+ }, /* @__PURE__ */ React14.createElement(Input4.Switch, {
1391
1370
  checked: settings.showHidden,
1392
1371
  onCheckedChange: (checked) => dispatch({
1393
1372
  plugin: SPACE_PLUGIN,
@@ -1396,7 +1375,307 @@ var SpaceSettings = ({ settings }) => {
1396
1375
  state: !!checked
1397
1376
  }
1398
1377
  })
1399
- })));
1378
+ })), /* @__PURE__ */ React14.createElement(SettingsValue, {
1379
+ label: t("default on space create label")
1380
+ }, /* @__PURE__ */ React14.createElement(Select.Root, {
1381
+ value: settings.onSpaceCreate,
1382
+ onValueChange: (value) => {
1383
+ settings.onSpaceCreate = value;
1384
+ }
1385
+ }, /* @__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, {
1386
+ key: onSpaceCreate.action,
1387
+ value: onSpaceCreate.action
1388
+ }, toLocalizedString2(onSpaceCreate.label, t)))))))));
1389
+ };
1390
+
1391
+ // packages/plugins/plugin-space/src/components/SaveStatus.tsx
1392
+ import React15, { useEffect as useEffect5, useState as useState8 } from "react";
1393
+ import { Context } from "@dxos/context";
1394
+ import { StatusBar } from "@dxos/plugin-status-bar";
1395
+ import { useClient as useClient4 } from "@dxos/react-client";
1396
+ import { Icon, useTranslation as useTranslation15 } from "@dxos/react-ui";
1397
+ var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/SaveStatus.tsx";
1398
+ var SaveStatus = () => {
1399
+ const { t } = useTranslation15(SPACE_PLUGIN);
1400
+ const client = useClient4();
1401
+ const [state, setState] = useState8("saved");
1402
+ useEffect5(() => {
1403
+ return createClientSaveTracker(client, (state2) => {
1404
+ setState(state2);
1405
+ });
1406
+ }, []);
1407
+ return /* @__PURE__ */ React15.createElement(StatusBar.Item, {
1408
+ title: state === "saving" ? t("saving label") : t("saved label")
1409
+ }, /* @__PURE__ */ React15.createElement(Icon, {
1410
+ icon: state === "saving" ? "ph--arrows-clockwise--regular" : "ph--check-circle--regular",
1411
+ size: 4
1412
+ }));
1413
+ };
1414
+ var createClientSaveTracker = (client, cb) => {
1415
+ const unsubscribeCallbacks = {};
1416
+ const state = {};
1417
+ const install = (spaces) => {
1418
+ for (const space of spaces) {
1419
+ if (state[space.id]) {
1420
+ continue;
1421
+ }
1422
+ state[space.id] = "saved";
1423
+ unsubscribeCallbacks[space.id] = createSpaceSaveTracker(space, (s) => {
1424
+ state[space.id] = s;
1425
+ cb(Object.values(state).some((s2) => s2 === "saving") ? "saving" : "saved");
1426
+ });
1427
+ }
1428
+ };
1429
+ client.spaces.subscribe((spaces) => {
1430
+ install(spaces);
1431
+ });
1432
+ install(client.spaces.get());
1433
+ return () => {
1434
+ for (const unsubscribe of Object.values(unsubscribeCallbacks)) {
1435
+ unsubscribe();
1436
+ }
1437
+ };
1438
+ };
1439
+ var createSpaceSaveTracker = (space, cb) => {
1440
+ const ctx = new Context(void 0, {
1441
+ F: __dxlog_file3,
1442
+ L: 64
1443
+ });
1444
+ void space.waitUntilReady().then(() => {
1445
+ if (ctx.disposed) {
1446
+ return;
1447
+ }
1448
+ let hasUnsavedChanges = false;
1449
+ let lastFlushPromise;
1450
+ space.crud.saveStateChanged.on(ctx, ({ unsavedDocuments }) => {
1451
+ hasUnsavedChanges = unsavedDocuments.length > 0;
1452
+ });
1453
+ space.crud.saveStateChanged.debounce(500).on(ctx, () => {
1454
+ if (hasUnsavedChanges) {
1455
+ lastFlushPromise = void 0;
1456
+ cb("saving");
1457
+ } else {
1458
+ const flushPromise = space.crud.flush();
1459
+ lastFlushPromise = flushPromise;
1460
+ void flushPromise.then(() => {
1461
+ if (lastFlushPromise === flushPromise) {
1462
+ cb("saved");
1463
+ }
1464
+ });
1465
+ }
1466
+ });
1467
+ });
1468
+ return () => {
1469
+ void ctx.dispose();
1470
+ };
1471
+ };
1472
+
1473
+ // packages/plugins/plugin-space/src/components/SyncStatus/SyncStatus.tsx
1474
+ import React16, { useEffect as useEffect7, useState as useState10 } from "react";
1475
+ import { StatusBar as StatusBar2 } from "@dxos/plugin-status-bar";
1476
+ import { Icon as Icon2, Popover as Popover3, useTranslation as useTranslation16 } from "@dxos/react-ui";
1477
+ import { SyntaxHighlighter } from "@dxos/react-ui-syntax-highlighter";
1478
+ import { mx as mx7 } from "@dxos/react-ui-theme";
1479
+
1480
+ // packages/plugins/plugin-space/src/components/SyncStatus/types.ts
1481
+ import { useEffect as useEffect6, useState as useState9 } from "react";
1482
+ import { Context as Context2 } from "@dxos/context";
1483
+ import { EdgeService } from "@dxos/protocols";
1484
+ import { useClient as useClient5 } from "@dxos/react-client";
1485
+ var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/components/SyncStatus/types.ts";
1486
+ var createEmptyEdgeSyncState = () => ({
1487
+ missingOnLocal: 0,
1488
+ missingOnRemote: 0,
1489
+ localDocumentCount: 0,
1490
+ remoteDocumentCount: 0,
1491
+ differentDocuments: 0
1492
+ });
1493
+ var getSyncSummary = (syncMap) => {
1494
+ return Object.entries(syncMap).reduce((summary, [_spaceId, peerState]) => {
1495
+ summary.missingOnLocal += peerState.missingOnLocal;
1496
+ summary.missingOnRemote += peerState.missingOnRemote;
1497
+ summary.localDocumentCount += peerState.localDocumentCount;
1498
+ summary.remoteDocumentCount += peerState.remoteDocumentCount;
1499
+ summary.differentDocuments += peerState.differentDocuments;
1500
+ return summary;
1501
+ }, createEmptyEdgeSyncState());
1502
+ };
1503
+ var isEdgePeerId = (peerId, spaceId) => peerId.startsWith(`${EdgeService.AUTOMERGE_REPLICATOR}:${spaceId}`);
1504
+ var useSyncState = () => {
1505
+ const client = useClient5();
1506
+ const [spaceState, setSpaceState] = useState9({});
1507
+ useEffect6(() => {
1508
+ const ctx = new Context2(void 0, {
1509
+ F: __dxlog_file4,
1510
+ L: 48
1511
+ });
1512
+ const createSubscriptions = (spaces) => {
1513
+ for (const space of spaces) {
1514
+ if (spaceState[space.id]) {
1515
+ continue;
1516
+ }
1517
+ ctx.onDispose(space.crud.subscribeToSyncState(ctx, ({ peers = [] }) => {
1518
+ const syncState = peers.find((state) => isEdgePeerId(state.peerId, space.id));
1519
+ if (syncState) {
1520
+ setSpaceState((spaceState2) => ({
1521
+ ...spaceState2,
1522
+ [space.id]: syncState
1523
+ }));
1524
+ }
1525
+ }));
1526
+ }
1527
+ };
1528
+ createSubscriptions(client.spaces.get());
1529
+ client.spaces.subscribe((spaces) => {
1530
+ createSubscriptions(spaces);
1531
+ });
1532
+ return () => {
1533
+ void ctx.dispose();
1534
+ };
1535
+ }, [
1536
+ client
1537
+ ]);
1538
+ return spaceState;
1539
+ };
1540
+
1541
+ // packages/plugins/plugin-space/src/components/SyncStatus/SyncStatus.tsx
1542
+ var SYNC_STALLED_TIMEOUT = 5e3;
1543
+ var styles = {
1544
+ barBg: "bg-neutral-50 dark:bg-green-900 text-black",
1545
+ barFg: "bg-neutral-100 bg-green-500",
1546
+ barHover: "dark:hover:bg-green-500"
1547
+ };
1548
+ var SyncStatus = () => {
1549
+ const state = useSyncState();
1550
+ return /* @__PURE__ */ React16.createElement(SyncStatusIndicator, {
1551
+ state
1552
+ });
1553
+ };
1554
+ var SyncStatusIndicator = ({ state }) => {
1555
+ const summary = getSyncSummary(state);
1556
+ const offline = false;
1557
+ const needsToUpload = summary.differentDocuments > 0 || summary.missingOnRemote > 0;
1558
+ const needsToDownload = summary.differentDocuments > 0 || summary.missingOnLocal > 0;
1559
+ const [classNames, setClassNames] = useState10();
1560
+ useEffect7(() => {
1561
+ setClassNames(void 0);
1562
+ if (!needsToUpload && !needsToDownload) {
1563
+ return;
1564
+ }
1565
+ const t = setTimeout(() => {
1566
+ setClassNames("text-orange-500");
1567
+ }, SYNC_STALLED_TIMEOUT);
1568
+ return () => clearTimeout(t);
1569
+ }, [
1570
+ needsToUpload,
1571
+ needsToDownload
1572
+ ]);
1573
+ return /* @__PURE__ */ React16.createElement(StatusBar2.Item, null, /* @__PURE__ */ React16.createElement(Popover3.Root, null, /* @__PURE__ */ React16.createElement(Popover3.Trigger, null, /* @__PURE__ */ React16.createElement(Icon2, {
1574
+ icon: offline ? "ph--cloud-x--regular" : needsToUpload ? "ph--cloud-arrow-up--regular" : needsToDownload ? "ph--cloud-arrow-down--regular" : "ph--cloud-check--regular",
1575
+ size: 4,
1576
+ classNames
1577
+ })), /* @__PURE__ */ React16.createElement(Popover3.Content, null, /* @__PURE__ */ React16.createElement(SyncStatusDetail, {
1578
+ state,
1579
+ summary,
1580
+ debug: false
1581
+ }))));
1582
+ };
1583
+ var SyncStatusDetail = ({ classNames, state, summary, debug }) => {
1584
+ const { t } = useTranslation16(SPACE_PLUGIN);
1585
+ const entries = Object.entries(state).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0);
1586
+ return /* @__PURE__ */ React16.createElement("div", {
1587
+ className: mx7("flex flex-col text-xs min-w-[16rem]", classNames)
1588
+ }, /* @__PURE__ */ React16.createElement("h1", {
1589
+ className: "p-2"
1590
+ }, t("sync status title")), /* @__PURE__ */ React16.createElement("div", {
1591
+ className: "flex flex-col gap-[2px] my-[2px]"
1592
+ }, entries.map(([spaceId, state2]) => /* @__PURE__ */ React16.createElement(SpaceRow, {
1593
+ key: spaceId,
1594
+ spaceId,
1595
+ state: state2
1596
+ }))), debug && /* @__PURE__ */ React16.createElement(SyntaxHighlighter, {
1597
+ language: "json"
1598
+ }, JSON.stringify(summary, null, 2)));
1599
+ };
1600
+ var useActive = (count) => {
1601
+ const [current, setCurrent] = useState10(count);
1602
+ const [active, setActive] = useState10(false);
1603
+ useEffect7(() => {
1604
+ let t;
1605
+ if (count !== current) {
1606
+ setActive(true);
1607
+ setCurrent(count);
1608
+ t && clearTimeout(t);
1609
+ t = setTimeout(() => {
1610
+ setActive(false);
1611
+ }, SYNC_STALLED_TIMEOUT);
1612
+ }
1613
+ return () => {
1614
+ setActive(false);
1615
+ clearTimeout(t);
1616
+ };
1617
+ }, [
1618
+ count,
1619
+ current
1620
+ ]);
1621
+ return active;
1622
+ };
1623
+ var SpaceRow = ({ spaceId, state: { localDocumentCount, remoteDocumentCount, missingOnLocal, missingOnRemote } }) => {
1624
+ const downActive = useActive(localDocumentCount);
1625
+ const upActive = useActive(remoteDocumentCount);
1626
+ return /* @__PURE__ */ React16.createElement("div", {
1627
+ className: mx7("flex items-center mx-[2px] gap-[2px] cursor-pointer", styles.barHover),
1628
+ title: spaceId,
1629
+ onClick: () => {
1630
+ void navigator.clipboard.writeText(spaceId);
1631
+ }
1632
+ }, /* @__PURE__ */ React16.createElement(Icon2, {
1633
+ icon: "ph--arrow-fat-line-left--regular",
1634
+ size: 3,
1635
+ classNames: mx7(downActive && "animate-[pulse_1s_infinite]")
1636
+ }), /* @__PURE__ */ React16.createElement(Candle, {
1637
+ up: {
1638
+ count: remoteDocumentCount,
1639
+ total: remoteDocumentCount + missingOnRemote
1640
+ },
1641
+ down: {
1642
+ count: localDocumentCount,
1643
+ total: localDocumentCount + missingOnLocal
1644
+ },
1645
+ title: spaceId
1646
+ }), /* @__PURE__ */ React16.createElement(Icon2, {
1647
+ icon: "ph--arrow-fat-line-right--regular",
1648
+ size: 3,
1649
+ classNames: mx7(upActive && "animate-[pulse_1s_step-start_infinite]")
1650
+ }));
1651
+ };
1652
+ var Candle = ({ classNames, up, down }) => {
1653
+ return /* @__PURE__ */ React16.createElement("div", {
1654
+ className: mx7("grid grid-cols-[1fr_2rem_1fr] w-full h-3", classNames)
1655
+ }, /* @__PURE__ */ React16.createElement(Bar, {
1656
+ classNames: "justify-end",
1657
+ ...up
1658
+ }), /* @__PURE__ */ React16.createElement("div", {
1659
+ className: "relative"
1660
+ }, /* @__PURE__ */ React16.createElement("div", {
1661
+ className: mx7("absolute inset-0 flex items-center justify-center text-xs", styles.barBg)
1662
+ }, up.total)), /* @__PURE__ */ React16.createElement(Bar, down));
1663
+ };
1664
+ var Bar = ({ classNames, count, total }) => {
1665
+ let p = count / total * 100;
1666
+ if (count < total) {
1667
+ p = Math.min(p, 95);
1668
+ }
1669
+ return /* @__PURE__ */ React16.createElement("div", {
1670
+ className: mx7("relative flex w-full", styles.barBg, classNames)
1671
+ }, /* @__PURE__ */ React16.createElement("div", {
1672
+ className: mx7("shrink-0", styles.barFg),
1673
+ style: {
1674
+ width: `${p}%`
1675
+ }
1676
+ }), count !== total && /* @__PURE__ */ React16.createElement("div", {
1677
+ className: "absolute top-0 bottom-0 flex items-center mx-0.5 text-black text-xs"
1678
+ }, count));
1400
1679
  };
1401
1680
 
1402
1681
  // packages/plugins/plugin-space/src/translations.ts
@@ -1478,21 +1757,29 @@ var translations_default = [
1478
1757
  "space limit close label": "Close",
1479
1758
  "remove deleted objects label": "Cleanup",
1480
1759
  "remove deleted objects alt": "Permanently remove deleted objects to free up space.",
1481
- "copy link label": "Copy link"
1760
+ "copy link label": "Copy link",
1761
+ "default on space create label": "On space create",
1762
+ "sync status title": "Sync status",
1763
+ "dismiss label": "Dismiss",
1764
+ "join success label": "Successfully joined space",
1765
+ "name label": "Name",
1766
+ "name placeholder": "Name"
1482
1767
  }
1483
1768
  }
1484
1769
  }
1485
1770
  ];
1486
1771
 
1487
1772
  // packages/plugins/plugin-space/src/SpacePlugin.tsx
1488
- var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/SpacePlugin.tsx";
1773
+ var __dxlog_file5 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-space/src/SpacePlugin.tsx";
1489
1774
  var ACTIVE_NODE_BROADCAST_INTERVAL = 3e4;
1490
1775
  var OBJECT_ID_LENGTH = 60;
1491
1776
  var SPACE_MAX_OBJECTS = 500;
1492
1777
  var DIRECTORY_TYPE = "text/directory";
1493
1778
  var parseSpacePlugin = (plugin) => Array.isArray(plugin?.provides.space?.enabled) ? plugin : void 0;
1494
1779
  var SpacePlugin = ({ firstRun, onFirstRun } = {}) => {
1495
- const settings = new LocalStorageStore(SPACE_PLUGIN);
1780
+ const settings = new LocalStorageStore(SPACE_PLUGIN, {
1781
+ onSpaceCreate: "dxos.org/plugin/markdown/action/create"
1782
+ });
1496
1783
  const state = new LocalStorageStore(SPACE_PLUGIN, {
1497
1784
  awaiting: void 0,
1498
1785
  spaceNames: {},
@@ -1532,17 +1819,21 @@ var SpacePlugin = ({ firstRun, onFirstRun } = {}) => {
1532
1819
  await defaultSpace.internal.migrate();
1533
1820
  }
1534
1821
  spaces.filter((space) => space.state.get() === SpaceState3.SPACE_READY).forEach((space) => {
1535
- subscriptions.add(effect(() => {
1536
- state.values.spaceNames[space.id] = space.properties.name;
1537
- }));
1822
+ subscriptions.add(scheduledEffect(() => ({
1823
+ name: space.properties.name
1824
+ }), ({ name }) => state.values.spaceNames[space.id] = name));
1538
1825
  });
1539
1826
  }).unsubscribe);
1540
- subscriptions.add(effect(() => {
1827
+ subscriptions.add(scheduledEffect(() => ({
1828
+ ids: openIds(location.active),
1829
+ removed: location.closed ? [
1830
+ location.closed
1831
+ ].flat() : []
1832
+ }), ({ ids, removed }) => {
1541
1833
  const send = () => {
1542
1834
  const spaces = client.spaces.get();
1543
1835
  const identity = client.halo.identity.get();
1544
1836
  if (identity && location.active) {
1545
- const ids = openIds(location.active);
1546
1837
  const idsBySpace = reduceGroupBy(ids, (id) => {
1547
1838
  const [spaceId] = id.split(":");
1548
1839
  return spaceId;
@@ -1557,9 +1848,6 @@ var SpacePlugin = ({ firstRun, onFirstRun } = {}) => {
1557
1848
  if (!space) {
1558
1849
  continue;
1559
1850
  }
1560
- const removed = location.closed ? [
1561
- location.closed
1562
- ].flat() : [];
1563
1851
  void space.postMessage("viewing", {
1564
1852
  identityKey: identity.identityKey.toHex(),
1565
1853
  attended: attention.attended ? [
@@ -1572,8 +1860,8 @@ var SpacePlugin = ({ firstRun, onFirstRun } = {}) => {
1572
1860
  log2.warn("Failed to broadcast active node for presence.", {
1573
1861
  err: err.message
1574
1862
  }, {
1575
- F: __dxlog_file3,
1576
- L: 222,
1863
+ F: __dxlog_file5,
1864
+ L: 229,
1577
1865
  S: void 0,
1578
1866
  C: (f, a) => f(...a)
1579
1867
  });
@@ -1694,8 +1982,7 @@ var SpacePlugin = ({ firstRun, onFirstRun } = {}) => {
1694
1982
  ns: SPACE_PLUGIN
1695
1983
  }
1696
1984
  ],
1697
- icon: (props) => /* @__PURE__ */ React17.createElement(CardsThree2, props),
1698
- iconSymbol: "ph--cards-three--regular",
1985
+ icon: "ph--cards-three--regular",
1699
1986
  // TODO(wittjosiah): Move out of metadata.
1700
1987
  loadReferences: (collection) => loadObjectReferences(collection, (collection2) => [
1701
1988
  ...collection2.objects,
@@ -1717,7 +2004,8 @@ var SpacePlugin = ({ firstRun, onFirstRun } = {}) => {
1717
2004
  case "main":
1718
2005
  return isSpace2(primary) && primary.state.get() === SpaceState3.SPACE_READY ? /* @__PURE__ */ React17.createElement(Surface2, {
1719
2006
  data: {
1720
- active: primary.properties[CollectionType.typename]
2007
+ active: primary.properties[CollectionType.typename],
2008
+ id: primary.id
1721
2009
  },
1722
2010
  role,
1723
2011
  ...rest
@@ -1729,16 +2017,10 @@ var SpacePlugin = ({ firstRun, onFirstRun } = {}) => {
1729
2017
  } : typeof primary === "string" && primary.length === OBJECT_ID_LENGTH ? /* @__PURE__ */ React17.createElement(MissingObject, {
1730
2018
  id: primary
1731
2019
  }) : null;
1732
- // TODO(burdon): Add role name syntax to minimal plugin docs.
1733
- case "tree--empty":
1734
- switch (true) {
1735
- case data.plugin === SPACE_PLUGIN:
1736
- return /* @__PURE__ */ React17.createElement(EmptyTree, null);
1737
- case (isGraphNode(data.activeNode) && isSpace2(data.activeNode.data)):
1738
- return /* @__PURE__ */ React17.createElement(EmptySpace, null);
1739
- default:
1740
- return null;
1741
- }
2020
+ case "complementary--settings":
2021
+ return isEchoObject2(data.subject) ? /* @__PURE__ */ React17.createElement(DefaultObjectSettings, {
2022
+ object: data.subject
2023
+ }) : null;
1742
2024
  case "dialog":
1743
2025
  if (data.component === "dxos.org/plugin/space/InvitationManagerDialog") {
1744
2026
  return /* @__PURE__ */ React17.createElement(Dialog.Content, null, /* @__PURE__ */ React17.createElement(ClipboardProvider2, null, /* @__PURE__ */ React17.createElement(InvitationManager, {
@@ -1760,6 +2042,7 @@ var SpacePlugin = ({ firstRun, onFirstRun } = {}) => {
1760
2042
  });
1761
2043
  }
1762
2044
  return null;
2045
+ // TODO(burdon): Add role name syntax to minimal plugin docs.
1763
2046
  case "presence--glyph": {
1764
2047
  return isReactiveObject2(data.object) ? /* @__PURE__ */ React17.createElement(SmallPresenceLive, {
1765
2048
  viewers: state.values.viewersByObject[fullyQualifiedId4(data.object)]
@@ -1801,6 +2084,9 @@ var SpacePlugin = ({ firstRun, onFirstRun } = {}) => {
1801
2084
  object: data.object
1802
2085
  });
1803
2086
  }
2087
+ case "status": {
2088
+ return /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(SyncStatus, null), /* @__PURE__ */ React17.createElement(SaveStatus, null));
2089
+ }
1804
2090
  default:
1805
2091
  return null;
1806
2092
  }
@@ -1860,8 +2146,8 @@ var SpacePlugin = ({ firstRun, onFirstRun } = {}) => {
1860
2146
  spacesOrder.order = nextOrder.map(({ id }) => id);
1861
2147
  } else {
1862
2148
  log2.warn("spaces order object not found", void 0, {
1863
- F: __dxlog_file3,
1864
- L: 514,
2149
+ F: __dxlog_file5,
2150
+ L: 526,
1865
2151
  S: void 0,
1866
2152
  C: (f, a) => f(...a)
1867
2153
  });
@@ -1897,8 +2183,7 @@ var SpacePlugin = ({ firstRun, onFirstRun } = {}) => {
1897
2183
  ns: SPACE_PLUGIN
1898
2184
  }
1899
2185
  ],
1900
- icon: (props) => /* @__PURE__ */ React17.createElement(Plus2, props),
1901
- iconSymbol: "ph--plus--regular",
2186
+ icon: "ph--plus--regular",
1902
2187
  disposition: "toolbar",
1903
2188
  testId: "spacePlugin.createSpace"
1904
2189
  }
@@ -1923,8 +2208,7 @@ var SpacePlugin = ({ firstRun, onFirstRun } = {}) => {
1923
2208
  ns: SPACE_PLUGIN
1924
2209
  }
1925
2210
  ],
1926
- icon: (props) => /* @__PURE__ */ React17.createElement(SignIn, props),
1927
- iconSymbol: "ph--sign-in--regular",
2211
+ icon: "ph--sign-in--regular",
1928
2212
  testId: "spacePlugin.joinSpace"
1929
2213
  }
1930
2214
  }
@@ -2052,6 +2336,45 @@ var SpacePlugin = ({ firstRun, onFirstRun } = {}) => {
2052
2336
  resolve
2053
2337
  })).filter(nonNullable);
2054
2338
  }
2339
+ }),
2340
+ // Create nodes for object settings.
2341
+ createExtension({
2342
+ id: `${SPACE_PLUGIN}/settings-for-subject`,
2343
+ resolver: ({ id }) => {
2344
+ if (!id.endsWith("~settings")) {
2345
+ return;
2346
+ }
2347
+ const [subjectId] = id.split("~");
2348
+ const [spaceId, objectId] = parseFullyQualifiedId(subjectId);
2349
+ const space = client.spaces.get().find((space2) => space2.id === spaceId);
2350
+ const object = toSignal((onChange) => {
2351
+ const timeout = setTimeout(async () => {
2352
+ await space?.db.loadObjectById(objectId);
2353
+ onChange();
2354
+ });
2355
+ return () => clearTimeout(timeout);
2356
+ }, () => space?.db.getObjectById(objectId), subjectId);
2357
+ if (!object || !subjectId) {
2358
+ return;
2359
+ }
2360
+ const meta = resolve(getTypename2(object) ?? "");
2361
+ const label = meta.label?.(object) || object.name || meta.placeholder || [
2362
+ "unnamed object settings label",
2363
+ {
2364
+ ns: SPACE_PLUGIN
2365
+ }
2366
+ ];
2367
+ return {
2368
+ id,
2369
+ type: "orphan-settings-for-subject",
2370
+ data: null,
2371
+ properties: {
2372
+ icon: "ph--gear--regular",
2373
+ label,
2374
+ object
2375
+ }
2376
+ };
2377
+ }
2055
2378
  })
2056
2379
  ];
2057
2380
  },
@@ -2159,6 +2482,25 @@ var SpacePlugin = ({ firstRun, onFirstRun } = {}) => {
2159
2482
  }
2160
2483
  },
2161
2484
  intents: [
2485
+ ...settings.values.onSpaceCreate ? [
2486
+ [
2487
+ {
2488
+ action: settings.values.onSpaceCreate,
2489
+ data: {
2490
+ space
2491
+ }
2492
+ },
2493
+ {
2494
+ action: SpaceAction.ADD_OBJECT,
2495
+ data: {
2496
+ target: space
2497
+ }
2498
+ },
2499
+ {
2500
+ action: NavigationAction3.EXPOSE
2501
+ }
2502
+ ]
2503
+ ] : [],
2162
2504
  [
2163
2505
  {
2164
2506
  action: ObservabilityAction.SEND_EVENT,
@@ -2190,6 +2532,20 @@ var SpacePlugin = ({ firstRun, onFirstRun } = {}) => {
2190
2532
  }
2191
2533
  },
2192
2534
  intents: [
2535
+ [
2536
+ {
2537
+ action: LayoutAction2.SET_LAYOUT,
2538
+ data: {
2539
+ element: "toast",
2540
+ subject: {
2541
+ id: `${SPACE_PLUGIN}/join-success`,
2542
+ duration: 1e4,
2543
+ title: translations_default[0]["en-US"][SPACE_PLUGIN]["join success label"],
2544
+ closeLabel: translations_default[0]["en-US"][SPACE_PLUGIN]["dismiss label"]
2545
+ }
2546
+ }
2547
+ }
2548
+ ],
2193
2549
  [
2194
2550
  {
2195
2551
  action: ObservabilityAction.SEND_EVENT,
@@ -2379,8 +2735,7 @@ var SpacePlugin = ({ firstRun, onFirstRun } = {}) => {
2379
2735
  title: translations_default[0]["en-US"][SPACE_PLUGIN]["space limit label"],
2380
2736
  description: translations_default[0]["en-US"][SPACE_PLUGIN]["space limit description"],
2381
2737
  duration: 5e3,
2382
- icon: (props) => /* @__PURE__ */ React17.createElement(Warning2, props),
2383
- iconSymbol: "ph--warning--regular",
2738
+ icon: "ph--warning--regular",
2384
2739
  actionLabel: translations_default[0]["en-US"][SPACE_PLUGIN]["remove deleted objects label"],
2385
2740
  actionAlt: translations_default[0]["en-US"][SPACE_PLUGIN]["remove deleted objects alt"],
2386
2741
  // TODO(wittjosiah): Use OS namespace.
@@ -2422,7 +2777,7 @@ var SpacePlugin = ({ firstRun, onFirstRun } = {}) => {
2422
2777
  }
2423
2778
  return {
2424
2779
  data: {
2425
- id: object.id,
2780
+ id: fullyQualifiedId4(object),
2426
2781
  object,
2427
2782
  activeParts: {
2428
2783
  main: [
@@ -2475,8 +2830,7 @@ var SpacePlugin = ({ firstRun, onFirstRun } = {}) => {
2475
2830
  data: {
2476
2831
  activeParts: {
2477
2832
  main: deletionData.wasActive,
2478
- sidebar: deletionData.wasActive,
2479
- complementary: deletionData.wasActive
2833
+ sidebar: deletionData.wasActive
2480
2834
  }
2481
2835
  }
2482
2836
  });
@@ -2596,10 +2950,10 @@ export {
2596
2950
  CollectionSection,
2597
2951
  CollectionType,
2598
2952
  ContactType,
2599
- EmptySpace,
2600
- EmptyTree,
2953
+ DefaultObjectSettings,
2601
2954
  FullPresence,
2602
2955
  MenuFooter,
2956
+ MessageState,
2603
2957
  MessageType,
2604
2958
  MissingObject,
2605
2959
  PersistenceStatus,
@@ -2611,6 +2965,7 @@ export {
2611
2965
  SPACE_PLUGIN,
2612
2966
  SPACE_PLUGIN_SHORT_ID,
2613
2967
  SPACE_TYPE,
2968
+ SaveStatus,
2614
2969
  ShareSpaceButton,
2615
2970
  ShareSpaceButtonImpl,
2616
2971
  SmallPresence,
@@ -2620,6 +2975,9 @@ export {
2620
2975
  SpacePlugin,
2621
2976
  SpacePresence,
2622
2977
  SpaceSettings,
2978
+ SyncStatus,
2979
+ SyncStatusDetail,
2980
+ SyncStatusIndicator,
2623
2981
  ThreadStatus,
2624
2982
  ThreadType,
2625
2983
  cloneObject,
@@ -2634,6 +2992,7 @@ export {
2634
2992
  getNestedObjects,
2635
2993
  getSpaceDisplayName,
2636
2994
  memoizeQuery,
2995
+ parseSpaceInitPlugin,
2637
2996
  parseSpacePlugin,
2638
2997
  translations_default as translations
2639
2998
  };