@uniformdev/canvas-react 19.23.1-alpha.12 → 19.24.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.esm.js +5 -2
- package/dist/index.js +1 -1
- package/dist/index.mjs +5 -2
- package/package.json +6 -6
package/dist/index.esm.js
CHANGED
|
@@ -553,7 +553,10 @@ function resolveChildren({
|
|
|
553
553
|
}
|
|
554
554
|
|
|
555
555
|
// src/components/UniformRichText/UniformRichText.tsx
|
|
556
|
-
import {
|
|
556
|
+
import {
|
|
557
|
+
isRichTextValue,
|
|
558
|
+
isRichTextValueConsideredEmpty
|
|
559
|
+
} from "@uniformdev/richtext";
|
|
557
560
|
import React16, { useMemo as useMemo2 } from "react";
|
|
558
561
|
|
|
559
562
|
// src/components/UniformRichText/UniformRichTextNode.tsx
|
|
@@ -670,7 +673,7 @@ var UniformRichText = React16.forwardRef(function UniformRichText2({ parameterId
|
|
|
670
673
|
return (_a = componentData == null ? void 0 : componentData.parameters) == null ? void 0 : _a[parameterId];
|
|
671
674
|
}, [componentData, parameterId]);
|
|
672
675
|
const value = useMemo2(() => parameter == null ? void 0 : parameter.value, [parameter]);
|
|
673
|
-
if (!value || !
|
|
676
|
+
if (!value || !isRichTextValue(value) || isRichTextValueConsideredEmpty(value))
|
|
674
677
|
return null;
|
|
675
678
|
return Tag === null ? /* @__PURE__ */ React16.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }) : /* @__PURE__ */ React16.createElement(Tag, { ref, ...props }, /* @__PURE__ */ React16.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }));
|
|
676
679
|
});
|
package/dist/index.js
CHANGED
|
@@ -702,7 +702,7 @@ var UniformRichText = import_react16.default.forwardRef(function UniformRichText
|
|
|
702
702
|
return (_a = componentData == null ? void 0 : componentData.parameters) == null ? void 0 : _a[parameterId];
|
|
703
703
|
}, [componentData, parameterId]);
|
|
704
704
|
const value = (0, import_react16.useMemo)(() => parameter == null ? void 0 : parameter.value, [parameter]);
|
|
705
|
-
if (!value || !(0, import_richtext5.
|
|
705
|
+
if (!value || !(0, import_richtext5.isRichTextValue)(value) || (0, import_richtext5.isRichTextValueConsideredEmpty)(value))
|
|
706
706
|
return null;
|
|
707
707
|
return Tag === null ? /* @__PURE__ */ import_react16.default.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }) : /* @__PURE__ */ import_react16.default.createElement(Tag, { ref, ...props }, /* @__PURE__ */ import_react16.default.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }));
|
|
708
708
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -553,7 +553,10 @@ function resolveChildren({
|
|
|
553
553
|
}
|
|
554
554
|
|
|
555
555
|
// src/components/UniformRichText/UniformRichText.tsx
|
|
556
|
-
import {
|
|
556
|
+
import {
|
|
557
|
+
isRichTextValue,
|
|
558
|
+
isRichTextValueConsideredEmpty
|
|
559
|
+
} from "@uniformdev/richtext";
|
|
557
560
|
import React16, { useMemo as useMemo2 } from "react";
|
|
558
561
|
|
|
559
562
|
// src/components/UniformRichText/UniformRichTextNode.tsx
|
|
@@ -670,7 +673,7 @@ var UniformRichText = React16.forwardRef(function UniformRichText2({ parameterId
|
|
|
670
673
|
return (_a = componentData == null ? void 0 : componentData.parameters) == null ? void 0 : _a[parameterId];
|
|
671
674
|
}, [componentData, parameterId]);
|
|
672
675
|
const value = useMemo2(() => parameter == null ? void 0 : parameter.value, [parameter]);
|
|
673
|
-
if (!value || !
|
|
676
|
+
if (!value || !isRichTextValue(value) || isRichTextValueConsideredEmpty(value))
|
|
674
677
|
return null;
|
|
675
678
|
return Tag === null ? /* @__PURE__ */ React16.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }) : /* @__PURE__ */ React16.createElement(Tag, { ref, ...props }, /* @__PURE__ */ React16.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }));
|
|
676
679
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/canvas-react",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.24.0",
|
|
4
4
|
"description": "React SDK for Uniform Canvas",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"document": "api-extractor run --local"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@uniformdev/canvas": "19.
|
|
28
|
-
"@uniformdev/context": "19.
|
|
29
|
-
"@uniformdev/context-react": "19.
|
|
30
|
-
"@uniformdev/richtext": "19.
|
|
27
|
+
"@uniformdev/canvas": "19.24.0",
|
|
28
|
+
"@uniformdev/context": "19.24.0",
|
|
29
|
+
"@uniformdev/context-react": "19.24.0",
|
|
30
|
+
"@uniformdev/richtext": "19.24.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"react": ">= 16 || 17 || 18",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "ca1c309ce7eed5bffa76130e2baa0f03b08377ac"
|
|
48
48
|
}
|