@uniformdev/canvas-react 19.79.1-alpha.11 → 19.79.1-alpha.8
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
|
/**
|
|
@@ -104,12 +104,15 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
|
|
|
104
104
|
type: string;
|
|
105
105
|
parameters?: {
|
|
106
106
|
[key: string]: {
|
|
107
|
-
value
|
|
107
|
+
value?: unknown;
|
|
108
108
|
type: string;
|
|
109
109
|
connectedData?: {
|
|
110
110
|
pointer: string;
|
|
111
111
|
syntax: "jptr";
|
|
112
112
|
} | undefined;
|
|
113
|
+
locales?: {
|
|
114
|
+
[key: string]: unknown;
|
|
115
|
+
} | undefined;
|
|
113
116
|
};
|
|
114
117
|
} | undefined;
|
|
115
118
|
variant?: string | undefined;
|
|
@@ -123,12 +126,15 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
|
|
|
123
126
|
type: string;
|
|
124
127
|
parameters?: {
|
|
125
128
|
[key: string]: {
|
|
126
|
-
value
|
|
129
|
+
value?: unknown;
|
|
127
130
|
type: string;
|
|
128
131
|
connectedData?: {
|
|
129
132
|
pointer: string;
|
|
130
133
|
syntax: "jptr";
|
|
131
134
|
} | undefined;
|
|
135
|
+
locales?: {
|
|
136
|
+
[key: string]: unknown;
|
|
137
|
+
} | undefined;
|
|
132
138
|
};
|
|
133
139
|
} | undefined;
|
|
134
140
|
variant?: string | undefined;
|
|
@@ -162,12 +168,15 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
|
|
|
162
168
|
[key: string]: {
|
|
163
169
|
parameters?: {
|
|
164
170
|
[key: string]: {
|
|
165
|
-
value
|
|
171
|
+
value?: unknown;
|
|
166
172
|
type: string;
|
|
167
173
|
connectedData?: {
|
|
168
174
|
pointer: string;
|
|
169
175
|
syntax: "jptr";
|
|
170
176
|
} | undefined;
|
|
177
|
+
locales?: {
|
|
178
|
+
[key: string]: unknown;
|
|
179
|
+
} | undefined;
|
|
171
180
|
};
|
|
172
181
|
} | undefined;
|
|
173
182
|
variant?: string | undefined;
|
|
@@ -184,6 +193,17 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
|
|
|
184
193
|
_id: string;
|
|
185
194
|
_slug?: string | null | undefined;
|
|
186
195
|
_name: string;
|
|
196
|
+
_pattern?: string | undefined;
|
|
197
|
+
_patternDataResources?: {
|
|
198
|
+
[key: string]: {
|
|
199
|
+
type: string;
|
|
200
|
+
isPatternParameter?: boolean | undefined;
|
|
201
|
+
ignorePatternParameterDefault?: boolean | undefined;
|
|
202
|
+
variables?: {
|
|
203
|
+
[key: string]: string;
|
|
204
|
+
} | undefined;
|
|
205
|
+
};
|
|
206
|
+
} | undefined;
|
|
187
207
|
_dataResources?: {
|
|
188
208
|
[key: string]: {
|
|
189
209
|
type: string;
|
|
@@ -198,12 +218,15 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
|
|
|
198
218
|
[key: string]: {
|
|
199
219
|
parameters?: {
|
|
200
220
|
[key: string]: {
|
|
201
|
-
value
|
|
221
|
+
value?: unknown;
|
|
202
222
|
type: string;
|
|
203
223
|
connectedData?: {
|
|
204
224
|
pointer: string;
|
|
205
225
|
syntax: "jptr";
|
|
206
226
|
} | undefined;
|
|
227
|
+
locales?: {
|
|
228
|
+
[key: string]: unknown;
|
|
229
|
+
} | undefined;
|
|
207
230
|
};
|
|
208
231
|
} | undefined;
|
|
209
232
|
variant?: string | undefined;
|
|
@@ -215,6 +238,7 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
|
|
|
215
238
|
} | undefined;
|
|
216
239
|
variants?: boolean | undefined;
|
|
217
240
|
} | undefined;
|
|
241
|
+
_locales?: string[] | undefined;
|
|
218
242
|
} | undefined;
|
|
219
243
|
isContextualEditing: boolean;
|
|
220
244
|
};
|
|
@@ -417,4 +441,4 @@ declare const createComponentStoreResolver: (options: {
|
|
|
417
441
|
defaultComponent?: React$1.ComponentType<ComponentProps<any>>;
|
|
418
442
|
}) => RenderComponentResolver;
|
|
419
443
|
|
|
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 };
|
|
444
|
+
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
|
/**
|
|
@@ -104,12 +104,15 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
|
|
|
104
104
|
type: string;
|
|
105
105
|
parameters?: {
|
|
106
106
|
[key: string]: {
|
|
107
|
-
value
|
|
107
|
+
value?: unknown;
|
|
108
108
|
type: string;
|
|
109
109
|
connectedData?: {
|
|
110
110
|
pointer: string;
|
|
111
111
|
syntax: "jptr";
|
|
112
112
|
} | undefined;
|
|
113
|
+
locales?: {
|
|
114
|
+
[key: string]: unknown;
|
|
115
|
+
} | undefined;
|
|
113
116
|
};
|
|
114
117
|
} | undefined;
|
|
115
118
|
variant?: string | undefined;
|
|
@@ -123,12 +126,15 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
|
|
|
123
126
|
type: string;
|
|
124
127
|
parameters?: {
|
|
125
128
|
[key: string]: {
|
|
126
|
-
value
|
|
129
|
+
value?: unknown;
|
|
127
130
|
type: string;
|
|
128
131
|
connectedData?: {
|
|
129
132
|
pointer: string;
|
|
130
133
|
syntax: "jptr";
|
|
131
134
|
} | undefined;
|
|
135
|
+
locales?: {
|
|
136
|
+
[key: string]: unknown;
|
|
137
|
+
} | undefined;
|
|
132
138
|
};
|
|
133
139
|
} | undefined;
|
|
134
140
|
variant?: string | undefined;
|
|
@@ -162,12 +168,15 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
|
|
|
162
168
|
[key: string]: {
|
|
163
169
|
parameters?: {
|
|
164
170
|
[key: string]: {
|
|
165
|
-
value
|
|
171
|
+
value?: unknown;
|
|
166
172
|
type: string;
|
|
167
173
|
connectedData?: {
|
|
168
174
|
pointer: string;
|
|
169
175
|
syntax: "jptr";
|
|
170
176
|
} | undefined;
|
|
177
|
+
locales?: {
|
|
178
|
+
[key: string]: unknown;
|
|
179
|
+
} | undefined;
|
|
171
180
|
};
|
|
172
181
|
} | undefined;
|
|
173
182
|
variant?: string | undefined;
|
|
@@ -184,6 +193,17 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
|
|
|
184
193
|
_id: string;
|
|
185
194
|
_slug?: string | null | undefined;
|
|
186
195
|
_name: string;
|
|
196
|
+
_pattern?: string | undefined;
|
|
197
|
+
_patternDataResources?: {
|
|
198
|
+
[key: string]: {
|
|
199
|
+
type: string;
|
|
200
|
+
isPatternParameter?: boolean | undefined;
|
|
201
|
+
ignorePatternParameterDefault?: boolean | undefined;
|
|
202
|
+
variables?: {
|
|
203
|
+
[key: string]: string;
|
|
204
|
+
} | undefined;
|
|
205
|
+
};
|
|
206
|
+
} | undefined;
|
|
187
207
|
_dataResources?: {
|
|
188
208
|
[key: string]: {
|
|
189
209
|
type: string;
|
|
@@ -198,12 +218,15 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
|
|
|
198
218
|
[key: string]: {
|
|
199
219
|
parameters?: {
|
|
200
220
|
[key: string]: {
|
|
201
|
-
value
|
|
221
|
+
value?: unknown;
|
|
202
222
|
type: string;
|
|
203
223
|
connectedData?: {
|
|
204
224
|
pointer: string;
|
|
205
225
|
syntax: "jptr";
|
|
206
226
|
} | undefined;
|
|
227
|
+
locales?: {
|
|
228
|
+
[key: string]: unknown;
|
|
229
|
+
} | undefined;
|
|
207
230
|
};
|
|
208
231
|
} | undefined;
|
|
209
232
|
variant?: string | undefined;
|
|
@@ -215,6 +238,7 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
|
|
|
215
238
|
} | undefined;
|
|
216
239
|
variants?: boolean | undefined;
|
|
217
240
|
} | undefined;
|
|
241
|
+
_locales?: string[] | undefined;
|
|
218
242
|
} | undefined;
|
|
219
243
|
isContextualEditing: boolean;
|
|
220
244
|
};
|
|
@@ -417,4 +441,4 @@ declare const createComponentStoreResolver: (options: {
|
|
|
417
441
|
defaultComponent?: React$1.ComponentType<ComponentProps<any>>;
|
|
418
442
|
}) => RenderComponentResolver;
|
|
419
443
|
|
|
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 };
|
|
444
|
+
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.79.1-alpha.
|
|
3
|
+
"version": "19.79.1-alpha.8+5ba1ad1ca",
|
|
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.79.1-alpha.
|
|
49
|
-
"@uniformdev/context": "19.79.1-alpha.
|
|
50
|
-
"@uniformdev/context-react": "19.79.1-alpha.
|
|
51
|
-
"@uniformdev/richtext": "19.79.1-alpha.
|
|
48
|
+
"@uniformdev/canvas": "19.79.1-alpha.8+5ba1ad1ca",
|
|
49
|
+
"@uniformdev/context": "19.79.1-alpha.8+5ba1ad1ca",
|
|
50
|
+
"@uniformdev/context-react": "19.79.1-alpha.8+5ba1ad1ca",
|
|
51
|
+
"@uniformdev/richtext": "19.79.1-alpha.8+5ba1ad1ca"
|
|
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.40",
|
|
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": "5ba1ad1ca42f7a035f32e8bb6f51bd1e955f0792"
|
|
69
69
|
}
|