@portabletext/editor 8.1.4 → 8.1.6
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 +2 -1
- package/lib/index.js.map +1 -1
- package/package.json +3 -3
package/lib/index.js
CHANGED
|
@@ -3242,6 +3242,7 @@ const RestoreDOM = IS_ANDROID ? RestoreDOMComponent : ({ children }) => /* @__PU
|
|
|
3242
3242
|
spellCheck: HAS_BEFORE_INPUT_SUPPORT || !CAN_USE_DOM ? attributes.spellCheck : !1,
|
|
3243
3243
|
autoCorrect: HAS_BEFORE_INPUT_SUPPORT || !CAN_USE_DOM ? attributes.autoCorrect : "false",
|
|
3244
3244
|
autoCapitalize: HAS_BEFORE_INPUT_SUPPORT || !CAN_USE_DOM ? attributes.autoCapitalize : "false",
|
|
3245
|
+
"data-slate-editor": !0,
|
|
3245
3246
|
"data-pt-editor": !0,
|
|
3246
3247
|
"data-pt-path": "",
|
|
3247
3248
|
contentEditable: !readOnly,
|
|
@@ -8820,7 +8821,7 @@ function countUtf8Bytes(str) {
|
|
|
8820
8821
|
for (let i = 0; i < str.length; i++) {
|
|
8821
8822
|
let codePoint = str.codePointAt(i);
|
|
8822
8823
|
if (typeof codePoint > "u") throw Error("Failed to get codepoint");
|
|
8823
|
-
bytes += utf8len(codePoint);
|
|
8824
|
+
codePoint > 65535 && i++, bytes += utf8len(codePoint);
|
|
8824
8825
|
}
|
|
8825
8826
|
return bytes;
|
|
8826
8827
|
}
|