@portabletext/editor 1.48.8 → 1.48.9
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/lib/_chunks-cjs/editor-provider.cjs +38 -38
- package/lib/_chunks-cjs/editor-provider.cjs.map +1 -1
- package/lib/_chunks-cjs/selector.get-focus-inline-object.cjs +2 -2
- package/lib/_chunks-cjs/selector.get-focus-inline-object.cjs.map +1 -1
- package/lib/_chunks-cjs/selector.is-overlapping-selection.cjs +3 -23
- package/lib/_chunks-cjs/selector.is-overlapping-selection.cjs.map +1 -1
- package/lib/_chunks-es/editor-provider.js +2 -1
- package/lib/_chunks-es/editor-provider.js.map +1 -1
- package/lib/_chunks-es/selector.get-focus-inline-object.js +2 -1
- package/lib/_chunks-es/selector.get-focus-inline-object.js.map +1 -1
- package/lib/_chunks-es/selector.is-overlapping-selection.js +1 -20
- package/lib/_chunks-es/selector.is-overlapping-selection.js.map +1 -1
- package/lib/behaviors/index.d.cts +228 -2529
- package/lib/behaviors/index.d.ts +228 -2529
- package/lib/index.d.cts +26 -2325
- package/lib/index.d.ts +26 -2325
- package/lib/plugins/index.d.cts +16 -2316
- package/lib/plugins/index.d.ts +16 -2316
- package/lib/selectors/index.cjs +2 -2
- package/lib/selectors/index.cjs.map +1 -1
- package/lib/selectors/index.d.cts +22 -2319
- package/lib/selectors/index.d.ts +22 -2319
- package/lib/selectors/index.js +2 -1
- package/lib/selectors/index.js.map +1 -1
- package/lib/utils/index.d.cts +21 -2321
- package/lib/utils/index.d.ts +21 -2321
- package/package.json +2 -1
package/lib/behaviors/index.d.ts
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
import type {Patch} from '@portabletext/patches'
|
|
2
|
-
import {
|
|
2
|
+
import type {
|
|
3
|
+
ArraySchemaType,
|
|
4
|
+
BlockDecoratorDefinition,
|
|
5
|
+
BlockListDefinition,
|
|
6
|
+
BlockStyleDefinition,
|
|
7
|
+
ObjectSchemaType,
|
|
8
|
+
Path,
|
|
9
|
+
PortableTextChild,
|
|
10
|
+
PortableTextListBlock,
|
|
11
|
+
PortableTextObject,
|
|
12
|
+
PortableTextSpan,
|
|
13
|
+
PortableTextTextBlock,
|
|
14
|
+
} from '@sanity/types'
|
|
3
15
|
import {KeyedSegment, PortableTextBlock} from '@sanity/types'
|
|
4
|
-
import {ComponentType, ElementType, ReactNode} from 'react'
|
|
5
16
|
import type {
|
|
6
17
|
FocusEvent as FocusEvent_2,
|
|
7
18
|
KeyboardEvent as KeyboardEvent_2,
|
|
@@ -94,7 +105,7 @@ declare type AbstractBehaviorEvent =
|
|
|
94
105
|
'deserialization.success'
|
|
95
106
|
>
|
|
96
107
|
mimeType: MIMEType_2
|
|
97
|
-
data: Array<
|
|
108
|
+
data: Array<PortableTextBlock>
|
|
98
109
|
originEvent:
|
|
99
110
|
| PickFromUnion_2<
|
|
100
111
|
NativeBehaviorEvent,
|
|
@@ -163,11 +174,11 @@ declare type AbstractBehaviorEvent =
|
|
|
163
174
|
}
|
|
164
175
|
| {
|
|
165
176
|
type: StrictExtract_2<SyntheticBehaviorEventType, 'move.block down'>
|
|
166
|
-
at: [
|
|
177
|
+
at: [KeyedSegment]
|
|
167
178
|
}
|
|
168
179
|
| {
|
|
169
180
|
type: StrictExtract_2<SyntheticBehaviorEventType, 'move.block up'>
|
|
170
|
-
at: [
|
|
181
|
+
at: [KeyedSegment]
|
|
171
182
|
}
|
|
172
183
|
| {
|
|
173
184
|
type: StrictExtract_2<SyntheticBehaviorEventType, 'select.previous block'>
|
|
@@ -222,277 +233,6 @@ declare const abstractBehaviorEventTypes: readonly [
|
|
|
222
233
|
'style.toggle',
|
|
223
234
|
]
|
|
224
235
|
|
|
225
|
-
/**
|
|
226
|
-
* Types of array actions that can be performed
|
|
227
|
-
* @beta
|
|
228
|
-
*/
|
|
229
|
-
declare type ArrayActionName =
|
|
230
|
-
/**
|
|
231
|
-
* Add any item to the array at any position
|
|
232
|
-
*/
|
|
233
|
-
| 'add'
|
|
234
|
-
/**
|
|
235
|
-
* Add item after an existing item
|
|
236
|
-
*/
|
|
237
|
-
| 'addBefore'
|
|
238
|
-
/**
|
|
239
|
-
* Add item after an existing item
|
|
240
|
-
*/
|
|
241
|
-
| 'addAfter'
|
|
242
|
-
/**
|
|
243
|
-
* Remove any item
|
|
244
|
-
*/
|
|
245
|
-
| 'remove'
|
|
246
|
-
/**
|
|
247
|
-
* Duplicate item
|
|
248
|
-
*/
|
|
249
|
-
| 'duplicate'
|
|
250
|
-
/**
|
|
251
|
-
* Copy item
|
|
252
|
-
*/
|
|
253
|
-
| 'copy'
|
|
254
|
-
|
|
255
|
-
/** @public */
|
|
256
|
-
declare interface ArrayDefinition extends BaseSchemaDefinition {
|
|
257
|
-
type: 'array'
|
|
258
|
-
of: ArrayOfType[]
|
|
259
|
-
initialValue?: InitialValueProperty<any, unknown[]>
|
|
260
|
-
validation?: ValidationBuilder<ArrayRule<unknown[]>, unknown[]>
|
|
261
|
-
options?: ArrayOptions
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
/** @public */
|
|
265
|
-
declare type ArrayOfEntry<T> = Omit<T, 'name' | 'hidden'> & {
|
|
266
|
-
name?: string
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
/** @public */
|
|
270
|
-
declare type ArrayOfType<
|
|
271
|
-
TType extends IntrinsicTypeName = IntrinsicTypeName,
|
|
272
|
-
TAlias extends IntrinsicTypeName | undefined = undefined,
|
|
273
|
-
> =
|
|
274
|
-
| IntrinsicArrayOfDefinition[TType]
|
|
275
|
-
| ArrayOfEntry<TypeAliasDefinition<string, TAlias>>
|
|
276
|
-
|
|
277
|
-
/** @public */
|
|
278
|
-
declare interface ArrayOptions<V = unknown>
|
|
279
|
-
extends SearchConfiguration,
|
|
280
|
-
BaseSchemaTypeOptions {
|
|
281
|
-
list?: TitledListValue<V>[] | V[]
|
|
282
|
-
layout?: 'list' | 'tags' | 'grid'
|
|
283
|
-
/** @deprecated This option does not have any effect anymore */
|
|
284
|
-
direction?: 'horizontal' | 'vertical'
|
|
285
|
-
sortable?: boolean
|
|
286
|
-
modal?: {
|
|
287
|
-
type?: 'dialog' | 'popover'
|
|
288
|
-
width?: number | 'auto'
|
|
289
|
-
}
|
|
290
|
-
/** @alpha This API may change */
|
|
291
|
-
insertMenu?: InsertMenuOptions
|
|
292
|
-
/**
|
|
293
|
-
* A boolean flag to enable or disable tree editing for the array.
|
|
294
|
-
* If there are any nested arrays, they will inherit this value.
|
|
295
|
-
* @deprecated tree editing beta feature has been disabled
|
|
296
|
-
*/
|
|
297
|
-
treeEditing?: boolean
|
|
298
|
-
/**
|
|
299
|
-
* A list of array actions to disable
|
|
300
|
-
* Possible options are defined by {@link ArrayActionName}
|
|
301
|
-
* @beta
|
|
302
|
-
*/
|
|
303
|
-
disableActions?: ArrayActionName[]
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
/** @public */
|
|
307
|
-
declare interface ArrayRule<Value> extends RuleDef<ArrayRule<Value>, Value> {
|
|
308
|
-
min: (length: number | FieldReference) => ArrayRule<Value>
|
|
309
|
-
max: (length: number | FieldReference) => ArrayRule<Value>
|
|
310
|
-
length: (length: number | FieldReference) => ArrayRule<Value>
|
|
311
|
-
unique: () => ArrayRule<Value>
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
/** @public */
|
|
315
|
-
declare interface ArraySchemaType<V = unknown> extends BaseSchemaType {
|
|
316
|
-
jsonType: 'array'
|
|
317
|
-
of: (Exclude<SchemaType, ArraySchemaType> | ReferenceSchemaType)[]
|
|
318
|
-
options?: ArrayOptions<V> & {
|
|
319
|
-
layout?: V extends string ? 'tag' : 'grid'
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
/** @public */
|
|
324
|
-
declare interface Asset extends SanityDocument {
|
|
325
|
-
url: string
|
|
326
|
-
path: string
|
|
327
|
-
assetId: string
|
|
328
|
-
extension: string
|
|
329
|
-
mimeType: string
|
|
330
|
-
sha1hash: string
|
|
331
|
-
size: number
|
|
332
|
-
originalFilename?: string
|
|
333
|
-
label?: string
|
|
334
|
-
title?: string
|
|
335
|
-
description?: string
|
|
336
|
-
creditLine?: string
|
|
337
|
-
source?: AssetSourceSpec
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
/** @public */
|
|
341
|
-
declare type AssetFromSource = {
|
|
342
|
-
kind: 'assetDocumentId' | 'file' | 'base64' | 'url'
|
|
343
|
-
value: string | File_2
|
|
344
|
-
assetDocumentProps?: ImageAsset
|
|
345
|
-
mediaLibraryProps?: {
|
|
346
|
-
mediaLibraryId: string
|
|
347
|
-
assetId: string
|
|
348
|
-
assetInstanceId: string
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
/** @public */
|
|
353
|
-
declare interface AssetSource {
|
|
354
|
-
name: string
|
|
355
|
-
/** @deprecated provide `i18nKey` instead */
|
|
356
|
-
title?: string
|
|
357
|
-
i18nKey?: string
|
|
358
|
-
component: ComponentType<AssetSourceComponentProps>
|
|
359
|
-
icon?: ComponentType<EmptyProps>
|
|
360
|
-
/** @beta */
|
|
361
|
-
uploader?: AssetSourceUploader
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
/** @public */
|
|
365
|
-
declare interface AssetSourceComponentProps {
|
|
366
|
-
action?: 'select' | 'upload'
|
|
367
|
-
assetSource: AssetSource
|
|
368
|
-
assetType?: 'file' | 'image'
|
|
369
|
-
accept: string
|
|
370
|
-
selectionType: 'single'
|
|
371
|
-
dialogHeaderTitle?: React.ReactNode
|
|
372
|
-
selectedAssets: Asset[]
|
|
373
|
-
onClose: () => void
|
|
374
|
-
onSelect: (assetFromSource: AssetFromSource[]) => void
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
/** @public */
|
|
378
|
-
declare interface AssetSourceSpec {
|
|
379
|
-
id: string
|
|
380
|
-
name: string
|
|
381
|
-
url?: string
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
/** @beta */
|
|
385
|
-
declare interface AssetSourceUploader {
|
|
386
|
-
upload(
|
|
387
|
-
files: globalThis.File[],
|
|
388
|
-
options?: {
|
|
389
|
-
/**
|
|
390
|
-
* The schema type of the field the asset is being uploaded to.
|
|
391
|
-
* May be of interest to the uploader to read file and image options.
|
|
392
|
-
*/
|
|
393
|
-
schemaType?: SchemaType
|
|
394
|
-
/**
|
|
395
|
-
* The uploader may send patches directly to the field
|
|
396
|
-
* Typed 'unknown' as we don't have patch definitions in sanity/types yet.
|
|
397
|
-
*/
|
|
398
|
-
onChange?: (patch: unknown) => void
|
|
399
|
-
},
|
|
400
|
-
): AssetSourceUploadFile[]
|
|
401
|
-
/**
|
|
402
|
-
* Abort the upload of a file
|
|
403
|
-
*/
|
|
404
|
-
abort(file?: AssetSourceUploadFile): void
|
|
405
|
-
/**
|
|
406
|
-
* Get the files that are currently being uploaded
|
|
407
|
-
*/
|
|
408
|
-
getFiles(): AssetSourceUploadFile[]
|
|
409
|
-
/**
|
|
410
|
-
* Subscribe to upload events from the uploader
|
|
411
|
-
*/
|
|
412
|
-
subscribe(subscriber: (event: AssetSourceUploadEvent) => void): () => void
|
|
413
|
-
/**
|
|
414
|
-
* Update the status of a file. Will be emitted to subscribers.
|
|
415
|
-
*/
|
|
416
|
-
updateFile(
|
|
417
|
-
fileId: string,
|
|
418
|
-
data: {
|
|
419
|
-
progress?: number
|
|
420
|
-
status?: string
|
|
421
|
-
error?: Error
|
|
422
|
-
},
|
|
423
|
-
): void
|
|
424
|
-
/**
|
|
425
|
-
* Reset the uploader (clear files). Should be called by the uploader when all files are done.
|
|
426
|
-
*/
|
|
427
|
-
reset(): void
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
/** @beta */
|
|
431
|
-
declare type AssetSourceUploadEvent =
|
|
432
|
-
| AssetSourceUploadEventProgress
|
|
433
|
-
| AssetSourceUploadEventStatus
|
|
434
|
-
| AssetSourceUploadEventAllComplete
|
|
435
|
-
| AssetSourceUploadEventError
|
|
436
|
-
| AssetSourceUploadEventAbort
|
|
437
|
-
|
|
438
|
-
/**
|
|
439
|
-
* Emitted when all files are done, either successfully, aborted or with errors
|
|
440
|
-
* @beta */
|
|
441
|
-
declare type AssetSourceUploadEventAbort = {
|
|
442
|
-
type: 'abort'
|
|
443
|
-
/**
|
|
444
|
-
* Files aborted
|
|
445
|
-
*/
|
|
446
|
-
files: AssetSourceUploadFile[]
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
/**
|
|
450
|
-
* Emitted when all files are done, either successfully, aborted or with errors
|
|
451
|
-
* @beta */
|
|
452
|
-
declare type AssetSourceUploadEventAllComplete = {
|
|
453
|
-
type: 'all-complete'
|
|
454
|
-
files: AssetSourceUploadFile[]
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
/**
|
|
458
|
-
* Emitted when all files are done, either successfully, aborted or with errors
|
|
459
|
-
* @beta */
|
|
460
|
-
declare type AssetSourceUploadEventError = {
|
|
461
|
-
type: 'error'
|
|
462
|
-
/**
|
|
463
|
-
* Files errored
|
|
464
|
-
*/
|
|
465
|
-
files: AssetSourceUploadFile[]
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
/**
|
|
469
|
-
* Emitted when a file upload is progressing
|
|
470
|
-
* @beta */
|
|
471
|
-
declare type AssetSourceUploadEventProgress = {
|
|
472
|
-
type: 'progress'
|
|
473
|
-
file: AssetSourceUploadFile
|
|
474
|
-
progress: number
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
/**
|
|
478
|
-
* Emitted when a file upload is changing status
|
|
479
|
-
* @beta */
|
|
480
|
-
declare type AssetSourceUploadEventStatus = {
|
|
481
|
-
type: 'status'
|
|
482
|
-
file: AssetSourceUploadFile
|
|
483
|
-
status: AssetSourceUploadFile['status']
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
/** @beta */
|
|
487
|
-
declare interface AssetSourceUploadFile {
|
|
488
|
-
id: string
|
|
489
|
-
file: globalThis.File
|
|
490
|
-
progress: number
|
|
491
|
-
status: 'pending' | 'uploading' | 'complete' | 'error' | 'aborted'
|
|
492
|
-
error?: Error
|
|
493
|
-
result?: unknown
|
|
494
|
-
}
|
|
495
|
-
|
|
496
236
|
/**
|
|
497
237
|
* @public
|
|
498
238
|
*/
|
|
@@ -501,60 +241,6 @@ declare type BaseDefinition = {
|
|
|
501
241
|
title?: string
|
|
502
242
|
}
|
|
503
243
|
|
|
504
|
-
/** @public */
|
|
505
|
-
declare interface BaseSchemaDefinition {
|
|
506
|
-
name: string
|
|
507
|
-
title?: string
|
|
508
|
-
description?: string | React.JSX.Element
|
|
509
|
-
hidden?: ConditionalProperty
|
|
510
|
-
readOnly?: ConditionalProperty
|
|
511
|
-
icon?: ComponentType | ReactNode
|
|
512
|
-
validation?: unknown
|
|
513
|
-
initialValue?: unknown
|
|
514
|
-
deprecated?: DeprecatedProperty
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
/** @public */
|
|
518
|
-
declare interface BaseSchemaType extends Partial<DeprecationConfiguration> {
|
|
519
|
-
name: string
|
|
520
|
-
title?: string
|
|
521
|
-
description?: string
|
|
522
|
-
type?: SchemaType
|
|
523
|
-
liveEdit?: boolean
|
|
524
|
-
readOnly?: ConditionalProperty
|
|
525
|
-
hidden?: ConditionalProperty
|
|
526
|
-
icon?: ComponentType
|
|
527
|
-
initialValue?: InitialValueProperty<any, any>
|
|
528
|
-
validation?: SchemaValidationValue
|
|
529
|
-
preview?: PreviewConfig
|
|
530
|
-
/** @beta */
|
|
531
|
-
components?: {
|
|
532
|
-
block?: ComponentType<any>
|
|
533
|
-
inlineBlock?: ComponentType<any>
|
|
534
|
-
annotation?: ComponentType<any>
|
|
535
|
-
diff?: ComponentType<any>
|
|
536
|
-
field?: ComponentType<any>
|
|
537
|
-
input?: ComponentType<any>
|
|
538
|
-
item?: ComponentType<any>
|
|
539
|
-
preview?: ComponentType<any>
|
|
540
|
-
}
|
|
541
|
-
/**
|
|
542
|
-
* @deprecated This will be removed.
|
|
543
|
-
*/
|
|
544
|
-
placeholder?: string
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
/**
|
|
548
|
-
* `BaseOptions` applies to all type options.
|
|
549
|
-
*
|
|
550
|
-
* It can be extended by interface declaration merging in plugins to provide generic options to all types and fields.
|
|
551
|
-
*
|
|
552
|
-
* @public
|
|
553
|
-
* */
|
|
554
|
-
declare interface BaseSchemaTypeOptions {
|
|
555
|
-
sanityCreate?: SanityCreateOptions
|
|
556
|
-
}
|
|
557
|
-
|
|
558
244
|
/**
|
|
559
245
|
* @beta
|
|
560
246
|
*/
|
|
@@ -640,252 +326,18 @@ export declare type BehaviorGuard<TBehaviorEvent, TGuardResponse> = (payload: {
|
|
|
640
326
|
event: TBehaviorEvent
|
|
641
327
|
}) => TGuardResponse | false
|
|
642
328
|
|
|
643
|
-
/**
|
|
644
|
-
* Schema definition for text block decorators.
|
|
645
|
-
*
|
|
646
|
-
* @public
|
|
647
|
-
* @example The default set of decorators
|
|
648
|
-
* ```ts
|
|
649
|
-
* {
|
|
650
|
-
* name: 'blockContent',
|
|
651
|
-
* title: 'Content',
|
|
652
|
-
* type: 'array',
|
|
653
|
-
* of: [
|
|
654
|
-
* {
|
|
655
|
-
* type: 'block',
|
|
656
|
-
* marks: {
|
|
657
|
-
* decorators: [
|
|
658
|
-
* {title: 'Strong', value: 'strong'},
|
|
659
|
-
* {title: 'Emphasis', value: 'em'},
|
|
660
|
-
* {title: 'Underline', value: 'underline'},
|
|
661
|
-
* {title: 'Strike', value: 'strike'},
|
|
662
|
-
* {title: 'Code', value: 'code'},
|
|
663
|
-
* ]
|
|
664
|
-
* }
|
|
665
|
-
* }
|
|
666
|
-
* ]
|
|
667
|
-
* }
|
|
668
|
-
* ```
|
|
669
|
-
*/
|
|
670
|
-
declare interface BlockDecoratorDefinition {
|
|
671
|
-
title: string
|
|
672
|
-
i18nTitleKey?: string
|
|
673
|
-
value: string
|
|
674
|
-
icon?: ReactNode | ComponentType
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
/**
|
|
678
|
-
* Schema definition for text blocks.
|
|
679
|
-
*
|
|
680
|
-
* @public
|
|
681
|
-
* @example the default block definition
|
|
682
|
-
* ```ts
|
|
683
|
-
* {
|
|
684
|
-
* name: 'blockContent',
|
|
685
|
-
* title: 'Content',
|
|
686
|
-
* type: 'array',
|
|
687
|
-
* of: [
|
|
688
|
-
* {
|
|
689
|
-
* type: 'block',
|
|
690
|
-
* marks: {
|
|
691
|
-
* decorators: [
|
|
692
|
-
* {title: 'Strong', value: 'strong'},
|
|
693
|
-
* {title: 'Emphasis', value: 'em'},
|
|
694
|
-
* {title: 'Underline', value: 'underline'},
|
|
695
|
-
* {title: 'Strike', value: 'strike'},
|
|
696
|
-
* {title: 'Code', value: 'code'},
|
|
697
|
-
* ],
|
|
698
|
-
* annotations: [
|
|
699
|
-
* {
|
|
700
|
-
* type: 'object',
|
|
701
|
-
* name: 'link',
|
|
702
|
-
* fields: [
|
|
703
|
-
* {
|
|
704
|
-
* type: 'string',
|
|
705
|
-
* name: 'href',
|
|
706
|
-
* },
|
|
707
|
-
* ],
|
|
708
|
-
* },
|
|
709
|
-
* ]
|
|
710
|
-
* },
|
|
711
|
-
* styles: [
|
|
712
|
-
* {title: 'Normal', value: 'normal'},
|
|
713
|
-
* {title: 'H1', value: 'h1'},
|
|
714
|
-
* {title: 'H2', value: 'h2'},
|
|
715
|
-
* {title: 'H3', value: 'h3'},
|
|
716
|
-
* {title: 'H4', value: 'h4'},
|
|
717
|
-
* {title: 'H5', value: 'h5'},
|
|
718
|
-
* {title: 'H6', value: 'h6'},
|
|
719
|
-
* {title: 'Quote', value: 'blockquote'}
|
|
720
|
-
* ],
|
|
721
|
-
* lists: [
|
|
722
|
-
* {title: 'Bullet', value: 'bullet'},
|
|
723
|
-
* {title: 'Number', value: 'number'},
|
|
724
|
-
* ],
|
|
725
|
-
* },
|
|
726
|
-
* ]
|
|
727
|
-
* }
|
|
728
|
-
* ```
|
|
729
|
-
*/
|
|
730
|
-
declare interface BlockDefinition extends BaseSchemaDefinition {
|
|
731
|
-
type: 'block'
|
|
732
|
-
styles?: BlockStyleDefinition[]
|
|
733
|
-
lists?: BlockListDefinition[]
|
|
734
|
-
marks?: BlockMarksDefinition
|
|
735
|
-
of?: ArrayOfType<'object' | 'reference'>[]
|
|
736
|
-
initialValue?: InitialValueProperty<any, any[]>
|
|
737
|
-
options?: BlockOptions
|
|
738
|
-
validation?: ValidationBuilder<BlockRule, any[]>
|
|
739
|
-
}
|
|
740
|
-
|
|
741
|
-
/**
|
|
742
|
-
* Schema definition for a text block list style.
|
|
743
|
-
*
|
|
744
|
-
* @public
|
|
745
|
-
* @example The defaults lists
|
|
746
|
-
* ```ts
|
|
747
|
-
* {
|
|
748
|
-
* name: 'blockContent',
|
|
749
|
-
* title: 'Content',
|
|
750
|
-
* type: 'array',
|
|
751
|
-
* of: [
|
|
752
|
-
* {
|
|
753
|
-
* type: 'block',
|
|
754
|
-
* lists: [
|
|
755
|
-
* {title: 'Bullet', value: 'bullet'},
|
|
756
|
-
* {title: 'Number', value: 'number'},
|
|
757
|
-
* ]
|
|
758
|
-
* }
|
|
759
|
-
* ]
|
|
760
|
-
* }
|
|
761
|
-
* ```
|
|
762
|
-
*/
|
|
763
|
-
declare interface BlockListDefinition {
|
|
764
|
-
title: string
|
|
765
|
-
i18nTitleKey?: string
|
|
766
|
-
value: string
|
|
767
|
-
icon?: ReactNode | ComponentType
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
/**
|
|
771
|
-
* Schema definition for text block marks (decorators and annotations).
|
|
772
|
-
*
|
|
773
|
-
* @public */
|
|
774
|
-
declare interface BlockMarksDefinition {
|
|
775
|
-
decorators?: BlockDecoratorDefinition[]
|
|
776
|
-
annotations?: ArrayOfType<'object' | 'reference'>[]
|
|
777
|
-
}
|
|
778
|
-
|
|
779
329
|
/**
|
|
780
330
|
* @beta
|
|
781
331
|
*/
|
|
782
332
|
declare type BlockOffset_2 = {
|
|
783
|
-
path: [
|
|
333
|
+
path: [KeyedSegment]
|
|
784
334
|
offset: number
|
|
785
335
|
}
|
|
786
336
|
|
|
787
|
-
/**
|
|
788
|
-
* Schema options for a Block schema definition
|
|
789
|
-
* @public */
|
|
790
|
-
declare interface BlockOptions extends BaseSchemaTypeOptions {
|
|
791
|
-
/**
|
|
792
|
-
* Turn on or off the builtin browser spellchecking. Default is on.
|
|
793
|
-
*/
|
|
794
|
-
spellCheck?: boolean
|
|
795
|
-
unstable_whitespaceOnPasteMode?: 'preserve' | 'normalize' | 'remove'
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
/** @public */
|
|
799
|
-
declare interface BlockRule extends RuleDef<BlockRule, any[]> {}
|
|
800
|
-
|
|
801
|
-
/**
|
|
802
|
-
* Schema definition for a text block style.
|
|
803
|
-
* A text block may have a block style like 'header', 'normal', 'lead'
|
|
804
|
-
* attached to it, which is stored on the `.style` property for that block.
|
|
805
|
-
*
|
|
806
|
-
* @public
|
|
807
|
-
* @remarks The first defined style will become the default style.´´
|
|
808
|
-
* @example The default set of styles
|
|
809
|
-
* ```ts
|
|
810
|
-
* {
|
|
811
|
-
* name: 'blockContent',
|
|
812
|
-
* title: 'Content',
|
|
813
|
-
* type: 'array',
|
|
814
|
-
* of: [
|
|
815
|
-
* {
|
|
816
|
-
* type: 'block',
|
|
817
|
-
* styles: [
|
|
818
|
-
* {title: 'Normal', value: 'normal'},
|
|
819
|
-
* {title: 'H1', value: 'h1'},
|
|
820
|
-
* {title: 'H2', value: 'h2'},
|
|
821
|
-
* {title: 'H3', value: 'h3'},
|
|
822
|
-
* {title: 'H4', value: 'h4'},
|
|
823
|
-
* {title: 'H5', value: 'h5'},
|
|
824
|
-
* {title: 'H6', value: 'h6'},
|
|
825
|
-
* {title: 'Quote', value: 'blockquote'}
|
|
826
|
-
* ]
|
|
827
|
-
* }
|
|
828
|
-
* ]
|
|
829
|
-
* }
|
|
830
|
-
* ```
|
|
831
|
-
* @example Example of defining a block type with custom styles and render components.
|
|
832
|
-
* ```ts
|
|
833
|
-
* defineArrayMember({
|
|
834
|
-
* type: 'block',
|
|
835
|
-
* styles: [
|
|
836
|
-
* {
|
|
837
|
-
* title: 'Paragraph',
|
|
838
|
-
* value: 'paragraph',
|
|
839
|
-
* component: ParagraphStyle,
|
|
840
|
-
* },
|
|
841
|
-
* {
|
|
842
|
-
* title: 'Lead',
|
|
843
|
-
* value: 'lead',
|
|
844
|
-
* component: LeadStyle,
|
|
845
|
-
* },
|
|
846
|
-
* {
|
|
847
|
-
* title: 'Heading',
|
|
848
|
-
* value: 'heading',
|
|
849
|
-
* component: HeadingStyle,
|
|
850
|
-
* },
|
|
851
|
-
* ],
|
|
852
|
-
* })
|
|
853
|
-
* ```
|
|
854
|
-
*/
|
|
855
|
-
declare interface BlockStyleDefinition {
|
|
856
|
-
title: string
|
|
857
|
-
value: string
|
|
858
|
-
i18nTitleKey?: string
|
|
859
|
-
icon?: ReactNode | ComponentType
|
|
860
|
-
}
|
|
861
|
-
|
|
862
337
|
declare type BlockWithOptionalKey_2 =
|
|
863
338
|
| TextBlockWithOptionalKey
|
|
864
339
|
| ObjectBlockWithOptionalKey
|
|
865
340
|
|
|
866
|
-
/** @public */
|
|
867
|
-
declare interface BooleanDefinition extends BaseSchemaDefinition {
|
|
868
|
-
type: 'boolean'
|
|
869
|
-
options?: BooleanOptions
|
|
870
|
-
initialValue?: InitialValueProperty<any, boolean>
|
|
871
|
-
validation?: ValidationBuilder<BooleanRule, boolean>
|
|
872
|
-
}
|
|
873
|
-
|
|
874
|
-
/** @public */
|
|
875
|
-
declare interface BooleanOptions extends BaseSchemaTypeOptions {
|
|
876
|
-
layout?: 'switch' | 'checkbox'
|
|
877
|
-
}
|
|
878
|
-
|
|
879
|
-
/** @public */
|
|
880
|
-
declare interface BooleanRule extends RuleDef<BooleanRule, boolean> {}
|
|
881
|
-
|
|
882
|
-
/** @public */
|
|
883
|
-
declare interface BooleanSchemaType extends BaseSchemaType {
|
|
884
|
-
jsonType: 'boolean'
|
|
885
|
-
options?: BooleanOptions
|
|
886
|
-
initialValue?: InitialValueProperty<any, boolean>
|
|
887
|
-
}
|
|
888
|
-
|
|
889
341
|
declare type ClipboardBehaviorEvent =
|
|
890
342
|
| {
|
|
891
343
|
type: StrictExtract_2<NativeBehaviorEventType, 'clipboard.copy'>
|
|
@@ -917,35 +369,6 @@ export declare type CodeEditorBehaviorsConfig = {
|
|
|
917
369
|
moveBlockDownShortcut: string
|
|
918
370
|
}
|
|
919
371
|
|
|
920
|
-
/** @public */
|
|
921
|
-
declare interface CollapseOptions {
|
|
922
|
-
collapsed?: boolean
|
|
923
|
-
collapsible?: boolean
|
|
924
|
-
/**
|
|
925
|
-
* @deprecated Use `collapsible` instead
|
|
926
|
-
*/
|
|
927
|
-
collapsable?: boolean
|
|
928
|
-
}
|
|
929
|
-
|
|
930
|
-
/** @public */
|
|
931
|
-
declare type ConditionalProperty =
|
|
932
|
-
| boolean
|
|
933
|
-
| ConditionalPropertyCallback
|
|
934
|
-
| undefined
|
|
935
|
-
|
|
936
|
-
/** @public */
|
|
937
|
-
declare type ConditionalPropertyCallback = (
|
|
938
|
-
context: ConditionalPropertyCallbackContext,
|
|
939
|
-
) => boolean
|
|
940
|
-
|
|
941
|
-
/** @public */
|
|
942
|
-
declare interface ConditionalPropertyCallbackContext {
|
|
943
|
-
document: SanityDocument | undefined
|
|
944
|
-
parent: any
|
|
945
|
-
value: any
|
|
946
|
-
currentUser: Omit<CurrentUser, 'role'> | null
|
|
947
|
-
}
|
|
948
|
-
|
|
949
372
|
declare type Converter<TMIMEType extends MIMEType_2 = MIMEType_2> = {
|
|
950
373
|
mimeType: TMIMEType
|
|
951
374
|
serialize: Serializer<TMIMEType>
|
|
@@ -980,7 +403,7 @@ declare type ConverterEvent<TMIMEType extends MIMEType_2 = MIMEType_2> =
|
|
|
980
403
|
}
|
|
981
404
|
| {
|
|
982
405
|
type: 'deserialization.success'
|
|
983
|
-
data: Array<
|
|
406
|
+
data: Array<PortableTextBlock>
|
|
984
407
|
mimeType: TMIMEType
|
|
985
408
|
}
|
|
986
409
|
|
|
@@ -13744,46 +13167,6 @@ export declare function createMarkdownBehaviors(
|
|
|
13744
13167
|
| CustomBehaviorEvent_2<Record<string, unknown>, string, `custom.${string}`>
|
|
13745
13168
|
>[]
|
|
13746
13169
|
|
|
13747
|
-
/** @public */
|
|
13748
|
-
declare interface CrossDatasetReferenceDefinition extends BaseSchemaDefinition {
|
|
13749
|
-
type: 'crossDatasetReference'
|
|
13750
|
-
weak?: boolean
|
|
13751
|
-
to: {
|
|
13752
|
-
type: string
|
|
13753
|
-
title?: string
|
|
13754
|
-
icon?: ComponentType
|
|
13755
|
-
preview?: PreviewConfig
|
|
13756
|
-
/**
|
|
13757
|
-
* @deprecated Unused. Configuring search is no longer supported.
|
|
13758
|
-
*/
|
|
13759
|
-
__experimental_search?: {
|
|
13760
|
-
path: string | string[]
|
|
13761
|
-
weight?: number
|
|
13762
|
-
mapWith?: string
|
|
13763
|
-
}[]
|
|
13764
|
-
}[]
|
|
13765
|
-
dataset: string
|
|
13766
|
-
studioUrl?: (document: {id: string; type?: string}) => string | null
|
|
13767
|
-
tokenId?: string
|
|
13768
|
-
options?: ReferenceOptions
|
|
13769
|
-
/**
|
|
13770
|
-
* @deprecated Cross-project references are no longer supported, only cross-dataset
|
|
13771
|
-
*/
|
|
13772
|
-
projectId?: string
|
|
13773
|
-
}
|
|
13774
|
-
|
|
13775
|
-
/** @public */
|
|
13776
|
-
declare interface CurrentUser {
|
|
13777
|
-
id: string
|
|
13778
|
-
name: string
|
|
13779
|
-
email: string
|
|
13780
|
-
profileImage?: string
|
|
13781
|
-
provider?: string
|
|
13782
|
-
/** @deprecated use `roles` instead */
|
|
13783
|
-
role: string
|
|
13784
|
-
roles: Role[]
|
|
13785
|
-
}
|
|
13786
|
-
|
|
13787
13170
|
/**
|
|
13788
13171
|
* @beta
|
|
13789
13172
|
*/
|
|
@@ -13808,77 +13191,6 @@ declare type CustomBehaviorEventType<
|
|
|
13808
13191
|
TType extends string = '',
|
|
13809
13192
|
> = TType extends '' ? `${TNamespace}` : `${TNamespace}.${TType}`
|
|
13810
13193
|
|
|
13811
|
-
/** @public */
|
|
13812
|
-
declare interface CustomValidator<T = unknown> {
|
|
13813
|
-
(
|
|
13814
|
-
value: T,
|
|
13815
|
-
context: ValidationContext,
|
|
13816
|
-
): CustomValidatorResult | Promise<CustomValidatorResult>
|
|
13817
|
-
bypassConcurrencyLimit?: boolean
|
|
13818
|
-
}
|
|
13819
|
-
|
|
13820
|
-
/** @public */
|
|
13821
|
-
declare type CustomValidatorResult =
|
|
13822
|
-
| true
|
|
13823
|
-
| string
|
|
13824
|
-
| ValidationError
|
|
13825
|
-
| ValidationError[]
|
|
13826
|
-
| LocalizedValidationMessages
|
|
13827
|
-
|
|
13828
|
-
/** @public */
|
|
13829
|
-
declare interface DateDefinition extends BaseSchemaDefinition {
|
|
13830
|
-
type: 'date'
|
|
13831
|
-
options?: DateOptions
|
|
13832
|
-
placeholder?: string
|
|
13833
|
-
validation?: ValidationBuilder<DateRule, string>
|
|
13834
|
-
initialValue?: InitialValueProperty<any, string>
|
|
13835
|
-
}
|
|
13836
|
-
|
|
13837
|
-
/** @public */
|
|
13838
|
-
declare interface DateOptions extends BaseSchemaTypeOptions {
|
|
13839
|
-
dateFormat?: string
|
|
13840
|
-
}
|
|
13841
|
-
|
|
13842
|
-
/** @public */
|
|
13843
|
-
declare interface DateRule extends RuleDef<DateRule, string> {
|
|
13844
|
-
/**
|
|
13845
|
-
* @param minDate - Minimum date (inclusive). minDate should be in ISO 8601 format.
|
|
13846
|
-
*/
|
|
13847
|
-
min: (minDate: string | FieldReference) => DateRule
|
|
13848
|
-
/**
|
|
13849
|
-
* @param maxDate - Maximum date (inclusive). maxDate should be in ISO 8601 format.
|
|
13850
|
-
*/
|
|
13851
|
-
max: (maxDate: string | FieldReference) => DateRule
|
|
13852
|
-
}
|
|
13853
|
-
|
|
13854
|
-
/** @public */
|
|
13855
|
-
declare interface DatetimeDefinition extends BaseSchemaDefinition {
|
|
13856
|
-
type: 'datetime'
|
|
13857
|
-
options?: DatetimeOptions
|
|
13858
|
-
placeholder?: string
|
|
13859
|
-
validation?: ValidationBuilder<DatetimeRule, string>
|
|
13860
|
-
initialValue?: InitialValueProperty<any, string>
|
|
13861
|
-
}
|
|
13862
|
-
|
|
13863
|
-
/** @public */
|
|
13864
|
-
declare interface DatetimeOptions extends BaseSchemaTypeOptions {
|
|
13865
|
-
dateFormat?: string
|
|
13866
|
-
timeFormat?: string
|
|
13867
|
-
timeStep?: number
|
|
13868
|
-
}
|
|
13869
|
-
|
|
13870
|
-
/** @public */
|
|
13871
|
-
declare interface DatetimeRule extends RuleDef<DatetimeRule, string> {
|
|
13872
|
-
/**
|
|
13873
|
-
* @param minDate - Minimum date (inclusive). minDate should be in ISO 8601 format.
|
|
13874
|
-
*/
|
|
13875
|
-
min: (minDate: string | FieldReference) => DatetimeRule
|
|
13876
|
-
/**
|
|
13877
|
-
* @param maxDate - Maximum date (inclusive). maxDate should be in ISO 8601 format.
|
|
13878
|
-
*/
|
|
13879
|
-
max: (maxDate: string | FieldReference) => DatetimeRule
|
|
13880
|
-
}
|
|
13881
|
-
|
|
13882
13194
|
/**
|
|
13883
13195
|
* @beta
|
|
13884
13196
|
*
|
|
@@ -13908,18 +13220,6 @@ export declare function defineBehavior<
|
|
|
13908
13220
|
>,
|
|
13909
13221
|
): Behavior
|
|
13910
13222
|
|
|
13911
|
-
/** @public */
|
|
13912
|
-
declare interface DeprecatedProperty {
|
|
13913
|
-
reason: string
|
|
13914
|
-
}
|
|
13915
|
-
|
|
13916
|
-
/**
|
|
13917
|
-
* @public
|
|
13918
|
-
*/
|
|
13919
|
-
declare interface DeprecationConfiguration {
|
|
13920
|
-
deprecated: DeprecatedProperty
|
|
13921
|
-
}
|
|
13922
|
-
|
|
13923
13223
|
declare type Deserializer<TMIMEType extends MIMEType_2> = ({
|
|
13924
13224
|
snapshot,
|
|
13925
13225
|
event,
|
|
@@ -13932,40 +13232,6 @@ declare type Deserializer<TMIMEType extends MIMEType_2> = ({
|
|
|
13932
13232
|
'deserialization.success' | 'deserialization.failure'
|
|
13933
13233
|
>
|
|
13934
13234
|
|
|
13935
|
-
/** @public */
|
|
13936
|
-
declare interface DocumentDefinition extends Omit<ObjectDefinition, 'type'> {
|
|
13937
|
-
type: 'document'
|
|
13938
|
-
liveEdit?: boolean
|
|
13939
|
-
/** @beta */
|
|
13940
|
-
orderings?: SortOrdering[]
|
|
13941
|
-
options?: DocumentOptions
|
|
13942
|
-
validation?: ValidationBuilder<DocumentRule, SanityDocument>
|
|
13943
|
-
initialValue?: InitialValueProperty<any, Record<string, unknown>>
|
|
13944
|
-
/** @deprecated Unused. Use the new field-level search config. */
|
|
13945
|
-
__experimental_search?: {
|
|
13946
|
-
path: string
|
|
13947
|
-
weight: number
|
|
13948
|
-
mapWith?: string
|
|
13949
|
-
}[]
|
|
13950
|
-
/** @alpha */
|
|
13951
|
-
__experimental_omnisearch_visibility?: boolean
|
|
13952
|
-
/**
|
|
13953
|
-
* Determines whether the large preview title is displayed in the document pane form
|
|
13954
|
-
* @alpha
|
|
13955
|
-
* */
|
|
13956
|
-
__experimental_formPreviewTitle?: boolean
|
|
13957
|
-
}
|
|
13958
|
-
|
|
13959
|
-
/**
|
|
13960
|
-
* This exists only to allow for extensions using declaration-merging.
|
|
13961
|
-
*
|
|
13962
|
-
* @public
|
|
13963
|
-
*/
|
|
13964
|
-
declare interface DocumentOptions extends BaseSchemaTypeOptions {}
|
|
13965
|
-
|
|
13966
|
-
/** @public */
|
|
13967
|
-
declare interface DocumentRule extends RuleDef<DocumentRule, SanityDocument> {}
|
|
13968
|
-
|
|
13969
13235
|
declare type DragBehaviorEvent =
|
|
13970
13236
|
| {
|
|
13971
13237
|
type: StrictExtract_2<NativeBehaviorEventType, 'drag.dragstart'>
|
|
@@ -14041,16 +13307,16 @@ declare interface EditableAPI {
|
|
|
14041
13307
|
) => void
|
|
14042
13308
|
findByPath: (
|
|
14043
13309
|
path: Path,
|
|
14044
|
-
) => [
|
|
13310
|
+
) => [PortableTextBlock | PortableTextChild | undefined, Path | undefined]
|
|
14045
13311
|
findDOMNode: (
|
|
14046
|
-
element:
|
|
13312
|
+
element: PortableTextBlock | PortableTextChild,
|
|
14047
13313
|
) => DOMNode | undefined
|
|
14048
13314
|
focus: () => void
|
|
14049
|
-
focusBlock: () =>
|
|
13315
|
+
focusBlock: () => PortableTextBlock | undefined
|
|
14050
13316
|
focusChild: () => PortableTextChild | undefined
|
|
14051
13317
|
getSelection: () => EditorSelection_2
|
|
14052
|
-
getFragment: () =>
|
|
14053
|
-
getValue: () =>
|
|
13318
|
+
getFragment: () => PortableTextBlock[] | undefined
|
|
13319
|
+
getValue: () => PortableTextBlock[] | undefined
|
|
14054
13320
|
hasBlockStyle: (style: string) => boolean
|
|
14055
13321
|
hasListStyle: (listStyle: string) => boolean
|
|
14056
13322
|
insertBlock: <
|
|
@@ -14081,7 +13347,7 @@ declare interface EditableAPI {
|
|
|
14081
13347
|
selectionA: EditorSelection_2,
|
|
14082
13348
|
selectionB: EditorSelection_2,
|
|
14083
13349
|
) => boolean
|
|
14084
|
-
isVoid: (element:
|
|
13350
|
+
isVoid: (element: PortableTextBlock | PortableTextChild) => boolean
|
|
14085
13351
|
marks: () => string[]
|
|
14086
13352
|
redo: () => void
|
|
14087
13353
|
removeAnnotation: <
|
|
@@ -14118,7 +13384,7 @@ declare type EditorContext = {
|
|
|
14118
13384
|
readOnly: boolean
|
|
14119
13385
|
schema: EditorSchema
|
|
14120
13386
|
selection: EditorSelection_2
|
|
14121
|
-
value: Array<
|
|
13387
|
+
value: Array<PortableTextBlock>
|
|
14122
13388
|
}
|
|
14123
13389
|
|
|
14124
13390
|
/**
|
|
@@ -14135,7 +13401,7 @@ declare const editorMachine: StateMachine<
|
|
|
14135
13401
|
initialReadOnly: boolean
|
|
14136
13402
|
maxBlocks: number | undefined
|
|
14137
13403
|
selection: EditorSelection_2
|
|
14138
|
-
incomingValue: Array<
|
|
13404
|
+
incomingValue: Array<PortableTextBlock> | undefined
|
|
14139
13405
|
internalDrag?: {
|
|
14140
13406
|
ghost?: HTMLElement
|
|
14141
13407
|
origin: Pick<EventPosition_2, 'selection'>
|
|
@@ -14170,7 +13436,7 @@ declare const editorMachine: StateMachine<
|
|
|
14170
13436
|
}
|
|
14171
13437
|
| {
|
|
14172
13438
|
type: 'update value'
|
|
14173
|
-
value: Array<
|
|
13439
|
+
value: Array<PortableTextBlock> | undefined
|
|
14174
13440
|
}
|
|
14175
13441
|
| {
|
|
14176
13442
|
type: 'update maxBlocks'
|
|
@@ -14209,8 +13475,8 @@ declare const editorMachine: StateMachine<
|
|
|
14209
13475
|
| {
|
|
14210
13476
|
type: 'notify.mutation'
|
|
14211
13477
|
patches: Array<Patch>
|
|
14212
|
-
snapshot: Array<
|
|
14213
|
-
value: Array<
|
|
13478
|
+
snapshot: Array<PortableTextBlock> | undefined
|
|
13479
|
+
value: Array<PortableTextBlock> | undefined
|
|
14214
13480
|
}
|
|
14215
13481
|
| {
|
|
14216
13482
|
type: 'notify.blurred'
|
|
@@ -14235,7 +13501,7 @@ declare const editorMachine: StateMachine<
|
|
|
14235
13501
|
| {
|
|
14236
13502
|
type: 'notify.invalid value'
|
|
14237
13503
|
resolution: InvalidValueResolution | null
|
|
14238
|
-
value: Array<
|
|
13504
|
+
value: Array<PortableTextBlock> | undefined
|
|
14239
13505
|
}
|
|
14240
13506
|
| {
|
|
14241
13507
|
type: 'notify.loading'
|
|
@@ -14252,11 +13518,11 @@ declare const editorMachine: StateMachine<
|
|
|
14252
13518
|
}
|
|
14253
13519
|
| {
|
|
14254
13520
|
type: 'notify.value changed'
|
|
14255
|
-
value: Array<
|
|
13521
|
+
value: Array<PortableTextBlock> | undefined
|
|
14256
13522
|
}
|
|
14257
13523
|
| {
|
|
14258
13524
|
type: 'notify.unset'
|
|
14259
|
-
previousValue: Array<
|
|
13525
|
+
previousValue: Array<PortableTextBlock>
|
|
14260
13526
|
}
|
|
14261
13527
|
| {
|
|
14262
13528
|
type: 'dragstart'
|
|
@@ -14367,7 +13633,7 @@ declare const editorMachine: StateMachine<
|
|
|
14367
13633
|
maxBlocks?: number
|
|
14368
13634
|
readOnly?: boolean
|
|
14369
13635
|
schema: EditorSchema
|
|
14370
|
-
initialValue?: Array<
|
|
13636
|
+
initialValue?: Array<PortableTextBlock>
|
|
14371
13637
|
},
|
|
14372
13638
|
NonReducibleUnknown,
|
|
14373
13639
|
| PatchEvent
|
|
@@ -14397,7 +13663,7 @@ declare const editorMachine: StateMachine<
|
|
|
14397
13663
|
| {
|
|
14398
13664
|
type: 'invalid value'
|
|
14399
13665
|
resolution: InvalidValueResolution | null
|
|
14400
|
-
value: Array<
|
|
13666
|
+
value: Array<PortableTextBlock> | undefined
|
|
14401
13667
|
}
|
|
14402
13668
|
| {
|
|
14403
13669
|
type: 'loading'
|
|
@@ -14414,7 +13680,7 @@ declare const editorMachine: StateMachine<
|
|
|
14414
13680
|
}
|
|
14415
13681
|
| {
|
|
14416
13682
|
type: 'value changed'
|
|
14417
|
-
value: Array<
|
|
13683
|
+
value: Array<PortableTextBlock> | undefined
|
|
14418
13684
|
}
|
|
14419
13685
|
| UnsetEvent,
|
|
14420
13686
|
MetaObject,
|
|
@@ -14453,7 +13719,7 @@ declare const editorMachine: StateMachine<
|
|
|
14453
13719
|
maxBlocks?: number
|
|
14454
13720
|
readOnly?: boolean
|
|
14455
13721
|
schema: EditorSchema
|
|
14456
|
-
initialValue?: Array<
|
|
13722
|
+
initialValue?: Array<PortableTextBlock>
|
|
14457
13723
|
}
|
|
14458
13724
|
self: ActorRef<
|
|
14459
13725
|
MachineSnapshot<
|
|
@@ -14467,7 +13733,7 @@ declare const editorMachine: StateMachine<
|
|
|
14467
13733
|
initialReadOnly: boolean
|
|
14468
13734
|
maxBlocks: number | undefined
|
|
14469
13735
|
selection: EditorSelection_2
|
|
14470
|
-
incomingValue: Array<
|
|
13736
|
+
incomingValue: Array<PortableTextBlock> | undefined
|
|
14471
13737
|
internalDrag?: {
|
|
14472
13738
|
ghost?: HTMLElement
|
|
14473
13739
|
origin: Pick<EventPosition_2, 'selection'>
|
|
@@ -14502,7 +13768,7 @@ declare const editorMachine: StateMachine<
|
|
|
14502
13768
|
}
|
|
14503
13769
|
| {
|
|
14504
13770
|
type: 'update value'
|
|
14505
|
-
value: Array<
|
|
13771
|
+
value: Array<PortableTextBlock> | undefined
|
|
14506
13772
|
}
|
|
14507
13773
|
| {
|
|
14508
13774
|
type: 'update maxBlocks'
|
|
@@ -14541,8 +13807,8 @@ declare const editorMachine: StateMachine<
|
|
|
14541
13807
|
| {
|
|
14542
13808
|
type: 'notify.mutation'
|
|
14543
13809
|
patches: Array<Patch>
|
|
14544
|
-
snapshot: Array<
|
|
14545
|
-
value: Array<
|
|
13810
|
+
snapshot: Array<PortableTextBlock> | undefined
|
|
13811
|
+
value: Array<PortableTextBlock> | undefined
|
|
14546
13812
|
}
|
|
14547
13813
|
| {
|
|
14548
13814
|
type: 'notify.blurred'
|
|
@@ -14567,7 +13833,7 @@ declare const editorMachine: StateMachine<
|
|
|
14567
13833
|
| {
|
|
14568
13834
|
type: 'notify.invalid value'
|
|
14569
13835
|
resolution: InvalidValueResolution | null
|
|
14570
|
-
value: Array<
|
|
13836
|
+
value: Array<PortableTextBlock> | undefined
|
|
14571
13837
|
}
|
|
14572
13838
|
| {
|
|
14573
13839
|
type: 'notify.loading'
|
|
@@ -14584,11 +13850,11 @@ declare const editorMachine: StateMachine<
|
|
|
14584
13850
|
}
|
|
14585
13851
|
| {
|
|
14586
13852
|
type: 'notify.value changed'
|
|
14587
|
-
value: Array<
|
|
13853
|
+
value: Array<PortableTextBlock> | undefined
|
|
14588
13854
|
}
|
|
14589
13855
|
| {
|
|
14590
13856
|
type: 'notify.unset'
|
|
14591
|
-
previousValue: Array<
|
|
13857
|
+
previousValue: Array<PortableTextBlock>
|
|
14592
13858
|
}
|
|
14593
13859
|
| {
|
|
14594
13860
|
type: 'dragstart'
|
|
@@ -14636,7 +13902,7 @@ declare const editorMachine: StateMachine<
|
|
|
14636
13902
|
}
|
|
14637
13903
|
| {
|
|
14638
13904
|
type: 'update value'
|
|
14639
|
-
value: Array<
|
|
13905
|
+
value: Array<PortableTextBlock> | undefined
|
|
14640
13906
|
}
|
|
14641
13907
|
| {
|
|
14642
13908
|
type: 'update maxBlocks'
|
|
@@ -14675,8 +13941,8 @@ declare const editorMachine: StateMachine<
|
|
|
14675
13941
|
| {
|
|
14676
13942
|
type: 'notify.mutation'
|
|
14677
13943
|
patches: Array<Patch>
|
|
14678
|
-
snapshot: Array<
|
|
14679
|
-
value: Array<
|
|
13944
|
+
snapshot: Array<PortableTextBlock> | undefined
|
|
13945
|
+
value: Array<PortableTextBlock> | undefined
|
|
14680
13946
|
}
|
|
14681
13947
|
| {
|
|
14682
13948
|
type: 'notify.blurred'
|
|
@@ -14701,7 +13967,7 @@ declare const editorMachine: StateMachine<
|
|
|
14701
13967
|
| {
|
|
14702
13968
|
type: 'notify.invalid value'
|
|
14703
13969
|
resolution: InvalidValueResolution | null
|
|
14704
|
-
value: Array<
|
|
13970
|
+
value: Array<PortableTextBlock> | undefined
|
|
14705
13971
|
}
|
|
14706
13972
|
| {
|
|
14707
13973
|
type: 'notify.loading'
|
|
@@ -14718,11 +13984,11 @@ declare const editorMachine: StateMachine<
|
|
|
14718
13984
|
}
|
|
14719
13985
|
| {
|
|
14720
13986
|
type: 'notify.value changed'
|
|
14721
|
-
value: Array<
|
|
13987
|
+
value: Array<PortableTextBlock> | undefined
|
|
14722
13988
|
}
|
|
14723
13989
|
| {
|
|
14724
13990
|
type: 'notify.unset'
|
|
14725
|
-
previousValue: Array<
|
|
13991
|
+
previousValue: Array<PortableTextBlock>
|
|
14726
13992
|
}
|
|
14727
13993
|
| {
|
|
14728
13994
|
type: 'dragstart'
|
|
@@ -14747,7 +14013,7 @@ declare const editorMachine: StateMachine<
|
|
|
14747
14013
|
selection: null
|
|
14748
14014
|
initialReadOnly: boolean
|
|
14749
14015
|
maxBlocks: number | undefined
|
|
14750
|
-
incomingValue:
|
|
14016
|
+
incomingValue: PortableTextBlock[] | undefined
|
|
14751
14017
|
}
|
|
14752
14018
|
readonly on: {
|
|
14753
14019
|
readonly 'notify.blurred': {
|
|
@@ -14762,7 +14028,7 @@ declare const editorMachine: StateMachine<
|
|
|
14762
14028
|
initialReadOnly: boolean
|
|
14763
14029
|
maxBlocks: number | undefined
|
|
14764
14030
|
selection: EditorSelection_2
|
|
14765
|
-
incomingValue: Array<
|
|
14031
|
+
incomingValue: Array<PortableTextBlock> | undefined
|
|
14766
14032
|
internalDrag?: {
|
|
14767
14033
|
ghost?: HTMLElement
|
|
14768
14034
|
origin: Pick<EventPosition_2, 'selection'>
|
|
@@ -14801,7 +14067,7 @@ declare const editorMachine: StateMachine<
|
|
|
14801
14067
|
}
|
|
14802
14068
|
| {
|
|
14803
14069
|
type: 'update value'
|
|
14804
|
-
value: Array<
|
|
14070
|
+
value: Array<PortableTextBlock> | undefined
|
|
14805
14071
|
}
|
|
14806
14072
|
| {
|
|
14807
14073
|
type: 'update maxBlocks'
|
|
@@ -14840,8 +14106,8 @@ declare const editorMachine: StateMachine<
|
|
|
14840
14106
|
| {
|
|
14841
14107
|
type: 'notify.mutation'
|
|
14842
14108
|
patches: Array<Patch>
|
|
14843
|
-
snapshot: Array<
|
|
14844
|
-
value: Array<
|
|
14109
|
+
snapshot: Array<PortableTextBlock> | undefined
|
|
14110
|
+
value: Array<PortableTextBlock> | undefined
|
|
14845
14111
|
}
|
|
14846
14112
|
| {
|
|
14847
14113
|
type: 'notify.blurred'
|
|
@@ -14866,7 +14132,7 @@ declare const editorMachine: StateMachine<
|
|
|
14866
14132
|
| {
|
|
14867
14133
|
type: 'notify.invalid value'
|
|
14868
14134
|
resolution: InvalidValueResolution | null
|
|
14869
|
-
value: Array<
|
|
14135
|
+
value: Array<PortableTextBlock> | undefined
|
|
14870
14136
|
}
|
|
14871
14137
|
| {
|
|
14872
14138
|
type: 'notify.loading'
|
|
@@ -14883,11 +14149,11 @@ declare const editorMachine: StateMachine<
|
|
|
14883
14149
|
}
|
|
14884
14150
|
| {
|
|
14885
14151
|
type: 'notify.value changed'
|
|
14886
|
-
value: Array<
|
|
14152
|
+
value: Array<PortableTextBlock> | undefined
|
|
14887
14153
|
}
|
|
14888
14154
|
| {
|
|
14889
14155
|
type: 'notify.unset'
|
|
14890
|
-
previousValue: Array<
|
|
14156
|
+
previousValue: Array<PortableTextBlock>
|
|
14891
14157
|
}
|
|
14892
14158
|
| {
|
|
14893
14159
|
type: 'dragstart'
|
|
@@ -14932,7 +14198,7 @@ declare const editorMachine: StateMachine<
|
|
|
14932
14198
|
| {
|
|
14933
14199
|
type: 'invalid value'
|
|
14934
14200
|
resolution: InvalidValueResolution | null
|
|
14935
|
-
value: Array<
|
|
14201
|
+
value: Array<PortableTextBlock> | undefined
|
|
14936
14202
|
}
|
|
14937
14203
|
| {
|
|
14938
14204
|
type: 'loading'
|
|
@@ -14949,7 +14215,7 @@ declare const editorMachine: StateMachine<
|
|
|
14949
14215
|
}
|
|
14950
14216
|
| {
|
|
14951
14217
|
type: 'value changed'
|
|
14952
|
-
value: Array<
|
|
14218
|
+
value: Array<PortableTextBlock> | undefined
|
|
14953
14219
|
}
|
|
14954
14220
|
| UnsetEvent
|
|
14955
14221
|
>
|
|
@@ -14966,7 +14232,7 @@ declare const editorMachine: StateMachine<
|
|
|
14966
14232
|
initialReadOnly: boolean
|
|
14967
14233
|
maxBlocks: number | undefined
|
|
14968
14234
|
selection: EditorSelection_2
|
|
14969
|
-
incomingValue: Array<
|
|
14235
|
+
incomingValue: Array<PortableTextBlock> | undefined
|
|
14970
14236
|
internalDrag?: {
|
|
14971
14237
|
ghost?: HTMLElement
|
|
14972
14238
|
origin: Pick<EventPosition_2, 'selection'>
|
|
@@ -15004,7 +14270,7 @@ declare const editorMachine: StateMachine<
|
|
|
15004
14270
|
}
|
|
15005
14271
|
| {
|
|
15006
14272
|
type: 'update value'
|
|
15007
|
-
value: Array<
|
|
14273
|
+
value: Array<PortableTextBlock> | undefined
|
|
15008
14274
|
}
|
|
15009
14275
|
| {
|
|
15010
14276
|
type: 'update maxBlocks'
|
|
@@ -15043,8 +14309,8 @@ declare const editorMachine: StateMachine<
|
|
|
15043
14309
|
| {
|
|
15044
14310
|
type: 'notify.mutation'
|
|
15045
14311
|
patches: Array<Patch>
|
|
15046
|
-
snapshot: Array<
|
|
15047
|
-
value: Array<
|
|
14312
|
+
snapshot: Array<PortableTextBlock> | undefined
|
|
14313
|
+
value: Array<PortableTextBlock> | undefined
|
|
15048
14314
|
}
|
|
15049
14315
|
| {
|
|
15050
14316
|
type: 'notify.blurred'
|
|
@@ -15069,7 +14335,7 @@ declare const editorMachine: StateMachine<
|
|
|
15069
14335
|
| {
|
|
15070
14336
|
type: 'notify.invalid value'
|
|
15071
14337
|
resolution: InvalidValueResolution | null
|
|
15072
|
-
value: Array<
|
|
14338
|
+
value: Array<PortableTextBlock> | undefined
|
|
15073
14339
|
}
|
|
15074
14340
|
| {
|
|
15075
14341
|
type: 'notify.loading'
|
|
@@ -15086,11 +14352,11 @@ declare const editorMachine: StateMachine<
|
|
|
15086
14352
|
}
|
|
15087
14353
|
| {
|
|
15088
14354
|
type: 'notify.value changed'
|
|
15089
|
-
value: Array<
|
|
14355
|
+
value: Array<PortableTextBlock> | undefined
|
|
15090
14356
|
}
|
|
15091
14357
|
| {
|
|
15092
14358
|
type: 'notify.unset'
|
|
15093
|
-
previousValue: Array<
|
|
14359
|
+
previousValue: Array<PortableTextBlock>
|
|
15094
14360
|
}
|
|
15095
14361
|
| {
|
|
15096
14362
|
type: 'dragstart'
|
|
@@ -15135,7 +14401,7 @@ declare const editorMachine: StateMachine<
|
|
|
15135
14401
|
| {
|
|
15136
14402
|
type: 'invalid value'
|
|
15137
14403
|
resolution: InvalidValueResolution | null
|
|
15138
|
-
value: Array<
|
|
14404
|
+
value: Array<PortableTextBlock> | undefined
|
|
15139
14405
|
}
|
|
15140
14406
|
| {
|
|
15141
14407
|
type: 'loading'
|
|
@@ -15152,7 +14418,7 @@ declare const editorMachine: StateMachine<
|
|
|
15152
14418
|
}
|
|
15153
14419
|
| {
|
|
15154
14420
|
type: 'value changed'
|
|
15155
|
-
value: Array<
|
|
14421
|
+
value: Array<PortableTextBlock> | undefined
|
|
15156
14422
|
}
|
|
15157
14423
|
| UnsetEvent
|
|
15158
14424
|
>
|
|
@@ -15169,7 +14435,7 @@ declare const editorMachine: StateMachine<
|
|
|
15169
14435
|
initialReadOnly: boolean
|
|
15170
14436
|
maxBlocks: number | undefined
|
|
15171
14437
|
selection: EditorSelection_2
|
|
15172
|
-
incomingValue: Array<
|
|
14438
|
+
incomingValue: Array<PortableTextBlock> | undefined
|
|
15173
14439
|
internalDrag?: {
|
|
15174
14440
|
ghost?: HTMLElement
|
|
15175
14441
|
origin: Pick<EventPosition_2, 'selection'>
|
|
@@ -15210,7 +14476,7 @@ declare const editorMachine: StateMachine<
|
|
|
15210
14476
|
}
|
|
15211
14477
|
| {
|
|
15212
14478
|
type: 'update value'
|
|
15213
|
-
value: Array<
|
|
14479
|
+
value: Array<PortableTextBlock> | undefined
|
|
15214
14480
|
}
|
|
15215
14481
|
| {
|
|
15216
14482
|
type: 'update maxBlocks'
|
|
@@ -15249,8 +14515,8 @@ declare const editorMachine: StateMachine<
|
|
|
15249
14515
|
| {
|
|
15250
14516
|
type: 'notify.mutation'
|
|
15251
14517
|
patches: Array<Patch>
|
|
15252
|
-
snapshot: Array<
|
|
15253
|
-
value: Array<
|
|
14518
|
+
snapshot: Array<PortableTextBlock> | undefined
|
|
14519
|
+
value: Array<PortableTextBlock> | undefined
|
|
15254
14520
|
}
|
|
15255
14521
|
| {
|
|
15256
14522
|
type: 'notify.blurred'
|
|
@@ -15275,7 +14541,7 @@ declare const editorMachine: StateMachine<
|
|
|
15275
14541
|
| {
|
|
15276
14542
|
type: 'notify.invalid value'
|
|
15277
14543
|
resolution: InvalidValueResolution | null
|
|
15278
|
-
value: Array<
|
|
14544
|
+
value: Array<PortableTextBlock> | undefined
|
|
15279
14545
|
}
|
|
15280
14546
|
| {
|
|
15281
14547
|
type: 'notify.loading'
|
|
@@ -15292,11 +14558,11 @@ declare const editorMachine: StateMachine<
|
|
|
15292
14558
|
}
|
|
15293
14559
|
| {
|
|
15294
14560
|
type: 'notify.value changed'
|
|
15295
|
-
value: Array<
|
|
14561
|
+
value: Array<PortableTextBlock> | undefined
|
|
15296
14562
|
}
|
|
15297
14563
|
| {
|
|
15298
14564
|
type: 'notify.unset'
|
|
15299
|
-
previousValue: Array<
|
|
14565
|
+
previousValue: Array<PortableTextBlock>
|
|
15300
14566
|
}
|
|
15301
14567
|
| {
|
|
15302
14568
|
type: 'dragstart'
|
|
@@ -15341,7 +14607,7 @@ declare const editorMachine: StateMachine<
|
|
|
15341
14607
|
| {
|
|
15342
14608
|
type: 'invalid value'
|
|
15343
14609
|
resolution: InvalidValueResolution | null
|
|
15344
|
-
value: Array<
|
|
14610
|
+
value: Array<PortableTextBlock> | undefined
|
|
15345
14611
|
}
|
|
15346
14612
|
| {
|
|
15347
14613
|
type: 'loading'
|
|
@@ -15358,7 +14624,7 @@ declare const editorMachine: StateMachine<
|
|
|
15358
14624
|
}
|
|
15359
14625
|
| {
|
|
15360
14626
|
type: 'value changed'
|
|
15361
|
-
value: Array<
|
|
14627
|
+
value: Array<PortableTextBlock> | undefined
|
|
15362
14628
|
}
|
|
15363
14629
|
| UnsetEvent
|
|
15364
14630
|
>
|
|
@@ -15375,7 +14641,7 @@ declare const editorMachine: StateMachine<
|
|
|
15375
14641
|
initialReadOnly: boolean
|
|
15376
14642
|
maxBlocks: number | undefined
|
|
15377
14643
|
selection: EditorSelection_2
|
|
15378
|
-
incomingValue: Array<
|
|
14644
|
+
incomingValue: Array<PortableTextBlock> | undefined
|
|
15379
14645
|
internalDrag?: {
|
|
15380
14646
|
ghost?: HTMLElement
|
|
15381
14647
|
origin: Pick<EventPosition_2, 'selection'>
|
|
@@ -15385,7 +14651,7 @@ declare const editorMachine: StateMachine<
|
|
|
15385
14651
|
{
|
|
15386
14652
|
type: 'notify.invalid value'
|
|
15387
14653
|
resolution: InvalidValueResolution | null
|
|
15388
|
-
value: Array<
|
|
14654
|
+
value: Array<PortableTextBlock> | undefined
|
|
15389
14655
|
},
|
|
15390
14656
|
| InternalPatchEvent
|
|
15391
14657
|
| MutationEvent
|
|
@@ -15415,7 +14681,7 @@ declare const editorMachine: StateMachine<
|
|
|
15415
14681
|
}
|
|
15416
14682
|
| {
|
|
15417
14683
|
type: 'update value'
|
|
15418
|
-
value: Array<
|
|
14684
|
+
value: Array<PortableTextBlock> | undefined
|
|
15419
14685
|
}
|
|
15420
14686
|
| {
|
|
15421
14687
|
type: 'update maxBlocks'
|
|
@@ -15454,8 +14720,8 @@ declare const editorMachine: StateMachine<
|
|
|
15454
14720
|
| {
|
|
15455
14721
|
type: 'notify.mutation'
|
|
15456
14722
|
patches: Array<Patch>
|
|
15457
|
-
snapshot: Array<
|
|
15458
|
-
value: Array<
|
|
14723
|
+
snapshot: Array<PortableTextBlock> | undefined
|
|
14724
|
+
value: Array<PortableTextBlock> | undefined
|
|
15459
14725
|
}
|
|
15460
14726
|
| {
|
|
15461
14727
|
type: 'notify.blurred'
|
|
@@ -15480,7 +14746,7 @@ declare const editorMachine: StateMachine<
|
|
|
15480
14746
|
| {
|
|
15481
14747
|
type: 'notify.invalid value'
|
|
15482
14748
|
resolution: InvalidValueResolution | null
|
|
15483
|
-
value: Array<
|
|
14749
|
+
value: Array<PortableTextBlock> | undefined
|
|
15484
14750
|
}
|
|
15485
14751
|
| {
|
|
15486
14752
|
type: 'notify.loading'
|
|
@@ -15497,11 +14763,11 @@ declare const editorMachine: StateMachine<
|
|
|
15497
14763
|
}
|
|
15498
14764
|
| {
|
|
15499
14765
|
type: 'notify.value changed'
|
|
15500
|
-
value: Array<
|
|
14766
|
+
value: Array<PortableTextBlock> | undefined
|
|
15501
14767
|
}
|
|
15502
14768
|
| {
|
|
15503
14769
|
type: 'notify.unset'
|
|
15504
|
-
previousValue: Array<
|
|
14770
|
+
previousValue: Array<PortableTextBlock>
|
|
15505
14771
|
}
|
|
15506
14772
|
| {
|
|
15507
14773
|
type: 'dragstart'
|
|
@@ -15546,7 +14812,7 @@ declare const editorMachine: StateMachine<
|
|
|
15546
14812
|
| {
|
|
15547
14813
|
type: 'invalid value'
|
|
15548
14814
|
resolution: InvalidValueResolution | null
|
|
15549
|
-
value: Array<
|
|
14815
|
+
value: Array<PortableTextBlock> | undefined
|
|
15550
14816
|
}
|
|
15551
14817
|
| {
|
|
15552
14818
|
type: 'loading'
|
|
@@ -15563,7 +14829,7 @@ declare const editorMachine: StateMachine<
|
|
|
15563
14829
|
}
|
|
15564
14830
|
| {
|
|
15565
14831
|
type: 'value changed'
|
|
15566
|
-
value: Array<
|
|
14832
|
+
value: Array<PortableTextBlock> | undefined
|
|
15567
14833
|
}
|
|
15568
14834
|
| UnsetEvent
|
|
15569
14835
|
>
|
|
@@ -15580,7 +14846,7 @@ declare const editorMachine: StateMachine<
|
|
|
15580
14846
|
initialReadOnly: boolean
|
|
15581
14847
|
maxBlocks: number | undefined
|
|
15582
14848
|
selection: EditorSelection_2
|
|
15583
|
-
incomingValue: Array<
|
|
14849
|
+
incomingValue: Array<PortableTextBlock> | undefined
|
|
15584
14850
|
internalDrag?: {
|
|
15585
14851
|
ghost?: HTMLElement
|
|
15586
14852
|
origin: Pick<EventPosition_2, 'selection'>
|
|
@@ -15619,7 +14885,7 @@ declare const editorMachine: StateMachine<
|
|
|
15619
14885
|
}
|
|
15620
14886
|
| {
|
|
15621
14887
|
type: 'update value'
|
|
15622
|
-
value: Array<
|
|
14888
|
+
value: Array<PortableTextBlock> | undefined
|
|
15623
14889
|
}
|
|
15624
14890
|
| {
|
|
15625
14891
|
type: 'update maxBlocks'
|
|
@@ -15658,8 +14924,8 @@ declare const editorMachine: StateMachine<
|
|
|
15658
14924
|
| {
|
|
15659
14925
|
type: 'notify.mutation'
|
|
15660
14926
|
patches: Array<Patch>
|
|
15661
|
-
snapshot: Array<
|
|
15662
|
-
value: Array<
|
|
14927
|
+
snapshot: Array<PortableTextBlock> | undefined
|
|
14928
|
+
value: Array<PortableTextBlock> | undefined
|
|
15663
14929
|
}
|
|
15664
14930
|
| {
|
|
15665
14931
|
type: 'notify.blurred'
|
|
@@ -15684,7 +14950,7 @@ declare const editorMachine: StateMachine<
|
|
|
15684
14950
|
| {
|
|
15685
14951
|
type: 'notify.invalid value'
|
|
15686
14952
|
resolution: InvalidValueResolution | null
|
|
15687
|
-
value: Array<
|
|
14953
|
+
value: Array<PortableTextBlock> | undefined
|
|
15688
14954
|
}
|
|
15689
14955
|
| {
|
|
15690
14956
|
type: 'notify.loading'
|
|
@@ -15701,11 +14967,11 @@ declare const editorMachine: StateMachine<
|
|
|
15701
14967
|
}
|
|
15702
14968
|
| {
|
|
15703
14969
|
type: 'notify.value changed'
|
|
15704
|
-
value: Array<
|
|
14970
|
+
value: Array<PortableTextBlock> | undefined
|
|
15705
14971
|
}
|
|
15706
14972
|
| {
|
|
15707
14973
|
type: 'notify.unset'
|
|
15708
|
-
previousValue: Array<
|
|
14974
|
+
previousValue: Array<PortableTextBlock>
|
|
15709
14975
|
}
|
|
15710
14976
|
| {
|
|
15711
14977
|
type: 'dragstart'
|
|
@@ -15750,7 +15016,7 @@ declare const editorMachine: StateMachine<
|
|
|
15750
15016
|
| {
|
|
15751
15017
|
type: 'invalid value'
|
|
15752
15018
|
resolution: InvalidValueResolution | null
|
|
15753
|
-
value: Array<
|
|
15019
|
+
value: Array<PortableTextBlock> | undefined
|
|
15754
15020
|
}
|
|
15755
15021
|
| {
|
|
15756
15022
|
type: 'loading'
|
|
@@ -15767,7 +15033,7 @@ declare const editorMachine: StateMachine<
|
|
|
15767
15033
|
}
|
|
15768
15034
|
| {
|
|
15769
15035
|
type: 'value changed'
|
|
15770
|
-
value: Array<
|
|
15036
|
+
value: Array<PortableTextBlock> | undefined
|
|
15771
15037
|
}
|
|
15772
15038
|
| UnsetEvent
|
|
15773
15039
|
>
|
|
@@ -15785,7 +15051,7 @@ declare const editorMachine: StateMachine<
|
|
|
15785
15051
|
initialReadOnly: boolean
|
|
15786
15052
|
maxBlocks: number | undefined
|
|
15787
15053
|
selection: EditorSelection_2
|
|
15788
|
-
incomingValue: Array<
|
|
15054
|
+
incomingValue: Array<PortableTextBlock> | undefined
|
|
15789
15055
|
internalDrag?: {
|
|
15790
15056
|
ghost?: HTMLElement
|
|
15791
15057
|
origin: Pick<EventPosition_2, 'selection'>
|
|
@@ -15824,7 +15090,7 @@ declare const editorMachine: StateMachine<
|
|
|
15824
15090
|
}
|
|
15825
15091
|
| {
|
|
15826
15092
|
type: 'update value'
|
|
15827
|
-
value: Array<
|
|
15093
|
+
value: Array<PortableTextBlock> | undefined
|
|
15828
15094
|
}
|
|
15829
15095
|
| {
|
|
15830
15096
|
type: 'update maxBlocks'
|
|
@@ -15863,8 +15129,8 @@ declare const editorMachine: StateMachine<
|
|
|
15863
15129
|
| {
|
|
15864
15130
|
type: 'notify.mutation'
|
|
15865
15131
|
patches: Array<Patch>
|
|
15866
|
-
snapshot: Array<
|
|
15867
|
-
value: Array<
|
|
15132
|
+
snapshot: Array<PortableTextBlock> | undefined
|
|
15133
|
+
value: Array<PortableTextBlock> | undefined
|
|
15868
15134
|
}
|
|
15869
15135
|
| {
|
|
15870
15136
|
type: 'notify.blurred'
|
|
@@ -15889,7 +15155,7 @@ declare const editorMachine: StateMachine<
|
|
|
15889
15155
|
| {
|
|
15890
15156
|
type: 'notify.invalid value'
|
|
15891
15157
|
resolution: InvalidValueResolution | null
|
|
15892
|
-
value: Array<
|
|
15158
|
+
value: Array<PortableTextBlock> | undefined
|
|
15893
15159
|
}
|
|
15894
15160
|
| {
|
|
15895
15161
|
type: 'notify.loading'
|
|
@@ -15906,11 +15172,11 @@ declare const editorMachine: StateMachine<
|
|
|
15906
15172
|
}
|
|
15907
15173
|
| {
|
|
15908
15174
|
type: 'notify.value changed'
|
|
15909
|
-
value: Array<
|
|
15175
|
+
value: Array<PortableTextBlock> | undefined
|
|
15910
15176
|
}
|
|
15911
15177
|
| {
|
|
15912
15178
|
type: 'notify.unset'
|
|
15913
|
-
previousValue: Array<
|
|
15179
|
+
previousValue: Array<PortableTextBlock>
|
|
15914
15180
|
}
|
|
15915
15181
|
| {
|
|
15916
15182
|
type: 'dragstart'
|
|
@@ -15941,7 +15207,7 @@ declare const editorMachine: StateMachine<
|
|
|
15941
15207
|
initialReadOnly: boolean
|
|
15942
15208
|
maxBlocks: number | undefined
|
|
15943
15209
|
selection: EditorSelection_2
|
|
15944
|
-
incomingValue: Array<
|
|
15210
|
+
incomingValue: Array<PortableTextBlock> | undefined
|
|
15945
15211
|
internalDrag?: {
|
|
15946
15212
|
ghost?: HTMLElement
|
|
15947
15213
|
origin: Pick<EventPosition_2, 'selection'>
|
|
@@ -15980,7 +15246,7 @@ declare const editorMachine: StateMachine<
|
|
|
15980
15246
|
}
|
|
15981
15247
|
| {
|
|
15982
15248
|
type: 'update value'
|
|
15983
|
-
value: Array<
|
|
15249
|
+
value: Array<PortableTextBlock> | undefined
|
|
15984
15250
|
}
|
|
15985
15251
|
| {
|
|
15986
15252
|
type: 'update maxBlocks'
|
|
@@ -16019,8 +15285,8 @@ declare const editorMachine: StateMachine<
|
|
|
16019
15285
|
| {
|
|
16020
15286
|
type: 'notify.mutation'
|
|
16021
15287
|
patches: Array<Patch>
|
|
16022
|
-
snapshot: Array<
|
|
16023
|
-
value: Array<
|
|
15288
|
+
snapshot: Array<PortableTextBlock> | undefined
|
|
15289
|
+
value: Array<PortableTextBlock> | undefined
|
|
16024
15290
|
}
|
|
16025
15291
|
| {
|
|
16026
15292
|
type: 'notify.blurred'
|
|
@@ -16045,7 +15311,7 @@ declare const editorMachine: StateMachine<
|
|
|
16045
15311
|
| {
|
|
16046
15312
|
type: 'notify.invalid value'
|
|
16047
15313
|
resolution: InvalidValueResolution | null
|
|
16048
|
-
value: Array<
|
|
15314
|
+
value: Array<PortableTextBlock> | undefined
|
|
16049
15315
|
}
|
|
16050
15316
|
| {
|
|
16051
15317
|
type: 'notify.loading'
|
|
@@ -16062,11 +15328,11 @@ declare const editorMachine: StateMachine<
|
|
|
16062
15328
|
}
|
|
16063
15329
|
| {
|
|
16064
15330
|
type: 'notify.value changed'
|
|
16065
|
-
value: Array<
|
|
15331
|
+
value: Array<PortableTextBlock> | undefined
|
|
16066
15332
|
}
|
|
16067
15333
|
| {
|
|
16068
15334
|
type: 'notify.unset'
|
|
16069
|
-
previousValue: Array<
|
|
15335
|
+
previousValue: Array<PortableTextBlock>
|
|
16070
15336
|
}
|
|
16071
15337
|
| {
|
|
16072
15338
|
type: 'dragstart'
|
|
@@ -16111,7 +15377,7 @@ declare const editorMachine: StateMachine<
|
|
|
16111
15377
|
| {
|
|
16112
15378
|
type: 'invalid value'
|
|
16113
15379
|
resolution: InvalidValueResolution | null
|
|
16114
|
-
value: Array<
|
|
15380
|
+
value: Array<PortableTextBlock> | undefined
|
|
16115
15381
|
}
|
|
16116
15382
|
| {
|
|
16117
15383
|
type: 'loading'
|
|
@@ -16128,7 +15394,7 @@ declare const editorMachine: StateMachine<
|
|
|
16128
15394
|
}
|
|
16129
15395
|
| {
|
|
16130
15396
|
type: 'value changed'
|
|
16131
|
-
value: Array<
|
|
15397
|
+
value: Array<PortableTextBlock> | undefined
|
|
16132
15398
|
}
|
|
16133
15399
|
| UnsetEvent
|
|
16134
15400
|
>,
|
|
@@ -16146,7 +15412,7 @@ declare const editorMachine: StateMachine<
|
|
|
16146
15412
|
initialReadOnly: boolean
|
|
16147
15413
|
maxBlocks: number | undefined
|
|
16148
15414
|
selection: EditorSelection_2
|
|
16149
|
-
incomingValue: Array<
|
|
15415
|
+
incomingValue: Array<PortableTextBlock> | undefined
|
|
16150
15416
|
internalDrag?: {
|
|
16151
15417
|
ghost?: HTMLElement
|
|
16152
15418
|
origin: Pick<EventPosition_2, 'selection'>
|
|
@@ -16155,7 +15421,7 @@ declare const editorMachine: StateMachine<
|
|
|
16155
15421
|
},
|
|
16156
15422
|
{
|
|
16157
15423
|
type: 'notify.unset'
|
|
16158
|
-
previousValue: Array<
|
|
15424
|
+
previousValue: Array<PortableTextBlock>
|
|
16159
15425
|
},
|
|
16160
15426
|
| InternalPatchEvent
|
|
16161
15427
|
| MutationEvent
|
|
@@ -16185,7 +15451,7 @@ declare const editorMachine: StateMachine<
|
|
|
16185
15451
|
}
|
|
16186
15452
|
| {
|
|
16187
15453
|
type: 'update value'
|
|
16188
|
-
value: Array<
|
|
15454
|
+
value: Array<PortableTextBlock> | undefined
|
|
16189
15455
|
}
|
|
16190
15456
|
| {
|
|
16191
15457
|
type: 'update maxBlocks'
|
|
@@ -16224,8 +15490,8 @@ declare const editorMachine: StateMachine<
|
|
|
16224
15490
|
| {
|
|
16225
15491
|
type: 'notify.mutation'
|
|
16226
15492
|
patches: Array<Patch>
|
|
16227
|
-
snapshot: Array<
|
|
16228
|
-
value: Array<
|
|
15493
|
+
snapshot: Array<PortableTextBlock> | undefined
|
|
15494
|
+
value: Array<PortableTextBlock> | undefined
|
|
16229
15495
|
}
|
|
16230
15496
|
| {
|
|
16231
15497
|
type: 'notify.blurred'
|
|
@@ -16250,7 +15516,7 @@ declare const editorMachine: StateMachine<
|
|
|
16250
15516
|
| {
|
|
16251
15517
|
type: 'notify.invalid value'
|
|
16252
15518
|
resolution: InvalidValueResolution | null
|
|
16253
|
-
value: Array<
|
|
15519
|
+
value: Array<PortableTextBlock> | undefined
|
|
16254
15520
|
}
|
|
16255
15521
|
| {
|
|
16256
15522
|
type: 'notify.loading'
|
|
@@ -16267,11 +15533,11 @@ declare const editorMachine: StateMachine<
|
|
|
16267
15533
|
}
|
|
16268
15534
|
| {
|
|
16269
15535
|
type: 'notify.value changed'
|
|
16270
|
-
value: Array<
|
|
15536
|
+
value: Array<PortableTextBlock> | undefined
|
|
16271
15537
|
}
|
|
16272
15538
|
| {
|
|
16273
15539
|
type: 'notify.unset'
|
|
16274
|
-
previousValue: Array<
|
|
15540
|
+
previousValue: Array<PortableTextBlock>
|
|
16275
15541
|
}
|
|
16276
15542
|
| {
|
|
16277
15543
|
type: 'dragstart'
|
|
@@ -16316,7 +15582,7 @@ declare const editorMachine: StateMachine<
|
|
|
16316
15582
|
| {
|
|
16317
15583
|
type: 'invalid value'
|
|
16318
15584
|
resolution: InvalidValueResolution | null
|
|
16319
|
-
value: Array<
|
|
15585
|
+
value: Array<PortableTextBlock> | undefined
|
|
16320
15586
|
}
|
|
16321
15587
|
| {
|
|
16322
15588
|
type: 'loading'
|
|
@@ -16333,7 +15599,7 @@ declare const editorMachine: StateMachine<
|
|
|
16333
15599
|
}
|
|
16334
15600
|
| {
|
|
16335
15601
|
type: 'value changed'
|
|
16336
|
-
value: Array<
|
|
15602
|
+
value: Array<PortableTextBlock> | undefined
|
|
16337
15603
|
}
|
|
16338
15604
|
| UnsetEvent
|
|
16339
15605
|
>
|
|
@@ -16350,7 +15616,7 @@ declare const editorMachine: StateMachine<
|
|
|
16350
15616
|
initialReadOnly: boolean
|
|
16351
15617
|
maxBlocks: number | undefined
|
|
16352
15618
|
selection: EditorSelection_2
|
|
16353
|
-
incomingValue: Array<
|
|
15619
|
+
incomingValue: Array<PortableTextBlock> | undefined
|
|
16354
15620
|
internalDrag?: {
|
|
16355
15621
|
ghost?: HTMLElement
|
|
16356
15622
|
origin: Pick<EventPosition_2, 'selection'>
|
|
@@ -16388,7 +15654,7 @@ declare const editorMachine: StateMachine<
|
|
|
16388
15654
|
}
|
|
16389
15655
|
| {
|
|
16390
15656
|
type: 'update value'
|
|
16391
|
-
value: Array<
|
|
15657
|
+
value: Array<PortableTextBlock> | undefined
|
|
16392
15658
|
}
|
|
16393
15659
|
| {
|
|
16394
15660
|
type: 'update maxBlocks'
|
|
@@ -16427,8 +15693,8 @@ declare const editorMachine: StateMachine<
|
|
|
16427
15693
|
| {
|
|
16428
15694
|
type: 'notify.mutation'
|
|
16429
15695
|
patches: Array<Patch>
|
|
16430
|
-
snapshot: Array<
|
|
16431
|
-
value: Array<
|
|
15696
|
+
snapshot: Array<PortableTextBlock> | undefined
|
|
15697
|
+
value: Array<PortableTextBlock> | undefined
|
|
16432
15698
|
}
|
|
16433
15699
|
| {
|
|
16434
15700
|
type: 'notify.blurred'
|
|
@@ -16453,7 +15719,7 @@ declare const editorMachine: StateMachine<
|
|
|
16453
15719
|
| {
|
|
16454
15720
|
type: 'notify.invalid value'
|
|
16455
15721
|
resolution: InvalidValueResolution | null
|
|
16456
|
-
value: Array<
|
|
15722
|
+
value: Array<PortableTextBlock> | undefined
|
|
16457
15723
|
}
|
|
16458
15724
|
| {
|
|
16459
15725
|
type: 'notify.loading'
|
|
@@ -16470,11 +15736,11 @@ declare const editorMachine: StateMachine<
|
|
|
16470
15736
|
}
|
|
16471
15737
|
| {
|
|
16472
15738
|
type: 'notify.value changed'
|
|
16473
|
-
value: Array<
|
|
15739
|
+
value: Array<PortableTextBlock> | undefined
|
|
16474
15740
|
}
|
|
16475
15741
|
| {
|
|
16476
15742
|
type: 'notify.unset'
|
|
16477
|
-
previousValue: Array<
|
|
15743
|
+
previousValue: Array<PortableTextBlock>
|
|
16478
15744
|
}
|
|
16479
15745
|
| {
|
|
16480
15746
|
type: 'dragstart'
|
|
@@ -16519,7 +15785,7 @@ declare const editorMachine: StateMachine<
|
|
|
16519
15785
|
| {
|
|
16520
15786
|
type: 'invalid value'
|
|
16521
15787
|
resolution: InvalidValueResolution | null
|
|
16522
|
-
value: Array<
|
|
15788
|
+
value: Array<PortableTextBlock> | undefined
|
|
16523
15789
|
}
|
|
16524
15790
|
| {
|
|
16525
15791
|
type: 'loading'
|
|
@@ -16536,7 +15802,7 @@ declare const editorMachine: StateMachine<
|
|
|
16536
15802
|
}
|
|
16537
15803
|
| {
|
|
16538
15804
|
type: 'value changed'
|
|
16539
|
-
value: Array<
|
|
15805
|
+
value: Array<PortableTextBlock> | undefined
|
|
16540
15806
|
}
|
|
16541
15807
|
| UnsetEvent
|
|
16542
15808
|
>
|
|
@@ -16553,7 +15819,7 @@ declare const editorMachine: StateMachine<
|
|
|
16553
15819
|
initialReadOnly: boolean
|
|
16554
15820
|
maxBlocks: number | undefined
|
|
16555
15821
|
selection: EditorSelection_2
|
|
16556
|
-
incomingValue: Array<
|
|
15822
|
+
incomingValue: Array<PortableTextBlock> | undefined
|
|
16557
15823
|
internalDrag?: {
|
|
16558
15824
|
ghost?: HTMLElement
|
|
16559
15825
|
origin: Pick<EventPosition_2, 'selection'>
|
|
@@ -16562,7 +15828,7 @@ declare const editorMachine: StateMachine<
|
|
|
16562
15828
|
},
|
|
16563
15829
|
{
|
|
16564
15830
|
type: 'notify.value changed'
|
|
16565
|
-
value: Array<
|
|
15831
|
+
value: Array<PortableTextBlock> | undefined
|
|
16566
15832
|
},
|
|
16567
15833
|
| InternalPatchEvent
|
|
16568
15834
|
| MutationEvent
|
|
@@ -16592,7 +15858,7 @@ declare const editorMachine: StateMachine<
|
|
|
16592
15858
|
}
|
|
16593
15859
|
| {
|
|
16594
15860
|
type: 'update value'
|
|
16595
|
-
value: Array<
|
|
15861
|
+
value: Array<PortableTextBlock> | undefined
|
|
16596
15862
|
}
|
|
16597
15863
|
| {
|
|
16598
15864
|
type: 'update maxBlocks'
|
|
@@ -16631,8 +15897,8 @@ declare const editorMachine: StateMachine<
|
|
|
16631
15897
|
| {
|
|
16632
15898
|
type: 'notify.mutation'
|
|
16633
15899
|
patches: Array<Patch>
|
|
16634
|
-
snapshot: Array<
|
|
16635
|
-
value: Array<
|
|
15900
|
+
snapshot: Array<PortableTextBlock> | undefined
|
|
15901
|
+
value: Array<PortableTextBlock> | undefined
|
|
16636
15902
|
}
|
|
16637
15903
|
| {
|
|
16638
15904
|
type: 'notify.blurred'
|
|
@@ -16657,7 +15923,7 @@ declare const editorMachine: StateMachine<
|
|
|
16657
15923
|
| {
|
|
16658
15924
|
type: 'notify.invalid value'
|
|
16659
15925
|
resolution: InvalidValueResolution | null
|
|
16660
|
-
value: Array<
|
|
15926
|
+
value: Array<PortableTextBlock> | undefined
|
|
16661
15927
|
}
|
|
16662
15928
|
| {
|
|
16663
15929
|
type: 'notify.loading'
|
|
@@ -16674,11 +15940,11 @@ declare const editorMachine: StateMachine<
|
|
|
16674
15940
|
}
|
|
16675
15941
|
| {
|
|
16676
15942
|
type: 'notify.value changed'
|
|
16677
|
-
value: Array<
|
|
15943
|
+
value: Array<PortableTextBlock> | undefined
|
|
16678
15944
|
}
|
|
16679
15945
|
| {
|
|
16680
15946
|
type: 'notify.unset'
|
|
16681
|
-
previousValue: Array<
|
|
15947
|
+
previousValue: Array<PortableTextBlock>
|
|
16682
15948
|
}
|
|
16683
15949
|
| {
|
|
16684
15950
|
type: 'dragstart'
|
|
@@ -16723,7 +15989,7 @@ declare const editorMachine: StateMachine<
|
|
|
16723
15989
|
| {
|
|
16724
15990
|
type: 'invalid value'
|
|
16725
15991
|
resolution: InvalidValueResolution | null
|
|
16726
|
-
value: Array<
|
|
15992
|
+
value: Array<PortableTextBlock> | undefined
|
|
16727
15993
|
}
|
|
16728
15994
|
| {
|
|
16729
15995
|
type: 'loading'
|
|
@@ -16740,7 +16006,7 @@ declare const editorMachine: StateMachine<
|
|
|
16740
16006
|
}
|
|
16741
16007
|
| {
|
|
16742
16008
|
type: 'value changed'
|
|
16743
|
-
value: Array<
|
|
16009
|
+
value: Array<PortableTextBlock> | undefined
|
|
16744
16010
|
}
|
|
16745
16011
|
| UnsetEvent
|
|
16746
16012
|
>
|
|
@@ -16763,7 +16029,7 @@ declare const editorMachine: StateMachine<
|
|
|
16763
16029
|
initialReadOnly: boolean
|
|
16764
16030
|
maxBlocks: number | undefined
|
|
16765
16031
|
selection: EditorSelection_2
|
|
16766
|
-
incomingValue: Array<
|
|
16032
|
+
incomingValue: Array<PortableTextBlock> | undefined
|
|
16767
16033
|
internalDrag?: {
|
|
16768
16034
|
ghost?: HTMLElement
|
|
16769
16035
|
origin: Pick<EventPosition_2, 'selection'>
|
|
@@ -16799,7 +16065,7 @@ declare const editorMachine: StateMachine<
|
|
|
16799
16065
|
}
|
|
16800
16066
|
| {
|
|
16801
16067
|
type: 'update value'
|
|
16802
|
-
value: Array<
|
|
16068
|
+
value: Array<PortableTextBlock> | undefined
|
|
16803
16069
|
}
|
|
16804
16070
|
| {
|
|
16805
16071
|
type: 'update maxBlocks'
|
|
@@ -16838,8 +16104,8 @@ declare const editorMachine: StateMachine<
|
|
|
16838
16104
|
| {
|
|
16839
16105
|
type: 'notify.mutation'
|
|
16840
16106
|
patches: Array<Patch>
|
|
16841
|
-
snapshot: Array<
|
|
16842
|
-
value: Array<
|
|
16107
|
+
snapshot: Array<PortableTextBlock> | undefined
|
|
16108
|
+
value: Array<PortableTextBlock> | undefined
|
|
16843
16109
|
}
|
|
16844
16110
|
| {
|
|
16845
16111
|
type: 'notify.blurred'
|
|
@@ -16864,7 +16130,7 @@ declare const editorMachine: StateMachine<
|
|
|
16864
16130
|
| {
|
|
16865
16131
|
type: 'notify.invalid value'
|
|
16866
16132
|
resolution: InvalidValueResolution | null
|
|
16867
|
-
value: Array<
|
|
16133
|
+
value: Array<PortableTextBlock> | undefined
|
|
16868
16134
|
}
|
|
16869
16135
|
| {
|
|
16870
16136
|
type: 'notify.loading'
|
|
@@ -16881,11 +16147,11 @@ declare const editorMachine: StateMachine<
|
|
|
16881
16147
|
}
|
|
16882
16148
|
| {
|
|
16883
16149
|
type: 'notify.value changed'
|
|
16884
|
-
value: Array<
|
|
16150
|
+
value: Array<PortableTextBlock> | undefined
|
|
16885
16151
|
}
|
|
16886
16152
|
| {
|
|
16887
16153
|
type: 'notify.unset'
|
|
16888
|
-
previousValue: Array<
|
|
16154
|
+
previousValue: Array<PortableTextBlock>
|
|
16889
16155
|
}
|
|
16890
16156
|
| {
|
|
16891
16157
|
type: 'dragstart'
|
|
@@ -16930,7 +16196,7 @@ declare const editorMachine: StateMachine<
|
|
|
16930
16196
|
| {
|
|
16931
16197
|
type: 'invalid value'
|
|
16932
16198
|
resolution: InvalidValueResolution | null
|
|
16933
|
-
value: Array<
|
|
16199
|
+
value: Array<PortableTextBlock> | undefined
|
|
16934
16200
|
}
|
|
16935
16201
|
| {
|
|
16936
16202
|
type: 'loading'
|
|
@@ -16947,7 +16213,7 @@ declare const editorMachine: StateMachine<
|
|
|
16947
16213
|
}
|
|
16948
16214
|
| {
|
|
16949
16215
|
type: 'value changed'
|
|
16950
|
-
value: Array<
|
|
16216
|
+
value: Array<PortableTextBlock> | undefined
|
|
16951
16217
|
}
|
|
16952
16218
|
| UnsetEvent
|
|
16953
16219
|
>
|
|
@@ -16967,7 +16233,7 @@ declare const editorMachine: StateMachine<
|
|
|
16967
16233
|
initialReadOnly: boolean
|
|
16968
16234
|
maxBlocks: number | undefined
|
|
16969
16235
|
selection: EditorSelection_2
|
|
16970
|
-
incomingValue: Array<
|
|
16236
|
+
incomingValue: Array<PortableTextBlock> | undefined
|
|
16971
16237
|
internalDrag?: {
|
|
16972
16238
|
ghost?: HTMLElement
|
|
16973
16239
|
origin: Pick<EventPosition_2, 'selection'>
|
|
@@ -17006,7 +16272,7 @@ declare const editorMachine: StateMachine<
|
|
|
17006
16272
|
}
|
|
17007
16273
|
| {
|
|
17008
16274
|
type: 'update value'
|
|
17009
|
-
value: Array<
|
|
16275
|
+
value: Array<PortableTextBlock> | undefined
|
|
17010
16276
|
}
|
|
17011
16277
|
| {
|
|
17012
16278
|
type: 'update maxBlocks'
|
|
@@ -17045,8 +16311,8 @@ declare const editorMachine: StateMachine<
|
|
|
17045
16311
|
| {
|
|
17046
16312
|
type: 'notify.mutation'
|
|
17047
16313
|
patches: Array<Patch>
|
|
17048
|
-
snapshot: Array<
|
|
17049
|
-
value: Array<
|
|
16314
|
+
snapshot: Array<PortableTextBlock> | undefined
|
|
16315
|
+
value: Array<PortableTextBlock> | undefined
|
|
17050
16316
|
}
|
|
17051
16317
|
| {
|
|
17052
16318
|
type: 'notify.blurred'
|
|
@@ -17071,7 +16337,7 @@ declare const editorMachine: StateMachine<
|
|
|
17071
16337
|
| {
|
|
17072
16338
|
type: 'notify.invalid value'
|
|
17073
16339
|
resolution: InvalidValueResolution | null
|
|
17074
|
-
value: Array<
|
|
16340
|
+
value: Array<PortableTextBlock> | undefined
|
|
17075
16341
|
}
|
|
17076
16342
|
| {
|
|
17077
16343
|
type: 'notify.loading'
|
|
@@ -17088,11 +16354,11 @@ declare const editorMachine: StateMachine<
|
|
|
17088
16354
|
}
|
|
17089
16355
|
| {
|
|
17090
16356
|
type: 'notify.value changed'
|
|
17091
|
-
value: Array<
|
|
16357
|
+
value: Array<PortableTextBlock> | undefined
|
|
17092
16358
|
}
|
|
17093
16359
|
| {
|
|
17094
16360
|
type: 'notify.unset'
|
|
17095
|
-
previousValue: Array<
|
|
16361
|
+
previousValue: Array<PortableTextBlock>
|
|
17096
16362
|
}
|
|
17097
16363
|
| {
|
|
17098
16364
|
type: 'dragstart'
|
|
@@ -17128,7 +16394,7 @@ declare const editorMachine: StateMachine<
|
|
|
17128
16394
|
initialReadOnly: boolean
|
|
17129
16395
|
maxBlocks: number | undefined
|
|
17130
16396
|
selection: EditorSelection_2
|
|
17131
|
-
incomingValue: Array<
|
|
16397
|
+
incomingValue: Array<PortableTextBlock> | undefined
|
|
17132
16398
|
internalDrag?: {
|
|
17133
16399
|
ghost?: HTMLElement
|
|
17134
16400
|
origin: Pick<EventPosition_2, 'selection'>
|
|
@@ -17137,7 +16403,7 @@ declare const editorMachine: StateMachine<
|
|
|
17137
16403
|
},
|
|
17138
16404
|
{
|
|
17139
16405
|
type: 'update value'
|
|
17140
|
-
value: Array<
|
|
16406
|
+
value: Array<PortableTextBlock> | undefined
|
|
17141
16407
|
},
|
|
17142
16408
|
| InternalPatchEvent
|
|
17143
16409
|
| MutationEvent
|
|
@@ -17167,7 +16433,7 @@ declare const editorMachine: StateMachine<
|
|
|
17167
16433
|
}
|
|
17168
16434
|
| {
|
|
17169
16435
|
type: 'update value'
|
|
17170
|
-
value: Array<
|
|
16436
|
+
value: Array<PortableTextBlock> | undefined
|
|
17171
16437
|
}
|
|
17172
16438
|
| {
|
|
17173
16439
|
type: 'update maxBlocks'
|
|
@@ -17206,8 +16472,8 @@ declare const editorMachine: StateMachine<
|
|
|
17206
16472
|
| {
|
|
17207
16473
|
type: 'notify.mutation'
|
|
17208
16474
|
patches: Array<Patch>
|
|
17209
|
-
snapshot: Array<
|
|
17210
|
-
value: Array<
|
|
16475
|
+
snapshot: Array<PortableTextBlock> | undefined
|
|
16476
|
+
value: Array<PortableTextBlock> | undefined
|
|
17211
16477
|
}
|
|
17212
16478
|
| {
|
|
17213
16479
|
type: 'notify.blurred'
|
|
@@ -17232,7 +16498,7 @@ declare const editorMachine: StateMachine<
|
|
|
17232
16498
|
| {
|
|
17233
16499
|
type: 'notify.invalid value'
|
|
17234
16500
|
resolution: InvalidValueResolution | null
|
|
17235
|
-
value: Array<
|
|
16501
|
+
value: Array<PortableTextBlock> | undefined
|
|
17236
16502
|
}
|
|
17237
16503
|
| {
|
|
17238
16504
|
type: 'notify.loading'
|
|
@@ -17249,11 +16515,11 @@ declare const editorMachine: StateMachine<
|
|
|
17249
16515
|
}
|
|
17250
16516
|
| {
|
|
17251
16517
|
type: 'notify.value changed'
|
|
17252
|
-
value: Array<
|
|
16518
|
+
value: Array<PortableTextBlock> | undefined
|
|
17253
16519
|
}
|
|
17254
16520
|
| {
|
|
17255
16521
|
type: 'notify.unset'
|
|
17256
|
-
previousValue: Array<
|
|
16522
|
+
previousValue: Array<PortableTextBlock>
|
|
17257
16523
|
}
|
|
17258
16524
|
| {
|
|
17259
16525
|
type: 'dragstart'
|
|
@@ -17286,7 +16552,7 @@ declare const editorMachine: StateMachine<
|
|
|
17286
16552
|
initialReadOnly: boolean
|
|
17287
16553
|
maxBlocks: number | undefined
|
|
17288
16554
|
selection: EditorSelection_2
|
|
17289
|
-
incomingValue: Array<
|
|
16555
|
+
incomingValue: Array<PortableTextBlock> | undefined
|
|
17290
16556
|
internalDrag?: {
|
|
17291
16557
|
ghost?: HTMLElement
|
|
17292
16558
|
origin: Pick<EventPosition_2, 'selection'>
|
|
@@ -17325,7 +16591,7 @@ declare const editorMachine: StateMachine<
|
|
|
17325
16591
|
}
|
|
17326
16592
|
| {
|
|
17327
16593
|
type: 'update value'
|
|
17328
|
-
value: Array<
|
|
16594
|
+
value: Array<PortableTextBlock> | undefined
|
|
17329
16595
|
}
|
|
17330
16596
|
| {
|
|
17331
16597
|
type: 'update maxBlocks'
|
|
@@ -17364,8 +16630,8 @@ declare const editorMachine: StateMachine<
|
|
|
17364
16630
|
| {
|
|
17365
16631
|
type: 'notify.mutation'
|
|
17366
16632
|
patches: Array<Patch>
|
|
17367
|
-
snapshot: Array<
|
|
17368
|
-
value: Array<
|
|
16633
|
+
snapshot: Array<PortableTextBlock> | undefined
|
|
16634
|
+
value: Array<PortableTextBlock> | undefined
|
|
17369
16635
|
}
|
|
17370
16636
|
| {
|
|
17371
16637
|
type: 'notify.blurred'
|
|
@@ -17390,7 +16656,7 @@ declare const editorMachine: StateMachine<
|
|
|
17390
16656
|
| {
|
|
17391
16657
|
type: 'notify.invalid value'
|
|
17392
16658
|
resolution: InvalidValueResolution | null
|
|
17393
|
-
value: Array<
|
|
16659
|
+
value: Array<PortableTextBlock> | undefined
|
|
17394
16660
|
}
|
|
17395
16661
|
| {
|
|
17396
16662
|
type: 'notify.loading'
|
|
@@ -17407,11 +16673,11 @@ declare const editorMachine: StateMachine<
|
|
|
17407
16673
|
}
|
|
17408
16674
|
| {
|
|
17409
16675
|
type: 'notify.value changed'
|
|
17410
|
-
value: Array<
|
|
16676
|
+
value: Array<PortableTextBlock> | undefined
|
|
17411
16677
|
}
|
|
17412
16678
|
| {
|
|
17413
16679
|
type: 'notify.unset'
|
|
17414
|
-
previousValue: Array<
|
|
16680
|
+
previousValue: Array<PortableTextBlock>
|
|
17415
16681
|
}
|
|
17416
16682
|
| {
|
|
17417
16683
|
type: 'dragstart'
|
|
@@ -17456,7 +16722,7 @@ declare const editorMachine: StateMachine<
|
|
|
17456
16722
|
initialReadOnly: boolean
|
|
17457
16723
|
maxBlocks: number | undefined
|
|
17458
16724
|
selection: EditorSelection_2
|
|
17459
|
-
incomingValue: Array<
|
|
16725
|
+
incomingValue: Array<PortableTextBlock> | undefined
|
|
17460
16726
|
internalDrag?: {
|
|
17461
16727
|
ghost?: HTMLElement
|
|
17462
16728
|
origin: Pick<EventPosition_2, 'selection'>
|
|
@@ -17495,7 +16761,7 @@ declare const editorMachine: StateMachine<
|
|
|
17495
16761
|
initialReadOnly: boolean
|
|
17496
16762
|
maxBlocks: number | undefined
|
|
17497
16763
|
selection: EditorSelection_2
|
|
17498
|
-
incomingValue: Array<
|
|
16764
|
+
incomingValue: Array<PortableTextBlock> | undefined
|
|
17499
16765
|
internalDrag?: {
|
|
17500
16766
|
ghost?: HTMLElement
|
|
17501
16767
|
origin: Pick<EventPosition_2, 'selection'>
|
|
@@ -17529,7 +16795,7 @@ declare const editorMachine: StateMachine<
|
|
|
17529
16795
|
initialReadOnly: boolean
|
|
17530
16796
|
maxBlocks: number | undefined
|
|
17531
16797
|
selection: EditorSelection_2
|
|
17532
|
-
incomingValue: Array<
|
|
16798
|
+
incomingValue: Array<PortableTextBlock> | undefined
|
|
17533
16799
|
internalDrag?: {
|
|
17534
16800
|
ghost?: HTMLElement
|
|
17535
16801
|
origin: Pick<EventPosition_2, 'selection'>
|
|
@@ -17564,7 +16830,7 @@ declare const editorMachine: StateMachine<
|
|
|
17564
16830
|
initialReadOnly: boolean
|
|
17565
16831
|
maxBlocks: number | undefined
|
|
17566
16832
|
selection: EditorSelection_2
|
|
17567
|
-
incomingValue: Array<
|
|
16833
|
+
incomingValue: Array<PortableTextBlock> | undefined
|
|
17568
16834
|
internalDrag?: {
|
|
17569
16835
|
ghost?: HTMLElement
|
|
17570
16836
|
origin: Pick<EventPosition_2, 'selection'>
|
|
@@ -17599,7 +16865,7 @@ declare const editorMachine: StateMachine<
|
|
|
17599
16865
|
initialReadOnly: boolean
|
|
17600
16866
|
maxBlocks: number | undefined
|
|
17601
16867
|
selection: EditorSelection_2
|
|
17602
|
-
incomingValue: Array<
|
|
16868
|
+
incomingValue: Array<PortableTextBlock> | undefined
|
|
17603
16869
|
internalDrag?: {
|
|
17604
16870
|
ghost?: HTMLElement
|
|
17605
16871
|
origin: Pick<EventPosition_2, 'selection'>
|
|
@@ -17638,7 +16904,7 @@ declare const editorMachine: StateMachine<
|
|
|
17638
16904
|
}
|
|
17639
16905
|
| {
|
|
17640
16906
|
type: 'update value'
|
|
17641
|
-
value: Array<
|
|
16907
|
+
value: Array<PortableTextBlock> | undefined
|
|
17642
16908
|
}
|
|
17643
16909
|
| {
|
|
17644
16910
|
type: 'update maxBlocks'
|
|
@@ -17677,8 +16943,8 @@ declare const editorMachine: StateMachine<
|
|
|
17677
16943
|
| {
|
|
17678
16944
|
type: 'notify.mutation'
|
|
17679
16945
|
patches: Array<Patch>
|
|
17680
|
-
snapshot: Array<
|
|
17681
|
-
value: Array<
|
|
16946
|
+
snapshot: Array<PortableTextBlock> | undefined
|
|
16947
|
+
value: Array<PortableTextBlock> | undefined
|
|
17682
16948
|
}
|
|
17683
16949
|
| {
|
|
17684
16950
|
type: 'notify.blurred'
|
|
@@ -17703,7 +16969,7 @@ declare const editorMachine: StateMachine<
|
|
|
17703
16969
|
| {
|
|
17704
16970
|
type: 'notify.invalid value'
|
|
17705
16971
|
resolution: InvalidValueResolution | null
|
|
17706
|
-
value: Array<
|
|
16972
|
+
value: Array<PortableTextBlock> | undefined
|
|
17707
16973
|
}
|
|
17708
16974
|
| {
|
|
17709
16975
|
type: 'notify.loading'
|
|
@@ -17720,11 +16986,11 @@ declare const editorMachine: StateMachine<
|
|
|
17720
16986
|
}
|
|
17721
16987
|
| {
|
|
17722
16988
|
type: 'notify.value changed'
|
|
17723
|
-
value: Array<
|
|
16989
|
+
value: Array<PortableTextBlock> | undefined
|
|
17724
16990
|
}
|
|
17725
16991
|
| {
|
|
17726
16992
|
type: 'notify.unset'
|
|
17727
|
-
previousValue: Array<
|
|
16993
|
+
previousValue: Array<PortableTextBlock>
|
|
17728
16994
|
}
|
|
17729
16995
|
| {
|
|
17730
16996
|
type: 'dragstart'
|
|
@@ -17766,7 +17032,7 @@ declare const editorMachine: StateMachine<
|
|
|
17766
17032
|
initialReadOnly: boolean
|
|
17767
17033
|
maxBlocks: number | undefined
|
|
17768
17034
|
selection: EditorSelection_2
|
|
17769
|
-
incomingValue: Array<
|
|
17035
|
+
incomingValue: Array<PortableTextBlock> | undefined
|
|
17770
17036
|
internalDrag?: {
|
|
17771
17037
|
ghost?: HTMLElement
|
|
17772
17038
|
origin: Pick<EventPosition_2, 'selection'>
|
|
@@ -17806,7 +17072,7 @@ declare const editorMachine: StateMachine<
|
|
|
17806
17072
|
}
|
|
17807
17073
|
| {
|
|
17808
17074
|
type: 'update value'
|
|
17809
|
-
value: Array<
|
|
17075
|
+
value: Array<PortableTextBlock> | undefined
|
|
17810
17076
|
}
|
|
17811
17077
|
| {
|
|
17812
17078
|
type: 'update maxBlocks'
|
|
@@ -17845,8 +17111,8 @@ declare const editorMachine: StateMachine<
|
|
|
17845
17111
|
| {
|
|
17846
17112
|
type: 'notify.mutation'
|
|
17847
17113
|
patches: Array<Patch>
|
|
17848
|
-
snapshot: Array<
|
|
17849
|
-
value: Array<
|
|
17114
|
+
snapshot: Array<PortableTextBlock> | undefined
|
|
17115
|
+
value: Array<PortableTextBlock> | undefined
|
|
17850
17116
|
}
|
|
17851
17117
|
| {
|
|
17852
17118
|
type: 'notify.blurred'
|
|
@@ -17871,7 +17137,7 @@ declare const editorMachine: StateMachine<
|
|
|
17871
17137
|
| {
|
|
17872
17138
|
type: 'notify.invalid value'
|
|
17873
17139
|
resolution: InvalidValueResolution | null
|
|
17874
|
-
value: Array<
|
|
17140
|
+
value: Array<PortableTextBlock> | undefined
|
|
17875
17141
|
}
|
|
17876
17142
|
| {
|
|
17877
17143
|
type: 'notify.loading'
|
|
@@ -17888,11 +17154,11 @@ declare const editorMachine: StateMachine<
|
|
|
17888
17154
|
}
|
|
17889
17155
|
| {
|
|
17890
17156
|
type: 'notify.value changed'
|
|
17891
|
-
value: Array<
|
|
17157
|
+
value: Array<PortableTextBlock> | undefined
|
|
17892
17158
|
}
|
|
17893
17159
|
| {
|
|
17894
17160
|
type: 'notify.unset'
|
|
17895
|
-
previousValue: Array<
|
|
17161
|
+
previousValue: Array<PortableTextBlock>
|
|
17896
17162
|
}
|
|
17897
17163
|
| {
|
|
17898
17164
|
type: 'dragstart'
|
|
@@ -17956,7 +17222,7 @@ declare const editorMachine: StateMachine<
|
|
|
17956
17222
|
initialReadOnly: boolean
|
|
17957
17223
|
maxBlocks: number | undefined
|
|
17958
17224
|
selection: EditorSelection_2
|
|
17959
|
-
incomingValue: Array<
|
|
17225
|
+
incomingValue: Array<PortableTextBlock> | undefined
|
|
17960
17226
|
internalDrag?: {
|
|
17961
17227
|
ghost?: HTMLElement
|
|
17962
17228
|
origin: Pick<EventPosition_2, 'selection'>
|
|
@@ -17991,7 +17257,7 @@ declare const editorMachine: StateMachine<
|
|
|
17991
17257
|
}
|
|
17992
17258
|
| {
|
|
17993
17259
|
type: 'update value'
|
|
17994
|
-
value: Array<
|
|
17260
|
+
value: Array<PortableTextBlock> | undefined
|
|
17995
17261
|
}
|
|
17996
17262
|
| {
|
|
17997
17263
|
type: 'update maxBlocks'
|
|
@@ -18030,8 +17296,8 @@ declare const editorMachine: StateMachine<
|
|
|
18030
17296
|
| {
|
|
18031
17297
|
type: 'notify.mutation'
|
|
18032
17298
|
patches: Array<Patch>
|
|
18033
|
-
snapshot: Array<
|
|
18034
|
-
value: Array<
|
|
17299
|
+
snapshot: Array<PortableTextBlock> | undefined
|
|
17300
|
+
value: Array<PortableTextBlock> | undefined
|
|
18035
17301
|
}
|
|
18036
17302
|
| {
|
|
18037
17303
|
type: 'notify.blurred'
|
|
@@ -18056,7 +17322,7 @@ declare const editorMachine: StateMachine<
|
|
|
18056
17322
|
| {
|
|
18057
17323
|
type: 'notify.invalid value'
|
|
18058
17324
|
resolution: InvalidValueResolution | null
|
|
18059
|
-
value: Array<
|
|
17325
|
+
value: Array<PortableTextBlock> | undefined
|
|
18060
17326
|
}
|
|
18061
17327
|
| {
|
|
18062
17328
|
type: 'notify.loading'
|
|
@@ -18073,11 +17339,11 @@ declare const editorMachine: StateMachine<
|
|
|
18073
17339
|
}
|
|
18074
17340
|
| {
|
|
18075
17341
|
type: 'notify.value changed'
|
|
18076
|
-
value: Array<
|
|
17342
|
+
value: Array<PortableTextBlock> | undefined
|
|
18077
17343
|
}
|
|
18078
17344
|
| {
|
|
18079
17345
|
type: 'notify.unset'
|
|
18080
|
-
previousValue: Array<
|
|
17346
|
+
previousValue: Array<PortableTextBlock>
|
|
18081
17347
|
}
|
|
18082
17348
|
| {
|
|
18083
17349
|
type: 'dragstart'
|
|
@@ -18118,7 +17384,7 @@ declare const editorMachine: StateMachine<
|
|
|
18118
17384
|
}
|
|
18119
17385
|
| {
|
|
18120
17386
|
type: 'update value'
|
|
18121
|
-
value: Array<
|
|
17387
|
+
value: Array<PortableTextBlock> | undefined
|
|
18122
17388
|
}
|
|
18123
17389
|
| {
|
|
18124
17390
|
type: 'update maxBlocks'
|
|
@@ -18157,8 +17423,8 @@ declare const editorMachine: StateMachine<
|
|
|
18157
17423
|
| {
|
|
18158
17424
|
type: 'notify.mutation'
|
|
18159
17425
|
patches: Array<Patch>
|
|
18160
|
-
snapshot: Array<
|
|
18161
|
-
value: Array<
|
|
17426
|
+
snapshot: Array<PortableTextBlock> | undefined
|
|
17427
|
+
value: Array<PortableTextBlock> | undefined
|
|
18162
17428
|
}
|
|
18163
17429
|
| {
|
|
18164
17430
|
type: 'notify.blurred'
|
|
@@ -18183,7 +17449,7 @@ declare const editorMachine: StateMachine<
|
|
|
18183
17449
|
| {
|
|
18184
17450
|
type: 'notify.invalid value'
|
|
18185
17451
|
resolution: InvalidValueResolution | null
|
|
18186
|
-
value: Array<
|
|
17452
|
+
value: Array<PortableTextBlock> | undefined
|
|
18187
17453
|
}
|
|
18188
17454
|
| {
|
|
18189
17455
|
type: 'notify.loading'
|
|
@@ -18200,11 +17466,11 @@ declare const editorMachine: StateMachine<
|
|
|
18200
17466
|
}
|
|
18201
17467
|
| {
|
|
18202
17468
|
type: 'notify.value changed'
|
|
18203
|
-
value: Array<
|
|
17469
|
+
value: Array<PortableTextBlock> | undefined
|
|
18204
17470
|
}
|
|
18205
17471
|
| {
|
|
18206
17472
|
type: 'notify.unset'
|
|
18207
|
-
previousValue: Array<
|
|
17473
|
+
previousValue: Array<PortableTextBlock>
|
|
18208
17474
|
}
|
|
18209
17475
|
| {
|
|
18210
17476
|
type: 'dragstart'
|
|
@@ -18229,7 +17495,7 @@ declare const editorMachine: StateMachine<
|
|
|
18229
17495
|
initialReadOnly: boolean
|
|
18230
17496
|
maxBlocks: number | undefined
|
|
18231
17497
|
selection: EditorSelection_2
|
|
18232
|
-
incomingValue: Array<
|
|
17498
|
+
incomingValue: Array<PortableTextBlock> | undefined
|
|
18233
17499
|
internalDrag?: {
|
|
18234
17500
|
ghost?: HTMLElement
|
|
18235
17501
|
origin: Pick<EventPosition_2, 'selection'>
|
|
@@ -18264,7 +17530,7 @@ declare const editorMachine: StateMachine<
|
|
|
18264
17530
|
}
|
|
18265
17531
|
| {
|
|
18266
17532
|
type: 'update value'
|
|
18267
|
-
value: Array<
|
|
17533
|
+
value: Array<PortableTextBlock> | undefined
|
|
18268
17534
|
}
|
|
18269
17535
|
| {
|
|
18270
17536
|
type: 'update maxBlocks'
|
|
@@ -18303,8 +17569,8 @@ declare const editorMachine: StateMachine<
|
|
|
18303
17569
|
| {
|
|
18304
17570
|
type: 'notify.mutation'
|
|
18305
17571
|
patches: Array<Patch>
|
|
18306
|
-
snapshot: Array<
|
|
18307
|
-
value: Array<
|
|
17572
|
+
snapshot: Array<PortableTextBlock> | undefined
|
|
17573
|
+
value: Array<PortableTextBlock> | undefined
|
|
18308
17574
|
}
|
|
18309
17575
|
| {
|
|
18310
17576
|
type: 'notify.blurred'
|
|
@@ -18329,7 +17595,7 @@ declare const editorMachine: StateMachine<
|
|
|
18329
17595
|
| {
|
|
18330
17596
|
type: 'notify.invalid value'
|
|
18331
17597
|
resolution: InvalidValueResolution | null
|
|
18332
|
-
value: Array<
|
|
17598
|
+
value: Array<PortableTextBlock> | undefined
|
|
18333
17599
|
}
|
|
18334
17600
|
| {
|
|
18335
17601
|
type: 'notify.loading'
|
|
@@ -18346,11 +17612,11 @@ declare const editorMachine: StateMachine<
|
|
|
18346
17612
|
}
|
|
18347
17613
|
| {
|
|
18348
17614
|
type: 'notify.value changed'
|
|
18349
|
-
value: Array<
|
|
17615
|
+
value: Array<PortableTextBlock> | undefined
|
|
18350
17616
|
}
|
|
18351
17617
|
| {
|
|
18352
17618
|
type: 'notify.unset'
|
|
18353
|
-
previousValue: Array<
|
|
17619
|
+
previousValue: Array<PortableTextBlock>
|
|
18354
17620
|
}
|
|
18355
17621
|
| {
|
|
18356
17622
|
type: 'dragstart'
|
|
@@ -18391,7 +17657,7 @@ declare const editorMachine: StateMachine<
|
|
|
18391
17657
|
}
|
|
18392
17658
|
| {
|
|
18393
17659
|
type: 'update value'
|
|
18394
|
-
value: Array<
|
|
17660
|
+
value: Array<PortableTextBlock> | undefined
|
|
18395
17661
|
}
|
|
18396
17662
|
| {
|
|
18397
17663
|
type: 'update maxBlocks'
|
|
@@ -18430,8 +17696,8 @@ declare const editorMachine: StateMachine<
|
|
|
18430
17696
|
| {
|
|
18431
17697
|
type: 'notify.mutation'
|
|
18432
17698
|
patches: Array<Patch>
|
|
18433
|
-
snapshot: Array<
|
|
18434
|
-
value: Array<
|
|
17699
|
+
snapshot: Array<PortableTextBlock> | undefined
|
|
17700
|
+
value: Array<PortableTextBlock> | undefined
|
|
18435
17701
|
}
|
|
18436
17702
|
| {
|
|
18437
17703
|
type: 'notify.blurred'
|
|
@@ -18456,7 +17722,7 @@ declare const editorMachine: StateMachine<
|
|
|
18456
17722
|
| {
|
|
18457
17723
|
type: 'notify.invalid value'
|
|
18458
17724
|
resolution: InvalidValueResolution | null
|
|
18459
|
-
value: Array<
|
|
17725
|
+
value: Array<PortableTextBlock> | undefined
|
|
18460
17726
|
}
|
|
18461
17727
|
| {
|
|
18462
17728
|
type: 'notify.loading'
|
|
@@ -18473,11 +17739,11 @@ declare const editorMachine: StateMachine<
|
|
|
18473
17739
|
}
|
|
18474
17740
|
| {
|
|
18475
17741
|
type: 'notify.value changed'
|
|
18476
|
-
value: Array<
|
|
17742
|
+
value: Array<PortableTextBlock> | undefined
|
|
18477
17743
|
}
|
|
18478
17744
|
| {
|
|
18479
17745
|
type: 'notify.unset'
|
|
18480
|
-
previousValue: Array<
|
|
17746
|
+
previousValue: Array<PortableTextBlock>
|
|
18481
17747
|
}
|
|
18482
17748
|
| {
|
|
18483
17749
|
type: 'dragstart'
|
|
@@ -18684,21 +17950,6 @@ export declare function effect(
|
|
|
18684
17950
|
effect: () => void,
|
|
18685
17951
|
): PickFromUnion_2<BehaviorAction, 'type', 'effect'>
|
|
18686
17952
|
|
|
18687
|
-
/** @public */
|
|
18688
|
-
declare interface EmailDefinition extends BaseSchemaDefinition {
|
|
18689
|
-
type: 'email'
|
|
18690
|
-
options?: EmailOptions
|
|
18691
|
-
placeholder?: string
|
|
18692
|
-
validation?: ValidationBuilder<EmailRule, string>
|
|
18693
|
-
initialValue?: InitialValueProperty<any, string>
|
|
18694
|
-
}
|
|
18695
|
-
|
|
18696
|
-
/** @public */
|
|
18697
|
-
declare interface EmailOptions extends BaseSchemaTypeOptions {}
|
|
18698
|
-
|
|
18699
|
-
/** @public */
|
|
18700
|
-
declare interface EmailRule extends RuleDef<EmailRule, string> {}
|
|
18701
|
-
|
|
18702
17953
|
/**
|
|
18703
17954
|
* @beta
|
|
18704
17955
|
*/
|
|
@@ -18715,16 +17966,6 @@ export declare type EmojiPickerBehaviorsConfig<TEmojiMatch> = {
|
|
|
18715
17966
|
parseMatch: ({match}: {match: TEmojiMatch}) => string | undefined
|
|
18716
17967
|
}
|
|
18717
17968
|
|
|
18718
|
-
/** @public */
|
|
18719
|
-
declare interface EmptyProps {}
|
|
18720
|
-
|
|
18721
|
-
/** @public */
|
|
18722
|
-
declare interface EnumListProps<V = unknown> {
|
|
18723
|
-
list?: Array<TitledListValue<V> | V>
|
|
18724
|
-
layout?: 'radio' | 'dropdown'
|
|
18725
|
-
direction?: 'horizontal' | 'vertical'
|
|
18726
|
-
}
|
|
18727
|
-
|
|
18728
17969
|
declare type EventPosition_2 = {
|
|
18729
17970
|
block: 'start' | 'end'
|
|
18730
17971
|
/**
|
|
@@ -18744,137 +17985,6 @@ export declare function execute(
|
|
|
18744
17985
|
declare type ExtractNamespace<TType extends string> =
|
|
18745
17986
|
TType extends `${infer Namespace}.${string}` ? Namespace : TType
|
|
18746
17987
|
|
|
18747
|
-
/**
|
|
18748
|
-
* The shape of a field definition. Note, it's recommended to use the
|
|
18749
|
-
* `defineField` function instead of using this type directly.
|
|
18750
|
-
*
|
|
18751
|
-
* Where `defineField` infers the exact field type,
|
|
18752
|
-
* FieldDefinition is a compromise union of all types a field can have.
|
|
18753
|
-
*
|
|
18754
|
-
* A field definition can be a reference to another registered top-level type
|
|
18755
|
-
* or a inline type definition.
|
|
18756
|
-
*
|
|
18757
|
-
* @public
|
|
18758
|
-
*/
|
|
18759
|
-
declare type FieldDefinition<
|
|
18760
|
-
TType extends IntrinsicTypeName = IntrinsicTypeName,
|
|
18761
|
-
TAlias extends IntrinsicTypeName | undefined = undefined,
|
|
18762
|
-
> = (InlineFieldDefinition[TType] | TypeAliasDefinition<string, TAlias>) &
|
|
18763
|
-
FieldDefinitionBase
|
|
18764
|
-
|
|
18765
|
-
/** @public */
|
|
18766
|
-
declare interface FieldDefinitionBase {
|
|
18767
|
-
fieldset?: string
|
|
18768
|
-
group?: string | string[]
|
|
18769
|
-
}
|
|
18770
|
-
|
|
18771
|
-
/** @public */
|
|
18772
|
-
declare interface FieldGroup {
|
|
18773
|
-
name: string
|
|
18774
|
-
icon?: ComponentType
|
|
18775
|
-
title?: string
|
|
18776
|
-
description?: string
|
|
18777
|
-
i18n?: I18nTextRecord<'title'>
|
|
18778
|
-
hidden?: ConditionalProperty
|
|
18779
|
-
default?: boolean
|
|
18780
|
-
fields?: ObjectField[]
|
|
18781
|
-
}
|
|
18782
|
-
|
|
18783
|
-
/** @public */
|
|
18784
|
-
declare type FieldGroupDefinition = {
|
|
18785
|
-
name: string
|
|
18786
|
-
title?: string
|
|
18787
|
-
hidden?: ConditionalProperty
|
|
18788
|
-
icon?: ComponentType
|
|
18789
|
-
default?: boolean
|
|
18790
|
-
i18n?: I18nTextRecord<'title'>
|
|
18791
|
-
}
|
|
18792
|
-
|
|
18793
|
-
/**
|
|
18794
|
-
* Holds a reference to a different field
|
|
18795
|
-
* NOTE: Only use this through {@link Rule.valueOfField}
|
|
18796
|
-
*
|
|
18797
|
-
* @public
|
|
18798
|
-
*/
|
|
18799
|
-
declare interface FieldReference {
|
|
18800
|
-
type: symbol
|
|
18801
|
-
path: string | string[]
|
|
18802
|
-
}
|
|
18803
|
-
|
|
18804
|
-
/** @public */
|
|
18805
|
-
declare type FieldRules = {
|
|
18806
|
-
[fieldKey: string]: SchemaValidationValue
|
|
18807
|
-
}
|
|
18808
|
-
|
|
18809
|
-
/** @public */
|
|
18810
|
-
declare type Fieldset = SingleFieldSet | MultiFieldSet
|
|
18811
|
-
|
|
18812
|
-
/** @public */
|
|
18813
|
-
declare type FieldsetDefinition = {
|
|
18814
|
-
name: string
|
|
18815
|
-
title?: string
|
|
18816
|
-
description?: string
|
|
18817
|
-
group?: string
|
|
18818
|
-
hidden?: ConditionalProperty
|
|
18819
|
-
readOnly?: ConditionalProperty
|
|
18820
|
-
options?: ObjectOptions
|
|
18821
|
-
}
|
|
18822
|
-
|
|
18823
|
-
/** @public */
|
|
18824
|
-
declare interface File_2 {
|
|
18825
|
-
[key: string]: unknown
|
|
18826
|
-
asset?: Reference
|
|
18827
|
-
}
|
|
18828
|
-
|
|
18829
|
-
/** @public */
|
|
18830
|
-
declare interface FileDefinition
|
|
18831
|
-
extends Omit<
|
|
18832
|
-
ObjectDefinition,
|
|
18833
|
-
'type' | 'fields' | 'options' | 'groups' | 'validation'
|
|
18834
|
-
> {
|
|
18835
|
-
type: 'file'
|
|
18836
|
-
fields?: ObjectDefinition['fields']
|
|
18837
|
-
options?: FileOptions
|
|
18838
|
-
validation?: ValidationBuilder<FileRule, FileValue>
|
|
18839
|
-
initialValue?: InitialValueProperty<any, FileValue>
|
|
18840
|
-
}
|
|
18841
|
-
|
|
18842
|
-
/** @public */
|
|
18843
|
-
declare interface FileOptions extends ObjectOptions {
|
|
18844
|
-
storeOriginalFilename?: boolean
|
|
18845
|
-
accept?: string
|
|
18846
|
-
sources?: AssetSource[]
|
|
18847
|
-
}
|
|
18848
|
-
|
|
18849
|
-
/** @public */
|
|
18850
|
-
declare interface FileRule extends RuleDef<FileRule, FileValue> {
|
|
18851
|
-
/**
|
|
18852
|
-
* Require a file field has an asset.
|
|
18853
|
-
*
|
|
18854
|
-
* @example
|
|
18855
|
-
* ```ts
|
|
18856
|
-
* defineField({
|
|
18857
|
-
* name: 'file',
|
|
18858
|
-
* title: 'File',
|
|
18859
|
-
* type: 'file',
|
|
18860
|
-
* validation: (Rule) => Rule.required().assetRequired(),
|
|
18861
|
-
* })
|
|
18862
|
-
* ```
|
|
18863
|
-
*/
|
|
18864
|
-
assetRequired(): FileRule
|
|
18865
|
-
}
|
|
18866
|
-
|
|
18867
|
-
/** @public */
|
|
18868
|
-
declare interface FileSchemaType extends Omit<ObjectSchemaType, 'options'> {
|
|
18869
|
-
options?: FileOptions
|
|
18870
|
-
}
|
|
18871
|
-
|
|
18872
|
-
/** @public */
|
|
18873
|
-
declare interface FileValue {
|
|
18874
|
-
asset?: Reference
|
|
18875
|
-
[index: string]: unknown
|
|
18876
|
-
}
|
|
18877
|
-
|
|
18878
17988
|
/**
|
|
18879
17989
|
* @beta
|
|
18880
17990
|
*/
|
|
@@ -18882,63 +17992,6 @@ export declare function forward(
|
|
|
18882
17992
|
event: NativeBehaviorEvent | SyntheticBehaviorEvent | CustomBehaviorEvent,
|
|
18883
17993
|
): PickFromUnion_2<BehaviorAction, 'type', 'forward'>
|
|
18884
17994
|
|
|
18885
|
-
/** @public */
|
|
18886
|
-
declare interface GeopointDefinition extends BaseSchemaDefinition {
|
|
18887
|
-
type: 'geopoint'
|
|
18888
|
-
options?: GeopointOptions
|
|
18889
|
-
validation?: ValidationBuilder<GeopointRule, GeopointValue>
|
|
18890
|
-
initialValue?: InitialValueProperty<any, Omit<GeopointValue, '_type'>>
|
|
18891
|
-
}
|
|
18892
|
-
|
|
18893
|
-
/** @public */
|
|
18894
|
-
declare interface GeopointOptions extends BaseSchemaTypeOptions {}
|
|
18895
|
-
|
|
18896
|
-
/** @public */
|
|
18897
|
-
declare interface GeopointRule extends RuleDef<GeopointRule, GeopointValue> {}
|
|
18898
|
-
|
|
18899
|
-
/**
|
|
18900
|
-
* Geographical point representing a pair of latitude and longitude coordinates,
|
|
18901
|
-
* stored as degrees, in the World Geodetic System 1984 (WGS 84) format. Also
|
|
18902
|
-
* includes an optional `alt` property representing the altitude in meters.
|
|
18903
|
-
*
|
|
18904
|
-
* @public
|
|
18905
|
-
*/
|
|
18906
|
-
declare interface GeopointValue {
|
|
18907
|
-
/**
|
|
18908
|
-
* Type of the object. Must be `geopoint`.
|
|
18909
|
-
*/
|
|
18910
|
-
_type: 'geopoint'
|
|
18911
|
-
/**
|
|
18912
|
-
* Latitude in degrees
|
|
18913
|
-
*/
|
|
18914
|
-
lat: number
|
|
18915
|
-
/**
|
|
18916
|
-
* Longitude in degrees
|
|
18917
|
-
*/
|
|
18918
|
-
lng: number
|
|
18919
|
-
/**
|
|
18920
|
-
* Altitude in meters
|
|
18921
|
-
*/
|
|
18922
|
-
alt?: number
|
|
18923
|
-
}
|
|
18924
|
-
|
|
18925
|
-
/** @public */
|
|
18926
|
-
declare interface GlobalDocumentReferenceDefinition
|
|
18927
|
-
extends BaseSchemaDefinition {
|
|
18928
|
-
type: 'globalDocumentReference'
|
|
18929
|
-
weak?: boolean
|
|
18930
|
-
to: {
|
|
18931
|
-
type: string
|
|
18932
|
-
title?: string
|
|
18933
|
-
icon?: ComponentType
|
|
18934
|
-
preview?: PreviewConfig
|
|
18935
|
-
}[]
|
|
18936
|
-
resourceType: string
|
|
18937
|
-
resourceId: string
|
|
18938
|
-
options?: ReferenceOptions
|
|
18939
|
-
studioUrl?: (document: {id: string; type?: string}) => string | null
|
|
18940
|
-
}
|
|
18941
|
-
|
|
18942
17995
|
declare type HasTag = ReturnType<EditorActor['getSnapshot']>['hasTag']
|
|
18943
17996
|
|
|
18944
17997
|
declare interface History_2 {
|
|
@@ -18951,178 +18004,6 @@ declare type HistoryItem = {
|
|
|
18951
18004
|
timestamp: Date
|
|
18952
18005
|
}
|
|
18953
18006
|
|
|
18954
|
-
/** @public */
|
|
18955
|
-
declare interface HotspotOptions {
|
|
18956
|
-
previews?: HotspotPreview[]
|
|
18957
|
-
}
|
|
18958
|
-
|
|
18959
|
-
/** @public */
|
|
18960
|
-
declare interface HotspotPreview {
|
|
18961
|
-
title: string
|
|
18962
|
-
aspectRatio: number
|
|
18963
|
-
}
|
|
18964
|
-
|
|
18965
|
-
/** @public */
|
|
18966
|
-
declare type I18nTextRecord<K extends string> = {
|
|
18967
|
-
[P in K]?: {
|
|
18968
|
-
key: string
|
|
18969
|
-
ns: string
|
|
18970
|
-
}
|
|
18971
|
-
}
|
|
18972
|
-
|
|
18973
|
-
/** @public */
|
|
18974
|
-
declare interface ImageAsset extends Asset {
|
|
18975
|
-
_type: 'sanity.imageAsset'
|
|
18976
|
-
metadata: ImageMetadata
|
|
18977
|
-
}
|
|
18978
|
-
|
|
18979
|
-
/** @public */
|
|
18980
|
-
declare interface ImageCrop {
|
|
18981
|
-
_type?: 'sanity.imageCrop'
|
|
18982
|
-
left: number
|
|
18983
|
-
bottom: number
|
|
18984
|
-
right: number
|
|
18985
|
-
top: number
|
|
18986
|
-
}
|
|
18987
|
-
|
|
18988
|
-
/** @public */
|
|
18989
|
-
declare interface ImageDefinition
|
|
18990
|
-
extends Omit<
|
|
18991
|
-
ObjectDefinition,
|
|
18992
|
-
'type' | 'fields' | 'options' | 'groups' | 'validation'
|
|
18993
|
-
> {
|
|
18994
|
-
type: 'image'
|
|
18995
|
-
fields?: FieldDefinition[]
|
|
18996
|
-
options?: ImageOptions
|
|
18997
|
-
validation?: ValidationBuilder<ImageRule, ImageValue>
|
|
18998
|
-
initialValue?: InitialValueProperty<any, ImageValue>
|
|
18999
|
-
}
|
|
19000
|
-
|
|
19001
|
-
/** @public */
|
|
19002
|
-
declare interface ImageDimensions {
|
|
19003
|
-
_type: 'sanity.imageDimensions'
|
|
19004
|
-
height: number
|
|
19005
|
-
width: number
|
|
19006
|
-
aspectRatio: number
|
|
19007
|
-
}
|
|
19008
|
-
|
|
19009
|
-
/** @public */
|
|
19010
|
-
declare interface ImageHotspot {
|
|
19011
|
-
_type?: 'sanity.imageHotspot'
|
|
19012
|
-
width: number
|
|
19013
|
-
height: number
|
|
19014
|
-
x: number
|
|
19015
|
-
y: number
|
|
19016
|
-
}
|
|
19017
|
-
|
|
19018
|
-
/** @public */
|
|
19019
|
-
declare interface ImageMetadata {
|
|
19020
|
-
[key: string]: unknown
|
|
19021
|
-
_type: 'sanity.imageMetadata'
|
|
19022
|
-
dimensions: ImageDimensions
|
|
19023
|
-
palette?: ImagePalette
|
|
19024
|
-
lqip?: string
|
|
19025
|
-
blurHash?: string
|
|
19026
|
-
hasAlpha: boolean
|
|
19027
|
-
isOpaque: boolean
|
|
19028
|
-
}
|
|
19029
|
-
|
|
19030
|
-
/** @public */
|
|
19031
|
-
declare type ImageMetadataType =
|
|
19032
|
-
| 'blurhash'
|
|
19033
|
-
| 'lqip'
|
|
19034
|
-
| 'palette'
|
|
19035
|
-
| 'exif'
|
|
19036
|
-
| 'image'
|
|
19037
|
-
| 'location'
|
|
19038
|
-
|
|
19039
|
-
/** @public */
|
|
19040
|
-
declare interface ImageOptions extends FileOptions {
|
|
19041
|
-
metadata?: ImageMetadataType[]
|
|
19042
|
-
hotspot?: boolean | HotspotOptions
|
|
19043
|
-
}
|
|
19044
|
-
|
|
19045
|
-
/** @public */
|
|
19046
|
-
declare interface ImagePalette {
|
|
19047
|
-
_type: 'sanity.imagePalette'
|
|
19048
|
-
darkMuted?: ImageSwatch
|
|
19049
|
-
darkVibrant?: ImageSwatch
|
|
19050
|
-
dominant?: ImageSwatch
|
|
19051
|
-
lightMuted?: ImageSwatch
|
|
19052
|
-
lightVibrant?: ImageSwatch
|
|
19053
|
-
muted?: ImageSwatch
|
|
19054
|
-
vibrant?: ImageSwatch
|
|
19055
|
-
}
|
|
19056
|
-
|
|
19057
|
-
/** @public */
|
|
19058
|
-
declare interface ImageRule extends RuleDef<ImageRule, ImageValue> {
|
|
19059
|
-
/**
|
|
19060
|
-
* Require an image field has an asset.
|
|
19061
|
-
*
|
|
19062
|
-
* @example
|
|
19063
|
-
* ```ts
|
|
19064
|
-
* defineField({
|
|
19065
|
-
* name: 'image',
|
|
19066
|
-
* title: 'Image',
|
|
19067
|
-
* type: 'image',
|
|
19068
|
-
* validation: (Rule) => Rule.required().assetRequired(),
|
|
19069
|
-
* })
|
|
19070
|
-
* ```
|
|
19071
|
-
*/
|
|
19072
|
-
assetRequired(): ImageRule
|
|
19073
|
-
}
|
|
19074
|
-
|
|
19075
|
-
/** @public */
|
|
19076
|
-
declare interface ImageSwatch {
|
|
19077
|
-
_type: 'sanity.imagePaletteSwatch'
|
|
19078
|
-
background: string
|
|
19079
|
-
foreground: string
|
|
19080
|
-
population: number
|
|
19081
|
-
title?: string
|
|
19082
|
-
}
|
|
19083
|
-
|
|
19084
|
-
/** @public */
|
|
19085
|
-
declare interface ImageValue extends FileValue {
|
|
19086
|
-
crop?: ImageCrop
|
|
19087
|
-
hotspot?: ImageHotspot
|
|
19088
|
-
[index: string]: unknown
|
|
19089
|
-
}
|
|
19090
|
-
|
|
19091
|
-
/** @public */
|
|
19092
|
-
declare type IndexTuple = [number | '', number | '']
|
|
19093
|
-
|
|
19094
|
-
/** @public */
|
|
19095
|
-
declare type InitialValueProperty<Params, Value> =
|
|
19096
|
-
| Value
|
|
19097
|
-
| InitialValueResolver<Params, Value>
|
|
19098
|
-
| undefined
|
|
19099
|
-
|
|
19100
|
-
/** @public */
|
|
19101
|
-
declare type InitialValueResolver<Params, Value> = (
|
|
19102
|
-
params: Params | undefined,
|
|
19103
|
-
context: InitialValueResolverContext,
|
|
19104
|
-
) => Promise<Value> | Value
|
|
19105
|
-
|
|
19106
|
-
/** @public */
|
|
19107
|
-
declare interface InitialValueResolverContext {
|
|
19108
|
-
projectId: string
|
|
19109
|
-
dataset: string
|
|
19110
|
-
schema: Schema
|
|
19111
|
-
currentUser: CurrentUser | null
|
|
19112
|
-
getClient: (options: {apiVersion: string}) => SanityClient
|
|
19113
|
-
}
|
|
19114
|
-
|
|
19115
|
-
/** @public */
|
|
19116
|
-
declare type InlineFieldDefinition = {
|
|
19117
|
-
[K in keyof IntrinsicDefinitions]: Omit<
|
|
19118
|
-
IntrinsicDefinitions[K],
|
|
19119
|
-
'initialValue' | 'validation'
|
|
19120
|
-
> & {
|
|
19121
|
-
validation?: SchemaValidationValue
|
|
19122
|
-
initialValue?: InitialValueProperty<any, any>
|
|
19123
|
-
}
|
|
19124
|
-
}
|
|
19125
|
-
|
|
19126
18007
|
/**
|
|
19127
18008
|
* Used to represent native InputEvents that hold a DataTransfer object.
|
|
19128
18009
|
*
|
|
@@ -19141,98 +18022,13 @@ declare type InputBehaviorEvent_2 = {
|
|
|
19141
18022
|
}
|
|
19142
18023
|
}
|
|
19143
18024
|
|
|
19144
|
-
/** @alpha This API may change */
|
|
19145
|
-
declare interface InsertMenuOptions {
|
|
19146
|
-
/**
|
|
19147
|
-
* @defaultValue `'auto'`
|
|
19148
|
-
* `filter: 'auto'` automatically turns on filtering if there are more than 5
|
|
19149
|
-
* schema types added to the menu.
|
|
19150
|
-
*/
|
|
19151
|
-
filter?: 'auto' | boolean
|
|
19152
|
-
groups?: Array<{
|
|
19153
|
-
name: string
|
|
19154
|
-
title?: string
|
|
19155
|
-
of?: Array<string>
|
|
19156
|
-
}>
|
|
19157
|
-
/** defaultValue `true` */
|
|
19158
|
-
showIcons?: boolean
|
|
19159
|
-
/** @defaultValue `[{name: 'list'}]` */
|
|
19160
|
-
views?: Array<
|
|
19161
|
-
| {
|
|
19162
|
-
name: 'list'
|
|
19163
|
-
}
|
|
19164
|
-
| {
|
|
19165
|
-
name: 'grid'
|
|
19166
|
-
previewImageUrl?: (schemaTypeName: string) => string | undefined
|
|
19167
|
-
}
|
|
19168
|
-
>
|
|
19169
|
-
}
|
|
19170
|
-
|
|
19171
18025
|
declare type InsertPlacement_2 = 'auto' | 'after' | 'before'
|
|
19172
18026
|
|
|
19173
18027
|
declare type InternalPatchEvent = NamespaceEvent<PatchEvent, 'internal'> & {
|
|
19174
18028
|
actionId?: string
|
|
19175
|
-
value: Array<
|
|
19176
|
-
}
|
|
19177
|
-
|
|
19178
|
-
/** @public */
|
|
19179
|
-
declare type IntrinsicArrayOfDefinition = {
|
|
19180
|
-
[K in keyof IntrinsicDefinitions]: Omit<
|
|
19181
|
-
ArrayOfEntry<IntrinsicDefinitions[K]>,
|
|
19182
|
-
'validation' | 'initialValue'
|
|
19183
|
-
> & {
|
|
19184
|
-
validation?: SchemaValidationValue
|
|
19185
|
-
initialValue?: InitialValueProperty<any, any>
|
|
19186
|
-
}
|
|
18029
|
+
value: Array<PortableTextBlock>
|
|
19187
18030
|
}
|
|
19188
18031
|
|
|
19189
|
-
/**
|
|
19190
|
-
* `IntrinsicDefinitions` is a lookup map for "predefined" schema definitions.
|
|
19191
|
-
* Schema types in `IntrinsicDefinitions` will have good type-completion and type-safety in {@link defineType},
|
|
19192
|
-
* {@link defineField} and {@link defineArrayMember} once the `type` property is provided.
|
|
19193
|
-
*
|
|
19194
|
-
* By default, `IntrinsicDefinitions` contains all standard Sanity schema types (`array`, `string`, `number` ect),
|
|
19195
|
-
* but it is an interface and as such, open for extension.
|
|
19196
|
-
*
|
|
19197
|
-
* This type can be extended using declaration merging; this way new entries can be added.
|
|
19198
|
-
* See {@link defineType} for examples on how this can be accomplished.
|
|
19199
|
-
*
|
|
19200
|
-
* @see defineType
|
|
19201
|
-
*
|
|
19202
|
-
* @public
|
|
19203
|
-
*/
|
|
19204
|
-
declare interface IntrinsicDefinitions {
|
|
19205
|
-
array: ArrayDefinition
|
|
19206
|
-
block: BlockDefinition
|
|
19207
|
-
boolean: BooleanDefinition
|
|
19208
|
-
date: DateDefinition
|
|
19209
|
-
datetime: DatetimeDefinition
|
|
19210
|
-
document: DocumentDefinition
|
|
19211
|
-
file: FileDefinition
|
|
19212
|
-
geopoint: GeopointDefinition
|
|
19213
|
-
image: ImageDefinition
|
|
19214
|
-
number: NumberDefinition
|
|
19215
|
-
object: ObjectDefinition
|
|
19216
|
-
reference: ReferenceDefinition
|
|
19217
|
-
crossDatasetReference: CrossDatasetReferenceDefinition
|
|
19218
|
-
globalDocumentReference: GlobalDocumentReferenceDefinition
|
|
19219
|
-
slug: SlugDefinition
|
|
19220
|
-
string: StringDefinition
|
|
19221
|
-
text: TextDefinition
|
|
19222
|
-
url: UrlDefinition
|
|
19223
|
-
email: EmailDefinition
|
|
19224
|
-
}
|
|
19225
|
-
|
|
19226
|
-
/**
|
|
19227
|
-
* A union of all intrinsic types allowed natively in the schema.
|
|
19228
|
-
*
|
|
19229
|
-
* @see IntrinsicDefinitions
|
|
19230
|
-
*
|
|
19231
|
-
* @public
|
|
19232
|
-
*/
|
|
19233
|
-
declare type IntrinsicTypeName =
|
|
19234
|
-
IntrinsicDefinitions[keyof IntrinsicDefinitions]['type']
|
|
19235
|
-
|
|
19236
18032
|
/**
|
|
19237
18033
|
* The editor has invalid data in the value that can be resolved by the user
|
|
19238
18034
|
* @beta */
|
|
@@ -19241,11 +18037,7 @@ declare type InvalidValueResolution = {
|
|
|
19241
18037
|
patches: Patch[]
|
|
19242
18038
|
description: string
|
|
19243
18039
|
action: string
|
|
19244
|
-
item:
|
|
19245
|
-
| PortableTextBlock_2[]
|
|
19246
|
-
| PortableTextBlock_2
|
|
19247
|
-
| PortableTextChild
|
|
19248
|
-
| undefined
|
|
18040
|
+
item: PortableTextBlock[] | PortableTextBlock | PortableTextChild | undefined
|
|
19249
18041
|
/**
|
|
19250
18042
|
* i18n keys for the description and action
|
|
19251
18043
|
*
|
|
@@ -19276,11 +18068,6 @@ declare type KeyboardBehaviorEvent =
|
|
|
19276
18068
|
>
|
|
19277
18069
|
}
|
|
19278
18070
|
|
|
19279
|
-
/** @public */
|
|
19280
|
-
declare type KeyedSegment_2 = {
|
|
19281
|
-
_key: string
|
|
19282
|
-
}
|
|
19283
|
-
|
|
19284
18071
|
/**
|
|
19285
18072
|
* @beta
|
|
19286
18073
|
*/
|
|
@@ -19295,22 +18082,6 @@ export declare type LinkBehaviorsConfig = {
|
|
|
19295
18082
|
| undefined
|
|
19296
18083
|
}
|
|
19297
18084
|
|
|
19298
|
-
/**
|
|
19299
|
-
* Holds localized validation messages for a given field.
|
|
19300
|
-
*
|
|
19301
|
-
* @example Custom message for English (US) and Norwegian (Bokmål):
|
|
19302
|
-
* ```
|
|
19303
|
-
* {
|
|
19304
|
-
* 'en-US': 'Needs to start with a capital letter',
|
|
19305
|
-
* 'no-NB': 'Må starte med stor bokstav',
|
|
19306
|
-
* }
|
|
19307
|
-
* ```
|
|
19308
|
-
* @public
|
|
19309
|
-
*/
|
|
19310
|
-
declare interface LocalizedValidationMessages {
|
|
19311
|
-
[locale: string]: string
|
|
19312
|
-
}
|
|
19313
|
-
|
|
19314
18085
|
/**
|
|
19315
18086
|
* @beta
|
|
19316
18087
|
*/
|
|
@@ -19340,21 +18111,6 @@ declare type MouseBehaviorEvent_2 = {
|
|
|
19340
18111
|
position: EventPosition_2
|
|
19341
18112
|
}
|
|
19342
18113
|
|
|
19343
|
-
/** @public */
|
|
19344
|
-
declare interface MultiFieldSet {
|
|
19345
|
-
name: string
|
|
19346
|
-
title?: string
|
|
19347
|
-
description?: string
|
|
19348
|
-
single?: false
|
|
19349
|
-
group?: string | string[]
|
|
19350
|
-
options?: CollapseOptions & {
|
|
19351
|
-
columns?: number
|
|
19352
|
-
}
|
|
19353
|
-
fields: ObjectField[]
|
|
19354
|
-
hidden?: ConditionalProperty
|
|
19355
|
-
readOnly?: ConditionalProperty
|
|
19356
|
-
}
|
|
19357
|
-
|
|
19358
18114
|
/**
|
|
19359
18115
|
* @public
|
|
19360
18116
|
*/
|
|
@@ -19364,8 +18120,8 @@ declare type MutationEvent = {
|
|
|
19364
18120
|
/**
|
|
19365
18121
|
* @deprecated Use `value` instead
|
|
19366
18122
|
*/
|
|
19367
|
-
snapshot: Array<
|
|
19368
|
-
value: Array<
|
|
18123
|
+
snapshot: Array<PortableTextBlock> | undefined
|
|
18124
|
+
value: Array<PortableTextBlock> | undefined
|
|
19369
18125
|
}
|
|
19370
18126
|
|
|
19371
18127
|
declare type NamespacedBehaviorEventType<
|
|
@@ -19422,121 +18178,17 @@ declare const nativeBehaviorEventTypes: readonly [
|
|
|
19422
18178
|
'mouse.click',
|
|
19423
18179
|
]
|
|
19424
18180
|
|
|
19425
|
-
/** @public */
|
|
19426
|
-
declare interface NumberDefinition extends BaseSchemaDefinition {
|
|
19427
|
-
type: 'number'
|
|
19428
|
-
options?: NumberOptions
|
|
19429
|
-
placeholder?: string
|
|
19430
|
-
validation?: ValidationBuilder<NumberRule, number>
|
|
19431
|
-
initialValue?: InitialValueProperty<any, number>
|
|
19432
|
-
}
|
|
19433
|
-
|
|
19434
|
-
/** @public */
|
|
19435
|
-
declare interface NumberOptions
|
|
19436
|
-
extends EnumListProps<number>,
|
|
19437
|
-
BaseSchemaTypeOptions {}
|
|
19438
|
-
|
|
19439
|
-
/** @public */
|
|
19440
|
-
declare interface NumberRule extends RuleDef<NumberRule, number> {
|
|
19441
|
-
min: (minNumber: number | FieldReference) => NumberRule
|
|
19442
|
-
max: (maxNumber: number | FieldReference) => NumberRule
|
|
19443
|
-
lessThan: (limit: number | FieldReference) => NumberRule
|
|
19444
|
-
greaterThan: (limit: number | FieldReference) => NumberRule
|
|
19445
|
-
integer: () => NumberRule
|
|
19446
|
-
precision: (limit: number | FieldReference) => NumberRule
|
|
19447
|
-
positive: () => NumberRule
|
|
19448
|
-
negative: () => NumberRule
|
|
19449
|
-
}
|
|
19450
|
-
|
|
19451
|
-
/** @public */
|
|
19452
|
-
declare interface NumberSchemaType extends BaseSchemaType {
|
|
19453
|
-
jsonType: 'number'
|
|
19454
|
-
options?: NumberOptions
|
|
19455
|
-
initialValue?: InitialValueProperty<any, number>
|
|
19456
|
-
}
|
|
19457
|
-
|
|
19458
18181
|
declare type ObjectBlockWithOptionalKey = Omit<PortableTextObject, '_key'> & {
|
|
19459
18182
|
_key?: PortableTextObject['_key']
|
|
19460
18183
|
}
|
|
19461
18184
|
|
|
19462
|
-
/** @public */
|
|
19463
|
-
declare interface ObjectDefinition extends BaseSchemaDefinition {
|
|
19464
|
-
type: 'object'
|
|
19465
|
-
/**
|
|
19466
|
-
* Object must have at least one field. This is validated at Studio startup.
|
|
19467
|
-
*/
|
|
19468
|
-
fields: FieldDefinition[]
|
|
19469
|
-
groups?: FieldGroupDefinition[]
|
|
19470
|
-
fieldsets?: FieldsetDefinition[]
|
|
19471
|
-
preview?: PreviewConfig
|
|
19472
|
-
options?: ObjectOptions
|
|
19473
|
-
validation?: ValidationBuilder<ObjectRule, Record<string, unknown>>
|
|
19474
|
-
initialValue?: InitialValueProperty<any, Record<string, unknown>>
|
|
19475
|
-
}
|
|
19476
|
-
|
|
19477
|
-
/** @public */
|
|
19478
|
-
declare interface ObjectField<T extends SchemaType = SchemaType> {
|
|
19479
|
-
name: string
|
|
19480
|
-
fieldset?: string
|
|
19481
|
-
group?: string | string[]
|
|
19482
|
-
type: ObjectFieldType<T>
|
|
19483
|
-
}
|
|
19484
|
-
|
|
19485
|
-
/** @public */
|
|
19486
|
-
declare type ObjectFieldType<T extends SchemaType = SchemaType> = T & {
|
|
19487
|
-
hidden?: ConditionalProperty
|
|
19488
|
-
readOnly?: ConditionalProperty
|
|
19489
|
-
}
|
|
19490
|
-
|
|
19491
|
-
/** @public */
|
|
19492
|
-
declare interface ObjectOptions extends BaseSchemaTypeOptions {
|
|
19493
|
-
collapsible?: boolean
|
|
19494
|
-
collapsed?: boolean
|
|
19495
|
-
columns?: number
|
|
19496
|
-
modal?: {
|
|
19497
|
-
type?: 'dialog' | 'popover'
|
|
19498
|
-
width?: number | number[] | 'auto'
|
|
19499
|
-
}
|
|
19500
|
-
}
|
|
19501
|
-
|
|
19502
|
-
/** @public */
|
|
19503
|
-
declare interface ObjectRule
|
|
19504
|
-
extends RuleDef<ObjectRule, Record<string, unknown>> {}
|
|
19505
|
-
|
|
19506
|
-
/** @public */
|
|
19507
|
-
declare interface ObjectSchemaType extends BaseSchemaType {
|
|
19508
|
-
jsonType: 'object'
|
|
19509
|
-
fields: ObjectField[]
|
|
19510
|
-
groups?: FieldGroup[]
|
|
19511
|
-
fieldsets?: Fieldset[]
|
|
19512
|
-
initialValue?: InitialValueProperty<any, Record<string, unknown>>
|
|
19513
|
-
weak?: boolean
|
|
19514
|
-
/** @deprecated Unused. Use the new field-level search config. */
|
|
19515
|
-
__experimental_search?: {
|
|
19516
|
-
path: (string | number)[]
|
|
19517
|
-
weight: number
|
|
19518
|
-
mapWith?: string
|
|
19519
|
-
}[]
|
|
19520
|
-
/** @alpha */
|
|
19521
|
-
__experimental_omnisearch_visibility?: boolean
|
|
19522
|
-
/** @alpha */
|
|
19523
|
-
__experimental_actions?: string[]
|
|
19524
|
-
/** @alpha */
|
|
19525
|
-
__experimental_formPreviewTitle?: boolean
|
|
19526
|
-
/**
|
|
19527
|
-
* @beta
|
|
19528
|
-
*/
|
|
19529
|
-
orderings?: SortOrdering[]
|
|
19530
|
-
options?: any
|
|
19531
|
-
}
|
|
19532
|
-
|
|
19533
18185
|
/**
|
|
19534
18186
|
* @public
|
|
19535
18187
|
*/
|
|
19536
18188
|
declare type PatchesEvent = {
|
|
19537
18189
|
type: 'patches'
|
|
19538
18190
|
patches: Array<Patch>
|
|
19539
|
-
snapshot: Array<
|
|
18191
|
+
snapshot: Array<PortableTextBlock> | undefined
|
|
19540
18192
|
}
|
|
19541
18193
|
|
|
19542
18194
|
declare type PatchEvent = {
|
|
@@ -19544,12 +18196,6 @@ declare type PatchEvent = {
|
|
|
19544
18196
|
patch: Patch
|
|
19545
18197
|
}
|
|
19546
18198
|
|
|
19547
|
-
/** @public */
|
|
19548
|
-
declare type Path = PathSegment[]
|
|
19549
|
-
|
|
19550
|
-
/** @public */
|
|
19551
|
-
declare type PathSegment = string | number | KeyedSegment_2 | IndexTuple
|
|
19552
|
-
|
|
19553
18199
|
/**
|
|
19554
18200
|
* @internal
|
|
19555
18201
|
*/
|
|
@@ -19559,18 +18205,6 @@ declare type PickFromUnion_2<
|
|
|
19559
18205
|
TPickedTags extends TUnion[TTagKey],
|
|
19560
18206
|
> = TUnion extends Record<TTagKey, TPickedTags> ? TUnion : never
|
|
19561
18207
|
|
|
19562
|
-
/** @alpha */
|
|
19563
|
-
declare type PortableTextBlock_2 = PortableTextTextBlock | PortableTextObject
|
|
19564
|
-
|
|
19565
|
-
/** @alpha */
|
|
19566
|
-
declare type PortableTextChild = PortableTextObject | PortableTextSpan
|
|
19567
|
-
|
|
19568
|
-
/** @alpha */
|
|
19569
|
-
declare interface PortableTextListBlock extends PortableTextTextBlock {
|
|
19570
|
-
listItem: string
|
|
19571
|
-
level: number
|
|
19572
|
-
}
|
|
19573
|
-
|
|
19574
18208
|
/** @beta */
|
|
19575
18209
|
declare type PortableTextMemberSchemaTypes = {
|
|
19576
18210
|
annotations: (ObjectSchemaType & {
|
|
@@ -19580,19 +18214,12 @@ declare type PortableTextMemberSchemaTypes = {
|
|
|
19580
18214
|
blockObjects: ObjectSchemaType[]
|
|
19581
18215
|
decorators: BlockDecoratorDefinition[]
|
|
19582
18216
|
inlineObjects: ObjectSchemaType[]
|
|
19583
|
-
portableText: ArraySchemaType<
|
|
18217
|
+
portableText: ArraySchemaType<PortableTextBlock>
|
|
19584
18218
|
span: ObjectSchemaType
|
|
19585
18219
|
styles: BlockStyleDefinition[]
|
|
19586
18220
|
lists: BlockListDefinition[]
|
|
19587
18221
|
}
|
|
19588
18222
|
|
|
19589
|
-
/** @alpha */
|
|
19590
|
-
declare interface PortableTextObject {
|
|
19591
|
-
_type: string
|
|
19592
|
-
_key: string
|
|
19593
|
-
[other: string]: unknown
|
|
19594
|
-
}
|
|
19595
|
-
|
|
19596
18223
|
declare interface PortableTextSlateEditor extends ReactEditor {
|
|
19597
18224
|
_key: 'editor'
|
|
19598
18225
|
_type: 'editor'
|
|
@@ -19626,57 +18253,6 @@ declare interface PortableTextSlateEditor extends ReactEditor {
|
|
|
19626
18253
|
redo: () => void
|
|
19627
18254
|
}
|
|
19628
18255
|
|
|
19629
|
-
/** @alpha */
|
|
19630
|
-
declare interface PortableTextSpan {
|
|
19631
|
-
_key: string
|
|
19632
|
-
_type: 'span'
|
|
19633
|
-
text: string
|
|
19634
|
-
marks?: string[]
|
|
19635
|
-
}
|
|
19636
|
-
|
|
19637
|
-
/** @alpha */
|
|
19638
|
-
declare interface PortableTextTextBlock<
|
|
19639
|
-
TChild = PortableTextSpan | PortableTextObject,
|
|
19640
|
-
> {
|
|
19641
|
-
_type: string
|
|
19642
|
-
_key: string
|
|
19643
|
-
children: TChild[]
|
|
19644
|
-
markDefs?: PortableTextObject[]
|
|
19645
|
-
listItem?: string
|
|
19646
|
-
style?: string
|
|
19647
|
-
level?: number
|
|
19648
|
-
}
|
|
19649
|
-
|
|
19650
|
-
/** @public */
|
|
19651
|
-
declare interface PrepareViewOptions {
|
|
19652
|
-
/** @beta */
|
|
19653
|
-
ordering?: SortOrdering
|
|
19654
|
-
}
|
|
19655
|
-
|
|
19656
|
-
/** @public */
|
|
19657
|
-
declare interface PreviewConfig<
|
|
19658
|
-
Select extends Record<string, string> = Record<string, string>,
|
|
19659
|
-
PrepareValue extends Record<keyof Select, any> = Record<keyof Select, any>,
|
|
19660
|
-
> {
|
|
19661
|
-
select?: Select
|
|
19662
|
-
prepare?: (
|
|
19663
|
-
value: PrepareValue,
|
|
19664
|
-
viewOptions?: PrepareViewOptions,
|
|
19665
|
-
) => PreviewValue
|
|
19666
|
-
}
|
|
19667
|
-
|
|
19668
|
-
/** @public */
|
|
19669
|
-
declare interface PreviewValue {
|
|
19670
|
-
_id?: string
|
|
19671
|
-
_createdAt?: string
|
|
19672
|
-
_updatedAt?: string
|
|
19673
|
-
title?: string
|
|
19674
|
-
subtitle?: string
|
|
19675
|
-
description?: string
|
|
19676
|
-
media?: ReactNode | ElementType
|
|
19677
|
-
imageUrl?: string
|
|
19678
|
-
}
|
|
19679
|
-
|
|
19680
18256
|
/**
|
|
19681
18257
|
* @beta
|
|
19682
18258
|
*/
|
|
@@ -19684,111 +18260,6 @@ export declare function raise(
|
|
|
19684
18260
|
event: SyntheticBehaviorEvent | CustomBehaviorEvent,
|
|
19685
18261
|
): PickFromUnion_2<BehaviorAction, 'type', 'raise'>
|
|
19686
18262
|
|
|
19687
|
-
/** @public */
|
|
19688
|
-
declare interface Reference {
|
|
19689
|
-
_type: string
|
|
19690
|
-
_ref: string
|
|
19691
|
-
_key?: string
|
|
19692
|
-
_weak?: boolean
|
|
19693
|
-
_strengthenOnPublish?: {
|
|
19694
|
-
type: string
|
|
19695
|
-
weak?: boolean
|
|
19696
|
-
template?: {
|
|
19697
|
-
id: string
|
|
19698
|
-
params: Record<string, string | number | boolean>
|
|
19699
|
-
}
|
|
19700
|
-
}
|
|
19701
|
-
}
|
|
19702
|
-
|
|
19703
|
-
/** @public */
|
|
19704
|
-
declare interface ReferenceBaseOptions extends BaseSchemaTypeOptions {
|
|
19705
|
-
disableNew?: boolean
|
|
19706
|
-
}
|
|
19707
|
-
|
|
19708
|
-
/** @public */
|
|
19709
|
-
declare interface ReferenceDefinition extends BaseSchemaDefinition {
|
|
19710
|
-
type: 'reference'
|
|
19711
|
-
to: ReferenceTo
|
|
19712
|
-
weak?: boolean
|
|
19713
|
-
options?: ReferenceOptions
|
|
19714
|
-
validation?: ValidationBuilder<ReferenceRule, ReferenceValue>
|
|
19715
|
-
initialValue?: InitialValueProperty<any, Omit<ReferenceValue, '_type'>>
|
|
19716
|
-
}
|
|
19717
|
-
|
|
19718
|
-
/** @public */
|
|
19719
|
-
declare type ReferenceFilterOptions =
|
|
19720
|
-
| ReferenceFilterResolverOptions
|
|
19721
|
-
| ReferenceFilterQueryOptions
|
|
19722
|
-
|
|
19723
|
-
/** @public */
|
|
19724
|
-
declare interface ReferenceFilterQueryOptions {
|
|
19725
|
-
filter: string
|
|
19726
|
-
filterParams?: Record<string, unknown>
|
|
19727
|
-
}
|
|
19728
|
-
|
|
19729
|
-
/** @public */
|
|
19730
|
-
declare type ReferenceFilterResolver = (
|
|
19731
|
-
context: ReferenceFilterResolverContext,
|
|
19732
|
-
) => ReferenceFilterSearchOptions | Promise<ReferenceFilterSearchOptions>
|
|
19733
|
-
|
|
19734
|
-
/** @public */
|
|
19735
|
-
declare interface ReferenceFilterResolverContext {
|
|
19736
|
-
document: SanityDocument
|
|
19737
|
-
parent?: Record<string, unknown> | Record<string, unknown>[]
|
|
19738
|
-
parentPath: Path
|
|
19739
|
-
getClient: (options: {apiVersion: string}) => SanityClient
|
|
19740
|
-
}
|
|
19741
|
-
|
|
19742
|
-
/** @public */
|
|
19743
|
-
declare interface ReferenceFilterResolverOptions {
|
|
19744
|
-
filter?: ReferenceFilterResolver
|
|
19745
|
-
filterParams?: never
|
|
19746
|
-
}
|
|
19747
|
-
|
|
19748
|
-
/** @public */
|
|
19749
|
-
declare type ReferenceFilterSearchOptions = {
|
|
19750
|
-
filter?: string
|
|
19751
|
-
params?: Record<string, unknown>
|
|
19752
|
-
tag?: string
|
|
19753
|
-
maxFieldDepth?: number
|
|
19754
|
-
strategy?: SearchStrategy
|
|
19755
|
-
perspective?: ClientPerspective
|
|
19756
|
-
}
|
|
19757
|
-
|
|
19758
|
-
/**
|
|
19759
|
-
* Types are closed for extension. To add properties via declaration merging to this type,
|
|
19760
|
-
* redeclare and add the properties to the interfaces that make up ReferenceOptions type.
|
|
19761
|
-
*
|
|
19762
|
-
* @see ReferenceFilterOptions
|
|
19763
|
-
* @see ReferenceFilterResolverOptions
|
|
19764
|
-
* @see ReferenceBaseOptions
|
|
19765
|
-
*
|
|
19766
|
-
* @public
|
|
19767
|
-
*/
|
|
19768
|
-
declare type ReferenceOptions = ReferenceBaseOptions & ReferenceFilterOptions
|
|
19769
|
-
|
|
19770
|
-
/** @public */
|
|
19771
|
-
declare interface ReferenceRule
|
|
19772
|
-
extends RuleDef<ReferenceRule, ReferenceValue> {}
|
|
19773
|
-
|
|
19774
|
-
/** @public */
|
|
19775
|
-
declare interface ReferenceSchemaType
|
|
19776
|
-
extends Omit<ObjectSchemaType, 'options'> {
|
|
19777
|
-
jsonType: 'object'
|
|
19778
|
-
to: ObjectSchemaType[]
|
|
19779
|
-
weak?: boolean
|
|
19780
|
-
options?: ReferenceOptions
|
|
19781
|
-
}
|
|
19782
|
-
|
|
19783
|
-
/** @public */
|
|
19784
|
-
declare type ReferenceTo =
|
|
19785
|
-
| SchemaTypeDefinition
|
|
19786
|
-
| TypeReference
|
|
19787
|
-
| Array<SchemaTypeDefinition | TypeReference>
|
|
19788
|
-
|
|
19789
|
-
/** @public */
|
|
19790
|
-
declare type ReferenceValue = Reference
|
|
19791
|
-
|
|
19792
18263
|
/**************************************
|
|
19793
18264
|
* Resolve behavior event
|
|
19794
18265
|
**************************************/
|
|
@@ -19814,437 +18285,6 @@ declare type ResolveBehaviorEvent<
|
|
|
19814
18285
|
? PickFromUnion_2<BehaviorEvent, 'type', TBehaviorEventType>
|
|
19815
18286
|
: never
|
|
19816
18287
|
|
|
19817
|
-
/** @public */
|
|
19818
|
-
declare interface Role {
|
|
19819
|
-
name: string
|
|
19820
|
-
title: string
|
|
19821
|
-
description?: string
|
|
19822
|
-
}
|
|
19823
|
-
|
|
19824
|
-
/** @public */
|
|
19825
|
-
declare interface Rule {
|
|
19826
|
-
/**
|
|
19827
|
-
* @internal
|
|
19828
|
-
* @deprecated internal use only
|
|
19829
|
-
*/
|
|
19830
|
-
_type: RuleTypeConstraint | undefined
|
|
19831
|
-
/**
|
|
19832
|
-
* @internal
|
|
19833
|
-
* @deprecated internal use only
|
|
19834
|
-
*/
|
|
19835
|
-
_level: 'error' | 'warning' | 'info' | undefined
|
|
19836
|
-
/**
|
|
19837
|
-
* @internal
|
|
19838
|
-
* @deprecated internal use only
|
|
19839
|
-
*/
|
|
19840
|
-
_required: 'required' | 'optional' | undefined
|
|
19841
|
-
/**
|
|
19842
|
-
* @internal
|
|
19843
|
-
* @deprecated internal use only
|
|
19844
|
-
*/
|
|
19845
|
-
_typeDef: SchemaType | undefined
|
|
19846
|
-
/**
|
|
19847
|
-
* @internal
|
|
19848
|
-
* @deprecated internal use only
|
|
19849
|
-
*/
|
|
19850
|
-
_message: string | LocalizedValidationMessages | undefined
|
|
19851
|
-
/**
|
|
19852
|
-
* @internal
|
|
19853
|
-
* @deprecated internal use only
|
|
19854
|
-
*/
|
|
19855
|
-
_rules: RuleSpec[]
|
|
19856
|
-
/**
|
|
19857
|
-
* @internal
|
|
19858
|
-
* @deprecated internal use only
|
|
19859
|
-
*/
|
|
19860
|
-
_fieldRules: FieldRules | undefined
|
|
19861
|
-
/**
|
|
19862
|
-
* Takes in a path and returns an object with a symbol.
|
|
19863
|
-
*
|
|
19864
|
-
* When the validation lib sees this symbol, it will use the provided path to
|
|
19865
|
-
* get a value from the current field's parent and use that value as the input
|
|
19866
|
-
* to the Rule.
|
|
19867
|
-
*
|
|
19868
|
-
* The path that's given is forwarded to `lodash/get`
|
|
19869
|
-
*
|
|
19870
|
-
* ```js
|
|
19871
|
-
* fields: [
|
|
19872
|
-
* // ...
|
|
19873
|
-
* {
|
|
19874
|
-
* // ...
|
|
19875
|
-
* name: 'highestTemperature',
|
|
19876
|
-
* type: 'number',
|
|
19877
|
-
* validation: (Rule) => Rule.positive().min(Rule.valueOfField('lowestTemperature')),
|
|
19878
|
-
* // ...
|
|
19879
|
-
* },
|
|
19880
|
-
* ]
|
|
19881
|
-
* ```
|
|
19882
|
-
*/
|
|
19883
|
-
valueOfField: (path: string | string[]) => FieldReference
|
|
19884
|
-
error(message?: string | LocalizedValidationMessages): Rule
|
|
19885
|
-
warning(message?: string | LocalizedValidationMessages): Rule
|
|
19886
|
-
info(message?: string | LocalizedValidationMessages): Rule
|
|
19887
|
-
reset(): this
|
|
19888
|
-
isRequired(): boolean
|
|
19889
|
-
clone(): Rule
|
|
19890
|
-
cloneWithRules(rules: RuleSpec[]): Rule
|
|
19891
|
-
merge(rule: Rule): Rule
|
|
19892
|
-
type(targetType: RuleTypeConstraint | Lowercase<RuleTypeConstraint>): Rule
|
|
19893
|
-
all(children: Rule[]): Rule
|
|
19894
|
-
either(children: Rule[]): Rule
|
|
19895
|
-
optional(): Rule
|
|
19896
|
-
required(): Rule
|
|
19897
|
-
custom<T = unknown>(
|
|
19898
|
-
fn: CustomValidator<T>,
|
|
19899
|
-
options?: {
|
|
19900
|
-
bypassConcurrencyLimit?: boolean
|
|
19901
|
-
},
|
|
19902
|
-
): Rule
|
|
19903
|
-
min(len: number | string | FieldReference): Rule
|
|
19904
|
-
max(len: number | string | FieldReference): Rule
|
|
19905
|
-
length(len: number | FieldReference): Rule
|
|
19906
|
-
valid(value: unknown | unknown[]): Rule
|
|
19907
|
-
integer(): Rule
|
|
19908
|
-
precision(limit: number | FieldReference): Rule
|
|
19909
|
-
positive(): Rule
|
|
19910
|
-
negative(): Rule
|
|
19911
|
-
greaterThan(num: number | FieldReference): Rule
|
|
19912
|
-
lessThan(num: number | FieldReference): Rule
|
|
19913
|
-
uppercase(): Rule
|
|
19914
|
-
lowercase(): Rule
|
|
19915
|
-
regex(
|
|
19916
|
-
pattern: RegExp,
|
|
19917
|
-
name: string,
|
|
19918
|
-
options: {
|
|
19919
|
-
name?: string
|
|
19920
|
-
invert?: boolean
|
|
19921
|
-
},
|
|
19922
|
-
): Rule
|
|
19923
|
-
regex(
|
|
19924
|
-
pattern: RegExp,
|
|
19925
|
-
options: {
|
|
19926
|
-
name?: string
|
|
19927
|
-
invert?: boolean
|
|
19928
|
-
},
|
|
19929
|
-
): Rule
|
|
19930
|
-
regex(pattern: RegExp, name: string): Rule
|
|
19931
|
-
regex(pattern: RegExp): Rule
|
|
19932
|
-
email(): Rule
|
|
19933
|
-
uri(options?: UriValidationOptions): Rule
|
|
19934
|
-
unique(): Rule
|
|
19935
|
-
reference(): Rule
|
|
19936
|
-
fields(rules: FieldRules): Rule
|
|
19937
|
-
assetRequired(): Rule
|
|
19938
|
-
validate(
|
|
19939
|
-
value: unknown,
|
|
19940
|
-
options: ValidationContext & {
|
|
19941
|
-
/**
|
|
19942
|
-
* @deprecated Internal use only
|
|
19943
|
-
* @internal
|
|
19944
|
-
*/
|
|
19945
|
-
__internal?: {
|
|
19946
|
-
customValidationConcurrencyLimiter?: {
|
|
19947
|
-
ready: () => Promise<void>
|
|
19948
|
-
release: () => void
|
|
19949
|
-
}
|
|
19950
|
-
}
|
|
19951
|
-
},
|
|
19952
|
-
): Promise<ValidationMarker[]>
|
|
19953
|
-
}
|
|
19954
|
-
|
|
19955
|
-
/** @public */
|
|
19956
|
-
declare type RuleBuilder<
|
|
19957
|
-
T extends RuleDef<T, FieldValue>,
|
|
19958
|
-
FieldValue = unknown,
|
|
19959
|
-
> = T | T[]
|
|
19960
|
-
|
|
19961
|
-
/** @public */
|
|
19962
|
-
declare interface RuleDef<T, FieldValue = unknown> {
|
|
19963
|
-
required: () => T
|
|
19964
|
-
custom: <LenientFieldValue extends FieldValue>(
|
|
19965
|
-
fn: CustomValidator<LenientFieldValue | undefined>,
|
|
19966
|
-
) => T
|
|
19967
|
-
info: (message?: string | LocalizedValidationMessages) => T
|
|
19968
|
-
error: (message?: string | LocalizedValidationMessages) => T
|
|
19969
|
-
warning: (message?: string | LocalizedValidationMessages) => T
|
|
19970
|
-
valueOfField: (path: string | string[]) => FieldReference
|
|
19971
|
-
}
|
|
19972
|
-
|
|
19973
|
-
/** @public */
|
|
19974
|
-
declare type RuleSpec =
|
|
19975
|
-
| {
|
|
19976
|
-
flag: 'integer'
|
|
19977
|
-
}
|
|
19978
|
-
| {
|
|
19979
|
-
flag: 'email'
|
|
19980
|
-
}
|
|
19981
|
-
| {
|
|
19982
|
-
flag: 'unique'
|
|
19983
|
-
}
|
|
19984
|
-
| {
|
|
19985
|
-
flag: 'reference'
|
|
19986
|
-
}
|
|
19987
|
-
| {
|
|
19988
|
-
flag: 'type'
|
|
19989
|
-
constraint: RuleTypeConstraint
|
|
19990
|
-
}
|
|
19991
|
-
| {
|
|
19992
|
-
flag: 'all'
|
|
19993
|
-
constraint: Rule[]
|
|
19994
|
-
}
|
|
19995
|
-
| {
|
|
19996
|
-
flag: 'either'
|
|
19997
|
-
constraint: Rule[]
|
|
19998
|
-
}
|
|
19999
|
-
| {
|
|
20000
|
-
flag: 'presence'
|
|
20001
|
-
constraint: 'optional' | 'required'
|
|
20002
|
-
}
|
|
20003
|
-
| {
|
|
20004
|
-
flag: 'custom'
|
|
20005
|
-
constraint: CustomValidator
|
|
20006
|
-
}
|
|
20007
|
-
| {
|
|
20008
|
-
flag: 'min'
|
|
20009
|
-
constraint: number | string
|
|
20010
|
-
}
|
|
20011
|
-
| {
|
|
20012
|
-
flag: 'max'
|
|
20013
|
-
constraint: number | string
|
|
20014
|
-
}
|
|
20015
|
-
| {
|
|
20016
|
-
flag: 'length'
|
|
20017
|
-
constraint: number
|
|
20018
|
-
}
|
|
20019
|
-
| {
|
|
20020
|
-
flag: 'valid'
|
|
20021
|
-
constraint: unknown[]
|
|
20022
|
-
}
|
|
20023
|
-
| {
|
|
20024
|
-
flag: 'precision'
|
|
20025
|
-
constraint: number
|
|
20026
|
-
}
|
|
20027
|
-
| {
|
|
20028
|
-
flag: 'lessThan'
|
|
20029
|
-
constraint: number
|
|
20030
|
-
}
|
|
20031
|
-
| {
|
|
20032
|
-
flag: 'greaterThan'
|
|
20033
|
-
constraint: number
|
|
20034
|
-
}
|
|
20035
|
-
| {
|
|
20036
|
-
flag: 'stringCasing'
|
|
20037
|
-
constraint: 'uppercase' | 'lowercase'
|
|
20038
|
-
}
|
|
20039
|
-
| {
|
|
20040
|
-
flag: 'assetRequired'
|
|
20041
|
-
constraint: {
|
|
20042
|
-
assetType: 'asset' | 'image' | 'file'
|
|
20043
|
-
}
|
|
20044
|
-
}
|
|
20045
|
-
| {
|
|
20046
|
-
flag: 'regex'
|
|
20047
|
-
constraint: {
|
|
20048
|
-
pattern: RegExp
|
|
20049
|
-
name?: string
|
|
20050
|
-
invert: boolean
|
|
20051
|
-
}
|
|
20052
|
-
}
|
|
20053
|
-
| {
|
|
20054
|
-
flag: 'uri'
|
|
20055
|
-
constraint: {
|
|
20056
|
-
options: {
|
|
20057
|
-
scheme: RegExp[]
|
|
20058
|
-
allowRelative: boolean
|
|
20059
|
-
relativeOnly: boolean
|
|
20060
|
-
allowCredentials: boolean
|
|
20061
|
-
}
|
|
20062
|
-
}
|
|
20063
|
-
}
|
|
20064
|
-
|
|
20065
|
-
/** @public */
|
|
20066
|
-
declare type RuleTypeConstraint =
|
|
20067
|
-
| 'Array'
|
|
20068
|
-
| 'Boolean'
|
|
20069
|
-
| 'Date'
|
|
20070
|
-
| 'Number'
|
|
20071
|
-
| 'Object'
|
|
20072
|
-
| 'String'
|
|
20073
|
-
|
|
20074
|
-
/**
|
|
20075
|
-
* Options for configuring how Sanity Create interfaces with the type or field.
|
|
20076
|
-
*
|
|
20077
|
-
* @public
|
|
20078
|
-
*/
|
|
20079
|
-
declare interface SanityCreateOptions {
|
|
20080
|
-
/** Set to true to exclude a type or field from appearing in Sanity Create */
|
|
20081
|
-
exclude?: boolean
|
|
20082
|
-
/**
|
|
20083
|
-
* A short description of what the type or field is used for.
|
|
20084
|
-
* Purpose can be used to improve how and when content mapping uses the field.
|
|
20085
|
-
* */
|
|
20086
|
-
purpose?: string
|
|
20087
|
-
}
|
|
20088
|
-
|
|
20089
|
-
/** @public */
|
|
20090
|
-
declare interface SanityDocument {
|
|
20091
|
-
_id: string
|
|
20092
|
-
_type: string
|
|
20093
|
-
_createdAt: string
|
|
20094
|
-
_updatedAt: string
|
|
20095
|
-
_rev: string
|
|
20096
|
-
[key: string]: unknown
|
|
20097
|
-
}
|
|
20098
|
-
|
|
20099
|
-
/** @public */
|
|
20100
|
-
declare interface Schema {
|
|
20101
|
-
/** @internal */
|
|
20102
|
-
_original?: {
|
|
20103
|
-
name: string
|
|
20104
|
-
types: SchemaTypeDefinition[]
|
|
20105
|
-
}
|
|
20106
|
-
/** @internal */
|
|
20107
|
-
_registry: {
|
|
20108
|
-
[typeName: string]: any
|
|
20109
|
-
}
|
|
20110
|
-
/** @internal */
|
|
20111
|
-
_validation?: SchemaValidationProblemGroup[]
|
|
20112
|
-
name: string
|
|
20113
|
-
get: (name: string) => SchemaType | undefined
|
|
20114
|
-
has: (name: string) => boolean
|
|
20115
|
-
getTypeNames: () => string[]
|
|
20116
|
-
}
|
|
20117
|
-
|
|
20118
|
-
/**
|
|
20119
|
-
* Note: you probably want `SchemaTypeDefinition` instead
|
|
20120
|
-
* @see SchemaTypeDefinition
|
|
20121
|
-
*
|
|
20122
|
-
* @public
|
|
20123
|
-
*/
|
|
20124
|
-
declare type SchemaType =
|
|
20125
|
-
| ArraySchemaType
|
|
20126
|
-
| BooleanSchemaType
|
|
20127
|
-
| FileSchemaType
|
|
20128
|
-
| NumberSchemaType
|
|
20129
|
-
| ObjectSchemaType
|
|
20130
|
-
| StringSchemaType
|
|
20131
|
-
| ReferenceSchemaType
|
|
20132
|
-
|
|
20133
|
-
/**
|
|
20134
|
-
* Represents a Sanity schema type definition with an optional type parameter.
|
|
20135
|
-
*
|
|
20136
|
-
* It's recommend to use the `defineType` helper instead of this type by
|
|
20137
|
-
* itself.
|
|
20138
|
-
*
|
|
20139
|
-
* @see defineType
|
|
20140
|
-
*
|
|
20141
|
-
* @public
|
|
20142
|
-
*/
|
|
20143
|
-
declare type SchemaTypeDefinition<
|
|
20144
|
-
TType extends IntrinsicTypeName = IntrinsicTypeName,
|
|
20145
|
-
> = IntrinsicDefinitions[IntrinsicTypeName] | TypeAliasDefinition<string, TType>
|
|
20146
|
-
|
|
20147
|
-
/** @public */
|
|
20148
|
-
declare interface SchemaValidationError {
|
|
20149
|
-
helpId?: string
|
|
20150
|
-
message: string
|
|
20151
|
-
severity: 'error'
|
|
20152
|
-
}
|
|
20153
|
-
|
|
20154
|
-
/** @internal */
|
|
20155
|
-
declare type SchemaValidationProblem =
|
|
20156
|
-
| SchemaValidationError
|
|
20157
|
-
| SchemaValidationWarning
|
|
20158
|
-
|
|
20159
|
-
/** @internal */
|
|
20160
|
-
declare interface SchemaValidationProblemGroup {
|
|
20161
|
-
path: SchemaValidationProblemPath
|
|
20162
|
-
problems: SchemaValidationProblem[]
|
|
20163
|
-
}
|
|
20164
|
-
|
|
20165
|
-
/** @internal */
|
|
20166
|
-
declare type SchemaValidationProblemPath = Array<
|
|
20167
|
-
| {
|
|
20168
|
-
kind: 'type'
|
|
20169
|
-
type: string
|
|
20170
|
-
name?: string
|
|
20171
|
-
}
|
|
20172
|
-
| {
|
|
20173
|
-
kind: 'property'
|
|
20174
|
-
name: string
|
|
20175
|
-
}
|
|
20176
|
-
>
|
|
20177
|
-
|
|
20178
|
-
/**
|
|
20179
|
-
* Represents the possible values of a schema type's `validation` field.
|
|
20180
|
-
*
|
|
20181
|
-
* If the schema has not been run through `inferFromSchema` from
|
|
20182
|
-
* `sanity/validation` then value could be a function.
|
|
20183
|
-
*
|
|
20184
|
-
* `inferFromSchema` mutates the schema converts this value to an array of
|
|
20185
|
-
* `Rule` instances.
|
|
20186
|
-
*
|
|
20187
|
-
* @privateRemarks
|
|
20188
|
-
*
|
|
20189
|
-
* Usage of the schema inside the studio will almost always be from the compiled
|
|
20190
|
-
* `createSchema` function. In this case, you can cast the value or throw to
|
|
20191
|
-
* narrow the type. E.g.:
|
|
20192
|
-
*
|
|
20193
|
-
* ```ts
|
|
20194
|
-
* if (typeof type.validation === 'function') {
|
|
20195
|
-
* throw new Error(
|
|
20196
|
-
* `Schema type "${type.name}"'s \`validation\` was not run though \`inferFromSchema\``
|
|
20197
|
-
* )
|
|
20198
|
-
* }
|
|
20199
|
-
* ```
|
|
20200
|
-
*
|
|
20201
|
-
* @public
|
|
20202
|
-
*/
|
|
20203
|
-
declare type SchemaValidationValue =
|
|
20204
|
-
| false
|
|
20205
|
-
| undefined
|
|
20206
|
-
| Rule
|
|
20207
|
-
| SchemaValidationValue[]
|
|
20208
|
-
| ((rule: Rule) => SchemaValidationValue)
|
|
20209
|
-
|
|
20210
|
-
/** @internal */
|
|
20211
|
-
declare interface SchemaValidationWarning {
|
|
20212
|
-
helpId?: string
|
|
20213
|
-
message: string
|
|
20214
|
-
severity: 'warning'
|
|
20215
|
-
}
|
|
20216
|
-
|
|
20217
|
-
/** @public */
|
|
20218
|
-
declare interface SearchConfiguration {
|
|
20219
|
-
search?: {
|
|
20220
|
-
/**
|
|
20221
|
-
* Defines a search weight for this field to prioritize its importance
|
|
20222
|
-
* during search operations in the Studio. This setting allows the specified
|
|
20223
|
-
* field to be ranked higher in search results compared to other fields.
|
|
20224
|
-
*
|
|
20225
|
-
* By default, all fields are assigned a weight of 1. However, if a field is
|
|
20226
|
-
* chosen as the `title` in the preview configuration's `select` option, it
|
|
20227
|
-
* will automatically receive a default weight of 10. Similarly, if selected
|
|
20228
|
-
* as the `subtitle`, the default weight is 5. Fields marked as
|
|
20229
|
-
* `hidden: true` (no function) are assigned a weight of 0 by default.
|
|
20230
|
-
*
|
|
20231
|
-
* Note: Search weight configuration is currently supported only for fields
|
|
20232
|
-
* of type string or portable text arrays.
|
|
20233
|
-
*/
|
|
20234
|
-
weight?: number
|
|
20235
|
-
}
|
|
20236
|
-
}
|
|
20237
|
-
|
|
20238
|
-
/**
|
|
20239
|
-
* @public
|
|
20240
|
-
*/
|
|
20241
|
-
declare const searchStrategies: readonly ['groqLegacy', 'groq2024']
|
|
20242
|
-
|
|
20243
|
-
/**
|
|
20244
|
-
* @public
|
|
20245
|
-
*/
|
|
20246
|
-
declare type SearchStrategy = (typeof searchStrategies)[number]
|
|
20247
|
-
|
|
20248
18288
|
declare type Serializer<TMIMEType extends MIMEType_2> = ({
|
|
20249
18289
|
snapshot,
|
|
20250
18290
|
event,
|
|
@@ -20257,159 +18297,8 @@ declare type Serializer<TMIMEType extends MIMEType_2> = ({
|
|
|
20257
18297
|
'serialization.success' | 'serialization.failure'
|
|
20258
18298
|
>
|
|
20259
18299
|
|
|
20260
|
-
/** @public */
|
|
20261
|
-
declare interface SingleFieldSet {
|
|
20262
|
-
single: true
|
|
20263
|
-
field: ObjectField
|
|
20264
|
-
hidden?: ConditionalProperty
|
|
20265
|
-
readOnly?: ConditionalProperty
|
|
20266
|
-
group?: string | string[]
|
|
20267
|
-
}
|
|
20268
|
-
|
|
20269
|
-
/** @public */
|
|
20270
|
-
declare interface SlugDefinition extends BaseSchemaDefinition {
|
|
20271
|
-
type: 'slug'
|
|
20272
|
-
options?: SlugOptions
|
|
20273
|
-
validation?: ValidationBuilder<SlugRule, SlugValue>
|
|
20274
|
-
initialValue?: InitialValueProperty<any, Omit<SlugValue, '_type'>>
|
|
20275
|
-
}
|
|
20276
|
-
|
|
20277
|
-
/** @public */
|
|
20278
|
-
declare type SlugifierFn = (
|
|
20279
|
-
source: string,
|
|
20280
|
-
schemaType: SlugSchemaType,
|
|
20281
|
-
context: SlugSourceContext,
|
|
20282
|
-
) => string | Promise<string>
|
|
20283
|
-
|
|
20284
|
-
/** @public */
|
|
20285
|
-
declare type SlugIsUniqueValidator = (
|
|
20286
|
-
slug: string,
|
|
20287
|
-
context: SlugValidationContext,
|
|
20288
|
-
) => boolean | Promise<boolean>
|
|
20289
|
-
|
|
20290
|
-
/** @public */
|
|
20291
|
-
declare interface SlugOptions
|
|
20292
|
-
extends SearchConfiguration,
|
|
20293
|
-
BaseSchemaTypeOptions {
|
|
20294
|
-
source?: string | Path | SlugSourceFn
|
|
20295
|
-
maxLength?: number
|
|
20296
|
-
slugify?: SlugifierFn
|
|
20297
|
-
isUnique?: SlugIsUniqueValidator
|
|
20298
|
-
disableArrayWarning?: boolean
|
|
20299
|
-
}
|
|
20300
|
-
|
|
20301
|
-
/** @public */
|
|
20302
|
-
declare type SlugParent = Record<string, unknown> | Record<string, unknown>[]
|
|
20303
|
-
|
|
20304
|
-
/** @public */
|
|
20305
|
-
declare interface SlugRule extends RuleDef<SlugRule, SlugValue> {}
|
|
20306
|
-
|
|
20307
|
-
/** @public */
|
|
20308
|
-
declare interface SlugSchemaType extends ObjectSchemaType {
|
|
20309
|
-
jsonType: 'object'
|
|
20310
|
-
options?: SlugOptions
|
|
20311
|
-
}
|
|
20312
|
-
|
|
20313
|
-
/** @public */
|
|
20314
|
-
declare interface SlugSourceContext {
|
|
20315
|
-
parentPath: Path
|
|
20316
|
-
parent: SlugParent
|
|
20317
|
-
projectId: string
|
|
20318
|
-
dataset: string
|
|
20319
|
-
schema: Schema
|
|
20320
|
-
currentUser: CurrentUser | null
|
|
20321
|
-
getClient: (options: {apiVersion: string}) => SanityClient
|
|
20322
|
-
}
|
|
20323
|
-
|
|
20324
|
-
/** @public */
|
|
20325
|
-
declare type SlugSourceFn = (
|
|
20326
|
-
document: SanityDocument,
|
|
20327
|
-
context: SlugSourceContext,
|
|
20328
|
-
) => string | Promise<string>
|
|
20329
|
-
|
|
20330
|
-
/** @public */
|
|
20331
|
-
declare interface SlugValidationContext extends ValidationContext {
|
|
20332
|
-
parent: SlugParent
|
|
20333
|
-
type: SlugSchemaType
|
|
20334
|
-
defaultIsUnique: SlugIsUniqueValidator
|
|
20335
|
-
}
|
|
20336
|
-
|
|
20337
|
-
/** @public */
|
|
20338
|
-
declare interface SlugValue {
|
|
20339
|
-
_type: 'slug'
|
|
20340
|
-
current?: string
|
|
20341
|
-
}
|
|
20342
|
-
|
|
20343
|
-
/** @beta */
|
|
20344
|
-
declare type SortOrdering = {
|
|
20345
|
-
title: string
|
|
20346
|
-
i18n?: I18nTextRecord<'title'>
|
|
20347
|
-
name: string
|
|
20348
|
-
by: SortOrderingItem[]
|
|
20349
|
-
}
|
|
20350
|
-
|
|
20351
|
-
/** @beta */
|
|
20352
|
-
declare interface SortOrderingItem {
|
|
20353
|
-
field: string
|
|
20354
|
-
direction: 'asc' | 'desc'
|
|
20355
|
-
}
|
|
20356
|
-
|
|
20357
18300
|
declare type StrictExtract_2<T, U extends T> = U
|
|
20358
18301
|
|
|
20359
|
-
/** @public */
|
|
20360
|
-
declare interface StringDefinition extends BaseSchemaDefinition {
|
|
20361
|
-
type: 'string'
|
|
20362
|
-
options?: StringOptions
|
|
20363
|
-
placeholder?: string
|
|
20364
|
-
validation?: ValidationBuilder<StringRule, string>
|
|
20365
|
-
initialValue?: InitialValueProperty<any, string>
|
|
20366
|
-
}
|
|
20367
|
-
|
|
20368
|
-
/** @public */
|
|
20369
|
-
declare interface StringOptions
|
|
20370
|
-
extends EnumListProps<string>,
|
|
20371
|
-
SearchConfiguration,
|
|
20372
|
-
BaseSchemaTypeOptions {}
|
|
20373
|
-
|
|
20374
|
-
/** @public */
|
|
20375
|
-
declare interface StringRule extends RuleDef<StringRule, string> {
|
|
20376
|
-
min: (minNumber: number | FieldReference) => StringRule
|
|
20377
|
-
max: (maxNumber: number | FieldReference) => StringRule
|
|
20378
|
-
length: (exactLength: number | FieldReference) => StringRule
|
|
20379
|
-
uppercase: () => StringRule
|
|
20380
|
-
lowercase: () => StringRule
|
|
20381
|
-
regex(
|
|
20382
|
-
pattern: RegExp,
|
|
20383
|
-
name: string,
|
|
20384
|
-
options: {
|
|
20385
|
-
name?: string
|
|
20386
|
-
invert?: boolean
|
|
20387
|
-
},
|
|
20388
|
-
): StringRule
|
|
20389
|
-
regex(
|
|
20390
|
-
pattern: RegExp,
|
|
20391
|
-
options: {
|
|
20392
|
-
name?: string
|
|
20393
|
-
invert?: boolean
|
|
20394
|
-
},
|
|
20395
|
-
): StringRule
|
|
20396
|
-
regex(pattern: RegExp, name: string): StringRule
|
|
20397
|
-
regex(pattern: RegExp): StringRule
|
|
20398
|
-
email(): StringRule
|
|
20399
|
-
}
|
|
20400
|
-
|
|
20401
|
-
/**
|
|
20402
|
-
* This is used for string, text, date and datetime.
|
|
20403
|
-
* This interface represent the compiled version at runtime, when accessed through Schema.
|
|
20404
|
-
*
|
|
20405
|
-
* @public
|
|
20406
|
-
*/
|
|
20407
|
-
declare interface StringSchemaType extends BaseSchemaType {
|
|
20408
|
-
jsonType: 'string'
|
|
20409
|
-
options?: StringOptions & TextOptions & DateOptions & DatetimeOptions
|
|
20410
|
-
initialValue?: InitialValueProperty<any, string>
|
|
20411
|
-
}
|
|
20412
|
-
|
|
20413
18302
|
/**
|
|
20414
18303
|
* @beta
|
|
20415
18304
|
*/
|
|
@@ -20431,12 +18320,12 @@ export declare type SyntheticBehaviorEvent =
|
|
|
20431
18320
|
}
|
|
20432
18321
|
| {
|
|
20433
18322
|
type: StrictExtract_2<SyntheticBehaviorEventType, 'block.set'>
|
|
20434
|
-
at: [
|
|
18323
|
+
at: [KeyedSegment]
|
|
20435
18324
|
props: Record<string, unknown>
|
|
20436
18325
|
}
|
|
20437
18326
|
| {
|
|
20438
18327
|
type: StrictExtract_2<SyntheticBehaviorEventType, 'block.unset'>
|
|
20439
|
-
at: [
|
|
18328
|
+
at: [KeyedSegment]
|
|
20440
18329
|
props: Array<string>
|
|
20441
18330
|
}
|
|
20442
18331
|
| {
|
|
@@ -20461,7 +18350,7 @@ export declare type SyntheticBehaviorEvent =
|
|
|
20461
18350
|
}
|
|
20462
18351
|
| {
|
|
20463
18352
|
type: StrictExtract_2<SyntheticBehaviorEventType, 'delete.block'>
|
|
20464
|
-
at: [
|
|
18353
|
+
at: [KeyedSegment]
|
|
20465
18354
|
}
|
|
20466
18355
|
| {
|
|
20467
18356
|
type: StrictExtract_2<SyntheticBehaviorEventType, 'delete.forward'>
|
|
@@ -20509,8 +18398,8 @@ export declare type SyntheticBehaviorEvent =
|
|
|
20509
18398
|
}
|
|
20510
18399
|
| {
|
|
20511
18400
|
type: StrictExtract_2<SyntheticBehaviorEventType, 'move.block'>
|
|
20512
|
-
at: [
|
|
20513
|
-
to: [
|
|
18401
|
+
at: [KeyedSegment]
|
|
18402
|
+
to: [KeyedSegment]
|
|
20514
18403
|
}
|
|
20515
18404
|
| {
|
|
20516
18405
|
type: StrictExtract_2<SyntheticBehaviorEventType, 'move.forward'>
|
|
@@ -20559,199 +18448,9 @@ declare type TextBlockWithOptionalKey = Omit<PortableTextTextBlock, '_key'> & {
|
|
|
20559
18448
|
_key?: PortableTextTextBlock['_key']
|
|
20560
18449
|
}
|
|
20561
18450
|
|
|
20562
|
-
/** @public */
|
|
20563
|
-
declare interface TextDefinition extends BaseSchemaDefinition {
|
|
20564
|
-
type: 'text'
|
|
20565
|
-
rows?: number
|
|
20566
|
-
options?: TextOptions
|
|
20567
|
-
placeholder?: string
|
|
20568
|
-
validation?: ValidationBuilder<TextRule, string>
|
|
20569
|
-
initialValue?: InitialValueProperty<any, string>
|
|
20570
|
-
}
|
|
20571
|
-
|
|
20572
|
-
/** @public */
|
|
20573
|
-
declare interface TextOptions extends StringOptions {}
|
|
20574
|
-
|
|
20575
|
-
/** @public */
|
|
20576
|
-
declare interface TextRule extends StringRule {}
|
|
20577
|
-
|
|
20578
|
-
/** @public */
|
|
20579
|
-
declare interface TitledListValue<V = unknown> {
|
|
20580
|
-
_key?: string
|
|
20581
|
-
title: string
|
|
20582
|
-
value?: V
|
|
20583
|
-
}
|
|
20584
|
-
|
|
20585
|
-
/**
|
|
20586
|
-
* Represents a type definition that is an alias/extension of an existing type
|
|
20587
|
-
* in your schema. Creating a type alias will re-register that existing type
|
|
20588
|
-
* under a different name. You can also override the default type options with
|
|
20589
|
-
* a type alias definition.
|
|
20590
|
-
*
|
|
20591
|
-
* @public
|
|
20592
|
-
*/
|
|
20593
|
-
declare interface TypeAliasDefinition<
|
|
20594
|
-
TType extends string,
|
|
20595
|
-
TAlias extends IntrinsicTypeName | undefined,
|
|
20596
|
-
> extends BaseSchemaDefinition {
|
|
20597
|
-
type: TType
|
|
20598
|
-
options?: TAlias extends IntrinsicTypeName
|
|
20599
|
-
? IntrinsicDefinitions[TAlias]['options']
|
|
20600
|
-
: unknown
|
|
20601
|
-
validation?: SchemaValidationValue
|
|
20602
|
-
initialValue?: InitialValueProperty<any, any>
|
|
20603
|
-
preview?: PreviewConfig
|
|
20604
|
-
components?: {
|
|
20605
|
-
annotation?: ComponentType<any>
|
|
20606
|
-
block?: ComponentType<any>
|
|
20607
|
-
inlineBlock?: ComponentType<any>
|
|
20608
|
-
diff?: ComponentType<any>
|
|
20609
|
-
field?: ComponentType<any>
|
|
20610
|
-
input?: ComponentType<any>
|
|
20611
|
-
item?: ComponentType<any>
|
|
20612
|
-
preview?: ComponentType<any>
|
|
20613
|
-
}
|
|
20614
|
-
}
|
|
20615
|
-
|
|
20616
|
-
/**
|
|
20617
|
-
* Represents a reference to another type registered top-level in your schema.
|
|
20618
|
-
*
|
|
20619
|
-
* @public
|
|
20620
|
-
*/
|
|
20621
|
-
declare interface TypeReference {
|
|
20622
|
-
type: string
|
|
20623
|
-
name?: string
|
|
20624
|
-
icon?: ComponentType | ReactNode
|
|
20625
|
-
options?: {
|
|
20626
|
-
[key: string]: unknown
|
|
20627
|
-
}
|
|
20628
|
-
}
|
|
20629
|
-
|
|
20630
18451
|
declare type UnsetEvent = {
|
|
20631
18452
|
type: 'unset'
|
|
20632
|
-
previousValue: Array<
|
|
20633
|
-
}
|
|
20634
|
-
|
|
20635
|
-
/** @public */
|
|
20636
|
-
declare interface UriValidationOptions {
|
|
20637
|
-
scheme?: (string | RegExp) | Array<string | RegExp>
|
|
20638
|
-
allowRelative?: boolean
|
|
20639
|
-
relativeOnly?: boolean
|
|
20640
|
-
allowCredentials?: boolean
|
|
20641
|
-
}
|
|
20642
|
-
|
|
20643
|
-
/** @public */
|
|
20644
|
-
declare interface UrlDefinition extends BaseSchemaDefinition {
|
|
20645
|
-
type: 'url'
|
|
20646
|
-
options?: UrlOptions
|
|
20647
|
-
placeholder?: string
|
|
20648
|
-
validation?: ValidationBuilder<UrlRule, string>
|
|
20649
|
-
initialValue?: InitialValueProperty<any, string>
|
|
20650
|
-
}
|
|
20651
|
-
|
|
20652
|
-
/** @public */
|
|
20653
|
-
declare interface UrlOptions extends BaseSchemaTypeOptions {}
|
|
20654
|
-
|
|
20655
|
-
/** @public */
|
|
20656
|
-
declare interface UrlRule extends RuleDef<UrlRule, string> {
|
|
20657
|
-
uri(options: UriValidationOptions): UrlRule
|
|
20658
|
-
}
|
|
20659
|
-
|
|
20660
|
-
/** @public */
|
|
20661
|
-
declare type ValidationBuilder<
|
|
20662
|
-
T extends RuleDef<T, FieldValue>,
|
|
20663
|
-
FieldValue = unknown,
|
|
20664
|
-
> = (rule: T) => RuleBuilder<T, FieldValue>
|
|
20665
|
-
|
|
20666
|
-
/**
|
|
20667
|
-
* A context object passed around during validation. This includes the
|
|
20668
|
-
* `Rule.custom` context.
|
|
20669
|
-
*
|
|
20670
|
-
* e.g.
|
|
20671
|
-
*
|
|
20672
|
-
* ```js
|
|
20673
|
-
* Rule.custom((_, validationContext) => {
|
|
20674
|
-
* // ...
|
|
20675
|
-
* })`
|
|
20676
|
-
* ```
|
|
20677
|
-
*
|
|
20678
|
-
* @public
|
|
20679
|
-
*/
|
|
20680
|
-
declare interface ValidationContext {
|
|
20681
|
-
getClient: (options: {apiVersion: string}) => SanityClient
|
|
20682
|
-
schema: Schema
|
|
20683
|
-
parent?: unknown
|
|
20684
|
-
type?: SchemaType
|
|
20685
|
-
document?: SanityDocument
|
|
20686
|
-
path?: Path
|
|
20687
|
-
getDocumentExists?: (options: {id: string}) => Promise<boolean>
|
|
20688
|
-
environment: 'cli' | 'studio'
|
|
20689
|
-
}
|
|
20690
|
-
|
|
20691
|
-
/**
|
|
20692
|
-
* The shape that can be returned from a custom validator to be converted into
|
|
20693
|
-
* a validation marker by the validation logic. Inside of a custom validator,
|
|
20694
|
-
* you can return an array of these in order to specify multiple paths within
|
|
20695
|
-
* an object or array.
|
|
20696
|
-
*
|
|
20697
|
-
* @public
|
|
20698
|
-
*/
|
|
20699
|
-
declare interface ValidationError {
|
|
20700
|
-
/**
|
|
20701
|
-
* The message describing why the value is not valid. This message will be
|
|
20702
|
-
* included in the validation markers after validation has finished running.
|
|
20703
|
-
*/
|
|
20704
|
-
message: string
|
|
20705
|
-
/**
|
|
20706
|
-
* If writing a custom validator, you can return validation messages to
|
|
20707
|
-
* specific path inside of the current value (object or array) by populating
|
|
20708
|
-
* this `path` prop.
|
|
20709
|
-
*
|
|
20710
|
-
* NOTE: This path is relative to the current value and _not_ relative to
|
|
20711
|
-
* the document.
|
|
20712
|
-
*/
|
|
20713
|
-
path?: Path
|
|
20714
|
-
/**
|
|
20715
|
-
* Same as `path` but allows more than one value. If provided, the same
|
|
20716
|
-
* message will create two markers from each path with the same message
|
|
20717
|
-
* provided.
|
|
20718
|
-
*
|
|
20719
|
-
* @deprecated prefer `path`
|
|
20720
|
-
*/
|
|
20721
|
-
paths?: Path[]
|
|
20722
|
-
/**
|
|
20723
|
-
* @deprecated Unused. Was used to store the results from `.either()` /`.all()`
|
|
20724
|
-
*/
|
|
20725
|
-
children?: ValidationMarker[]
|
|
20726
|
-
/**
|
|
20727
|
-
* @deprecated Unused. Was used to signal if this error came from an `.either()`/`.all()`.
|
|
20728
|
-
*/
|
|
20729
|
-
operation?: 'AND' | 'OR'
|
|
20730
|
-
/**
|
|
20731
|
-
* @deprecated Unused. Was relevant when validation error was used as a class.
|
|
20732
|
-
*/
|
|
20733
|
-
cloneWithMessage?(message: string): ValidationError
|
|
20734
|
-
}
|
|
20735
|
-
|
|
20736
|
-
/** @public */
|
|
20737
|
-
declare interface ValidationMarker {
|
|
20738
|
-
level: 'error' | 'warning' | 'info'
|
|
20739
|
-
/**
|
|
20740
|
-
* The validation message for this marker. E.g. "Must be greater than 0"
|
|
20741
|
-
*/
|
|
20742
|
-
message: string
|
|
20743
|
-
/**
|
|
20744
|
-
* @deprecated use `message` instead
|
|
20745
|
-
*/
|
|
20746
|
-
item?: ValidationError
|
|
20747
|
-
/**
|
|
20748
|
-
* The sanity path _relative to the root of the current document_ to this
|
|
20749
|
-
* marker.
|
|
20750
|
-
*
|
|
20751
|
-
* NOTE: Sanity paths may contain keyed segments (i.e. `{_key: string}`) that
|
|
20752
|
-
* are not compatible with deep getters like lodash/get
|
|
20753
|
-
*/
|
|
20754
|
-
path: Path
|
|
18453
|
+
previousValue: Array<PortableTextBlock>
|
|
20755
18454
|
}
|
|
20756
18455
|
|
|
20757
18456
|
export {}
|