kritzel-stencil 0.4.21 → 0.4.23
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/cjs/index.cjs.js +50 -1
- package/dist/cjs/kritzel-active-users_47.cjs.entry.js +135 -31
- package/dist/collection/classes/providers/sync/hocuspocus-sync-provider.class.js +21 -0
- package/dist/collection/classes/providers/sync/websocket-sync-provider.class.js +29 -1
- package/dist/collection/classes/structures/app-state-map.structure.js +4 -1
- package/dist/collection/classes/structures/object-map.structure.js +66 -4
- package/dist/collection/components/core/kritzel-editor/kritzel-editor.js +42 -9
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.js +51 -17
- package/dist/collection/constants/version.js +1 -1
- package/dist/components/index.js +51 -2
- package/dist/components/kritzel-editor.js +16 -11
- package/dist/components/kritzel-engine.js +1 -1
- package/dist/components/kritzel-settings.js +1 -1
- package/dist/components/{p-BdCrcQ0_.js → p-Cb-xlpsJ.js} +1 -1
- package/dist/components/{p-C_f_QElb.js → p-EijwLEZx.js} +120 -21
- package/dist/esm/index.js +50 -1
- package/dist/esm/kritzel-active-users_47.entry.js +135 -31
- package/dist/stencil/index.esm.js +50 -1
- package/dist/stencil/{p-832b80e9.entry.js → p-9e38407e.entry.js} +135 -31
- package/dist/stencil/stencil.esm.js +1 -1
- package/dist/types/classes/providers/sync/hocuspocus-sync-provider.class.d.ts +5 -0
- package/dist/types/classes/providers/sync/websocket-sync-provider.class.d.ts +6 -0
- package/dist/types/classes/structures/object-map.structure.d.ts +26 -2
- package/dist/types/components/core/kritzel-editor/kritzel-editor.d.ts +3 -0
- package/dist/types/components/core/kritzel-engine/kritzel-engine.d.ts +9 -1
- package/dist/types/components.d.ts +8 -1
- package/dist/types/constants/version.d.ts +1 -1
- package/dist/types/interfaces/sync-provider.interface.d.ts +13 -0
- package/package.json +1 -1
|
@@ -22,10 +22,23 @@ export interface ISyncProvider {
|
|
|
22
22
|
* local-only providers (IndexedDB, BroadcastChannel) return null or undefined.
|
|
23
23
|
*/
|
|
24
24
|
readonly awareness?: Awareness | null;
|
|
25
|
+
/**
|
|
26
|
+
* The object this provider passes as the Yjs transaction origin when it applies
|
|
27
|
+
* updates it received from its peer. Consumers use it to tell remote-originated
|
|
28
|
+
* changes apart from local writes. Providers that cannot expose it opt out of
|
|
29
|
+
* remote-change detection.
|
|
30
|
+
*/
|
|
31
|
+
readonly updateOrigin?: unknown;
|
|
25
32
|
/**
|
|
26
33
|
* Initialize and connect the provider
|
|
27
34
|
*/
|
|
28
35
|
connect(): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Resolves once the Yjs sync handshake with the peer has completed, which is
|
|
38
|
+
* later than `connect()` for providers that resolve on transport connection.
|
|
39
|
+
* Never rejects.
|
|
40
|
+
*/
|
|
41
|
+
whenSynced?(): Promise<void>;
|
|
29
42
|
/**
|
|
30
43
|
* Disconnect the provider (can be reconnected later)
|
|
31
44
|
*/
|