deepspace 0.4.4 → 0.5.0
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/README.md +90 -0
- package/dist/cli.js +2912 -1984
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +31 -4
- package/dist/index.js +511 -366
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts +29 -108
- package/dist/server.js +126 -589
- package/dist/server.js.map +1 -1
- package/dist/testing.js.map +1 -1
- package/dist/worker.d.ts +29 -108
- package/dist/worker.js +126 -589
- package/dist/worker.js.map +1 -1
- package/features/admin-page/src/AdminPage.tsx +3 -5
- package/features/canvas/src/CanvasEditorPage.tsx +0 -2
- package/features/canvas/src/components/CanvasView.tsx +1 -1
- package/features/docs/src/LibrarySidebar.tsx +7 -1
- package/features/docs/src/use-yjs-room-with-awareness.ts +4 -0
- package/features/file-attachments/src/AttachmentsPage.tsx +7 -1
- package/features/file-attachments/src/useFilePreview.ts +7 -5
- package/features/file-manager/src/FileManagerPage.tsx +2 -3
- package/features/integration-test/feature.json +10 -3
- package/features/integration-test/src/IntegrationTestPage.tsx +15 -12
- package/features/landing/src/LandingPage.tsx +1 -1
- package/features/landing/src/sections/FeaturesGridSection.tsx +0 -92
- package/features/messaging/src/components/chat/MessageItem.tsx +5 -1
- package/features/messaging/src/hooks/useChatChannel.ts +5 -1
- package/features/presence-test/feature.json +2 -1
- package/features/sidebar/src/AppSidebar.tsx +1 -1
- package/features/tasks/src/TasksPage.tsx +1 -1
- package/features/testing/feature.json +2 -1
- package/features/testing/src/TestPage.tsx +8 -8
- package/package.json +4 -4
- package/scripts/add-feature.cjs +277 -272
package/dist/index.d.ts
CHANGED
|
@@ -5489,6 +5489,19 @@ interface RecordProviderProps {
|
|
|
5489
5489
|
* Uses external store pattern for React integration.
|
|
5490
5490
|
*/
|
|
5491
5491
|
|
|
5492
|
+
/**
|
|
5493
|
+
* Immutable snapshot handed to `useSyncExternalStore`. A new object is minted
|
|
5494
|
+
* on every state transition (see `commit`), so a change to `status`/`error` —
|
|
5495
|
+
* not just `records` — flips the snapshot reference and re-renders the hook.
|
|
5496
|
+
* Without `status`/`error` in the snapshot, an error that arrives before the
|
|
5497
|
+
* first result (records reference unchanged) never propagates and the UI is
|
|
5498
|
+
* stuck in "loading" forever.
|
|
5499
|
+
*/
|
|
5500
|
+
interface QuerySnapshot {
|
|
5501
|
+
status: 'loading' | 'ready' | 'error';
|
|
5502
|
+
records: RecordData[];
|
|
5503
|
+
error?: string;
|
|
5504
|
+
}
|
|
5492
5505
|
declare class RecordStore {
|
|
5493
5506
|
private queries;
|
|
5494
5507
|
private listeners;
|
|
@@ -5497,9 +5510,12 @@ declare class RecordStore {
|
|
|
5497
5510
|
/** Track the single subscriptionId per queryKey (for deduplication) */
|
|
5498
5511
|
private activeSubscriptions;
|
|
5499
5512
|
subscribe(queryKey: string, listener: () => void): () => void;
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5513
|
+
/**
|
|
5514
|
+
* Snapshot for `useSyncExternalStore`. Bundles records + status + error so a
|
|
5515
|
+
* transition in any of them re-renders the hook. Returns a stable reference
|
|
5516
|
+
* until the next `commit()`.
|
|
5517
|
+
*/
|
|
5518
|
+
getSnapshot(queryKey: string): QuerySnapshot;
|
|
5503
5519
|
/**
|
|
5504
5520
|
* Initialize a query subscription.
|
|
5505
5521
|
* Returns true if this is the FIRST subscriber (should send SUBSCRIBE).
|
|
@@ -5514,6 +5530,12 @@ declare class RecordStore {
|
|
|
5514
5530
|
setSubscriptionId(queryKey: string, subscriptionId: string): void;
|
|
5515
5531
|
/** Get the subscriptionId for a queryKey */
|
|
5516
5532
|
getSubscriptionId(queryKey: string): string | undefined;
|
|
5533
|
+
/**
|
|
5534
|
+
* Replace the state for a query with a fresh snapshot and bump the version,
|
|
5535
|
+
* then notify listeners. Single write-path so every mutator mints a new
|
|
5536
|
+
* snapshot reference (which is what drives `useSyncExternalStore` re-renders).
|
|
5537
|
+
*/
|
|
5538
|
+
private commit;
|
|
5517
5539
|
setQueryResult(queryKey: string, records: RecordData[]): void;
|
|
5518
5540
|
/** Check if a record exists in a query's results */
|
|
5519
5541
|
hasRecord(queryKey: string, recordId: string): boolean;
|
|
@@ -5596,8 +5618,13 @@ declare function useRecordContext(): RecordContextValue;
|
|
|
5596
5618
|
* </RecordProvider>
|
|
5597
5619
|
* ```
|
|
5598
5620
|
*/
|
|
5599
|
-
declare function RecordProvider({ roomId,
|
|
5621
|
+
declare function RecordProvider({ roomId, wsUrl, children, allowAnonymous, getAuthToken: getAuthTokenProp, }: {
|
|
5600
5622
|
roomId?: string;
|
|
5623
|
+
/**
|
|
5624
|
+
* Accepted for API compatibility with `RecordScope` and documented usage,
|
|
5625
|
+
* but the single-scope backward-compat provider does no local-first
|
|
5626
|
+
* registration, so it's ignored. Pass schemas to `RecordScope` instead.
|
|
5627
|
+
*/
|
|
5601
5628
|
schemas?: CollectionSchema[];
|
|
5602
5629
|
wsUrl?: string;
|
|
5603
5630
|
children: ReactNode;
|