@uniformdev/canvas-react 19.80.0 → 19.80.1-alpha.126
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.
|
@@ -38,4 +38,4 @@ type PureUniformTextProps = {
|
|
|
38
38
|
*/
|
|
39
39
|
declare const PureUniformText: ({ as: Tag, parameterId, component, skipCustomRendering, isContextualEditing, isMultiline, placeholder, render, ...props }: PureUniformTextProps) => React.JSX.Element | null;
|
|
40
40
|
|
|
41
|
-
export { PureUniformTextProps as P, PureUniformText as a };
|
|
41
|
+
export { type PureUniformTextProps as P, PureUniformText as a };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ComponentInstance } from '@uniformdev/canvas';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
type ParameterTextValue = string | undefined;
|
|
5
|
+
type PureUniformTextProps = {
|
|
6
|
+
/**
|
|
7
|
+
* The name of the HTML tag to render.
|
|
8
|
+
* @default "span"
|
|
9
|
+
*/
|
|
10
|
+
as?: React.ElementType;
|
|
11
|
+
/** The ID of the parameter. */
|
|
12
|
+
parameterId: string;
|
|
13
|
+
/** The component that contains the parameter. */
|
|
14
|
+
component: ComponentInstance;
|
|
15
|
+
skipCustomRendering: boolean;
|
|
16
|
+
isContextualEditing: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* When set to true, it adds `whiteSpace: 'pre-wrap'` to the styles of the root element to allow the rendering of line breaks.
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
isMultiline?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Sets the value to show in Canvas editor when the parameter value is empty.
|
|
24
|
+
* Can be a static string, or a function to generate the placeholder out of parameter info.
|
|
25
|
+
* @default undefined
|
|
26
|
+
*/
|
|
27
|
+
placeholder?: string | ((parameter: {
|
|
28
|
+
id: string;
|
|
29
|
+
}) => string | undefined);
|
|
30
|
+
/**
|
|
31
|
+
* A function to customize the rendering of the parameter value. Useful to format the value before rendering it.
|
|
32
|
+
* @default "(value) => value"
|
|
33
|
+
*/
|
|
34
|
+
render?: (value: ParameterTextValue) => React.ReactNode;
|
|
35
|
+
} & Omit<React.HTMLAttributes<HTMLSpanElement>, 'children' | 'placeholder'>;
|
|
36
|
+
/**
|
|
37
|
+
* Renders text parameters. Offers inline editing capability out of the box.
|
|
38
|
+
*/
|
|
39
|
+
declare const PureUniformText: ({ as: Tag, parameterId, component, skipCustomRendering, isContextualEditing, isMultiline, placeholder, render, ...props }: PureUniformTextProps) => React.JSX.Element | null;
|
|
40
|
+
|
|
41
|
+
export { type PureUniformTextProps as P, PureUniformText as a };
|
package/dist/core.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentInstance, RootComponentInstance } from '@uniformdev/canvas';
|
|
2
2
|
import React, { PropsWithChildren } from 'react';
|
|
3
|
-
export { a as PureUniformText, P as PureUniformTextProps } from './PureUniformText-
|
|
3
|
+
export { a as PureUniformText, P as PureUniformTextProps } from './PureUniformText-METroz2Q.mjs';
|
|
4
4
|
|
|
5
5
|
type PureContextualEditingComponentWrapperProps = {
|
|
6
6
|
isPlaceholder: boolean | undefined;
|
|
@@ -13,4 +13,4 @@ type PureContextualEditingComponentWrapperProps = {
|
|
|
13
13
|
};
|
|
14
14
|
declare const PureContextualEditingComponentWrapper: ({ children, isPlaceholder, parentComponent, component, slotName, indexInSlot, slotChildrenCount, isReadOnly, }: PropsWithChildren<PureContextualEditingComponentWrapperProps>) => React.JSX.Element;
|
|
15
15
|
|
|
16
|
-
export { PureContextualEditingComponentWrapper, PureContextualEditingComponentWrapperProps };
|
|
16
|
+
export { PureContextualEditingComponentWrapper, type PureContextualEditingComponentWrapperProps };
|
package/dist/core.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentInstance, RootComponentInstance } from '@uniformdev/canvas';
|
|
2
2
|
import React, { PropsWithChildren } from 'react';
|
|
3
|
-
export { a as PureUniformText, P as PureUniformTextProps } from './PureUniformText-
|
|
3
|
+
export { a as PureUniformText, P as PureUniformTextProps } from './PureUniformText-METroz2Q.js';
|
|
4
4
|
|
|
5
5
|
type PureContextualEditingComponentWrapperProps = {
|
|
6
6
|
isPlaceholder: boolean | undefined;
|
|
@@ -13,4 +13,4 @@ type PureContextualEditingComponentWrapperProps = {
|
|
|
13
13
|
};
|
|
14
14
|
declare const PureContextualEditingComponentWrapper: ({ children, isPlaceholder, parentComponent, component, slotName, indexInSlot, slotChildrenCount, isReadOnly, }: PropsWithChildren<PureContextualEditingComponentWrapperProps>) => React.JSX.Element;
|
|
15
15
|
|
|
16
|
-
export { PureContextualEditingComponentWrapper, PureContextualEditingComponentWrapperProps };
|
|
16
|
+
export { PureContextualEditingComponentWrapper, type PureContextualEditingComponentWrapperProps };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React$1, { Key, ReactNode, PropsWithChildren } from 'react';
|
|
2
2
|
import { ComponentInstance, RootComponentInstance, UpdateCompositionMessage, getParameterAttributes as getParameterAttributes$1, SubscribeToCompositionOptions } from '@uniformdev/canvas';
|
|
3
3
|
export { GetParameterAttributesProps, createUniformApiEnhancer } from '@uniformdev/canvas';
|
|
4
|
-
import { P as PureUniformTextProps } from './PureUniformText-
|
|
4
|
+
import { P as PureUniformTextProps } from './PureUniformText-METroz2Q.mjs';
|
|
5
5
|
import { RichTextNode } from '@uniformdev/richtext';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -417,4 +417,4 @@ declare const createComponentStoreResolver: (options: {
|
|
|
417
417
|
defaultComponent?: React$1.ComponentType<ComponentProps<any>>;
|
|
418
418
|
}) => RenderComponentResolver;
|
|
419
419
|
|
|
420
|
-
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 };
|
|
420
|
+
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 UseCompositionEventEffectOptions, type UseUniformContextualEditingProps, type UseUniformContextualEditingStateProps, componentStore, componentStoreResolver, convertComponentToProps, createComponentStore, createComponentStoreResolver, getParameterAttributes, registerUniformComponent, useCompositionEventEffect, useUniformContextualEditing, useUniformContextualEditingState, useUniformCurrentComponent, useUniformCurrentComposition };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React$1, { Key, ReactNode, PropsWithChildren } from 'react';
|
|
2
2
|
import { ComponentInstance, RootComponentInstance, UpdateCompositionMessage, getParameterAttributes as getParameterAttributes$1, SubscribeToCompositionOptions } from '@uniformdev/canvas';
|
|
3
3
|
export { GetParameterAttributesProps, createUniformApiEnhancer } from '@uniformdev/canvas';
|
|
4
|
-
import { P as PureUniformTextProps } from './PureUniformText-
|
|
4
|
+
import { P as PureUniformTextProps } from './PureUniformText-METroz2Q.js';
|
|
5
5
|
import { RichTextNode } from '@uniformdev/richtext';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -417,4 +417,4 @@ declare const createComponentStoreResolver: (options: {
|
|
|
417
417
|
defaultComponent?: React$1.ComponentType<ComponentProps<any>>;
|
|
418
418
|
}) => RenderComponentResolver;
|
|
419
419
|
|
|
420
|
-
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 };
|
|
420
|
+
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 UseCompositionEventEffectOptions, type UseUniformContextualEditingProps, type UseUniformContextualEditingStateProps, componentStore, componentStoreResolver, convertComponentToProps, createComponentStore, createComponentStoreResolver, getParameterAttributes, registerUniformComponent, useCompositionEventEffect, useUniformContextualEditing, useUniformContextualEditingState, useUniformCurrentComponent, useUniformCurrentComposition };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/canvas-react",
|
|
3
|
-
"version": "19.80.
|
|
3
|
+
"version": "19.80.1-alpha.126+d56efea3e7",
|
|
4
4
|
"description": "React SDK for Uniform Canvas",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -45,17 +45,17 @@
|
|
|
45
45
|
"document": "api-extractor run --local"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@uniformdev/canvas": "19.80.
|
|
49
|
-
"@uniformdev/context": "19.80.
|
|
50
|
-
"@uniformdev/context-react": "19.80.
|
|
51
|
-
"@uniformdev/richtext": "19.80.
|
|
48
|
+
"@uniformdev/canvas": "19.80.1-alpha.126+d56efea3e7",
|
|
49
|
+
"@uniformdev/context": "19.80.1-alpha.126+d56efea3e7",
|
|
50
|
+
"@uniformdev/context-react": "19.80.1-alpha.126+d56efea3e7",
|
|
51
|
+
"@uniformdev/richtext": "19.80.1-alpha.126+d56efea3e7"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"react": ">= 16 || 17 || 18",
|
|
55
55
|
"react-dom": ">=16"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@types/react": "18.2.
|
|
58
|
+
"@types/react": "18.2.39",
|
|
59
59
|
"react": "18.2.0",
|
|
60
60
|
"react-dom": "18.2.0"
|
|
61
61
|
},
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"publishConfig": {
|
|
66
66
|
"access": "public"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "d56efea3e70e67bae1bad2f6f181c93d3dfb857c"
|
|
69
69
|
}
|