@uniformdev/canvas-react 19.3.0 → 19.6.0

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
@@ -267,6 +267,11 @@ type UniformTextProps = {
267
267
  * @default false
268
268
  */
269
269
  isMultiline?: boolean;
270
+ /**
271
+ * Sets the value to show in Canvas editor when the parameter value is empty.
272
+ * @default undefined
273
+ */
274
+ placeholder?: string;
270
275
  /**
271
276
  * A function to customize the rendering of the parameter value. Useful to format the value before rendering it.
272
277
  * @default "(value) => value"
@@ -277,7 +282,7 @@ type UniformTextProps = {
277
282
  * Adds inline editing capability to text parameters
278
283
  * @deprecated This component is unstable, and not ready for production usage.
279
284
  **/
280
- declare const UniformText: ({ as: Tag, parameterId, isMultiline, render, ...props }: UniformTextProps) => JSX.Element | null;
285
+ declare const UniformText: ({ as: Tag, parameterId, isMultiline, placeholder, render, ...props }: UniformTextProps) => JSX.Element | null;
281
286
 
282
287
  type UseCompositionEventEffectOptions = Omit<Partial<SubscribeToCompositionOptions>, 'callback'> & {
283
288
  enabled: boolean;
package/dist/index.esm.js CHANGED
@@ -521,6 +521,7 @@ var UniformText = ({
521
521
  as: Tag = "span",
522
522
  parameterId,
523
523
  isMultiline = false,
524
+ placeholder,
524
525
  render = (value) => value,
525
526
  ...props
526
527
  }) => {
@@ -560,8 +561,10 @@ var UniformText = ({
560
561
  ref: elementRef,
561
562
  "data-uniform-component-id": componentData == null ? void 0 : componentData._id,
562
563
  "data-uniform-parameter-id": parameterId,
564
+ "data-uniform-parameter-value": value != null ? value : "",
563
565
  "data-uniform-parameter-type": "text",
564
566
  "data-uniform-is-multiline": isMultiline,
567
+ "data-uniform-placeholder": placeholder,
565
568
  style: isMultiline ? { whiteSpace: "pre-wrap" } : {},
566
569
  contentEditable: isEditable,
567
570
  suppressContentEditableWarning: true,
package/dist/index.js CHANGED
@@ -549,6 +549,7 @@ var UniformText = ({
549
549
  as: Tag = "span",
550
550
  parameterId,
551
551
  isMultiline = false,
552
+ placeholder,
552
553
  render = (value) => value,
553
554
  ...props
554
555
  }) => {
@@ -588,8 +589,10 @@ var UniformText = ({
588
589
  ref: elementRef,
589
590
  "data-uniform-component-id": componentData == null ? void 0 : componentData._id,
590
591
  "data-uniform-parameter-id": parameterId,
592
+ "data-uniform-parameter-value": value != null ? value : "",
591
593
  "data-uniform-parameter-type": "text",
592
594
  "data-uniform-is-multiline": isMultiline,
595
+ "data-uniform-placeholder": placeholder,
593
596
  style: isMultiline ? { whiteSpace: "pre-wrap" } : {},
594
597
  contentEditable: isEditable,
595
598
  suppressContentEditableWarning: true,
package/dist/index.mjs CHANGED
@@ -521,6 +521,7 @@ var UniformText = ({
521
521
  as: Tag = "span",
522
522
  parameterId,
523
523
  isMultiline = false,
524
+ placeholder,
524
525
  render = (value) => value,
525
526
  ...props
526
527
  }) => {
@@ -560,8 +561,10 @@ var UniformText = ({
560
561
  ref: elementRef,
561
562
  "data-uniform-component-id": componentData == null ? void 0 : componentData._id,
562
563
  "data-uniform-parameter-id": parameterId,
564
+ "data-uniform-parameter-value": value != null ? value : "",
563
565
  "data-uniform-parameter-type": "text",
564
566
  "data-uniform-is-multiline": isMultiline,
567
+ "data-uniform-placeholder": placeholder,
565
568
  style: isMultiline ? { whiteSpace: "pre-wrap" } : {},
566
569
  contentEditable: isEditable,
567
570
  suppressContentEditableWarning: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas-react",
3
- "version": "19.3.0",
3
+ "version": "19.6.0",
4
4
  "description": "React SDK for Uniform Canvas",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -24,9 +24,9 @@
24
24
  "document": "api-extractor run --local"
25
25
  },
26
26
  "dependencies": {
27
- "@uniformdev/canvas": "19.3.0",
28
- "@uniformdev/context": "19.3.0",
29
- "@uniformdev/context-react": "19.3.0"
27
+ "@uniformdev/canvas": "19.6.0",
28
+ "@uniformdev/context": "19.6.0",
29
+ "@uniformdev/context-react": "19.6.0"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "react": ">= 16 || 17 || 18",
@@ -43,5 +43,5 @@
43
43
  "publishConfig": {
44
44
  "access": "public"
45
45
  },
46
- "gitHead": "57552ffe10ca66f905d8908c82dde39935fb1803"
46
+ "gitHead": "a14550dd1caa33fa1310ada642d06ce79bbe4eac"
47
47
  }