@dxos/plugin-space 0.6.12 → 0.6.13-main.09887cd
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/{chunk-LZEGRS7H.mjs → chunk-AVLRQF6L.mjs} +1 -1
- package/dist/lib/browser/chunk-AVLRQF6L.mjs.map +7 -0
- package/dist/lib/browser/{chunk-DTVUOG2C.mjs → chunk-QK5I2EPF.mjs} +23 -4
- package/dist/lib/browser/chunk-QK5I2EPF.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +592 -246
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/meta.mjs +1 -1
- package/dist/lib/browser/types/index.mjs +7 -3
- package/dist/lib/node/{chunk-CVZPI2P3.cjs → chunk-HE2GHO6Z.cjs} +29 -8
- package/dist/lib/node/chunk-HE2GHO6Z.cjs.map +7 -0
- package/dist/lib/node/{chunk-6CNYF6YU.cjs → chunk-P4XUXM7Y.cjs} +4 -4
- package/dist/lib/node/chunk-P4XUXM7Y.cjs.map +7 -0
- package/dist/lib/node/index.cjs +812 -469
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.cjs +5 -5
- package/dist/lib/node/meta.cjs.map +1 -1
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/types/index.cjs +14 -10
- package/dist/lib/node/types/index.cjs.map +2 -2
- package/dist/lib/node-esm/chunk-2TR4WD6U.mjs +116 -0
- package/dist/lib/node-esm/chunk-2TR4WD6U.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-YPQGKWHJ.mjs +37 -0
- package/dist/lib/node-esm/chunk-YPQGKWHJ.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +2987 -0
- package/dist/lib/node-esm/index.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -0
- package/dist/lib/node-esm/meta.mjs +14 -0
- package/dist/lib/node-esm/meta.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +26 -0
- package/dist/lib/node-esm/types/index.mjs.map +7 -0
- package/dist/types/src/SpacePlugin.d.ts.map +1 -1
- package/dist/types/src/components/FallbackSettings.d.ts +8 -0
- package/dist/types/src/components/FallbackSettings.d.ts.map +1 -0
- package/dist/types/src/components/MenuFooter.d.ts.map +1 -1
- package/dist/types/src/components/SaveStatus.d.ts +3 -0
- package/dist/types/src/components/SaveStatus.d.ts.map +1 -0
- package/dist/types/src/components/ShareSpaceButton.stories.d.ts +4 -0
- package/dist/types/src/components/ShareSpaceButton.stories.d.ts.map +1 -1
- package/dist/types/src/components/SpaceMain/SpaceMain.d.ts.map +1 -1
- package/dist/types/src/components/SpacePresence.stories.d.ts +4 -0
- package/dist/types/src/components/SpacePresence.stories.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/SyncStatus.d.ts +13 -0
- package/dist/types/src/components/SyncStatus/SyncStatus.d.ts.map +1 -0
- package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts +117 -0
- package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts.map +1 -0
- package/dist/types/src/components/SyncStatus/index.d.ts +2 -0
- package/dist/types/src/components/SyncStatus/index.d.ts.map +1 -0
- package/dist/types/src/components/SyncStatus/types.d.ts +14 -0
- package/dist/types/src/components/SyncStatus/types.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +3 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +4 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/thread.d.ts +14 -0
- package/dist/types/src/types/thread.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +18 -1
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +1 -4
- package/dist/types/src/util.d.ts.map +1 -1
- package/package.json +44 -36
- package/src/SpacePlugin.tsx +145 -83
- package/src/components/FallbackSettings.tsx +35 -0
- package/src/components/MenuFooter.tsx +1 -0
- package/src/components/SaveStatus.tsx +95 -0
- package/src/components/SpaceMain/SpaceMain.tsx +1 -22
- package/src/components/SpacePresence.tsx +1 -1
- package/src/components/SpaceSettings.tsx +32 -3
- package/src/components/SyncStatus/SyncStatus.stories.tsx +62 -0
- package/src/components/SyncStatus/SyncStatus.tsx +188 -0
- package/src/components/SyncStatus/index.ts +5 -0
- package/src/components/SyncStatus/types.ts +77 -0
- package/src/components/index.ts +3 -2
- package/src/meta.ts +3 -1
- package/src/translations.ts +4 -0
- package/src/types/collection.ts +1 -1
- package/src/types/thread.ts +11 -1
- package/src/types/types.ts +25 -1
- package/src/util.tsx +15 -50
- package/dist/lib/browser/chunk-DTVUOG2C.mjs.map +0 -7
- package/dist/lib/browser/chunk-LZEGRS7H.mjs.map +0 -7
- package/dist/lib/node/chunk-6CNYF6YU.cjs.map +0 -7
- package/dist/lib/node/chunk-CVZPI2P3.cjs.map +0 -7
- package/dist/types/src/components/EmptySpace.d.ts +0 -3
- package/dist/types/src/components/EmptySpace.d.ts.map +0 -1
- package/dist/types/src/components/EmptyTree.d.ts +0 -3
- package/dist/types/src/components/EmptyTree.d.ts.map +0 -1
- package/src/components/EmptySpace.tsx +0 -25
- package/src/components/EmptyTree.tsx +0 -25
package/src/util.tsx
CHANGED
|
@@ -2,24 +2,6 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
CardsThree,
|
|
7
|
-
Database,
|
|
8
|
-
PencilSimpleLine,
|
|
9
|
-
Planet,
|
|
10
|
-
Plus,
|
|
11
|
-
Trash,
|
|
12
|
-
Users,
|
|
13
|
-
X,
|
|
14
|
-
ClockCounterClockwise,
|
|
15
|
-
type IconProps,
|
|
16
|
-
LockSimpleOpen,
|
|
17
|
-
LockSimple,
|
|
18
|
-
Placeholder,
|
|
19
|
-
Link,
|
|
20
|
-
} from '@phosphor-icons/react';
|
|
21
|
-
import React from 'react';
|
|
22
|
-
|
|
23
5
|
import { type MetadataResolver, NavigationAction, type IntentDispatcher } from '@dxos/app-framework';
|
|
24
6
|
import {
|
|
25
7
|
type EchoReactiveObject,
|
|
@@ -218,8 +200,7 @@ export const constructSpaceNode = ({
|
|
|
218
200
|
...partials,
|
|
219
201
|
label: getSpaceDisplayName(space, { personal, namesCache }),
|
|
220
202
|
description: space.state.get() === SpaceState.SPACE_READY && space.properties.description,
|
|
221
|
-
icon:
|
|
222
|
-
iconSymbol: 'ph--planet--regular',
|
|
203
|
+
icon: 'ph--planet--regular',
|
|
223
204
|
disabled: space.state.get() !== SpaceState.SPACE_READY || hasPendingMigration,
|
|
224
205
|
testId: 'spacePlugin.space',
|
|
225
206
|
},
|
|
@@ -243,8 +224,7 @@ export const constructSpaceActionGroups = ({ space, dispatch }: { space: Space;
|
|
|
243
224
|
data: actionGroupSymbol,
|
|
244
225
|
properties: {
|
|
245
226
|
label: ['create object in space label', { ns: SPACE_PLUGIN }],
|
|
246
|
-
icon:
|
|
247
|
-
iconSymbol: 'ph--plus--regular',
|
|
227
|
+
icon: 'ph--plus--regular',
|
|
248
228
|
disposition: 'toolbar',
|
|
249
229
|
// TODO(wittjosiah): This is currently a navtree feature. Address this with cmd+k integration.
|
|
250
230
|
// mainAreaDisposition: 'in-flow',
|
|
@@ -268,8 +248,7 @@ export const constructSpaceActionGroups = ({ space, dispatch }: { space: Space;
|
|
|
268
248
|
]),
|
|
269
249
|
properties: {
|
|
270
250
|
label: ['create collection label', { ns: SPACE_PLUGIN }],
|
|
271
|
-
icon:
|
|
272
|
-
iconSymbol: 'ph--cards-three--regular',
|
|
251
|
+
icon: 'ph--cards-three--regular',
|
|
273
252
|
testId: 'spacePlugin.createCollection',
|
|
274
253
|
},
|
|
275
254
|
},
|
|
@@ -305,8 +284,7 @@ export const constructSpaceActions = ({
|
|
|
305
284
|
},
|
|
306
285
|
properties: {
|
|
307
286
|
label: ['migrate space label', { ns: SPACE_PLUGIN }],
|
|
308
|
-
icon:
|
|
309
|
-
iconSymbol: 'ph--database--regular',
|
|
287
|
+
icon: 'ph--database--regular',
|
|
310
288
|
disposition: 'toolbar',
|
|
311
289
|
mainAreaDisposition: 'in-flow',
|
|
312
290
|
disabled: migrating || Migrations.running(space),
|
|
@@ -328,8 +306,7 @@ export const constructSpaceActions = ({
|
|
|
328
306
|
},
|
|
329
307
|
properties: {
|
|
330
308
|
label: ['share space label', { ns: SPACE_PLUGIN }],
|
|
331
|
-
icon:
|
|
332
|
-
iconSymbol: 'ph--users--regular',
|
|
309
|
+
icon: 'ph--users--regular',
|
|
333
310
|
disabled: locked,
|
|
334
311
|
keyBinding: {
|
|
335
312
|
macos: 'meta+.',
|
|
@@ -350,10 +327,7 @@ export const constructSpaceActions = ({
|
|
|
350
327
|
},
|
|
351
328
|
properties: {
|
|
352
329
|
label: [locked ? 'unlock space label' : 'lock space label', { ns: SPACE_PLUGIN }],
|
|
353
|
-
icon: locked
|
|
354
|
-
? (props: IconProps) => <LockSimpleOpen {...props} />
|
|
355
|
-
: (props: IconProps) => <LockSimple {...props} />,
|
|
356
|
-
iconSymbol: locked ? 'ph--lock-simple-open--regular' : 'ph--lock-simple--regular',
|
|
330
|
+
icon: locked ? 'ph--lock-simple-open--regular' : 'ph--lock-simple--regular',
|
|
357
331
|
},
|
|
358
332
|
},
|
|
359
333
|
{
|
|
@@ -364,8 +338,7 @@ export const constructSpaceActions = ({
|
|
|
364
338
|
},
|
|
365
339
|
properties: {
|
|
366
340
|
label: ['rename space label', { ns: SPACE_PLUGIN }],
|
|
367
|
-
icon:
|
|
368
|
-
iconSymbol: 'ph--pencil-simple-line--regular',
|
|
341
|
+
icon: 'ph--pencil-simple-line--regular',
|
|
369
342
|
keyBinding: {
|
|
370
343
|
macos: 'shift+F6',
|
|
371
344
|
windows: 'shift+F6',
|
|
@@ -385,8 +358,7 @@ export const constructSpaceActions = ({
|
|
|
385
358
|
},
|
|
386
359
|
properties: {
|
|
387
360
|
label: ['close space label', { ns: SPACE_PLUGIN }],
|
|
388
|
-
icon:
|
|
389
|
-
iconSymbol: 'ph--x--regular',
|
|
361
|
+
icon: 'ph--x--regular',
|
|
390
362
|
mainAreaDisposition: 'menu',
|
|
391
363
|
disabled: personal,
|
|
392
364
|
},
|
|
@@ -402,8 +374,7 @@ export const constructSpaceActions = ({
|
|
|
402
374
|
},
|
|
403
375
|
properties: {
|
|
404
376
|
label: ['open space label', { ns: SPACE_PLUGIN }],
|
|
405
|
-
icon:
|
|
406
|
-
iconSymbol: 'ph--clock-counter-clockwise--regular',
|
|
377
|
+
icon: 'ph--clock-counter-clockwise--regular',
|
|
407
378
|
disposition: 'toolbar',
|
|
408
379
|
mainAreaDisposition: 'in-flow',
|
|
409
380
|
},
|
|
@@ -446,8 +417,7 @@ export const createObjectNode = ({
|
|
|
446
417
|
label: metadata.label?.(object) ||
|
|
447
418
|
object.name ||
|
|
448
419
|
metadata.placeholder || ['unnamed object label', { ns: SPACE_PLUGIN }],
|
|
449
|
-
icon: metadata.icon ??
|
|
450
|
-
iconSymbol: metadata.iconSymbol ?? 'ph--placeholder--regular',
|
|
420
|
+
icon: metadata.icon ?? 'ph--placeholder--regular',
|
|
451
421
|
testId: 'spacePlugin.object',
|
|
452
422
|
persistenceClass: 'echo',
|
|
453
423
|
persistenceKey: space?.id,
|
|
@@ -475,8 +445,7 @@ export const constructObjectActionGroups = ({
|
|
|
475
445
|
data: actionGroupSymbol,
|
|
476
446
|
properties: {
|
|
477
447
|
label: ['create object in collection label', { ns: SPACE_PLUGIN }],
|
|
478
|
-
icon:
|
|
479
|
-
iconSymbol: 'ph--plus--regular',
|
|
448
|
+
icon: 'ph--plus--regular',
|
|
480
449
|
disposition: 'toolbar',
|
|
481
450
|
// TODO(wittjosiah): This is currently a navtree feature. Address this with cmd+k integration.
|
|
482
451
|
// mainAreaDisposition: 'in-flow',
|
|
@@ -500,8 +469,7 @@ export const constructObjectActionGroups = ({
|
|
|
500
469
|
]),
|
|
501
470
|
properties: {
|
|
502
471
|
label: ['create collection label', { ns: SPACE_PLUGIN }],
|
|
503
|
-
icon:
|
|
504
|
-
iconSymbol: 'ph--cards-three--regular',
|
|
472
|
+
icon: 'ph--cards-three--regular',
|
|
505
473
|
testId: 'spacePlugin.createCollection',
|
|
506
474
|
},
|
|
507
475
|
},
|
|
@@ -536,8 +504,7 @@ export const constructObjectActions = ({
|
|
|
536
504
|
object instanceof CollectionType ? 'rename collection label' : 'rename object label',
|
|
537
505
|
{ ns: SPACE_PLUGIN },
|
|
538
506
|
],
|
|
539
|
-
icon:
|
|
540
|
-
iconSymbol: 'ph--pencil-simple-line--regular',
|
|
507
|
+
icon: 'ph--pencil-simple-line--regular',
|
|
541
508
|
// TODO(wittjosiah): Doesn't work.
|
|
542
509
|
// keyBinding: 'shift+F6',
|
|
543
510
|
testId: 'spacePlugin.renameObject',
|
|
@@ -563,8 +530,7 @@ export const constructObjectActions = ({
|
|
|
563
530
|
object instanceof CollectionType ? 'delete collection label' : 'delete object label',
|
|
564
531
|
{ ns: SPACE_PLUGIN },
|
|
565
532
|
],
|
|
566
|
-
icon:
|
|
567
|
-
iconSymbol: 'ph--trash--regular',
|
|
533
|
+
icon: 'ph--trash--regular',
|
|
568
534
|
keyBinding: object instanceof CollectionType ? undefined : 'shift+meta+Backspace',
|
|
569
535
|
testId: 'spacePlugin.deleteObject',
|
|
570
536
|
},
|
|
@@ -578,8 +544,7 @@ export const constructObjectActions = ({
|
|
|
578
544
|
},
|
|
579
545
|
properties: {
|
|
580
546
|
label: ['copy link label', { ns: SPACE_PLUGIN }],
|
|
581
|
-
icon:
|
|
582
|
-
iconSymbol: 'ph--link--regular',
|
|
547
|
+
icon: 'ph--link--regular',
|
|
583
548
|
testId: 'spacePlugin.copyLink',
|
|
584
549
|
},
|
|
585
550
|
},
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/types/collection.ts", "../../../src/types/thread.ts", "../../../src/types/types.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Expando, ref, S, TypedObject } from '@dxos/echo-schema';\n\nexport class CollectionType extends TypedObject({ typename: 'dxos.org/type/Collection', version: '0.1.0' })({\n name: S.optional(S.String),\n objects: S.mutable(S.Array(ref(Expando))),\n // Key is schema typename and value is reference to a view object of the associated schema.\n // Having collection reference the views rather than vice versa ensures that the state converges to a single view per key (i.e. type).\n // This also leaves open a future where this key could be changed to allow for multiple stack views per section.\n // TODO(wittjosiah): Any way to make this more type safe?\n // TODO(wittjosiah): Should the views be separate objects or just be schemas for view data in this record?\n views: S.mutable(S.Record(S.String, ref(Expando))),\n}) {}\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { Expando, ref, S, TypedObject } from '@dxos/echo-schema';\n\n// TODO(wittjosiah): These types were placed here rather than in @dxos/plugin-thread\n// in order to avoid a circular dependency between threads and other objects that use threads.\n\n// TODO(wittjosiah): Factor out to halo?\nexport class ContactType extends TypedObject({ typename: 'dxos.org/type/Contact', version: '0.1.0' })({\n name: S.optional(S.String),\n identifiers: S.mutable(\n S.Array(\n S.Struct({\n type: S.String,\n value: S.String,\n }),\n ),\n ),\n}) {}\n\nexport const ActorSchema = S.mutable(\n S.Struct({\n contact: S.optional(ref(ContactType)),\n // TODO(wittjosiah): Should the below fields just be the contact schema?\n // i.e. it should either be a reference to an existing contact or an inline contact schema.\n identityKey: S.optional(S.String),\n // TODO(burdon): Generalize to handle/identifier?\n email: S.optional(S.String),\n name: S.optional(S.String),\n }),\n);\n\nexport type ActorType = S.Schema.Type<typeof ActorSchema>;\n\nexport class MessageType extends TypedObject({ typename: 'dxos.org/type/Message', version: '0.1.0' })({\n /** ISO date string when the message was sent. */\n timestamp: S.String,\n /** Identity of the message sender. */\n sender: ActorSchema,\n /** Text content of the message. */\n text: S.String,\n /** Non-text content sent with a message (e.g. files, polls, etc.) */\n parts: S.optional(S.mutable(S.Array(ref(Expando)))),\n /** Custom properties for specific message types (e.g. email subject or cc fields). */\n properties: S.optional(S.mutable(S.Record(S.String, S.Any))),\n // TODO(wittjosiah): Add read status:\n // - Read receipts need to be per space member.\n // - Read receipts don't need to be added to schema until they being implemented.\n /** Context of the application when message was created. */\n // TODO(burdon): Evolve \"attention object\" to be current UX state? E.g., of Deck?\n context: S.optional(ref(Expando)),\n}) {}\n\nexport const ThreadStatus = S.Union(S.Literal('staged'), S.Literal('active'), S.Literal('resolved'));\n\nexport class ThreadType extends TypedObject({ typename: 'dxos.org/type/Thread', version: '0.1.0' })({\n name: S.optional(S.String),\n anchor: S.optional(S.String),\n status: S.optional(ThreadStatus),\n messages: S.mutable(S.Array(ref(MessageType))),\n}) {}\n\nexport class ChannelType extends TypedObject({ typename: 'dxos.org/type/Channel', version: '0.1.0' })({\n name: S.optional(S.String),\n threads: S.mutable(S.Array(ref(ThreadType))),\n}) {}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport type {\n GraphBuilderProvides,\n GraphSerializerProvides,\n IntentResolverProvides,\n MetadataRecordsProvides,\n SettingsProvides,\n SurfaceProvides,\n TranslationsProvides,\n} from '@dxos/app-framework';\nimport { type Expando } from '@dxos/echo-schema';\nimport { type SchemaProvides } from '@dxos/plugin-client';\nimport { type PublicKey } from '@dxos/react-client';\nimport { type ComplexMap } from '@dxos/util';\n\nexport const SPACE_DIRECTORY_HANDLE = 'dxos.org/plugin/space/directory';\n\nexport type ObjectViewerProps = {\n lastSeen: number;\n currentlyAttended: boolean;\n};\n\nexport type ObjectId = string;\n\nexport type PluginState = {\n /**\n * Which objects are currently being viewed by which peers.\n */\n viewersByObject: Record<ObjectId, ComplexMap<PublicKey, ObjectViewerProps>>;\n\n /**\n * Which peers are currently viewing which objects.\n */\n viewersByIdentity: ComplexMap<PublicKey, Set<ObjectId>>;\n\n /**\n * Object that was linked to directly but not found and is being awaited.\n */\n awaiting: string | undefined;\n\n /**\n * Cached space names, used when spaces are closed or loading.\n */\n spaceNames: Record<string, string>;\n\n /**\n * Which spaces have an SDK migration running currently.\n */\n // TODO(wittjosiah): Factor out to sdk. Migration running should probably be a space state.\n sdkMigrationRunning: Record<string, boolean>;\n};\n\nexport type SpaceSettingsProps = { showHidden?: boolean };\n\nexport type SpacePluginProvides = SurfaceProvides &\n IntentResolverProvides &\n GraphBuilderProvides &\n GraphSerializerProvides &\n MetadataRecordsProvides &\n SettingsProvides<SpaceSettingsProps> &\n TranslationsProvides &\n SchemaProvides & {\n space: Readonly<PluginState>;\n };\n\n// TODO(wittjosiah): Reconcile with graph export serializers.\n\nexport type SerializerMap = Record<string, TypedObjectSerializer>;\n\nexport interface TypedObjectSerializer<T extends Expando = Expando> {\n serialize(params: { object: T }): Promise<string>;\n\n /**\n * @param params.content\n * @param params.newId Generate new ID for deserialized object.\n */\n deserialize(params: { content: string; newId?: boolean }): Promise<T>;\n}\n"],
|
|
5
|
-
"mappings": ";AAIA,SAASA,SAASC,KAAKC,GAAGC,mBAAmB;AAEtC,IAAMC,iBAAN,cAA6BC,YAAY;EAAEC,UAAU;EAA4BC,SAAS;AAAQ,CAAA,EAAG;EAC1GC,MAAMC,EAAEC,SAASD,EAAEE,MAAM;EACzBC,SAASH,EAAEI,QAAQJ,EAAEK,MAAMC,IAAIC,OAAAA,CAAAA,CAAAA;;;;;;EAM/BC,OAAOR,EAAEI,QAAQJ,EAAES,OAAOT,EAAEE,QAAQI,IAAIC,OAAAA,CAAAA,CAAAA;AAC1C,CAAA,EAAA;AAAI;;;ACXJ,SAASG,WAAAA,UAASC,OAAAA,MAAKC,KAAAA,IAAGC,eAAAA,oBAAmB;AAMtC,IAAMC,cAAN,cAA0BC,aAAY;EAAEC,UAAU;EAAyBC,SAAS;AAAQ,CAAA,EAAG;EACpGC,MAAMC,GAAEC,SAASD,GAAEE,MAAM;EACzBC,aAAaH,GAAEI,QACbJ,GAAEK,MACAL,GAAEM,OAAO;IACPC,MAAMP,GAAEE;IACRM,OAAOR,GAAEE;EACX,CAAA,CAAA,CAAA;AAGN,CAAA,EAAA;AAAI;AAEG,IAAMO,cAAcT,GAAEI,QAC3BJ,GAAEM,OAAO;EACPI,SAASV,GAAEC,SAASU,KAAIhB,WAAAA,CAAAA;;;EAGxBiB,aAAaZ,GAAEC,SAASD,GAAEE,MAAM;;EAEhCW,OAAOb,GAAEC,SAASD,GAAEE,MAAM;EAC1BH,MAAMC,GAAEC,SAASD,GAAEE,MAAM;AAC3B,CAAA,CAAA;AAKK,IAAMY,cAAN,cAA0BlB,aAAY;EAAEC,UAAU;EAAyBC,SAAS;AAAQ,CAAA,EAAG;;EAEpGiB,WAAWf,GAAEE;;EAEbc,QAAQP;;EAERQ,MAAMjB,GAAEE;;EAERgB,OAAOlB,GAAEC,SAASD,GAAEI,QAAQJ,GAAEK,MAAMM,KAAIQ,QAAAA,CAAAA,CAAAA,CAAAA;;EAExCC,YAAYpB,GAAEC,SAASD,GAAEI,QAAQJ,GAAEqB,OAAOrB,GAAEE,QAAQF,GAAEsB,GAAG,CAAA,CAAA;;;;;;EAMzDC,SAASvB,GAAEC,SAASU,KAAIQ,QAAAA,CAAAA;AAC1B,CAAA,EAAA;AAAI;AAEG,IAAMK,eAAexB,GAAEyB,MAAMzB,GAAE0B,QAAQ,QAAA,GAAW1B,GAAE0B,QAAQ,QAAA,GAAW1B,GAAE0B,QAAQ,UAAA,CAAA;AAEjF,IAAMC,aAAN,cAAyB/B,aAAY;EAAEC,UAAU;EAAwBC,SAAS;AAAQ,CAAA,EAAG;EAClGC,MAAMC,GAAEC,SAASD,GAAEE,MAAM;EACzB0B,QAAQ5B,GAAEC,SAASD,GAAEE,MAAM;EAC3B2B,QAAQ7B,GAAEC,SAASuB,YAAAA;EACnBM,UAAU9B,GAAEI,QAAQJ,GAAEK,MAAMM,KAAIG,WAAAA,CAAAA,CAAAA;AAClC,CAAA,EAAA;AAAI;AAEG,IAAMiB,cAAN,cAA0BnC,aAAY;EAAEC,UAAU;EAAyBC,SAAS;AAAQ,CAAA,EAAG;EACpGC,MAAMC,GAAEC,SAASD,GAAEE,MAAM;EACzB8B,SAAShC,GAAEI,QAAQJ,GAAEK,MAAMM,KAAIgB,UAAAA,CAAAA,CAAAA;AACjC,CAAA,EAAA;AAAI;;;ACjDG,IAAMM,yBAAyB;",
|
|
6
|
-
"names": ["Expando", "ref", "S", "TypedObject", "CollectionType", "TypedObject", "typename", "version", "name", "S", "optional", "String", "objects", "mutable", "Array", "ref", "Expando", "views", "Record", "Expando", "ref", "S", "TypedObject", "ContactType", "TypedObject", "typename", "version", "name", "S", "optional", "String", "identifiers", "mutable", "Array", "Struct", "type", "value", "ActorSchema", "contact", "ref", "identityKey", "email", "MessageType", "timestamp", "sender", "text", "parts", "Expando", "properties", "Record", "Any", "context", "ThreadStatus", "Union", "Literal", "ThreadType", "anchor", "status", "messages", "ChannelType", "threads", "SPACE_DIRECTORY_HANDLE"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/meta.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nexport const SPACE_PLUGIN = 'dxos.org/plugin/space';\nexport const SPACE_PLUGIN_SHORT_ID = 'space';\n\nexport default {\n id: SPACE_PLUGIN,\n shortId: SPACE_PLUGIN_SHORT_ID,\n name: 'Spaces',\n};\n\nconst SPACE_ACTION = `${SPACE_PLUGIN}/action`;\nexport enum SpaceAction {\n CREATE = `${SPACE_ACTION}/create`,\n JOIN = `${SPACE_ACTION}/join`,\n SHARE = `${SPACE_ACTION}/share`,\n LOCK = `${SPACE_ACTION}/lock`,\n UNLOCK = `${SPACE_ACTION}/unlock`,\n RENAME = `${SPACE_ACTION}/rename`,\n OPEN = `${SPACE_ACTION}/open`,\n CLOSE = `${SPACE_ACTION}/close`,\n MIGRATE = `${SPACE_ACTION}/migrate`,\n ADD_OBJECT = `${SPACE_ACTION}/add-object`,\n REMOVE_OBJECT = `${SPACE_ACTION}/remove-object`,\n RENAME_OBJECT = `${SPACE_ACTION}/rename-object`,\n DUPLICATE_OBJECT = `${SPACE_ACTION}/duplicate-object`,\n WAIT_FOR_OBJECT = `${SPACE_ACTION}/wait-for-object`,\n TOGGLE_HIDDEN = `${SPACE_ACTION}/toggle-hidden`,\n}\n"],
|
|
5
|
-
"mappings": ";AAIO,IAAMA,eAAe;AACrB,IAAMC,wBAAwB;AAErC,IAAA,eAAe;EACbC,IAAIF;EACJG,SAASF;EACTG,MAAM;AACR;AAEA,IAAMC,eAAe,GAAGL,YAAAA;;UACZM,cAAAA;wCACD,GAAGD,YAAAA,SAAqB,IAAA;sCAC1B,GAAGA,YAAAA,OAAmB,IAAA;uCACrB,GAAGA,YAAAA,QAAoB,IAAA;sCACxB,GAAGA,YAAAA,OAAmB,IAAA;wCACpB,GAAGA,YAAAA,SAAqB,IAAA;wCACxB,GAAGA,YAAAA,SAAqB,IAAA;sCAC1B,GAAGA,YAAAA,OAAmB,IAAA;uCACrB,GAAGA,YAAAA,QAAoB,IAAA;yCACrB,GAAGA,YAAAA,UAAsB,IAAA;4CACtB,GAAGA,YAAAA,aAAyB,IAAA;+CACzB,GAAGA,YAAAA,gBAA4B,IAAA;+CAC/B,GAAGA,YAAAA,gBAA4B,IAAA;kDAC5B,GAAGA,YAAAA,mBAA+B,IAAA;iDACnC,GAAGA,YAAAA,kBAA8B,IAAA;+CACnC,GAAGA,YAAAA,gBAA4B,IAAA;GAfrCC,gBAAAA,cAAAA,CAAAA,EAAAA;",
|
|
6
|
-
"names": ["SPACE_PLUGIN", "SPACE_PLUGIN_SHORT_ID", "id", "shortId", "name", "SPACE_ACTION", "SpaceAction"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/meta.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nexport const SPACE_PLUGIN = 'dxos.org/plugin/space';\nexport const SPACE_PLUGIN_SHORT_ID = 'space';\n\nexport default {\n id: SPACE_PLUGIN,\n shortId: SPACE_PLUGIN_SHORT_ID,\n name: 'Spaces',\n};\n\nconst SPACE_ACTION = `${SPACE_PLUGIN}/action`;\nexport enum SpaceAction {\n CREATE = `${SPACE_ACTION}/create`,\n JOIN = `${SPACE_ACTION}/join`,\n SHARE = `${SPACE_ACTION}/share`,\n LOCK = `${SPACE_ACTION}/lock`,\n UNLOCK = `${SPACE_ACTION}/unlock`,\n RENAME = `${SPACE_ACTION}/rename`,\n OPEN = `${SPACE_ACTION}/open`,\n CLOSE = `${SPACE_ACTION}/close`,\n MIGRATE = `${SPACE_ACTION}/migrate`,\n ADD_OBJECT = `${SPACE_ACTION}/add-object`,\n REMOVE_OBJECT = `${SPACE_ACTION}/remove-object`,\n RENAME_OBJECT = `${SPACE_ACTION}/rename-object`,\n DUPLICATE_OBJECT = `${SPACE_ACTION}/duplicate-object`,\n WAIT_FOR_OBJECT = `${SPACE_ACTION}/wait-for-object`,\n TOGGLE_HIDDEN = `${SPACE_ACTION}/toggle-hidden`,\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;AAIO,IAAMA,eAAe;AACrB,IAAMC,wBAAwB;AAErC,IAAA,eAAe;EACbC,IAAIF;EACJG,SAASF;EACTG,MAAM;AACR;AAEA,IAAMC,eAAe,GAAGL,YAAAA;;UACZM,cAAAA;wCACD,GAAGD,YAAAA,SAAqB,IAAA;sCAC1B,GAAGA,YAAAA,OAAmB,IAAA;uCACrB,GAAGA,YAAAA,QAAoB,IAAA;sCACxB,GAAGA,YAAAA,OAAmB,IAAA;wCACpB,GAAGA,YAAAA,SAAqB,IAAA;wCACxB,GAAGA,YAAAA,SAAqB,IAAA;sCAC1B,GAAGA,YAAAA,OAAmB,IAAA;uCACrB,GAAGA,YAAAA,QAAoB,IAAA;yCACrB,GAAGA,YAAAA,UAAsB,IAAA;4CACtB,GAAGA,YAAAA,aAAyB,IAAA;+CACzB,GAAGA,YAAAA,gBAA4B,IAAA;+CAC/B,GAAGA,YAAAA,gBAA4B,IAAA;kDAC5B,GAAGA,YAAAA,mBAA+B,IAAA;iDACnC,GAAGA,YAAAA,kBAA8B,IAAA;+CACnC,GAAGA,YAAAA,gBAA4B,IAAA;GAfrCC,gBAAAA,cAAAA,CAAAA,EAAAA;",
|
|
6
|
-
"names": ["SPACE_PLUGIN", "SPACE_PLUGIN_SHORT_ID", "id", "shortId", "name", "SPACE_ACTION", "SpaceAction"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/types/collection.ts", "../../../src/types/thread.ts", "../../../src/types/types.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Expando, ref, S, TypedObject } from '@dxos/echo-schema';\n\nexport class CollectionType extends TypedObject({ typename: 'dxos.org/type/Collection', version: '0.1.0' })({\n name: S.optional(S.String),\n objects: S.mutable(S.Array(ref(Expando))),\n // Key is schema typename and value is reference to a view object of the associated schema.\n // Having collection reference the views rather than vice versa ensures that the state converges to a single view per key (i.e. type).\n // This also leaves open a future where this key could be changed to allow for multiple stack views per section.\n // TODO(wittjosiah): Any way to make this more type safe?\n // TODO(wittjosiah): Should the views be separate objects or just be schemas for view data in this record?\n views: S.mutable(S.Record(S.String, ref(Expando))),\n}) {}\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { Expando, ref, S, TypedObject } from '@dxos/echo-schema';\n\n// TODO(wittjosiah): These types were placed here rather than in @dxos/plugin-thread\n// in order to avoid a circular dependency between threads and other objects that use threads.\n\n// TODO(wittjosiah): Factor out to halo?\nexport class ContactType extends TypedObject({ typename: 'dxos.org/type/Contact', version: '0.1.0' })({\n name: S.optional(S.String),\n identifiers: S.mutable(\n S.Array(\n S.Struct({\n type: S.String,\n value: S.String,\n }),\n ),\n ),\n}) {}\n\nexport const ActorSchema = S.mutable(\n S.Struct({\n contact: S.optional(ref(ContactType)),\n // TODO(wittjosiah): Should the below fields just be the contact schema?\n // i.e. it should either be a reference to an existing contact or an inline contact schema.\n identityKey: S.optional(S.String),\n // TODO(burdon): Generalize to handle/identifier?\n email: S.optional(S.String),\n name: S.optional(S.String),\n }),\n);\n\nexport type ActorType = S.Schema.Type<typeof ActorSchema>;\n\nexport class MessageType extends TypedObject({ typename: 'dxos.org/type/Message', version: '0.1.0' })({\n /** ISO date string when the message was sent. */\n timestamp: S.String,\n /** Identity of the message sender. */\n sender: ActorSchema,\n /** Text content of the message. */\n text: S.String,\n /** Non-text content sent with a message (e.g. files, polls, etc.) */\n parts: S.optional(S.mutable(S.Array(ref(Expando)))),\n /** Custom properties for specific message types (e.g. email subject or cc fields). */\n properties: S.optional(S.mutable(S.Record(S.String, S.Any))),\n // TODO(wittjosiah): Add read status:\n // - Read receipts need to be per space member.\n // - Read receipts don't need to be added to schema until they being implemented.\n /** Context of the application when message was created. */\n // TODO(burdon): Evolve \"attention object\" to be current UX state? E.g., of Deck?\n context: S.optional(ref(Expando)),\n}) {}\n\nexport const ThreadStatus = S.Union(S.Literal('staged'), S.Literal('active'), S.Literal('resolved'));\n\nexport class ThreadType extends TypedObject({ typename: 'dxos.org/type/Thread', version: '0.1.0' })({\n name: S.optional(S.String),\n anchor: S.optional(S.String),\n status: S.optional(ThreadStatus),\n messages: S.mutable(S.Array(ref(MessageType))),\n}) {}\n\nexport class ChannelType extends TypedObject({ typename: 'dxos.org/type/Channel', version: '0.1.0' })({\n name: S.optional(S.String),\n threads: S.mutable(S.Array(ref(ThreadType))),\n}) {}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport type {\n GraphBuilderProvides,\n GraphSerializerProvides,\n IntentResolverProvides,\n MetadataRecordsProvides,\n SettingsProvides,\n SurfaceProvides,\n TranslationsProvides,\n} from '@dxos/app-framework';\nimport { type Expando } from '@dxos/echo-schema';\nimport { type SchemaProvides } from '@dxos/plugin-client';\nimport { type PublicKey } from '@dxos/react-client';\nimport { type ComplexMap } from '@dxos/util';\n\nexport const SPACE_DIRECTORY_HANDLE = 'dxos.org/plugin/space/directory';\n\nexport type ObjectViewerProps = {\n lastSeen: number;\n currentlyAttended: boolean;\n};\n\nexport type ObjectId = string;\n\nexport type PluginState = {\n /**\n * Which objects are currently being viewed by which peers.\n */\n viewersByObject: Record<ObjectId, ComplexMap<PublicKey, ObjectViewerProps>>;\n\n /**\n * Which peers are currently viewing which objects.\n */\n viewersByIdentity: ComplexMap<PublicKey, Set<ObjectId>>;\n\n /**\n * Object that was linked to directly but not found and is being awaited.\n */\n awaiting: string | undefined;\n\n /**\n * Cached space names, used when spaces are closed or loading.\n */\n spaceNames: Record<string, string>;\n\n /**\n * Which spaces have an SDK migration running currently.\n */\n // TODO(wittjosiah): Factor out to sdk. Migration running should probably be a space state.\n sdkMigrationRunning: Record<string, boolean>;\n};\n\nexport type SpaceSettingsProps = { showHidden?: boolean };\n\nexport type SpacePluginProvides = SurfaceProvides &\n IntentResolverProvides &\n GraphBuilderProvides &\n GraphSerializerProvides &\n MetadataRecordsProvides &\n SettingsProvides<SpaceSettingsProps> &\n TranslationsProvides &\n SchemaProvides & {\n space: Readonly<PluginState>;\n };\n\n// TODO(wittjosiah): Reconcile with graph export serializers.\n\nexport type SerializerMap = Record<string, TypedObjectSerializer>;\n\nexport interface TypedObjectSerializer<T extends Expando = Expando> {\n serialize(params: { object: T }): Promise<string>;\n\n /**\n * @param params.content\n * @param params.newId Generate new ID for deserialized object.\n */\n deserialize(params: { content: string; newId?: boolean }): Promise<T>;\n}\n"],
|
|
5
|
-
"mappings": "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",
|
|
6
|
-
"names": ["import_echo_schema", "CollectionType", "TypedObject", "typename", "version", "name", "S", "optional", "String", "objects", "mutable", "Array", "ref", "Expando", "views", "Record", "ContactType", "identifiers", "Struct", "type", "value", "ActorSchema", "contact", "identityKey", "email", "MessageType", "timestamp", "sender", "text", "parts", "properties", "Any", "context", "ThreadStatus", "Union", "Literal", "ThreadType", "anchor", "status", "messages", "ChannelType", "threads", "SPACE_DIRECTORY_HANDLE"]
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EmptySpace.d.ts","sourceRoot":"","sources":["../../../../src/components/EmptySpace.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,eAAO,MAAM,UAAU,yBAatB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EmptyTree.d.ts","sourceRoot":"","sources":["../../../../src/components/EmptyTree.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,eAAO,MAAM,SAAS,yBAarB,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2023 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
7
|
-
import { useTranslation } from '@dxos/react-ui';
|
|
8
|
-
import { descriptionText, mx } from '@dxos/react-ui-theme';
|
|
9
|
-
|
|
10
|
-
import { SPACE_PLUGIN } from '../meta';
|
|
11
|
-
|
|
12
|
-
export const EmptySpace = () => {
|
|
13
|
-
const { t } = useTranslation(SPACE_PLUGIN);
|
|
14
|
-
return (
|
|
15
|
-
<div
|
|
16
|
-
role='none'
|
|
17
|
-
className={mx(
|
|
18
|
-
'p-2 mli-2 mbe-2 text-center border border-dashed border-neutral-400/50 rounded-lg',
|
|
19
|
-
descriptionText,
|
|
20
|
-
)}
|
|
21
|
-
>
|
|
22
|
-
{t('empty space message')}
|
|
23
|
-
</div>
|
|
24
|
-
);
|
|
25
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2023 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
7
|
-
import { useTranslation } from '@dxos/react-ui';
|
|
8
|
-
import { descriptionText, mx } from '@dxos/react-ui-theme';
|
|
9
|
-
|
|
10
|
-
import { SPACE_PLUGIN } from '../meta';
|
|
11
|
-
|
|
12
|
-
export const EmptyTree = () => {
|
|
13
|
-
const { t } = useTranslation(SPACE_PLUGIN);
|
|
14
|
-
return (
|
|
15
|
-
<div
|
|
16
|
-
role='none'
|
|
17
|
-
className={mx(
|
|
18
|
-
'p-2 mli-2 mbe-2 text-center border border-dashed border-neutral-400/50 rounded-lg',
|
|
19
|
-
descriptionText,
|
|
20
|
-
)}
|
|
21
|
-
>
|
|
22
|
-
{t('empty tree message')}
|
|
23
|
-
</div>
|
|
24
|
-
);
|
|
25
|
-
};
|