@uniformdev/canvas 19.178.0 → 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.d.mts CHANGED
@@ -5,7 +5,7 @@ import { Quirks, StorageCommands, PersonalizedVariant, TestVariant } from '@unif
5
5
  import Pusher from 'pusher-js';
6
6
  import { Options as Options$1 } from 'p-retry';
7
7
  import { Options } from 'p-throttle';
8
- import { SerializedEditorState } from 'lexical';
8
+ import { RichTextBuiltInFormat as RichTextBuiltInFormat$1, RichTextBuiltInElement as RichTextBuiltInElement$1, ParameterRichTextValue } from '@uniformdev/richtext';
9
9
 
10
10
  interface components$8 {
11
11
  schemas: {
@@ -21997,8 +21997,8 @@ type ProjectMapLinkComponentParameterValue = ProjectMapLinkParamValue | undefine
21997
21997
  */
21998
21998
  type LinkComponentParameterValue = LinkParamValue;
21999
21999
 
22000
- type RichTextBuiltInFormat = 'code' | 'bold' | 'italic' | 'underline' | 'strikethrough' | 'superscript' | 'subscript';
22001
- type RichTextBuiltInElement = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'unorderedList' | 'orderedList' | 'link' | 'quote' | 'code' | 'variable';
22000
+ type RichTextBuiltInFormat = RichTextBuiltInFormat$1;
22001
+ type RichTextBuiltInElement = RichTextBuiltInElement$1;
22002
22002
  type RichTextParamConfiguration = {
22003
22003
  required?: boolean;
22004
22004
  formatting?: {
@@ -22008,7 +22008,7 @@ type RichTextParamConfiguration = {
22008
22008
  builtIn?: Array<RichTextBuiltInElement>;
22009
22009
  };
22010
22010
  };
22011
- type RichTextParamValue = SerializedEditorState | undefined | null;
22011
+ type RichTextParamValue = ParameterRichTextValue;
22012
22012
 
22013
22013
  /**
22014
22014
  * This file was auto-generated by openapi-typescript.
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ import { Quirks, StorageCommands, PersonalizedVariant, TestVariant } from '@unif
5
5
  import Pusher from 'pusher-js';
6
6
  import { Options as Options$1 } from 'p-retry';
7
7
  import { Options } from 'p-throttle';
8
- import { SerializedEditorState } from 'lexical';
8
+ import { RichTextBuiltInFormat as RichTextBuiltInFormat$1, RichTextBuiltInElement as RichTextBuiltInElement$1, ParameterRichTextValue } from '@uniformdev/richtext';
9
9
 
10
10
  interface components$8 {
11
11
  schemas: {
@@ -21997,8 +21997,8 @@ type ProjectMapLinkComponentParameterValue = ProjectMapLinkParamValue | undefine
21997
21997
  */
21998
21998
  type LinkComponentParameterValue = LinkParamValue;
21999
21999
 
22000
- type RichTextBuiltInFormat = 'code' | 'bold' | 'italic' | 'underline' | 'strikethrough' | 'superscript' | 'subscript';
22001
- type RichTextBuiltInElement = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'unorderedList' | 'orderedList' | 'link' | 'quote' | 'code' | 'variable';
22000
+ type RichTextBuiltInFormat = RichTextBuiltInFormat$1;
22001
+ type RichTextBuiltInElement = RichTextBuiltInElement$1;
22002
22002
  type RichTextParamConfiguration = {
22003
22003
  required?: boolean;
22004
22004
  formatting?: {
@@ -22008,7 +22008,7 @@ type RichTextParamConfiguration = {
22008
22008
  builtIn?: Array<RichTextBuiltInElement>;
22009
22009
  };
22010
22010
  };
22011
- type RichTextParamValue = SerializedEditorState | undefined | null;
22011
+ type RichTextParamValue = ParameterRichTextValue;
22012
22012
 
22013
22013
  /**
22014
22014
  * This file was auto-generated by openapi-typescript.
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.178.0",
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.178.0",
42
- "@uniformdev/context": "19.178.0",
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": "66721c01d9bf53917e5c4d83e2e578248e72560d"
52
+ "gitHead": "0f7f53f56071a59cee38bf83c9f3bae541846de2"
52
53
  }