Skip to content

Commit fbc00a0

Browse files
committed
feat: 🎸 update dependencies
1 parent efa8450 commit fbc00a0

5 files changed

Lines changed: 102 additions & 61 deletions

File tree

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,18 @@ npm install json-joy codemirror collaborative-codemirror
1616
Usage:
1717

1818
```ts
19+
import {EditorView} from 'codemirror';
1920
import {bind} from 'collaborative-codemirror';
20-
import {Model} from 'json-joy/es2020/json-crdt';
21+
import {Model, s} from 'json-joy/lib/json-crdt';
2122

22-
// ...
23+
// Create a JSON CRDT model.
24+
const model = Model.create(s.str(''));
2325

24-
const unbind = bind(str, editor);
26+
// Create a Code Mirror editor instance.
27+
const editor = new EditorView({parent: div});
28+
29+
// Connect Code Mirror editor to JSON CRDT document "str" node.
30+
const unbind = bind(model.s.toApi(), editor);
2531

2632
// When done, unbind the binding.
2733
binding.unbind();

package.json

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@
4848
"crdt"
4949
],
5050
"dependencies": {
51-
"collaborative-editor": "^2.1.0",
52-
"fast-diff": "^1.3.0"
51+
"collaborative-editor": "^2.2.0"
5352
},
5453
"peerDependencies": {
5554
"codemirror": "*",
@@ -69,23 +68,22 @@
6968
"@storybook/react-webpack5": "^7.6.2",
7069
"@storybook/testing-library": "^0.2.2",
7170
"@types/jest": "^29.5.10",
72-
"@types/react": "^18.2.39",
71+
"@types/react": "^18.3.3",
7372
"@typescript-eslint/eslint-plugin": "^6.13.1",
7473
"@typescript-eslint/parser": "^6.13.1",
7574
"codemirror": "^6.0.1",
7675
"eslint": "^8.54.0",
7776
"eslint-plugin-react": "^7.33.2",
7877
"eslint-plugin-storybook": "^0.6.15",
7978
"jest": "^29.7.0",
80-
"json-crdt": "^0.0.1",
81-
"json-joy": "^11.9.1",
79+
"json-joy": "^16.13.1",
8280
"prettier": "^3.1.0",
83-
"react": "^18.2.0",
84-
"react-dom": "^18.2.0",
81+
"react": "^18.3.1",
82+
"react-dom": "^18.3.1",
8583
"rimraf": "^5.0.5",
8684
"storybook": "^7.6.2",
8785
"ts-jest": "^29.1.1",
88-
"tslib": "^2.6.2",
86+
"tslib": "^2.6.3",
8987
"typescript": "^5.3.2"
9088
},
9189
"jest": {

src/index.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from 'react';
2-
import {Model} from 'json-joy/es2020/json-crdt';
2+
import {Model} from 'json-joy/lib/json-crdt';
33
import type {Meta, StoryObj} from '@storybook/react';
44
import {EditorView} from 'codemirror';
55
import {bind} from '.';

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {StrBinding} from 'collaborative-editor';
22
import {CodemirrorEditorFacade} from './CodemirrorEditorFacade';
33
import type {EditorView} from 'codemirror';
4-
import type {StrApi} from 'json-joy/es2020/json-crdt';
4+
import type {StrApi} from 'json-joy/lib/json-crdt';
55

66
export const bind = (str: StrApi, editor: EditorView, polling?: boolean): (() => void) => {
77
const facade = new CodemirrorEditorFacade(editor);

yarn.lock

Lines changed: 85 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2243,6 +2243,38 @@ __metadata:
22432243
languageName: node
22442244
linkType: hard
22452245

2246+
"@jsonjoy.com/base64@npm:^1.1.1":
2247+
version: 1.1.2
2248+
resolution: "@jsonjoy.com/base64@npm:1.1.2"
2249+
peerDependencies:
2250+
tslib: 2
2251+
checksum: 10c0/88717945f66dc89bf58ce75624c99fe6a5c9a0c8614e26d03e406447b28abff80c69fb37dabe5aafef1862cf315071ae66e5c85f6018b437d95f8d13d235e6eb
2252+
languageName: node
2253+
linkType: hard
2254+
2255+
"@jsonjoy.com/json-pack@npm:^1.0.2":
2256+
version: 1.0.4
2257+
resolution: "@jsonjoy.com/json-pack@npm:1.0.4"
2258+
dependencies:
2259+
"@jsonjoy.com/base64": "npm:^1.1.1"
2260+
"@jsonjoy.com/util": "npm:^1.1.2"
2261+
hyperdyperid: "npm:^1.2.0"
2262+
thingies: "npm:^1.20.0"
2263+
peerDependencies:
2264+
tslib: 2
2265+
checksum: 10c0/c06e57c33d3c18ab31af163e04f77cb759f68386c41375d1e1bd6c28beb1a3cc82217cc3b26f4c94b7385ed28a61e59b01498cf4cec562fd9e464b17eab0cf16
2266+
languageName: node
2267+
linkType: hard
2268+
2269+
"@jsonjoy.com/util@npm:^1.1.0, @jsonjoy.com/util@npm:^1.1.2":
2270+
version: 1.2.0
2271+
resolution: "@jsonjoy.com/util@npm:1.2.0"
2272+
peerDependencies:
2273+
tslib: 2
2274+
checksum: 10c0/979b85076871ed1ce6961dfe7be725c8c413f50d09755e6e88184ba9b3682b59da20672b979eae74d3701fcfb094d5bba781dc7f53ffd45747f65026e699685e
2275+
languageName: node
2276+
linkType: hard
2277+
22462278
"@juggle/resize-observer@npm:^3.3.1":
22472279
version: 3.4.0
22482280
resolution: "@juggle/resize-observer@npm:3.4.0"
@@ -2287,13 +2319,6 @@ __metadata:
22872319
languageName: node
22882320
linkType: hard
22892321

2290-
"@multiformats/base-x@npm:^4.0.1":
2291-
version: 4.0.1
2292-
resolution: "@multiformats/base-x@npm:4.0.1"
2293-
checksum: 10c0/f6d16d2d7793ea371206fc17853a0932a7e697ddc739a6b63421a7ee090ee8ab28224c3c7e4401899d0a343bc95284a5f0aa7502edadfb5ad21967f9cbd6a9d2
2294-
languageName: node
2295-
linkType: hard
2296-
22972322
"@ndelangen/get-tarball@npm:^3.0.7":
22982323
version: 3.0.9
22992324
resolution: "@ndelangen/get-tarball@npm:3.0.9"
@@ -4496,7 +4521,7 @@ __metadata:
44964521
languageName: node
44974522
linkType: hard
44984523

4499-
"@types/react@npm:>=16, @types/react@npm:^18.2.39":
4524+
"@types/react@npm:>=16, @types/react@npm:^18.3.3":
45004525
version: 18.3.3
45014526
resolution: "@types/react@npm:18.3.3"
45024527
dependencies:
@@ -6054,25 +6079,23 @@ __metadata:
60546079
"@storybook/react-webpack5": "npm:^7.6.2"
60556080
"@storybook/testing-library": "npm:^0.2.2"
60566081
"@types/jest": "npm:^29.5.10"
6057-
"@types/react": "npm:^18.2.39"
6082+
"@types/react": "npm:^18.3.3"
60586083
"@typescript-eslint/eslint-plugin": "npm:^6.13.1"
60596084
"@typescript-eslint/parser": "npm:^6.13.1"
60606085
codemirror: "npm:^6.0.1"
6061-
collaborative-editor: "npm:^2.1.0"
6086+
collaborative-editor: "npm:^2.2.0"
60626087
eslint: "npm:^8.54.0"
60636088
eslint-plugin-react: "npm:^7.33.2"
60646089
eslint-plugin-storybook: "npm:^0.6.15"
6065-
fast-diff: "npm:^1.3.0"
60666090
jest: "npm:^29.7.0"
6067-
json-crdt: "npm:^0.0.1"
6068-
json-joy: "npm:^11.9.1"
6091+
json-joy: "npm:^16.13.1"
60696092
prettier: "npm:^3.1.0"
6070-
react: "npm:^18.2.0"
6071-
react-dom: "npm:^18.2.0"
6093+
react: "npm:^18.3.1"
6094+
react-dom: "npm:^18.3.1"
60726095
rimraf: "npm:^5.0.5"
60736096
storybook: "npm:^7.6.2"
60746097
ts-jest: "npm:^29.1.1"
6075-
tslib: "npm:^2.6.2"
6098+
tslib: "npm:^2.6.3"
60766099
typescript: "npm:^5.3.2"
60776100
peerDependencies:
60786101
codemirror: "*"
@@ -6081,15 +6104,15 @@ __metadata:
60816104
languageName: unknown
60826105
linkType: soft
60836106

6084-
"collaborative-editor@npm:^2.1.0":
6085-
version: 2.1.0
6086-
resolution: "collaborative-editor@npm:2.1.0"
6107+
"collaborative-editor@npm:^2.2.0":
6108+
version: 2.2.0
6109+
resolution: "collaborative-editor@npm:2.2.0"
60876110
dependencies:
60886111
fast-diff: "npm:^1.3.0"
60896112
peerDependencies:
60906113
json-joy: "*"
60916114
tslib: 2
6092-
checksum: 10c0/d10e7a0caad1686f202ff1ccf8ddfe75e14e9159cf75cc2eb0b2788c3a2148a1e5954c0e465d60ffef5d2548b2003ba31ecb83e2752fa8d7a3649eef2447d4f6
6115+
checksum: 10c0/afadd52680918feca4c8281cf1b4b06e54f29abc13264dda46509be396ed0818b3ef08b252bd72da1c30e3b925f4782ade0edb4240b499efed72e4f14cb3631d
60936116
languageName: node
60946117
linkType: hard
60956118

@@ -9667,28 +9690,22 @@ __metadata:
96679690
languageName: node
96689691
linkType: hard
96699692

9670-
"json-crdt@npm:^0.0.1":
9671-
version: 0.0.1
9672-
resolution: "json-crdt@npm:0.0.1"
9673-
checksum: 10c0/2892b16656faf927cdafb7c83db39e2e5e24cbc9a676011eab14d95c534c0e1864e16c684d275f1d2e6e0659e4f5c224066e97e657b92128ad2ef506b7863a36
9674-
languageName: node
9675-
linkType: hard
9676-
9677-
"json-joy@npm:^11.9.1":
9678-
version: 11.43.0
9679-
resolution: "json-joy@npm:11.43.0"
9693+
"json-joy@npm:^16.13.1":
9694+
version: 16.13.1
9695+
resolution: "json-joy@npm:16.13.1"
96809696
dependencies:
9697+
"@jsonjoy.com/base64": "npm:^1.1.1"
9698+
"@jsonjoy.com/json-pack": "npm:^1.0.2"
9699+
"@jsonjoy.com/util": "npm:^1.1.0"
96819700
arg: "npm:^5.0.2"
96829701
hyperdyperid: "npm:^1.2.0"
9683-
multibase: "npm:^4.0.6"
9684-
thingies: "npm:^1.20.0"
9702+
sonic-forest: "npm:^1.0.2"
9703+
thingies: "npm:^2.0.0"
9704+
tree-dump: "npm:^1.0.1"
96859705
peerDependencies:
9686-
quill-delta: ^5
96879706
rxjs: 7
96889707
tslib: 2
96899708
peerDependenciesMeta:
9690-
quill-delta:
9691-
optional: true
96929709
rxjs:
96939710
optional: true
96949711
bin:
@@ -9700,7 +9717,7 @@ __metadata:
97009717
json-pointer: bin/json-pointer.js
97019718
json-pointer-test: bin/json-pointer-test.js
97029719
json-unpack: bin/json-unpack.js
9703-
checksum: 10c0/23a0005b8d929823e1c162e5adcb489b281498c16b80f939f4a53485bea0ed07a751f93d3c66d174bec31e13fb0cc26f4935a02a9421d53104f0d74d3789c9d7
9720+
checksum: 10c0/82dc502f288940dfbb97bebd1568b31f3f5e7cb9345f87d1a631113b49e902671198b1c1bfd7e8518fb8b0114a2a89f573b46fb1a2b829535c597e716f23fa36
97049721
languageName: node
97059722
linkType: hard
97069723

@@ -10379,15 +10396,6 @@ __metadata:
1037910396
languageName: node
1038010397
linkType: hard
1038110398

10382-
"multibase@npm:^4.0.6":
10383-
version: 4.0.6
10384-
resolution: "multibase@npm:4.0.6"
10385-
dependencies:
10386-
"@multiformats/base-x": "npm:^4.0.1"
10387-
checksum: 10c0/1e931f2d018a195f7ea1d157782a6ab2eb3913674b79a9193e05ee2ded58383a373124ec9d84d20b12a2561a34659d2fe5a7e49e4ba493af5127b0009fdaf33d
10388-
languageName: node
10389-
linkType: hard
10390-
1039110399
"nanoid@npm:^3.3.7":
1039210400
version: 3.3.7
1039310401
resolution: "nanoid@npm:3.3.7"
@@ -11464,7 +11472,7 @@ __metadata:
1146411472
languageName: node
1146511473
linkType: hard
1146611474

11467-
"react-dom@npm:^18.2.0":
11475+
"react-dom@npm:^18.3.1":
1146811476
version: 18.3.1
1146911477
resolution: "react-dom@npm:18.3.1"
1147011478
dependencies:
@@ -11577,7 +11585,7 @@ __metadata:
1157711585
languageName: node
1157811586
linkType: hard
1157911587

11580-
"react@npm:^18.2.0":
11588+
"react@npm:^18.3.1":
1158111589
version: 18.3.1
1158211590
resolution: "react@npm:18.3.1"
1158311591
dependencies:
@@ -12236,6 +12244,17 @@ __metadata:
1223612244
languageName: node
1223712245
linkType: hard
1223812246

12247+
"sonic-forest@npm:^1.0.2":
12248+
version: 1.0.3
12249+
resolution: "sonic-forest@npm:1.0.3"
12250+
dependencies:
12251+
tree-dump: "npm:^1.0.0"
12252+
peerDependencies:
12253+
tslib: 2
12254+
checksum: 10c0/b37d18b1195127ab07f499ec177548f01b671a7aeae6488d7da17288848c60e4a586cd7b010970699bf578d5bd502499cbf593e5be6d0bdfa3283e9b307b2ff2
12255+
languageName: node
12256+
linkType: hard
12257+
1223912258
"source-map-js@npm:^1.2.0":
1224012259
version: 1.2.0
1224112260
resolution: "source-map-js@npm:1.2.0"
@@ -12784,6 +12803,15 @@ __metadata:
1278412803
languageName: node
1278512804
linkType: hard
1278612805

12806+
"thingies@npm:^2.0.0":
12807+
version: 2.1.1
12808+
resolution: "thingies@npm:2.1.1"
12809+
peerDependencies:
12810+
tslib: ^2
12811+
checksum: 10c0/573a84a11248619b6f53d5226b90b3489b01cfc7f5fa6d37a79e91c3678e247ba981cf21760879ab8c5af58b0a225fa0b773387034c38e6e12061bb1ca1e33a6
12812+
languageName: node
12813+
linkType: hard
12814+
1278712815
"through2@npm:^2.0.3":
1278812816
version: 2.0.5
1278912817
resolution: "through2@npm:2.0.5"
@@ -12845,6 +12873,15 @@ __metadata:
1284512873
languageName: node
1284612874
linkType: hard
1284712875

12876+
"tree-dump@npm:^1.0.0, tree-dump@npm:^1.0.1":
12877+
version: 1.0.2
12878+
resolution: "tree-dump@npm:1.0.2"
12879+
peerDependencies:
12880+
tslib: 2
12881+
checksum: 10c0/d1d180764e9c691b28332dbd74226c6b6af361dfb1e134bb11e60e17cb11c215894adee50ffc578da5dcf546006693947be8b6665eb1269b56e2f534926f1c1f
12882+
languageName: node
12883+
linkType: hard
12884+
1284812885
"ts-api-utils@npm:^1.0.1":
1284912886
version: 1.3.0
1285012887
resolution: "ts-api-utils@npm:1.3.0"
@@ -12905,7 +12942,7 @@ __metadata:
1290512942
languageName: node
1290612943
linkType: hard
1290712944

12908-
"tslib@npm:^2.0.0, tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.4.0, tslib@npm:^2.6.2":
12945+
"tslib@npm:^2.0.0, tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.4.0, tslib@npm:^2.6.3":
1290912946
version: 2.6.3
1291012947
resolution: "tslib@npm:2.6.3"
1291112948
checksum: 10c0/2598aef53d9dbe711af75522464b2104724d6467b26a60f2bdac8297d2b5f1f6b86a71f61717384aa8fd897240467aaa7bcc36a0700a0faf751293d1331db39a

0 commit comments

Comments
 (0)