@portabletext/editor 1.49.12 → 1.49.13

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.
@@ -1300,6 +1300,142 @@ declare const editorMachine: StateMachine<
1300
1300
  never,
1301
1301
  never
1302
1302
  >,
1303
+ ActionFunction<
1304
+ {
1305
+ behaviors: Set<BehaviorConfig>
1306
+ converters: Set<Converter>
1307
+ getLegacySchema: () => PortableTextMemberSchemaTypes
1308
+ keyGenerator: () => string
1309
+ pendingEvents: Array<InternalPatchEvent | MutationEvent>
1310
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
1311
+ schema: EditorSchema
1312
+ initialReadOnly: boolean
1313
+ maxBlocks: number | undefined
1314
+ selection: EditorSelection
1315
+ initialValue: Array<PortableTextBlock> | undefined
1316
+ internalDrag?: {
1317
+ ghost?: HTMLElement
1318
+ origin: Pick<EventPosition, 'selection'>
1319
+ }
1320
+ slateEditor?: PortableTextSlateEditor
1321
+ },
1322
+ {
1323
+ type: 'update selection'
1324
+ selection: EditorSelection
1325
+ },
1326
+ | InternalPatchEvent
1327
+ | MutationEvent
1328
+ | PatchesEvent
1329
+ | {
1330
+ type: 'update readOnly'
1331
+ readOnly: boolean
1332
+ }
1333
+ | {
1334
+ type: 'update maxBlocks'
1335
+ maxBlocks: number | undefined
1336
+ }
1337
+ | {
1338
+ type: 'add behavior'
1339
+ behaviorConfig: BehaviorConfig
1340
+ }
1341
+ | {
1342
+ type: 'remove behavior'
1343
+ behaviorConfig: BehaviorConfig
1344
+ }
1345
+ | {
1346
+ type: 'blur'
1347
+ editor: PortableTextSlateEditor
1348
+ }
1349
+ | {
1350
+ type: 'focus'
1351
+ editor: PortableTextSlateEditor
1352
+ }
1353
+ | {
1354
+ type: 'normalizing'
1355
+ }
1356
+ | {
1357
+ type: 'update selection'
1358
+ selection: EditorSelection
1359
+ }
1360
+ | {
1361
+ type: 'done normalizing'
1362
+ }
1363
+ | {
1364
+ type: 'done syncing value'
1365
+ }
1366
+ | {
1367
+ type: 'syncing value'
1368
+ }
1369
+ | {
1370
+ type: 'behavior event'
1371
+ behaviorEvent: BehaviorEvent
1372
+ editor: PortableTextSlateEditor
1373
+ nativeEvent?: {
1374
+ preventDefault: () => void
1375
+ }
1376
+ }
1377
+ | {
1378
+ type: 'dragstart'
1379
+ origin: Pick<EventPosition, 'selection'>
1380
+ ghost?: HTMLElement
1381
+ }
1382
+ | {
1383
+ type: 'dragend'
1384
+ }
1385
+ | {
1386
+ type: 'drop'
1387
+ },
1388
+ undefined,
1389
+ never,
1390
+ never,
1391
+ never,
1392
+ never,
1393
+ | InternalPatchEvent
1394
+ | MutationEvent
1395
+ | PatchesEvent
1396
+ | {
1397
+ type: 'blurred'
1398
+ event: FocusEvent_2<HTMLDivElement, Element>
1399
+ }
1400
+ | {
1401
+ type: 'done loading'
1402
+ }
1403
+ | {
1404
+ type: 'editable'
1405
+ }
1406
+ | {
1407
+ type: 'error'
1408
+ name: string
1409
+ description: string
1410
+ data: unknown
1411
+ }
1412
+ | {
1413
+ type: 'focused'
1414
+ event: FocusEvent_2<HTMLDivElement, Element>
1415
+ }
1416
+ | {
1417
+ type: 'invalid value'
1418
+ resolution: InvalidValueResolution | null
1419
+ value: Array<PortableTextBlock> | undefined
1420
+ }
1421
+ | {
1422
+ type: 'loading'
1423
+ }
1424
+ | {
1425
+ type: 'read only'
1426
+ }
1427
+ | {
1428
+ type: 'ready'
1429
+ }
1430
+ | {
1431
+ type: 'selection'
1432
+ selection: EditorSelection
1433
+ }
1434
+ | {
1435
+ type: 'value changed'
1436
+ value: Array<PortableTextBlock> | undefined
1437
+ }
1438
+ >,
1303
1439
  ]
1304
1440
  }
1305
1441
  }
@@ -1300,6 +1300,142 @@ declare const editorMachine: StateMachine<
1300
1300
  never,
1301
1301
  never
1302
1302
  >,
1303
+ ActionFunction<
1304
+ {
1305
+ behaviors: Set<BehaviorConfig>
1306
+ converters: Set<Converter>
1307
+ getLegacySchema: () => PortableTextMemberSchemaTypes
1308
+ keyGenerator: () => string
1309
+ pendingEvents: Array<InternalPatchEvent | MutationEvent>
1310
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
1311
+ schema: EditorSchema
1312
+ initialReadOnly: boolean
1313
+ maxBlocks: number | undefined
1314
+ selection: EditorSelection
1315
+ initialValue: Array<PortableTextBlock> | undefined
1316
+ internalDrag?: {
1317
+ ghost?: HTMLElement
1318
+ origin: Pick<EventPosition, 'selection'>
1319
+ }
1320
+ slateEditor?: PortableTextSlateEditor
1321
+ },
1322
+ {
1323
+ type: 'update selection'
1324
+ selection: EditorSelection
1325
+ },
1326
+ | InternalPatchEvent
1327
+ | MutationEvent
1328
+ | PatchesEvent
1329
+ | {
1330
+ type: 'update readOnly'
1331
+ readOnly: boolean
1332
+ }
1333
+ | {
1334
+ type: 'update maxBlocks'
1335
+ maxBlocks: number | undefined
1336
+ }
1337
+ | {
1338
+ type: 'add behavior'
1339
+ behaviorConfig: BehaviorConfig
1340
+ }
1341
+ | {
1342
+ type: 'remove behavior'
1343
+ behaviorConfig: BehaviorConfig
1344
+ }
1345
+ | {
1346
+ type: 'blur'
1347
+ editor: PortableTextSlateEditor
1348
+ }
1349
+ | {
1350
+ type: 'focus'
1351
+ editor: PortableTextSlateEditor
1352
+ }
1353
+ | {
1354
+ type: 'normalizing'
1355
+ }
1356
+ | {
1357
+ type: 'update selection'
1358
+ selection: EditorSelection
1359
+ }
1360
+ | {
1361
+ type: 'done normalizing'
1362
+ }
1363
+ | {
1364
+ type: 'done syncing value'
1365
+ }
1366
+ | {
1367
+ type: 'syncing value'
1368
+ }
1369
+ | {
1370
+ type: 'behavior event'
1371
+ behaviorEvent: BehaviorEvent
1372
+ editor: PortableTextSlateEditor
1373
+ nativeEvent?: {
1374
+ preventDefault: () => void
1375
+ }
1376
+ }
1377
+ | {
1378
+ type: 'dragstart'
1379
+ origin: Pick<EventPosition, 'selection'>
1380
+ ghost?: HTMLElement
1381
+ }
1382
+ | {
1383
+ type: 'dragend'
1384
+ }
1385
+ | {
1386
+ type: 'drop'
1387
+ },
1388
+ undefined,
1389
+ never,
1390
+ never,
1391
+ never,
1392
+ never,
1393
+ | InternalPatchEvent
1394
+ | MutationEvent
1395
+ | PatchesEvent
1396
+ | {
1397
+ type: 'blurred'
1398
+ event: FocusEvent_2<HTMLDivElement, Element>
1399
+ }
1400
+ | {
1401
+ type: 'done loading'
1402
+ }
1403
+ | {
1404
+ type: 'editable'
1405
+ }
1406
+ | {
1407
+ type: 'error'
1408
+ name: string
1409
+ description: string
1410
+ data: unknown
1411
+ }
1412
+ | {
1413
+ type: 'focused'
1414
+ event: FocusEvent_2<HTMLDivElement, Element>
1415
+ }
1416
+ | {
1417
+ type: 'invalid value'
1418
+ resolution: InvalidValueResolution | null
1419
+ value: Array<PortableTextBlock> | undefined
1420
+ }
1421
+ | {
1422
+ type: 'loading'
1423
+ }
1424
+ | {
1425
+ type: 'read only'
1426
+ }
1427
+ | {
1428
+ type: 'ready'
1429
+ }
1430
+ | {
1431
+ type: 'selection'
1432
+ selection: EditorSelection
1433
+ }
1434
+ | {
1435
+ type: 'value changed'
1436
+ value: Array<PortableTextBlock> | undefined
1437
+ }
1438
+ >,
1303
1439
  ]
1304
1440
  }
1305
1441
  }
@@ -1210,6 +1210,142 @@ declare const editorMachine: StateMachine<
1210
1210
  never,
1211
1211
  never
1212
1212
  >,
1213
+ ActionFunction<
1214
+ {
1215
+ behaviors: Set<BehaviorConfig>
1216
+ converters: Set<Converter>
1217
+ getLegacySchema: () => PortableTextMemberSchemaTypes
1218
+ keyGenerator: () => string
1219
+ pendingEvents: Array<InternalPatchEvent | MutationEvent>
1220
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
1221
+ schema: EditorSchema
1222
+ initialReadOnly: boolean
1223
+ maxBlocks: number | undefined
1224
+ selection: EditorSelection
1225
+ initialValue: Array<PortableTextBlock> | undefined
1226
+ internalDrag?: {
1227
+ ghost?: HTMLElement
1228
+ origin: Pick<EventPosition, 'selection'>
1229
+ }
1230
+ slateEditor?: PortableTextSlateEditor
1231
+ },
1232
+ {
1233
+ type: 'update selection'
1234
+ selection: EditorSelection
1235
+ },
1236
+ | InternalPatchEvent
1237
+ | MutationEvent
1238
+ | PatchesEvent
1239
+ | {
1240
+ type: 'update readOnly'
1241
+ readOnly: boolean
1242
+ }
1243
+ | {
1244
+ type: 'update maxBlocks'
1245
+ maxBlocks: number | undefined
1246
+ }
1247
+ | {
1248
+ type: 'add behavior'
1249
+ behaviorConfig: BehaviorConfig
1250
+ }
1251
+ | {
1252
+ type: 'remove behavior'
1253
+ behaviorConfig: BehaviorConfig
1254
+ }
1255
+ | {
1256
+ type: 'blur'
1257
+ editor: PortableTextSlateEditor
1258
+ }
1259
+ | {
1260
+ type: 'focus'
1261
+ editor: PortableTextSlateEditor
1262
+ }
1263
+ | {
1264
+ type: 'normalizing'
1265
+ }
1266
+ | {
1267
+ type: 'update selection'
1268
+ selection: EditorSelection
1269
+ }
1270
+ | {
1271
+ type: 'done normalizing'
1272
+ }
1273
+ | {
1274
+ type: 'done syncing value'
1275
+ }
1276
+ | {
1277
+ type: 'syncing value'
1278
+ }
1279
+ | {
1280
+ type: 'behavior event'
1281
+ behaviorEvent: BehaviorEvent
1282
+ editor: PortableTextSlateEditor
1283
+ nativeEvent?: {
1284
+ preventDefault: () => void
1285
+ }
1286
+ }
1287
+ | {
1288
+ type: 'dragstart'
1289
+ origin: Pick<EventPosition, 'selection'>
1290
+ ghost?: HTMLElement
1291
+ }
1292
+ | {
1293
+ type: 'dragend'
1294
+ }
1295
+ | {
1296
+ type: 'drop'
1297
+ },
1298
+ undefined,
1299
+ never,
1300
+ never,
1301
+ never,
1302
+ never,
1303
+ | InternalPatchEvent
1304
+ | MutationEvent
1305
+ | PatchesEvent
1306
+ | {
1307
+ type: 'blurred'
1308
+ event: FocusEvent_2<HTMLDivElement, Element>
1309
+ }
1310
+ | {
1311
+ type: 'done loading'
1312
+ }
1313
+ | {
1314
+ type: 'editable'
1315
+ }
1316
+ | {
1317
+ type: 'error'
1318
+ name: string
1319
+ description: string
1320
+ data: unknown
1321
+ }
1322
+ | {
1323
+ type: 'focused'
1324
+ event: FocusEvent_2<HTMLDivElement, Element>
1325
+ }
1326
+ | {
1327
+ type: 'invalid value'
1328
+ resolution: InvalidValueResolution | null
1329
+ value: Array<PortableTextBlock> | undefined
1330
+ }
1331
+ | {
1332
+ type: 'loading'
1333
+ }
1334
+ | {
1335
+ type: 'read only'
1336
+ }
1337
+ | {
1338
+ type: 'ready'
1339
+ }
1340
+ | {
1341
+ type: 'selection'
1342
+ selection: EditorSelection
1343
+ }
1344
+ | {
1345
+ type: 'value changed'
1346
+ value: Array<PortableTextBlock> | undefined
1347
+ }
1348
+ >,
1213
1349
  ]
1214
1350
  }
1215
1351
  }
@@ -1210,6 +1210,142 @@ declare const editorMachine: StateMachine<
1210
1210
  never,
1211
1211
  never
1212
1212
  >,
1213
+ ActionFunction<
1214
+ {
1215
+ behaviors: Set<BehaviorConfig>
1216
+ converters: Set<Converter>
1217
+ getLegacySchema: () => PortableTextMemberSchemaTypes
1218
+ keyGenerator: () => string
1219
+ pendingEvents: Array<InternalPatchEvent | MutationEvent>
1220
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
1221
+ schema: EditorSchema
1222
+ initialReadOnly: boolean
1223
+ maxBlocks: number | undefined
1224
+ selection: EditorSelection
1225
+ initialValue: Array<PortableTextBlock> | undefined
1226
+ internalDrag?: {
1227
+ ghost?: HTMLElement
1228
+ origin: Pick<EventPosition, 'selection'>
1229
+ }
1230
+ slateEditor?: PortableTextSlateEditor
1231
+ },
1232
+ {
1233
+ type: 'update selection'
1234
+ selection: EditorSelection
1235
+ },
1236
+ | InternalPatchEvent
1237
+ | MutationEvent
1238
+ | PatchesEvent
1239
+ | {
1240
+ type: 'update readOnly'
1241
+ readOnly: boolean
1242
+ }
1243
+ | {
1244
+ type: 'update maxBlocks'
1245
+ maxBlocks: number | undefined
1246
+ }
1247
+ | {
1248
+ type: 'add behavior'
1249
+ behaviorConfig: BehaviorConfig
1250
+ }
1251
+ | {
1252
+ type: 'remove behavior'
1253
+ behaviorConfig: BehaviorConfig
1254
+ }
1255
+ | {
1256
+ type: 'blur'
1257
+ editor: PortableTextSlateEditor
1258
+ }
1259
+ | {
1260
+ type: 'focus'
1261
+ editor: PortableTextSlateEditor
1262
+ }
1263
+ | {
1264
+ type: 'normalizing'
1265
+ }
1266
+ | {
1267
+ type: 'update selection'
1268
+ selection: EditorSelection
1269
+ }
1270
+ | {
1271
+ type: 'done normalizing'
1272
+ }
1273
+ | {
1274
+ type: 'done syncing value'
1275
+ }
1276
+ | {
1277
+ type: 'syncing value'
1278
+ }
1279
+ | {
1280
+ type: 'behavior event'
1281
+ behaviorEvent: BehaviorEvent
1282
+ editor: PortableTextSlateEditor
1283
+ nativeEvent?: {
1284
+ preventDefault: () => void
1285
+ }
1286
+ }
1287
+ | {
1288
+ type: 'dragstart'
1289
+ origin: Pick<EventPosition, 'selection'>
1290
+ ghost?: HTMLElement
1291
+ }
1292
+ | {
1293
+ type: 'dragend'
1294
+ }
1295
+ | {
1296
+ type: 'drop'
1297
+ },
1298
+ undefined,
1299
+ never,
1300
+ never,
1301
+ never,
1302
+ never,
1303
+ | InternalPatchEvent
1304
+ | MutationEvent
1305
+ | PatchesEvent
1306
+ | {
1307
+ type: 'blurred'
1308
+ event: FocusEvent_2<HTMLDivElement, Element>
1309
+ }
1310
+ | {
1311
+ type: 'done loading'
1312
+ }
1313
+ | {
1314
+ type: 'editable'
1315
+ }
1316
+ | {
1317
+ type: 'error'
1318
+ name: string
1319
+ description: string
1320
+ data: unknown
1321
+ }
1322
+ | {
1323
+ type: 'focused'
1324
+ event: FocusEvent_2<HTMLDivElement, Element>
1325
+ }
1326
+ | {
1327
+ type: 'invalid value'
1328
+ resolution: InvalidValueResolution | null
1329
+ value: Array<PortableTextBlock> | undefined
1330
+ }
1331
+ | {
1332
+ type: 'loading'
1333
+ }
1334
+ | {
1335
+ type: 'read only'
1336
+ }
1337
+ | {
1338
+ type: 'ready'
1339
+ }
1340
+ | {
1341
+ type: 'selection'
1342
+ selection: EditorSelection
1343
+ }
1344
+ | {
1345
+ type: 'value changed'
1346
+ value: Array<PortableTextBlock> | undefined
1347
+ }
1348
+ >,
1213
1349
  ]
1214
1350
  }
1215
1351
  }
@@ -1280,6 +1280,142 @@ declare const editorMachine: StateMachine<
1280
1280
  never,
1281
1281
  never
1282
1282
  >,
1283
+ ActionFunction<
1284
+ {
1285
+ behaviors: Set<BehaviorConfig>
1286
+ converters: Set<Converter>
1287
+ getLegacySchema: () => PortableTextMemberSchemaTypes
1288
+ keyGenerator: () => string
1289
+ pendingEvents: Array<InternalPatchEvent | MutationEvent>
1290
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
1291
+ schema: EditorSchema
1292
+ initialReadOnly: boolean
1293
+ maxBlocks: number | undefined
1294
+ selection: EditorSelection
1295
+ initialValue: Array<PortableTextBlock> | undefined
1296
+ internalDrag?: {
1297
+ ghost?: HTMLElement
1298
+ origin: Pick<EventPosition, 'selection'>
1299
+ }
1300
+ slateEditor?: PortableTextSlateEditor
1301
+ },
1302
+ {
1303
+ type: 'update selection'
1304
+ selection: EditorSelection
1305
+ },
1306
+ | InternalPatchEvent
1307
+ | MutationEvent
1308
+ | PatchesEvent
1309
+ | {
1310
+ type: 'update readOnly'
1311
+ readOnly: boolean
1312
+ }
1313
+ | {
1314
+ type: 'update maxBlocks'
1315
+ maxBlocks: number | undefined
1316
+ }
1317
+ | {
1318
+ type: 'add behavior'
1319
+ behaviorConfig: BehaviorConfig
1320
+ }
1321
+ | {
1322
+ type: 'remove behavior'
1323
+ behaviorConfig: BehaviorConfig
1324
+ }
1325
+ | {
1326
+ type: 'blur'
1327
+ editor: PortableTextSlateEditor
1328
+ }
1329
+ | {
1330
+ type: 'focus'
1331
+ editor: PortableTextSlateEditor
1332
+ }
1333
+ | {
1334
+ type: 'normalizing'
1335
+ }
1336
+ | {
1337
+ type: 'update selection'
1338
+ selection: EditorSelection
1339
+ }
1340
+ | {
1341
+ type: 'done normalizing'
1342
+ }
1343
+ | {
1344
+ type: 'done syncing value'
1345
+ }
1346
+ | {
1347
+ type: 'syncing value'
1348
+ }
1349
+ | {
1350
+ type: 'behavior event'
1351
+ behaviorEvent: BehaviorEvent
1352
+ editor: PortableTextSlateEditor
1353
+ nativeEvent?: {
1354
+ preventDefault: () => void
1355
+ }
1356
+ }
1357
+ | {
1358
+ type: 'dragstart'
1359
+ origin: Pick<EventPosition, 'selection'>
1360
+ ghost?: HTMLElement
1361
+ }
1362
+ | {
1363
+ type: 'dragend'
1364
+ }
1365
+ | {
1366
+ type: 'drop'
1367
+ },
1368
+ undefined,
1369
+ never,
1370
+ never,
1371
+ never,
1372
+ never,
1373
+ | InternalPatchEvent
1374
+ | MutationEvent
1375
+ | PatchesEvent
1376
+ | {
1377
+ type: 'blurred'
1378
+ event: FocusEvent_2<HTMLDivElement, Element>
1379
+ }
1380
+ | {
1381
+ type: 'done loading'
1382
+ }
1383
+ | {
1384
+ type: 'editable'
1385
+ }
1386
+ | {
1387
+ type: 'error'
1388
+ name: string
1389
+ description: string
1390
+ data: unknown
1391
+ }
1392
+ | {
1393
+ type: 'focused'
1394
+ event: FocusEvent_2<HTMLDivElement, Element>
1395
+ }
1396
+ | {
1397
+ type: 'invalid value'
1398
+ resolution: InvalidValueResolution | null
1399
+ value: Array<PortableTextBlock> | undefined
1400
+ }
1401
+ | {
1402
+ type: 'loading'
1403
+ }
1404
+ | {
1405
+ type: 'read only'
1406
+ }
1407
+ | {
1408
+ type: 'ready'
1409
+ }
1410
+ | {
1411
+ type: 'selection'
1412
+ selection: EditorSelection
1413
+ }
1414
+ | {
1415
+ type: 'value changed'
1416
+ value: Array<PortableTextBlock> | undefined
1417
+ }
1418
+ >,
1283
1419
  ]
1284
1420
  }
1285
1421
  }