@dxos/plugin-space 0.8.4-main.67995b8 → 0.8.4-main.a4bbb77
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.
- package/dist/lib/browser/{CollectionMain-D2B75XBS.mjs → CollectionMain-AX7KKXWP.mjs} +4 -4
- package/dist/lib/browser/CollectionMain-AX7KKXWP.mjs.map +7 -0
- package/dist/lib/browser/{ObjectDetailsPanel-YPTDQKMG.mjs → ObjectDetailsPanel-ETI5YBTH.mjs} +10 -8
- package/dist/lib/browser/ObjectDetailsPanel-ETI5YBTH.mjs.map +7 -0
- package/dist/lib/browser/RecordMain-TEBGAVSL.mjs +68 -0
- package/dist/lib/browser/RecordMain-TEBGAVSL.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-builder-V3MP3CDK.mjs → app-graph-builder-W7RVDAUA.mjs} +80 -43
- package/dist/lib/browser/app-graph-builder-W7RVDAUA.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-serializer-H6AW7KGS.mjs → app-graph-serializer-VLHVTDX4.mjs} +14 -14
- package/dist/lib/browser/app-graph-serializer-VLHVTDX4.mjs.map +7 -0
- package/dist/lib/browser/{chunk-FBJEXW54.mjs → chunk-2BFVC5K6.mjs} +139 -150
- package/dist/lib/browser/chunk-2BFVC5K6.mjs.map +7 -0
- package/dist/lib/browser/chunk-E2I747A7.mjs +20 -0
- package/dist/lib/browser/chunk-E2I747A7.mjs.map +7 -0
- package/dist/lib/browser/chunk-EIXZABXD.mjs +19 -0
- package/dist/lib/browser/chunk-EIXZABXD.mjs.map +7 -0
- package/dist/lib/browser/{chunk-VLBRSGJ2.mjs → chunk-ELJDGQTO.mjs} +3 -3
- package/dist/lib/browser/{chunk-VLBRSGJ2.mjs.map → chunk-ELJDGQTO.mjs.map} +3 -3
- package/dist/lib/browser/chunk-IRKDREHY.mjs +11 -0
- package/dist/lib/browser/chunk-IRKDREHY.mjs.map +7 -0
- package/dist/lib/browser/{chunk-SGTQ52SU.mjs → chunk-JCHSUOPF.mjs} +14 -8
- package/dist/lib/browser/chunk-JCHSUOPF.mjs.map +7 -0
- package/dist/lib/browser/{chunk-XUYKJUU7.mjs → chunk-PN27K4I7.mjs} +93 -41
- package/dist/lib/browser/chunk-PN27K4I7.mjs.map +7 -0
- package/dist/lib/browser/{chunk-QACNNDOT.mjs → chunk-ZIZ2JLW6.mjs} +10 -9
- package/dist/lib/browser/chunk-ZIZ2JLW6.mjs.map +7 -0
- package/dist/lib/browser/{identity-created-23XJJV2N.mjs → identity-created-PW2BA46S.mjs} +4 -4
- package/dist/lib/browser/{identity-created-23XJJV2N.mjs.map → identity-created-PW2BA46S.mjs.map} +3 -3
- package/dist/lib/browser/index.mjs +19 -39
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-XHGD73WZ.mjs → intent-resolver-HA7DPAUE.mjs} +46 -41
- package/dist/lib/browser/intent-resolver-HA7DPAUE.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-CMWOGJG5.mjs → react-root-YQUJU64P.mjs} +11 -11
- package/dist/lib/browser/react-root-YQUJU64P.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-YWZZQF7H.mjs → react-surface-HTXYMRSW.mjs} +50 -40
- package/dist/lib/browser/react-surface-HTXYMRSW.mjs.map +7 -0
- package/dist/lib/browser/{schema-defs-Z6FC4AHC.mjs → schema-defs-R56ZDBZ7.mjs} +5 -5
- package/dist/lib/browser/schema-defs-R56ZDBZ7.mjs.map +7 -0
- package/dist/lib/browser/{settings-4IMP5RYT.mjs → settings-5XPQMSPO.mjs} +5 -5
- package/dist/lib/browser/{settings-4IMP5RYT.mjs.map → settings-5XPQMSPO.mjs.map} +1 -1
- package/dist/lib/browser/{spaces-ready-TOPG6IV4.mjs → spaces-ready-YY77ANIF.mjs} +17 -15
- package/dist/lib/browser/spaces-ready-YY77ANIF.mjs.map +7 -0
- package/dist/lib/browser/{state-QYZAB45H.mjs → state-Y4RVCG4A.mjs} +7 -7
- package/dist/lib/browser/state-Y4RVCG4A.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +2 -2
- package/dist/lib/node-esm/{CollectionMain-ZJIFCWKZ.mjs → CollectionMain-EU57SRYK.mjs} +4 -4
- package/dist/lib/node-esm/CollectionMain-EU57SRYK.mjs.map +7 -0
- package/dist/lib/node-esm/{ObjectDetailsPanel-QKZEDSZK.mjs → ObjectDetailsPanel-TQ5GN4QJ.mjs} +10 -8
- package/dist/lib/node-esm/ObjectDetailsPanel-TQ5GN4QJ.mjs.map +7 -0
- package/dist/lib/node-esm/RecordMain-WLYJMYER.mjs +70 -0
- package/dist/lib/node-esm/RecordMain-WLYJMYER.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-builder-SG4VECBB.mjs → app-graph-builder-5ZJJUMQI.mjs} +80 -43
- package/dist/lib/node-esm/app-graph-builder-5ZJJUMQI.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-serializer-2ICUGQQT.mjs → app-graph-serializer-EZJSGJUT.mjs} +14 -14
- package/dist/lib/node-esm/app-graph-serializer-EZJSGJUT.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-P442DOQ3.mjs → chunk-5XRYHWL7.mjs} +10 -9
- package/dist/lib/node-esm/chunk-5XRYHWL7.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-JH6F4C3I.mjs → chunk-6WNZW6KT.mjs} +14 -8
- package/dist/lib/node-esm/chunk-6WNZW6KT.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-2A3VBXBP.mjs → chunk-BLPXWPLB.mjs} +139 -150
- package/dist/lib/node-esm/chunk-BLPXWPLB.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-IJVBBVCL.mjs +21 -0
- package/dist/lib/node-esm/chunk-IJVBBVCL.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-HWNG4MEU.mjs → chunk-MWNATOXL.mjs} +2 -4
- package/dist/lib/node-esm/chunk-MWNATOXL.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-SSLBYZEY.mjs → chunk-Q6AAQLQG.mjs} +3 -3
- package/dist/lib/node-esm/{chunk-SSLBYZEY.mjs.map → chunk-Q6AAQLQG.mjs.map} +3 -3
- package/dist/lib/node-esm/chunk-SVFKU7EW.mjs +20 -0
- package/dist/lib/node-esm/chunk-SVFKU7EW.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-4AOMYKDE.mjs → chunk-XDQXUZMK.mjs} +93 -41
- package/dist/lib/node-esm/chunk-XDQXUZMK.mjs.map +7 -0
- package/dist/lib/node-esm/{identity-created-IJQO6GCR.mjs → identity-created-MWTLGQRU.mjs} +4 -4
- package/dist/lib/node-esm/{identity-created-IJQO6GCR.mjs.map → identity-created-MWTLGQRU.mjs.map} +3 -3
- package/dist/lib/node-esm/index.mjs +19 -39
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-LEANKSKZ.mjs → intent-resolver-LQNHMPIX.mjs} +46 -41
- package/dist/lib/node-esm/intent-resolver-LQNHMPIX.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-root-5Y7LJRX6.mjs → react-root-UTLJEIKE.mjs} +11 -11
- package/dist/lib/node-esm/react-root-UTLJEIKE.mjs.map +7 -0
- package/dist/lib/node-esm/{react-surface-YQFNIKYT.mjs → react-surface-LYDYON3U.mjs} +50 -40
- package/dist/lib/node-esm/react-surface-LYDYON3U.mjs.map +7 -0
- package/dist/lib/node-esm/{schema-defs-WHJM7UZE.mjs → schema-defs-7IMJPIWS.mjs} +5 -5
- package/dist/lib/node-esm/schema-defs-7IMJPIWS.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-SAOBPND3.mjs → settings-XBSK5KHH.mjs} +5 -5
- package/dist/lib/node-esm/{settings-SAOBPND3.mjs.map → settings-XBSK5KHH.mjs.map} +1 -1
- package/dist/lib/node-esm/{spaces-ready-HIUKNDZK.mjs → spaces-ready-YX4IHT4P.mjs} +17 -15
- package/dist/lib/node-esm/spaces-ready-YX4IHT4P.mjs.map +7 -0
- package/dist/lib/node-esm/{state-ZVEHQ4BJ.mjs → state-HOHAVPUO.mjs} +7 -7
- package/dist/lib/node-esm/state-HOHAVPUO.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +2 -2
- package/dist/types/src/SpacePlugin.d.ts +1 -1
- package/dist/types/src/SpacePlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-serializer.d.ts +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts +3 -3
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/identity-created.d.ts +1 -1
- package/dist/types/src/capabilities/identity-created.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +11 -12
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-root.d.ts +2 -2
- package/dist/types/src/capabilities/react-root.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/schema-defs.d.ts +1 -1
- package/dist/types/src/capabilities/schema-defs.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +1 -1
- package/dist/types/src/capabilities/spaces-ready.d.ts +1 -1
- package/dist/types/src/capabilities/spaces-ready.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts +1 -1
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts +3 -3
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts +1584 -4
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts +5 -3
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateSpaceDialog.d.ts +1 -1
- package/dist/types/src/components/CreateDialog/CreateSpaceDialog.d.ts.map +1 -1
- package/dist/types/src/components/JoinDialog.d.ts +1 -1
- package/dist/types/src/components/JoinDialog.d.ts.map +1 -1
- package/dist/types/src/components/MembersContainer.d.ts +3 -2
- package/dist/types/src/components/MembersContainer.d.ts.map +1 -1
- package/dist/types/src/components/MembersContainer.stories.d.ts +1584 -5
- package/dist/types/src/components/MembersContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/ObjectDetailsPanel.d.ts.map +1 -1
- package/dist/types/src/components/ObjectSettings/AdvancedObjectSettings.d.ts.map +1 -1
- package/dist/types/src/components/ObjectSettings/ObjectSettingsContainer.d.ts.map +1 -1
- package/dist/types/src/components/PopoverRenameObject.d.ts +2 -2
- package/dist/types/src/components/PopoverRenameObject.d.ts.map +1 -1
- package/dist/types/src/components/PopoverRenameSpace.d.ts +1 -1
- package/dist/types/src/components/PopoverRenameSpace.d.ts.map +1 -1
- package/dist/types/src/components/RecordMain.d.ts +7 -0
- package/dist/types/src/components/RecordMain.d.ts.map +1 -0
- package/dist/types/src/components/SpacePluginSettings.d.ts.map +1 -1
- package/dist/types/src/components/SpacePresence.d.ts.map +1 -1
- package/dist/types/src/components/SpacePresence.stories.d.ts +1412 -4
- package/dist/types/src/components/SpacePresence.stories.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts +1417 -4
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/SyncStatus.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts +1418 -5
- package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts.map +1 -1
- package/dist/types/src/components/ViewEditor.d.ts +1 -1
- package/dist/types/src/components/ViewEditor.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +8 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/events.d.ts.map +1 -1
- package/dist/types/src/hooks/useActiveSpace.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +0 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +1216 -26
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +73 -93
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +8 -6
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +63 -62
- package/src/SpacePlugin.ts +203 -218
- package/src/capabilities/app-graph-builder.ts +100 -53
- package/src/capabilities/app-graph-serializer.ts +7 -7
- package/src/capabilities/capabilities.ts +11 -10
- package/src/capabilities/identity-created.ts +1 -1
- package/src/capabilities/index.ts +0 -1
- package/src/capabilities/intent-resolver.ts +36 -24
- package/src/capabilities/react-root.tsx +4 -3
- package/src/capabilities/react-surface.tsx +45 -36
- package/src/capabilities/schema-defs.ts +3 -2
- package/src/capabilities/spaces-ready.ts +10 -7
- package/src/capabilities/state.ts +5 -4
- package/src/components/AwaitingObject.tsx +3 -3
- package/src/components/CollectionMain.tsx +2 -2
- package/src/components/CollectionSection.tsx +2 -2
- package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +11 -10
- package/src/components/CreateDialog/CreateObjectDialog.tsx +21 -11
- package/src/components/CreateDialog/CreateObjectPanel.tsx +22 -11
- package/src/components/CreateDialog/CreateSpaceDialog.tsx +4 -4
- package/src/components/JoinDialog.tsx +7 -7
- package/src/components/MembersContainer.stories.tsx +36 -10
- package/src/components/MembersContainer.tsx +12 -13
- package/src/components/MenuFooter.tsx +2 -2
- package/src/components/ObjectDetailsPanel.tsx +6 -4
- package/src/components/ObjectSettings/AdvancedObjectSettings.tsx +3 -2
- package/src/components/ObjectSettings/ForeignKeys.tsx +2 -2
- package/src/components/ObjectSettings/ObjectSettingsContainer.tsx +3 -2
- package/src/components/PersistenceStatus.tsx +2 -2
- package/src/components/PopoverRenameObject.tsx +9 -15
- package/src/components/PopoverRenameSpace.tsx +4 -4
- package/src/components/RecordMain.tsx +43 -0
- package/src/components/SchemaContainer.tsx +4 -4
- package/src/components/SpacePluginSettings.tsx +8 -9
- package/src/components/SpacePresence.stories.tsx +23 -22
- package/src/components/SpacePresence.tsx +9 -9
- package/src/components/SpaceSettings/SpaceSettingsContainer.stories.tsx +17 -9
- package/src/components/SpaceSettings/SpaceSettingsContainer.tsx +17 -17
- package/src/components/SyncStatus/InlineSyncStatus.tsx +2 -2
- package/src/components/SyncStatus/SyncStatus.stories.tsx +6 -7
- package/src/components/SyncStatus/SyncStatus.tsx +4 -3
- package/src/components/ViewEditor.tsx +13 -18
- package/src/components/index.ts +1 -0
- package/src/events.ts +7 -7
- package/src/hooks/useActiveSpace.ts +2 -2
- package/src/hooks/useInputSurfaceLookup.tsx +1 -1
- package/src/meta.ts +1 -3
- package/src/translations.ts +8 -7
- package/src/types/types.ts +15 -10
- package/src/util.tsx +86 -37
- package/dist/lib/browser/CollectionMain-D2B75XBS.mjs.map +0 -7
- package/dist/lib/browser/ObjectDetailsPanel-YPTDQKMG.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-V3MP3CDK.mjs.map +0 -7
- package/dist/lib/browser/app-graph-serializer-H6AW7KGS.mjs.map +0 -7
- package/dist/lib/browser/chunk-CEFHNVU7.mjs +0 -20
- package/dist/lib/browser/chunk-CEFHNVU7.mjs.map +0 -7
- package/dist/lib/browser/chunk-FBCGT5YY.mjs +0 -13
- package/dist/lib/browser/chunk-FBCGT5YY.mjs.map +0 -7
- package/dist/lib/browser/chunk-FBJEXW54.mjs.map +0 -7
- package/dist/lib/browser/chunk-JS3MMC42.mjs +0 -19
- package/dist/lib/browser/chunk-JS3MMC42.mjs.map +0 -7
- package/dist/lib/browser/chunk-QACNNDOT.mjs.map +0 -7
- package/dist/lib/browser/chunk-SGTQ52SU.mjs.map +0 -7
- package/dist/lib/browser/chunk-XUYKJUU7.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-XHGD73WZ.mjs.map +0 -7
- package/dist/lib/browser/react-root-CMWOGJG5.mjs.map +0 -7
- package/dist/lib/browser/react-surface-YWZZQF7H.mjs.map +0 -7
- package/dist/lib/browser/schema-defs-Z6FC4AHC.mjs.map +0 -7
- package/dist/lib/browser/schema-tools-BNP4JTD7.mjs +0 -124
- package/dist/lib/browser/schema-tools-BNP4JTD7.mjs.map +0 -7
- package/dist/lib/browser/spaces-ready-TOPG6IV4.mjs.map +0 -7
- package/dist/lib/browser/state-QYZAB45H.mjs.map +0 -7
- package/dist/lib/node-esm/CollectionMain-ZJIFCWKZ.mjs.map +0 -7
- package/dist/lib/node-esm/ObjectDetailsPanel-QKZEDSZK.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-SG4VECBB.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-serializer-2ICUGQQT.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2A3VBXBP.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-4AOMYKDE.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-5HHYE264.mjs +0 -20
- package/dist/lib/node-esm/chunk-5HHYE264.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-5T3ZH23B.mjs +0 -21
- package/dist/lib/node-esm/chunk-5T3ZH23B.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HWNG4MEU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JH6F4C3I.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-P442DOQ3.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-LEANKSKZ.mjs.map +0 -7
- package/dist/lib/node-esm/react-root-5Y7LJRX6.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-YQFNIKYT.mjs.map +0 -7
- package/dist/lib/node-esm/schema-defs-WHJM7UZE.mjs.map +0 -7
- package/dist/lib/node-esm/schema-tools-KWW5PTML.mjs +0 -126
- package/dist/lib/node-esm/schema-tools-KWW5PTML.mjs.map +0 -7
- package/dist/lib/node-esm/spaces-ready-HIUKNDZK.mjs.map +0 -7
- package/dist/lib/node-esm/state-ZVEHQ4BJ.mjs.map +0 -7
- package/dist/types/src/capabilities/schema-tool.test.d.ts +0 -2
- package/dist/types/src/capabilities/schema-tool.test.d.ts.map +0 -1
- package/dist/types/src/capabilities/schema-tools.d.ts +0 -13
- package/dist/types/src/capabilities/schema-tools.d.ts.map +0 -1
- package/src/capabilities/schema-tool.test.ts +0 -44
- package/src/capabilities/schema-tools.ts +0 -125
|
@@ -9,27 +9,27 @@ import { useAppGraph, useCapability } from '@dxos/app-framework';
|
|
|
9
9
|
import { generateName } from '@dxos/display-name';
|
|
10
10
|
import { type Type } from '@dxos/echo';
|
|
11
11
|
import { PublicKey, useClient } from '@dxos/react-client';
|
|
12
|
-
import {
|
|
12
|
+
import { type SpaceMember, fullyQualifiedId, getSpace, useMembers } from '@dxos/react-client/echo';
|
|
13
13
|
import { type Identity, useIdentity } from '@dxos/react-client/halo';
|
|
14
14
|
import {
|
|
15
15
|
Avatar,
|
|
16
16
|
type AvatarContentProps,
|
|
17
|
+
type DxAvatar,
|
|
18
|
+
List,
|
|
19
|
+
ListItem,
|
|
20
|
+
Popover,
|
|
17
21
|
type Size,
|
|
18
22
|
type ThemedClassName,
|
|
19
23
|
Tooltip,
|
|
20
|
-
Popover,
|
|
21
|
-
useTranslation,
|
|
22
|
-
List,
|
|
23
|
-
ListItem,
|
|
24
24
|
useDefaultValue,
|
|
25
|
-
|
|
25
|
+
useTranslation,
|
|
26
26
|
} from '@dxos/react-ui';
|
|
27
|
-
import { AttentionGlyph, useAttended, useAttention
|
|
27
|
+
import { AttentionGlyph, type AttentionGlyphProps, useAttended, useAttention } from '@dxos/react-ui-attention';
|
|
28
28
|
import { ComplexMap, keyToFallback } from '@dxos/util';
|
|
29
29
|
|
|
30
30
|
import { SpaceCapabilities } from '../capabilities';
|
|
31
31
|
import { usePath } from '../hooks';
|
|
32
|
-
import {
|
|
32
|
+
import { meta } from '../meta';
|
|
33
33
|
import type { ObjectViewerProps } from '../types';
|
|
34
34
|
|
|
35
35
|
// TODO(thure): Get/derive these values from protocol
|
|
@@ -254,7 +254,7 @@ export type SmallPresenceProps = {
|
|
|
254
254
|
} & Pick<AttentionGlyphProps, 'attended' | 'containsAttended'>;
|
|
255
255
|
|
|
256
256
|
export const SmallPresence = ({ count = 0, attended, containsAttended }: SmallPresenceProps) => {
|
|
257
|
-
const { t } = useTranslation(
|
|
257
|
+
const { t } = useTranslation(meta.id);
|
|
258
258
|
|
|
259
259
|
return (
|
|
260
260
|
<Tooltip.Trigger asChild content={t('presence label', { count })} side='bottom'>
|
|
@@ -2,37 +2,45 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
import React from 'react';
|
|
9
7
|
|
|
8
|
+
import { IntentPlugin } from '@dxos/app-framework';
|
|
9
|
+
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
10
|
import { useClientProvider, withClientProvider } from '@dxos/react-client/testing';
|
|
11
|
-
import { withTheme } from '@dxos/
|
|
11
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
12
12
|
|
|
13
|
-
import { SpaceSettingsContainer, type SpaceSettingsContainerProps } from './SpaceSettingsContainer';
|
|
14
13
|
import { translations } from '../../translations';
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
import { SpaceSettingsContainer, type SpaceSettingsContainerProps } from './SpaceSettingsContainer';
|
|
16
|
+
|
|
17
|
+
const Story = (props: Partial<SpaceSettingsContainerProps>) => {
|
|
17
18
|
const { space } = useClientProvider();
|
|
18
19
|
return (
|
|
19
20
|
<div role='none' className='p-2 border border-primary-500 rounded'>
|
|
20
|
-
<SpaceSettingsContainer {...
|
|
21
|
+
<SpaceSettingsContainer {...props} space={space!} />
|
|
21
22
|
</div>
|
|
22
23
|
);
|
|
23
24
|
};
|
|
24
25
|
|
|
25
|
-
const meta
|
|
26
|
+
const meta = {
|
|
26
27
|
title: 'plugins/plugin-space/SpaceSettingsContainer',
|
|
27
28
|
component: SpaceSettingsContainer,
|
|
28
29
|
render: Story,
|
|
29
|
-
decorators: [
|
|
30
|
+
decorators: [
|
|
31
|
+
withTheme,
|
|
32
|
+
withClientProvider({ createIdentity: true, createSpace: true }),
|
|
33
|
+
// TODO(wittjosiah): Try to write story which does not depend on plugin manager.
|
|
34
|
+
withPluginManager({ plugins: [IntentPlugin()] }),
|
|
35
|
+
],
|
|
30
36
|
parameters: {
|
|
31
37
|
translations,
|
|
32
38
|
layout: 'centered',
|
|
33
39
|
},
|
|
34
|
-
}
|
|
40
|
+
} satisfies Meta<typeof SpaceSettingsContainer>;
|
|
35
41
|
|
|
36
42
|
export default meta;
|
|
37
43
|
|
|
44
|
+
type Story = StoryObj<typeof meta>;
|
|
45
|
+
|
|
38
46
|
export const Default: StoryObj<typeof SpaceSettingsContainer> = {};
|
|
@@ -2,27 +2,27 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Schema, pipe } from 'effect';
|
|
6
6
|
import React, { type ChangeEvent, useCallback, useMemo, useState } from 'react';
|
|
7
7
|
|
|
8
|
-
import { chain, createIntent,
|
|
8
|
+
import { LayoutAction, chain, createIntent, useIntentDispatcher } from '@dxos/app-framework';
|
|
9
9
|
import { log } from '@dxos/log';
|
|
10
10
|
import { EdgeReplicationSetting } from '@dxos/protocols/proto/dxos/echo/metadata';
|
|
11
11
|
import { useClient } from '@dxos/react-client';
|
|
12
|
-
import {
|
|
12
|
+
import { type Space, SpaceState } from '@dxos/react-client/echo';
|
|
13
13
|
import { Button, Input, useMulticastObservable, useTranslation } from '@dxos/react-ui';
|
|
14
14
|
import {
|
|
15
|
-
Form,
|
|
16
|
-
type InputComponent,
|
|
17
15
|
ControlItem,
|
|
18
16
|
ControlItemInput,
|
|
19
|
-
ControlSection,
|
|
20
17
|
ControlPage,
|
|
18
|
+
ControlSection,
|
|
19
|
+
Form,
|
|
20
|
+
type InputComponent,
|
|
21
21
|
} from '@dxos/react-ui-form';
|
|
22
22
|
import { HuePicker, IconPicker } from '@dxos/react-ui-pickers';
|
|
23
23
|
import { StackItem } from '@dxos/react-ui-stack';
|
|
24
24
|
|
|
25
|
-
import {
|
|
25
|
+
import { meta } from '../../meta';
|
|
26
26
|
import { SpaceAction, SpaceForm } from '../../types';
|
|
27
27
|
|
|
28
28
|
const FormSchema = SpaceForm.pipe(
|
|
@@ -35,7 +35,7 @@ export type SpaceSettingsContainerProps = {
|
|
|
35
35
|
|
|
36
36
|
// TODO(wittjosiah): Handle space migrations here?
|
|
37
37
|
export const SpaceSettingsContainer = ({ space }: SpaceSettingsContainerProps) => {
|
|
38
|
-
const { t } = useTranslation(
|
|
38
|
+
const { t } = useTranslation(meta.id);
|
|
39
39
|
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
40
40
|
const client = useClient();
|
|
41
41
|
const archived = useMulticastObservable(space.state) === SpaceState.SPACE_INACTIVE;
|
|
@@ -111,14 +111,14 @@ export const SpaceSettingsContainer = ({ space }: SpaceSettingsContainerProps) =
|
|
|
111
111
|
);
|
|
112
112
|
},
|
|
113
113
|
icon: ({ type, label, getValue, onValueChange }) => {
|
|
114
|
-
const handleChange = useCallback((
|
|
115
|
-
const
|
|
114
|
+
const handleChange = useCallback((icon: string) => onValueChange(type, icon), [onValueChange, type]);
|
|
115
|
+
const handleReset = useCallback(() => onValueChange(type, undefined), [onValueChange, type]);
|
|
116
116
|
return (
|
|
117
117
|
<ControlItem title={label} description={t('icon description')}>
|
|
118
118
|
<IconPicker
|
|
119
119
|
value={getValue()}
|
|
120
120
|
onChange={handleChange}
|
|
121
|
-
onReset={
|
|
121
|
+
onReset={handleReset}
|
|
122
122
|
classNames='justify-self-end'
|
|
123
123
|
iconSize={5}
|
|
124
124
|
/>
|
|
@@ -127,13 +127,13 @@ export const SpaceSettingsContainer = ({ space }: SpaceSettingsContainerProps) =
|
|
|
127
127
|
},
|
|
128
128
|
hue: ({ type, label, getValue, onValueChange }) => {
|
|
129
129
|
const handleChange = useCallback((nextHue: string) => onValueChange(type, nextHue), [onValueChange, type]);
|
|
130
|
-
const
|
|
130
|
+
const handleReset = useCallback(() => onValueChange(type, undefined), [onValueChange, type]);
|
|
131
131
|
return (
|
|
132
132
|
<ControlItem title={label} description={t('hue description')}>
|
|
133
133
|
<HuePicker
|
|
134
134
|
value={getValue()}
|
|
135
135
|
onChange={handleChange}
|
|
136
|
-
onReset={
|
|
136
|
+
onReset={handleReset}
|
|
137
137
|
classNames='[--hue-preview-size:1.25rem] justify-self-end'
|
|
138
138
|
/>
|
|
139
139
|
</ControlItem>
|
|
@@ -162,11 +162,11 @@ export const SpaceSettingsContainer = ({ space }: SpaceSettingsContainerProps) =
|
|
|
162
162
|
);
|
|
163
163
|
|
|
164
164
|
return (
|
|
165
|
-
<StackItem.Content classNames='block overflow-y-auto
|
|
165
|
+
<StackItem.Content classNames='block overflow-y-auto'>
|
|
166
166
|
<ControlPage>
|
|
167
167
|
<ControlSection
|
|
168
|
-
title={t('space properties settings verbose label', { ns:
|
|
169
|
-
description={t('space properties settings description', { ns:
|
|
168
|
+
title={t('space properties settings verbose label', { ns: meta.id })}
|
|
169
|
+
description={t('space properties settings description', { ns: meta.id })}
|
|
170
170
|
>
|
|
171
171
|
<Form
|
|
172
172
|
schema={FormSchema}
|
|
@@ -175,7 +175,7 @@ export const SpaceSettingsContainer = ({ space }: SpaceSettingsContainerProps) =
|
|
|
175
175
|
onSave={handleSave}
|
|
176
176
|
Custom={customElements}
|
|
177
177
|
outerSpacing={false}
|
|
178
|
-
classNames='container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content]
|
|
178
|
+
classNames='container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content]'
|
|
179
179
|
/>
|
|
180
180
|
</ControlSection>
|
|
181
181
|
</ControlPage>
|
|
@@ -14,7 +14,7 @@ import { Tooltip, useTranslation } from '@dxos/react-ui';
|
|
|
14
14
|
import { AttentionGlyph, useAttended, useAttention } from '@dxos/react-ui-attention';
|
|
15
15
|
|
|
16
16
|
import { usePath } from '../../hooks';
|
|
17
|
-
import {
|
|
17
|
+
import { meta } from '../../meta';
|
|
18
18
|
|
|
19
19
|
const useEdgeStatus = (): EdgeStatus => {
|
|
20
20
|
const [status, setStatus] = useState(EdgeStatus.NOT_CONNECTED);
|
|
@@ -29,7 +29,7 @@ const useEdgeStatus = (): EdgeStatus => {
|
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
export const InlineSyncStatus = ({ space, open }: { space: Space; open?: boolean }) => {
|
|
32
|
-
const { t } = useTranslation(
|
|
32
|
+
const { t } = useTranslation(meta.id);
|
|
33
33
|
const id = space.id;
|
|
34
34
|
const { hasAttention, isAncestor, isRelated } = useAttention(id);
|
|
35
35
|
const isAttended = hasAttention || isAncestor || isRelated;
|
|
@@ -2,16 +2,15 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
|
|
9
|
-
import { withTheme } from '@dxos/
|
|
7
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
10
8
|
|
|
11
|
-
import { SyncStatusIndicator } from './SyncStatus';
|
|
12
9
|
import { translations } from '../../translations';
|
|
13
10
|
|
|
14
|
-
|
|
11
|
+
import { SyncStatusIndicator } from './SyncStatus';
|
|
12
|
+
|
|
13
|
+
const meta = {
|
|
15
14
|
title: 'plugins/plugin-space/SyncStatusIndicator',
|
|
16
15
|
component: SyncStatusIndicator,
|
|
17
16
|
decorators: [withTheme],
|
|
@@ -19,11 +18,11 @@ const meta: Meta = {
|
|
|
19
18
|
translations,
|
|
20
19
|
layout: 'centered',
|
|
21
20
|
},
|
|
22
|
-
}
|
|
21
|
+
} satisfies Meta<typeof SyncStatusIndicator>;
|
|
23
22
|
|
|
24
23
|
export default meta;
|
|
25
24
|
|
|
26
|
-
type Story = StoryObj<typeof
|
|
25
|
+
type Story = StoryObj<typeof meta>;
|
|
27
26
|
|
|
28
27
|
export const Default: Story = {
|
|
29
28
|
args: {
|
|
@@ -6,12 +6,13 @@ import React, { useEffect, useState } from 'react';
|
|
|
6
6
|
|
|
7
7
|
import { StatusBar } from '@dxos/plugin-status-bar';
|
|
8
8
|
import { useClient } from '@dxos/react-client';
|
|
9
|
-
import {
|
|
9
|
+
import { type SpaceSyncStateMap, getSyncSummary, useSyncState } from '@dxos/react-client/echo';
|
|
10
10
|
import { Icon, useTranslation } from '@dxos/react-ui';
|
|
11
11
|
|
|
12
|
+
import { meta } from '../../meta';
|
|
13
|
+
|
|
12
14
|
import { createClientSaveTracker } from './save-tracker';
|
|
13
15
|
import { getIcon, getStatus } from './status';
|
|
14
|
-
import { SPACE_PLUGIN } from '../../meta';
|
|
15
16
|
|
|
16
17
|
const SYNC_STALLED_TIMEOUT = 5_000;
|
|
17
18
|
|
|
@@ -30,7 +31,7 @@ export const SyncStatus = () => {
|
|
|
30
31
|
};
|
|
31
32
|
|
|
32
33
|
export const SyncStatusIndicator = ({ state, saved }: { state: SpaceSyncStateMap; saved: boolean }) => {
|
|
33
|
-
const { t } = useTranslation(
|
|
34
|
+
const { t } = useTranslation(meta.id);
|
|
34
35
|
const summary = getSyncSummary(state);
|
|
35
36
|
const offline = Object.values(state).length === 0;
|
|
36
37
|
const needsToUpload = summary.differentDocuments > 0 || summary.missingOnRemote > 0;
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import React, { useCallback
|
|
5
|
+
import React, { useCallback } from 'react';
|
|
6
6
|
|
|
7
7
|
import { createIntent, useIntentDispatcher } from '@dxos/app-framework';
|
|
8
|
-
import { Type } from '@dxos/echo';
|
|
8
|
+
import { Filter, Query, Type } from '@dxos/echo';
|
|
9
9
|
import { invariant } from '@dxos/invariant';
|
|
10
10
|
import { useClient } from '@dxos/react-client';
|
|
11
|
-
import {
|
|
12
|
-
import { ViewEditor as
|
|
13
|
-
import { DataType } from '@dxos/schema';
|
|
11
|
+
import { getSpace, useSchema } from '@dxos/react-client/echo';
|
|
12
|
+
import { ViewEditor as NaturalViewEditor } from '@dxos/react-ui-form';
|
|
13
|
+
import { type DataType, typenameFromQuery } from '@dxos/schema';
|
|
14
14
|
|
|
15
15
|
import { SpaceAction } from '../types';
|
|
16
16
|
|
|
@@ -20,24 +20,19 @@ export const ViewEditor = ({ view }: ViewEditorProps) => {
|
|
|
20
20
|
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
21
21
|
const client = useClient();
|
|
22
22
|
const space = getSpace(view);
|
|
23
|
-
const
|
|
23
|
+
const typename = view.query ? typenameFromQuery(view.query.ast) : undefined;
|
|
24
|
+
const schema = useSchema(client, space, typename);
|
|
24
25
|
|
|
25
|
-
const
|
|
26
|
-
const currentTypename = useMemo(() => view.query?.typename, [view.query?.typename]);
|
|
27
|
-
|
|
28
|
-
const handleUpdateTypename = useCallback(
|
|
26
|
+
const handleUpdateQuery = useCallback(
|
|
29
27
|
(typename: string) => {
|
|
30
28
|
invariant(schema);
|
|
31
29
|
invariant(Type.isMutable(schema));
|
|
32
30
|
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
view.query.typename = typename;
|
|
36
|
-
}
|
|
37
|
-
|
|
31
|
+
const newQuery = Query.select(Filter.typename(typename));
|
|
32
|
+
view.query.ast = newQuery.ast;
|
|
38
33
|
schema.updateTypename(typename);
|
|
39
34
|
},
|
|
40
|
-
[
|
|
35
|
+
[view, schema],
|
|
41
36
|
);
|
|
42
37
|
|
|
43
38
|
const handleDelete = useCallback(
|
|
@@ -52,11 +47,11 @@ export const ViewEditor = ({ view }: ViewEditorProps) => {
|
|
|
52
47
|
}
|
|
53
48
|
|
|
54
49
|
return (
|
|
55
|
-
<
|
|
50
|
+
<NaturalViewEditor
|
|
56
51
|
registry={space.db.schemaRegistry}
|
|
57
52
|
schema={schema}
|
|
58
53
|
view={view}
|
|
59
|
-
|
|
54
|
+
onQueryChanged={Type.isMutable(schema) ? handleUpdateQuery : undefined}
|
|
60
55
|
onDelete={Type.isMutable(schema) ? handleDelete : undefined}
|
|
61
56
|
outerSpacing={false}
|
|
62
57
|
/>
|
package/src/components/index.ts
CHANGED
package/src/events.ts
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Events, defineEvent } from '@dxos/app-framework';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { meta } from './meta';
|
|
8
8
|
|
|
9
9
|
export namespace SpaceEvents {
|
|
10
|
-
export const StateReady = Events.createStateEvent(`${
|
|
11
|
-
export const SetupSettingsPanel = defineEvent(`${
|
|
12
|
-
export const DefaultSpaceReady = defineEvent(`${
|
|
13
|
-
export const SpaceCreated = defineEvent(`${
|
|
14
|
-
export const SchemaAdded = defineEvent(`${
|
|
10
|
+
export const StateReady = Events.createStateEvent(`${meta.id}/event/state-ready`);
|
|
11
|
+
export const SetupSettingsPanel = defineEvent(`${meta.id}/event/setup-settings-panel`);
|
|
12
|
+
export const DefaultSpaceReady = defineEvent(`${meta.id}/event/default-space-ready`);
|
|
13
|
+
export const SpaceCreated = defineEvent(`${meta.id}/event/space-created`);
|
|
14
|
+
export const SchemaAdded = defineEvent(`${meta.id}/event/schema-added`);
|
|
15
15
|
}
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Capabilities,
|
|
5
|
+
import { Capabilities, type PluginContext, useLayout } from '@dxos/app-framework';
|
|
6
6
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
7
7
|
import { parseId, useSpace } from '@dxos/react-client/echo';
|
|
8
8
|
|
|
9
9
|
export const getActiveSpace = (context: PluginContext) => {
|
|
10
|
-
const layout = context.getCapability(Capabilities.Layout);
|
|
11
10
|
const client = context.getCapability(ClientCapabilities.Client);
|
|
11
|
+
const layout = context.getCapability(Capabilities.Layout);
|
|
12
12
|
const { spaceId } = parseId(layout.workspace);
|
|
13
13
|
return spaceId ? client.spaces.get(spaceId) : undefined;
|
|
14
14
|
};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { type Schema } from 'effect';
|
|
6
6
|
import React, { useCallback } from 'react';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { Surface, isSurfaceAvailable, usePluginManager } from '@dxos/app-framework';
|
|
9
9
|
import { type InputProps } from '@dxos/react-ui-form';
|
|
10
10
|
|
|
11
11
|
// TODO(ZaymonFC): Move this if you find yourself needing it elsewhere.
|
package/src/meta.ts
CHANGED
|
@@ -4,10 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import { type PluginMeta } from '@dxos/app-framework';
|
|
6
6
|
|
|
7
|
-
export const SPACE_PLUGIN = 'dxos.org/plugin/space';
|
|
8
|
-
|
|
9
7
|
export const meta: PluginMeta = {
|
|
10
|
-
id:
|
|
8
|
+
id: 'dxos.org/plugin/space',
|
|
11
9
|
name: 'Spaces',
|
|
12
10
|
icon: 'ph--planet--regular',
|
|
13
11
|
};
|
package/src/translations.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { Type } from '@dxos/echo';
|
|
5
6
|
import { StoredSchema } from '@dxos/echo-schema';
|
|
6
7
|
import { type Resource } from '@dxos/react-ui';
|
|
7
8
|
import { DataType } from '@dxos/schema';
|
|
@@ -21,7 +22,7 @@ export const translations = [
|
|
|
21
22
|
'rename object label': 'Rename collection',
|
|
22
23
|
'delete object label': 'Delete collection',
|
|
23
24
|
},
|
|
24
|
-
[DataType.QueryCollection
|
|
25
|
+
[Type.getTypename(DataType.QueryCollection)]: {
|
|
25
26
|
'typename label': 'Smart Collection',
|
|
26
27
|
'typename label_zero': 'Smart Collections',
|
|
27
28
|
'typename label_one': 'Smart Collection',
|
|
@@ -39,7 +40,7 @@ export const translations = [
|
|
|
39
40
|
'rename object label': 'Rename record type',
|
|
40
41
|
'delete object label': 'Delete record type',
|
|
41
42
|
},
|
|
42
|
-
[DataType.View
|
|
43
|
+
[Type.getTypename(DataType.View)]: {
|
|
43
44
|
'typename label': 'View',
|
|
44
45
|
'typename label_zero': 'Views',
|
|
45
46
|
'typename label_one': 'View',
|
|
@@ -69,7 +70,7 @@ export const translations = [
|
|
|
69
70
|
'typename label_other': 'People',
|
|
70
71
|
'object name placeholder': 'New person',
|
|
71
72
|
},
|
|
72
|
-
[DataType.Project
|
|
73
|
+
[Type.getTypename(DataType.Project)]: {
|
|
73
74
|
'typename label': 'Project',
|
|
74
75
|
'typename label_zero': 'Projects',
|
|
75
76
|
'typename label_one': 'Project',
|
|
@@ -214,10 +215,10 @@ export const translations = [
|
|
|
214
215
|
'space settings properties label': 'General settings',
|
|
215
216
|
'space properties settings verbose label': 'Manage space properties',
|
|
216
217
|
'space properties settings description': 'You can configure how this space is displayed in the app here.',
|
|
217
|
-
'space settings schema label': '
|
|
218
|
-
'schema verbose label': 'Manage
|
|
219
|
-
'schema description': 'You can manage all of the
|
|
220
|
-
'no schemas found message': 'No
|
|
218
|
+
'space settings schema label': 'Record types',
|
|
219
|
+
'schema verbose label': 'Manage record types',
|
|
220
|
+
'schema description': 'You can manage all of the record types stored within this space here.',
|
|
221
|
+
'no schemas found message': 'No record types found',
|
|
221
222
|
'display name input placeholder': 'Space name',
|
|
222
223
|
'display name description': 'Name of the space as it appears in the app.',
|
|
223
224
|
'icon description': 'Icon used to represent the space in the app.',
|
package/src/types/types.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { Schema } from 'effect';
|
|
|
6
6
|
|
|
7
7
|
import { type AnyIntentChain } from '@dxos/app-framework';
|
|
8
8
|
import { type Obj, Type } from '@dxos/echo';
|
|
9
|
-
import { EchoSchema, StoredSchema, type TypedObject
|
|
9
|
+
import { type BaseObject, EchoSchema, StoredSchema, type TypedObject } from '@dxos/echo-schema';
|
|
10
10
|
import { type PublicKey } from '@dxos/react-client';
|
|
11
11
|
// TODO(wittjosiah): This pulls in full client.
|
|
12
12
|
import { EchoObjectSchema, ReactiveObjectSchema, type Space, SpaceSchema } from '@dxos/react-client/echo';
|
|
@@ -14,9 +14,10 @@ import { CancellableInvitationObservable, Invitation } from '@dxos/react-client/
|
|
|
14
14
|
import { DataType, FieldSchema, TypenameAnnotationId } from '@dxos/schema';
|
|
15
15
|
import { type ComplexMap } from '@dxos/util';
|
|
16
16
|
|
|
17
|
-
import {
|
|
17
|
+
import { meta } from '../meta';
|
|
18
|
+
|
|
19
|
+
export const SPACE_DIRECTORY_HANDLE = `${meta.id}/directory`;
|
|
18
20
|
|
|
19
|
-
export const SPACE_DIRECTORY_HANDLE = 'dxos.org/plugin/space/directory';
|
|
20
21
|
export const SPACE_TYPE = 'dxos.org/type/Space';
|
|
21
22
|
|
|
22
23
|
export type ObjectViewerProps = {
|
|
@@ -114,7 +115,7 @@ export type ObjectForm<T extends BaseObject = BaseObject> = {
|
|
|
114
115
|
|
|
115
116
|
export const defineObjectForm = <T extends BaseObject>(form: ObjectForm<T>) => form;
|
|
116
117
|
|
|
117
|
-
export const SPACE_ACTION = `${
|
|
118
|
+
export const SPACE_ACTION = `${meta.id}/action`;
|
|
118
119
|
|
|
119
120
|
export namespace SpaceAction {
|
|
120
121
|
export class OpenCreateSpace extends Schema.TaggedClass<OpenCreateSpace>()(`${SPACE_ACTION}/open-create-space`, {
|
|
@@ -238,6 +239,9 @@ export namespace SpaceAction {
|
|
|
238
239
|
input: Schema.Struct({
|
|
239
240
|
space: SpaceSchema,
|
|
240
241
|
name: Schema.optional(Schema.String),
|
|
242
|
+
typename: Schema.optional(Schema.String),
|
|
243
|
+
// TODO(wittjosiah): Semantic version format.
|
|
244
|
+
version: Schema.optional(Schema.String),
|
|
241
245
|
// TODO(wittjosiah): Schema for schema?
|
|
242
246
|
schema: Schema.Any,
|
|
243
247
|
}),
|
|
@@ -270,7 +274,9 @@ export namespace SpaceAction {
|
|
|
270
274
|
export class OpenCreateObject extends Schema.TaggedClass<OpenCreateObject>()(`${SPACE_ACTION}/open-create-object`, {
|
|
271
275
|
input: Schema.Struct({
|
|
272
276
|
target: Schema.Union(SpaceSchema, DataType.Collection),
|
|
277
|
+
views: Schema.optional(Schema.Boolean),
|
|
273
278
|
typename: Schema.optional(Schema.String),
|
|
279
|
+
initialFormValues: Schema.optional(Schema.Any),
|
|
274
280
|
navigable: Schema.optional(Schema.Boolean),
|
|
275
281
|
// TODO(wittjosiah): This is a function, is there a better way to handle this?
|
|
276
282
|
onCreateObject: Schema.optional(Schema.Any),
|
|
@@ -362,11 +368,9 @@ export namespace CollectionAction {
|
|
|
362
368
|
|
|
363
369
|
export const QueryCollectionForm = Schema.Struct({
|
|
364
370
|
name: Schema.optional(Schema.String),
|
|
365
|
-
typename: Schema.
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
}),
|
|
369
|
-
),
|
|
371
|
+
typename: Schema.String.annotations({
|
|
372
|
+
[TypenameAnnotationId]: ['object-form'],
|
|
373
|
+
}),
|
|
370
374
|
});
|
|
371
375
|
|
|
372
376
|
export class CreateQueryCollection extends Schema.TaggedClass<CreateQueryCollection>()(
|
|
@@ -374,7 +378,8 @@ export namespace CollectionAction {
|
|
|
374
378
|
{
|
|
375
379
|
input: QueryCollectionForm,
|
|
376
380
|
output: Schema.Struct({
|
|
377
|
-
|
|
381
|
+
// TODO(wittjosiah): Remove cast.
|
|
382
|
+
object: EchoObjectSchema, // DataType.QueryCollection,
|
|
378
383
|
}),
|
|
379
384
|
},
|
|
380
385
|
) {}
|