@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 CHANGED
@@ -110,64 +110,64 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
110
110
  connectedData?: {
111
111
  pointer: string;
112
112
  syntax: "jptr";
113
- failureAction?: "a" | "p" | "t" | "c" | undefined;
114
- failureLogLevel?: "i" | "e" | "w" | undefined;
115
- failureDefault?: string | undefined;
116
- } | undefined;
113
+ failureAction?: "t" | "p" | "c" | "a";
114
+ failureLogLevel?: "e" | "w" | "i";
115
+ failureDefault?: string;
116
+ };
117
117
  locales?: {
118
118
  [key: string]: unknown;
119
- } | undefined;
119
+ };
120
120
  conditions?: {
121
121
  when: {
122
- op?: "&" | "|" | undefined;
123
- clauses: (any | {
122
+ op?: "&" | "|";
123
+ clauses: ({
124
124
  rule: string;
125
- source?: string | undefined;
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
- }[] | undefined;
132
+ }[];
133
133
  localesConditions?: {
134
134
  [key: string]: {
135
135
  when: {
136
- op?: "&" | "|" | undefined;
137
- clauses: (any | {
136
+ op?: "&" | "|";
137
+ clauses: ({
138
138
  rule: string;
139
- source?: string | undefined;
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
- } | undefined;
147
+ };
148
148
  };
149
- } | undefined;
150
- variant?: string | undefined;
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 | undefined;
156
+ isSearchHit?: boolean;
157
157
  queryStrings?: {
158
158
  name: string;
159
- value?: string | undefined;
160
- helpText?: string | undefined;
161
- }[] | undefined;
162
- previewValue?: string | undefined;
163
- } | undefined;
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
- } | undefined;
170
- }[] | undefined;
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?: "a" | "p" | "t" | "c" | undefined;
182
- failureLogLevel?: "i" | "e" | "w" | undefined;
183
- failureDefault?: string | undefined;
184
- } | undefined;
181
+ failureAction?: "t" | "p" | "c" | "a";
182
+ failureLogLevel?: "e" | "w" | "i";
183
+ failureDefault?: string;
184
+ };
185
185
  locales?: {
186
186
  [key: string]: unknown;
187
- } | undefined;
187
+ };
188
188
  conditions?: {
189
189
  when: {
190
- op?: "&" | "|" | undefined;
191
- clauses: (any | {
190
+ op?: "&" | "|";
191
+ clauses: ({
192
192
  rule: string;
193
- source?: string | undefined;
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
- }[] | undefined;
200
+ }[];
201
201
  localesConditions?: {
202
202
  [key: string]: {
203
203
  when: {
204
- op?: "&" | "|" | undefined;
205
- clauses: (any | {
204
+ op?: "&" | "|";
205
+ clauses: ({
206
206
  rule: string;
207
- source?: string | undefined;
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
- } | undefined;
215
+ };
216
216
  };
217
- } | undefined;
218
- variant?: string | undefined;
217
+ };
218
+ variant?: string;
219
219
  slots?: {
220
220
  [key: string]: any[];
221
- } | undefined;
222
- _id?: string | undefined;
223
- _pattern?: string | undefined;
221
+ };
222
+ _id?: string;
223
+ _pattern?: string;
224
224
  _dataResources?: {
225
225
  [key: string]: {
226
226
  type: string;
227
- isPatternParameter?: boolean | undefined;
228
- ignorePatternParameterDefault?: boolean | undefined;
229
- optionalPatternParameter?: boolean | undefined;
227
+ isPatternParameter?: boolean;
228
+ ignorePatternParameterDefault?: boolean;
229
+ optionalPatternParameter?: boolean;
230
230
  variables?: {
231
231
  [key: string]: string;
232
- } | undefined;
232
+ };
233
233
  };
234
- } | undefined;
234
+ };
235
235
  _patternDataResources?: {
236
236
  [key: string]: {
237
237
  type: string;
238
- isPatternParameter?: boolean | undefined;
239
- ignorePatternParameterDefault?: boolean | undefined;
240
- optionalPatternParameter?: boolean | undefined;
238
+ isPatternParameter?: boolean;
239
+ ignorePatternParameterDefault?: boolean;
240
+ optionalPatternParameter?: boolean;
241
241
  variables?: {
242
242
  [key: string]: string;
243
- } | undefined;
243
+ };
244
244
  };
245
- } | undefined;
246
- _patternError?: "NOTFOUND" | "CYCLIC" | undefined;
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?: "a" | "p" | "t" | "c" | undefined;
257
- failureLogLevel?: "i" | "e" | "w" | undefined;
258
- failureDefault?: string | undefined;
259
- } | undefined;
256
+ failureAction?: "t" | "p" | "c" | "a";
257
+ failureLogLevel?: "e" | "w" | "i";
258
+ failureDefault?: string;
259
+ };
260
260
  locales?: {
261
261
  [key: string]: unknown;
262
- } | undefined;
262
+ };
263
263
  conditions?: {
264
264
  when: {
265
- op?: "&" | "|" | undefined;
266
- clauses: (any | {
265
+ op?: "&" | "|";
266
+ clauses: ({
267
267
  rule: string;
268
- source?: string | undefined;
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
- }[] | undefined;
275
+ }[];
276
276
  localesConditions?: {
277
277
  [key: string]: {
278
278
  when: {
279
- op?: "&" | "|" | undefined;
280
- clauses: (any | {
279
+ op?: "&" | "|";
280
+ clauses: ({
281
281
  rule: string;
282
- source?: string | undefined;
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
- } | undefined;
290
+ };
291
291
  };
292
- } | undefined;
292
+ };
293
293
  slots?: {
294
294
  [key: string]: any[];
295
- } | undefined;
296
- variant?: string | undefined;
295
+ };
296
+ variant?: string;
297
297
  };
298
- } | undefined;
298
+ };
299
299
  _overridability?: {
300
300
  parameters?: {
301
301
  [key: string]: "yes" | "no";
302
- } | undefined;
303
- variants?: boolean | undefined;
304
- hideLockedParameters?: boolean | undefined;
305
- } | undefined;
306
- _locales?: string[] | undefined;
302
+ };
303
+ variants?: boolean;
304
+ hideLockedParameters?: boolean;
305
+ };
306
+ _locales?: string[];
307
307
  }[];
308
- } | undefined;
308
+ };
309
309
  _id: string;
310
- _slug?: string | null | undefined;
310
+ _slug?: string | null;
311
311
  _name: string;
312
- _author?: string | undefined;
313
- _authorSubject?: string | undefined;
314
- _creator?: string | undefined;
315
- _creatorSubject?: string | undefined;
316
- _pattern?: string | undefined;
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 | undefined;
321
- ignorePatternParameterDefault?: boolean | undefined;
322
- optionalPatternParameter?: boolean | undefined;
320
+ isPatternParameter?: boolean;
321
+ ignorePatternParameterDefault?: boolean;
322
+ optionalPatternParameter?: boolean;
323
323
  variables?: {
324
324
  [key: string]: string;
325
- } | undefined;
325
+ };
326
326
  };
327
- } | undefined;
327
+ };
328
328
  _dataResources?: {
329
329
  [key: string]: {
330
330
  type: string;
331
- isPatternParameter?: boolean | undefined;
332
- ignorePatternParameterDefault?: boolean | undefined;
333
- optionalPatternParameter?: boolean | undefined;
331
+ isPatternParameter?: boolean;
332
+ ignorePatternParameterDefault?: boolean;
333
+ optionalPatternParameter?: boolean;
334
334
  variables?: {
335
335
  [key: string]: string;
336
- } | undefined;
336
+ };
337
337
  };
338
- } | undefined;
339
- _patternError?: "NOTFOUND" | "CYCLIC" | undefined;
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?: "a" | "p" | "t" | "c" | undefined;
350
- failureLogLevel?: "i" | "e" | "w" | undefined;
351
- failureDefault?: string | undefined;
352
- } | undefined;
349
+ failureAction?: "t" | "p" | "c" | "a";
350
+ failureLogLevel?: "e" | "w" | "i";
351
+ failureDefault?: string;
352
+ };
353
353
  locales?: {
354
354
  [key: string]: unknown;
355
- } | undefined;
355
+ };
356
356
  conditions?: {
357
357
  when: {
358
- op?: "&" | "|" | undefined;
359
- clauses: (any | {
358
+ op?: "&" | "|";
359
+ clauses: ({
360
360
  rule: string;
361
- source?: string | undefined;
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
- }[] | undefined;
368
+ }[];
369
369
  localesConditions?: {
370
370
  [key: string]: {
371
371
  when: {
372
- op?: "&" | "|" | undefined;
373
- clauses: (any | {
372
+ op?: "&" | "|";
373
+ clauses: ({
374
374
  rule: string;
375
- source?: string | undefined;
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
- } | undefined;
383
+ };
384
384
  };
385
- } | undefined;
385
+ };
386
386
  slots?: {
387
387
  [key: string]: any[];
388
- } | undefined;
389
- variant?: string | undefined;
388
+ };
389
+ variant?: string;
390
390
  };
391
- } | undefined;
391
+ };
392
392
  _overridability?: {
393
393
  parameters?: {
394
394
  [key: string]: "yes" | "no";
395
- } | undefined;
396
- variants?: boolean | undefined;
397
- hideLockedParameters?: boolean | undefined;
398
- } | undefined;
399
- _locales?: string[] | undefined;
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<any> | undefined;
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 | undefined;
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 | undefined;
612
+ variantId?: string;
597
613
  component: React.ComponentType<ComponentProps<any>>;
598
614
  }) => void;
599
615
  declare const componentStoreResolver: RenderComponentResolver;