@uniformdev/canvas-react 20.47.0 → 20.47.1-alpha.9
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 +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.esm.js +2 -2
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +10 -10
package/dist/index.d.mts
CHANGED
|
@@ -19,7 +19,7 @@ type ComponentProps<TProps = unknown> = TProps & {
|
|
|
19
19
|
*/
|
|
20
20
|
type RenderComponentResolver = (component: ComponentInstance) => React.ComponentType<ComponentProps<any>> | null;
|
|
21
21
|
/** Function that renders Canvas system internals */
|
|
22
|
-
type SystemRenderFunction = (component: ComponentInstance, key: Key, renderChild: (component: ComponentInstance, key: Key) =>
|
|
22
|
+
type SystemRenderFunction = (component: ComponentInstance, key: Key, renderChild: (component: ComponentInstance, key: Key) => ReactNode | null) => ReactNode | null;
|
|
23
23
|
/** Configures rendering of system components (tests, pz) */
|
|
24
24
|
type SystemRenderConfig = {
|
|
25
25
|
test: SystemRenderFunction;
|
|
@@ -55,7 +55,7 @@ type UniformComponentProps<TRenderProps = unknown> = {
|
|
|
55
55
|
/** Resolves a React component to render a Canvas component, generally by inspecting type/variant */
|
|
56
56
|
resolveRenderer?: RenderComponentResolver;
|
|
57
57
|
/** Children to render. Can also be a function that takes ComponentProps as argument */
|
|
58
|
-
children?: ReactNode | ((props: ComponentProps<TRenderProps>) =>
|
|
58
|
+
children?: ReactNode | ((props: ComponentProps<TRenderProps>) => ReactNode);
|
|
59
59
|
/**
|
|
60
60
|
* When to track behavior from enrichment tags on the current composition
|
|
61
61
|
* onView: adds enrichment score when the visitor views the tagged component in the browser viewport.
|
|
@@ -849,7 +849,7 @@ type CustomSlotChildRenderFunc = (options: {
|
|
|
849
849
|
child: ReactNode;
|
|
850
850
|
component: ComponentInstance;
|
|
851
851
|
key: Key;
|
|
852
|
-
}) =>
|
|
852
|
+
}) => ReactNode;
|
|
853
853
|
type UniformSlotWrapperComponentProps = {
|
|
854
854
|
items: ReactNode[];
|
|
855
855
|
slotName: string;
|
|
@@ -875,7 +875,7 @@ type UniformSlotProps<TSlotNames extends string> = {
|
|
|
875
875
|
emptyPlaceholder?: React$1.ReactNode;
|
|
876
876
|
};
|
|
877
877
|
/** Renders a named Slot within a Composition. */
|
|
878
|
-
declare function UniformSlot<TSlotNames extends string = string>({ name, resolveRenderer, emptyPlaceholder, wrapperComponent, }: UniformSlotProps<TSlotNames>):
|
|
878
|
+
declare function UniformSlot<TSlotNames extends string = string>({ name, resolveRenderer, emptyPlaceholder, wrapperComponent, }: UniformSlotProps<TSlotNames>): ReactNode | null;
|
|
879
879
|
|
|
880
880
|
/**
|
|
881
881
|
* Converts a raw Canvas component instance to React component props format.
|
package/dist/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ type ComponentProps<TProps = unknown> = TProps & {
|
|
|
19
19
|
*/
|
|
20
20
|
type RenderComponentResolver = (component: ComponentInstance) => React.ComponentType<ComponentProps<any>> | null;
|
|
21
21
|
/** Function that renders Canvas system internals */
|
|
22
|
-
type SystemRenderFunction = (component: ComponentInstance, key: Key, renderChild: (component: ComponentInstance, key: Key) =>
|
|
22
|
+
type SystemRenderFunction = (component: ComponentInstance, key: Key, renderChild: (component: ComponentInstance, key: Key) => ReactNode | null) => ReactNode | null;
|
|
23
23
|
/** Configures rendering of system components (tests, pz) */
|
|
24
24
|
type SystemRenderConfig = {
|
|
25
25
|
test: SystemRenderFunction;
|
|
@@ -55,7 +55,7 @@ type UniformComponentProps<TRenderProps = unknown> = {
|
|
|
55
55
|
/** Resolves a React component to render a Canvas component, generally by inspecting type/variant */
|
|
56
56
|
resolveRenderer?: RenderComponentResolver;
|
|
57
57
|
/** Children to render. Can also be a function that takes ComponentProps as argument */
|
|
58
|
-
children?: ReactNode | ((props: ComponentProps<TRenderProps>) =>
|
|
58
|
+
children?: ReactNode | ((props: ComponentProps<TRenderProps>) => ReactNode);
|
|
59
59
|
/**
|
|
60
60
|
* When to track behavior from enrichment tags on the current composition
|
|
61
61
|
* onView: adds enrichment score when the visitor views the tagged component in the browser viewport.
|
|
@@ -849,7 +849,7 @@ type CustomSlotChildRenderFunc = (options: {
|
|
|
849
849
|
child: ReactNode;
|
|
850
850
|
component: ComponentInstance;
|
|
851
851
|
key: Key;
|
|
852
|
-
}) =>
|
|
852
|
+
}) => ReactNode;
|
|
853
853
|
type UniformSlotWrapperComponentProps = {
|
|
854
854
|
items: ReactNode[];
|
|
855
855
|
slotName: string;
|
|
@@ -875,7 +875,7 @@ type UniformSlotProps<TSlotNames extends string> = {
|
|
|
875
875
|
emptyPlaceholder?: React$1.ReactNode;
|
|
876
876
|
};
|
|
877
877
|
/** Renders a named Slot within a Composition. */
|
|
878
|
-
declare function UniformSlot<TSlotNames extends string = string>({ name, resolveRenderer, emptyPlaceholder, wrapperComponent, }: UniformSlotProps<TSlotNames>):
|
|
878
|
+
declare function UniformSlot<TSlotNames extends string = string>({ name, resolveRenderer, emptyPlaceholder, wrapperComponent, }: UniformSlotProps<TSlotNames>): ReactNode | null;
|
|
879
879
|
|
|
880
880
|
/**
|
|
881
881
|
* Converts a raw Canvas component instance to React component props format.
|
package/dist/index.esm.js
CHANGED
|
@@ -22,7 +22,7 @@ function DefaultNotImplementedComponent(props) {
|
|
|
22
22
|
return null;
|
|
23
23
|
}
|
|
24
24
|
if (componentType === EMPTY_COMPOSITION.type) {
|
|
25
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("style", null, `@keyframes _uniformDelayedFadeIn { 0%,
|
|
25
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("style", null, `@keyframes _uniformDelayedFadeIn { 0%,92.5% { opacity: 0; } to { opacity: 1; } }`), /* @__PURE__ */ React.createElement("p", { style: { animation: "_uniformDelayedFadeIn 10s" } }, "This component only works inside Uniform Canvas editor.", /* @__PURE__ */ React.createElement("br", null), "If you think this is an error, try", " ", /* @__PURE__ */ React.createElement("a", { href: "", style: { fontWeight: "bolder", textDecoration: "underline" } }, "reloading the page"), "."));
|
|
26
26
|
}
|
|
27
27
|
if (componentType === CANVAS_LOCALIZATION_TYPE) {
|
|
28
28
|
return /* @__PURE__ */ React.createElement("div", { style: wrapperStyles }, /* @__PURE__ */ React.createElement("p", null, "Seems like localization is not enabled in your application. Please read our documentation on how to", " ", /* @__PURE__ */ React.createElement(
|
|
@@ -225,7 +225,7 @@ var useUniformContextualEditing = ({
|
|
|
225
225
|
enhance = (message) => message.composition
|
|
226
226
|
}) => {
|
|
227
227
|
const [contextualComposition, setContextualComposition] = useState();
|
|
228
|
-
const latestEventTimeStamp = useRef();
|
|
228
|
+
const latestEventTimeStamp = useRef(void 0);
|
|
229
229
|
const channel = useMemo3(() => {
|
|
230
230
|
var _a;
|
|
231
231
|
if (!isInContextEditingMode()) {
|
package/dist/index.js
CHANGED
|
@@ -78,7 +78,7 @@ function DefaultNotImplementedComponent(props) {
|
|
|
78
78
|
return null;
|
|
79
79
|
}
|
|
80
80
|
if (componentType === import_canvas.EMPTY_COMPOSITION.type) {
|
|
81
|
-
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("style", null, `@keyframes _uniformDelayedFadeIn { 0%,
|
|
81
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("style", null, `@keyframes _uniformDelayedFadeIn { 0%,92.5% { opacity: 0; } to { opacity: 1; } }`), /* @__PURE__ */ import_react.default.createElement("p", { style: { animation: "_uniformDelayedFadeIn 10s" } }, "This component only works inside Uniform Canvas editor.", /* @__PURE__ */ import_react.default.createElement("br", null), "If you think this is an error, try", " ", /* @__PURE__ */ import_react.default.createElement("a", { href: "", style: { fontWeight: "bolder", textDecoration: "underline" } }, "reloading the page"), "."));
|
|
82
82
|
}
|
|
83
83
|
if (componentType === import_canvas.CANVAS_LOCALIZATION_TYPE) {
|
|
84
84
|
return /* @__PURE__ */ import_react.default.createElement("div", { style: wrapperStyles }, /* @__PURE__ */ import_react.default.createElement("p", null, "Seems like localization is not enabled in your application. Please read our documentation on how to", " ", /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -254,7 +254,7 @@ var useUniformContextualEditing = ({
|
|
|
254
254
|
enhance = (message) => message.composition
|
|
255
255
|
}) => {
|
|
256
256
|
const [contextualComposition, setContextualComposition] = (0, import_react4.useState)();
|
|
257
|
-
const latestEventTimeStamp = (0, import_react4.useRef)();
|
|
257
|
+
const latestEventTimeStamp = (0, import_react4.useRef)(void 0);
|
|
258
258
|
const channel = (0, import_react4.useMemo)(() => {
|
|
259
259
|
var _a;
|
|
260
260
|
if (!isInContextEditingMode()) {
|
package/dist/index.mjs
CHANGED
|
@@ -22,7 +22,7 @@ function DefaultNotImplementedComponent(props) {
|
|
|
22
22
|
return null;
|
|
23
23
|
}
|
|
24
24
|
if (componentType === EMPTY_COMPOSITION.type) {
|
|
25
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("style", null, `@keyframes _uniformDelayedFadeIn { 0%,
|
|
25
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("style", null, `@keyframes _uniformDelayedFadeIn { 0%,92.5% { opacity: 0; } to { opacity: 1; } }`), /* @__PURE__ */ React.createElement("p", { style: { animation: "_uniformDelayedFadeIn 10s" } }, "This component only works inside Uniform Canvas editor.", /* @__PURE__ */ React.createElement("br", null), "If you think this is an error, try", " ", /* @__PURE__ */ React.createElement("a", { href: "", style: { fontWeight: "bolder", textDecoration: "underline" } }, "reloading the page"), "."));
|
|
26
26
|
}
|
|
27
27
|
if (componentType === CANVAS_LOCALIZATION_TYPE) {
|
|
28
28
|
return /* @__PURE__ */ React.createElement("div", { style: wrapperStyles }, /* @__PURE__ */ React.createElement("p", null, "Seems like localization is not enabled in your application. Please read our documentation on how to", " ", /* @__PURE__ */ React.createElement(
|
|
@@ -225,7 +225,7 @@ var useUniformContextualEditing = ({
|
|
|
225
225
|
enhance = (message) => message.composition
|
|
226
226
|
}) => {
|
|
227
227
|
const [contextualComposition, setContextualComposition] = useState();
|
|
228
|
-
const latestEventTimeStamp = useRef();
|
|
228
|
+
const latestEventTimeStamp = useRef(void 0);
|
|
229
229
|
const channel = useMemo3(() => {
|
|
230
230
|
var _a;
|
|
231
231
|
if (!isInContextEditingMode()) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/canvas-react",
|
|
3
|
-
"version": "20.47.
|
|
3
|
+
"version": "20.47.1-alpha.9+38d1d052b6",
|
|
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:prebuild": "api-extractor run --local"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@uniformdev/canvas": "20.47.
|
|
49
|
-
"@uniformdev/context": "20.47.
|
|
50
|
-
"@uniformdev/context-react": "20.47.
|
|
51
|
-
"@uniformdev/richtext": "20.47.
|
|
48
|
+
"@uniformdev/canvas": "20.47.1-alpha.9+38d1d052b6",
|
|
49
|
+
"@uniformdev/context": "20.47.1-alpha.9+38d1d052b6",
|
|
50
|
+
"@uniformdev/context-react": "20.47.1-alpha.9+38d1d052b6",
|
|
51
|
+
"@uniformdev/richtext": "20.47.1-alpha.9+38d1d052b6"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"immer": ">= 10",
|
|
@@ -56,10 +56,10 @@
|
|
|
56
56
|
"react-dom": ">=16"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@types/react": "
|
|
60
|
-
"immer": "10.1.
|
|
61
|
-
"react": "
|
|
62
|
-
"react-dom": "
|
|
59
|
+
"@types/react": "19.2.2",
|
|
60
|
+
"immer": "10.1.3",
|
|
61
|
+
"react": "19.2.1",
|
|
62
|
+
"react-dom": "19.2.1"
|
|
63
63
|
},
|
|
64
64
|
"files": [
|
|
65
65
|
"/dist"
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"access": "public"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "38d1d052b632b873208982e8aefa300e871ba5b7"
|
|
71
71
|
}
|