@uniformdev/canvas-react 19.58.1-alpha.16 → 19.58.2-alpha.0
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 +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.esm.js +2 -1
- package/dist/index.js +3 -1
- package/dist/index.mjs +2 -1
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -352,6 +352,14 @@ type UniformSlotProps<TSlotNames extends string> = {
|
|
|
352
352
|
/** Renders a named Slot within a Composition. */
|
|
353
353
|
declare function UniformSlot<TSlotNames extends string = string>({ name, resolveRenderer, children, emptyPlaceholder, wrapperComponent, }: UniformSlotProps<TSlotNames>): JSX.Element | null;
|
|
354
354
|
|
|
355
|
+
/**
|
|
356
|
+
* Converts a raw Canvas component instance to React component props format.
|
|
357
|
+
* This merges each parameter moved to the root object and removes the 'value' node,
|
|
358
|
+
* hugely simplifying rendering code. For example if the raw object has parameters.foo.value,
|
|
359
|
+
* then the final props have props.foo === raw.parameters.foo.value.
|
|
360
|
+
*/
|
|
361
|
+
declare function convertComponentToProps<T = unknown>(component: ComponentInstance): ComponentProps<T>;
|
|
362
|
+
|
|
355
363
|
/**
|
|
356
364
|
* Returns the attributes needed to annotate a Uniform parameter for inline editing.
|
|
357
365
|
* Supports only text parameters at the moment.
|
|
@@ -399,4 +407,4 @@ declare const createComponentStoreResolver: (options: {
|
|
|
399
407
|
defaultComponent?: React$1.ComponentType<ComponentProps<any>>;
|
|
400
408
|
}) => RenderComponentResolver;
|
|
401
409
|
|
|
402
|
-
export { ComponentProps, ComponentStore, CustomSlotChildRenderFunc, DefaultNotImplementedComponent, NOT_IMPLEMENTED_COMPONENT, RenderComponentResolver, RenderRichTextComponentResolver, RichTextComponentProps, RichTextRendererComponent, SystemRenderConfig, SystemRenderFunction, UniformComponent, UniformComponentContextValue, UniformComponentProps, UniformComposition, UniformCompositionContext, UniformCompositionProps, UniformPlayground, UniformPlaygroundDecorator, UniformPlaygroundProps, UniformRichText, UniformRichTextNode, UniformRichTextNodeProps, UniformRichTextProps, UniformSlot, UniformSlotProps, UniformSlotWrapperComponentProps, UniformText, UniformTextProps, UseCompositionEventEffectOptions, UseUniformContextualEditingProps, UseUniformContextualEditingStateProps, componentStore, componentStoreResolver, createComponentStore, createComponentStoreResolver, getParameterAttributes, registerUniformComponent, useCompositionEventEffect, useUniformContextualEditing, useUniformContextualEditingState, useUniformCurrentComponent, useUniformCurrentComposition };
|
|
410
|
+
export { ComponentProps, ComponentStore, CustomSlotChildRenderFunc, DefaultNotImplementedComponent, NOT_IMPLEMENTED_COMPONENT, RenderComponentResolver, RenderRichTextComponentResolver, RichTextComponentProps, RichTextRendererComponent, SystemRenderConfig, SystemRenderFunction, UniformComponent, UniformComponentContextValue, UniformComponentProps, UniformComposition, UniformCompositionContext, UniformCompositionProps, UniformPlayground, UniformPlaygroundDecorator, UniformPlaygroundProps, UniformRichText, UniformRichTextNode, UniformRichTextNodeProps, UniformRichTextProps, UniformSlot, UniformSlotProps, UniformSlotWrapperComponentProps, UniformText, UniformTextProps, UseCompositionEventEffectOptions, UseUniformContextualEditingProps, UseUniformContextualEditingStateProps, componentStore, componentStoreResolver, convertComponentToProps, createComponentStore, createComponentStoreResolver, getParameterAttributes, registerUniformComponent, useCompositionEventEffect, useUniformContextualEditing, useUniformContextualEditingState, useUniformCurrentComponent, useUniformCurrentComposition };
|
package/dist/index.d.ts
CHANGED
|
@@ -352,6 +352,14 @@ type UniformSlotProps<TSlotNames extends string> = {
|
|
|
352
352
|
/** Renders a named Slot within a Composition. */
|
|
353
353
|
declare function UniformSlot<TSlotNames extends string = string>({ name, resolveRenderer, children, emptyPlaceholder, wrapperComponent, }: UniformSlotProps<TSlotNames>): JSX.Element | null;
|
|
354
354
|
|
|
355
|
+
/**
|
|
356
|
+
* Converts a raw Canvas component instance to React component props format.
|
|
357
|
+
* This merges each parameter moved to the root object and removes the 'value' node,
|
|
358
|
+
* hugely simplifying rendering code. For example if the raw object has parameters.foo.value,
|
|
359
|
+
* then the final props have props.foo === raw.parameters.foo.value.
|
|
360
|
+
*/
|
|
361
|
+
declare function convertComponentToProps<T = unknown>(component: ComponentInstance): ComponentProps<T>;
|
|
362
|
+
|
|
355
363
|
/**
|
|
356
364
|
* Returns the attributes needed to annotate a Uniform parameter for inline editing.
|
|
357
365
|
* Supports only text parameters at the moment.
|
|
@@ -399,4 +407,4 @@ declare const createComponentStoreResolver: (options: {
|
|
|
399
407
|
defaultComponent?: React$1.ComponentType<ComponentProps<any>>;
|
|
400
408
|
}) => RenderComponentResolver;
|
|
401
409
|
|
|
402
|
-
export { ComponentProps, ComponentStore, CustomSlotChildRenderFunc, DefaultNotImplementedComponent, NOT_IMPLEMENTED_COMPONENT, RenderComponentResolver, RenderRichTextComponentResolver, RichTextComponentProps, RichTextRendererComponent, SystemRenderConfig, SystemRenderFunction, UniformComponent, UniformComponentContextValue, UniformComponentProps, UniformComposition, UniformCompositionContext, UniformCompositionProps, UniformPlayground, UniformPlaygroundDecorator, UniformPlaygroundProps, UniformRichText, UniformRichTextNode, UniformRichTextNodeProps, UniformRichTextProps, UniformSlot, UniformSlotProps, UniformSlotWrapperComponentProps, UniformText, UniformTextProps, UseCompositionEventEffectOptions, UseUniformContextualEditingProps, UseUniformContextualEditingStateProps, componentStore, componentStoreResolver, createComponentStore, createComponentStoreResolver, getParameterAttributes, registerUniformComponent, useCompositionEventEffect, useUniformContextualEditing, useUniformContextualEditingState, useUniformCurrentComponent, useUniformCurrentComposition };
|
|
410
|
+
export { ComponentProps, ComponentStore, CustomSlotChildRenderFunc, DefaultNotImplementedComponent, NOT_IMPLEMENTED_COMPONENT, RenderComponentResolver, RenderRichTextComponentResolver, RichTextComponentProps, RichTextRendererComponent, SystemRenderConfig, SystemRenderFunction, UniformComponent, UniformComponentContextValue, UniformComponentProps, UniformComposition, UniformCompositionContext, UniformCompositionProps, UniformPlayground, UniformPlaygroundDecorator, UniformPlaygroundProps, UniformRichText, UniformRichTextNode, UniformRichTextNodeProps, UniformRichTextProps, UniformSlot, UniformSlotProps, UniformSlotWrapperComponentProps, UniformText, UniformTextProps, UseCompositionEventEffectOptions, UseUniformContextualEditingProps, UseUniformContextualEditingStateProps, componentStore, componentStoreResolver, convertComponentToProps, createComponentStore, createComponentStoreResolver, getParameterAttributes, registerUniformComponent, useCompositionEventEffect, useUniformContextualEditing, useUniformContextualEditingState, useUniformCurrentComponent, useUniformCurrentComposition };
|
package/dist/index.esm.js
CHANGED
|
@@ -75,7 +75,7 @@ import {
|
|
|
75
75
|
import { Track, TrackFragment, useUniformContext } from "@uniformdev/context-react";
|
|
76
76
|
import React6, { createContext as createContext2, useContext as useContext2 } from "react";
|
|
77
77
|
|
|
78
|
-
// src/convertComponentToProps.ts
|
|
78
|
+
// src/helpers/convertComponentToProps.ts
|
|
79
79
|
function convertComponentToProps(component) {
|
|
80
80
|
var _a;
|
|
81
81
|
const parameters = (_a = component.parameters) != null ? _a : {};
|
|
@@ -928,6 +928,7 @@ export {
|
|
|
928
928
|
UniformText,
|
|
929
929
|
componentStore,
|
|
930
930
|
componentStoreResolver,
|
|
931
|
+
convertComponentToProps,
|
|
931
932
|
createComponentStore,
|
|
932
933
|
createComponentStoreResolver,
|
|
933
934
|
createUniformApiEnhancer,
|
package/dist/index.js
CHANGED
|
@@ -42,6 +42,7 @@ __export(src_exports, {
|
|
|
42
42
|
UniformText: () => UniformText,
|
|
43
43
|
componentStore: () => componentStore,
|
|
44
44
|
componentStoreResolver: () => componentStoreResolver,
|
|
45
|
+
convertComponentToProps: () => convertComponentToProps,
|
|
45
46
|
createComponentStore: () => createComponentStore,
|
|
46
47
|
createComponentStoreResolver: () => createComponentStoreResolver,
|
|
47
48
|
createUniformApiEnhancer: () => import_canvas3.createUniformApiEnhancer,
|
|
@@ -130,7 +131,7 @@ var import_canvas6 = require("@uniformdev/canvas");
|
|
|
130
131
|
var import_context_react2 = require("@uniformdev/context-react");
|
|
131
132
|
var import_react6 = __toESM(require("react"));
|
|
132
133
|
|
|
133
|
-
// src/convertComponentToProps.ts
|
|
134
|
+
// src/helpers/convertComponentToProps.ts
|
|
134
135
|
function convertComponentToProps(component) {
|
|
135
136
|
var _a;
|
|
136
137
|
const parameters = (_a = component.parameters) != null ? _a : {};
|
|
@@ -950,6 +951,7 @@ var useUniformContextualEditingState = ({
|
|
|
950
951
|
UniformText,
|
|
951
952
|
componentStore,
|
|
952
953
|
componentStoreResolver,
|
|
954
|
+
convertComponentToProps,
|
|
953
955
|
createComponentStore,
|
|
954
956
|
createComponentStoreResolver,
|
|
955
957
|
createUniformApiEnhancer,
|
package/dist/index.mjs
CHANGED
|
@@ -75,7 +75,7 @@ import {
|
|
|
75
75
|
import { Track, TrackFragment, useUniformContext } from "@uniformdev/context-react";
|
|
76
76
|
import React6, { createContext as createContext2, useContext as useContext2 } from "react";
|
|
77
77
|
|
|
78
|
-
// src/convertComponentToProps.ts
|
|
78
|
+
// src/helpers/convertComponentToProps.ts
|
|
79
79
|
function convertComponentToProps(component) {
|
|
80
80
|
var _a;
|
|
81
81
|
const parameters = (_a = component.parameters) != null ? _a : {};
|
|
@@ -928,6 +928,7 @@ export {
|
|
|
928
928
|
UniformText,
|
|
929
929
|
componentStore,
|
|
930
930
|
componentStoreResolver,
|
|
931
|
+
convertComponentToProps,
|
|
931
932
|
createComponentStore,
|
|
932
933
|
createComponentStoreResolver,
|
|
933
934
|
createUniformApiEnhancer,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/canvas-react",
|
|
3
|
-
"version": "19.58.
|
|
3
|
+
"version": "19.58.2-alpha.0+68d890cf9",
|
|
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": "api-extractor run --local"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@uniformdev/canvas": "19.58.
|
|
49
|
-
"@uniformdev/context": "19.58.
|
|
50
|
-
"@uniformdev/context-react": "19.58.
|
|
51
|
-
"@uniformdev/richtext": "19.58.
|
|
48
|
+
"@uniformdev/canvas": "19.58.2-alpha.0+68d890cf9",
|
|
49
|
+
"@uniformdev/context": "19.58.2-alpha.0+68d890cf9",
|
|
50
|
+
"@uniformdev/context-react": "19.58.2-alpha.0+68d890cf9",
|
|
51
|
+
"@uniformdev/richtext": "19.58.2-alpha.0+68d890cf9"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"react": ">= 16 || 17 || 18",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"publishConfig": {
|
|
66
66
|
"access": "public"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "68d890cf94dc44136dd88bcc2d703248bae10bea"
|
|
69
69
|
}
|