@portabletext/editor 4.3.9 → 4.3.10
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 +12 -9
- package/lib/index.js.map +1 -1
- package/package.json +3 -3
package/lib/index.js
CHANGED
|
@@ -1502,7 +1502,7 @@ function RenderBlock$1({
|
|
|
1502
1502
|
});
|
|
1503
1503
|
}
|
|
1504
1504
|
function RenderInlineObject(props) {
|
|
1505
|
-
const $ = c(
|
|
1505
|
+
const $ = c(28), inlineObjectRef = useRef(null), slateEditor = useSlateStatic();
|
|
1506
1506
|
let t0;
|
|
1507
1507
|
if ($[0] !== props.element._type || $[1] !== props.legacySchema.inlineObjects) {
|
|
1508
1508
|
let t12;
|
|
@@ -1532,18 +1532,21 @@ function RenderInlineObject(props) {
|
|
|
1532
1532
|
_type: props.element._type,
|
|
1533
1533
|
...t1
|
|
1534
1534
|
}, $[7] = props.element._key, $[8] = props.element._type, $[9] = t1, $[10] = t2) : t2 = $[10];
|
|
1535
|
-
const inlineObject_0 = t2
|
|
1536
|
-
let
|
|
1537
|
-
$[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
1535
|
+
const inlineObject_0 = t2;
|
|
1536
|
+
let t3;
|
|
1537
|
+
$[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t3 = {
|
|
1538
1538
|
display: "inline-block"
|
|
1539
|
-
}, $[11] =
|
|
1539
|
+
}, $[11] = t3) : t3 = $[11];
|
|
1540
|
+
const t4 = !props.readOnly;
|
|
1540
1541
|
let t5;
|
|
1541
|
-
$[12] !== focused || $[13] !== inlineObject_0 || $[14] !== legacySchemaType || $[15] !== path || $[16] !== props.renderChild || $[17] !== selected ? (t5 =
|
|
1542
|
+
$[12] !== focused || $[13] !== inlineObject_0 || $[14] !== legacySchemaType || $[15] !== path || $[16] !== props.renderChild || $[17] !== selected ? (t5 = props.renderChild && path && legacySchemaType ? /* @__PURE__ */ jsx(RenderChild$1, { renderChild: props.renderChild, annotations: [], editorElementRef: inlineObjectRef, selected, focused, path, schemaType: legacySchemaType, value: inlineObject_0, type: legacySchemaType, children: /* @__PURE__ */ jsx(RenderDefaultInlineObject, { inlineObject: inlineObject_0 }) }) : /* @__PURE__ */ jsx(RenderDefaultInlineObject, { inlineObject: inlineObject_0 }), $[12] = focused, $[13] = inlineObject_0, $[14] = legacySchemaType, $[15] = path, $[16] = props.renderChild, $[17] = selected, $[18] = t5) : t5 = $[18];
|
|
1542
1543
|
let t6;
|
|
1543
|
-
|
|
1544
|
+
$[19] !== t4 || $[20] !== t5 ? (t6 = /* @__PURE__ */ jsx("span", { ref: inlineObjectRef, style: t3, draggable: t4, children: t5 }), $[19] = t4, $[20] = t5, $[21] = t6) : t6 = $[21];
|
|
1545
|
+
let t7;
|
|
1546
|
+
return $[22] !== inlineObject_0._key || $[23] !== inlineObject_0._type || $[24] !== props.attributes || $[25] !== props.children || $[26] !== t6 ? (t7 = /* @__PURE__ */ jsxs("span", { ...props.attributes, className: "pt-inline-object", "data-child-key": inlineObject_0._key, "data-child-name": inlineObject_0._type, "data-child-type": "object", children: [
|
|
1544
1547
|
props.children,
|
|
1545
|
-
|
|
1546
|
-
] }), $[
|
|
1548
|
+
t6
|
|
1549
|
+
] }), $[22] = inlineObject_0._key, $[23] = inlineObject_0._type, $[24] = props.attributes, $[25] = props.children, $[26] = t6, $[27] = t7) : t7 = $[27], t7;
|
|
1547
1550
|
}
|
|
1548
1551
|
function RenderChild$1({
|
|
1549
1552
|
renderChild,
|