@dxos/plugin-space 0.8.2 → 0.8.3-main.7f5a14c
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/{app-graph-builder-DCWUULKX.mjs → app-graph-builder-UNXUTH53.mjs} +11 -10
- package/dist/lib/browser/app-graph-builder-UNXUTH53.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-serializer-MLU7XI2P.mjs → app-graph-serializer-KPKPMC4M.mjs} +6 -6
- package/dist/lib/browser/app-graph-serializer-KPKPMC4M.mjs.map +7 -0
- package/dist/lib/browser/{chunk-Q4BTFH2P.mjs → chunk-CF4FBDGP.mjs} +26 -24
- package/dist/lib/browser/chunk-CF4FBDGP.mjs.map +7 -0
- package/dist/lib/browser/{chunk-W46VVHFM.mjs → chunk-LGEIVEYC.mjs} +8 -7
- package/dist/lib/browser/chunk-LGEIVEYC.mjs.map +7 -0
- package/dist/lib/browser/{chunk-N5QMRLKI.mjs → chunk-RRJIDXPY.mjs} +18 -18
- package/dist/lib/browser/chunk-RRJIDXPY.mjs.map +7 -0
- package/dist/lib/browser/{chunk-VEBKN45O.mjs → chunk-TQPBDRXV.mjs} +2 -2
- package/dist/lib/browser/{identity-created-O63SIYOF.mjs → identity-created-EM6GZDNF.mjs} +4 -4
- package/dist/lib/browser/identity-created-EM6GZDNF.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +7 -7
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-KBF3YU6I.mjs → intent-resolver-K3ULKQ6V.mjs} +27 -29
- package/dist/lib/browser/intent-resolver-K3ULKQ6V.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-PVKJE4EZ.mjs → react-root-ECO7G77L.mjs} +4 -4
- package/dist/lib/browser/{react-surface-252P4NCK.mjs → react-surface-Y5AZBYA7.mjs} +12 -12
- package/dist/lib/browser/react-surface-Y5AZBYA7.mjs.map +7 -0
- package/dist/lib/browser/{schema-tools-JIEMHUXV.mjs → schema-tools-ILTVSSS3.mjs} +7 -6
- package/dist/lib/browser/schema-tools-ILTVSSS3.mjs.map +7 -0
- package/dist/lib/browser/{settings-2IN2WLUK.mjs → settings-MU7O6JDD.mjs} +4 -4
- package/dist/lib/browser/settings-MU7O6JDD.mjs.map +7 -0
- package/dist/lib/browser/{spaces-ready-L4QAGTDE.mjs → spaces-ready-NXZAWHGI.mjs} +9 -10
- package/dist/lib/browser/spaces-ready-NXZAWHGI.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +1 -1
- package/dist/lib/node/{app-graph-builder-WC445X77.cjs → app-graph-builder-6QDQEYHS.cjs} +38 -37
- package/dist/lib/node/app-graph-builder-6QDQEYHS.cjs.map +7 -0
- package/dist/lib/node/{app-graph-serializer-UPQOQVMJ.cjs → app-graph-serializer-6SWKHDE2.cjs} +21 -21
- package/dist/lib/node/app-graph-serializer-6SWKHDE2.cjs.map +7 -0
- package/dist/lib/node/{chunk-COQYISES.cjs → chunk-KDBPQ6L3.cjs} +54 -54
- package/dist/lib/node/chunk-KDBPQ6L3.cjs.map +7 -0
- package/dist/lib/node/{chunk-Q3YZEYZT.cjs → chunk-QCANR24R.cjs} +67 -65
- package/dist/lib/node/chunk-QCANR24R.cjs.map +7 -0
- package/dist/lib/node/{chunk-DXL5TDFP.cjs → chunk-SF3NU7EW.cjs} +6 -6
- package/dist/lib/node/{chunk-FXHI7JNY.cjs → chunk-UUBPYP7E.cjs} +33 -32
- package/dist/lib/node/chunk-UUBPYP7E.cjs.map +7 -0
- package/dist/lib/node/{identity-created-UXEAUGC7.cjs → identity-created-KCJAOFZC.cjs} +7 -7
- package/dist/lib/node/identity-created-KCJAOFZC.cjs.map +7 -0
- package/dist/lib/node/index.cjs +61 -61
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/{intent-resolver-SVFJKUH7.cjs → intent-resolver-XR4S7LME.cjs} +79 -81
- package/dist/lib/node/intent-resolver-XR4S7LME.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-root-DDPDUMCG.cjs → react-root-Z2YM6JYC.cjs} +8 -8
- package/dist/lib/node/{react-surface-JUIU37BX.cjs → react-surface-H6XNU6DS.cjs} +56 -56
- package/dist/lib/node/react-surface-H6XNU6DS.cjs.map +7 -0
- package/dist/lib/node/{schema-tools-ZG6Z2QRC.cjs → schema-tools-IYREN4IH.cjs} +9 -8
- package/dist/lib/node/schema-tools-IYREN4IH.cjs.map +7 -0
- package/dist/lib/node/{settings-FOH7EB5C.cjs → settings-XRAT3YMN.cjs} +7 -7
- package/dist/lib/node/settings-XRAT3YMN.cjs.map +7 -0
- package/dist/lib/node/{spaces-ready-VXQYCBII.cjs → spaces-ready-KKFEN2MM.cjs} +22 -23
- package/dist/lib/node/spaces-ready-KKFEN2MM.cjs.map +7 -0
- package/dist/lib/node/types/index.cjs +12 -12
- package/dist/lib/node/types/index.cjs.map +1 -1
- package/dist/lib/node-esm/{app-graph-builder-E7CCGPQJ.mjs → app-graph-builder-5EAV4CDH.mjs} +11 -10
- package/dist/lib/node-esm/app-graph-builder-5EAV4CDH.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-serializer-UCMSLPIA.mjs → app-graph-serializer-BRLVJW6I.mjs} +6 -6
- package/dist/lib/node-esm/app-graph-serializer-BRLVJW6I.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-FTELJGEG.mjs → chunk-226REPOB.mjs} +8 -7
- package/dist/lib/node-esm/chunk-226REPOB.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-OSPEGYX3.mjs → chunk-55OOAFBS.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-HL2Z2GNW.mjs → chunk-AVONUBZO.mjs} +26 -24
- package/dist/lib/node-esm/chunk-AVONUBZO.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-XAZNQ3QN.mjs → chunk-FTL5AMXF.mjs} +18 -18
- package/dist/lib/node-esm/chunk-FTL5AMXF.mjs.map +7 -0
- package/dist/lib/node-esm/{identity-created-ZECO4NH3.mjs → identity-created-FOFH2WPI.mjs} +4 -4
- package/dist/lib/node-esm/identity-created-FOFH2WPI.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +7 -7
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-K2UDBF2R.mjs → intent-resolver-72KTB4S2.mjs} +27 -29
- package/dist/lib/node-esm/intent-resolver-72KTB4S2.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-root-6F7B3OVO.mjs → react-root-FU2I5U2M.mjs} +4 -4
- package/dist/lib/node-esm/{react-surface-NP3Y6BNZ.mjs → react-surface-L4SMKRYF.mjs} +12 -12
- package/dist/lib/node-esm/react-surface-L4SMKRYF.mjs.map +7 -0
- package/dist/lib/node-esm/{schema-tools-2Y4D42PD.mjs → schema-tools-SRLCRZ3B.mjs} +7 -6
- package/dist/lib/node-esm/schema-tools-SRLCRZ3B.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-Q4XDFSYD.mjs → settings-C7GQAEDU.mjs} +4 -4
- package/dist/lib/node-esm/settings-C7GQAEDU.mjs.map +7 -0
- package/dist/lib/node-esm/{spaces-ready-JHKPD4PH.mjs → spaces-ready-WTISHKEH.mjs} +9 -10
- package/dist/lib/node-esm/spaces-ready-WTISHKEH.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/schema-tools.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/capabilities/spaces-ready.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts +2 -2
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts.map +1 -1
- package/dist/types/src/components/MenuFooter.d.ts +2 -2
- package/dist/types/src/components/MenuFooter.d.ts.map +1 -1
- package/dist/types/src/components/ObjectSettings/AdvancedObjectSettings.d.ts +2 -2
- package/dist/types/src/components/ObjectSettings/AdvancedObjectSettings.d.ts.map +1 -1
- package/dist/types/src/components/ObjectSettings/BaseObjectSettings.d.ts +2 -2
- package/dist/types/src/components/ObjectSettings/BaseObjectSettings.d.ts.map +1 -1
- package/dist/types/src/components/ObjectSettings/ObjectSettingsContainer.d.ts +2 -2
- package/dist/types/src/components/ObjectSettings/ObjectSettingsContainer.d.ts.map +1 -1
- package/dist/types/src/components/SchemaContainer.d.ts +2 -2
- package/dist/types/src/components/SchemaContainer.d.ts.map +1 -1
- package/dist/types/src/components/SpacePresence.d.ts +2 -2
- package/dist/types/src/components/SpacePresence.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts.map +1 -1
- package/dist/types/src/types/collection.d.ts +5 -5
- package/dist/types/src/types/collection.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +5 -4
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +10 -10
- package/dist/types/src/util.d.ts.map +1 -1
- package/package.json +45 -45
- package/src/SpacePlugin.tsx +4 -4
- package/src/capabilities/app-graph-builder.ts +8 -17
- package/src/capabilities/app-graph-serializer.ts +3 -3
- package/src/capabilities/identity-created.ts +2 -2
- package/src/capabilities/intent-resolver.ts +30 -25
- package/src/capabilities/react-surface.tsx +10 -22
- package/src/capabilities/schema-tools.ts +3 -2
- package/src/capabilities/settings.ts +6 -2
- package/src/capabilities/spaces-ready.ts +5 -6
- package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +3 -2
- package/src/components/CreateDialog/CreateObjectDialog.tsx +9 -16
- package/src/components/CreateDialog/CreateObjectPanel.tsx +3 -2
- package/src/components/CreateDialog/CreateSpaceDialog.tsx +1 -1
- package/src/components/MenuFooter.tsx +3 -2
- package/src/components/ObjectSettings/AdvancedObjectSettings.tsx +4 -4
- package/src/components/ObjectSettings/BaseObjectSettings.tsx +5 -4
- package/src/components/ObjectSettings/ObjectSettingsContainer.tsx +3 -3
- package/src/components/SchemaContainer.tsx +3 -3
- package/src/components/SpacePresence.tsx +22 -15
- package/src/components/SpaceSettings/SpaceSettingsContainer.tsx +2 -1
- package/src/types/collection.ts +13 -4
- package/src/types/types.ts +5 -4
- package/src/util.tsx +26 -35
- package/dist/lib/browser/app-graph-builder-DCWUULKX.mjs.map +0 -7
- package/dist/lib/browser/app-graph-serializer-MLU7XI2P.mjs.map +0 -7
- package/dist/lib/browser/chunk-N5QMRLKI.mjs.map +0 -7
- package/dist/lib/browser/chunk-Q4BTFH2P.mjs.map +0 -7
- package/dist/lib/browser/chunk-W46VVHFM.mjs.map +0 -7
- package/dist/lib/browser/identity-created-O63SIYOF.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-KBF3YU6I.mjs.map +0 -7
- package/dist/lib/browser/react-surface-252P4NCK.mjs.map +0 -7
- package/dist/lib/browser/schema-tools-JIEMHUXV.mjs.map +0 -7
- package/dist/lib/browser/settings-2IN2WLUK.mjs.map +0 -7
- package/dist/lib/browser/spaces-ready-L4QAGTDE.mjs.map +0 -7
- package/dist/lib/node/app-graph-builder-WC445X77.cjs.map +0 -7
- package/dist/lib/node/app-graph-serializer-UPQOQVMJ.cjs.map +0 -7
- package/dist/lib/node/chunk-COQYISES.cjs.map +0 -7
- package/dist/lib/node/chunk-FXHI7JNY.cjs.map +0 -7
- package/dist/lib/node/chunk-Q3YZEYZT.cjs.map +0 -7
- package/dist/lib/node/identity-created-UXEAUGC7.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-SVFJKUH7.cjs.map +0 -7
- package/dist/lib/node/react-surface-JUIU37BX.cjs.map +0 -7
- package/dist/lib/node/schema-tools-ZG6Z2QRC.cjs.map +0 -7
- package/dist/lib/node/settings-FOH7EB5C.cjs.map +0 -7
- package/dist/lib/node/spaces-ready-VXQYCBII.cjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-E7CCGPQJ.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-serializer-UCMSLPIA.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-FTELJGEG.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HL2Z2GNW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-XAZNQ3QN.mjs.map +0 -7
- package/dist/lib/node-esm/identity-created-ZECO4NH3.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-K2UDBF2R.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-NP3Y6BNZ.mjs.map +0 -7
- package/dist/lib/node-esm/schema-tools-2Y4D42PD.mjs.map +0 -7
- package/dist/lib/node-esm/settings-Q4XDFSYD.mjs.map +0 -7
- package/dist/lib/node-esm/spaces-ready-JHKPD4PH.mjs.map +0 -7
- /package/dist/lib/browser/{chunk-VEBKN45O.mjs.map → chunk-TQPBDRXV.mjs.map} +0 -0
- /package/dist/lib/browser/{react-root-PVKJE4EZ.mjs.map → react-root-ECO7G77L.mjs.map} +0 -0
- /package/dist/lib/node/{chunk-DXL5TDFP.cjs.map → chunk-SF3NU7EW.cjs.map} +0 -0
- /package/dist/lib/node/{react-root-DDPDUMCG.cjs.map → react-root-Z2YM6JYC.cjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-OSPEGYX3.mjs.map → chunk-55OOAFBS.mjs.map} +0 -0
- /package/dist/lib/node-esm/{react-root-6F7B3OVO.mjs.map → react-root-FU2I5U2M.mjs.map} +0 -0
|
@@ -6,20 +6,10 @@ import { type Schema } from 'effect';
|
|
|
6
6
|
import React, { useCallback } from 'react';
|
|
7
7
|
|
|
8
8
|
import { Capabilities, contributes, createSurface, Surface, useCapability, useLayout } from '@dxos/app-framework';
|
|
9
|
-
import {
|
|
9
|
+
import { Obj } from '@dxos/echo';
|
|
10
10
|
import { findAnnotation } from '@dxos/effect';
|
|
11
11
|
import { SettingsStore } from '@dxos/local-storage';
|
|
12
|
-
import {
|
|
13
|
-
getSpace,
|
|
14
|
-
isEchoObject,
|
|
15
|
-
isLiveObject,
|
|
16
|
-
isSpace,
|
|
17
|
-
parseId,
|
|
18
|
-
SpaceState,
|
|
19
|
-
useSpace,
|
|
20
|
-
type AnyLiveObject,
|
|
21
|
-
type Space,
|
|
22
|
-
} from '@dxos/react-client/echo';
|
|
12
|
+
import { getSpace, isLiveObject, isSpace, parseId, SpaceState, useSpace, type Space } from '@dxos/react-client/echo';
|
|
23
13
|
import { Input } from '@dxos/react-ui';
|
|
24
14
|
import { type InputProps } from '@dxos/react-ui-form';
|
|
25
15
|
import { HuePicker, IconPicker } from '@dxos/react-ui-pickers';
|
|
@@ -78,7 +68,7 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
78
68
|
id: `${SPACE_PLUGIN}/collection-fallback`,
|
|
79
69
|
role: 'article',
|
|
80
70
|
position: 'fallback',
|
|
81
|
-
filter: (data): data is { subject: CollectionType } =>
|
|
71
|
+
filter: (data): data is { subject: CollectionType } => Obj.instanceOf(CollectionType, data.subject),
|
|
82
72
|
component: ({ data }) => <CollectionMain collection={data.subject} />,
|
|
83
73
|
}),
|
|
84
74
|
createSurface({
|
|
@@ -91,8 +81,7 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
91
81
|
createSurface({
|
|
92
82
|
id: `${SPACE_PLUGIN}/companion/object-settings`,
|
|
93
83
|
role: 'article',
|
|
94
|
-
filter: (data): data is { companionTo:
|
|
95
|
-
isEchoObject(data.companionTo) && data.subject === 'settings',
|
|
84
|
+
filter: (data): data is { companionTo: Obj.Any } => Obj.isObject(data.companionTo) && data.subject === 'settings',
|
|
96
85
|
component: ({ data, role }) => <ObjectSettingsContainer object={data.companionTo} role={role} />,
|
|
97
86
|
}),
|
|
98
87
|
createSurface({
|
|
@@ -206,21 +195,21 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
206
195
|
createSurface({
|
|
207
196
|
id: POPOVER_RENAME_OBJECT,
|
|
208
197
|
role: 'popover',
|
|
209
|
-
filter: (data): data is { props:
|
|
198
|
+
filter: (data): data is { props: Obj.Any } =>
|
|
210
199
|
data.component === POPOVER_RENAME_OBJECT && isLiveObject(data.props),
|
|
211
200
|
component: ({ data }) => <PopoverRenameObject object={data.props} />,
|
|
212
201
|
}),
|
|
213
202
|
createSurface({
|
|
214
203
|
id: `${SPACE_PLUGIN}/menu-footer`,
|
|
215
204
|
role: 'menu-footer',
|
|
216
|
-
filter: (data): data is { subject:
|
|
205
|
+
filter: (data): data is { subject: Obj.Any } => Obj.isObject(data.subject),
|
|
217
206
|
component: ({ data }) => <MenuFooter object={data.subject} />,
|
|
218
207
|
}),
|
|
219
208
|
createSurface({
|
|
220
209
|
id: `${SPACE_PLUGIN}/navtree-presence`,
|
|
221
210
|
role: 'navtree-item-end',
|
|
222
|
-
filter: (data): data is { id: string; subject:
|
|
223
|
-
typeof data.id === 'string' &&
|
|
211
|
+
filter: (data): data is { id: string; subject: Obj.Any; open?: boolean } =>
|
|
212
|
+
typeof data.id === 'string' && Obj.isObject(data.subject),
|
|
224
213
|
component: ({ data }) => {
|
|
225
214
|
// TODO(wittjosiah): Doesn't need to be mutable but readonly type messes with ComplexMap.
|
|
226
215
|
const state = useCapability(SpaceCapabilities.MutableState);
|
|
@@ -246,8 +235,7 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
246
235
|
id: `${SPACE_PLUGIN}/navbar-presence`,
|
|
247
236
|
role: 'navbar-end',
|
|
248
237
|
position: 'hoist',
|
|
249
|
-
filter: (data): data is { subject: Space |
|
|
250
|
-
isSpace(data.subject) || isEchoObject(data.subject),
|
|
238
|
+
filter: (data): data is { subject: Space | Obj.Any } => isSpace(data.subject) || Obj.isObject(data.subject),
|
|
251
239
|
component: ({ data }) => {
|
|
252
240
|
const space = isSpace(data.subject) ? data.subject : getSpace(data.subject);
|
|
253
241
|
const object = isSpace(data.subject)
|
|
@@ -262,7 +250,7 @@ export default ({ createInvitationUrl }: ReactSurfaceOptions) =>
|
|
|
262
250
|
createSurface({
|
|
263
251
|
id: `${SPACE_PLUGIN}/collection-section`,
|
|
264
252
|
role: 'section',
|
|
265
|
-
filter: (data): data is { subject: CollectionType } =>
|
|
253
|
+
filter: (data): data is { subject: CollectionType } => Obj.instanceOf(CollectionType, data.subject),
|
|
266
254
|
component: ({ data }) => <CollectionSection collection={data.subject} />,
|
|
267
255
|
}),
|
|
268
256
|
createSurface({
|
|
@@ -7,7 +7,8 @@ import { Schema, SchemaAST } from 'effect';
|
|
|
7
7
|
import { createTool, ToolResult } from '@dxos/ai';
|
|
8
8
|
import { Capabilities, contributes, type PromiseIntentDispatcher } from '@dxos/app-framework';
|
|
9
9
|
import { type Space } from '@dxos/client/echo';
|
|
10
|
-
import {
|
|
10
|
+
import { Type } from '@dxos/echo';
|
|
11
|
+
import { FormatEnum, FormatEnums, SelectOptionSchema } from '@dxos/echo-schema';
|
|
11
12
|
import { invariant } from '@dxos/invariant';
|
|
12
13
|
import { hues } from '@dxos/react-ui-theme';
|
|
13
14
|
import { getSchemaFromPropertyDefinitions } from '@dxos/schema';
|
|
@@ -32,7 +33,7 @@ export const TypeNameSchema = Schema.String.pipe(
|
|
|
32
33
|
);
|
|
33
34
|
|
|
34
35
|
const formatDescription = `The format of the property. Additional information:
|
|
35
|
-
${FormatEnum.GeoPoint}: ${JSON.stringify(toJsonSchema(GeoPoint))}
|
|
36
|
+
${FormatEnum.GeoPoint}: ${JSON.stringify(Type.toJsonSchema(Type.Format.GeoPoint))}
|
|
36
37
|
This tuple is GeoJSON. You must specify \`${FormatEnum.GeoPoint}\` as [Longitude, Latitude]`;
|
|
37
38
|
|
|
38
39
|
// TODO(ZaymonFC): All properties are default optional, but maybe we should allow for required properties.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { Capabilities, contributes } from '@dxos/app-framework';
|
|
6
6
|
import { live } from '@dxos/live-object';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { meta } from '../meta';
|
|
9
9
|
import { type SpaceSettingsProps, SpaceSettingsSchema } from '../types';
|
|
10
10
|
|
|
11
11
|
export default () => {
|
|
@@ -13,5 +13,9 @@ export default () => {
|
|
|
13
13
|
showHidden: false,
|
|
14
14
|
});
|
|
15
15
|
|
|
16
|
-
return contributes(Capabilities.Settings, {
|
|
16
|
+
return contributes(Capabilities.Settings, {
|
|
17
|
+
prefix: meta.id,
|
|
18
|
+
schema: SpaceSettingsSchema,
|
|
19
|
+
value: settings,
|
|
20
|
+
});
|
|
17
21
|
};
|
|
@@ -4,18 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
import { Option } from 'effect';
|
|
6
6
|
|
|
7
|
-
import { contributes, createIntent,
|
|
7
|
+
import { contributes, createIntent, Capabilities, LayoutAction, type PluginContext } from '@dxos/app-framework';
|
|
8
8
|
import { SubscriptionList } from '@dxos/async';
|
|
9
|
-
import {
|
|
9
|
+
import { Filter, Obj, Type } from '@dxos/echo';
|
|
10
10
|
import { scheduledEffect } from '@dxos/echo-signals/core';
|
|
11
|
-
import { live } from '@dxos/live-object';
|
|
12
11
|
import { log } from '@dxos/log';
|
|
13
12
|
import { AttentionCapabilities } from '@dxos/plugin-attention';
|
|
14
13
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
15
14
|
import { DeckCapabilities } from '@dxos/plugin-deck';
|
|
16
15
|
import { EdgeReplicationSetting } from '@dxos/protocols/proto/dxos/echo/metadata';
|
|
17
16
|
import { PublicKey } from '@dxos/react-client';
|
|
18
|
-
import {
|
|
17
|
+
import { FQ_ID_LENGTH, parseFullyQualifiedId, SpaceState } from '@dxos/react-client/echo';
|
|
19
18
|
import { ComplexMap, reduceGroupBy } from '@dxos/util';
|
|
20
19
|
|
|
21
20
|
import { SpaceCapabilities } from './capabilities';
|
|
@@ -51,11 +50,11 @@ export default async (context: PluginContext) => {
|
|
|
51
50
|
|
|
52
51
|
const {
|
|
53
52
|
objects: [spacesOrder],
|
|
54
|
-
} = await defaultSpace.db.query(Filter.type(Expando, { key: SHARED })).run();
|
|
53
|
+
} = await defaultSpace.db.query(Filter.type(Type.Expando, { key: SHARED })).run();
|
|
55
54
|
if (!spacesOrder) {
|
|
56
55
|
// TODO(wittjosiah): Cannot be a Folder because Spaces are not TypedObjects so can't be saved in the database.
|
|
57
56
|
// Instead, we store order as an array of space ids.
|
|
58
|
-
defaultSpace.db.add(
|
|
57
|
+
defaultSpace.db.add(Obj.make({ key: SHARED, order: [] }));
|
|
59
58
|
}
|
|
60
59
|
|
|
61
60
|
// Await missing objects.
|
|
@@ -7,7 +7,8 @@ import '@dxos-theme';
|
|
|
7
7
|
import { type Meta, type StoryObj } from '@storybook/react';
|
|
8
8
|
import React, { useEffect } from 'react';
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import { Filter, Obj } from '@dxos/echo';
|
|
11
|
+
import { useQuery, useSpace } from '@dxos/react-client/echo';
|
|
11
12
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
12
13
|
import { Dialog } from '@dxos/react-ui';
|
|
13
14
|
import { osTranslations } from '@dxos/shell/react';
|
|
@@ -70,7 +71,7 @@ export const TargetCollection: StoryObj<typeof CreateObjectDialog> = {
|
|
|
70
71
|
|
|
71
72
|
useEffect(() => {
|
|
72
73
|
if (space) {
|
|
73
|
-
space.db.add(
|
|
74
|
+
space.db.add(Obj.make(CollectionType, { name: 'My Collection', objects: [], views: {} }));
|
|
74
75
|
}
|
|
75
76
|
}, [space]);
|
|
76
77
|
|
|
@@ -7,27 +7,28 @@ import React, { useCallback, useRef } from 'react';
|
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
9
|
Capabilities,
|
|
10
|
+
LayoutAction,
|
|
10
11
|
chain,
|
|
11
12
|
createIntent,
|
|
12
|
-
LayoutAction,
|
|
13
13
|
useCapabilities,
|
|
14
14
|
useIntentDispatcher,
|
|
15
15
|
usePluginManager,
|
|
16
16
|
} from '@dxos/app-framework';
|
|
17
|
+
import { type Obj } from '@dxos/echo';
|
|
17
18
|
import { invariant } from '@dxos/invariant';
|
|
18
19
|
import { useClient } from '@dxos/react-client';
|
|
19
|
-
import { getSpace, isLiveObject, isSpace,
|
|
20
|
+
import { getSpace, isLiveObject, isSpace, useSpaces } from '@dxos/react-client/echo';
|
|
20
21
|
import { Button, Dialog, Icon, useTranslation } from '@dxos/react-ui';
|
|
21
22
|
|
|
22
23
|
import { CreateObjectPanel, type CreateObjectPanelProps } from './CreateObjectPanel';
|
|
23
24
|
import { SpaceCapabilities } from '../../capabilities';
|
|
24
25
|
import { SPACE_PLUGIN } from '../../meta';
|
|
25
|
-
import {
|
|
26
|
+
import { SpaceAction } from '../../types';
|
|
26
27
|
|
|
27
28
|
export const CREATE_OBJECT_DIALOG = `${SPACE_PLUGIN}/CreateObjectDialog`;
|
|
28
29
|
|
|
29
30
|
export type CreateObjectDialogProps = Pick<CreateObjectPanelProps, 'target' | 'typename' | 'name'> & {
|
|
30
|
-
shouldNavigate?: (object:
|
|
31
|
+
shouldNavigate?: (object: Obj.Any) => boolean;
|
|
31
32
|
};
|
|
32
33
|
|
|
33
34
|
export const CreateObjectDialog = ({
|
|
@@ -44,22 +45,14 @@ export const CreateObjectDialog = ({
|
|
|
44
45
|
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
45
46
|
const forms = useCapabilities(SpaceCapabilities.ObjectForm);
|
|
46
47
|
|
|
47
|
-
const resolve = useCallback(
|
|
48
|
-
(typename
|
|
48
|
+
const resolve = useCallback<NonNullable<CreateObjectPanelProps['resolve']>>(
|
|
49
|
+
(typename) =>
|
|
49
50
|
manager.context.getCapabilities(Capabilities.Metadata).find(({ id }) => id === typename)?.metadata ?? {},
|
|
50
51
|
[manager],
|
|
51
52
|
);
|
|
52
53
|
|
|
53
|
-
const handleCreateObject = useCallback(
|
|
54
|
-
async ({
|
|
55
|
-
form,
|
|
56
|
-
target,
|
|
57
|
-
data = {},
|
|
58
|
-
}: {
|
|
59
|
-
form: ObjectForm;
|
|
60
|
-
target: CreateObjectPanelProps['target'];
|
|
61
|
-
data?: Record<string, any>;
|
|
62
|
-
}) => {
|
|
54
|
+
const handleCreateObject = useCallback<NonNullable<CreateObjectPanelProps['onCreateObject']>>(
|
|
55
|
+
async ({ form, target, data = {} }) => {
|
|
63
56
|
if (!target) {
|
|
64
57
|
// TODO(wittjosiah): UI feedback.
|
|
65
58
|
return;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback, useState } from 'react';
|
|
6
6
|
|
|
7
|
+
import { Type } from '@dxos/echo';
|
|
7
8
|
import { getTypeAnnotation, type TypeAnnotation } from '@dxos/echo-schema';
|
|
8
9
|
import { invariant } from '@dxos/invariant';
|
|
9
10
|
import { type SpaceId, type Space } from '@dxos/react-client/echo';
|
|
@@ -47,7 +48,7 @@ export const CreateObjectPanel = ({
|
|
|
47
48
|
const { t } = useTranslation(SPACE_PLUGIN);
|
|
48
49
|
const [typename, setTypename] = useState<string | undefined>(initialTypename);
|
|
49
50
|
const [target, setTarget] = useState<Space | CollectionType | undefined>(initialTarget);
|
|
50
|
-
const form = forms.find((form) =>
|
|
51
|
+
const form = forms.find((form) => Type.getTypename(form.objectSchema) === typename);
|
|
51
52
|
const options: TypeAnnotation[] = forms
|
|
52
53
|
.map((form) => getTypeAnnotation(form.objectSchema))
|
|
53
54
|
.filter(isNonNullable)
|
|
@@ -91,7 +92,7 @@ export const CreateObjectPanel = ({
|
|
|
91
92
|
<SelectSpace spaces={spaces} defaultSpaceId={defaultSpaceId} onChange={setTarget} />
|
|
92
93
|
) : form.formSchema ? (
|
|
93
94
|
<Form
|
|
94
|
-
|
|
95
|
+
flush
|
|
95
96
|
autoFocus
|
|
96
97
|
values={{ name: initialName }}
|
|
97
98
|
schema={form.formSchema}
|
|
@@ -5,14 +5,15 @@
|
|
|
5
5
|
import { Planet } from '@phosphor-icons/react';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { getSpace } from '@dxos/client/echo';
|
|
9
|
+
import { type Obj } from '@dxos/echo';
|
|
9
10
|
import { useClient } from '@dxos/react-client';
|
|
10
11
|
import { DropdownMenu, toLocalizedString, useTranslation } from '@dxos/react-ui';
|
|
11
12
|
|
|
12
13
|
import { SPACE_PLUGIN } from '../meta';
|
|
13
14
|
import { getSpaceDisplayName } from '../util';
|
|
14
15
|
|
|
15
|
-
export const MenuFooter = ({ object }: { object:
|
|
16
|
+
export const MenuFooter = ({ object }: { object: Obj.Any }) => {
|
|
16
17
|
const { t } = useTranslation(SPACE_PLUGIN);
|
|
17
18
|
const client = useClient();
|
|
18
19
|
const space = getSpace(object);
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback, useState } from 'react';
|
|
6
6
|
|
|
7
|
+
import { Obj } from '@dxos/echo';
|
|
7
8
|
import { ForeignKey } from '@dxos/echo-schema';
|
|
8
|
-
import { getMeta, type AnyLiveObject } from '@dxos/react-client/echo';
|
|
9
9
|
import { IconButton, useTranslation } from '@dxos/react-ui';
|
|
10
10
|
import { Form } from '@dxos/react-ui-form';
|
|
11
11
|
|
|
@@ -18,13 +18,13 @@ const initialValues = {
|
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
export type AdvancedObjectSettingsProps = {
|
|
21
|
-
object:
|
|
21
|
+
object: Obj.Any;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
export const AdvancedObjectSettings = ({ object }: AdvancedObjectSettingsProps) => {
|
|
25
25
|
const { t } = useTranslation(SPACE_PLUGIN);
|
|
26
26
|
const [adding, setAdding] = useState(false);
|
|
27
|
-
const keys = getMeta(object)
|
|
27
|
+
const { keys } = Obj.getMeta(object);
|
|
28
28
|
|
|
29
29
|
const handleNew = useCallback(() => setAdding(true), []);
|
|
30
30
|
const handleCancel = useCallback(() => setAdding(false), []);
|
|
@@ -66,7 +66,7 @@ export const AdvancedObjectSettings = ({ object }: AdvancedObjectSettingsProps)
|
|
|
66
66
|
{!adding && <ForeignKeys keys={keys} onDelete={handleDelete} />}
|
|
67
67
|
</div>
|
|
68
68
|
|
|
69
|
-
{adding && <Form schema={ForeignKey} values={initialValues} onSave={handleSave} onCancel={handleCancel} />}
|
|
69
|
+
{adding && <Form flush schema={ForeignKey} values={initialValues} onSave={handleSave} onCancel={handleCancel} />}
|
|
70
70
|
</>
|
|
71
71
|
);
|
|
72
72
|
};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { type PropsWithChildren, useRef } from 'react';
|
|
6
6
|
|
|
7
|
-
import { type
|
|
7
|
+
import { type Obj } from '@dxos/echo';
|
|
8
8
|
import { Input, type ThemedClassName, useTranslation } from '@dxos/react-ui';
|
|
9
9
|
import { mx } from '@dxos/react-ui-theme';
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@ import { meta } from '../../meta';
|
|
|
12
12
|
|
|
13
13
|
export type BaseObjectSettingsProps = ThemedClassName<
|
|
14
14
|
PropsWithChildren<{
|
|
15
|
-
object:
|
|
15
|
+
object: Obj.Any;
|
|
16
16
|
}>
|
|
17
17
|
>;
|
|
18
18
|
|
|
@@ -30,9 +30,10 @@ export const BaseObjectSettings = ({ classNames, children, object }: BaseObjectS
|
|
|
30
30
|
<Input.TextInput
|
|
31
31
|
ref={inputRef}
|
|
32
32
|
placeholder={t('name placeholder')}
|
|
33
|
-
|
|
33
|
+
// TODO(burdon): Use annotation to get the name field.
|
|
34
|
+
value={(object as any).name ?? ''}
|
|
34
35
|
onChange={(event) => {
|
|
35
|
-
object.name = event.target.value;
|
|
36
|
+
(object as any).name = event.target.value;
|
|
36
37
|
}}
|
|
37
38
|
onKeyDown={(event) => {
|
|
38
39
|
if (event.key === 'Enter') {
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
import React, { useMemo } from 'react';
|
|
6
6
|
|
|
7
7
|
import { Surface } from '@dxos/app-framework';
|
|
8
|
-
import { type
|
|
8
|
+
import { type Obj } from '@dxos/echo';
|
|
9
9
|
import { Clipboard } from '@dxos/react-ui';
|
|
10
10
|
import { StackItem } from '@dxos/react-ui-stack';
|
|
11
11
|
|
|
12
12
|
import { BaseObjectSettings } from './BaseObjectSettings';
|
|
13
13
|
|
|
14
14
|
export type ObjectSettingsContainerProps = {
|
|
15
|
-
object:
|
|
15
|
+
object: Obj.Any;
|
|
16
16
|
role: string;
|
|
17
17
|
};
|
|
18
18
|
|
|
@@ -21,7 +21,7 @@ export const ObjectSettingsContainer = ({ object, role }: ObjectSettingsContaine
|
|
|
21
21
|
|
|
22
22
|
return (
|
|
23
23
|
<Clipboard.Provider>
|
|
24
|
-
<StackItem.Content
|
|
24
|
+
<StackItem.Content role={role}>
|
|
25
25
|
<div className='flex flex-col overflow-y-auto divide-y divide-separator'>
|
|
26
26
|
<BaseObjectSettings object={object}>
|
|
27
27
|
<Surface role='base-object-settings' data={data} />
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useState, useEffect } from 'react';
|
|
6
6
|
|
|
7
|
-
import { type
|
|
7
|
+
import { type Type } from '@dxos/echo';
|
|
8
8
|
import { type Space } from '@dxos/react-client/echo';
|
|
9
9
|
import { useTranslation } from '@dxos/react-ui';
|
|
10
10
|
import { controlItemClasses, ControlPage, ControlSection } from '@dxos/react-ui-form';
|
|
@@ -21,8 +21,8 @@ type SchemaPanelProps = { space: Space };
|
|
|
21
21
|
/**
|
|
22
22
|
* Subscribe to and retrieve all schemas from a space's schema registry.
|
|
23
23
|
*/
|
|
24
|
-
export const useQuerySpaceSchemas = (space: Space):
|
|
25
|
-
const [schemas, setSchemas] = useState<
|
|
24
|
+
export const useQuerySpaceSchemas = (space: Space): Type.Schema[] => {
|
|
25
|
+
const [schemas, setSchemas] = useState<Type.Schema[]>([]);
|
|
26
26
|
|
|
27
27
|
useEffect(() => {
|
|
28
28
|
const query = space.db.schemaRegistry.query();
|
|
@@ -7,7 +7,7 @@ import React, { forwardRef, useCallback, useEffect, useState } from 'react';
|
|
|
7
7
|
|
|
8
8
|
import { useAppGraph, useCapability } from '@dxos/app-framework';
|
|
9
9
|
import { generateName } from '@dxos/display-name';
|
|
10
|
-
import { type
|
|
10
|
+
import { type Type } from '@dxos/echo';
|
|
11
11
|
import { PublicKey, useClient } from '@dxos/react-client';
|
|
12
12
|
import { getSpace, useMembers, type SpaceMember, fullyQualifiedId } from '@dxos/react-client/echo';
|
|
13
13
|
import { type Identity, useIdentity } from '@dxos/react-client/halo';
|
|
@@ -42,7 +42,7 @@ const noViewers = new ComplexMap<PublicKey, ObjectViewerProps>(PublicKey.hash);
|
|
|
42
42
|
// TODO(wittjosiah): Factor out?
|
|
43
43
|
const getName = (identity: Identity) => identity.profile?.displayName ?? generateName(identity.identityKey.toHex());
|
|
44
44
|
|
|
45
|
-
export const SpacePresence = ({ object, spaceKey }: { object: Expando; spaceKey?: PublicKey }) => {
|
|
45
|
+
export const SpacePresence = ({ object, spaceKey }: { object: Type.Expando; spaceKey?: PublicKey }) => {
|
|
46
46
|
// TODO(wittjosiah): Doesn't need to be mutable but readonly type messes with ComplexMap.
|
|
47
47
|
const spaceState = useCapability(SpaceCapabilities.MutableState);
|
|
48
48
|
const client = useClient();
|
|
@@ -149,19 +149,26 @@ export const FullPresence = (props: MemberPresenceProps) => {
|
|
|
149
149
|
<Popover.Portal>
|
|
150
150
|
<Popover.Content side='bottom'>
|
|
151
151
|
<Popover.Arrow />
|
|
152
|
-
<
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
152
|
+
<Popover.Viewport classNames='max-bs-56'>
|
|
153
|
+
<List>
|
|
154
|
+
{members.map((member) => (
|
|
155
|
+
<ListItem.Root
|
|
156
|
+
key={member.identity.identityKey.toHex()}
|
|
157
|
+
classNames='flex gap-2 items-center cursor-pointer mbe-2'
|
|
158
|
+
onClick={() => onMemberClick?.(member)}
|
|
159
|
+
data-testid='identity-list-item'
|
|
160
|
+
>
|
|
161
|
+
{/* TODO(Zan): Match always true now we're showing 'members viewing current object'. */}
|
|
162
|
+
<PresenceAvatar
|
|
163
|
+
identity={member.identity}
|
|
164
|
+
size={size}
|
|
165
|
+
showName
|
|
166
|
+
match={member.currentlyAttended}
|
|
167
|
+
/>
|
|
168
|
+
</ListItem.Root>
|
|
169
|
+
))}
|
|
170
|
+
</List>
|
|
171
|
+
</Popover.Viewport>
|
|
165
172
|
</Popover.Content>
|
|
166
173
|
</Popover.Portal>
|
|
167
174
|
</Popover.Root>
|
|
@@ -174,7 +174,8 @@ export const SpaceSettingsContainer = ({ space }: SpaceSettingsContainerProps) =
|
|
|
174
174
|
autoSave
|
|
175
175
|
onSave={handleSave}
|
|
176
176
|
Custom={customElements}
|
|
177
|
-
|
|
177
|
+
flush
|
|
178
|
+
classNames='container-max-width [&_[role="form"]]:grid [&_[role="form"]]:grid-cols-1 md:[&_[role="form"]]:grid-cols-[1fr_min-content] [&_[role="form"]]:gap-4'
|
|
178
179
|
/>
|
|
179
180
|
</ControlSection>
|
|
180
181
|
</ControlPage>
|
package/src/types/collection.ts
CHANGED
|
@@ -4,15 +4,24 @@
|
|
|
4
4
|
|
|
5
5
|
import { Schema } from 'effect';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { Type } from '@dxos/echo';
|
|
8
|
+
import { TypedObject } from '@dxos/echo-schema';
|
|
8
9
|
|
|
9
|
-
export class CollectionType extends TypedObject({
|
|
10
|
+
export class CollectionType extends TypedObject({
|
|
11
|
+
typename: 'dxos.org/type/Collection',
|
|
12
|
+
version: '0.1.0',
|
|
13
|
+
})({
|
|
10
14
|
name: Schema.optional(Schema.String),
|
|
11
|
-
objects: Schema.mutable(Schema.Array(Ref(Expando))),
|
|
15
|
+
objects: Schema.mutable(Schema.Array(Type.Ref(Type.Expando))),
|
|
12
16
|
// Key is schema typename and value is reference to a view object of the associated schema.
|
|
13
17
|
// Having collection reference the views rather than vice versa ensures that the state converges to a single view per key (i.e. type).
|
|
14
18
|
// This also leaves open a future where this key could be changed to allow for multiple stack views per section.
|
|
15
19
|
// TODO(wittjosiah): Any way to make this more type safe?
|
|
16
20
|
// TODO(wittjosiah): Should the views be separate objects or just be schemas for view data in this record?
|
|
17
|
-
views: Schema.mutable(
|
|
21
|
+
views: Schema.mutable(
|
|
22
|
+
Schema.Record({
|
|
23
|
+
key: Schema.String,
|
|
24
|
+
value: Type.Ref(Type.Expando),
|
|
25
|
+
}),
|
|
26
|
+
),
|
|
18
27
|
}) {}
|
package/src/types/types.ts
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
import { Schema } from 'effect';
|
|
6
6
|
|
|
7
7
|
import { type AnyIntentChain } from '@dxos/app-framework';
|
|
8
|
-
import {
|
|
8
|
+
import { Type } from '@dxos/echo';
|
|
9
|
+
import { type BaseObject, type TypedObject } from '@dxos/echo-schema';
|
|
9
10
|
import { type PublicKey } from '@dxos/react-client';
|
|
10
11
|
// TODO(wittjosiah): This pulls in full client.
|
|
11
12
|
import { EchoObjectSchema, ReactiveObjectSchema, type Space, SpaceSchema } from '@dxos/react-client/echo';
|
|
@@ -80,7 +81,7 @@ export type SpaceSettingsProps = Schema.Schema.Type<typeof SpaceSettingsSchema>;
|
|
|
80
81
|
|
|
81
82
|
export type SerializerMap = Record<string, TypedObjectSerializer>;
|
|
82
83
|
|
|
83
|
-
export interface TypedObjectSerializer<T extends Expando = Expando> {
|
|
84
|
+
export interface TypedObjectSerializer<T extends Type.Expando = Type.Expando> {
|
|
84
85
|
serialize(params: { object: T }): Promise<string>;
|
|
85
86
|
|
|
86
87
|
/**
|
|
@@ -242,8 +243,8 @@ export namespace SpaceAction {
|
|
|
242
243
|
space: SpaceSchema,
|
|
243
244
|
// TODO(wittjosiah): Relation schema.
|
|
244
245
|
schema: Schema.Any,
|
|
245
|
-
source: Expando,
|
|
246
|
-
target: Expando,
|
|
246
|
+
source: Type.Expando,
|
|
247
|
+
target: Type.Expando,
|
|
247
248
|
// TODO(wittjosiah): Type based on relation schema.
|
|
248
249
|
fields: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),
|
|
249
250
|
}),
|