jazz-tools 0.8.1 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,8 @@
1
1
 
2
- > jazz-tools@0.8.0 build /Users/anselm/jazz/jazz/packages/jazz-tools
2
+ > jazz-tools@0.8.1 build /Users/anselm/jazz/jazz/packages/jazz-tools
3
3
  > npm run lint && rm -rf ./dist && tsc --sourceMap --outDir dist
4
4
 
5
5
 
6
- > jazz-tools@0.8.0 lint
6
+ > jazz-tools@0.8.1 lint
7
7
  > eslint . --ext ts,tsx
8
8
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # jazz-tools
2
2
 
3
+ ## 0.8.2
4
+
5
+ ### Patch Changes
6
+
7
+ - a075f90: Fixed cursor reset when interacting with text inputs
8
+
3
9
  ## 0.8.1
4
10
 
5
11
  ### Patch Changes
@@ -29,13 +29,7 @@ export class SubscriptionScope {
29
29
  });
30
30
  }
31
31
  scheduleUpdate() {
32
- if (!this.scheduledUpdate) {
33
- this.scheduledUpdate = true;
34
- queueMicrotask(() => {
35
- this.scheduledUpdate = false;
36
- this.onUpdate(this.rootEntry.value);
37
- });
38
- }
32
+ this.onUpdate(this.rootEntry.value);
39
33
  }
40
34
  onRefAccessedOrSet(fromId, accessedOrSetId) {
41
35
  // console.log("onRefAccessedOrSet", this.scopeID, accessedOrSetId);
@@ -1 +1 @@
1
- {"version":3,"file":"subscriptionScope.js","sourceRoot":"","sources":["../../src/implementation/subscriptionScope.ts"],"names":[],"mappings":"AAUA,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,OAAO,EAI3C,CAAC;AAEJ,MAAM,mBAAmB,GAAG,KAAK,CAAC;AAElC,MAAM,OAAO,iBAAiB;IAC1B,OAAO,GAAW,SAAS,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;IACjE,UAAU,CAA+B;IACzC,OAAO,GAAG,IAAI,GAAG,EAId,CAAC;I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;gBAC3B,KAAK,CAAC,QAAQ,EAAE,CAAC;YACrB,CAAC;iBAAM,CAAC;gBACJ,KAAK,CAAC,gBAAgB,GAAG,IAAI,CAAC;YAClC,CAAC;QACL,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IACzB,CAAC;CACJ"}
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "types": "./src/index.ts",
6
6
  "type": "module",
7
7
  "license": "MIT",
8
- "version": "0.8.1",
8
+ "version": "0.8.2",
9
9
  "dependencies": {
10
10
  "cojson": "0.8.0",
11
11
  "fast-check": "^3.17.2"
@@ -26,8 +26,8 @@
26
26
  "*.{js,jsx,mdx,json}": "prettier --write"
27
27
  },
28
28
  "scripts": {
29
- "test": "vitest --run",
30
- "test-watch": "vitest",
29
+ "test": "vitest --run --root ../../ --project jazz-tools",
30
+ "test:watch": "vitest --watch --root ../../ --project jazz-tools",
31
31
  "lint": "eslint . --ext ts,tsx",
32
32
  "format": "prettier --write './src/**/*.{ts,tsx}'",
33
33
  "build": "npm run lint && rm -rf ./dist && tsc --sourceMap --outDir dist"
@@ -62,13 +62,7 @@ export class SubscriptionScope<Root extends CoValue> {
62
62
  }
63
63
 
64
64
  scheduleUpdate() {
65
- if (!this.scheduledUpdate) {
66
- this.scheduledUpdate = true;
67
- queueMicrotask(() => {
68
- this.scheduledUpdate = false;
69
- this.onUpdate(this.rootEntry.value);
70
- });
71
- }
65
+ this.onUpdate(this.rootEntry.value);
72
66
  }
73
67
 
74
68
  onRefAccessedOrSet(