@uniformdev/canvas 19.177.2-alpha.18 → 19.178.2-alpha.25

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/index.esm.js CHANGED
@@ -2889,7 +2889,7 @@ function bindVariables({
2889
2889
  }
2890
2890
 
2891
2891
  // src/utils/variables/bindVariablesToObject.ts
2892
- import { produce } from "immer";
2892
+ import { isDraft, produce } from "immer";
2893
2893
 
2894
2894
  // src/utils/variables/createVariableReference.ts
2895
2895
  function createVariableReference(variableName) {
@@ -2917,7 +2917,11 @@ function bindVariablesToObjectRecursive({
2917
2917
  if (richTextNodeResult !== void 0) {
2918
2918
  return richTextNodeResult;
2919
2919
  }
2920
- const result = produce(value, (draft) => {
2920
+ const produceToUse = !isDraft(value) ? produce : (produceValue, producer) => {
2921
+ producer(produceValue);
2922
+ return produceValue;
2923
+ };
2924
+ const result = produceToUse(value, (draft) => {
2921
2925
  Object.entries(draft).forEach(([property, oldValue]) => {
2922
2926
  const currentObjectPath = recursivePath ? `${recursivePath}.${property}` : property;
2923
2927
  if (typeof oldValue === "string") {
package/dist/index.js CHANGED
@@ -3066,7 +3066,11 @@ function bindVariablesToObjectRecursive({
3066
3066
  if (richTextNodeResult !== void 0) {
3067
3067
  return richTextNodeResult;
3068
3068
  }
3069
- const result = (0, import_immer.produce)(value, (draft) => {
3069
+ const produceToUse = !(0, import_immer.isDraft)(value) ? import_immer.produce : (produceValue, producer) => {
3070
+ producer(produceValue);
3071
+ return produceValue;
3072
+ };
3073
+ const result = produceToUse(value, (draft) => {
3070
3074
  Object.entries(draft).forEach(([property, oldValue]) => {
3071
3075
  const currentObjectPath = recursivePath ? `${recursivePath}.${property}` : property;
3072
3076
  if (typeof oldValue === "string") {
package/dist/index.mjs CHANGED
@@ -2889,7 +2889,7 @@ function bindVariables({
2889
2889
  }
2890
2890
 
2891
2891
  // src/utils/variables/bindVariablesToObject.ts
2892
- import { produce } from "immer";
2892
+ import { isDraft, produce } from "immer";
2893
2893
 
2894
2894
  // src/utils/variables/createVariableReference.ts
2895
2895
  function createVariableReference(variableName) {
@@ -2917,7 +2917,11 @@ function bindVariablesToObjectRecursive({
2917
2917
  if (richTextNodeResult !== void 0) {
2918
2918
  return richTextNodeResult;
2919
2919
  }
2920
- const result = produce(value, (draft) => {
2920
+ const produceToUse = !isDraft(value) ? produce : (produceValue, producer) => {
2921
+ producer(produceValue);
2922
+ return produceValue;
2923
+ };
2924
+ const result = produceToUse(value, (draft) => {
2921
2925
  Object.entries(draft).forEach(([property, oldValue]) => {
2922
2926
  const currentObjectPath = recursivePath ? `${recursivePath}.${property}` : property;
2923
2927
  if (typeof oldValue === "string") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas",
3
- "version": "19.177.2-alpha.18+f0847a28d4",
3
+ "version": "19.178.2-alpha.25+0f7f53f560",
4
4
  "description": "Common functionality and types for Uniform Canvas",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -32,14 +32,15 @@
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/retry": "0.12.5",
35
- "lexical": "0.16.1",
35
+ "lexical": "0.17.0",
36
36
  "p-retry": "5.1.2",
37
37
  "p-throttle": "5.0.0",
38
38
  "pusher-js": "8.2.0"
39
39
  },
40
40
  "dependencies": {
41
- "@uniformdev/assets": "19.177.2-alpha.18+f0847a28d4",
42
- "@uniformdev/context": "19.177.2-alpha.18+f0847a28d4",
41
+ "@uniformdev/assets": "19.178.2-alpha.25+0f7f53f560",
42
+ "@uniformdev/context": "19.178.2-alpha.25+0f7f53f560",
43
+ "@uniformdev/richtext": "19.178.2-alpha.25+0f7f53f560",
43
44
  "immer": "10.1.1"
44
45
  },
45
46
  "files": [
@@ -48,5 +49,5 @@
48
49
  "publishConfig": {
49
50
  "access": "public"
50
51
  },
51
- "gitHead": "f0847a28d4ba83396723d0bb80311184a3143e00"
52
+ "gitHead": "0f7f53f56071a59cee38bf83c9f3bae541846de2"
52
53
  }