@uniformdev/canvas-react 20.49.2 → 20.49.3-alpha.47
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/{PureUniformText-B3GAm6Dc.d.mts → PureUniformText-CzdaUBnC.d.mts} +1 -1
- package/dist/{PureUniformText-B3GAm6Dc.d.ts → PureUniformText-CzdaUBnC.d.ts} +1 -1
- package/dist/core.d.mts +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +2 -2
- package/dist/core.mjs +2 -2
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.esm.js +19 -18
- package/dist/index.js +23 -21
- package/dist/index.mjs +19 -18
- package/package.json +10 -11
|
@@ -38,4 +38,4 @@ type PureUniformTextProps = {
|
|
|
38
38
|
*/
|
|
39
39
|
declare const PureUniformText: ({ as: Tag, parameterId, component, skipCustomRendering, isContextualEditing, isMultiline, placeholder, render, ...props }: PureUniformTextProps) => React.JSX.Element | null;
|
|
40
40
|
|
|
41
|
-
export {
|
|
41
|
+
export { PureUniformText as P, type PureUniformTextProps as a };
|
|
@@ -38,4 +38,4 @@ type PureUniformTextProps = {
|
|
|
38
38
|
*/
|
|
39
39
|
declare const PureUniformText: ({ as: Tag, parameterId, component, skipCustomRendering, isContextualEditing, isMultiline, placeholder, render, ...props }: PureUniformTextProps) => React.JSX.Element | null;
|
|
40
40
|
|
|
41
|
-
export {
|
|
41
|
+
export { PureUniformText as P, type PureUniformTextProps as a };
|
package/dist/core.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentInstance, RootComponentInstance } from '@uniformdev/canvas';
|
|
2
2
|
import React, { PropsWithChildren } from 'react';
|
|
3
|
-
export {
|
|
3
|
+
export { P as PureUniformText, a as PureUniformTextProps } from './PureUniformText-CzdaUBnC.mjs';
|
|
4
4
|
|
|
5
5
|
type PureContextualEditingComponentWrapperProps = {
|
|
6
6
|
isPlaceholder: boolean | undefined;
|
package/dist/core.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentInstance, RootComponentInstance } from '@uniformdev/canvas';
|
|
2
2
|
import React, { PropsWithChildren } from 'react';
|
|
3
|
-
export {
|
|
3
|
+
export { P as PureUniformText, a as PureUniformTextProps } from './PureUniformText-CzdaUBnC.js';
|
|
4
4
|
|
|
5
5
|
type PureContextualEditingComponentWrapperProps = {
|
|
6
6
|
isPlaceholder: boolean | undefined;
|
package/dist/core.js
CHANGED
|
@@ -51,7 +51,7 @@ var PureContextualEditingComponentWrapper = ({
|
|
|
51
51
|
}) => {
|
|
52
52
|
var _a, _b, _c, _d;
|
|
53
53
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
54
|
-
"
|
|
54
|
+
"template",
|
|
55
55
|
{
|
|
56
56
|
"data-role": import_canvas.IN_CONTEXT_EDITOR_COMPONENT_START_ROLE,
|
|
57
57
|
"data-parent-id": parentComponent == null ? void 0 : parentComponent._id,
|
|
@@ -66,7 +66,7 @@ var PureContextualEditingComponentWrapper = ({
|
|
|
66
66
|
"data-component-title": (_d = (_c = (_b = component == null ? void 0 : component.parameters) == null ? void 0 : _b.title) == null ? void 0 : _c.value) != null ? _d : "",
|
|
67
67
|
"data-is-readonly": isReadOnly
|
|
68
68
|
}
|
|
69
|
-
), children, /* @__PURE__ */ import_react.default.createElement("
|
|
69
|
+
), children, /* @__PURE__ */ import_react.default.createElement("template", { "data-role": import_canvas.IN_CONTEXT_EDITOR_COMPONENT_END_ROLE }));
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
// src/components/PureUniformText.tsx
|
package/dist/core.mjs
CHANGED
|
@@ -19,7 +19,7 @@ var PureContextualEditingComponentWrapper = ({
|
|
|
19
19
|
}) => {
|
|
20
20
|
var _a, _b, _c, _d;
|
|
21
21
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
22
|
-
"
|
|
22
|
+
"template",
|
|
23
23
|
{
|
|
24
24
|
"data-role": IN_CONTEXT_EDITOR_COMPONENT_START_ROLE,
|
|
25
25
|
"data-parent-id": parentComponent == null ? void 0 : parentComponent._id,
|
|
@@ -34,7 +34,7 @@ var PureContextualEditingComponentWrapper = ({
|
|
|
34
34
|
"data-component-title": (_d = (_c = (_b = component == null ? void 0 : component.parameters) == null ? void 0 : _b.title) == null ? void 0 : _c.value) != null ? _d : "",
|
|
35
35
|
"data-is-readonly": isReadOnly
|
|
36
36
|
}
|
|
37
|
-
), children, /* @__PURE__ */ React.createElement("
|
|
37
|
+
), children, /* @__PURE__ */ React.createElement("template", { "data-role": IN_CONTEXT_EDITOR_COMPONENT_END_ROLE }));
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
// src/components/PureUniformText.tsx
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React$1, { Key, ReactNode, PropsWithChildren } from 'react';
|
|
2
2
|
import { ComponentInstance, RootComponentInstance, UpdateCompositionMessage, getParameterAttributes as getParameterAttributes$1, UpdateContextualEditingStateInternalMessage } from '@uniformdev/canvas';
|
|
3
3
|
export { GetParameterAttributesProps, createUniformApiEnhancer } from '@uniformdev/canvas';
|
|
4
|
-
import {
|
|
4
|
+
import { a as PureUniformTextProps } from './PureUniformText-CzdaUBnC.mjs';
|
|
5
5
|
import { CompositionMetadata } from '@uniformdev/context';
|
|
6
6
|
import { RichTextNode } from '@uniformdev/richtext';
|
|
7
|
+
export { linkParamValueToAnchorProps } from '@uniformdev/richtext';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Props passed to a Canvas component implementation.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React$1, { Key, ReactNode, PropsWithChildren } from 'react';
|
|
2
2
|
import { ComponentInstance, RootComponentInstance, UpdateCompositionMessage, getParameterAttributes as getParameterAttributes$1, UpdateContextualEditingStateInternalMessage } from '@uniformdev/canvas';
|
|
3
3
|
export { GetParameterAttributesProps, createUniformApiEnhancer } from '@uniformdev/canvas';
|
|
4
|
-
import {
|
|
4
|
+
import { a as PureUniformTextProps } from './PureUniformText-CzdaUBnC.js';
|
|
5
5
|
import { CompositionMetadata } from '@uniformdev/context';
|
|
6
6
|
import { RichTextNode } from '@uniformdev/richtext';
|
|
7
|
+
export { linkParamValueToAnchorProps } from '@uniformdev/richtext';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Props passed to a Canvas component implementation.
|
package/dist/index.esm.js
CHANGED
|
@@ -326,7 +326,7 @@ var PureContextualEditingComponentWrapper = ({
|
|
|
326
326
|
}) => {
|
|
327
327
|
var _a, _b, _c, _d;
|
|
328
328
|
return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(
|
|
329
|
-
"
|
|
329
|
+
"template",
|
|
330
330
|
{
|
|
331
331
|
"data-role": IN_CONTEXT_EDITOR_COMPONENT_START_ROLE,
|
|
332
332
|
"data-parent-id": parentComponent == null ? void 0 : parentComponent._id,
|
|
@@ -341,7 +341,7 @@ var PureContextualEditingComponentWrapper = ({
|
|
|
341
341
|
"data-component-title": (_d = (_c = (_b = component == null ? void 0 : component.parameters) == null ? void 0 : _b.title) == null ? void 0 : _c.value) != null ? _d : "",
|
|
342
342
|
"data-is-readonly": isReadOnly
|
|
343
343
|
}
|
|
344
|
-
), children, /* @__PURE__ */ React2.createElement("
|
|
344
|
+
), children, /* @__PURE__ */ React2.createElement("template", { "data-role": IN_CONTEXT_EDITOR_COMPONENT_END_ROLE }));
|
|
345
345
|
};
|
|
346
346
|
|
|
347
347
|
// src/components/ContextualEditingComponentWrapper.tsx
|
|
@@ -725,6 +725,14 @@ var UniformPlayground = ({
|
|
|
725
725
|
);
|
|
726
726
|
};
|
|
727
727
|
|
|
728
|
+
// src/components/UniformRichText/nodes/LinkRichTextNode.tsx
|
|
729
|
+
import { linkParamValueToAnchorProps } from "@uniformdev/richtext";
|
|
730
|
+
import React9 from "react";
|
|
731
|
+
var LinkRichTextNode = ({ children, node }) => {
|
|
732
|
+
const { link } = node;
|
|
733
|
+
return /* @__PURE__ */ React9.createElement("a", { ...linkParamValueToAnchorProps(link) }, children);
|
|
734
|
+
};
|
|
735
|
+
|
|
728
736
|
// src/components/UniformRichText/UniformRichText.tsx
|
|
729
737
|
import {
|
|
730
738
|
ATTRIBUTE_COMPONENT_ID,
|
|
@@ -739,7 +747,7 @@ import { isRichTextNode } from "@uniformdev/richtext";
|
|
|
739
747
|
import React19 from "react";
|
|
740
748
|
|
|
741
749
|
// src/components/UniformRichText/nodes/AssetRichTextNode.tsx
|
|
742
|
-
import
|
|
750
|
+
import React10 from "react";
|
|
743
751
|
var AssetRichTextNode = ({ node }) => {
|
|
744
752
|
var _a, _b;
|
|
745
753
|
const { __asset } = node;
|
|
@@ -747,37 +755,29 @@ var AssetRichTextNode = ({ node }) => {
|
|
|
747
755
|
return null;
|
|
748
756
|
}
|
|
749
757
|
if (__asset.type === "image") {
|
|
750
|
-
return /* @__PURE__ */
|
|
758
|
+
return /* @__PURE__ */ React10.createElement("figure", null, /* @__PURE__ */ React10.createElement("img", { src: __asset.fields.url.value, alt: (_a = __asset.fields.title) == null ? void 0 : _a.value }), ((_b = __asset.fields.description) == null ? void 0 : _b.value) ? /* @__PURE__ */ React10.createElement("figcaption", null, __asset.fields.description.value) : null);
|
|
751
759
|
}
|
|
752
760
|
if (__asset.type === "video") {
|
|
753
|
-
return /* @__PURE__ */
|
|
761
|
+
return /* @__PURE__ */ React10.createElement("video", { src: __asset.fields.url.value, controls: true });
|
|
754
762
|
}
|
|
755
763
|
if (__asset.type === "audio") {
|
|
756
|
-
return /* @__PURE__ */
|
|
764
|
+
return /* @__PURE__ */ React10.createElement("audio", { src: __asset.fields.url.value, controls: true });
|
|
757
765
|
}
|
|
758
766
|
return null;
|
|
759
767
|
};
|
|
760
768
|
|
|
761
769
|
// src/components/UniformRichText/nodes/HeadingRichTextNode.tsx
|
|
762
|
-
import
|
|
770
|
+
import React11 from "react";
|
|
763
771
|
var HeadingRichTextNode = ({ children, node }) => {
|
|
764
772
|
const { tag } = node;
|
|
765
773
|
const HTag = tag != null ? tag : "h1";
|
|
766
|
-
return /* @__PURE__ */
|
|
774
|
+
return /* @__PURE__ */ React11.createElement(HTag, null, children);
|
|
767
775
|
};
|
|
768
776
|
|
|
769
777
|
// src/components/UniformRichText/nodes/LinebreakRichTextNode.tsx
|
|
770
|
-
import React11 from "react";
|
|
771
|
-
var LinebreakRichTextNode = () => {
|
|
772
|
-
return /* @__PURE__ */ React11.createElement("br", null);
|
|
773
|
-
};
|
|
774
|
-
|
|
775
|
-
// src/components/UniformRichText/nodes/LinkRichTextNode.tsx
|
|
776
|
-
import { linkParamValueToHref } from "@uniformdev/richtext";
|
|
777
778
|
import React12 from "react";
|
|
778
|
-
var
|
|
779
|
-
|
|
780
|
-
return /* @__PURE__ */ React12.createElement("a", { href: linkParamValueToHref(link) }, children);
|
|
779
|
+
var LinebreakRichTextNode = () => {
|
|
780
|
+
return /* @__PURE__ */ React12.createElement("br", null);
|
|
781
781
|
};
|
|
782
782
|
|
|
783
783
|
// src/components/UniformRichText/nodes/ListItemRichTextNode.tsx
|
|
@@ -1090,6 +1090,7 @@ export {
|
|
|
1090
1090
|
createComponentStoreResolver,
|
|
1091
1091
|
createUniformApiEnhancer,
|
|
1092
1092
|
getParameterAttributes,
|
|
1093
|
+
linkParamValueToAnchorProps,
|
|
1093
1094
|
registerUniformComponent,
|
|
1094
1095
|
useUniformContextualEditing,
|
|
1095
1096
|
useUniformContextualEditingState,
|
package/dist/index.js
CHANGED
|
@@ -29,8 +29,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
29
29
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
30
|
|
|
31
31
|
// src/index.ts
|
|
32
|
-
var
|
|
33
|
-
__export(
|
|
32
|
+
var index_exports = {};
|
|
33
|
+
__export(index_exports, {
|
|
34
34
|
DefaultNotImplementedComponent: () => DefaultNotImplementedComponent,
|
|
35
35
|
NOT_IMPLEMENTED_COMPONENT: () => NOT_IMPLEMENTED_COMPONENT,
|
|
36
36
|
UniformComponent: () => UniformComponent,
|
|
@@ -48,13 +48,14 @@ __export(src_exports, {
|
|
|
48
48
|
createComponentStoreResolver: () => createComponentStoreResolver,
|
|
49
49
|
createUniformApiEnhancer: () => import_canvas4.createUniformApiEnhancer,
|
|
50
50
|
getParameterAttributes: () => getParameterAttributes,
|
|
51
|
+
linkParamValueToAnchorProps: () => import_richtext.linkParamValueToAnchorProps,
|
|
51
52
|
registerUniformComponent: () => registerUniformComponent,
|
|
52
53
|
useUniformContextualEditing: () => useUniformContextualEditing,
|
|
53
54
|
useUniformContextualEditingState: () => useUniformContextualEditingState,
|
|
54
55
|
useUniformCurrentComponent: () => useUniformCurrentComponent,
|
|
55
56
|
useUniformCurrentComposition: () => useUniformCurrentComposition
|
|
56
57
|
});
|
|
57
|
-
module.exports = __toCommonJS(
|
|
58
|
+
module.exports = __toCommonJS(index_exports);
|
|
58
59
|
|
|
59
60
|
// src/components/DefaultNotImplementedComponent.tsx
|
|
60
61
|
var import_canvas = require("@uniformdev/canvas");
|
|
@@ -349,7 +350,7 @@ var PureContextualEditingComponentWrapper = ({
|
|
|
349
350
|
}) => {
|
|
350
351
|
var _a, _b, _c, _d;
|
|
351
352
|
return /* @__PURE__ */ import_react5.default.createElement(import_react5.default.Fragment, null, /* @__PURE__ */ import_react5.default.createElement(
|
|
352
|
-
"
|
|
353
|
+
"template",
|
|
353
354
|
{
|
|
354
355
|
"data-role": import_canvas5.IN_CONTEXT_EDITOR_COMPONENT_START_ROLE,
|
|
355
356
|
"data-parent-id": parentComponent == null ? void 0 : parentComponent._id,
|
|
@@ -364,7 +365,7 @@ var PureContextualEditingComponentWrapper = ({
|
|
|
364
365
|
"data-component-title": (_d = (_c = (_b = component == null ? void 0 : component.parameters) == null ? void 0 : _b.title) == null ? void 0 : _c.value) != null ? _d : "",
|
|
365
366
|
"data-is-readonly": isReadOnly
|
|
366
367
|
}
|
|
367
|
-
), children, /* @__PURE__ */ import_react5.default.createElement("
|
|
368
|
+
), children, /* @__PURE__ */ import_react5.default.createElement("template", { "data-role": import_canvas5.IN_CONTEXT_EDITOR_COMPONENT_END_ROLE }));
|
|
368
369
|
};
|
|
369
370
|
|
|
370
371
|
// src/components/ContextualEditingComponentWrapper.tsx
|
|
@@ -748,6 +749,14 @@ var UniformPlayground = ({
|
|
|
748
749
|
);
|
|
749
750
|
};
|
|
750
751
|
|
|
752
|
+
// src/components/UniformRichText/nodes/LinkRichTextNode.tsx
|
|
753
|
+
var import_richtext = require("@uniformdev/richtext");
|
|
754
|
+
var import_react11 = __toESM(require("react"));
|
|
755
|
+
var LinkRichTextNode = ({ children, node }) => {
|
|
756
|
+
const { link } = node;
|
|
757
|
+
return /* @__PURE__ */ import_react11.default.createElement("a", { ...(0, import_richtext.linkParamValueToAnchorProps)(link) }, children);
|
|
758
|
+
};
|
|
759
|
+
|
|
751
760
|
// src/components/UniformRichText/UniformRichText.tsx
|
|
752
761
|
var import_canvas11 = require("@uniformdev/canvas");
|
|
753
762
|
var import_richtext6 = require("@uniformdev/richtext");
|
|
@@ -758,7 +767,7 @@ var import_richtext5 = require("@uniformdev/richtext");
|
|
|
758
767
|
var import_react21 = __toESM(require("react"));
|
|
759
768
|
|
|
760
769
|
// src/components/UniformRichText/nodes/AssetRichTextNode.tsx
|
|
761
|
-
var
|
|
770
|
+
var import_react12 = __toESM(require("react"));
|
|
762
771
|
var AssetRichTextNode = ({ node }) => {
|
|
763
772
|
var _a, _b;
|
|
764
773
|
const { __asset } = node;
|
|
@@ -766,37 +775,29 @@ var AssetRichTextNode = ({ node }) => {
|
|
|
766
775
|
return null;
|
|
767
776
|
}
|
|
768
777
|
if (__asset.type === "image") {
|
|
769
|
-
return /* @__PURE__ */
|
|
778
|
+
return /* @__PURE__ */ import_react12.default.createElement("figure", null, /* @__PURE__ */ import_react12.default.createElement("img", { src: __asset.fields.url.value, alt: (_a = __asset.fields.title) == null ? void 0 : _a.value }), ((_b = __asset.fields.description) == null ? void 0 : _b.value) ? /* @__PURE__ */ import_react12.default.createElement("figcaption", null, __asset.fields.description.value) : null);
|
|
770
779
|
}
|
|
771
780
|
if (__asset.type === "video") {
|
|
772
|
-
return /* @__PURE__ */
|
|
781
|
+
return /* @__PURE__ */ import_react12.default.createElement("video", { src: __asset.fields.url.value, controls: true });
|
|
773
782
|
}
|
|
774
783
|
if (__asset.type === "audio") {
|
|
775
|
-
return /* @__PURE__ */
|
|
784
|
+
return /* @__PURE__ */ import_react12.default.createElement("audio", { src: __asset.fields.url.value, controls: true });
|
|
776
785
|
}
|
|
777
786
|
return null;
|
|
778
787
|
};
|
|
779
788
|
|
|
780
789
|
// src/components/UniformRichText/nodes/HeadingRichTextNode.tsx
|
|
781
|
-
var
|
|
790
|
+
var import_react13 = __toESM(require("react"));
|
|
782
791
|
var HeadingRichTextNode = ({ children, node }) => {
|
|
783
792
|
const { tag } = node;
|
|
784
793
|
const HTag = tag != null ? tag : "h1";
|
|
785
|
-
return /* @__PURE__ */
|
|
794
|
+
return /* @__PURE__ */ import_react13.default.createElement(HTag, null, children);
|
|
786
795
|
};
|
|
787
796
|
|
|
788
797
|
// src/components/UniformRichText/nodes/LinebreakRichTextNode.tsx
|
|
789
|
-
var import_react13 = __toESM(require("react"));
|
|
790
|
-
var LinebreakRichTextNode = () => {
|
|
791
|
-
return /* @__PURE__ */ import_react13.default.createElement("br", null);
|
|
792
|
-
};
|
|
793
|
-
|
|
794
|
-
// src/components/UniformRichText/nodes/LinkRichTextNode.tsx
|
|
795
|
-
var import_richtext = require("@uniformdev/richtext");
|
|
796
798
|
var import_react14 = __toESM(require("react"));
|
|
797
|
-
var
|
|
798
|
-
|
|
799
|
-
return /* @__PURE__ */ import_react14.default.createElement("a", { href: (0, import_richtext.linkParamValueToHref)(link) }, children);
|
|
799
|
+
var LinebreakRichTextNode = () => {
|
|
800
|
+
return /* @__PURE__ */ import_react14.default.createElement("br", null);
|
|
800
801
|
};
|
|
801
802
|
|
|
802
803
|
// src/components/UniformRichText/nodes/ListItemRichTextNode.tsx
|
|
@@ -1105,6 +1106,7 @@ var useUniformContextualEditingState = ({
|
|
|
1105
1106
|
createComponentStoreResolver,
|
|
1106
1107
|
createUniformApiEnhancer,
|
|
1107
1108
|
getParameterAttributes,
|
|
1109
|
+
linkParamValueToAnchorProps,
|
|
1108
1110
|
registerUniformComponent,
|
|
1109
1111
|
useUniformContextualEditing,
|
|
1110
1112
|
useUniformContextualEditingState,
|
package/dist/index.mjs
CHANGED
|
@@ -326,7 +326,7 @@ var PureContextualEditingComponentWrapper = ({
|
|
|
326
326
|
}) => {
|
|
327
327
|
var _a, _b, _c, _d;
|
|
328
328
|
return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(
|
|
329
|
-
"
|
|
329
|
+
"template",
|
|
330
330
|
{
|
|
331
331
|
"data-role": IN_CONTEXT_EDITOR_COMPONENT_START_ROLE,
|
|
332
332
|
"data-parent-id": parentComponent == null ? void 0 : parentComponent._id,
|
|
@@ -341,7 +341,7 @@ var PureContextualEditingComponentWrapper = ({
|
|
|
341
341
|
"data-component-title": (_d = (_c = (_b = component == null ? void 0 : component.parameters) == null ? void 0 : _b.title) == null ? void 0 : _c.value) != null ? _d : "",
|
|
342
342
|
"data-is-readonly": isReadOnly
|
|
343
343
|
}
|
|
344
|
-
), children, /* @__PURE__ */ React2.createElement("
|
|
344
|
+
), children, /* @__PURE__ */ React2.createElement("template", { "data-role": IN_CONTEXT_EDITOR_COMPONENT_END_ROLE }));
|
|
345
345
|
};
|
|
346
346
|
|
|
347
347
|
// src/components/ContextualEditingComponentWrapper.tsx
|
|
@@ -725,6 +725,14 @@ var UniformPlayground = ({
|
|
|
725
725
|
);
|
|
726
726
|
};
|
|
727
727
|
|
|
728
|
+
// src/components/UniformRichText/nodes/LinkRichTextNode.tsx
|
|
729
|
+
import { linkParamValueToAnchorProps } from "@uniformdev/richtext";
|
|
730
|
+
import React9 from "react";
|
|
731
|
+
var LinkRichTextNode = ({ children, node }) => {
|
|
732
|
+
const { link } = node;
|
|
733
|
+
return /* @__PURE__ */ React9.createElement("a", { ...linkParamValueToAnchorProps(link) }, children);
|
|
734
|
+
};
|
|
735
|
+
|
|
728
736
|
// src/components/UniformRichText/UniformRichText.tsx
|
|
729
737
|
import {
|
|
730
738
|
ATTRIBUTE_COMPONENT_ID,
|
|
@@ -739,7 +747,7 @@ import { isRichTextNode } from "@uniformdev/richtext";
|
|
|
739
747
|
import React19 from "react";
|
|
740
748
|
|
|
741
749
|
// src/components/UniformRichText/nodes/AssetRichTextNode.tsx
|
|
742
|
-
import
|
|
750
|
+
import React10 from "react";
|
|
743
751
|
var AssetRichTextNode = ({ node }) => {
|
|
744
752
|
var _a, _b;
|
|
745
753
|
const { __asset } = node;
|
|
@@ -747,37 +755,29 @@ var AssetRichTextNode = ({ node }) => {
|
|
|
747
755
|
return null;
|
|
748
756
|
}
|
|
749
757
|
if (__asset.type === "image") {
|
|
750
|
-
return /* @__PURE__ */
|
|
758
|
+
return /* @__PURE__ */ React10.createElement("figure", null, /* @__PURE__ */ React10.createElement("img", { src: __asset.fields.url.value, alt: (_a = __asset.fields.title) == null ? void 0 : _a.value }), ((_b = __asset.fields.description) == null ? void 0 : _b.value) ? /* @__PURE__ */ React10.createElement("figcaption", null, __asset.fields.description.value) : null);
|
|
751
759
|
}
|
|
752
760
|
if (__asset.type === "video") {
|
|
753
|
-
return /* @__PURE__ */
|
|
761
|
+
return /* @__PURE__ */ React10.createElement("video", { src: __asset.fields.url.value, controls: true });
|
|
754
762
|
}
|
|
755
763
|
if (__asset.type === "audio") {
|
|
756
|
-
return /* @__PURE__ */
|
|
764
|
+
return /* @__PURE__ */ React10.createElement("audio", { src: __asset.fields.url.value, controls: true });
|
|
757
765
|
}
|
|
758
766
|
return null;
|
|
759
767
|
};
|
|
760
768
|
|
|
761
769
|
// src/components/UniformRichText/nodes/HeadingRichTextNode.tsx
|
|
762
|
-
import
|
|
770
|
+
import React11 from "react";
|
|
763
771
|
var HeadingRichTextNode = ({ children, node }) => {
|
|
764
772
|
const { tag } = node;
|
|
765
773
|
const HTag = tag != null ? tag : "h1";
|
|
766
|
-
return /* @__PURE__ */
|
|
774
|
+
return /* @__PURE__ */ React11.createElement(HTag, null, children);
|
|
767
775
|
};
|
|
768
776
|
|
|
769
777
|
// src/components/UniformRichText/nodes/LinebreakRichTextNode.tsx
|
|
770
|
-
import React11 from "react";
|
|
771
|
-
var LinebreakRichTextNode = () => {
|
|
772
|
-
return /* @__PURE__ */ React11.createElement("br", null);
|
|
773
|
-
};
|
|
774
|
-
|
|
775
|
-
// src/components/UniformRichText/nodes/LinkRichTextNode.tsx
|
|
776
|
-
import { linkParamValueToHref } from "@uniformdev/richtext";
|
|
777
778
|
import React12 from "react";
|
|
778
|
-
var
|
|
779
|
-
|
|
780
|
-
return /* @__PURE__ */ React12.createElement("a", { href: linkParamValueToHref(link) }, children);
|
|
779
|
+
var LinebreakRichTextNode = () => {
|
|
780
|
+
return /* @__PURE__ */ React12.createElement("br", null);
|
|
781
781
|
};
|
|
782
782
|
|
|
783
783
|
// src/components/UniformRichText/nodes/ListItemRichTextNode.tsx
|
|
@@ -1090,6 +1090,7 @@ export {
|
|
|
1090
1090
|
createComponentStoreResolver,
|
|
1091
1091
|
createUniformApiEnhancer,
|
|
1092
1092
|
getParameterAttributes,
|
|
1093
|
+
linkParamValueToAnchorProps,
|
|
1093
1094
|
registerUniformComponent,
|
|
1094
1095
|
useUniformContextualEditing,
|
|
1095
1096
|
useUniformContextualEditingState,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/canvas-react",
|
|
3
|
-
"version": "20.49.
|
|
3
|
+
"version": "20.49.3-alpha.47+9aed70a64d",
|
|
4
4
|
"description": "React SDK for Uniform Canvas",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -39,16 +39,15 @@
|
|
|
39
39
|
"build": "tsup",
|
|
40
40
|
"dev": "tsup --watch",
|
|
41
41
|
"clean": "rimraf dist",
|
|
42
|
-
"test": "
|
|
43
|
-
"lint": "eslint \"src/**/*.{js,ts,tsx}\"",
|
|
42
|
+
"test": "vitest run",
|
|
44
43
|
"format": "prettier --write \"src/**/*.{js,ts,tsx}\"",
|
|
45
|
-
"
|
|
44
|
+
"apidocs-extract": "api-extractor run --local"
|
|
46
45
|
},
|
|
47
46
|
"dependencies": {
|
|
48
|
-
"@uniformdev/canvas": "20.49.
|
|
49
|
-
"@uniformdev/context": "20.49.
|
|
50
|
-
"@uniformdev/context-react": "20.49.
|
|
51
|
-
"@uniformdev/richtext": "20.49.
|
|
47
|
+
"@uniformdev/canvas": "20.49.3-alpha.47+9aed70a64d",
|
|
48
|
+
"@uniformdev/context": "20.49.3-alpha.47+9aed70a64d",
|
|
49
|
+
"@uniformdev/context-react": "20.49.3-alpha.47+9aed70a64d",
|
|
50
|
+
"@uniformdev/richtext": "20.49.3-alpha.47+9aed70a64d"
|
|
52
51
|
},
|
|
53
52
|
"peerDependencies": {
|
|
54
53
|
"immer": ">= 10",
|
|
@@ -56,8 +55,8 @@
|
|
|
56
55
|
"react-dom": ">=16"
|
|
57
56
|
},
|
|
58
57
|
"devDependencies": {
|
|
59
|
-
"@types/react": "19.2.
|
|
60
|
-
"immer": "10.
|
|
58
|
+
"@types/react": "19.2.17",
|
|
59
|
+
"immer": "10.2.0",
|
|
61
60
|
"react": "19.2.1",
|
|
62
61
|
"react-dom": "19.2.1"
|
|
63
62
|
},
|
|
@@ -67,5 +66,5 @@
|
|
|
67
66
|
"publishConfig": {
|
|
68
67
|
"access": "public"
|
|
69
68
|
},
|
|
70
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "9aed70a64de0ca177d27ea99dc25f1ad053f87ad"
|
|
71
70
|
}
|