@portabletext/editor 4.0.0 → 4.0.1
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/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { useSelector, useActorRef } from "@xstate/react";
|
|
4
|
-
import { createContext,
|
|
4
|
+
import { createContext, useRef, useContext, useState, useEffect, forwardRef, Component, startTransition } from "react";
|
|
5
5
|
import { Element as Element$1, Text, Range, Editor, Node, Point, Path, Transforms, deleteText, Operation, createEditor } from "slate";
|
|
6
6
|
import { useSelected, useSlateSelector, useSlateStatic, ReactEditor, useSlate, Editable, withReact, Slate } from "slate-react";
|
|
7
7
|
import debug$h from "debug";
|
|
@@ -11,7 +11,7 @@ import { isTextBlock, isSpan, compileSchema } from "@portabletext/schema";
|
|
|
11
11
|
import { defineSchema } from "@portabletext/schema";
|
|
12
12
|
import { isEmptyTextBlock, sliceTextBlock, getTextBlockText } from "./_chunks-es/util.slice-text-block.js";
|
|
13
13
|
import { setup, fromCallback, assign, and, enqueueActions, emit, assertEvent, raise as raise$1, not, createActor } from "xstate";
|
|
14
|
-
import {
|
|
14
|
+
import { isSelectionCollapsed as isSelectionCollapsed$1, getFocusSpan as getFocusSpan$1, isOverlappingSelection, getFocusInlineObject, getFocusTextBlock, getSelectedBlocks, isSelectionExpanded, getSelectionStartBlock, getSelectionEndBlock, getFocusBlock as getFocusBlock$1, isSelectingEntireBlocks, getSelectedValue, isActiveAnnotation, getActiveAnnotationsMarks, getActiveDecorators, getSelectionStartChild, getSelectionEndChild, getSelectionStartPoint, getSelectionEndPoint, getPreviousSpan, getNextSpan, getCaretWordSelection, getFocusBlockObject, getPreviousBlock, getNextBlock, getMarkState, isAtTheEndOfBlock, isAtTheStartOfBlock, getFocusListBlock, isActiveDecorator, getFocusChild as getFocusChild$1, getActiveAnnotations, getLastBlock as getLastBlock$1, getSelectedTextBlocks, isActiveListItem, isActiveStyle } from "./_chunks-es/selector.is-at-the-start-of-block.js";
|
|
15
15
|
import { defineBehavior, forward, raise, effect } from "./behaviors/index.js";
|
|
16
16
|
import { compileSchemaDefinitionToPortableTextMemberSchemaTypes, createPortableTextMemberSchemaTypes, portableTextMemberSchemaTypesToSchema } from "@portabletext/sanity-bridge";
|
|
17
17
|
import { htmlToBlocks } from "@portabletext/block-tools";
|
|
@@ -1156,231 +1156,43 @@ function DropIndicator() {
|
|
|
1156
1156
|
zIndex: 5
|
|
1157
1157
|
}, children: /* @__PURE__ */ jsx("span", {}) }), $[0] = t0) : t0 = $[0], t0;
|
|
1158
1158
|
}
|
|
1159
|
-
function createEditorPriority(config) {
|
|
1160
|
-
return {
|
|
1161
|
-
id: defaultKeyGenerator(),
|
|
1162
|
-
name: config?.name,
|
|
1163
|
-
reference: config?.reference
|
|
1164
|
-
};
|
|
1165
|
-
}
|
|
1166
|
-
const corePriority = createEditorPriority({
|
|
1167
|
-
name: "core"
|
|
1168
|
-
});
|
|
1169
|
-
function getDragSelection({
|
|
1170
|
-
eventSelection,
|
|
1171
|
-
snapshot
|
|
1172
|
-
}) {
|
|
1173
|
-
let dragSelection = eventSelection;
|
|
1174
|
-
if (getFocusInlineObject({
|
|
1175
|
-
...snapshot,
|
|
1176
|
-
context: {
|
|
1177
|
-
...snapshot.context,
|
|
1178
|
-
selection: eventSelection
|
|
1179
|
-
}
|
|
1180
|
-
}))
|
|
1181
|
-
return dragSelection;
|
|
1182
|
-
const draggingCollapsedSelection = isSelectionCollapsed$1({
|
|
1183
|
-
context: {
|
|
1184
|
-
...snapshot.context,
|
|
1185
|
-
selection: eventSelection
|
|
1186
|
-
}
|
|
1187
|
-
}), draggedTextBlock = getFocusTextBlock({
|
|
1188
|
-
...snapshot,
|
|
1189
|
-
context: {
|
|
1190
|
-
...snapshot.context,
|
|
1191
|
-
selection: eventSelection
|
|
1192
|
-
}
|
|
1193
|
-
}), draggedSpan = getFocusSpan$1({
|
|
1194
|
-
...snapshot,
|
|
1195
|
-
context: {
|
|
1196
|
-
...snapshot.context,
|
|
1197
|
-
selection: eventSelection
|
|
1198
|
-
}
|
|
1199
|
-
});
|
|
1200
|
-
draggingCollapsedSelection && draggedTextBlock && draggedSpan && (dragSelection = {
|
|
1201
|
-
anchor: getBlockStartPoint({
|
|
1202
|
-
context: snapshot.context,
|
|
1203
|
-
block: draggedTextBlock
|
|
1204
|
-
}),
|
|
1205
|
-
focus: getBlockEndPoint({
|
|
1206
|
-
context: snapshot.context,
|
|
1207
|
-
block: draggedTextBlock
|
|
1208
|
-
})
|
|
1209
|
-
});
|
|
1210
|
-
const selectedBlocks = getSelectedBlocks(snapshot);
|
|
1211
|
-
if (snapshot.context.selection && isSelectionExpanded(snapshot) && selectedBlocks.length > 1) {
|
|
1212
|
-
const selectionStartBlock = getSelectionStartBlock(snapshot), selectionEndBlock = getSelectionEndBlock(snapshot);
|
|
1213
|
-
if (!selectionStartBlock || !selectionEndBlock)
|
|
1214
|
-
return dragSelection;
|
|
1215
|
-
const selectionStartPoint = getBlockStartPoint({
|
|
1216
|
-
context: snapshot.context,
|
|
1217
|
-
block: selectionStartBlock
|
|
1218
|
-
}), selectionEndPoint = getBlockEndPoint({
|
|
1219
|
-
context: snapshot.context,
|
|
1220
|
-
block: selectionEndBlock
|
|
1221
|
-
});
|
|
1222
|
-
isOverlappingSelection(eventSelection)({
|
|
1223
|
-
...snapshot,
|
|
1224
|
-
context: {
|
|
1225
|
-
...snapshot.context,
|
|
1226
|
-
selection: {
|
|
1227
|
-
anchor: selectionStartPoint,
|
|
1228
|
-
focus: selectionEndPoint
|
|
1229
|
-
}
|
|
1230
|
-
}
|
|
1231
|
-
}) && (dragSelection = {
|
|
1232
|
-
anchor: selectionStartPoint,
|
|
1233
|
-
focus: selectionEndPoint
|
|
1234
|
-
});
|
|
1235
|
-
}
|
|
1236
|
-
return dragSelection;
|
|
1237
|
-
}
|
|
1238
|
-
function createCoreBlockElementBehaviorsConfig({
|
|
1239
|
-
key,
|
|
1240
|
-
onSetDragPositionBlock
|
|
1241
|
-
}) {
|
|
1242
|
-
return [{
|
|
1243
|
-
behavior: defineBehavior({
|
|
1244
|
-
on: "drag.dragover",
|
|
1245
|
-
guard: ({
|
|
1246
|
-
snapshot,
|
|
1247
|
-
event
|
|
1248
|
-
}) => {
|
|
1249
|
-
const dropFocusBlock = getFocusBlock$1({
|
|
1250
|
-
...snapshot,
|
|
1251
|
-
context: {
|
|
1252
|
-
...snapshot.context,
|
|
1253
|
-
selection: event.position.selection
|
|
1254
|
-
}
|
|
1255
|
-
});
|
|
1256
|
-
if (!dropFocusBlock || dropFocusBlock.node._key !== key)
|
|
1257
|
-
return !1;
|
|
1258
|
-
const dragOrigin = event.dragOrigin;
|
|
1259
|
-
if (!dragOrigin)
|
|
1260
|
-
return !1;
|
|
1261
|
-
const dragSelection = getDragSelection({
|
|
1262
|
-
eventSelection: dragOrigin.selection,
|
|
1263
|
-
snapshot
|
|
1264
|
-
});
|
|
1265
|
-
return getSelectedBlocks({
|
|
1266
|
-
...snapshot,
|
|
1267
|
-
context: {
|
|
1268
|
-
...snapshot.context,
|
|
1269
|
-
selection: dragSelection
|
|
1270
|
-
}
|
|
1271
|
-
}).some((draggedBlock) => draggedBlock.node._key === key) ? !1 : isSelectingEntireBlocks({
|
|
1272
|
-
...snapshot,
|
|
1273
|
-
context: {
|
|
1274
|
-
...snapshot.context,
|
|
1275
|
-
selection: dragSelection
|
|
1276
|
-
}
|
|
1277
|
-
});
|
|
1278
|
-
},
|
|
1279
|
-
actions: [({
|
|
1280
|
-
event
|
|
1281
|
-
}) => [{
|
|
1282
|
-
type: "effect",
|
|
1283
|
-
effect: () => {
|
|
1284
|
-
onSetDragPositionBlock(event.position.block);
|
|
1285
|
-
}
|
|
1286
|
-
}]]
|
|
1287
|
-
}),
|
|
1288
|
-
priority: createEditorPriority({
|
|
1289
|
-
reference: {
|
|
1290
|
-
priority: corePriority,
|
|
1291
|
-
importance: "lower"
|
|
1292
|
-
}
|
|
1293
|
-
})
|
|
1294
|
-
}, {
|
|
1295
|
-
behavior: defineBehavior({
|
|
1296
|
-
on: "drag.*",
|
|
1297
|
-
guard: ({
|
|
1298
|
-
event
|
|
1299
|
-
}) => event.type !== "drag.dragover",
|
|
1300
|
-
actions: [({
|
|
1301
|
-
event
|
|
1302
|
-
}) => [{
|
|
1303
|
-
type: "effect",
|
|
1304
|
-
effect: () => {
|
|
1305
|
-
onSetDragPositionBlock(void 0);
|
|
1306
|
-
}
|
|
1307
|
-
}, forward(event)]]
|
|
1308
|
-
}),
|
|
1309
|
-
priority: createEditorPriority({
|
|
1310
|
-
reference: {
|
|
1311
|
-
priority: corePriority,
|
|
1312
|
-
importance: "lower"
|
|
1313
|
-
}
|
|
1314
|
-
})
|
|
1315
|
-
}];
|
|
1316
|
-
}
|
|
1317
|
-
function useCoreBlockElementBehaviors(t0) {
|
|
1318
|
-
const $ = c(5), {
|
|
1319
|
-
key,
|
|
1320
|
-
onSetDragPositionBlock
|
|
1321
|
-
} = t0, editorActor = useContext(EditorActorContext);
|
|
1322
|
-
let t1, t2;
|
|
1323
|
-
$[0] !== editorActor || $[1] !== key || $[2] !== onSetDragPositionBlock ? (t1 = () => {
|
|
1324
|
-
const behaviorConfigs = createCoreBlockElementBehaviorsConfig({
|
|
1325
|
-
key,
|
|
1326
|
-
onSetDragPositionBlock
|
|
1327
|
-
});
|
|
1328
|
-
for (const behaviorConfig of behaviorConfigs)
|
|
1329
|
-
editorActor.send({
|
|
1330
|
-
type: "add behavior",
|
|
1331
|
-
behaviorConfig
|
|
1332
|
-
});
|
|
1333
|
-
return () => {
|
|
1334
|
-
for (const behaviorConfig_0 of behaviorConfigs)
|
|
1335
|
-
editorActor.send({
|
|
1336
|
-
type: "remove behavior",
|
|
1337
|
-
behaviorConfig: behaviorConfig_0
|
|
1338
|
-
});
|
|
1339
|
-
};
|
|
1340
|
-
}, t2 = [editorActor, key, onSetDragPositionBlock], $[0] = editorActor, $[1] = key, $[2] = onSetDragPositionBlock, $[3] = t1, $[4] = t2) : (t1 = $[3], t2 = $[4]), useEffect(t1, t2);
|
|
1341
|
-
}
|
|
1342
1159
|
function RenderBlockObject(props) {
|
|
1343
|
-
const $ = c(
|
|
1160
|
+
const $ = c(33), blockObjectRef = useRef(null), selected = useSelected();
|
|
1344
1161
|
let t0;
|
|
1345
1162
|
$[0] !== selected ? (t0 = (editor) => selected && editor.selection !== null && Range.isCollapsed(editor.selection), $[0] = selected, $[1] = t0) : t0 = $[1];
|
|
1346
1163
|
const focused = useSlateSelector(t0);
|
|
1347
1164
|
let t1;
|
|
1348
|
-
$[2] !== props.element.
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
}, $[2] = props.element._key, $[3] = t1) : t1 = $[3], useCoreBlockElementBehaviors(t1);
|
|
1352
|
-
let t2;
|
|
1353
|
-
if ($[4] !== props.element._type || $[5] !== props.legacySchema.blockObjects) {
|
|
1354
|
-
let t32;
|
|
1355
|
-
$[7] !== props.element._type ? (t32 = (schemaType) => schemaType.name === props.element._type, $[7] = props.element._type, $[8] = t32) : t32 = $[8], t2 = props.legacySchema.blockObjects.find(t32), $[4] = props.element._type, $[5] = props.legacySchema.blockObjects, $[6] = t2;
|
|
1165
|
+
if ($[2] !== props.element._type || $[3] !== props.legacySchema.blockObjects) {
|
|
1166
|
+
let t22;
|
|
1167
|
+
$[5] !== props.element._type ? (t22 = (schemaType) => schemaType.name === props.element._type, $[5] = props.element._type, $[6] = t22) : t22 = $[6], t1 = props.legacySchema.blockObjects.find(t22), $[2] = props.element._type, $[3] = props.legacySchema.blockObjects, $[4] = t1;
|
|
1356
1168
|
} else
|
|
1357
|
-
|
|
1358
|
-
const legacySchemaType =
|
|
1169
|
+
t1 = $[4];
|
|
1170
|
+
const legacySchemaType = t1;
|
|
1359
1171
|
legacySchemaType || console.error(`Unable to find Block Object "${props.element._type}" in Schema`);
|
|
1360
|
-
let
|
|
1361
|
-
$[
|
|
1172
|
+
let t2;
|
|
1173
|
+
$[7] !== props.blockObject || $[8] !== props.element._key || $[9] !== props.element._type ? (t2 = props.blockObject ?? {
|
|
1362
1174
|
_key: props.element._key,
|
|
1363
1175
|
_type: props.element._type
|
|
1364
|
-
}, $[
|
|
1365
|
-
const blockObject =
|
|
1366
|
-
let
|
|
1367
|
-
$[
|
|
1368
|
-
const
|
|
1369
|
-
let
|
|
1370
|
-
$[
|
|
1176
|
+
}, $[7] = props.blockObject, $[8] = props.element._key, $[9] = props.element._type, $[10] = t2) : t2 = $[10];
|
|
1177
|
+
const blockObject = t2;
|
|
1178
|
+
let t3;
|
|
1179
|
+
$[11] !== props.dropPosition ? (t3 = props.dropPosition === "start" ? /* @__PURE__ */ jsx(DropIndicator, {}) : null, $[11] = props.dropPosition, $[12] = t3) : t3 = $[12];
|
|
1180
|
+
const t4 = !props.readOnly;
|
|
1181
|
+
let t5;
|
|
1182
|
+
$[13] !== blockObject || $[14] !== focused || $[15] !== legacySchemaType || $[16] !== props.element._key || $[17] !== props.renderBlock || $[18] !== selected ? (t5 = props.renderBlock && legacySchemaType ? /* @__PURE__ */ jsx(RenderBlock$1, { renderBlock: props.renderBlock, editorElementRef: blockObjectRef, focused, path: [{
|
|
1371
1183
|
_key: props.element._key
|
|
1372
|
-
}], schemaType: legacySchemaType, selected, type: legacySchemaType, value: blockObject, children: /* @__PURE__ */ jsx(RenderDefaultBlockObject, { blockObject }) }) : /* @__PURE__ */ jsx(RenderDefaultBlockObject, { blockObject }), $[
|
|
1184
|
+
}], schemaType: legacySchemaType, selected, type: legacySchemaType, value: blockObject, children: /* @__PURE__ */ jsx(RenderDefaultBlockObject, { blockObject }) }) : /* @__PURE__ */ jsx(RenderDefaultBlockObject, { blockObject }), $[13] = blockObject, $[14] = focused, $[15] = legacySchemaType, $[16] = props.element._key, $[17] = props.renderBlock, $[18] = selected, $[19] = t5) : t5 = $[19];
|
|
1185
|
+
let t6;
|
|
1186
|
+
$[20] !== t4 || $[21] !== t5 ? (t6 = /* @__PURE__ */ jsx("div", { ref: blockObjectRef, contentEditable: !1, draggable: t4, children: t5 }), $[20] = t4, $[21] = t5, $[22] = t6) : t6 = $[22];
|
|
1373
1187
|
let t7;
|
|
1374
|
-
$[
|
|
1188
|
+
$[23] !== props.dropPosition ? (t7 = props.dropPosition === "end" ? /* @__PURE__ */ jsx(DropIndicator, {}) : null, $[23] = props.dropPosition, $[24] = t7) : t7 = $[24];
|
|
1375
1189
|
let t8;
|
|
1376
|
-
$[25] !==
|
|
1377
|
-
|
|
1378
|
-
return $[27] !== props.attributes || $[28] !== props.children || $[29] !== props.element._key || $[30] !== props.element._type || $[31] !== t4 || $[32] !== t7 || $[33] !== t8 ? (t9 = /* @__PURE__ */ jsxs("div", { ...props.attributes, className: "pt-block pt-object-block", "data-block-key": props.element._key, "data-block-name": props.element._type, "data-block-type": "object", children: [
|
|
1379
|
-
t4,
|
|
1190
|
+
return $[25] !== props.attributes || $[26] !== props.children || $[27] !== props.element._key || $[28] !== props.element._type || $[29] !== t3 || $[30] !== t6 || $[31] !== t7 ? (t8 = /* @__PURE__ */ jsxs("div", { ...props.attributes, className: "pt-block pt-object-block", "data-block-key": props.element._key, "data-block-name": props.element._type, "data-block-type": "object", children: [
|
|
1191
|
+
t3,
|
|
1380
1192
|
props.children,
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
] }), $[
|
|
1193
|
+
t6,
|
|
1194
|
+
t7
|
|
1195
|
+
] }), $[25] = props.attributes, $[26] = props.children, $[27] = props.element._key, $[28] = props.element._type, $[29] = t3, $[30] = t6, $[31] = t7, $[32] = t8) : t8 = $[32], t8;
|
|
1384
1196
|
}
|
|
1385
1197
|
function RenderBlock$1({
|
|
1386
1198
|
renderBlock,
|
|
@@ -1481,92 +1293,87 @@ function RenderChild$1({
|
|
|
1481
1293
|
});
|
|
1482
1294
|
}
|
|
1483
1295
|
function RenderTextBlock(props) {
|
|
1484
|
-
const $ = c(
|
|
1296
|
+
const $ = c(75), blockRef = useRef(null), selected = useSelected();
|
|
1485
1297
|
let t0;
|
|
1486
1298
|
$[0] !== selected ? (t0 = (editor) => selected && editor.selection !== null && Range.isCollapsed(editor.selection), $[0] = selected, $[1] = t0) : t0 = $[1];
|
|
1487
1299
|
const focused = useSlateSelector(t0);
|
|
1488
1300
|
let t1;
|
|
1489
|
-
$[2] !== props.
|
|
1490
|
-
|
|
1491
|
-
onSetDragPositionBlock: setDragPositionBlock
|
|
1492
|
-
}, $[2] = props.element._key, $[3] = t1) : t1 = $[3], useCoreBlockElementBehaviors(t1);
|
|
1493
|
-
let t2;
|
|
1494
|
-
$[4] !== props.textBlock._key ? (t2 = (editor_0) => editor_0.listIndexMap.get(props.textBlock._key), $[4] = props.textBlock._key, $[5] = t2) : t2 = $[5];
|
|
1495
|
-
const listIndex = useSlateSelector(t2);
|
|
1301
|
+
$[2] !== props.textBlock._key ? (t1 = (editor_0) => editor_0.listIndexMap.get(props.textBlock._key), $[2] = props.textBlock._key, $[3] = t1) : t1 = $[3];
|
|
1302
|
+
const listIndex = useSlateSelector(t1);
|
|
1496
1303
|
let children = props.children;
|
|
1497
1304
|
if (props.renderStyle && props.textBlock.style) {
|
|
1498
|
-
let
|
|
1499
|
-
$[
|
|
1500
|
-
const legacyStyleSchemaType =
|
|
1305
|
+
let t22;
|
|
1306
|
+
$[4] !== props.legacySchema || $[5] !== props.textBlock.style ? (t22 = props.textBlock.style !== void 0 ? props.legacySchema.styles.find((style) => style.value === props.textBlock.style) : void 0, $[4] = props.legacySchema, $[5] = props.textBlock.style, $[6] = t22) : t22 = $[6];
|
|
1307
|
+
const legacyStyleSchemaType = t22;
|
|
1501
1308
|
if (legacyStyleSchemaType) {
|
|
1502
|
-
let
|
|
1503
|
-
$[
|
|
1309
|
+
let t32;
|
|
1310
|
+
$[7] !== props.textBlock._key ? (t32 = [{
|
|
1504
1311
|
_key: props.textBlock._key
|
|
1505
|
-
}], $[
|
|
1506
|
-
let
|
|
1507
|
-
$[
|
|
1312
|
+
}], $[7] = props.textBlock._key, $[8] = t32) : t32 = $[8];
|
|
1313
|
+
let t42;
|
|
1314
|
+
$[9] !== children || $[10] !== focused || $[11] !== legacyStyleSchemaType || $[12] !== props.renderStyle || $[13] !== props.textBlock || $[14] !== selected || $[15] !== t32 ? (t42 = /* @__PURE__ */ jsx(RenderStyle, { renderStyle: props.renderStyle, block: props.textBlock, editorElementRef: blockRef, focused, path: t32, schemaType: legacyStyleSchemaType, selected, value: props.textBlock.style, children }), $[9] = children, $[10] = focused, $[11] = legacyStyleSchemaType, $[12] = props.renderStyle, $[13] = props.textBlock, $[14] = selected, $[15] = t32, $[16] = t42) : t42 = $[16], children = t42;
|
|
1508
1315
|
} else
|
|
1509
1316
|
console.error(`Unable to find Schema type for text block style ${props.textBlock.style}`);
|
|
1510
1317
|
}
|
|
1511
1318
|
if (props.renderListItem && props.textBlock.listItem) {
|
|
1512
|
-
let
|
|
1513
|
-
if ($[
|
|
1514
|
-
let
|
|
1515
|
-
$[
|
|
1319
|
+
let t22;
|
|
1320
|
+
if ($[17] !== props.legacySchema.lists || $[18] !== props.textBlock.listItem) {
|
|
1321
|
+
let t32;
|
|
1322
|
+
$[20] !== props.textBlock.listItem ? (t32 = (list) => list.value === props.textBlock.listItem, $[20] = props.textBlock.listItem, $[21] = t32) : t32 = $[21], t22 = props.legacySchema.lists.find(t32), $[17] = props.legacySchema.lists, $[18] = props.textBlock.listItem, $[19] = t22;
|
|
1516
1323
|
} else
|
|
1517
|
-
|
|
1518
|
-
const legacyListItemSchemaType =
|
|
1324
|
+
t22 = $[19];
|
|
1325
|
+
const legacyListItemSchemaType = t22;
|
|
1519
1326
|
if (legacyListItemSchemaType) {
|
|
1520
|
-
const
|
|
1521
|
-
let
|
|
1522
|
-
$[
|
|
1327
|
+
const t32 = props.textBlock.level ?? 1;
|
|
1328
|
+
let t42;
|
|
1329
|
+
$[22] !== props.textBlock._key ? (t42 = [{
|
|
1523
1330
|
_key: props.textBlock._key
|
|
1524
|
-
}], $[
|
|
1525
|
-
let
|
|
1526
|
-
$[
|
|
1331
|
+
}], $[22] = props.textBlock._key, $[23] = t42) : t42 = $[23];
|
|
1332
|
+
let t52;
|
|
1333
|
+
$[24] !== children || $[25] !== focused || $[26] !== legacyListItemSchemaType || $[27] !== props.renderListItem || $[28] !== props.textBlock || $[29] !== selected || $[30] !== t32 || $[31] !== t42 ? (t52 = /* @__PURE__ */ jsx(RenderListItem, { renderListItem: props.renderListItem, block: props.textBlock, editorElementRef: blockRef, focused, level: t32, path: t42, selected, value: props.textBlock.listItem, schemaType: legacyListItemSchemaType, children }), $[24] = children, $[25] = focused, $[26] = legacyListItemSchemaType, $[27] = props.renderListItem, $[28] = props.textBlock, $[29] = selected, $[30] = t32, $[31] = t42, $[32] = t52) : t52 = $[32], children = t52;
|
|
1527
1334
|
} else
|
|
1528
1335
|
console.error(`Unable to find Schema type for text block list item ${props.textBlock.listItem}`);
|
|
1529
1336
|
}
|
|
1530
|
-
const
|
|
1337
|
+
const t2 = props.attributes;
|
|
1338
|
+
let t3;
|
|
1339
|
+
$[33] !== props.textBlock.style ? (t3 = props.textBlock.style ? [`pt-text-block-style-${props.textBlock.style}`] : [], $[33] = props.textBlock.style, $[34] = t3) : t3 = $[34];
|
|
1531
1340
|
let t4;
|
|
1532
|
-
$[35] !== props.textBlock.
|
|
1341
|
+
$[35] !== props.textBlock.level || $[36] !== props.textBlock.listItem ? (t4 = props.textBlock.listItem ? ["pt-list-item", `pt-list-item-${props.textBlock.listItem}`, `pt-list-item-level-${props.textBlock.level ?? 1}`] : [], $[35] = props.textBlock.level, $[36] = props.textBlock.listItem, $[37] = t4) : t4 = $[37];
|
|
1533
1342
|
let t5;
|
|
1534
|
-
$[
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
let t8;
|
|
1539
|
-
$[43] !== props.textBlock.listItem ? (t8 = props.textBlock.listItem !== void 0 ? {
|
|
1343
|
+
$[38] !== t3 || $[39] !== t4 ? (t5 = ["pt-block", "pt-text-block", ...t3, ...t4], $[38] = t3, $[39] = t4, $[40] = t5) : t5 = $[40];
|
|
1344
|
+
const t6 = t5.join(" ");
|
|
1345
|
+
let t7;
|
|
1346
|
+
$[41] !== props.textBlock.listItem ? (t7 = props.textBlock.listItem !== void 0 ? {
|
|
1540
1347
|
"data-list-item": props.textBlock.listItem
|
|
1541
|
-
} : {}, $[
|
|
1542
|
-
let
|
|
1543
|
-
$[
|
|
1348
|
+
} : {}, $[41] = props.textBlock.listItem, $[42] = t7) : t7 = $[42];
|
|
1349
|
+
let t8;
|
|
1350
|
+
$[43] !== props.textBlock.level ? (t8 = props.textBlock.level !== void 0 ? {
|
|
1544
1351
|
"data-level": props.textBlock.level
|
|
1545
|
-
} : {}, $[
|
|
1546
|
-
let
|
|
1547
|
-
$[
|
|
1352
|
+
} : {}, $[43] = props.textBlock.level, $[44] = t8) : t8 = $[44];
|
|
1353
|
+
let t9;
|
|
1354
|
+
$[45] !== props.textBlock.style ? (t9 = props.textBlock.style !== void 0 ? {
|
|
1548
1355
|
"data-style": props.textBlock.style
|
|
1549
|
-
} : {}, $[
|
|
1550
|
-
let
|
|
1551
|
-
$[
|
|
1356
|
+
} : {}, $[45] = props.textBlock.style, $[46] = t9) : t9 = $[46];
|
|
1357
|
+
let t10;
|
|
1358
|
+
$[47] !== listIndex ? (t10 = listIndex !== void 0 ? {
|
|
1552
1359
|
"data-list-index": listIndex
|
|
1553
|
-
} : {}, $[
|
|
1360
|
+
} : {}, $[47] = listIndex, $[48] = t10) : t10 = $[48];
|
|
1361
|
+
let t11;
|
|
1362
|
+
$[49] !== props.dropPosition ? (t11 = props.dropPosition === "start" ? /* @__PURE__ */ jsx(DropIndicator, {}) : null, $[49] = props.dropPosition, $[50] = t11) : t11 = $[50];
|
|
1554
1363
|
let t12;
|
|
1555
|
-
$[51] !==
|
|
1556
|
-
let t13;
|
|
1557
|
-
$[53] !== children || $[54] !== focused || $[55] !== props.legacySchema || $[56] !== props.renderBlock || $[57] !== props.textBlock || $[58] !== selected ? (t13 = props.renderBlock ? /* @__PURE__ */ jsx(RenderBlock, { renderBlock: props.renderBlock, editorElementRef: blockRef, focused, level: props.textBlock.level, listItem: props.textBlock.listItem, path: [{
|
|
1364
|
+
$[51] !== children || $[52] !== focused || $[53] !== props.legacySchema || $[54] !== props.renderBlock || $[55] !== props.textBlock || $[56] !== selected ? (t12 = props.renderBlock ? /* @__PURE__ */ jsx(RenderBlock, { renderBlock: props.renderBlock, editorElementRef: blockRef, focused, level: props.textBlock.level, listItem: props.textBlock.listItem, path: [{
|
|
1558
1365
|
_key: props.textBlock._key
|
|
1559
|
-
}], selected, schemaType: props.legacySchema.block, style: props.textBlock.style, type: props.legacySchema.block, value: props.textBlock, children }) : children, $[
|
|
1366
|
+
}], selected, schemaType: props.legacySchema.block, style: props.textBlock.style, type: props.legacySchema.block, value: props.textBlock, children }) : children, $[51] = children, $[52] = focused, $[53] = props.legacySchema, $[54] = props.renderBlock, $[55] = props.textBlock, $[56] = selected, $[57] = t12) : t12 = $[57];
|
|
1367
|
+
let t13;
|
|
1368
|
+
$[58] !== t12 ? (t13 = /* @__PURE__ */ jsx("div", { ref: blockRef, children: t12 }), $[58] = t12, $[59] = t13) : t13 = $[59];
|
|
1560
1369
|
let t14;
|
|
1561
|
-
$[60] !==
|
|
1370
|
+
$[60] !== props.dropPosition ? (t14 = props.dropPosition === "end" ? /* @__PURE__ */ jsx(DropIndicator, {}) : null, $[60] = props.dropPosition, $[61] = t14) : t14 = $[61];
|
|
1562
1371
|
let t15;
|
|
1563
|
-
$[62] !==
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
t15
|
|
1569
|
-
] }), $[64] = props.attributes, $[65] = props.spellCheck, $[66] = props.textBlock._key, $[67] = props.textBlock._type, $[68] = t10, $[69] = t11, $[70] = t12, $[71] = t14, $[72] = t15, $[73] = t7, $[74] = t8, $[75] = t9, $[76] = t16) : t16 = $[76], t16;
|
|
1372
|
+
return $[62] !== props.attributes || $[63] !== props.spellCheck || $[64] !== props.textBlock._key || $[65] !== props.textBlock._type || $[66] !== t10 || $[67] !== t11 || $[68] !== t13 || $[69] !== t14 || $[70] !== t6 || $[71] !== t7 || $[72] !== t8 || $[73] !== t9 ? (t15 = /* @__PURE__ */ jsxs("div", { ...t2, className: t6, spellCheck: props.spellCheck, "data-block-key": props.textBlock._key, "data-block-name": props.textBlock._type, "data-block-type": "text", ...t7, ...t8, ...t9, ...t10, children: [
|
|
1373
|
+
t11,
|
|
1374
|
+
t13,
|
|
1375
|
+
t14
|
|
1376
|
+
] }), $[62] = props.attributes, $[63] = props.spellCheck, $[64] = props.textBlock._key, $[65] = props.textBlock._type, $[66] = t10, $[67] = t11, $[68] = t13, $[69] = t14, $[70] = t6, $[71] = t7, $[72] = t8, $[73] = t9, $[74] = t15) : t15 = $[74], t15;
|
|
1570
1377
|
}
|
|
1571
1378
|
function RenderBlock({
|
|
1572
1379
|
renderBlock,
|
|
@@ -1643,7 +1450,7 @@ function RenderStyle({
|
|
|
1643
1450
|
});
|
|
1644
1451
|
}
|
|
1645
1452
|
function RenderElement(props) {
|
|
1646
|
-
const $ = c(
|
|
1453
|
+
const $ = c(36), editorActor = useContext(EditorActorContext), schema = useSelector(editorActor, _temp$3), legacySchema = useSelector(editorActor, _temp2$2), slateStatic = useSlateStatic();
|
|
1647
1454
|
if ("__inline" in props.element && props.element.__inline === !0) {
|
|
1648
1455
|
let t02;
|
|
1649
1456
|
return $[0] !== legacySchema || $[1] !== props.attributes || $[2] !== props.children || $[3] !== props.element || $[4] !== props.readOnly || $[5] !== props.renderChild || $[6] !== schema ? (t02 = /* @__PURE__ */ jsx(RenderInlineObject, { attributes: props.attributes, element: props.element, legacySchema, readOnly: props.readOnly, renderChild: props.renderChild, schema, children: props.children }), $[0] = legacySchema, $[1] = props.attributes, $[2] = props.children, $[3] = props.element, $[4] = props.readOnly, $[5] = props.renderChild, $[6] = schema, $[7] = t02) : t02 = $[7], t02;
|
|
@@ -1657,11 +1464,13 @@ function RenderElement(props) {
|
|
|
1657
1464
|
} else
|
|
1658
1465
|
block = $[12], t0 = $[13];
|
|
1659
1466
|
if (t0) {
|
|
1660
|
-
|
|
1661
|
-
|
|
1467
|
+
const t12 = props.dropPosition?.blockKey === props.element._key ? props.dropPosition.positionBlock : void 0;
|
|
1468
|
+
let t22;
|
|
1469
|
+
return $[14] !== block || $[15] !== legacySchema || $[16] !== props.attributes || $[17] !== props.children || $[18] !== props.element || $[19] !== props.readOnly || $[20] !== props.renderBlock || $[21] !== props.renderListItem || $[22] !== props.renderStyle || $[23] !== props.spellCheck || $[24] !== t12 ? (t22 = /* @__PURE__ */ jsx(RenderTextBlock, { attributes: props.attributes, dropPosition: t12, element: props.element, legacySchema, readOnly: props.readOnly, renderBlock: props.renderBlock, renderListItem: props.renderListItem, renderStyle: props.renderStyle, spellCheck: props.spellCheck, textBlock: block, children: props.children }), $[14] = block, $[15] = legacySchema, $[16] = props.attributes, $[17] = props.children, $[18] = props.element, $[19] = props.readOnly, $[20] = props.renderBlock, $[21] = props.renderListItem, $[22] = props.renderStyle, $[23] = props.spellCheck, $[24] = t12, $[25] = t22) : t22 = $[25], t22;
|
|
1662
1470
|
}
|
|
1663
|
-
|
|
1664
|
-
|
|
1471
|
+
const t1 = props.dropPosition?.blockKey === props.element._key ? props.dropPosition.positionBlock : void 0;
|
|
1472
|
+
let t2;
|
|
1473
|
+
return $[26] !== block || $[27] !== legacySchema || $[28] !== props.attributes || $[29] !== props.children || $[30] !== props.element || $[31] !== props.readOnly || $[32] !== props.renderBlock || $[33] !== schema || $[34] !== t1 ? (t2 = /* @__PURE__ */ jsx(RenderBlockObject, { attributes: props.attributes, blockObject: block, dropPosition: t1, element: props.element, legacySchema, readOnly: props.readOnly, renderBlock: props.renderBlock, schema, children: props.children }), $[26] = block, $[27] = legacySchema, $[28] = props.attributes, $[29] = props.children, $[30] = props.element, $[31] = props.readOnly, $[32] = props.renderBlock, $[33] = schema, $[34] = t1, $[35] = t2) : t2 = $[35], t2;
|
|
1665
1474
|
}
|
|
1666
1475
|
function _temp2$2(s_0) {
|
|
1667
1476
|
return s_0.context.getLegacySchema();
|
|
@@ -2065,6 +1874,191 @@ function createWithHotkeys(editorActor, portableTextEditor, hotkeysFromOptions)
|
|
|
2065
1874
|
}, editor;
|
|
2066
1875
|
};
|
|
2067
1876
|
}
|
|
1877
|
+
function createEditorPriority(config) {
|
|
1878
|
+
return {
|
|
1879
|
+
id: defaultKeyGenerator(),
|
|
1880
|
+
name: config?.name,
|
|
1881
|
+
reference: config?.reference
|
|
1882
|
+
};
|
|
1883
|
+
}
|
|
1884
|
+
const corePriority = createEditorPriority({
|
|
1885
|
+
name: "core"
|
|
1886
|
+
});
|
|
1887
|
+
function getDragSelection({
|
|
1888
|
+
eventSelection,
|
|
1889
|
+
snapshot
|
|
1890
|
+
}) {
|
|
1891
|
+
let dragSelection = eventSelection;
|
|
1892
|
+
if (getFocusInlineObject({
|
|
1893
|
+
...snapshot,
|
|
1894
|
+
context: {
|
|
1895
|
+
...snapshot.context,
|
|
1896
|
+
selection: eventSelection
|
|
1897
|
+
}
|
|
1898
|
+
}))
|
|
1899
|
+
return dragSelection;
|
|
1900
|
+
const draggingCollapsedSelection = isSelectionCollapsed$1({
|
|
1901
|
+
context: {
|
|
1902
|
+
...snapshot.context,
|
|
1903
|
+
selection: eventSelection
|
|
1904
|
+
}
|
|
1905
|
+
}), draggedTextBlock = getFocusTextBlock({
|
|
1906
|
+
...snapshot,
|
|
1907
|
+
context: {
|
|
1908
|
+
...snapshot.context,
|
|
1909
|
+
selection: eventSelection
|
|
1910
|
+
}
|
|
1911
|
+
}), draggedSpan = getFocusSpan$1({
|
|
1912
|
+
...snapshot,
|
|
1913
|
+
context: {
|
|
1914
|
+
...snapshot.context,
|
|
1915
|
+
selection: eventSelection
|
|
1916
|
+
}
|
|
1917
|
+
});
|
|
1918
|
+
draggingCollapsedSelection && draggedTextBlock && draggedSpan && (dragSelection = {
|
|
1919
|
+
anchor: getBlockStartPoint({
|
|
1920
|
+
context: snapshot.context,
|
|
1921
|
+
block: draggedTextBlock
|
|
1922
|
+
}),
|
|
1923
|
+
focus: getBlockEndPoint({
|
|
1924
|
+
context: snapshot.context,
|
|
1925
|
+
block: draggedTextBlock
|
|
1926
|
+
})
|
|
1927
|
+
});
|
|
1928
|
+
const selectedBlocks = getSelectedBlocks(snapshot);
|
|
1929
|
+
if (snapshot.context.selection && isSelectionExpanded(snapshot) && selectedBlocks.length > 1) {
|
|
1930
|
+
const selectionStartBlock = getSelectionStartBlock(snapshot), selectionEndBlock = getSelectionEndBlock(snapshot);
|
|
1931
|
+
if (!selectionStartBlock || !selectionEndBlock)
|
|
1932
|
+
return dragSelection;
|
|
1933
|
+
const selectionStartPoint = getBlockStartPoint({
|
|
1934
|
+
context: snapshot.context,
|
|
1935
|
+
block: selectionStartBlock
|
|
1936
|
+
}), selectionEndPoint = getBlockEndPoint({
|
|
1937
|
+
context: snapshot.context,
|
|
1938
|
+
block: selectionEndBlock
|
|
1939
|
+
});
|
|
1940
|
+
isOverlappingSelection(eventSelection)({
|
|
1941
|
+
...snapshot,
|
|
1942
|
+
context: {
|
|
1943
|
+
...snapshot.context,
|
|
1944
|
+
selection: {
|
|
1945
|
+
anchor: selectionStartPoint,
|
|
1946
|
+
focus: selectionEndPoint
|
|
1947
|
+
}
|
|
1948
|
+
}
|
|
1949
|
+
}) && (dragSelection = {
|
|
1950
|
+
anchor: selectionStartPoint,
|
|
1951
|
+
focus: selectionEndPoint
|
|
1952
|
+
});
|
|
1953
|
+
}
|
|
1954
|
+
return dragSelection;
|
|
1955
|
+
}
|
|
1956
|
+
function createDropPositionBehaviorsConfig({
|
|
1957
|
+
setDropPosition
|
|
1958
|
+
}) {
|
|
1959
|
+
return [{
|
|
1960
|
+
behavior: defineBehavior({
|
|
1961
|
+
on: "drag.dragover",
|
|
1962
|
+
guard: ({
|
|
1963
|
+
snapshot,
|
|
1964
|
+
event
|
|
1965
|
+
}) => {
|
|
1966
|
+
const dropFocusBlock = getFocusBlock$1({
|
|
1967
|
+
...snapshot,
|
|
1968
|
+
context: {
|
|
1969
|
+
...snapshot.context,
|
|
1970
|
+
selection: event.position.selection
|
|
1971
|
+
}
|
|
1972
|
+
});
|
|
1973
|
+
if (!dropFocusBlock)
|
|
1974
|
+
return !1;
|
|
1975
|
+
const dragOrigin = event.dragOrigin;
|
|
1976
|
+
if (!dragOrigin)
|
|
1977
|
+
return !1;
|
|
1978
|
+
const dragSelection = getDragSelection({
|
|
1979
|
+
eventSelection: dragOrigin.selection,
|
|
1980
|
+
snapshot
|
|
1981
|
+
});
|
|
1982
|
+
return getSelectedBlocks({
|
|
1983
|
+
...snapshot,
|
|
1984
|
+
context: {
|
|
1985
|
+
...snapshot.context,
|
|
1986
|
+
selection: dragSelection
|
|
1987
|
+
}
|
|
1988
|
+
}).some((draggedBlock) => draggedBlock.node._key === dropFocusBlock.node._key) || !isSelectingEntireBlocks({
|
|
1989
|
+
...snapshot,
|
|
1990
|
+
context: {
|
|
1991
|
+
...snapshot.context,
|
|
1992
|
+
selection: dragSelection
|
|
1993
|
+
}
|
|
1994
|
+
}) ? !1 : {
|
|
1995
|
+
dropFocusBlock
|
|
1996
|
+
};
|
|
1997
|
+
},
|
|
1998
|
+
actions: [({
|
|
1999
|
+
event
|
|
2000
|
+
}, {
|
|
2001
|
+
dropFocusBlock
|
|
2002
|
+
}) => [{
|
|
2003
|
+
type: "effect",
|
|
2004
|
+
effect: () => {
|
|
2005
|
+
setDropPosition({
|
|
2006
|
+
blockKey: dropFocusBlock.node._key,
|
|
2007
|
+
positionBlock: event.position.block
|
|
2008
|
+
});
|
|
2009
|
+
}
|
|
2010
|
+
}]]
|
|
2011
|
+
}),
|
|
2012
|
+
priority: createEditorPriority({
|
|
2013
|
+
reference: {
|
|
2014
|
+
priority: corePriority,
|
|
2015
|
+
importance: "lower"
|
|
2016
|
+
}
|
|
2017
|
+
})
|
|
2018
|
+
}, {
|
|
2019
|
+
behavior: defineBehavior({
|
|
2020
|
+
on: "drag.*",
|
|
2021
|
+
guard: ({
|
|
2022
|
+
event
|
|
2023
|
+
}) => event.type !== "drag.dragover",
|
|
2024
|
+
actions: [({
|
|
2025
|
+
event
|
|
2026
|
+
}) => [{
|
|
2027
|
+
type: "effect",
|
|
2028
|
+
effect: () => {
|
|
2029
|
+
setDropPosition(void 0);
|
|
2030
|
+
}
|
|
2031
|
+
}, forward(event)]]
|
|
2032
|
+
}),
|
|
2033
|
+
priority: createEditorPriority({
|
|
2034
|
+
reference: {
|
|
2035
|
+
priority: corePriority,
|
|
2036
|
+
importance: "lower"
|
|
2037
|
+
}
|
|
2038
|
+
})
|
|
2039
|
+
}];
|
|
2040
|
+
}
|
|
2041
|
+
function useDropPosition() {
|
|
2042
|
+
const $ = c(3), editorActor = useContext(EditorActorContext), [dropPosition, setDropPosition] = useState();
|
|
2043
|
+
let t0, t1;
|
|
2044
|
+
return $[0] !== editorActor ? (t0 = () => {
|
|
2045
|
+
const behaviorConfigs = createDropPositionBehaviorsConfig({
|
|
2046
|
+
setDropPosition
|
|
2047
|
+
});
|
|
2048
|
+
for (const behaviorConfig of behaviorConfigs)
|
|
2049
|
+
editorActor.send({
|
|
2050
|
+
type: "add behavior",
|
|
2051
|
+
behaviorConfig
|
|
2052
|
+
});
|
|
2053
|
+
return () => {
|
|
2054
|
+
for (const behaviorConfig_0 of behaviorConfigs)
|
|
2055
|
+
editorActor.send({
|
|
2056
|
+
type: "remove behavior",
|
|
2057
|
+
behaviorConfig: behaviorConfig_0
|
|
2058
|
+
});
|
|
2059
|
+
};
|
|
2060
|
+
}, t1 = [editorActor, setDropPosition], $[0] = editorActor, $[1] = t0, $[2] = t1) : (t0 = $[1], t1 = $[2]), useEffect(t0, t1), dropPosition;
|
|
2061
|
+
}
|
|
2068
2062
|
const PortableTextEditorContext = createContext(null), usePortableTextEditor = () => {
|
|
2069
2063
|
const editor = useContext(PortableTextEditorContext);
|
|
2070
2064
|
if (!editor)
|
|
@@ -2148,7 +2142,7 @@ function validateSelection(slateEditor, editorElement) {
|
|
|
2148
2142
|
}
|
|
2149
2143
|
}
|
|
2150
2144
|
const debug$e = debugWithName("component:Editable"), PortableTextEditable = forwardRef(function(props, forwardedRef) {
|
|
2151
|
-
const $ = c(
|
|
2145
|
+
const $ = c(177);
|
|
2152
2146
|
let hotkeys, onBeforeInput, onBlur, onClick, onCopy, onCut, onDrag, onDragEnd, onDragEnter, onDragLeave, onDragOver, onDragStart, onDrop, onFocus, onPaste, propsSelection, rangeDecorations, renderAnnotation, renderBlock, renderChild, renderDecorator, renderListItem, renderPlaceholder, renderStyle, restProps, scrollSelectionIntoView, spellCheck;
|
|
2153
2147
|
$[0] !== props ? ({
|
|
2154
2148
|
hotkeys,
|
|
@@ -2207,7 +2201,7 @@ const debug$e = debugWithName("component:Editable"), PortableTextEditable = forw
|
|
|
2207
2201
|
skipSetup: t5
|
|
2208
2202
|
}
|
|
2209
2203
|
}, $[36] = readOnly, $[37] = slateEditor, $[38] = t1, $[39] = t2.context.schema, $[40] = t5, $[41] = t6) : t6 = $[41];
|
|
2210
|
-
const rangeDecorationsActor = useActorRef(rangeDecorationsMachine, t6), decorate = useSelector(rangeDecorationsActor, _temp2);
|
|
2204
|
+
const rangeDecorationsActor = useActorRef(rangeDecorationsMachine, t6), decorate = useSelector(rangeDecorationsActor, _temp2), dropPosition = useDropPosition();
|
|
2211
2205
|
let t7, t8;
|
|
2212
2206
|
$[42] !== rangeDecorationsActor || $[43] !== readOnly ? (t7 = () => {
|
|
2213
2207
|
rangeDecorationsActor.send({
|
|
@@ -2228,13 +2222,13 @@ const debug$e = debugWithName("component:Editable"), PortableTextEditable = forw
|
|
|
2228
2222
|
createWithHotkeys(editorActor, portableTextEditor, hotkeys)(slateEditor);
|
|
2229
2223
|
}
|
|
2230
2224
|
let t12;
|
|
2231
|
-
$[50] !==
|
|
2225
|
+
$[50] !== dropPosition || $[51] !== readOnly || $[52] !== renderBlock || $[53] !== renderChild || $[54] !== renderListItem || $[55] !== renderStyle || $[56] !== spellCheck ? (t12 = (eProps) => /* @__PURE__ */ jsx(RenderElement, { ...eProps, dropPosition, readOnly, renderBlock, renderChild, renderListItem, renderStyle, spellCheck }), $[50] = dropPosition, $[51] = readOnly, $[52] = renderBlock, $[53] = renderChild, $[54] = renderListItem, $[55] = renderStyle, $[56] = spellCheck, $[57] = t12) : t12 = $[57];
|
|
2232
2226
|
const renderElement = t12;
|
|
2233
2227
|
let t13;
|
|
2234
|
-
$[
|
|
2228
|
+
$[58] !== readOnly || $[59] !== renderAnnotation || $[60] !== renderChild || $[61] !== renderDecorator || $[62] !== renderPlaceholder ? (t13 = (leafProps) => /* @__PURE__ */ jsx(RenderLeaf, { ...leafProps, readOnly, renderAnnotation, renderChild, renderDecorator, renderPlaceholder }), $[58] = readOnly, $[59] = renderAnnotation, $[60] = renderChild, $[61] = renderDecorator, $[62] = renderPlaceholder, $[63] = t13) : t13 = $[63];
|
|
2235
2229
|
const renderLeaf = t13, renderText = _temp3;
|
|
2236
2230
|
let t14;
|
|
2237
|
-
$[
|
|
2231
|
+
$[64] !== editorActor || $[65] !== propsSelection || $[66] !== slateEditor ? (t14 = () => {
|
|
2238
2232
|
if (propsSelection) {
|
|
2239
2233
|
debug$e(`Selection from props ${JSON.stringify(propsSelection)}`);
|
|
2240
2234
|
const normalizedSelection = normalizeSelection(propsSelection, slateEditor.value);
|
|
@@ -2254,10 +2248,10 @@ const debug$e = debugWithName("component:Editable"), PortableTextEditable = forw
|
|
|
2254
2248
|
}), slateEditor.onChange());
|
|
2255
2249
|
}
|
|
2256
2250
|
}
|
|
2257
|
-
}, $[
|
|
2251
|
+
}, $[64] = editorActor, $[65] = propsSelection, $[66] = slateEditor, $[67] = t14) : t14 = $[67];
|
|
2258
2252
|
const restoreSelectionFromProps = t14;
|
|
2259
2253
|
let t15, t16;
|
|
2260
|
-
$[
|
|
2254
|
+
$[68] !== editorActor || $[69] !== rangeDecorationsActor || $[70] !== restoreSelectionFromProps ? (t15 = () => {
|
|
2261
2255
|
const onReady = editorActor.on("ready", () => {
|
|
2262
2256
|
rangeDecorationsActor.send({
|
|
2263
2257
|
type: "ready"
|
|
@@ -2270,13 +2264,13 @@ const debug$e = debugWithName("component:Editable"), PortableTextEditable = forw
|
|
|
2270
2264
|
return () => {
|
|
2271
2265
|
onReady.unsubscribe(), onInvalidValue.unsubscribe(), onValueChanged.unsubscribe();
|
|
2272
2266
|
};
|
|
2273
|
-
}, t16 = [rangeDecorationsActor, editorActor, restoreSelectionFromProps], $[
|
|
2267
|
+
}, t16 = [rangeDecorationsActor, editorActor, restoreSelectionFromProps], $[68] = editorActor, $[69] = rangeDecorationsActor, $[70] = restoreSelectionFromProps, $[71] = t15, $[72] = t16) : (t15 = $[71], t16 = $[72]), useEffect(t15, t16);
|
|
2274
2268
|
let t17, t18;
|
|
2275
|
-
$[
|
|
2269
|
+
$[73] !== hasInvalidValue || $[74] !== propsSelection || $[75] !== restoreSelectionFromProps ? (t17 = () => {
|
|
2276
2270
|
propsSelection && !hasInvalidValue && restoreSelectionFromProps();
|
|
2277
|
-
}, t18 = [hasInvalidValue, propsSelection, restoreSelectionFromProps], $[
|
|
2271
|
+
}, t18 = [hasInvalidValue, propsSelection, restoreSelectionFromProps], $[73] = hasInvalidValue, $[74] = propsSelection, $[75] = restoreSelectionFromProps, $[76] = t17, $[77] = t18) : (t17 = $[76], t18 = $[77]), useEffect(t17, t18);
|
|
2278
2272
|
let t19;
|
|
2279
|
-
$[
|
|
2273
|
+
$[78] !== editorActor || $[79] !== onCopy || $[80] !== slateEditor ? (t19 = (event) => {
|
|
2280
2274
|
if (onCopy)
|
|
2281
2275
|
onCopy(event) !== void 0 && event.preventDefault();
|
|
2282
2276
|
else if (event.nativeEvent.clipboardData) {
|
|
@@ -2305,10 +2299,10 @@ const debug$e = debugWithName("component:Editable"), PortableTextEditable = forw
|
|
|
2305
2299
|
nativeEvent: event
|
|
2306
2300
|
});
|
|
2307
2301
|
}
|
|
2308
|
-
}, $[
|
|
2302
|
+
}, $[78] = editorActor, $[79] = onCopy, $[80] = slateEditor, $[81] = t19) : t19 = $[81];
|
|
2309
2303
|
const handleCopy = t19;
|
|
2310
2304
|
let t20;
|
|
2311
|
-
$[
|
|
2305
|
+
$[82] !== editorActor || $[83] !== onCut || $[84] !== slateEditor ? (t20 = (event_0) => {
|
|
2312
2306
|
if (onCut)
|
|
2313
2307
|
onCut(event_0) !== void 0 && event_0.preventDefault();
|
|
2314
2308
|
else if (event_0.nativeEvent.clipboardData) {
|
|
@@ -2333,10 +2327,10 @@ const debug$e = debugWithName("component:Editable"), PortableTextEditable = forw
|
|
|
2333
2327
|
nativeEvent: event_0
|
|
2334
2328
|
});
|
|
2335
2329
|
}
|
|
2336
|
-
}, $[
|
|
2330
|
+
}, $[82] = editorActor, $[83] = onCut, $[84] = slateEditor, $[85] = t20) : t20 = $[85];
|
|
2337
2331
|
const handleCut = t20;
|
|
2338
2332
|
let t21;
|
|
2339
|
-
$[
|
|
2333
|
+
$[86] !== editorActor || $[87] !== onPaste || $[88] !== portableTextEditor || $[89] !== relayActor || $[90] !== slateEditor ? (t21 = (event_1) => {
|
|
2340
2334
|
const value = slateEditor.value, path = (slateEditor.selection ? slateRangeToSelection({
|
|
2341
2335
|
schema: editorActor.getSnapshot().context.schema,
|
|
2342
2336
|
editor: slateEditor,
|
|
@@ -2421,18 +2415,18 @@ const debug$e = debugWithName("component:Editable"), PortableTextEditable = forw
|
|
|
2421
2415
|
});
|
|
2422
2416
|
}
|
|
2423
2417
|
debug$e("No result from custom paste handler, pasting normally");
|
|
2424
|
-
}, $[
|
|
2418
|
+
}, $[86] = editorActor, $[87] = onPaste, $[88] = portableTextEditor, $[89] = relayActor, $[90] = slateEditor, $[91] = t21) : t21 = $[91];
|
|
2425
2419
|
const handlePaste = t21;
|
|
2426
2420
|
let t22;
|
|
2427
|
-
$[
|
|
2421
|
+
$[92] !== editorActor || $[93] !== onFocus || $[94] !== relayActor || $[95] !== slateEditor ? (t22 = (event_2) => {
|
|
2428
2422
|
onFocus && onFocus(event_2), event_2.isDefaultPrevented() || (relayActor.send({
|
|
2429
2423
|
type: "focused",
|
|
2430
2424
|
event: event_2
|
|
2431
2425
|
}), !slateEditor.selection && slateEditor.children.length === 1 && isEmptyTextBlock(editorActor.getSnapshot().context, slateEditor.value.at(0)) && (Transforms.select(slateEditor, Editor.start(slateEditor, [])), slateEditor.onChange()));
|
|
2432
|
-
}, $[
|
|
2426
|
+
}, $[92] = editorActor, $[93] = onFocus, $[94] = relayActor, $[95] = slateEditor, $[96] = t22) : t22 = $[96];
|
|
2433
2427
|
const handleOnFocus = t22;
|
|
2434
2428
|
let t23;
|
|
2435
|
-
$[
|
|
2429
|
+
$[97] !== editorActor || $[98] !== onClick || $[99] !== slateEditor ? (t23 = (event_3) => {
|
|
2436
2430
|
if (onClick && onClick(event_3), event_3.isDefaultPrevented() || event_3.isPropagationStopped())
|
|
2437
2431
|
return;
|
|
2438
2432
|
const position_3 = getEventPosition({
|
|
@@ -2449,23 +2443,23 @@ const debug$e = debugWithName("component:Editable"), PortableTextEditable = forw
|
|
|
2449
2443
|
editor: slateEditor,
|
|
2450
2444
|
nativeEvent: event_3
|
|
2451
2445
|
});
|
|
2452
|
-
}, $[
|
|
2446
|
+
}, $[97] = editorActor, $[98] = onClick, $[99] = slateEditor, $[100] = t23) : t23 = $[100];
|
|
2453
2447
|
const handleClick = t23;
|
|
2454
2448
|
let t24;
|
|
2455
|
-
$[
|
|
2449
|
+
$[101] !== onBlur || $[102] !== relayActor ? (t24 = (event_4) => {
|
|
2456
2450
|
onBlur && onBlur(event_4), event_4.isPropagationStopped() || relayActor.send({
|
|
2457
2451
|
type: "blurred",
|
|
2458
2452
|
event: event_4
|
|
2459
2453
|
});
|
|
2460
|
-
}, $[
|
|
2454
|
+
}, $[101] = onBlur, $[102] = relayActor, $[103] = t24) : t24 = $[103];
|
|
2461
2455
|
const handleOnBlur = t24;
|
|
2462
2456
|
let t25;
|
|
2463
|
-
$[
|
|
2457
|
+
$[104] !== onBeforeInput ? (t25 = (event_5) => {
|
|
2464
2458
|
onBeforeInput && onBeforeInput(event_5);
|
|
2465
|
-
}, $[
|
|
2459
|
+
}, $[104] = onBeforeInput, $[105] = t25) : t25 = $[105];
|
|
2466
2460
|
const handleOnBeforeInput = t25;
|
|
2467
2461
|
let t26;
|
|
2468
|
-
$[
|
|
2462
|
+
$[106] !== editorActor || $[107] !== props || $[108] !== slateEditor ? (t26 = (event_6) => {
|
|
2469
2463
|
props.onKeyDown && props.onKeyDown(event_6), event_6.isDefaultPrevented() || slateEditor.pteWithHotKeys(event_6), event_6.isDefaultPrevented() || editorActor.send({
|
|
2470
2464
|
type: "behavior event",
|
|
2471
2465
|
behaviorEvent: {
|
|
@@ -2482,10 +2476,10 @@ const debug$e = debugWithName("component:Editable"), PortableTextEditable = forw
|
|
|
2482
2476
|
editor: slateEditor,
|
|
2483
2477
|
nativeEvent: event_6
|
|
2484
2478
|
});
|
|
2485
|
-
}, $[
|
|
2479
|
+
}, $[106] = editorActor, $[107] = props, $[108] = slateEditor, $[109] = t26) : t26 = $[109];
|
|
2486
2480
|
const handleKeyDown = t26;
|
|
2487
2481
|
let t27;
|
|
2488
|
-
$[
|
|
2482
|
+
$[110] !== editorActor || $[111] !== props || $[112] !== slateEditor ? (t27 = (event_7) => {
|
|
2489
2483
|
props.onKeyUp && props.onKeyUp(event_7), event_7.isDefaultPrevented() || editorActor.send({
|
|
2490
2484
|
type: "behavior event",
|
|
2491
2485
|
behaviorEvent: {
|
|
@@ -2502,7 +2496,7 @@ const debug$e = debugWithName("component:Editable"), PortableTextEditable = forw
|
|
|
2502
2496
|
editor: slateEditor,
|
|
2503
2497
|
nativeEvent: event_7
|
|
2504
2498
|
});
|
|
2505
|
-
}, $[
|
|
2499
|
+
}, $[110] = editorActor, $[111] = props, $[112] = slateEditor, $[113] = t27) : t27 = $[113];
|
|
2506
2500
|
const handleKeyUp = t27;
|
|
2507
2501
|
let t28;
|
|
2508
2502
|
bb1: {
|
|
@@ -2515,13 +2509,13 @@ const debug$e = debugWithName("component:Editable"), PortableTextEditable = forw
|
|
|
2515
2509
|
break bb1;
|
|
2516
2510
|
}
|
|
2517
2511
|
let t292;
|
|
2518
|
-
$[
|
|
2512
|
+
$[114] !== portableTextEditor || $[115] !== scrollSelectionIntoView ? (t292 = (_editor, domRange) => {
|
|
2519
2513
|
scrollSelectionIntoView(portableTextEditor, domRange);
|
|
2520
|
-
}, $[
|
|
2514
|
+
}, $[114] = portableTextEditor, $[115] = scrollSelectionIntoView, $[116] = t292) : t292 = $[116], t28 = t292;
|
|
2521
2515
|
}
|
|
2522
2516
|
const scrollSelectionIntoViewToSlate = t28;
|
|
2523
2517
|
let t29, t30;
|
|
2524
|
-
$[
|
|
2518
|
+
$[117] !== editorActor || $[118] !== slateEditor ? (t29 = () => {
|
|
2525
2519
|
const window2 = ReactEditor.getWindow(slateEditor), onDragEnd_0 = () => {
|
|
2526
2520
|
editorActor.send({
|
|
2527
2521
|
type: "dragend"
|
|
@@ -2534,9 +2528,9 @@ const debug$e = debugWithName("component:Editable"), PortableTextEditable = forw
|
|
|
2534
2528
|
return window2.document.addEventListener("dragend", onDragEnd_0), window2.document.addEventListener("drop", onDrop_0), () => {
|
|
2535
2529
|
window2.document.removeEventListener("dragend", onDragEnd_0), window2.document.removeEventListener("drop", onDrop_0);
|
|
2536
2530
|
};
|
|
2537
|
-
}, t30 = [slateEditor, editorActor], $[
|
|
2531
|
+
}, t30 = [slateEditor, editorActor], $[117] = editorActor, $[118] = slateEditor, $[119] = t29, $[120] = t30) : (t29 = $[119], t30 = $[120]), useEffect(t29, t30);
|
|
2538
2532
|
let t31;
|
|
2539
|
-
$[
|
|
2533
|
+
$[121] !== editorActor || $[122] !== onDragStart || $[123] !== slateEditor ? (t31 = (event_8) => {
|
|
2540
2534
|
if (onDragStart?.(event_8), event_8.isDefaultPrevented() || event_8.isPropagationStopped())
|
|
2541
2535
|
return;
|
|
2542
2536
|
const position_4 = getEventPosition({
|
|
@@ -2564,10 +2558,10 @@ const debug$e = debugWithName("component:Editable"), PortableTextEditable = forw
|
|
|
2564
2558
|
},
|
|
2565
2559
|
editor: slateEditor
|
|
2566
2560
|
}), !0;
|
|
2567
|
-
}, $[
|
|
2561
|
+
}, $[121] = editorActor, $[122] = onDragStart, $[123] = slateEditor, $[124] = t31) : t31 = $[124];
|
|
2568
2562
|
const handleDragStart = t31;
|
|
2569
2563
|
let t32;
|
|
2570
|
-
$[
|
|
2564
|
+
$[125] !== editorActor || $[126] !== onDrag || $[127] !== slateEditor ? (t32 = (event_9) => {
|
|
2571
2565
|
if (onDrag?.(event_9), !(event_9.isDefaultPrevented() || event_9.isPropagationStopped() || !getEventPosition({
|
|
2572
2566
|
editorActor,
|
|
2573
2567
|
slateEditor,
|
|
@@ -2583,10 +2577,10 @@ const debug$e = debugWithName("component:Editable"), PortableTextEditable = forw
|
|
|
2583
2577
|
},
|
|
2584
2578
|
editor: slateEditor
|
|
2585
2579
|
}), !0;
|
|
2586
|
-
}, $[
|
|
2580
|
+
}, $[125] = editorActor, $[126] = onDrag, $[127] = slateEditor, $[128] = t32) : t32 = $[128];
|
|
2587
2581
|
const handleDrag = t32;
|
|
2588
2582
|
let t33;
|
|
2589
|
-
$[
|
|
2583
|
+
$[129] !== editorActor || $[130] !== onDragEnd || $[131] !== slateEditor ? (t33 = (event_10) => {
|
|
2590
2584
|
if (onDragEnd?.(event_10), !(event_10.isDefaultPrevented() || event_10.isPropagationStopped()))
|
|
2591
2585
|
return editorActor.send({
|
|
2592
2586
|
type: "behavior event",
|
|
@@ -2598,10 +2592,10 @@ const debug$e = debugWithName("component:Editable"), PortableTextEditable = forw
|
|
|
2598
2592
|
},
|
|
2599
2593
|
editor: slateEditor
|
|
2600
2594
|
}), !0;
|
|
2601
|
-
}, $[
|
|
2595
|
+
}, $[129] = editorActor, $[130] = onDragEnd, $[131] = slateEditor, $[132] = t33) : t33 = $[132];
|
|
2602
2596
|
const handleDragEnd = t33;
|
|
2603
2597
|
let t34;
|
|
2604
|
-
$[
|
|
2598
|
+
$[133] !== editorActor || $[134] !== onDragEnter || $[135] !== slateEditor ? (t34 = (event_11) => {
|
|
2605
2599
|
if (onDragEnter?.(event_11), event_11.isDefaultPrevented() || event_11.isPropagationStopped())
|
|
2606
2600
|
return;
|
|
2607
2601
|
const position_6 = getEventPosition({
|
|
@@ -2621,10 +2615,10 @@ const debug$e = debugWithName("component:Editable"), PortableTextEditable = forw
|
|
|
2621
2615
|
},
|
|
2622
2616
|
editor: slateEditor
|
|
2623
2617
|
}), !0;
|
|
2624
|
-
}, $[
|
|
2618
|
+
}, $[133] = editorActor, $[134] = onDragEnter, $[135] = slateEditor, $[136] = t34) : t34 = $[136];
|
|
2625
2619
|
const handleDragEnter = t34;
|
|
2626
2620
|
let t35;
|
|
2627
|
-
$[
|
|
2621
|
+
$[137] !== editorActor || $[138] !== onDragOver || $[139] !== slateEditor ? (t35 = (event_12) => {
|
|
2628
2622
|
if (onDragOver?.(event_12), event_12.isDefaultPrevented() || event_12.isPropagationStopped())
|
|
2629
2623
|
return;
|
|
2630
2624
|
const position_7 = getEventPosition({
|
|
@@ -2646,10 +2640,10 @@ const debug$e = debugWithName("component:Editable"), PortableTextEditable = forw
|
|
|
2646
2640
|
editor: slateEditor,
|
|
2647
2641
|
nativeEvent: event_12
|
|
2648
2642
|
}), !0;
|
|
2649
|
-
}, $[
|
|
2643
|
+
}, $[137] = editorActor, $[138] = onDragOver, $[139] = slateEditor, $[140] = t35) : t35 = $[140];
|
|
2650
2644
|
const handleDragOver = t35;
|
|
2651
2645
|
let t36;
|
|
2652
|
-
$[
|
|
2646
|
+
$[141] !== editorActor || $[142] !== onDrop || $[143] !== slateEditor ? (t36 = (event_13) => {
|
|
2653
2647
|
if (onDrop?.(event_13), event_13.isDefaultPrevented() || event_13.isPropagationStopped())
|
|
2654
2648
|
return;
|
|
2655
2649
|
const position_8 = getEventPosition({
|
|
@@ -2674,10 +2668,10 @@ const debug$e = debugWithName("component:Editable"), PortableTextEditable = forw
|
|
|
2674
2668
|
editor: slateEditor,
|
|
2675
2669
|
nativeEvent: event_13
|
|
2676
2670
|
}), !0;
|
|
2677
|
-
}, $[
|
|
2671
|
+
}, $[141] = editorActor, $[142] = onDrop, $[143] = slateEditor, $[144] = t36) : t36 = $[144];
|
|
2678
2672
|
const handleDrop = t36;
|
|
2679
2673
|
let t37;
|
|
2680
|
-
$[
|
|
2674
|
+
$[145] !== editorActor || $[146] !== onDragLeave || $[147] !== slateEditor ? (t37 = (event_14) => {
|
|
2681
2675
|
if (onDragLeave?.(event_14), !(event_14.isDefaultPrevented() || event_14.isPropagationStopped() || !getEventPosition({
|
|
2682
2676
|
editorActor,
|
|
2683
2677
|
slateEditor,
|
|
@@ -2693,10 +2687,10 @@ const debug$e = debugWithName("component:Editable"), PortableTextEditable = forw
|
|
|
2693
2687
|
},
|
|
2694
2688
|
editor: slateEditor
|
|
2695
2689
|
}), !0;
|
|
2696
|
-
}, $[
|
|
2690
|
+
}, $[145] = editorActor, $[146] = onDragLeave, $[147] = slateEditor, $[148] = t37) : t37 = $[148];
|
|
2697
2691
|
const handleDragLeave = t37;
|
|
2698
2692
|
let t38;
|
|
2699
|
-
$[
|
|
2693
|
+
$[149] !== forwardedRef || $[150] !== validateSelectionActor ? (t38 = (editorElement) => {
|
|
2700
2694
|
if (typeof forwardedRef == "function" ? forwardedRef(editorElement) : forwardedRef && (forwardedRef.current = editorElement), editorElement) {
|
|
2701
2695
|
const mutationObserver = new MutationObserver(() => {
|
|
2702
2696
|
validateSelectionActor.send({
|
|
@@ -2714,12 +2708,12 @@ const debug$e = debugWithName("component:Editable"), PortableTextEditable = forw
|
|
|
2714
2708
|
mutationObserver.disconnect();
|
|
2715
2709
|
};
|
|
2716
2710
|
}
|
|
2717
|
-
}, $[
|
|
2711
|
+
}, $[149] = forwardedRef, $[150] = validateSelectionActor, $[151] = t38) : t38 = $[151];
|
|
2718
2712
|
const callbackRef = t38;
|
|
2719
2713
|
if (!portableTextEditor)
|
|
2720
2714
|
return null;
|
|
2721
2715
|
let t39;
|
|
2722
|
-
return $[
|
|
2716
|
+
return $[152] !== callbackRef || $[153] !== decorate || $[154] !== handleClick || $[155] !== handleCopy || $[156] !== handleCut || $[157] !== handleDrag || $[158] !== handleDragEnd || $[159] !== handleDragEnter || $[160] !== handleDragLeave || $[161] !== handleDragOver || $[162] !== handleDragStart || $[163] !== handleDrop || $[164] !== handleKeyDown || $[165] !== handleKeyUp || $[166] !== handleOnBeforeInput || $[167] !== handleOnBlur || $[168] !== handleOnFocus || $[169] !== handlePaste || $[170] !== hasInvalidValue || $[171] !== readOnly || $[172] !== renderElement || $[173] !== renderLeaf || $[174] !== restProps || $[175] !== scrollSelectionIntoViewToSlate ? (t39 = hasInvalidValue ? null : /* @__PURE__ */ jsx(Editable, { ...restProps, ref: callbackRef, "data-read-only": readOnly, autoFocus: !1, className: restProps.className || "pt-editable", decorate, onBlur: handleOnBlur, onCopy: handleCopy, onCut: handleCut, onClick: handleClick, onDOMBeforeInput: handleOnBeforeInput, onDragStart: handleDragStart, onDrag: handleDrag, onDragEnd: handleDragEnd, onDragEnter: handleDragEnter, onDragOver: handleDragOver, onDrop: handleDrop, onDragLeave: handleDragLeave, onFocus: handleOnFocus, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, onPaste: handlePaste, readOnly, renderPlaceholder: void 0, renderElement, renderLeaf, renderText, scrollSelectionIntoView: scrollSelectionIntoViewToSlate }), $[152] = callbackRef, $[153] = decorate, $[154] = handleClick, $[155] = handleCopy, $[156] = handleCut, $[157] = handleDrag, $[158] = handleDragEnd, $[159] = handleDragEnter, $[160] = handleDragLeave, $[161] = handleDragOver, $[162] = handleDragStart, $[163] = handleDrop, $[164] = handleKeyDown, $[165] = handleKeyUp, $[166] = handleOnBeforeInput, $[167] = handleOnBlur, $[168] = handleOnFocus, $[169] = handlePaste, $[170] = hasInvalidValue, $[171] = readOnly, $[172] = renderElement, $[173] = renderLeaf, $[174] = restProps, $[175] = scrollSelectionIntoViewToSlate, $[176] = t39) : t39 = $[176], t39;
|
|
2723
2717
|
});
|
|
2724
2718
|
PortableTextEditable.displayName = "ForwardRef(PortableTextEditable)";
|
|
2725
2719
|
function noop() {
|