@coaction/yjs 1.5.0 → 2.0.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # @coaction/yjs
2
2
 
3
- ![Node CI](https://github.com/unadlib/coaction/workflows/Node%20CI/badge.svg)
3
+ ![Node CI](https://github.com/coactionjs/coaction/workflows/Node%20CI/badge.svg)
4
4
  [![npm](https://img.shields.io/npm/v/@coaction/yjs.svg)](https://www.npmjs.com/package/@coaction/yjs)
5
5
  ![license](https://img.shields.io/npm/l/@coaction/yjs)
6
6
 
@@ -138,4 +138,4 @@ Middleware wrapper around `bindYjs`. It also wires cleanup into `store.destroy()
138
138
 
139
139
  ## Documentation
140
140
 
141
- You can find the project documentation [here](https://github.com/unadlib/coaction).
141
+ You can find the project documentation [here](https://github.com/coactionjs/coaction).
package/dist/index.d.mts CHANGED
@@ -1,30 +1,36 @@
1
- import { Store, Middleware } from 'coaction';
2
- import * as Y from 'yjs';
3
- export * from 'yjs';
1
+ import { Middleware, Store } from "coaction";
2
+ import * as Y from "yjs";
3
+ export * from "yjs";
4
4
 
5
+ //#region \0rolldown/runtime.js
6
+ //#endregion
7
+ //#region packages/coaction-yjs/src/index.d.ts
5
8
  type YjsBindingOptions = {
6
- doc?: Y.Doc;
7
- key?: string;
9
+ doc?: Y.Doc;
10
+ key?: string;
8
11
  };
9
- type YjsBinding<T extends object> = {
10
- doc: Y.Doc;
11
- map: Y.Map<any>;
12
- syncNow: () => void;
13
- destroy: () => void;
14
- __unsafeTestOnly__?: {
15
- applyRemoteOperations: (operations: Array<{
16
- type: 'set' | 'delete';
17
- path: Array<string | number>;
18
- value?: unknown;
19
- }>) => void;
20
- };
12
+ type YjsBinding<_T extends object> = {
13
+ doc: Y.Doc;
14
+ map: Y.Map<any>;
15
+ syncNow: () => void;
16
+ destroy: () => void;
17
+ __unsafeTestOnly__?: {
18
+ applyRemoteOperations: (operations: Array<{
19
+ type: 'set' | 'delete';
20
+ path: Array<string | number>;
21
+ value?: unknown;
22
+ }>) => void;
23
+ };
21
24
  };
22
25
  declare const __unsafeTestOnly__: {
23
- getYValueAtPath: (root: Y.Map<unknown>, path: Array<string | number>) => unknown;
24
- setAtPath: (target: any, path: Array<string | number>, value: unknown) => void;
25
- deleteAtPath: (target: any, path: Array<string | number>) => void;
26
+ getYValueAtPath: (root: Y.Map<unknown>, path: Array<string | number>) => unknown;
27
+ setAtPath: (target: any, path: Array<string | number>, value: unknown) => void;
28
+ deleteAtPath: (target: any, path: Array<string | number>) => void;
26
29
  };
27
30
  declare const bindYjs: <T extends object>(store: Store<T>, options?: YjsBindingOptions) => YjsBinding<T>;
28
31
  declare const yjs: <T extends object>(options?: YjsBindingOptions) => Middleware<T>;
29
-
30
- export { type YjsBinding, type YjsBindingOptions, __unsafeTestOnly__, bindYjs, yjs };
32
+ declare namespace index_d_exports {
33
+ export { YjsBinding, YjsBindingOptions, __unsafeTestOnly__, bindYjs, yjs };
34
+ }
35
+ //#endregion
36
+ export { YjsBinding, YjsBindingOptions, __unsafeTestOnly__, bindYjs, yjs };
package/dist/index.d.ts CHANGED
@@ -1,30 +1,36 @@
1
- import { Store, Middleware } from 'coaction';
2
- import * as Y from 'yjs';
3
- export * from 'yjs';
1
+ import { Middleware, Store } from "coaction";
2
+ import * as Y from "yjs";
3
+ export * from "yjs";
4
4
 
5
+ //#region \0rolldown/runtime.js
6
+ //#endregion
7
+ //#region packages/coaction-yjs/src/index.d.ts
5
8
  type YjsBindingOptions = {
6
- doc?: Y.Doc;
7
- key?: string;
9
+ doc?: Y.Doc;
10
+ key?: string;
8
11
  };
9
- type YjsBinding<T extends object> = {
10
- doc: Y.Doc;
11
- map: Y.Map<any>;
12
- syncNow: () => void;
13
- destroy: () => void;
14
- __unsafeTestOnly__?: {
15
- applyRemoteOperations: (operations: Array<{
16
- type: 'set' | 'delete';
17
- path: Array<string | number>;
18
- value?: unknown;
19
- }>) => void;
20
- };
12
+ type YjsBinding<_T extends object> = {
13
+ doc: Y.Doc;
14
+ map: Y.Map<any>;
15
+ syncNow: () => void;
16
+ destroy: () => void;
17
+ __unsafeTestOnly__?: {
18
+ applyRemoteOperations: (operations: Array<{
19
+ type: 'set' | 'delete';
20
+ path: Array<string | number>;
21
+ value?: unknown;
22
+ }>) => void;
23
+ };
21
24
  };
22
25
  declare const __unsafeTestOnly__: {
23
- getYValueAtPath: (root: Y.Map<unknown>, path: Array<string | number>) => unknown;
24
- setAtPath: (target: any, path: Array<string | number>, value: unknown) => void;
25
- deleteAtPath: (target: any, path: Array<string | number>) => void;
26
+ getYValueAtPath: (root: Y.Map<unknown>, path: Array<string | number>) => unknown;
27
+ setAtPath: (target: any, path: Array<string | number>, value: unknown) => void;
28
+ deleteAtPath: (target: any, path: Array<string | number>) => void;
26
29
  };
27
30
  declare const bindYjs: <T extends object>(store: Store<T>, options?: YjsBindingOptions) => YjsBinding<T>;
28
31
  declare const yjs: <T extends object>(options?: YjsBindingOptions) => Middleware<T>;
29
-
30
- export { type YjsBinding, type YjsBindingOptions, __unsafeTestOnly__, bindYjs, yjs };
32
+ declare namespace index_d_exports {
33
+ export { YjsBinding, YjsBindingOptions, __unsafeTestOnly__, bindYjs, yjs };
34
+ }
35
+ //#endregion
36
+ export { YjsBinding, YjsBindingOptions, __unsafeTestOnly__, bindYjs, yjs };