@uniformdev/canvas-react 19.198.3-alpha.3 → 19.199.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.mts CHANGED
@@ -461,7 +461,7 @@ type UniformRichTextProps = {
461
461
  * The name of the HTML tag to render.
462
462
  * @default "div"
463
463
  */
464
- as?: React$1.ElementType;
464
+ as?: React$1.ElementType | null;
465
465
  /** The ID of the parameter. */
466
466
  parameterId: string;
467
467
  /**
@@ -486,7 +486,7 @@ declare const UniformRichText: React$1.ForwardRefExoticComponent<{
486
486
  * The name of the HTML tag to render.
487
487
  * @default "div"
488
488
  */
489
- as?: React$1.ElementType;
489
+ as?: React$1.ElementType | null;
490
490
  /** The ID of the parameter. */
491
491
  parameterId: string;
492
492
  /**
package/dist/index.d.ts CHANGED
@@ -461,7 +461,7 @@ type UniformRichTextProps = {
461
461
  * The name of the HTML tag to render.
462
462
  * @default "div"
463
463
  */
464
- as?: React$1.ElementType;
464
+ as?: React$1.ElementType | null;
465
465
  /** The ID of the parameter. */
466
466
  parameterId: string;
467
467
  /**
@@ -486,7 +486,7 @@ declare const UniformRichText: React$1.ForwardRefExoticComponent<{
486
486
  * The name of the HTML tag to render.
487
487
  * @default "div"
488
488
  */
489
- as?: React$1.ElementType;
489
+ as?: React$1.ElementType | null;
490
490
  /** The ID of the parameter. */
491
491
  parameterId: string;
492
492
  /**
package/dist/index.esm.js CHANGED
@@ -847,7 +847,20 @@ var UniformRichText = React20.forwardRef(function UniformRichText2({ parameterId
847
847
  const value = parameter.value;
848
848
  if (!value || !isRichTextValue(value)) return null;
849
849
  if (!isContextualEditing && isRichTextValueConsideredEmpty(value)) return null;
850
- return Tag === null ? /* @__PURE__ */ React20.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }) : /* @__PURE__ */ React20.createElement(
850
+ if (!Tag) {
851
+ return isContextualEditing && isRichTextValueConsideredEmpty(value) ? /* @__PURE__ */ React20.createElement(
852
+ "p",
853
+ {
854
+ ...{
855
+ [ATTRIBUTE_COMPONENT_ID]: componentData == null ? void 0 : componentData._id,
856
+ [ATTRIBUTE_PARAMETER_ID]: parameterId,
857
+ [ATTRIBUTE_PARAMETER_TYPE]: "richText"
858
+ }
859
+ },
860
+ /* @__PURE__ */ React20.createElement("i", null, computedPlaceholder)
861
+ ) : /* @__PURE__ */ React20.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer });
862
+ }
863
+ return /* @__PURE__ */ React20.createElement(
851
864
  Tag,
852
865
  {
853
866
  ref,
package/dist/index.js CHANGED
@@ -871,7 +871,20 @@ var UniformRichText = import_react22.default.forwardRef(function UniformRichText
871
871
  const value = parameter.value;
872
872
  if (!value || !(0, import_richtext6.isRichTextValue)(value)) return null;
873
873
  if (!isContextualEditing && (0, import_richtext6.isRichTextValueConsideredEmpty)(value)) return null;
874
- return Tag === null ? /* @__PURE__ */ import_react22.default.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }) : /* @__PURE__ */ import_react22.default.createElement(
874
+ if (!Tag) {
875
+ return isContextualEditing && (0, import_richtext6.isRichTextValueConsideredEmpty)(value) ? /* @__PURE__ */ import_react22.default.createElement(
876
+ "p",
877
+ {
878
+ ...{
879
+ [import_canvas11.ATTRIBUTE_COMPONENT_ID]: componentData == null ? void 0 : componentData._id,
880
+ [import_canvas11.ATTRIBUTE_PARAMETER_ID]: parameterId,
881
+ [import_canvas11.ATTRIBUTE_PARAMETER_TYPE]: "richText"
882
+ }
883
+ },
884
+ /* @__PURE__ */ import_react22.default.createElement("i", null, computedPlaceholder)
885
+ ) : /* @__PURE__ */ import_react22.default.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer });
886
+ }
887
+ return /* @__PURE__ */ import_react22.default.createElement(
875
888
  Tag,
876
889
  {
877
890
  ref,
package/dist/index.mjs CHANGED
@@ -847,7 +847,20 @@ var UniformRichText = React20.forwardRef(function UniformRichText2({ parameterId
847
847
  const value = parameter.value;
848
848
  if (!value || !isRichTextValue(value)) return null;
849
849
  if (!isContextualEditing && isRichTextValueConsideredEmpty(value)) return null;
850
- return Tag === null ? /* @__PURE__ */ React20.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }) : /* @__PURE__ */ React20.createElement(
850
+ if (!Tag) {
851
+ return isContextualEditing && isRichTextValueConsideredEmpty(value) ? /* @__PURE__ */ React20.createElement(
852
+ "p",
853
+ {
854
+ ...{
855
+ [ATTRIBUTE_COMPONENT_ID]: componentData == null ? void 0 : componentData._id,
856
+ [ATTRIBUTE_PARAMETER_ID]: parameterId,
857
+ [ATTRIBUTE_PARAMETER_TYPE]: "richText"
858
+ }
859
+ },
860
+ /* @__PURE__ */ React20.createElement("i", null, computedPlaceholder)
861
+ ) : /* @__PURE__ */ React20.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer });
862
+ }
863
+ return /* @__PURE__ */ React20.createElement(
851
864
  Tag,
852
865
  {
853
866
  ref,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas-react",
3
- "version": "19.198.3-alpha.3+841d67194f",
3
+ "version": "19.199.0",
4
4
  "description": "React SDK for Uniform Canvas",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -45,10 +45,10 @@
45
45
  "document": "api-extractor run --local"
46
46
  },
47
47
  "dependencies": {
48
- "@uniformdev/canvas": "19.198.3-alpha.3+841d67194f",
49
- "@uniformdev/context": "19.198.3-alpha.3+841d67194f",
50
- "@uniformdev/context-react": "19.198.3-alpha.3+841d67194f",
51
- "@uniformdev/richtext": "19.198.3-alpha.3+841d67194f"
48
+ "@uniformdev/canvas": "19.199.0",
49
+ "@uniformdev/context": "19.199.0",
50
+ "@uniformdev/context-react": "19.199.0",
51
+ "@uniformdev/richtext": "19.199.0"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "immer": ">= 10",
@@ -67,5 +67,5 @@
67
67
  "publishConfig": {
68
68
  "access": "public"
69
69
  },
70
- "gitHead": "841d67194f69de255b50de9b3a8c17b1f9461ec5"
70
+ "gitHead": "10b981b78ca171d82d8535f8162c2072e1e944c5"
71
71
  }