@uniformdev/canvas-react 19.173.1-alpha.17 → 19.173.2-alpha.258
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 +141 -125
- package/dist/index.d.ts +141 -125
- package/dist/index.esm.js +80 -48
- package/dist/index.js +90 -55
- package/dist/index.mjs +80 -48
- 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,72 @@ 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
230
|
variables?: {
|
|
231
231
|
[key: string]: string;
|
|
232
|
-
}
|
|
232
|
+
};
|
|
233
233
|
};
|
|
234
|
-
}
|
|
234
|
+
};
|
|
235
235
|
_patternDataResources?: {
|
|
236
236
|
[key: string]: {
|
|
237
237
|
type: string;
|
|
238
|
-
isPatternParameter?: boolean
|
|
239
|
-
ignorePatternParameterDefault?: boolean
|
|
240
|
-
optionalPatternParameter?: boolean
|
|
238
|
+
isPatternParameter?: boolean;
|
|
239
|
+
ignorePatternParameterDefault?: boolean;
|
|
240
|
+
optionalPatternParameter?: boolean;
|
|
241
241
|
variables?: {
|
|
242
242
|
[key: string]: string;
|
|
243
|
-
}
|
|
243
|
+
};
|
|
244
244
|
};
|
|
245
|
-
}
|
|
246
|
-
_patternError?: "NOTFOUND" | "CYCLIC"
|
|
245
|
+
};
|
|
246
|
+
_patternError?: "NOTFOUND" | "CYCLIC";
|
|
247
247
|
_overrides?: {
|
|
248
248
|
[key: string]: {
|
|
249
249
|
parameters?: {
|
|
@@ -253,90 +253,90 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
|
|
|
253
253
|
connectedData?: {
|
|
254
254
|
pointer: string;
|
|
255
255
|
syntax: "jptr";
|
|
256
|
-
failureAction?: "
|
|
257
|
-
failureLogLevel?: "
|
|
258
|
-
failureDefault?: string
|
|
259
|
-
}
|
|
256
|
+
failureAction?: "t" | "p" | "c" | "a";
|
|
257
|
+
failureLogLevel?: "e" | "w" | "i";
|
|
258
|
+
failureDefault?: string;
|
|
259
|
+
};
|
|
260
260
|
locales?: {
|
|
261
261
|
[key: string]: unknown;
|
|
262
|
-
}
|
|
262
|
+
};
|
|
263
263
|
conditions?: {
|
|
264
264
|
when: {
|
|
265
|
-
op?: "&" | "|"
|
|
266
|
-
clauses: (
|
|
265
|
+
op?: "&" | "|";
|
|
266
|
+
clauses: ({
|
|
267
267
|
rule: string;
|
|
268
|
-
source?: string
|
|
268
|
+
source?: string;
|
|
269
269
|
op: string;
|
|
270
270
|
value: string | string[];
|
|
271
|
-
})[];
|
|
271
|
+
} | any)[];
|
|
272
272
|
};
|
|
273
273
|
value: unknown;
|
|
274
274
|
id: number;
|
|
275
|
-
}[]
|
|
275
|
+
}[];
|
|
276
276
|
localesConditions?: {
|
|
277
277
|
[key: string]: {
|
|
278
278
|
when: {
|
|
279
|
-
op?: "&" | "|"
|
|
280
|
-
clauses: (
|
|
279
|
+
op?: "&" | "|";
|
|
280
|
+
clauses: ({
|
|
281
281
|
rule: string;
|
|
282
|
-
source?: string
|
|
282
|
+
source?: string;
|
|
283
283
|
op: string;
|
|
284
284
|
value: string | string[];
|
|
285
|
-
})[];
|
|
285
|
+
} | any)[];
|
|
286
286
|
};
|
|
287
287
|
value: unknown;
|
|
288
288
|
id: number;
|
|
289
289
|
}[];
|
|
290
|
-
}
|
|
290
|
+
};
|
|
291
291
|
};
|
|
292
|
-
}
|
|
292
|
+
};
|
|
293
293
|
slots?: {
|
|
294
294
|
[key: string]: any[];
|
|
295
|
-
}
|
|
296
|
-
variant?: string
|
|
295
|
+
};
|
|
296
|
+
variant?: string;
|
|
297
297
|
};
|
|
298
|
-
}
|
|
298
|
+
};
|
|
299
299
|
_overridability?: {
|
|
300
300
|
parameters?: {
|
|
301
301
|
[key: string]: "yes" | "no";
|
|
302
|
-
}
|
|
303
|
-
variants?: boolean
|
|
304
|
-
hideLockedParameters?: boolean
|
|
305
|
-
}
|
|
306
|
-
_locales?: string[]
|
|
302
|
+
};
|
|
303
|
+
variants?: boolean;
|
|
304
|
+
hideLockedParameters?: boolean;
|
|
305
|
+
};
|
|
306
|
+
_locales?: string[];
|
|
307
307
|
}[];
|
|
308
|
-
}
|
|
308
|
+
};
|
|
309
309
|
_id: string;
|
|
310
|
-
_slug?: string | null
|
|
310
|
+
_slug?: string | null;
|
|
311
311
|
_name: string;
|
|
312
|
-
_author?: string
|
|
313
|
-
_authorSubject?: string
|
|
314
|
-
_creator?: string
|
|
315
|
-
_creatorSubject?: string
|
|
316
|
-
_pattern?: string
|
|
312
|
+
_author?: string;
|
|
313
|
+
_authorSubject?: string;
|
|
314
|
+
_creator?: string;
|
|
315
|
+
_creatorSubject?: string;
|
|
316
|
+
_pattern?: string;
|
|
317
317
|
_patternDataResources?: {
|
|
318
318
|
[key: string]: {
|
|
319
319
|
type: string;
|
|
320
|
-
isPatternParameter?: boolean
|
|
321
|
-
ignorePatternParameterDefault?: boolean
|
|
322
|
-
optionalPatternParameter?: boolean
|
|
320
|
+
isPatternParameter?: boolean;
|
|
321
|
+
ignorePatternParameterDefault?: boolean;
|
|
322
|
+
optionalPatternParameter?: boolean;
|
|
323
323
|
variables?: {
|
|
324
324
|
[key: string]: string;
|
|
325
|
-
}
|
|
325
|
+
};
|
|
326
326
|
};
|
|
327
|
-
}
|
|
327
|
+
};
|
|
328
328
|
_dataResources?: {
|
|
329
329
|
[key: string]: {
|
|
330
330
|
type: string;
|
|
331
|
-
isPatternParameter?: boolean
|
|
332
|
-
ignorePatternParameterDefault?: boolean
|
|
333
|
-
optionalPatternParameter?: boolean
|
|
331
|
+
isPatternParameter?: boolean;
|
|
332
|
+
ignorePatternParameterDefault?: boolean;
|
|
333
|
+
optionalPatternParameter?: boolean;
|
|
334
334
|
variables?: {
|
|
335
335
|
[key: string]: string;
|
|
336
|
-
}
|
|
336
|
+
};
|
|
337
337
|
};
|
|
338
|
-
}
|
|
339
|
-
_patternError?: "NOTFOUND" | "CYCLIC"
|
|
338
|
+
};
|
|
339
|
+
_patternError?: "NOTFOUND" | "CYCLIC";
|
|
340
340
|
_overrides?: {
|
|
341
341
|
[key: string]: {
|
|
342
342
|
parameters?: {
|
|
@@ -346,57 +346,57 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
|
|
|
346
346
|
connectedData?: {
|
|
347
347
|
pointer: string;
|
|
348
348
|
syntax: "jptr";
|
|
349
|
-
failureAction?: "
|
|
350
|
-
failureLogLevel?: "
|
|
351
|
-
failureDefault?: string
|
|
352
|
-
}
|
|
349
|
+
failureAction?: "t" | "p" | "c" | "a";
|
|
350
|
+
failureLogLevel?: "e" | "w" | "i";
|
|
351
|
+
failureDefault?: string;
|
|
352
|
+
};
|
|
353
353
|
locales?: {
|
|
354
354
|
[key: string]: unknown;
|
|
355
|
-
}
|
|
355
|
+
};
|
|
356
356
|
conditions?: {
|
|
357
357
|
when: {
|
|
358
|
-
op?: "&" | "|"
|
|
359
|
-
clauses: (
|
|
358
|
+
op?: "&" | "|";
|
|
359
|
+
clauses: ({
|
|
360
360
|
rule: string;
|
|
361
|
-
source?: string
|
|
361
|
+
source?: string;
|
|
362
362
|
op: string;
|
|
363
363
|
value: string | string[];
|
|
364
|
-
})[];
|
|
364
|
+
} | any)[];
|
|
365
365
|
};
|
|
366
366
|
value: unknown;
|
|
367
367
|
id: number;
|
|
368
|
-
}[]
|
|
368
|
+
}[];
|
|
369
369
|
localesConditions?: {
|
|
370
370
|
[key: string]: {
|
|
371
371
|
when: {
|
|
372
|
-
op?: "&" | "|"
|
|
373
|
-
clauses: (
|
|
372
|
+
op?: "&" | "|";
|
|
373
|
+
clauses: ({
|
|
374
374
|
rule: string;
|
|
375
|
-
source?: string
|
|
375
|
+
source?: string;
|
|
376
376
|
op: string;
|
|
377
377
|
value: string | string[];
|
|
378
|
-
})[];
|
|
378
|
+
} | any)[];
|
|
379
379
|
};
|
|
380
380
|
value: unknown;
|
|
381
381
|
id: number;
|
|
382
382
|
}[];
|
|
383
|
-
}
|
|
383
|
+
};
|
|
384
384
|
};
|
|
385
|
-
}
|
|
385
|
+
};
|
|
386
386
|
slots?: {
|
|
387
387
|
[key: string]: any[];
|
|
388
|
-
}
|
|
389
|
-
variant?: string
|
|
388
|
+
};
|
|
389
|
+
variant?: string;
|
|
390
390
|
};
|
|
391
|
-
}
|
|
391
|
+
};
|
|
392
392
|
_overridability?: {
|
|
393
393
|
parameters?: {
|
|
394
394
|
[key: string]: "yes" | "no";
|
|
395
|
-
}
|
|
396
|
-
variants?: boolean
|
|
397
|
-
hideLockedParameters?: boolean
|
|
398
|
-
}
|
|
399
|
-
_locales?: string[]
|
|
395
|
+
};
|
|
396
|
+
variants?: boolean;
|
|
397
|
+
hideLockedParameters?: boolean;
|
|
398
|
+
};
|
|
399
|
+
_locales?: string[];
|
|
400
400
|
} | undefined;
|
|
401
401
|
isContextualEditing: boolean;
|
|
402
402
|
};
|
|
@@ -469,6 +469,14 @@ type UniformRichTextProps = {
|
|
|
469
469
|
* for rendering a rich text node
|
|
470
470
|
*/
|
|
471
471
|
resolveRichTextRenderer?: RenderRichTextComponentResolver;
|
|
472
|
+
/**
|
|
473
|
+
* Sets the value to show in Canvas editor when the parameter value is empty.
|
|
474
|
+
* Can be a static string, or a function to generate the placeholder out of parameter info.
|
|
475
|
+
* @default undefined
|
|
476
|
+
*/
|
|
477
|
+
placeholder?: string | ((parameter: {
|
|
478
|
+
id: string;
|
|
479
|
+
}) => string | undefined);
|
|
472
480
|
} & Omit<React$1.HTMLAttributes<HTMLDivElement>, 'children'>;
|
|
473
481
|
/**
|
|
474
482
|
* Adds rendering support for Uniform Rich Text parameters
|
|
@@ -478,14 +486,22 @@ declare const UniformRichText: React$1.ForwardRefExoticComponent<{
|
|
|
478
486
|
* The name of the HTML tag to render.
|
|
479
487
|
* @default "div"
|
|
480
488
|
*/
|
|
481
|
-
as?: React$1.ElementType
|
|
489
|
+
as?: React$1.ElementType;
|
|
482
490
|
/** The ID of the parameter. */
|
|
483
491
|
parameterId: string;
|
|
484
492
|
/**
|
|
485
493
|
* A function which can provide a custom react component
|
|
486
494
|
* for rendering a rich text node
|
|
487
495
|
*/
|
|
488
|
-
resolveRichTextRenderer?: RenderRichTextComponentResolver
|
|
496
|
+
resolveRichTextRenderer?: RenderRichTextComponentResolver;
|
|
497
|
+
/**
|
|
498
|
+
* Sets the value to show in Canvas editor when the parameter value is empty.
|
|
499
|
+
* Can be a static string, or a function to generate the placeholder out of parameter info.
|
|
500
|
+
* @default undefined
|
|
501
|
+
*/
|
|
502
|
+
placeholder?: string | ((parameter: {
|
|
503
|
+
id: string;
|
|
504
|
+
}) => string | undefined);
|
|
489
505
|
} & Omit<React$1.HTMLAttributes<HTMLDivElement>, "children"> & React$1.RefAttributes<unknown>>;
|
|
490
506
|
|
|
491
507
|
type UniformRichTextNodeProps = {
|
|
@@ -593,7 +609,7 @@ declare const useUniformContextualEditingState: ({ global, }?: UseUniformContext
|
|
|
593
609
|
declare const componentStore: ComponentStore;
|
|
594
610
|
declare const registerUniformComponent: ({ type, variantId, component, }: {
|
|
595
611
|
type: string;
|
|
596
|
-
variantId?: string
|
|
612
|
+
variantId?: string;
|
|
597
613
|
component: React.ComponentType<ComponentProps<any>>;
|
|
598
614
|
}) => void;
|
|
599
615
|
declare const componentStoreResolver: RenderComponentResolver;
|