@uniformdev/canvas-react 19.173.0 → 19.173.2-alpha.210

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.ts CHANGED
@@ -110,36 +110,64 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
110
110
  connectedData?: {
111
111
  pointer: string;
112
112
  syntax: "jptr";
113
- failureAction?: "a" | "p" | "t" | "c" | undefined;
114
- failureLogLevel?: "i" | "e" | "w" | undefined;
115
- failureDefault?: string | undefined;
116
- } | undefined;
113
+ failureAction?: "t" | "p" | "c" | "a";
114
+ failureLogLevel?: "e" | "w" | "i";
115
+ failureDefault?: string;
116
+ };
117
117
  locales?: {
118
118
  [key: string]: unknown;
119
- } | undefined;
119
+ };
120
+ conditions?: {
121
+ when: {
122
+ op?: "&" | "|";
123
+ clauses: ({
124
+ rule: string;
125
+ source?: string;
126
+ op: string;
127
+ value: string | string[];
128
+ } | any)[];
129
+ };
130
+ value: unknown;
131
+ id: number;
132
+ }[];
133
+ localesConditions?: {
134
+ [key: string]: {
135
+ when: {
136
+ op?: "&" | "|";
137
+ clauses: ({
138
+ rule: string;
139
+ source?: string;
140
+ op: string;
141
+ value: string | string[];
142
+ } | any)[];
143
+ };
144
+ value: unknown;
145
+ id: number;
146
+ }[];
147
+ };
120
148
  };
121
- } | undefined;
122
- variant?: string | undefined;
149
+ };
150
+ variant?: string;
123
151
  projectMapNodes?: {
124
152
  id: string;
125
153
  path: string;
126
154
  projectMapId: string;
127
155
  data?: {
128
- isSearchHit?: boolean | undefined;
156
+ isSearchHit?: boolean;
129
157
  queryStrings?: {
130
158
  name: string;
131
- value?: string | undefined;
132
- helpText?: string | undefined;
133
- }[] | undefined;
134
- previewValue?: string | undefined;
135
- } | undefined;
159
+ value?: string;
160
+ helpText?: string;
161
+ }[];
162
+ previewValue?: string;
163
+ };
136
164
  locales?: {
137
165
  [key: string]: {
138
166
  path: string;
139
167
  inherited: boolean;
140
168
  };
141
- } | undefined;
142
- }[] | undefined;
169
+ };
170
+ }[];
143
171
  slots?: {
144
172
  [key: string]: {
145
173
  type: string;
@@ -150,44 +178,74 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
150
178
  connectedData?: {
151
179
  pointer: string;
152
180
  syntax: "jptr";
153
- failureAction?: "a" | "p" | "t" | "c" | undefined;
154
- failureLogLevel?: "i" | "e" | "w" | undefined;
155
- failureDefault?: string | undefined;
156
- } | undefined;
181
+ failureAction?: "t" | "p" | "c" | "a";
182
+ failureLogLevel?: "e" | "w" | "i";
183
+ failureDefault?: string;
184
+ };
157
185
  locales?: {
158
186
  [key: string]: unknown;
159
- } | undefined;
187
+ };
188
+ conditions?: {
189
+ when: {
190
+ op?: "&" | "|";
191
+ clauses: ({
192
+ rule: string;
193
+ source?: string;
194
+ op: string;
195
+ value: string | string[];
196
+ } | any)[];
197
+ };
198
+ value: unknown;
199
+ id: number;
200
+ }[];
201
+ localesConditions?: {
202
+ [key: string]: {
203
+ when: {
204
+ op?: "&" | "|";
205
+ clauses: ({
206
+ rule: string;
207
+ source?: string;
208
+ op: string;
209
+ value: string | string[];
210
+ } | any)[];
211
+ };
212
+ value: unknown;
213
+ id: number;
214
+ }[];
215
+ };
160
216
  };
161
- } | undefined;
162
- variant?: string | undefined;
217
+ };
218
+ variant?: string;
163
219
  slots?: {
164
220
  [key: string]: any[];
165
- } | undefined;
166
- _id?: string | undefined;
167
- _pattern?: string | undefined;
221
+ };
222
+ _id?: string;
223
+ _pattern?: string;
168
224
  _dataResources?: {
169
225
  [key: string]: {
170
226
  type: string;
171
- isPatternParameter?: boolean | undefined;
172
- ignorePatternParameterDefault?: boolean | undefined;
173
- optionalPatternParameter?: boolean | undefined;
227
+ isPatternParameter?: boolean;
228
+ ignorePatternParameterDefault?: boolean;
229
+ optionalPatternParameter?: boolean;
230
+ dataSourceVariant?: "unpublished";
174
231
  variables?: {
175
232
  [key: string]: string;
176
- } | undefined;
233
+ };
177
234
  };
178
- } | undefined;
235
+ };
179
236
  _patternDataResources?: {
180
237
  [key: string]: {
181
238
  type: string;
182
- isPatternParameter?: boolean | undefined;
183
- ignorePatternParameterDefault?: boolean | undefined;
184
- optionalPatternParameter?: boolean | undefined;
239
+ isPatternParameter?: boolean;
240
+ ignorePatternParameterDefault?: boolean;
241
+ optionalPatternParameter?: boolean;
242
+ dataSourceVariant?: "unpublished";
185
243
  variables?: {
186
244
  [key: string]: string;
187
- } | undefined;
245
+ };
188
246
  };
189
- } | undefined;
190
- _patternError?: "NOTFOUND" | "CYCLIC" | undefined;
247
+ };
248
+ _patternError?: "NOTFOUND" | "CYCLIC";
191
249
  _overrides?: {
192
250
  [key: string]: {
193
251
  parameters?: {
@@ -197,62 +255,92 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
197
255
  connectedData?: {
198
256
  pointer: string;
199
257
  syntax: "jptr";
200
- failureAction?: "a" | "p" | "t" | "c" | undefined;
201
- failureLogLevel?: "i" | "e" | "w" | undefined;
202
- failureDefault?: string | undefined;
203
- } | undefined;
258
+ failureAction?: "t" | "p" | "c" | "a";
259
+ failureLogLevel?: "e" | "w" | "i";
260
+ failureDefault?: string;
261
+ };
204
262
  locales?: {
205
263
  [key: string]: unknown;
206
- } | undefined;
264
+ };
265
+ conditions?: {
266
+ when: {
267
+ op?: "&" | "|";
268
+ clauses: ({
269
+ rule: string;
270
+ source?: string;
271
+ op: string;
272
+ value: string | string[];
273
+ } | any)[];
274
+ };
275
+ value: unknown;
276
+ id: number;
277
+ }[];
278
+ localesConditions?: {
279
+ [key: string]: {
280
+ when: {
281
+ op?: "&" | "|";
282
+ clauses: ({
283
+ rule: string;
284
+ source?: string;
285
+ op: string;
286
+ value: string | string[];
287
+ } | any)[];
288
+ };
289
+ value: unknown;
290
+ id: number;
291
+ }[];
292
+ };
207
293
  };
208
- } | undefined;
294
+ };
209
295
  slots?: {
210
296
  [key: string]: any[];
211
- } | undefined;
212
- variant?: string | undefined;
297
+ };
298
+ variant?: string;
213
299
  };
214
- } | undefined;
300
+ };
215
301
  _overridability?: {
216
302
  parameters?: {
217
303
  [key: string]: "yes" | "no";
218
- } | undefined;
219
- variants?: boolean | undefined;
220
- hideLockedParameters?: boolean | undefined;
221
- } | undefined;
222
- _locales?: string[] | undefined;
304
+ };
305
+ variants?: boolean;
306
+ hideLockedParameters?: boolean;
307
+ };
308
+ _locales?: string[];
223
309
  }[];
224
- } | undefined;
310
+ };
225
311
  _id: string;
226
- _slug?: string | null | undefined;
312
+ _slug?: string | null;
227
313
  _name: string;
228
- _author?: string | undefined;
229
- _authorSubject?: string | undefined;
230
- _creator?: string | undefined;
231
- _creatorSubject?: string | undefined;
232
- _pattern?: string | undefined;
314
+ _author?: string;
315
+ _authorSubject?: string;
316
+ _creator?: string;
317
+ _creatorSubject?: string;
318
+ _pattern?: string;
233
319
  _patternDataResources?: {
234
320
  [key: string]: {
235
321
  type: string;
236
- isPatternParameter?: boolean | undefined;
237
- ignorePatternParameterDefault?: boolean | undefined;
238
- optionalPatternParameter?: boolean | undefined;
322
+ isPatternParameter?: boolean;
323
+ ignorePatternParameterDefault?: boolean;
324
+ optionalPatternParameter?: boolean;
325
+ dataSourceVariant?: "unpublished";
239
326
  variables?: {
240
327
  [key: string]: string;
241
- } | undefined;
328
+ };
242
329
  };
243
- } | undefined;
330
+ };
244
331
  _dataResources?: {
245
332
  [key: string]: {
246
333
  type: string;
247
- isPatternParameter?: boolean | undefined;
248
- ignorePatternParameterDefault?: boolean | undefined;
249
- optionalPatternParameter?: boolean | undefined;
334
+ isPatternParameter?: boolean;
335
+ ignorePatternParameterDefault?: boolean;
336
+ optionalPatternParameter?: boolean;
337
+ dataSourceVariant?: "unpublished";
250
338
  variables?: {
251
339
  [key: string]: string;
252
- } | undefined;
340
+ };
253
341
  };
254
- } | undefined;
255
- _patternError?: "NOTFOUND" | "CYCLIC" | undefined;
342
+ };
343
+ _patternError?: "NOTFOUND" | "CYCLIC";
256
344
  _overrides?: {
257
345
  [key: string]: {
258
346
  parameters?: {
@@ -262,29 +350,57 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
262
350
  connectedData?: {
263
351
  pointer: string;
264
352
  syntax: "jptr";
265
- failureAction?: "a" | "p" | "t" | "c" | undefined;
266
- failureLogLevel?: "i" | "e" | "w" | undefined;
267
- failureDefault?: string | undefined;
268
- } | undefined;
353
+ failureAction?: "t" | "p" | "c" | "a";
354
+ failureLogLevel?: "e" | "w" | "i";
355
+ failureDefault?: string;
356
+ };
269
357
  locales?: {
270
358
  [key: string]: unknown;
271
- } | undefined;
359
+ };
360
+ conditions?: {
361
+ when: {
362
+ op?: "&" | "|";
363
+ clauses: ({
364
+ rule: string;
365
+ source?: string;
366
+ op: string;
367
+ value: string | string[];
368
+ } | any)[];
369
+ };
370
+ value: unknown;
371
+ id: number;
372
+ }[];
373
+ localesConditions?: {
374
+ [key: string]: {
375
+ when: {
376
+ op?: "&" | "|";
377
+ clauses: ({
378
+ rule: string;
379
+ source?: string;
380
+ op: string;
381
+ value: string | string[];
382
+ } | any)[];
383
+ };
384
+ value: unknown;
385
+ id: number;
386
+ }[];
387
+ };
272
388
  };
273
- } | undefined;
389
+ };
274
390
  slots?: {
275
391
  [key: string]: any[];
276
- } | undefined;
277
- variant?: string | undefined;
392
+ };
393
+ variant?: string;
278
394
  };
279
- } | undefined;
395
+ };
280
396
  _overridability?: {
281
397
  parameters?: {
282
398
  [key: string]: "yes" | "no";
283
- } | undefined;
284
- variants?: boolean | undefined;
285
- hideLockedParameters?: boolean | undefined;
286
- } | undefined;
287
- _locales?: string[] | undefined;
399
+ };
400
+ variants?: boolean;
401
+ hideLockedParameters?: boolean;
402
+ };
403
+ _locales?: string[];
288
404
  } | undefined;
289
405
  isContextualEditing: boolean;
290
406
  };
@@ -357,6 +473,14 @@ type UniformRichTextProps = {
357
473
  * for rendering a rich text node
358
474
  */
359
475
  resolveRichTextRenderer?: RenderRichTextComponentResolver;
476
+ /**
477
+ * Sets the value to show in Canvas editor when the parameter value is empty.
478
+ * Can be a static string, or a function to generate the placeholder out of parameter info.
479
+ * @default undefined
480
+ */
481
+ placeholder?: string | ((parameter: {
482
+ id: string;
483
+ }) => string | undefined);
360
484
  } & Omit<React$1.HTMLAttributes<HTMLDivElement>, 'children'>;
361
485
  /**
362
486
  * Adds rendering support for Uniform Rich Text parameters
@@ -366,14 +490,22 @@ declare const UniformRichText: React$1.ForwardRefExoticComponent<{
366
490
  * The name of the HTML tag to render.
367
491
  * @default "div"
368
492
  */
369
- as?: React$1.ElementType<any> | undefined;
493
+ as?: React$1.ElementType;
370
494
  /** The ID of the parameter. */
371
495
  parameterId: string;
372
496
  /**
373
497
  * A function which can provide a custom react component
374
498
  * for rendering a rich text node
375
499
  */
376
- resolveRichTextRenderer?: RenderRichTextComponentResolver | undefined;
500
+ resolveRichTextRenderer?: RenderRichTextComponentResolver;
501
+ /**
502
+ * Sets the value to show in Canvas editor when the parameter value is empty.
503
+ * Can be a static string, or a function to generate the placeholder out of parameter info.
504
+ * @default undefined
505
+ */
506
+ placeholder?: string | ((parameter: {
507
+ id: string;
508
+ }) => string | undefined);
377
509
  } & Omit<React$1.HTMLAttributes<HTMLDivElement>, "children"> & React$1.RefAttributes<unknown>>;
378
510
 
379
511
  type UniformRichTextNodeProps = {
@@ -481,7 +613,7 @@ declare const useUniformContextualEditingState: ({ global, }?: UseUniformContext
481
613
  declare const componentStore: ComponentStore;
482
614
  declare const registerUniformComponent: ({ type, variantId, component, }: {
483
615
  type: string;
484
- variantId?: string | undefined;
616
+ variantId?: string;
485
617
  component: React.ComponentType<ComponentProps<any>>;
486
618
  }) => void;
487
619
  declare const componentStoreResolver: RenderComponentResolver;
package/dist/index.esm.js CHANGED
@@ -234,7 +234,11 @@ var PureContextualEditingComponentWrapper = ({
234
234
  import React4, { createContext, useContext } from "react";
235
235
 
236
236
  // src/hooks/useClientConditionsComposition.ts
237
- import { evaluateWalkTreeVisibility, walkNodeTree } from "@uniformdev/canvas";
237
+ import {
238
+ evaluateWalkTreeNodeVisibility,
239
+ evaluateWalkTreePropertyCriteria,
240
+ walkNodeTree
241
+ } from "@uniformdev/canvas";
238
242
  import { produce } from "immer";
239
243
  import { useMemo as useMemo2 } from "react";
240
244
 
@@ -261,7 +265,8 @@ function useClientConditionsComposition(data) {
261
265
  try {
262
266
  return produce(data, (draft) => {
263
267
  walkNodeTree(draft, (context) => {
264
- evaluateWalkTreeVisibility({ context, rules, showIndeterminate: false });
268
+ evaluateWalkTreeNodeVisibility({ context, rules, showIndeterminate: false });
269
+ evaluateWalkTreePropertyCriteria({ node: context.node, rules, keepIndeterminate: false });
265
270
  });
266
271
  });
267
272
  } catch (e) {
@@ -690,15 +695,12 @@ import {
690
695
  ATTRIBUTE_PARAMETER_ID,
691
696
  ATTRIBUTE_PARAMETER_TYPE
692
697
  } from "@uniformdev/canvas";
693
- import {
694
- isRichTextValue,
695
- isRichTextValueConsideredEmpty
696
- } from "@uniformdev/richtext";
697
- import React18, { useMemo as useMemo5 } from "react";
698
+ import { isRichTextValue, isRichTextValueConsideredEmpty } from "@uniformdev/richtext";
699
+ import React19 from "react";
698
700
 
699
701
  // src/components/UniformRichText/UniformRichTextNode.tsx
700
702
  import { isRichTextNode } from "@uniformdev/richtext";
701
- import React17 from "react";
703
+ import React18 from "react";
702
704
 
703
705
  // src/components/UniformRichText/nodes/HeadingRichTextNode.tsx
704
706
  import React9 from "react";
@@ -752,19 +754,28 @@ var ParagraphRichTextNode = ({ children, node }) => {
752
754
  );
753
755
  };
754
756
 
755
- // src/components/UniformRichText/nodes/TabRichTextNode.tsx
757
+ // src/components/UniformRichText/nodes/TableCellRichTextNode.tsx
758
+ import { getRichTextTagFromTableCellHeaderState } from "@uniformdev/richtext";
756
759
  import React15 from "react";
760
+ var TableCellRichTextNode = ({ children, node }) => {
761
+ const { headerState } = node;
762
+ const TableCellTag = getRichTextTagFromTableCellHeaderState(headerState);
763
+ return /* @__PURE__ */ React15.createElement(TableCellTag, null, children);
764
+ };
765
+
766
+ // src/components/UniformRichText/nodes/TabRichTextNode.tsx
767
+ import React16 from "react";
757
768
  var TabRichTextNode = () => {
758
- return /* @__PURE__ */ React15.createElement(React15.Fragment, null, " ");
769
+ return /* @__PURE__ */ React16.createElement(React16.Fragment, null, " ");
759
770
  };
760
771
 
761
772
  // src/components/UniformRichText/nodes/TextRichTextNode.tsx
762
773
  import { getRichTextTagsFromTextFormat } from "@uniformdev/richtext";
763
- import React16 from "react";
774
+ import React17 from "react";
764
775
  var TextRichTextNode = ({ node }) => {
765
776
  const { text, format } = node;
766
777
  const tags = getRichTextTagsFromTextFormat(format);
767
- return /* @__PURE__ */ React16.createElement(React16.Fragment, null, tags.length > 0 ? tags.reduceRight((children, Tag) => /* @__PURE__ */ React16.createElement(Tag, null, children), text) : text);
778
+ return /* @__PURE__ */ React17.createElement(React17.Fragment, null, tags.length > 0 ? tags.reduceRight((children, Tag) => /* @__PURE__ */ React17.createElement(Tag, null, children), text) : text);
768
779
  };
769
780
 
770
781
  // src/components/UniformRichText/UniformRichTextNode.tsx
@@ -778,8 +789,8 @@ function UniformRichTextNode({ node, ...props }) {
778
789
  if (!NodeRenderer) {
779
790
  return null;
780
791
  }
781
- const children = node.children ? node.children.map((childNode, i) => /* @__PURE__ */ React17.createElement(UniformRichTextNode, { ...props, key: i, node: childNode })) : null;
782
- return /* @__PURE__ */ React17.createElement(NodeRenderer, { node }, children);
792
+ const children = node.children ? node.children.map((childNode, i) => /* @__PURE__ */ React18.createElement(UniformRichTextNode, { ...props, key: i, node: childNode })) : null;
793
+ return /* @__PURE__ */ React18.createElement(NodeRenderer, { node }, children);
783
794
  }
784
795
  var rendererMap = /* @__PURE__ */ new Map([
785
796
  ["heading", HeadingRichTextNode],
@@ -788,48 +799,59 @@ var rendererMap = /* @__PURE__ */ new Map([
788
799
  ["list", ListRichTextNode],
789
800
  ["listitem", ListItemRichTextNode],
790
801
  ["paragraph", ParagraphRichTextNode],
791
- ["quote", ({ children }) => /* @__PURE__ */ React17.createElement("blockquote", null, children)],
802
+ ["quote", ({ children }) => /* @__PURE__ */ React18.createElement("blockquote", null, children)],
792
803
  [
793
804
  "code",
794
- ({ children }) => /* @__PURE__ */ React17.createElement("pre", null, /* @__PURE__ */ React17.createElement("code", null, children))
805
+ ({ children }) => /* @__PURE__ */ React18.createElement("pre", null, /* @__PURE__ */ React18.createElement("code", null, children))
795
806
  ],
796
- ["root", ({ children }) => /* @__PURE__ */ React17.createElement(React17.Fragment, null, children)],
807
+ ["root", ({ children }) => /* @__PURE__ */ React18.createElement(React18.Fragment, null, children)],
797
808
  ["text", TextRichTextNode],
798
- ["tab", TabRichTextNode]
809
+ ["tab", TabRichTextNode],
810
+ [
811
+ "table",
812
+ ({ children }) => /* @__PURE__ */ React18.createElement("table", null, /* @__PURE__ */ React18.createElement("tbody", null, children))
813
+ ],
814
+ ["tablerow", ({ children }) => /* @__PURE__ */ React18.createElement("tr", null, children)],
815
+ ["tablecell", TableCellRichTextNode]
799
816
  ]);
800
817
  var resolveRichTextDefaultRenderer = (node) => {
801
818
  return rendererMap.get(node.type);
802
819
  };
803
820
 
804
821
  // src/components/UniformRichText/UniformRichText.tsx
805
- var UniformRichText = React18.forwardRef(function UniformRichText2({ parameterId, resolveRichTextRenderer, as: Tag = "div", ...props }, ref) {
806
- const { data: componentData } = useUniformCurrentComponent();
807
- const parameter = useMemo5(() => {
808
- var _a;
809
- return (_a = componentData == null ? void 0 : componentData.parameters) == null ? void 0 : _a[parameterId];
810
- }, [componentData, parameterId]);
811
- const value = useMemo5(() => parameter == null ? void 0 : parameter.value, [parameter]);
812
- if (!value || !isRichTextValue(value) || isRichTextValueConsideredEmpty(value)) return null;
813
- return Tag === null ? /* @__PURE__ */ React18.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }) : /* @__PURE__ */ React18.createElement(
822
+ var UniformRichText = React19.forwardRef(function UniformRichText2({ parameterId, resolveRichTextRenderer, as: Tag = "div", placeholder, ...props }, ref) {
823
+ var _a;
824
+ const { data: componentData, contextualEditingDefaultPlaceholder } = useUniformCurrentComponent();
825
+ const { isContextualEditing } = useUniformCurrentComposition();
826
+ const parameter = (_a = componentData == null ? void 0 : componentData.parameters) == null ? void 0 : _a[parameterId];
827
+ if (!parameter) {
828
+ return null;
829
+ }
830
+ const placeholderProp = placeholder != null ? placeholder : contextualEditingDefaultPlaceholder;
831
+ const computedPlaceholder = typeof placeholderProp === "function" ? placeholderProp({ id: parameterId }) : placeholderProp;
832
+ const value = parameter.value;
833
+ if (!value || !isRichTextValue(value)) return null;
834
+ if (!isContextualEditing && isRichTextValueConsideredEmpty(value)) return null;
835
+ return Tag === null ? /* @__PURE__ */ React19.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }) : /* @__PURE__ */ React19.createElement(
814
836
  Tag,
815
837
  {
816
838
  ref,
817
839
  ...props,
818
- ...{
840
+ ...isContextualEditing ? {
819
841
  [ATTRIBUTE_COMPONENT_ID]: componentData == null ? void 0 : componentData._id,
820
842
  [ATTRIBUTE_PARAMETER_ID]: parameterId,
821
843
  [ATTRIBUTE_PARAMETER_TYPE]: "richText"
822
- }
844
+ } : {}
823
845
  },
824
- /* @__PURE__ */ React18.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer })
846
+ isRichTextValueConsideredEmpty(value) ? /* @__PURE__ */ React19.createElement("p", null, /* @__PURE__ */ React19.createElement("i", null, computedPlaceholder)) : /* @__PURE__ */ React19.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer })
825
847
  );
826
848
  });
827
849
 
828
850
  // src/components/UniformText.tsx
829
- import React20, { useState as useState2 } from "react";
851
+ import React21, { useState as useState2 } from "react";
830
852
 
831
853
  // src/components/PureUniformText.tsx
832
- import React19 from "react";
854
+ import React20 from "react";
833
855
  var PureUniformText = ({
834
856
  as: Tag = "span",
835
857
  parameterId,
@@ -848,10 +870,10 @@ var PureUniformText = ({
848
870
  return null;
849
871
  }
850
872
  if (!isContextualEditing) {
851
- return /* @__PURE__ */ React19.createElement(Tag, { style: isMultiline ? { whiteSpace: "pre-wrap" } : {}, ...props }, render(value));
873
+ return /* @__PURE__ */ React20.createElement(Tag, { style: isMultiline ? { whiteSpace: "pre-wrap" } : {}, ...props }, render(value));
852
874
  }
853
875
  const computedPlaceholder = typeof placeholder === "function" ? placeholder({ id: parameterId }) : placeholder;
854
- return /* @__PURE__ */ React19.createElement(
876
+ return /* @__PURE__ */ React20.createElement(
855
877
  Tag,
856
878
  {
857
879
  ...props,
@@ -889,7 +911,7 @@ var UniformText = ({
889
911
  }
890
912
  const placeholderProp = placeholder != null ? placeholder : contextualEditingDefaultPlaceholder;
891
913
  const computedPlaceholder = typeof placeholderProp === "function" ? placeholderProp({ id: parameterId }) : placeholderProp;
892
- return /* @__PURE__ */ React20.createElement(
914
+ return /* @__PURE__ */ React21.createElement(
893
915
  PureUniformText,
894
916
  {
895
917
  ...props,
@@ -967,7 +989,7 @@ import {
967
989
  createCanvasChannel as createCanvasChannel2,
968
990
  isUpdateContextualEditingStateInternalMessage
969
991
  } from "@uniformdev/canvas";
970
- import { useEffect as useEffect3, useMemo as useMemo6, useState as useState3 } from "react";
992
+ import { useEffect as useEffect3, useMemo as useMemo5, useState as useState3 } from "react";
971
993
  var useUniformContextualEditingState = ({
972
994
  global = false
973
995
  } = {}) => {
@@ -977,7 +999,7 @@ var useUniformContextualEditingState = ({
977
999
  const [previewMode, setPreviewMode] = useState3(
978
1000
  isContextualEditing ? "editor" : void 0
979
1001
  );
980
- const channel = useMemo6(() => {
1002
+ const channel = useMemo5(() => {
981
1003
  if (!isContextualEditing) {
982
1004
  return;
983
1005
  }
@@ -1011,7 +1033,7 @@ var useUniformContextualEditingState = ({
1011
1033
  unsubscribe();
1012
1034
  };
1013
1035
  }, [global, channel, componentData == null ? void 0 : componentData._id, setSelectedComponentReference, setPreviewMode]);
1014
- return useMemo6(
1036
+ return useMemo5(
1015
1037
  () => ({
1016
1038
  isContextualEditing,
1017
1039
  selectedComponentReference,