@uniformdev/canvas-react 20.72.3-alpha.2 → 20.72.3-alpha.3
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 -10
- package/dist/index.d.ts +4 -10
- package/dist/index.esm.js +1 -13
- package/dist/index.js +2 -14
- package/dist/index.mjs +1 -13
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import React$1, { Key, ReactNode, PropsWithChildren
|
|
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
4
|
import { a as PureUniformTextProps } from './PureUniformText-CzdaUBnC.mjs';
|
|
5
5
|
import { CompositionMetadata } from '@uniformdev/context';
|
|
6
|
-
import { RichTextNode
|
|
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.
|
|
@@ -788,13 +789,6 @@ type RichTextRendererComponent<TNode extends RichTextNode = RichTextNode> = Reac
|
|
|
788
789
|
*/
|
|
789
790
|
type RenderRichTextComponentResolver = (node: RichTextNode) => RichTextRendererComponent | null | undefined;
|
|
790
791
|
|
|
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
|
-
|
|
798
792
|
type UniformRichTextProps = {
|
|
799
793
|
/**
|
|
800
794
|
* The name of the HTML tag to render.
|
|
@@ -947,4 +941,4 @@ declare const createComponentStoreResolver: (options: {
|
|
|
947
941
|
defaultComponent?: React$1.ComponentType<ComponentProps<any>>;
|
|
948
942
|
}) => RenderComponentResolver;
|
|
949
943
|
|
|
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,
|
|
944
|
+
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import React$1, { Key, ReactNode, PropsWithChildren
|
|
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
4
|
import { a as PureUniformTextProps } from './PureUniformText-CzdaUBnC.js';
|
|
5
5
|
import { CompositionMetadata } from '@uniformdev/context';
|
|
6
|
-
import { RichTextNode
|
|
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.
|
|
@@ -788,13 +789,6 @@ type RichTextRendererComponent<TNode extends RichTextNode = RichTextNode> = Reac
|
|
|
788
789
|
*/
|
|
789
790
|
type RenderRichTextComponentResolver = (node: RichTextNode) => RichTextRendererComponent | null | undefined;
|
|
790
791
|
|
|
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
|
-
|
|
798
792
|
type UniformRichTextProps = {
|
|
799
793
|
/**
|
|
800
794
|
* The name of the HTML tag to render.
|
|
@@ -947,4 +941,4 @@ declare const createComponentStoreResolver: (options: {
|
|
|
947
941
|
defaultComponent?: React$1.ComponentType<ComponentProps<any>>;
|
|
948
942
|
}) => RenderComponentResolver;
|
|
949
943
|
|
|
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,
|
|
944
|
+
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 };
|
package/dist/index.esm.js
CHANGED
|
@@ -726,20 +726,8 @@ var UniformPlayground = ({
|
|
|
726
726
|
};
|
|
727
727
|
|
|
728
728
|
// src/components/UniformRichText/nodes/LinkRichTextNode.tsx
|
|
729
|
-
import {
|
|
729
|
+
import { linkParamValueToAnchorProps } from "@uniformdev/richtext";
|
|
730
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
731
|
var LinkRichTextNode = ({ children, node }) => {
|
|
744
732
|
const { link } = node;
|
|
745
733
|
return /* @__PURE__ */ React9.createElement("a", { ...linkParamValueToAnchorProps(link) }, children);
|
package/dist/index.js
CHANGED
|
@@ -48,7 +48,7 @@ __export(index_exports, {
|
|
|
48
48
|
createComponentStoreResolver: () => createComponentStoreResolver,
|
|
49
49
|
createUniformApiEnhancer: () => import_canvas4.createUniformApiEnhancer,
|
|
50
50
|
getParameterAttributes: () => getParameterAttributes,
|
|
51
|
-
linkParamValueToAnchorProps: () => linkParamValueToAnchorProps,
|
|
51
|
+
linkParamValueToAnchorProps: () => import_richtext.linkParamValueToAnchorProps,
|
|
52
52
|
registerUniformComponent: () => registerUniformComponent,
|
|
53
53
|
useUniformContextualEditing: () => useUniformContextualEditing,
|
|
54
54
|
useUniformContextualEditingState: () => useUniformContextualEditingState,
|
|
@@ -752,21 +752,9 @@ var UniformPlayground = ({
|
|
|
752
752
|
// src/components/UniformRichText/nodes/LinkRichTextNode.tsx
|
|
753
753
|
var import_richtext = require("@uniformdev/richtext");
|
|
754
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
755
|
var LinkRichTextNode = ({ children, node }) => {
|
|
768
756
|
const { link } = node;
|
|
769
|
-
return /* @__PURE__ */ import_react11.default.createElement("a", { ...linkParamValueToAnchorProps(link) }, children);
|
|
757
|
+
return /* @__PURE__ */ import_react11.default.createElement("a", { ...(0, import_richtext.linkParamValueToAnchorProps)(link) }, children);
|
|
770
758
|
};
|
|
771
759
|
|
|
772
760
|
// src/components/UniformRichText/UniformRichText.tsx
|
package/dist/index.mjs
CHANGED
|
@@ -726,20 +726,8 @@ var UniformPlayground = ({
|
|
|
726
726
|
};
|
|
727
727
|
|
|
728
728
|
// src/components/UniformRichText/nodes/LinkRichTextNode.tsx
|
|
729
|
-
import {
|
|
729
|
+
import { linkParamValueToAnchorProps } from "@uniformdev/richtext";
|
|
730
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
731
|
var LinkRichTextNode = ({ children, node }) => {
|
|
744
732
|
const { link } = node;
|
|
745
733
|
return /* @__PURE__ */ React9.createElement("a", { ...linkParamValueToAnchorProps(link) }, children);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/canvas-react",
|
|
3
|
-
"version": "20.72.3-alpha.
|
|
3
|
+
"version": "20.72.3-alpha.3+3e396259ba",
|
|
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.3-alpha.
|
|
48
|
-
"@uniformdev/context": "20.72.3-alpha.
|
|
49
|
-
"@uniformdev/context-react": "20.72.3-alpha.
|
|
50
|
-
"@uniformdev/richtext": "20.72.3-alpha.
|
|
47
|
+
"@uniformdev/canvas": "20.72.3-alpha.3+3e396259ba",
|
|
48
|
+
"@uniformdev/context": "20.72.3-alpha.3+3e396259ba",
|
|
49
|
+
"@uniformdev/context-react": "20.72.3-alpha.3+3e396259ba",
|
|
50
|
+
"@uniformdev/richtext": "20.72.3-alpha.3+3e396259ba"
|
|
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": "3e396259bafc25b69071cda4102cea340b866922"
|
|
70
70
|
}
|