kritzel-stencil 0.4.21 → 0.4.22

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.
Files changed (29) hide show
  1. package/dist/cjs/index.cjs.js +50 -1
  2. package/dist/cjs/kritzel-active-users_47.cjs.entry.js +128 -31
  3. package/dist/collection/classes/providers/sync/hocuspocus-sync-provider.class.js +21 -0
  4. package/dist/collection/classes/providers/sync/websocket-sync-provider.class.js +29 -1
  5. package/dist/collection/classes/structures/app-state-map.structure.js +4 -1
  6. package/dist/collection/classes/structures/object-map.structure.js +66 -4
  7. package/dist/collection/components/core/kritzel-editor/kritzel-editor.js +42 -9
  8. package/dist/collection/components/core/kritzel-engine/kritzel-engine.js +44 -17
  9. package/dist/collection/constants/version.js +1 -1
  10. package/dist/components/index.js +51 -2
  11. package/dist/components/kritzel-editor.js +16 -11
  12. package/dist/components/kritzel-engine.js +1 -1
  13. package/dist/components/kritzel-settings.js +1 -1
  14. package/dist/components/{p-C_f_QElb.js → p-BNeE3SiZ.js} +113 -21
  15. package/dist/components/{p-BdCrcQ0_.js → p-Dx5NfJ0U.js} +1 -1
  16. package/dist/esm/index.js +50 -1
  17. package/dist/esm/kritzel-active-users_47.entry.js +128 -31
  18. package/dist/stencil/index.esm.js +50 -1
  19. package/dist/stencil/{p-832b80e9.entry.js → p-ab5c4292.entry.js} +128 -31
  20. package/dist/stencil/stencil.esm.js +1 -1
  21. package/dist/types/classes/providers/sync/hocuspocus-sync-provider.class.d.ts +5 -0
  22. package/dist/types/classes/providers/sync/websocket-sync-provider.class.d.ts +6 -0
  23. package/dist/types/classes/structures/object-map.structure.d.ts +26 -2
  24. package/dist/types/components/core/kritzel-editor/kritzel-editor.d.ts +3 -0
  25. package/dist/types/components/core/kritzel-engine/kritzel-engine.d.ts +9 -1
  26. package/dist/types/components.d.ts +8 -1
  27. package/dist/types/constants/version.d.ts +1 -1
  28. package/dist/types/interfaces/sync-provider.interface.d.ts +13 -0
  29. package/package.json +1 -1
@@ -3,4 +3,4 @@
3
3
  * This file is auto-generated by the version bump scripts.
4
4
  * Do not modify manually.
5
5
  */
6
- export declare const KRITZEL_VERSION = "0.4.21";
6
+ export declare const KRITZEL_VERSION = "0.4.22";
@@ -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
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kritzel-stencil",
3
- "version": "0.4.21",
3
+ "version": "0.4.22",
4
4
  "homepage": "https://kritzel.io/",
5
5
  "description": "Kritzel helps you build infinite whiteboard experiences.",
6
6
  "keywords": [