@uniformdev/canvas-react 20.72.2-alpha.3 → 20.72.3-alpha.2
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 +10 -3
- package/dist/index.d.ts +10 -3
- package/dist/index.esm.js +29 -16
- package/dist/index.js +30 -16
- package/dist/index.mjs +29 -16
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React$1, { Key, ReactNode, PropsWithChildren } from 'react';
|
|
1
|
+
import React$1, { Key, ReactNode, PropsWithChildren, AnchorHTMLAttributes } 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
4
|
import { a as PureUniformTextProps } from './PureUniformText-CzdaUBnC.mjs';
|
|
5
5
|
import { CompositionMetadata } from '@uniformdev/context';
|
|
6
|
-
import { RichTextNode } from '@uniformdev/richtext';
|
|
6
|
+
import { RichTextNode, linkParamValueToHtmlAttributes } from '@uniformdev/richtext';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Props passed to a Canvas component implementation.
|
|
@@ -788,6 +788,13 @@ type RichTextRendererComponent<TNode extends RichTextNode = RichTextNode> = Reac
|
|
|
788
788
|
*/
|
|
789
789
|
type RenderRichTextComponentResolver = (node: RichTextNode) => RichTextRendererComponent | null | undefined;
|
|
790
790
|
|
|
791
|
+
/**
|
|
792
|
+
* Converts a LinkParamValue into React-compatible anchor props.
|
|
793
|
+
* Delegates to `linkParamValueToHtmlAttributes` for denylist / auto-rel logic,
|
|
794
|
+
* then translates the literal `class` key to `className` for React.
|
|
795
|
+
*/
|
|
796
|
+
declare function linkParamValueToAnchorProps(link: NonNullable<Parameters<typeof linkParamValueToHtmlAttributes>[0]>): AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
797
|
+
|
|
791
798
|
type UniformRichTextProps = {
|
|
792
799
|
/**
|
|
793
800
|
* The name of the HTML tag to render.
|
|
@@ -940,4 +947,4 @@ declare const createComponentStoreResolver: (options: {
|
|
|
940
947
|
defaultComponent?: React$1.ComponentType<ComponentProps<any>>;
|
|
941
948
|
}) => RenderComponentResolver;
|
|
942
949
|
|
|
943
|
-
export { type ComponentProps, type ComponentStore, type CustomSlotChildRenderFunc, DefaultNotImplementedComponent, NOT_IMPLEMENTED_COMPONENT, type RenderComponentResolver, type RenderRichTextComponentResolver, type RichTextComponentProps, type RichTextRendererComponent, type SystemRenderConfig, type SystemRenderFunction, UniformComponent, type UniformComponentContextValue, type UniformComponentProps, UniformComposition, UniformCompositionContext, type UniformCompositionProps, UniformPlayground, type UniformPlaygroundDecorator, type UniformPlaygroundProps, UniformRichText, UniformRichTextNode, type UniformRichTextNodeProps, type UniformRichTextProps, UniformSlot, type UniformSlotProps, type UniformSlotWrapperComponentProps, UniformText, type UniformTextProps, type UseUniformContextualEditingProps, type UseUniformContextualEditingStateProps, type UseUniformContextualEditingStateReturnType, componentStore, componentStoreResolver, convertComponentToProps, createComponentStore, createComponentStoreResolver, getParameterAttributes, registerUniformComponent, useUniformContextualEditing, useUniformContextualEditingState, useUniformCurrentComponent, useUniformCurrentComposition };
|
|
950
|
+
export { type ComponentProps, type ComponentStore, type CustomSlotChildRenderFunc, DefaultNotImplementedComponent, NOT_IMPLEMENTED_COMPONENT, type RenderComponentResolver, type RenderRichTextComponentResolver, type RichTextComponentProps, type RichTextRendererComponent, type SystemRenderConfig, type SystemRenderFunction, UniformComponent, type UniformComponentContextValue, type UniformComponentProps, UniformComposition, UniformCompositionContext, type UniformCompositionProps, UniformPlayground, type UniformPlaygroundDecorator, type UniformPlaygroundProps, UniformRichText, UniformRichTextNode, type UniformRichTextNodeProps, type UniformRichTextProps, UniformSlot, type UniformSlotProps, type UniformSlotWrapperComponentProps, UniformText, type UniformTextProps, type UseUniformContextualEditingProps, type UseUniformContextualEditingStateProps, type UseUniformContextualEditingStateReturnType, componentStore, componentStoreResolver, convertComponentToProps, createComponentStore, createComponentStoreResolver, getParameterAttributes, linkParamValueToAnchorProps, registerUniformComponent, useUniformContextualEditing, useUniformContextualEditingState, useUniformCurrentComponent, useUniformCurrentComposition };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React$1, { Key, ReactNode, PropsWithChildren } from 'react';
|
|
1
|
+
import React$1, { Key, ReactNode, PropsWithChildren, AnchorHTMLAttributes } 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
4
|
import { a as PureUniformTextProps } from './PureUniformText-CzdaUBnC.js';
|
|
5
5
|
import { CompositionMetadata } from '@uniformdev/context';
|
|
6
|
-
import { RichTextNode } from '@uniformdev/richtext';
|
|
6
|
+
import { RichTextNode, linkParamValueToHtmlAttributes } from '@uniformdev/richtext';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Props passed to a Canvas component implementation.
|
|
@@ -788,6 +788,13 @@ type RichTextRendererComponent<TNode extends RichTextNode = RichTextNode> = Reac
|
|
|
788
788
|
*/
|
|
789
789
|
type RenderRichTextComponentResolver = (node: RichTextNode) => RichTextRendererComponent | null | undefined;
|
|
790
790
|
|
|
791
|
+
/**
|
|
792
|
+
* Converts a LinkParamValue into React-compatible anchor props.
|
|
793
|
+
* Delegates to `linkParamValueToHtmlAttributes` for denylist / auto-rel logic,
|
|
794
|
+
* then translates the literal `class` key to `className` for React.
|
|
795
|
+
*/
|
|
796
|
+
declare function linkParamValueToAnchorProps(link: NonNullable<Parameters<typeof linkParamValueToHtmlAttributes>[0]>): AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
797
|
+
|
|
791
798
|
type UniformRichTextProps = {
|
|
792
799
|
/**
|
|
793
800
|
* The name of the HTML tag to render.
|
|
@@ -940,4 +947,4 @@ declare const createComponentStoreResolver: (options: {
|
|
|
940
947
|
defaultComponent?: React$1.ComponentType<ComponentProps<any>>;
|
|
941
948
|
}) => RenderComponentResolver;
|
|
942
949
|
|
|
943
|
-
export { type ComponentProps, type ComponentStore, type CustomSlotChildRenderFunc, DefaultNotImplementedComponent, NOT_IMPLEMENTED_COMPONENT, type RenderComponentResolver, type RenderRichTextComponentResolver, type RichTextComponentProps, type RichTextRendererComponent, type SystemRenderConfig, type SystemRenderFunction, UniformComponent, type UniformComponentContextValue, type UniformComponentProps, UniformComposition, UniformCompositionContext, type UniformCompositionProps, UniformPlayground, type UniformPlaygroundDecorator, type UniformPlaygroundProps, UniformRichText, UniformRichTextNode, type UniformRichTextNodeProps, type UniformRichTextProps, UniformSlot, type UniformSlotProps, type UniformSlotWrapperComponentProps, UniformText, type UniformTextProps, type UseUniformContextualEditingProps, type UseUniformContextualEditingStateProps, type UseUniformContextualEditingStateReturnType, componentStore, componentStoreResolver, convertComponentToProps, createComponentStore, createComponentStoreResolver, getParameterAttributes, registerUniformComponent, useUniformContextualEditing, useUniformContextualEditingState, useUniformCurrentComponent, useUniformCurrentComposition };
|
|
950
|
+
export { type ComponentProps, type ComponentStore, type CustomSlotChildRenderFunc, DefaultNotImplementedComponent, NOT_IMPLEMENTED_COMPONENT, type RenderComponentResolver, type RenderRichTextComponentResolver, type RichTextComponentProps, type RichTextRendererComponent, type SystemRenderConfig, type SystemRenderFunction, UniformComponent, type UniformComponentContextValue, type UniformComponentProps, UniformComposition, UniformCompositionContext, type UniformCompositionProps, UniformPlayground, type UniformPlaygroundDecorator, type UniformPlaygroundProps, UniformRichText, UniformRichTextNode, type UniformRichTextNodeProps, type UniformRichTextProps, UniformSlot, type UniformSlotProps, type UniformSlotWrapperComponentProps, UniformText, type UniformTextProps, type UseUniformContextualEditingProps, type UseUniformContextualEditingStateProps, type UseUniformContextualEditingStateReturnType, componentStore, componentStoreResolver, convertComponentToProps, createComponentStore, createComponentStoreResolver, getParameterAttributes, linkParamValueToAnchorProps, registerUniformComponent, useUniformContextualEditing, useUniformContextualEditingState, useUniformCurrentComponent, useUniformCurrentComposition };
|
package/dist/index.esm.js
CHANGED
|
@@ -725,6 +725,26 @@ var UniformPlayground = ({
|
|
|
725
725
|
);
|
|
726
726
|
};
|
|
727
727
|
|
|
728
|
+
// src/components/UniformRichText/nodes/LinkRichTextNode.tsx
|
|
729
|
+
import { linkParamValueToHtmlAttributes } from "@uniformdev/richtext";
|
|
730
|
+
import React9 from "react";
|
|
731
|
+
function linkParamValueToAnchorProps(link) {
|
|
732
|
+
const raw = linkParamValueToHtmlAttributes(link);
|
|
733
|
+
const result = {};
|
|
734
|
+
for (const [key, value] of Object.entries(raw)) {
|
|
735
|
+
if (key === "class") {
|
|
736
|
+
result["className"] = value;
|
|
737
|
+
} else {
|
|
738
|
+
result[key] = value;
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
return result;
|
|
742
|
+
}
|
|
743
|
+
var LinkRichTextNode = ({ children, node }) => {
|
|
744
|
+
const { link } = node;
|
|
745
|
+
return /* @__PURE__ */ React9.createElement("a", { ...linkParamValueToAnchorProps(link) }, children);
|
|
746
|
+
};
|
|
747
|
+
|
|
728
748
|
// src/components/UniformRichText/UniformRichText.tsx
|
|
729
749
|
import {
|
|
730
750
|
ATTRIBUTE_COMPONENT_ID,
|
|
@@ -739,7 +759,7 @@ import { isRichTextNode } from "@uniformdev/richtext";
|
|
|
739
759
|
import React19 from "react";
|
|
740
760
|
|
|
741
761
|
// src/components/UniformRichText/nodes/AssetRichTextNode.tsx
|
|
742
|
-
import
|
|
762
|
+
import React10 from "react";
|
|
743
763
|
var AssetRichTextNode = ({ node }) => {
|
|
744
764
|
var _a, _b;
|
|
745
765
|
const { __asset } = node;
|
|
@@ -747,37 +767,29 @@ var AssetRichTextNode = ({ node }) => {
|
|
|
747
767
|
return null;
|
|
748
768
|
}
|
|
749
769
|
if (__asset.type === "image") {
|
|
750
|
-
return /* @__PURE__ */
|
|
770
|
+
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
771
|
}
|
|
752
772
|
if (__asset.type === "video") {
|
|
753
|
-
return /* @__PURE__ */
|
|
773
|
+
return /* @__PURE__ */ React10.createElement("video", { src: __asset.fields.url.value, controls: true });
|
|
754
774
|
}
|
|
755
775
|
if (__asset.type === "audio") {
|
|
756
|
-
return /* @__PURE__ */
|
|
776
|
+
return /* @__PURE__ */ React10.createElement("audio", { src: __asset.fields.url.value, controls: true });
|
|
757
777
|
}
|
|
758
778
|
return null;
|
|
759
779
|
};
|
|
760
780
|
|
|
761
781
|
// src/components/UniformRichText/nodes/HeadingRichTextNode.tsx
|
|
762
|
-
import
|
|
782
|
+
import React11 from "react";
|
|
763
783
|
var HeadingRichTextNode = ({ children, node }) => {
|
|
764
784
|
const { tag } = node;
|
|
765
785
|
const HTag = tag != null ? tag : "h1";
|
|
766
|
-
return /* @__PURE__ */
|
|
786
|
+
return /* @__PURE__ */ React11.createElement(HTag, null, children);
|
|
767
787
|
};
|
|
768
788
|
|
|
769
789
|
// 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
790
|
import React12 from "react";
|
|
778
|
-
var
|
|
779
|
-
|
|
780
|
-
return /* @__PURE__ */ React12.createElement("a", { href: linkParamValueToHref(link) }, children);
|
|
791
|
+
var LinebreakRichTextNode = () => {
|
|
792
|
+
return /* @__PURE__ */ React12.createElement("br", null);
|
|
781
793
|
};
|
|
782
794
|
|
|
783
795
|
// src/components/UniformRichText/nodes/ListItemRichTextNode.tsx
|
|
@@ -1090,6 +1102,7 @@ export {
|
|
|
1090
1102
|
createComponentStoreResolver,
|
|
1091
1103
|
createUniformApiEnhancer,
|
|
1092
1104
|
getParameterAttributes,
|
|
1105
|
+
linkParamValueToAnchorProps,
|
|
1093
1106
|
registerUniformComponent,
|
|
1094
1107
|
useUniformContextualEditing,
|
|
1095
1108
|
useUniformContextualEditingState,
|
package/dist/index.js
CHANGED
|
@@ -48,6 +48,7 @@ __export(index_exports, {
|
|
|
48
48
|
createComponentStoreResolver: () => createComponentStoreResolver,
|
|
49
49
|
createUniformApiEnhancer: () => import_canvas4.createUniformApiEnhancer,
|
|
50
50
|
getParameterAttributes: () => getParameterAttributes,
|
|
51
|
+
linkParamValueToAnchorProps: () => linkParamValueToAnchorProps,
|
|
51
52
|
registerUniformComponent: () => registerUniformComponent,
|
|
52
53
|
useUniformContextualEditing: () => useUniformContextualEditing,
|
|
53
54
|
useUniformContextualEditingState: () => useUniformContextualEditingState,
|
|
@@ -748,6 +749,26 @@ 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
|
+
function linkParamValueToAnchorProps(link) {
|
|
756
|
+
const raw = (0, import_richtext.linkParamValueToHtmlAttributes)(link);
|
|
757
|
+
const result = {};
|
|
758
|
+
for (const [key, value] of Object.entries(raw)) {
|
|
759
|
+
if (key === "class") {
|
|
760
|
+
result["className"] = value;
|
|
761
|
+
} else {
|
|
762
|
+
result[key] = value;
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
return result;
|
|
766
|
+
}
|
|
767
|
+
var LinkRichTextNode = ({ children, node }) => {
|
|
768
|
+
const { link } = node;
|
|
769
|
+
return /* @__PURE__ */ import_react11.default.createElement("a", { ...linkParamValueToAnchorProps(link) }, children);
|
|
770
|
+
};
|
|
771
|
+
|
|
751
772
|
// src/components/UniformRichText/UniformRichText.tsx
|
|
752
773
|
var import_canvas11 = require("@uniformdev/canvas");
|
|
753
774
|
var import_richtext6 = require("@uniformdev/richtext");
|
|
@@ -758,7 +779,7 @@ var import_richtext5 = require("@uniformdev/richtext");
|
|
|
758
779
|
var import_react21 = __toESM(require("react"));
|
|
759
780
|
|
|
760
781
|
// src/components/UniformRichText/nodes/AssetRichTextNode.tsx
|
|
761
|
-
var
|
|
782
|
+
var import_react12 = __toESM(require("react"));
|
|
762
783
|
var AssetRichTextNode = ({ node }) => {
|
|
763
784
|
var _a, _b;
|
|
764
785
|
const { __asset } = node;
|
|
@@ -766,37 +787,29 @@ var AssetRichTextNode = ({ node }) => {
|
|
|
766
787
|
return null;
|
|
767
788
|
}
|
|
768
789
|
if (__asset.type === "image") {
|
|
769
|
-
return /* @__PURE__ */
|
|
790
|
+
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
791
|
}
|
|
771
792
|
if (__asset.type === "video") {
|
|
772
|
-
return /* @__PURE__ */
|
|
793
|
+
return /* @__PURE__ */ import_react12.default.createElement("video", { src: __asset.fields.url.value, controls: true });
|
|
773
794
|
}
|
|
774
795
|
if (__asset.type === "audio") {
|
|
775
|
-
return /* @__PURE__ */
|
|
796
|
+
return /* @__PURE__ */ import_react12.default.createElement("audio", { src: __asset.fields.url.value, controls: true });
|
|
776
797
|
}
|
|
777
798
|
return null;
|
|
778
799
|
};
|
|
779
800
|
|
|
780
801
|
// src/components/UniformRichText/nodes/HeadingRichTextNode.tsx
|
|
781
|
-
var
|
|
802
|
+
var import_react13 = __toESM(require("react"));
|
|
782
803
|
var HeadingRichTextNode = ({ children, node }) => {
|
|
783
804
|
const { tag } = node;
|
|
784
805
|
const HTag = tag != null ? tag : "h1";
|
|
785
|
-
return /* @__PURE__ */
|
|
806
|
+
return /* @__PURE__ */ import_react13.default.createElement(HTag, null, children);
|
|
786
807
|
};
|
|
787
808
|
|
|
788
809
|
// 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
810
|
var import_react14 = __toESM(require("react"));
|
|
797
|
-
var
|
|
798
|
-
|
|
799
|
-
return /* @__PURE__ */ import_react14.default.createElement("a", { href: (0, import_richtext.linkParamValueToHref)(link) }, children);
|
|
811
|
+
var LinebreakRichTextNode = () => {
|
|
812
|
+
return /* @__PURE__ */ import_react14.default.createElement("br", null);
|
|
800
813
|
};
|
|
801
814
|
|
|
802
815
|
// src/components/UniformRichText/nodes/ListItemRichTextNode.tsx
|
|
@@ -1105,6 +1118,7 @@ var useUniformContextualEditingState = ({
|
|
|
1105
1118
|
createComponentStoreResolver,
|
|
1106
1119
|
createUniformApiEnhancer,
|
|
1107
1120
|
getParameterAttributes,
|
|
1121
|
+
linkParamValueToAnchorProps,
|
|
1108
1122
|
registerUniformComponent,
|
|
1109
1123
|
useUniformContextualEditing,
|
|
1110
1124
|
useUniformContextualEditingState,
|
package/dist/index.mjs
CHANGED
|
@@ -725,6 +725,26 @@ var UniformPlayground = ({
|
|
|
725
725
|
);
|
|
726
726
|
};
|
|
727
727
|
|
|
728
|
+
// src/components/UniformRichText/nodes/LinkRichTextNode.tsx
|
|
729
|
+
import { linkParamValueToHtmlAttributes } from "@uniformdev/richtext";
|
|
730
|
+
import React9 from "react";
|
|
731
|
+
function linkParamValueToAnchorProps(link) {
|
|
732
|
+
const raw = linkParamValueToHtmlAttributes(link);
|
|
733
|
+
const result = {};
|
|
734
|
+
for (const [key, value] of Object.entries(raw)) {
|
|
735
|
+
if (key === "class") {
|
|
736
|
+
result["className"] = value;
|
|
737
|
+
} else {
|
|
738
|
+
result[key] = value;
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
return result;
|
|
742
|
+
}
|
|
743
|
+
var LinkRichTextNode = ({ children, node }) => {
|
|
744
|
+
const { link } = node;
|
|
745
|
+
return /* @__PURE__ */ React9.createElement("a", { ...linkParamValueToAnchorProps(link) }, children);
|
|
746
|
+
};
|
|
747
|
+
|
|
728
748
|
// src/components/UniformRichText/UniformRichText.tsx
|
|
729
749
|
import {
|
|
730
750
|
ATTRIBUTE_COMPONENT_ID,
|
|
@@ -739,7 +759,7 @@ import { isRichTextNode } from "@uniformdev/richtext";
|
|
|
739
759
|
import React19 from "react";
|
|
740
760
|
|
|
741
761
|
// src/components/UniformRichText/nodes/AssetRichTextNode.tsx
|
|
742
|
-
import
|
|
762
|
+
import React10 from "react";
|
|
743
763
|
var AssetRichTextNode = ({ node }) => {
|
|
744
764
|
var _a, _b;
|
|
745
765
|
const { __asset } = node;
|
|
@@ -747,37 +767,29 @@ var AssetRichTextNode = ({ node }) => {
|
|
|
747
767
|
return null;
|
|
748
768
|
}
|
|
749
769
|
if (__asset.type === "image") {
|
|
750
|
-
return /* @__PURE__ */
|
|
770
|
+
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
771
|
}
|
|
752
772
|
if (__asset.type === "video") {
|
|
753
|
-
return /* @__PURE__ */
|
|
773
|
+
return /* @__PURE__ */ React10.createElement("video", { src: __asset.fields.url.value, controls: true });
|
|
754
774
|
}
|
|
755
775
|
if (__asset.type === "audio") {
|
|
756
|
-
return /* @__PURE__ */
|
|
776
|
+
return /* @__PURE__ */ React10.createElement("audio", { src: __asset.fields.url.value, controls: true });
|
|
757
777
|
}
|
|
758
778
|
return null;
|
|
759
779
|
};
|
|
760
780
|
|
|
761
781
|
// src/components/UniformRichText/nodes/HeadingRichTextNode.tsx
|
|
762
|
-
import
|
|
782
|
+
import React11 from "react";
|
|
763
783
|
var HeadingRichTextNode = ({ children, node }) => {
|
|
764
784
|
const { tag } = node;
|
|
765
785
|
const HTag = tag != null ? tag : "h1";
|
|
766
|
-
return /* @__PURE__ */
|
|
786
|
+
return /* @__PURE__ */ React11.createElement(HTag, null, children);
|
|
767
787
|
};
|
|
768
788
|
|
|
769
789
|
// 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
790
|
import React12 from "react";
|
|
778
|
-
var
|
|
779
|
-
|
|
780
|
-
return /* @__PURE__ */ React12.createElement("a", { href: linkParamValueToHref(link) }, children);
|
|
791
|
+
var LinebreakRichTextNode = () => {
|
|
792
|
+
return /* @__PURE__ */ React12.createElement("br", null);
|
|
781
793
|
};
|
|
782
794
|
|
|
783
795
|
// src/components/UniformRichText/nodes/ListItemRichTextNode.tsx
|
|
@@ -1090,6 +1102,7 @@ export {
|
|
|
1090
1102
|
createComponentStoreResolver,
|
|
1091
1103
|
createUniformApiEnhancer,
|
|
1092
1104
|
getParameterAttributes,
|
|
1105
|
+
linkParamValueToAnchorProps,
|
|
1093
1106
|
registerUniformComponent,
|
|
1094
1107
|
useUniformContextualEditing,
|
|
1095
1108
|
useUniformContextualEditingState,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/canvas-react",
|
|
3
|
-
"version": "20.72.
|
|
3
|
+
"version": "20.72.3-alpha.2+36e92d30ab",
|
|
4
4
|
"description": "React SDK for Uniform Canvas",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"apidocs-extract": "api-extractor run --local"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@uniformdev/canvas": "20.72.
|
|
48
|
-
"@uniformdev/context": "20.72.
|
|
49
|
-
"@uniformdev/context-react": "20.72.
|
|
50
|
-
"@uniformdev/richtext": "20.72.
|
|
47
|
+
"@uniformdev/canvas": "20.72.3-alpha.2+36e92d30ab",
|
|
48
|
+
"@uniformdev/context": "20.72.3-alpha.2+36e92d30ab",
|
|
49
|
+
"@uniformdev/context-react": "20.72.3-alpha.2+36e92d30ab",
|
|
50
|
+
"@uniformdev/richtext": "20.72.3-alpha.2+36e92d30ab"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"immer": ">= 10",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"publishConfig": {
|
|
67
67
|
"access": "public"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "36e92d30ab1b97fc68cf16fc22c6f7865ac8ba97"
|
|
70
70
|
}
|