@uniformdev/canvas-react 20.72.2-alpha.3 → 20.72.3-alpha.14
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 +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +17 -16
- package/dist/index.js +18 -16
- package/dist/index.mjs +17 -16
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -4,6 +4,7 @@ export { GetParameterAttributesProps, createUniformApiEnhancer } from '@uniformd
|
|
|
4
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
|
@@ -4,6 +4,7 @@ export { GetParameterAttributesProps, createUniformApiEnhancer } from '@uniformd
|
|
|
4
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
|
@@ -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
|
@@ -48,6 +48,7 @@ __export(index_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,
|
|
@@ -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
|
@@ -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.72.
|
|
3
|
+
"version": "20.72.3-alpha.14+1e232e59cd",
|
|
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.14+1e232e59cd",
|
|
48
|
+
"@uniformdev/context": "20.72.3-alpha.14+1e232e59cd",
|
|
49
|
+
"@uniformdev/context-react": "20.72.3-alpha.14+1e232e59cd",
|
|
50
|
+
"@uniformdev/richtext": "20.72.3-alpha.14+1e232e59cd"
|
|
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": "1e232e59cd3ded97b85b063986cc95e954b8c937"
|
|
70
70
|
}
|