@uniformdev/canvas-react 19.173.1-alpha.17 → 19.173.2-alpha.210
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 +145 -125
- package/dist/index.d.ts +145 -125
- package/dist/index.esm.js +53 -36
- package/dist/index.js +63 -43
- package/dist/index.mjs +53 -36
- package/package.json +9 -9
package/dist/index.d.mts
CHANGED
|
@@ -110,64 +110,64 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
|
|
|
110
110
|
connectedData?: {
|
|
111
111
|
pointer: string;
|
|
112
112
|
syntax: "jptr";
|
|
113
|
-
failureAction?: "
|
|
114
|
-
failureLogLevel?: "
|
|
115
|
-
failureDefault?: string
|
|
116
|
-
}
|
|
113
|
+
failureAction?: "t" | "p" | "c" | "a";
|
|
114
|
+
failureLogLevel?: "e" | "w" | "i";
|
|
115
|
+
failureDefault?: string;
|
|
116
|
+
};
|
|
117
117
|
locales?: {
|
|
118
118
|
[key: string]: unknown;
|
|
119
|
-
}
|
|
119
|
+
};
|
|
120
120
|
conditions?: {
|
|
121
121
|
when: {
|
|
122
|
-
op?: "&" | "|"
|
|
123
|
-
clauses: (
|
|
122
|
+
op?: "&" | "|";
|
|
123
|
+
clauses: ({
|
|
124
124
|
rule: string;
|
|
125
|
-
source?: string
|
|
125
|
+
source?: string;
|
|
126
126
|
op: string;
|
|
127
127
|
value: string | string[];
|
|
128
|
-
})[];
|
|
128
|
+
} | any)[];
|
|
129
129
|
};
|
|
130
130
|
value: unknown;
|
|
131
131
|
id: number;
|
|
132
|
-
}[]
|
|
132
|
+
}[];
|
|
133
133
|
localesConditions?: {
|
|
134
134
|
[key: string]: {
|
|
135
135
|
when: {
|
|
136
|
-
op?: "&" | "|"
|
|
137
|
-
clauses: (
|
|
136
|
+
op?: "&" | "|";
|
|
137
|
+
clauses: ({
|
|
138
138
|
rule: string;
|
|
139
|
-
source?: string
|
|
139
|
+
source?: string;
|
|
140
140
|
op: string;
|
|
141
141
|
value: string | string[];
|
|
142
|
-
})[];
|
|
142
|
+
} | any)[];
|
|
143
143
|
};
|
|
144
144
|
value: unknown;
|
|
145
145
|
id: number;
|
|
146
146
|
}[];
|
|
147
|
-
}
|
|
147
|
+
};
|
|
148
148
|
};
|
|
149
|
-
}
|
|
150
|
-
variant?: string
|
|
149
|
+
};
|
|
150
|
+
variant?: string;
|
|
151
151
|
projectMapNodes?: {
|
|
152
152
|
id: string;
|
|
153
153
|
path: string;
|
|
154
154
|
projectMapId: string;
|
|
155
155
|
data?: {
|
|
156
|
-
isSearchHit?: boolean
|
|
156
|
+
isSearchHit?: boolean;
|
|
157
157
|
queryStrings?: {
|
|
158
158
|
name: string;
|
|
159
|
-
value?: string
|
|
160
|
-
helpText?: string
|
|
161
|
-
}[]
|
|
162
|
-
previewValue?: string
|
|
163
|
-
}
|
|
159
|
+
value?: string;
|
|
160
|
+
helpText?: string;
|
|
161
|
+
}[];
|
|
162
|
+
previewValue?: string;
|
|
163
|
+
};
|
|
164
164
|
locales?: {
|
|
165
165
|
[key: string]: {
|
|
166
166
|
path: string;
|
|
167
167
|
inherited: boolean;
|
|
168
168
|
};
|
|
169
|
-
}
|
|
170
|
-
}[]
|
|
169
|
+
};
|
|
170
|
+
}[];
|
|
171
171
|
slots?: {
|
|
172
172
|
[key: string]: {
|
|
173
173
|
type: string;
|
|
@@ -178,72 +178,74 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
|
|
|
178
178
|
connectedData?: {
|
|
179
179
|
pointer: string;
|
|
180
180
|
syntax: "jptr";
|
|
181
|
-
failureAction?: "
|
|
182
|
-
failureLogLevel?: "
|
|
183
|
-
failureDefault?: string
|
|
184
|
-
}
|
|
181
|
+
failureAction?: "t" | "p" | "c" | "a";
|
|
182
|
+
failureLogLevel?: "e" | "w" | "i";
|
|
183
|
+
failureDefault?: string;
|
|
184
|
+
};
|
|
185
185
|
locales?: {
|
|
186
186
|
[key: string]: unknown;
|
|
187
|
-
}
|
|
187
|
+
};
|
|
188
188
|
conditions?: {
|
|
189
189
|
when: {
|
|
190
|
-
op?: "&" | "|"
|
|
191
|
-
clauses: (
|
|
190
|
+
op?: "&" | "|";
|
|
191
|
+
clauses: ({
|
|
192
192
|
rule: string;
|
|
193
|
-
source?: string
|
|
193
|
+
source?: string;
|
|
194
194
|
op: string;
|
|
195
195
|
value: string | string[];
|
|
196
|
-
})[];
|
|
196
|
+
} | any)[];
|
|
197
197
|
};
|
|
198
198
|
value: unknown;
|
|
199
199
|
id: number;
|
|
200
|
-
}[]
|
|
200
|
+
}[];
|
|
201
201
|
localesConditions?: {
|
|
202
202
|
[key: string]: {
|
|
203
203
|
when: {
|
|
204
|
-
op?: "&" | "|"
|
|
205
|
-
clauses: (
|
|
204
|
+
op?: "&" | "|";
|
|
205
|
+
clauses: ({
|
|
206
206
|
rule: string;
|
|
207
|
-
source?: string
|
|
207
|
+
source?: string;
|
|
208
208
|
op: string;
|
|
209
209
|
value: string | string[];
|
|
210
|
-
})[];
|
|
210
|
+
} | any)[];
|
|
211
211
|
};
|
|
212
212
|
value: unknown;
|
|
213
213
|
id: number;
|
|
214
214
|
}[];
|
|
215
|
-
}
|
|
215
|
+
};
|
|
216
216
|
};
|
|
217
|
-
}
|
|
218
|
-
variant?: string
|
|
217
|
+
};
|
|
218
|
+
variant?: string;
|
|
219
219
|
slots?: {
|
|
220
220
|
[key: string]: any[];
|
|
221
|
-
}
|
|
222
|
-
_id?: string
|
|
223
|
-
_pattern?: string
|
|
221
|
+
};
|
|
222
|
+
_id?: string;
|
|
223
|
+
_pattern?: string;
|
|
224
224
|
_dataResources?: {
|
|
225
225
|
[key: string]: {
|
|
226
226
|
type: string;
|
|
227
|
-
isPatternParameter?: boolean
|
|
228
|
-
ignorePatternParameterDefault?: boolean
|
|
229
|
-
optionalPatternParameter?: boolean
|
|
227
|
+
isPatternParameter?: boolean;
|
|
228
|
+
ignorePatternParameterDefault?: boolean;
|
|
229
|
+
optionalPatternParameter?: boolean;
|
|
230
|
+
dataSourceVariant?: "unpublished";
|
|
230
231
|
variables?: {
|
|
231
232
|
[key: string]: string;
|
|
232
|
-
}
|
|
233
|
+
};
|
|
233
234
|
};
|
|
234
|
-
}
|
|
235
|
+
};
|
|
235
236
|
_patternDataResources?: {
|
|
236
237
|
[key: string]: {
|
|
237
238
|
type: string;
|
|
238
|
-
isPatternParameter?: boolean
|
|
239
|
-
ignorePatternParameterDefault?: boolean
|
|
240
|
-
optionalPatternParameter?: boolean
|
|
239
|
+
isPatternParameter?: boolean;
|
|
240
|
+
ignorePatternParameterDefault?: boolean;
|
|
241
|
+
optionalPatternParameter?: boolean;
|
|
242
|
+
dataSourceVariant?: "unpublished";
|
|
241
243
|
variables?: {
|
|
242
244
|
[key: string]: string;
|
|
243
|
-
}
|
|
245
|
+
};
|
|
244
246
|
};
|
|
245
|
-
}
|
|
246
|
-
_patternError?: "NOTFOUND" | "CYCLIC"
|
|
247
|
+
};
|
|
248
|
+
_patternError?: "NOTFOUND" | "CYCLIC";
|
|
247
249
|
_overrides?: {
|
|
248
250
|
[key: string]: {
|
|
249
251
|
parameters?: {
|
|
@@ -253,90 +255,92 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
|
|
|
253
255
|
connectedData?: {
|
|
254
256
|
pointer: string;
|
|
255
257
|
syntax: "jptr";
|
|
256
|
-
failureAction?: "
|
|
257
|
-
failureLogLevel?: "
|
|
258
|
-
failureDefault?: string
|
|
259
|
-
}
|
|
258
|
+
failureAction?: "t" | "p" | "c" | "a";
|
|
259
|
+
failureLogLevel?: "e" | "w" | "i";
|
|
260
|
+
failureDefault?: string;
|
|
261
|
+
};
|
|
260
262
|
locales?: {
|
|
261
263
|
[key: string]: unknown;
|
|
262
|
-
}
|
|
264
|
+
};
|
|
263
265
|
conditions?: {
|
|
264
266
|
when: {
|
|
265
|
-
op?: "&" | "|"
|
|
266
|
-
clauses: (
|
|
267
|
+
op?: "&" | "|";
|
|
268
|
+
clauses: ({
|
|
267
269
|
rule: string;
|
|
268
|
-
source?: string
|
|
270
|
+
source?: string;
|
|
269
271
|
op: string;
|
|
270
272
|
value: string | string[];
|
|
271
|
-
})[];
|
|
273
|
+
} | any)[];
|
|
272
274
|
};
|
|
273
275
|
value: unknown;
|
|
274
276
|
id: number;
|
|
275
|
-
}[]
|
|
277
|
+
}[];
|
|
276
278
|
localesConditions?: {
|
|
277
279
|
[key: string]: {
|
|
278
280
|
when: {
|
|
279
|
-
op?: "&" | "|"
|
|
280
|
-
clauses: (
|
|
281
|
+
op?: "&" | "|";
|
|
282
|
+
clauses: ({
|
|
281
283
|
rule: string;
|
|
282
|
-
source?: string
|
|
284
|
+
source?: string;
|
|
283
285
|
op: string;
|
|
284
286
|
value: string | string[];
|
|
285
|
-
})[];
|
|
287
|
+
} | any)[];
|
|
286
288
|
};
|
|
287
289
|
value: unknown;
|
|
288
290
|
id: number;
|
|
289
291
|
}[];
|
|
290
|
-
}
|
|
292
|
+
};
|
|
291
293
|
};
|
|
292
|
-
}
|
|
294
|
+
};
|
|
293
295
|
slots?: {
|
|
294
296
|
[key: string]: any[];
|
|
295
|
-
}
|
|
296
|
-
variant?: string
|
|
297
|
+
};
|
|
298
|
+
variant?: string;
|
|
297
299
|
};
|
|
298
|
-
}
|
|
300
|
+
};
|
|
299
301
|
_overridability?: {
|
|
300
302
|
parameters?: {
|
|
301
303
|
[key: string]: "yes" | "no";
|
|
302
|
-
}
|
|
303
|
-
variants?: boolean
|
|
304
|
-
hideLockedParameters?: boolean
|
|
305
|
-
}
|
|
306
|
-
_locales?: string[]
|
|
304
|
+
};
|
|
305
|
+
variants?: boolean;
|
|
306
|
+
hideLockedParameters?: boolean;
|
|
307
|
+
};
|
|
308
|
+
_locales?: string[];
|
|
307
309
|
}[];
|
|
308
|
-
}
|
|
310
|
+
};
|
|
309
311
|
_id: string;
|
|
310
|
-
_slug?: string | null
|
|
312
|
+
_slug?: string | null;
|
|
311
313
|
_name: string;
|
|
312
|
-
_author?: string
|
|
313
|
-
_authorSubject?: string
|
|
314
|
-
_creator?: string
|
|
315
|
-
_creatorSubject?: string
|
|
316
|
-
_pattern?: string
|
|
314
|
+
_author?: string;
|
|
315
|
+
_authorSubject?: string;
|
|
316
|
+
_creator?: string;
|
|
317
|
+
_creatorSubject?: string;
|
|
318
|
+
_pattern?: string;
|
|
317
319
|
_patternDataResources?: {
|
|
318
320
|
[key: string]: {
|
|
319
321
|
type: string;
|
|
320
|
-
isPatternParameter?: boolean
|
|
321
|
-
ignorePatternParameterDefault?: boolean
|
|
322
|
-
optionalPatternParameter?: boolean
|
|
322
|
+
isPatternParameter?: boolean;
|
|
323
|
+
ignorePatternParameterDefault?: boolean;
|
|
324
|
+
optionalPatternParameter?: boolean;
|
|
325
|
+
dataSourceVariant?: "unpublished";
|
|
323
326
|
variables?: {
|
|
324
327
|
[key: string]: string;
|
|
325
|
-
}
|
|
328
|
+
};
|
|
326
329
|
};
|
|
327
|
-
}
|
|
330
|
+
};
|
|
328
331
|
_dataResources?: {
|
|
329
332
|
[key: string]: {
|
|
330
333
|
type: string;
|
|
331
|
-
isPatternParameter?: boolean
|
|
332
|
-
ignorePatternParameterDefault?: boolean
|
|
333
|
-
optionalPatternParameter?: boolean
|
|
334
|
+
isPatternParameter?: boolean;
|
|
335
|
+
ignorePatternParameterDefault?: boolean;
|
|
336
|
+
optionalPatternParameter?: boolean;
|
|
337
|
+
dataSourceVariant?: "unpublished";
|
|
334
338
|
variables?: {
|
|
335
339
|
[key: string]: string;
|
|
336
|
-
}
|
|
340
|
+
};
|
|
337
341
|
};
|
|
338
|
-
}
|
|
339
|
-
_patternError?: "NOTFOUND" | "CYCLIC"
|
|
342
|
+
};
|
|
343
|
+
_patternError?: "NOTFOUND" | "CYCLIC";
|
|
340
344
|
_overrides?: {
|
|
341
345
|
[key: string]: {
|
|
342
346
|
parameters?: {
|
|
@@ -346,57 +350,57 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
|
|
|
346
350
|
connectedData?: {
|
|
347
351
|
pointer: string;
|
|
348
352
|
syntax: "jptr";
|
|
349
|
-
failureAction?: "
|
|
350
|
-
failureLogLevel?: "
|
|
351
|
-
failureDefault?: string
|
|
352
|
-
}
|
|
353
|
+
failureAction?: "t" | "p" | "c" | "a";
|
|
354
|
+
failureLogLevel?: "e" | "w" | "i";
|
|
355
|
+
failureDefault?: string;
|
|
356
|
+
};
|
|
353
357
|
locales?: {
|
|
354
358
|
[key: string]: unknown;
|
|
355
|
-
}
|
|
359
|
+
};
|
|
356
360
|
conditions?: {
|
|
357
361
|
when: {
|
|
358
|
-
op?: "&" | "|"
|
|
359
|
-
clauses: (
|
|
362
|
+
op?: "&" | "|";
|
|
363
|
+
clauses: ({
|
|
360
364
|
rule: string;
|
|
361
|
-
source?: string
|
|
365
|
+
source?: string;
|
|
362
366
|
op: string;
|
|
363
367
|
value: string | string[];
|
|
364
|
-
})[];
|
|
368
|
+
} | any)[];
|
|
365
369
|
};
|
|
366
370
|
value: unknown;
|
|
367
371
|
id: number;
|
|
368
|
-
}[]
|
|
372
|
+
}[];
|
|
369
373
|
localesConditions?: {
|
|
370
374
|
[key: string]: {
|
|
371
375
|
when: {
|
|
372
|
-
op?: "&" | "|"
|
|
373
|
-
clauses: (
|
|
376
|
+
op?: "&" | "|";
|
|
377
|
+
clauses: ({
|
|
374
378
|
rule: string;
|
|
375
|
-
source?: string
|
|
379
|
+
source?: string;
|
|
376
380
|
op: string;
|
|
377
381
|
value: string | string[];
|
|
378
|
-
})[];
|
|
382
|
+
} | any)[];
|
|
379
383
|
};
|
|
380
384
|
value: unknown;
|
|
381
385
|
id: number;
|
|
382
386
|
}[];
|
|
383
|
-
}
|
|
387
|
+
};
|
|
384
388
|
};
|
|
385
|
-
}
|
|
389
|
+
};
|
|
386
390
|
slots?: {
|
|
387
391
|
[key: string]: any[];
|
|
388
|
-
}
|
|
389
|
-
variant?: string
|
|
392
|
+
};
|
|
393
|
+
variant?: string;
|
|
390
394
|
};
|
|
391
|
-
}
|
|
395
|
+
};
|
|
392
396
|
_overridability?: {
|
|
393
397
|
parameters?: {
|
|
394
398
|
[key: string]: "yes" | "no";
|
|
395
|
-
}
|
|
396
|
-
variants?: boolean
|
|
397
|
-
hideLockedParameters?: boolean
|
|
398
|
-
}
|
|
399
|
-
_locales?: string[]
|
|
399
|
+
};
|
|
400
|
+
variants?: boolean;
|
|
401
|
+
hideLockedParameters?: boolean;
|
|
402
|
+
};
|
|
403
|
+
_locales?: string[];
|
|
400
404
|
} | undefined;
|
|
401
405
|
isContextualEditing: boolean;
|
|
402
406
|
};
|
|
@@ -469,6 +473,14 @@ type UniformRichTextProps = {
|
|
|
469
473
|
* for rendering a rich text node
|
|
470
474
|
*/
|
|
471
475
|
resolveRichTextRenderer?: RenderRichTextComponentResolver;
|
|
476
|
+
/**
|
|
477
|
+
* Sets the value to show in Canvas editor when the parameter value is empty.
|
|
478
|
+
* Can be a static string, or a function to generate the placeholder out of parameter info.
|
|
479
|
+
* @default undefined
|
|
480
|
+
*/
|
|
481
|
+
placeholder?: string | ((parameter: {
|
|
482
|
+
id: string;
|
|
483
|
+
}) => string | undefined);
|
|
472
484
|
} & Omit<React$1.HTMLAttributes<HTMLDivElement>, 'children'>;
|
|
473
485
|
/**
|
|
474
486
|
* Adds rendering support for Uniform Rich Text parameters
|
|
@@ -478,14 +490,22 @@ declare const UniformRichText: React$1.ForwardRefExoticComponent<{
|
|
|
478
490
|
* The name of the HTML tag to render.
|
|
479
491
|
* @default "div"
|
|
480
492
|
*/
|
|
481
|
-
as?: React$1.ElementType
|
|
493
|
+
as?: React$1.ElementType;
|
|
482
494
|
/** The ID of the parameter. */
|
|
483
495
|
parameterId: string;
|
|
484
496
|
/**
|
|
485
497
|
* A function which can provide a custom react component
|
|
486
498
|
* for rendering a rich text node
|
|
487
499
|
*/
|
|
488
|
-
resolveRichTextRenderer?: RenderRichTextComponentResolver
|
|
500
|
+
resolveRichTextRenderer?: RenderRichTextComponentResolver;
|
|
501
|
+
/**
|
|
502
|
+
* Sets the value to show in Canvas editor when the parameter value is empty.
|
|
503
|
+
* Can be a static string, or a function to generate the placeholder out of parameter info.
|
|
504
|
+
* @default undefined
|
|
505
|
+
*/
|
|
506
|
+
placeholder?: string | ((parameter: {
|
|
507
|
+
id: string;
|
|
508
|
+
}) => string | undefined);
|
|
489
509
|
} & Omit<React$1.HTMLAttributes<HTMLDivElement>, "children"> & React$1.RefAttributes<unknown>>;
|
|
490
510
|
|
|
491
511
|
type UniformRichTextNodeProps = {
|
|
@@ -593,7 +613,7 @@ declare const useUniformContextualEditingState: ({ global, }?: UseUniformContext
|
|
|
593
613
|
declare const componentStore: ComponentStore;
|
|
594
614
|
declare const registerUniformComponent: ({ type, variantId, component, }: {
|
|
595
615
|
type: string;
|
|
596
|
-
variantId?: string
|
|
616
|
+
variantId?: string;
|
|
597
617
|
component: React.ComponentType<ComponentProps<any>>;
|
|
598
618
|
}) => void;
|
|
599
619
|
declare const componentStoreResolver: RenderComponentResolver;
|