superdoc 2.29.0-next.13 → 2.29.0-next.17

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.
Files changed (67) hide show
  1. package/dist/chunks/{FindReplaceSurface-BKVHzhQ4.es.js → FindReplaceSurface-B_5ggdWg.es.js} +1 -1
  2. package/dist/chunks/{FindReplaceSurface-BNDrJ6VS.cjs → FindReplaceSurface-fVHxPXtn.cjs} +1 -1
  3. package/dist/chunks/{PasswordPromptSurface-6mF6Azda.es.js → PasswordPromptSurface-CZqhDQQ1.es.js} +1 -1
  4. package/dist/chunks/{PasswordPromptSurface-BNkaztaP.cjs → PasswordPromptSurface-x8GNmMJT.cjs} +1 -1
  5. package/dist/chunks/{PdfViewer-aOWhUVI7.es.js → PdfViewer-CW09MNrB.es.js} +4 -10
  6. package/dist/chunks/{PdfViewer-DmSkZehl.cjs → PdfViewer-CkrAHpC-.cjs} +4 -10
  7. package/dist/chunks/{_plugin-vue_export-helper-6MBoygIY.cjs → _plugin-vue_export-helper-BkbCxNeT.cjs} +31 -7
  8. package/dist/chunks/{_plugin-vue_export-helper-CsJQtMvr.es.js → _plugin-vue_export-helper-DRPRMkeA.es.js} +20 -8
  9. package/dist/chunks/{create-super-doc-ui-DdT4b29f.es.js → create-super-doc-ui-Dc8dQAMc.es.js} +54 -77
  10. package/dist/chunks/{create-super-doc-ui-_SbygYQ4.cjs → create-super-doc-ui-L60GhVAX.cjs} +177 -206
  11. package/dist/collaboration-upgrade-engine.cjs +1 -1
  12. package/dist/collaboration-upgrade-engine.es.js +1 -1
  13. package/dist/document-api/src/contract/command-catalog.d.ts +1 -1
  14. package/dist/public/ui-react.cjs +1 -1
  15. package/dist/public/ui-react.es.js +1 -1
  16. package/dist/public/ui-vue.cjs +1 -1
  17. package/dist/public/ui-vue.es.js +1 -1
  18. package/dist/public/ui.cjs +1 -1
  19. package/dist/public/ui.es.js +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/style.layered.css +1 -1
  22. package/dist/superdoc/src/components/CommentsLayer/collect-removed-comment-ids.d.ts +11 -1
  23. package/dist/superdoc/src/components/CommentsLayer/collect-tracked-change-thread.d.ts +19 -2
  24. package/dist/superdoc/src/components/CommentsLayer/comment-urls.d.ts +1 -1
  25. package/dist/superdoc/src/components/CommentsLayer/commentsList/super-comments-list.d.ts +23 -20
  26. package/dist/superdoc/src/components/CommentsLayer/helpers.d.ts +1 -4
  27. package/dist/superdoc/src/components/CommentsLayer/tracked-change-threading.d.ts +16 -1
  28. package/dist/superdoc/src/components/Whiteboard/WhiteboardLayer.vue.d.ts +4 -5
  29. package/dist/superdoc/src/components/Whiteboard/WhiteboardPage.vue.d.ts +3 -4
  30. package/dist/superdoc/src/components/Whiteboard/whiteboard-types.d.ts +2 -0
  31. package/dist/superdoc/src/composables/use-find-replace.d.ts +13 -3
  32. package/dist/superdoc/src/composables/use-password-prompt.d.ts +1 -1
  33. package/dist/superdoc/src/composables/use-viewport-fit.d.ts +27 -5
  34. package/dist/superdoc/src/core/SuperDoc.d.ts +3 -3
  35. package/dist/superdoc/src/core/pdf/pdf-adapter.d.ts +6 -2
  36. package/dist/superdoc/src/core/types/index.d.ts +36 -4
  37. package/dist/superdoc/src/core/v2-integration/browser-peer-runtime.d.ts +5 -3
  38. package/dist/superdoc/src/core/v2-integration/cdn-engine-loader.d.ts +3 -13
  39. package/dist/superdoc/src/core/v2-integration/internal-vue-runtime.d.ts +64 -59
  40. package/dist/superdoc/src/helpers/object-guards.d.ts +1 -0
  41. package/dist/superdoc/src/internal/diagnostics/translate-diagnostic.d.ts +6 -4
  42. package/dist/superdoc/src/internal/toolbar/built-in/PageNumberMenu.vue.d.ts +25 -15
  43. package/dist/superdoc/src/internal/toolbar/built-in/constants.d.ts +3 -1
  44. package/dist/superdoc/src/internal/toolbar/built-in/font-options.d.ts +15 -1
  45. package/dist/superdoc/src/internal/toolbar/built-in/font-typeahead.d.ts +37 -7
  46. package/dist/superdoc/src/internal/toolbar/built-in/format-negation.d.ts +10 -4
  47. package/dist/superdoc/src/internal/toolbar/built-in/general.d.ts +12 -1
  48. package/dist/superdoc/src/internal/toolbar/built-in/helpers.d.ts +9 -4
  49. package/dist/superdoc/src/internal/toolbar/built-in/list-style-buttons.d.ts +2 -2
  50. package/dist/superdoc/src/internal/toolbar/built-in/page-number-feedback.d.ts +4 -5
  51. package/dist/superdoc/src/internal/toolbar/built-in/scroll-helpers.d.ts +3 -4
  52. package/dist/superdoc/src/internal/toolbar/built-in/toolbarIcons.d.ts +78 -145
  53. package/dist/superdoc/src/internal/toolbar/built-in/url-safety.d.ts +11 -3
  54. package/dist/superdoc/src/internal/toolbar/built-in-toolbar.d.ts +4 -3
  55. package/dist/superdoc/src/internal/toolbar/image-upload.d.ts +29 -39
  56. package/dist/superdoc/src/stores/comments-store.d.ts +7 -7
  57. package/dist/superdoc/src/stores/helpers/comment-document-scope.d.ts +22 -0
  58. package/dist/superdoc/src/stores/helpers/pending-selection-snapshot.d.ts +17 -0
  59. package/dist/superdoc/src/stores/helpers/tracked-change-compaction.d.ts +16 -0
  60. package/dist/superdoc/src/stores/helpers/tracked-change-decision.d.ts +45 -0
  61. package/dist/superdoc/src/stores/superdoc-store.d.ts +21 -21
  62. package/dist/superdoc.cjs +396 -423
  63. package/dist/superdoc.es.js +303 -330
  64. package/dist-cdn/style.layered.css +1 -1
  65. package/dist-cdn/superdoc.min.css +1 -1
  66. package/dist-cdn/superdoc.min.js +41 -41
  67. package/package.json +3 -2
@@ -1,4 +1,4 @@
1
- const require__plugin_vue_export_helper = require("./_plugin-vue_export-helper-6MBoygIY.cjs");
1
+ const require__plugin_vue_export_helper = require("./_plugin-vue_export-helper-BkbCxNeT.cjs");
2
2
  const require_is_finite_number = require("./is-finite-number-BEXgTRgc.cjs");
3
3
  //#region src/internal/diagnostics/workflow-recording.ts
4
4
  var fields$1 = /* @__PURE__ */ new Set([
@@ -1079,11 +1079,6 @@ var decodeLayoutStoryDataset = (raw) => {
1079
1079
  `${DOM_CLASS_NAMES.BLOCK_SDT}${DATA_ATTRS.SDT_ID}`;
1080
1080
  `${DATA_ATTRS.DRAGGABLE}`;
1081
1081
  //#endregion
1082
- //#region src/helpers/object-guards.ts
1083
- function isPlainObject(value) {
1084
- return typeof value === "object" && value !== null && !Array.isArray(value);
1085
- }
1086
- //#endregion
1087
1082
  //#region src/helpers/tracked-change-comment-lane.ts
1088
1083
  var TRACKED_CHANGE_COMMENT_LANE_ID_PREFIX = "tc-comment:";
1089
1084
  function isSyntheticTrackedChangeCommentLaneItem(item) {
@@ -1304,7 +1299,7 @@ function shallowEqual(a, b) {
1304
1299
  return true;
1305
1300
  }
1306
1301
  //#endregion
1307
- //#region src/internal/toolbar/image-upload.js
1302
+ //#region src/internal/toolbar/image-upload.ts
1308
1303
  /**
1309
1304
  * Interactive image acquisition for the built-in toolbar (SD-3567).
1310
1305
  *
@@ -1325,8 +1320,6 @@ var SUPPORTED_IMAGE_EXTENSIONS = /\.(png|jpe?g)$/i;
1325
1320
  /**
1326
1321
  * Whether a picked/dropped file is an insertable image (PNG/JPEG). Falls back
1327
1322
  * to the file extension when the browser reports no MIME type.
1328
- * @param {File | null | undefined} file
1329
- * @returns {boolean}
1330
1323
  */
1331
1324
  function isSupportedImageFile(file) {
1332
1325
  if (!file) return false;
@@ -1341,8 +1334,6 @@ function isSupportedImageFile(file) {
1341
1334
  * accepts those by extension, but `readAsDataURL` would then produce an
1342
1335
  * `application/octet-stream` data URI that `create.image` rejects. Rewrite
1343
1336
  * the media type from the filename so extension-accepted files still insert.
1344
- * @param {Blob & { name?: string }} file
1345
- * @returns {Promise<string>}
1346
1337
  */
1347
1338
  function fileToDataUri(file) {
1348
1339
  return new Promise((resolve, reject) => {
@@ -1355,9 +1346,6 @@ function fileToDataUri(file) {
1355
1346
  /**
1356
1347
  * Ensure a data URI read from a supported file carries a PNG/JPEG media type.
1357
1348
  * Leaves URIs already typed as a supported image (or uninferable ones) alone.
1358
- * @param {string} dataUri
1359
- * @param {(Blob & { name?: string }) | null | undefined} file
1360
- * @returns {string}
1361
1349
  */
1362
1350
  function normalizeImageDataUri(dataUri, file) {
1363
1351
  const match = /^data:([^;,]*);base64,/.exec(dataUri);
@@ -1374,9 +1362,6 @@ function normalizeImageDataUri(dataUri, file) {
1374
1362
  * `handleImageUpload` callback when configured (V1 contract:
1375
1363
  * `(file: File) => Promise<string>`). A returned non-data URL is fetched and
1376
1364
  * embedded, because `create.image` requires an embedded base64 data URI.
1377
- * @param {File} file
1378
- * @param {((file: File) => Promise<string>) | null | undefined} handleImageUpload
1379
- * @returns {Promise<string>}
1380
1365
  */
1381
1366
  async function resolveImageSrc(file, handleImageUpload) {
1382
1367
  if (typeof handleImageUpload === "function") {
@@ -1392,9 +1377,6 @@ async function resolveImageSrc(file, handleImageUpload) {
1392
1377
  * presigned URLs often respond `application/octet-stream`, so keep a filename
1393
1378
  * hint (URL path, falling back to the originally picked file) for the media
1394
1379
  * type normalization in `fileToDataUri`.
1395
- * @param {string} url
1396
- * @param {File | null | undefined} pickedFile
1397
- * @returns {Promise<string>}
1398
1380
  */
1399
1381
  async function embedRemoteImage(url, pickedFile) {
1400
1382
  const response = await fetch(url);
@@ -1408,13 +1390,6 @@ async function embedRemoteImage(url, pickedFile) {
1408
1390
  * stays attached (hidden) so automation and tests can drive it; `destroy()`
1409
1391
  * removes it. Picking a file calls `onPick(file)`; an unsupported type or a
1410
1392
  * failed pick routes through `onError(error)`.
1411
- *
1412
- * @param {{
1413
- * ownerDocument?: Document,
1414
- * onPick?: (file: File) => unknown,
1415
- * onError?: (error: Error) => void,
1416
- * }} options
1417
- * @returns {{ input: HTMLInputElement, open: () => void, destroy: () => void }}
1418
1393
  */
1419
1394
  function createImageFilePicker({ ownerDocument = document, onPick, onError } = {}) {
1420
1395
  const input = ownerDocument.createElement("input");
@@ -2676,7 +2651,7 @@ function sdRunPropsToInlineRunPatch(props) {
2676
2651
  if (!props || typeof props !== "object") return {};
2677
2652
  const patch = {};
2678
2653
  const fonts = props.fonts;
2679
- if (isPlainObject(fonts)) patch.rFonts = {
2654
+ if (require__plugin_vue_export_helper.isPlainObject(fonts)) patch.rFonts = {
2680
2655
  ascii: fonts.ascii,
2681
2656
  hAnsi: fonts.hAnsi,
2682
2657
  eastAsia: fonts.eastAsia,
@@ -2689,7 +2664,7 @@ function sdRunPropsToInlineRunPatch(props) {
2689
2664
  };
2690
2665
  if (props.fontFamily != null) patch.fontFamily = props.fontFamily;
2691
2666
  const lang = props.lang;
2692
- if (isPlainObject(lang)) patch.lang = {
2667
+ if (require__plugin_vue_export_helper.isPlainObject(lang)) patch.lang = {
2693
2668
  val: lang.val,
2694
2669
  eastAsia: lang.eastAsia,
2695
2670
  bidi: lang.bidi
@@ -2733,24 +2708,24 @@ function sdRunPropsToInlineRunPatch(props) {
2733
2708
  function projectColorRefToInlineColor(color) {
2734
2709
  if (!color) return void 0;
2735
2710
  if (typeof color === "string") return color;
2736
- if (!isPlainObject(color)) return void 0;
2711
+ if (!require__plugin_vue_export_helper.isPlainObject(color)) return void 0;
2737
2712
  if (color.model === "rgb") return color.value;
2738
2713
  if (color.model === "auto") return "auto";
2739
2714
  }
2740
2715
  function projectUnderlineToInlinePatch(underline) {
2741
2716
  if (underline == null) return void 0;
2742
- if (!isPlainObject(underline)) return true;
2717
+ if (!require__plugin_vue_export_helper.isPlainObject(underline)) return true;
2743
2718
  const patch = {};
2744
2719
  if (underline.style != null) patch.style = underline.style;
2745
2720
  const color = underline.color;
2746
- if (isPlainObject(color)) {
2721
+ if (require__plugin_vue_export_helper.isPlainObject(color)) {
2747
2722
  if (color.model === "rgb") patch.color = color.value;
2748
2723
  else if (color.model === "theme") patch.themeColor = color.theme;
2749
2724
  }
2750
2725
  return Object.keys(patch).length > 0 ? patch : true;
2751
2726
  }
2752
2727
  function projectShadingToInlinePatch(shading) {
2753
- if (!isPlainObject(shading)) return void 0;
2728
+ if (!require__plugin_vue_export_helper.isPlainObject(shading)) return void 0;
2754
2729
  const patch = {};
2755
2730
  const fill = projectColorRefToInlineColor(shading.fill);
2756
2731
  if (fill != null) patch.fill = fill;
@@ -2760,7 +2735,7 @@ function projectShadingToInlinePatch(shading) {
2760
2735
  return Object.keys(patch).length > 0 ? patch : void 0;
2761
2736
  }
2762
2737
  function projectBorderToInlinePatch(border) {
2763
- if (!isPlainObject(border)) return void 0;
2738
+ if (!require__plugin_vue_export_helper.isPlainObject(border)) return void 0;
2764
2739
  const patch = {};
2765
2740
  if (border.style != null) patch.val = border.style;
2766
2741
  if (border.width != null) patch.sz = border.width;
@@ -2789,8 +2764,8 @@ function selectionKey(selection) {
2789
2764
  //#region src/helpers/v2-review-mutation-impact.ts
2790
2765
  function mutationCommittedEventChangedVisibleContent(event) {
2791
2766
  if (event.dryRun === true) return false;
2792
- if (isPlainObject(event.result) && event.result.noop === true) return false;
2793
- const receipt = isPlainObject(event.receipt) ? event.receipt : null;
2767
+ if (require__plugin_vue_export_helper.isPlainObject(event.result) && event.result.noop === true) return false;
2768
+ const receipt = require__plugin_vue_export_helper.isPlainObject(event.receipt) ? event.receipt : null;
2794
2769
  if (receipt?.changed === false || receipt?.noop === true || receipt?.status === "NO_OP") return false;
2795
2770
  return true;
2796
2771
  }
@@ -2805,18 +2780,18 @@ function mutationCommittedEventChangedDocument(event) {
2805
2780
  * plans carry the same identities through `trackedChanges` and per-step ids.
2806
2781
  */
2807
2782
  function getV2TrackedChangeMutationImpact(event) {
2808
- if (!isPlainObject(event) || event.type !== "mutation:committed") return null;
2783
+ if (!require__plugin_vue_export_helper.isPlainObject(event) || event.type !== "mutation:committed") return null;
2809
2784
  const payload = event.origin === "history" ? event.result : event.receipt;
2810
- if (!isPlainObject(payload)) return null;
2785
+ if (!require__plugin_vue_export_helper.isPlainObject(payload)) return null;
2811
2786
  const upsertIds = /* @__PURE__ */ new Set();
2812
2787
  const removedIds = /* @__PURE__ */ new Set();
2813
2788
  const remappedPairs = [];
2814
2789
  const collectEntity = (entry, into) => {
2815
- if (!isPlainObject(entry) || entry.kind !== "entity" || entry.entityType !== "trackedChange") return;
2790
+ if (!require__plugin_vue_export_helper.isPlainObject(entry) || entry.kind !== "entity" || entry.entityType !== "trackedChange") return;
2816
2791
  if (typeof entry.entityId === "string" && entry.entityId.length > 0) into.add(entry.entityId);
2817
2792
  };
2818
2793
  const readEntityId = (entry) => {
2819
- if (!isPlainObject(entry) || entry.kind !== "entity" || entry.entityType !== "trackedChange") return null;
2794
+ if (!require__plugin_vue_export_helper.isPlainObject(entry) || entry.kind !== "entity" || entry.entityType !== "trackedChange") return null;
2820
2795
  return typeof entry.entityId === "string" && entry.entityId.length > 0 ? entry.entityId : null;
2821
2796
  };
2822
2797
  if (Array.isArray(payload.inserted)) payload.inserted.forEach((entry) => collectEntity(entry, upsertIds));
@@ -2824,13 +2799,13 @@ function getV2TrackedChangeMutationImpact(event) {
2824
2799
  if (Array.isArray(payload.trackedChangeRefs)) payload.trackedChangeRefs.forEach((entry) => collectEntity(entry, upsertIds));
2825
2800
  if (Array.isArray(payload.trackedChanges)) payload.trackedChanges.forEach((entry) => collectEntity(entry, upsertIds));
2826
2801
  if (Array.isArray(payload.steps)) for (const step of payload.steps) {
2827
- if (!isPlainObject(step) || !Array.isArray(step.trackedChangeIds)) continue;
2802
+ if (!require__plugin_vue_export_helper.isPlainObject(step) || !Array.isArray(step.trackedChangeIds)) continue;
2828
2803
  for (const id of step.trackedChangeIds) if (typeof id === "string" && id.length > 0) upsertIds.add(id);
2829
2804
  }
2830
2805
  if (Array.isArray(payload.removed)) payload.removed.forEach((entry) => collectEntity(entry, removedIds));
2831
2806
  if (Array.isArray(payload.invalidatedRefs)) payload.invalidatedRefs.forEach((entry) => collectEntity(entry, removedIds));
2832
2807
  if (Array.isArray(payload.remappedRefs)) for (const mapping of payload.remappedRefs) {
2833
- if (!isPlainObject(mapping)) continue;
2808
+ if (!require__plugin_vue_export_helper.isPlainObject(mapping)) continue;
2834
2809
  const fromId = readEntityId(mapping.from);
2835
2810
  const toId = readEntityId(mapping.to);
2836
2811
  if (fromId) removedIds.add(fromId);
@@ -2856,10 +2831,10 @@ function getV2TrackedChangeMutationImpact(event) {
2856
2831
  */
2857
2832
  function collectV2InvalidatedCommentIds(event) {
2858
2833
  const removedIds = /* @__PURE__ */ new Set();
2859
- if (!isPlainObject(event) || event.type !== "mutation:committed") return removedIds;
2834
+ if (!require__plugin_vue_export_helper.isPlainObject(event) || event.type !== "mutation:committed") return removedIds;
2860
2835
  const payload = event.origin === "history" ? event.result : event.receipt;
2861
- if (!isPlainObject(payload) || !Array.isArray(payload.invalidatedRefs)) return removedIds;
2862
- for (const ref of payload.invalidatedRefs) if (isPlainObject(ref) && ref.kind === "entity" && ref.entityType === "comment" && typeof ref.entityId === "string" && ref.entityId) removedIds.add(ref.entityId);
2836
+ if (!require__plugin_vue_export_helper.isPlainObject(payload) || !Array.isArray(payload.invalidatedRefs)) return removedIds;
2837
+ for (const ref of payload.invalidatedRefs) if (require__plugin_vue_export_helper.isPlainObject(ref) && ref.kind === "entity" && ref.entityType === "comment" && typeof ref.entityId === "string" && ref.entityId) removedIds.add(ref.entityId);
2863
2838
  return removedIds;
2864
2839
  }
2865
2840
  function applyV2CommentInvalidationFromMutation({ event, commentsStore, superdoc, documentId } = {}) {
@@ -2879,7 +2854,7 @@ function applyV2CommentInvalidationFromMutation({ event, commentsStore, superdoc
2879
2854
  }
2880
2855
  function readAllResolvedFact(event, receipt) {
2881
2856
  const fact = event.trackedChangeAllResolved;
2882
- if (event.origin === "history" || !isPlainObject(fact) || fact.schemaVersion !== 1 || fact.targetKind !== "all" || fact.decision !== "accept" && fact.decision !== "reject" || fact.remainingLogicalCount !== 0 || typeof fact.catalogRevision !== "string" || !fact.catalogRevision || typeof fact.sourceCoverageRevision !== "string" || !fact.sourceCoverageRevision || typeof fact.logicalTargetCount !== "number" || !Number.isSafeInteger(fact.logicalTargetCount) || fact.logicalTargetCount <= 0 || typeof fact.physicalCarrierCount !== "number" || !Number.isSafeInteger(fact.physicalCarrierCount) || fact.physicalCarrierCount < fact.logicalTargetCount || typeof fact.txId !== "string" || fact.txId !== receipt.txId || typeof fact.documentEpoch !== "string" || !Number.isSafeInteger(fact.commitSequence) || typeof fact.packagePreviousRevision !== "string" || typeof fact.packageNextRevision !== "string" || fact.packagePreviousRevision === fact.packageNextRevision) return null;
2857
+ if (event.origin === "history" || !require__plugin_vue_export_helper.isPlainObject(fact) || fact.schemaVersion !== 1 || fact.targetKind !== "all" || fact.decision !== "accept" && fact.decision !== "reject" || fact.remainingLogicalCount !== 0 || typeof fact.catalogRevision !== "string" || !fact.catalogRevision || typeof fact.sourceCoverageRevision !== "string" || !fact.sourceCoverageRevision || typeof fact.logicalTargetCount !== "number" || !Number.isSafeInteger(fact.logicalTargetCount) || fact.logicalTargetCount <= 0 || typeof fact.physicalCarrierCount !== "number" || !Number.isSafeInteger(fact.physicalCarrierCount) || fact.physicalCarrierCount < fact.logicalTargetCount || typeof fact.txId !== "string" || fact.txId !== receipt.txId || typeof fact.documentEpoch !== "string" || !Number.isSafeInteger(fact.commitSequence) || typeof fact.packagePreviousRevision !== "string" || typeof fact.packageNextRevision !== "string" || fact.packagePreviousRevision === fact.packageNextRevision) return null;
2883
2858
  return fact;
2884
2859
  }
2885
2860
  //#endregion
@@ -4865,20 +4840,20 @@ function hostMethod(target, name) {
4865
4840
  return typeof member === "function" ? (...args) => Reflect.apply(member, target, args) : null;
4866
4841
  }
4867
4842
  function readEffectiveInlineUniformityStates(raw) {
4868
- if (!isPlainObject(raw) || raw.success !== true) return null;
4843
+ if (!require__plugin_vue_export_helper.isPlainObject(raw) || raw.success !== true) return null;
4869
4844
  const states = {};
4870
- if (!isPlainObject(raw.values)) return states;
4845
+ if (!require__plugin_vue_export_helper.isPlainObject(raw.values)) return states;
4871
4846
  for (const [key, entry] of Object.entries(raw.values)) {
4872
4847
  if (!entry) continue;
4873
- states[key] = isPlainObject(entry) && entry.state === "uniform" && typeof entry.value === "string" ? {
4848
+ states[key] = require__plugin_vue_export_helper.isPlainObject(entry) && entry.state === "uniform" && typeof entry.value === "string" ? {
4874
4849
  state: "uniform",
4875
4850
  value: entry.value
4876
- } : { state: isPlainObject(entry) && entry.state === "mixed" ? "mixed" : "unresolvable" };
4851
+ } : { state: require__plugin_vue_export_helper.isPlainObject(entry) && entry.state === "mixed" ? "mixed" : "unresolvable" };
4877
4852
  }
4878
4853
  return states;
4879
4854
  }
4880
4855
  function hasAbortedFlag(value) {
4881
- return isPlainObject(value) && typeof value.aborted === "boolean";
4856
+ return require__plugin_vue_export_helper.isPlainObject(value) && typeof value.aborted === "boolean";
4882
4857
  }
4883
4858
  function isPromiseLike(value) {
4884
4859
  return Boolean(value) && (typeof value === "object" || typeof value === "function") && typeof value.then === "function";
@@ -5879,8 +5854,8 @@ function normalizeCommandState(state, source) {
5879
5854
  };
5880
5855
  }
5881
5856
  function projectTrackChangesItem(item) {
5882
- if (!isPlainObject(item)) return null;
5883
- const change = isPlainObject(item.change) ? item.change : item;
5857
+ if (!require__plugin_vue_export_helper.isPlainObject(item)) return null;
5858
+ const change = require__plugin_vue_export_helper.isPlainObject(item.change) ? item.change : item;
5884
5859
  return {
5885
5860
  ...item,
5886
5861
  id: item.id ?? change.id,
@@ -5921,9 +5896,9 @@ function documentChangeFromHostEvent(event) {
5921
5896
  };
5922
5897
  if (event.type !== "mutation:committed") return null;
5923
5898
  if (event.origin === "history") {
5924
- const result = isPlainObject(event.result) ? event.result : null;
5899
+ const result = require__plugin_vue_export_helper.isPlainObject(event.result) ? event.result : null;
5925
5900
  if (!result || result.noop === true) return null;
5926
- const history = isPlainObject(result.history) ? result.history : null;
5901
+ const history = require__plugin_vue_export_helper.isPlainObject(result.history) ? result.history : null;
5927
5902
  return {
5928
5903
  cause: event.direction === "redo" ? "redo" : "undo",
5929
5904
  changeTag: null,
@@ -5932,7 +5907,7 @@ function documentChangeFromHostEvent(event) {
5932
5907
  };
5933
5908
  }
5934
5909
  if (!mutationCommittedEventChangedDocument(event)) return null;
5935
- const receipt = isPlainObject(event.receipt) ? event.receipt : {};
5910
+ const receipt = require__plugin_vue_export_helper.isPlainObject(event.receipt) ? event.receipt : {};
5936
5911
  return {
5937
5912
  cause: event.cause === "user" ? "user" : "api",
5938
5913
  changeTag: typeof receipt.changeTag === "string" ? receipt.changeTag : null,
@@ -6120,9 +6095,9 @@ function selectionTargetFromTextTarget(target) {
6120
6095
  };
6121
6096
  }
6122
6097
  function capturedTableCellTarget(value) {
6123
- if (!isPlainObject(value)) return null;
6098
+ if (!require__plugin_vue_export_helper.isPlainObject(value)) return null;
6124
6099
  if (value.kind !== "selection" || value.coordinateSpace !== void 0 && value.coordinateSpace !== "visible" && value.coordinateSpace !== "tracked" || value.story !== void 0 && !isStoryLocator(value.story)) return null;
6125
- for (const point of [value.start, value.end]) if (!isPlainObject(point) || point.kind !== "text" || typeof point.blockId !== "string" || point.blockId.length === 0 || typeof point.offset !== "number" || !Number.isInteger(point.offset) || point.offset < 0 || point.story !== void 0 && !isStoryLocator(point.story)) return null;
6100
+ for (const point of [value.start, value.end]) if (!require__plugin_vue_export_helper.isPlainObject(point) || point.kind !== "text" || typeof point.blockId !== "string" || point.blockId.length === 0 || typeof point.offset !== "number" || !Number.isInteger(point.offset) || point.offset < 0 || point.story !== void 0 && !isStoryLocator(point.story)) return null;
6126
6101
  return value;
6127
6102
  }
6128
6103
  function selectionTargetForRestore(capture) {
@@ -6377,7 +6352,7 @@ function createSuperDocUI(options) {
6377
6352
  };
6378
6353
  try {
6379
6354
  const result = open();
6380
- if (isPlainObject(result) && result.ok === false) return {
6355
+ if (require__plugin_vue_export_helper.isPlainObject(result) && result.ok === false) return {
6381
6356
  ok: false,
6382
6357
  reason: coerceSuperDocUIReason(result.reason, SUPERDOC_UI_REASONS.operationUnavailable)
6383
6358
  };
@@ -6422,7 +6397,7 @@ function createSuperDocUI(options) {
6422
6397
  const getSnapshot = hostMethod(getV2ReviewWindowSource(), "getSnapshot");
6423
6398
  if (!getSnapshot) return null;
6424
6399
  const snapshot = safeCall(() => getSnapshot(), null);
6425
- return isPlainObject(snapshot) ? snapshot : null;
6400
+ return require__plugin_vue_export_helper.isPlainObject(snapshot) ? snapshot : null;
6426
6401
  };
6427
6402
  const hasV2ReviewWindowFeed = () => typeof getV2ReviewWindowSource()?.getSnapshot === "function";
6428
6403
  const reviewWindowSliceStatus = (snapshot) => {
@@ -6443,8 +6418,8 @@ function createSuperDocUI(options) {
6443
6418
  let wholeTableParagraphSeed = null;
6444
6419
  const readHostSelectionSnapshot = () => {
6445
6420
  const handles = safeCall(() => hostMethod(getHost(), "getHandles")?.() ?? null, null);
6446
- const editing = isPlainObject(handles) ? handles.editing : void 0;
6447
- const getSnapshot = hostMethod(isPlainObject(editing) ? editing.selection : void 0, "getSnapshot") ?? hostMethod(isPlainObject(handles) ? handles.selection : void 0, "getSnapshot");
6421
+ const editing = require__plugin_vue_export_helper.isPlainObject(handles) ? handles.editing : void 0;
6422
+ const getSnapshot = hostMethod(require__plugin_vue_export_helper.isPlainObject(editing) ? editing.selection : void 0, "getSnapshot") ?? hostMethod(require__plugin_vue_export_helper.isPlainObject(handles) ? handles.selection : void 0, "getSnapshot");
6448
6423
  if (!getSnapshot) return null;
6449
6424
  const snapshot = safeCall(() => getSnapshot(), null);
6450
6425
  return snapshot && typeof snapshot === "object" ? snapshot : null;
@@ -6587,9 +6562,9 @@ function createSuperDocUI(options) {
6587
6562
  const getSnapshot = hostMethod(getEditCommands(), "getSnapshot");
6588
6563
  if (!getSnapshot) return null;
6589
6564
  const snap = safeCall(() => getSnapshot(), null);
6590
- const commands = isPlainObject(snap) ? snap.commands : void 0;
6591
- const entry = isPlainObject(commands) ? commands[commandId] : void 0;
6592
- return isPlainObject(entry) ? entry : null;
6565
+ const commands = require__plugin_vue_export_helper.isPlainObject(snap) ? snap.commands : void 0;
6566
+ const entry = require__plugin_vue_export_helper.isPlainObject(commands) ? commands[commandId] : void 0;
6567
+ return require__plugin_vue_export_helper.isPlainObject(entry) ? entry : null;
6593
6568
  };
6594
6569
  /** Read the `lists.apply` command state surfaced by the v2 edit-command snapshot. */
6595
6570
  const readListApplyStateEntry = () => {
@@ -6618,7 +6593,7 @@ function createSuperDocUI(options) {
6618
6593
  const getTableContext = hostMethod(getHost(), "getTableContext");
6619
6594
  if (!getTableContext) return null;
6620
6595
  const snapshot = safeCall(() => getTableContext(), null);
6621
- return isPlainObject(snapshot) ? snapshot : null;
6596
+ return require__plugin_vue_export_helper.isPlainObject(snapshot) ? snapshot : null;
6622
6597
  };
6623
6598
  const resolveTableContext = () => {
6624
6599
  const snapshot = readHostTableContext();
@@ -6662,12 +6637,12 @@ function createSuperDocUI(options) {
6662
6637
  const readHandles = hostMethod(getHost(), "getHandles");
6663
6638
  if (!readHandles) return;
6664
6639
  const handles = safeCall(() => readHandles(), null);
6665
- if (!isPlainObject(handles)) return;
6640
+ if (!require__plugin_vue_export_helper.isPlainObject(handles)) return;
6666
6641
  const review = handles.review;
6667
6642
  if (next) {
6668
6643
  const setActiveReviewTarget = hostMethod(review, "setActiveReviewTarget");
6669
6644
  if (!setActiveReviewTarget) return;
6670
- const layout = isPlainObject(handles.layout) ? handles.layout : void 0;
6645
+ const layout = require__plugin_vue_export_helper.isPlainObject(handles.layout) ? handles.layout : void 0;
6671
6646
  safeCall(() => setActiveReviewTarget({
6672
6647
  entityType,
6673
6648
  entityId: next.id,
@@ -6685,7 +6660,7 @@ function createSuperDocUI(options) {
6685
6660
  const clearActiveReviewTarget = hostMethod(review, "clearActiveReviewTarget");
6686
6661
  if (!getActiveReviewTarget || !clearActiveReviewTarget) return;
6687
6662
  const activeTarget = safeCall(() => getActiveReviewTarget(), null);
6688
- if (isPlainObject(activeTarget) && activeTarget.entityType === entityType) safeCall(() => clearActiveReviewTarget(), void 0);
6663
+ if (require__plugin_vue_export_helper.isPlainObject(activeTarget) && activeTarget.entityType === entityType) safeCall(() => clearActiveReviewTarget(), void 0);
6689
6664
  };
6690
6665
  const mirrorTrackedChangeFocusToHost = (next) => mirrorReviewFocusToHost("trackedChange", next);
6691
6666
  const readReviewFocus = () => ({
@@ -6792,7 +6767,7 @@ function createSuperDocUI(options) {
6792
6767
  if (existing?.generation === generation) return existing.promise;
6793
6768
  const signal = uiTrackedChangesCatalogState.abortController.signal;
6794
6769
  const validateResult = (result) => {
6795
- const record = isPlainObject(result) ? result : void 0;
6770
+ const record = require__plugin_vue_export_helper.isPlainObject(result) ? result : void 0;
6796
6771
  if (signal.aborted || generation !== uiTrackedChangesCatalogState.generation || record?.reason === "review-hydration-superseded") throw new Error("ui-review-catalog-superseded");
6797
6772
  if (record?.ok === false) throw new Error(typeof record.reason === "string" ? record.reason : "ui-review-catalog-read-failed");
6798
6773
  return result;
@@ -6889,7 +6864,7 @@ function createSuperDocUI(options) {
6889
6864
  if (disposed) return;
6890
6865
  for (const listener of [...listeners]) listener(state);
6891
6866
  };
6892
- const record = isPlainObject(receipt) ? receipt : null;
6867
+ const record = require__plugin_vue_export_helper.isPlainObject(receipt) ? receipt : null;
6893
6868
  const readiness = getEditor()?.documentMutationReadiness;
6894
6869
  const waitForPostPaintTask = () => {
6895
6870
  const requestFrame = globalThis.requestAnimationFrame;
@@ -7537,6 +7512,23 @@ function createSuperDocUI(options) {
7537
7512
  const clearAsyncReadKeys = (predicate) => {
7538
7513
  for (const key of asyncReads.keys()) if (predicate(key)) asyncReads.delete(key);
7539
7514
  };
7515
+ const seedAsyncRead = (key, token, value, inflightToken = null) => {
7516
+ asyncReads.set(key, {
7517
+ token,
7518
+ value,
7519
+ hasSettled: true,
7520
+ inflightToken
7521
+ });
7522
+ };
7523
+ const selectionValidationSnapshot = () => ({
7524
+ held: typedCaretValidationHeld,
7525
+ pendingToken: pendingSelectionSeedValidationToken
7526
+ });
7527
+ const setSelectionValidation = (next) => {
7528
+ typedCaretValidationHeld = next.held;
7529
+ pendingSelectionSeedValidationToken = next.pendingToken;
7530
+ };
7531
+ const typingIsRecent = () => Date.now() - lastTypingMutationAtMs < HEAVY_READ_IDLE_MS;
7540
7532
  const selectionScopedAsyncReadKeys = (selection) => {
7541
7533
  const signature = selectionSignature(selection);
7542
7534
  const effectiveUniformityKey = effectiveInlineUniformityCacheKey(selection);
@@ -7666,7 +7658,7 @@ function createSuperDocUI(options) {
7666
7658
  if (fromConfig) return fromConfig;
7667
7659
  const getActiveRuntime = hostMethod(superdocRecord, "getActiveRuntime");
7668
7660
  const runtimeSnapshot = safeCall(getActiveRuntime ? () => hostMethod(getActiveRuntime(), "getSnapshot")?.() ?? null : void 0, null);
7669
- const fromRuntime = normalizeDocumentMode(isPlainObject(runtimeSnapshot) ? runtimeSnapshot.documentMode : void 0);
7661
+ const fromRuntime = normalizeDocumentMode(require__plugin_vue_export_helper.isPlainObject(runtimeSnapshot) ? runtimeSnapshot.documentMode : void 0);
7670
7662
  const fromOptions = normalizeDocumentMode((editor?.options)?.documentMode);
7671
7663
  return fromRuntime ?? fromOptions;
7672
7664
  };
@@ -7779,11 +7771,11 @@ function createSuperDocUI(options) {
7779
7771
  if (!host || !editor || !mount || !lifetime || lifetime.aborted || mode === null || seed.empty || seed.tableSelection?.kind !== "tableCells" || seed.tableSelection.type !== "table" || seed.target?.kind !== "text" || !seed.target.segments.length) return false;
7780
7772
  if (nativeSelection) {
7781
7773
  const presentation = safeCall(() => hostMethod(host, "readAppliedSelectionPresentation")?.(), null);
7782
- const applied = normalizeSelectionInfo(isPlainObject(presentation) ? presentation.selection : null);
7774
+ const applied = normalizeSelectionInfo(require__plugin_vue_export_helper.isPlainObject(presentation) ? presentation.selection : null);
7783
7775
  if (readHostSelectionSnapshot() !== nativeSelection || !isNonCollapsedHostSelection(nativeSelection) || !applied || selectionSignature(selectionSliceFromInfo(applied, "ready")) !== selectionSignature(selectionSliceFromInfo(seed, "ready")) || JSON.stringify(applied.tableSelection) !== JSON.stringify(seed.tableSelection)) return false;
7784
7776
  const snapshot = nativeSelection;
7785
7777
  const first = seed.target.segments[0]?.blockId, last = seed.target.segments.at(-1)?.blockId;
7786
- const matches = (point, blockId) => !!blockId && isPlainObject(point) && point.blockId === blockId && storyLocatorSignature(point.story ?? snapshot.story) === storyLocatorSignature(seed.target?.story);
7778
+ const matches = (point, blockId) => !!blockId && require__plugin_vue_export_helper.isPlainObject(point) && point.blockId === blockId && storyLocatorSignature(point.story ?? snapshot.story) === storyLocatorSignature(seed.target?.story);
7787
7779
  if (!(matches(snapshot.anchor, first) && matches(snapshot.focus, last) || matches(snapshot.focus, first) && matches(snapshot.anchor, last))) return false;
7788
7780
  }
7789
7781
  wholeTableParagraphSeed = {
@@ -7804,16 +7796,13 @@ function createSuperDocUI(options) {
7804
7796
  const foreground = foregroundMutationState();
7805
7797
  if (isNonCollapsedHostSelection(hostSelectionSnapshot) && readHostSelectionSnapshot() === hostSelectionSnapshot) {
7806
7798
  const seed = normalizeSelectionInfo(safeCall(() => hostMethod(host, "readLiveSelectionSyncSnapshot")?.(), null));
7807
- if (seed && !seed.selectionTarget && captureWholeTableParagraphSeed(host, seed, hostSelectionSnapshot)) asyncReads.set("selection", {
7808
- token: asyncReads.get("selection")?.token ?? null,
7809
- value: seed,
7810
- hasSettled: true,
7811
- inflightToken: null
7812
- });
7799
+ if (seed && !seed.selectionTarget && captureWholeTableParagraphSeed(host, seed, hostSelectionSnapshot)) seedAsyncRead("selection", asyncReads.get("selection")?.token ?? null, seed);
7813
7800
  }
7814
7801
  if (isNonCollapsedHostSelection(hostSelectionSnapshot) && !(foreground && foreground.active > 0)) {
7815
- typedCaretValidationHeld = false;
7816
- pendingSelectionSeedValidationToken = null;
7802
+ setSelectionValidation({
7803
+ held: false,
7804
+ pendingToken: null
7805
+ });
7817
7806
  issueAsyncRead("selection", selectionReadToken(), selectionCurrentRun, normalizeSelectionInfo);
7818
7807
  return;
7819
7808
  }
@@ -7822,17 +7811,14 @@ function createSuperDocUI(options) {
7822
7811
  const seed = normalizeSelectionInfo(safeCall(() => read.call(host), null));
7823
7812
  if (!seed) return;
7824
7813
  if (wholeTableSelectionChanged) {
7825
- typedCaretValidationHeld = false;
7826
- pendingSelectionSeedValidationToken = null;
7814
+ setSelectionValidation({
7815
+ held: false,
7816
+ pendingToken: null
7817
+ });
7827
7818
  wholeTableParagraphSeed = null;
7828
7819
  captureWholeTableParagraphSeed(host, seed, initialTableSelection);
7829
7820
  const token = selectionReadToken();
7830
- asyncReads.set("selection", {
7831
- token,
7832
- value: seed,
7833
- hasSettled: true,
7834
- inflightToken: null
7835
- });
7821
+ seedAsyncRead("selection", token, seed);
7836
7822
  issueAsyncRead("selection", token, selectionCurrentRun, normalizeSelectionInfo);
7837
7823
  return;
7838
7824
  }
@@ -7842,14 +7828,25 @@ function createSuperDocUI(options) {
7842
7828
  const previousRange = previousCaret?.range;
7843
7829
  const nextRange = nextCaret?.range;
7844
7830
  const sameSeedCaret = Boolean(previousCaret && nextCaret && previousCaret.blockId === nextCaret.blockId && storyLocatorSignature(previousCaret.story) === storyLocatorSignature(nextCaret.story) && previousRange?.start === nextRange?.start);
7845
- typedCaretValidationHeld = Boolean(foreground && foreground.active > 0) || typedCaretValidationHeld && (afterTypingPaint || sameSeedCaret);
7831
+ const validation = selectionValidationSnapshot();
7832
+ const held = Boolean(foreground && foreground.active > 0) || validation.held && (afterTypingPaint || sameSeedCaret);
7833
+ setSelectionValidation({
7834
+ held,
7835
+ pendingToken: validation.pendingToken
7836
+ });
7846
7837
  const token = selectionReadToken();
7847
- const deferAuthoritativeRead = Boolean(foreground && (foreground.active > 0 || foreground.pending > 0)) || typedCaretValidationHeld && Date.now() - lastTypingMutationAtMs < HEAVY_READ_IDLE_MS;
7838
+ const deferAuthoritativeRead = Boolean(foreground && (foreground.active > 0 || foreground.pending > 0)) || held && typingIsRecent();
7848
7839
  if (!deferAuthoritativeRead) {
7849
- pendingSelectionSeedValidationToken = null;
7840
+ setSelectionValidation({
7841
+ held,
7842
+ pendingToken: null
7843
+ });
7850
7844
  if (issueAsyncRead("selection", token, selectionCurrentRun, normalizeSelectionInfo)) return;
7851
7845
  } else {
7852
- pendingSelectionSeedValidationToken = token;
7846
+ setSelectionValidation({
7847
+ held,
7848
+ pendingToken: token
7849
+ });
7853
7850
  scheduleForegroundAsyncRetry();
7854
7851
  }
7855
7852
  const prev = asyncReads.get("selection");
@@ -7859,25 +7856,20 @@ function createSuperDocUI(options) {
7859
7856
  const sameActiveTypingCaret = Boolean(foreground && foreground.active > 0 && previousCaret && nextCaret && previousCaret.blockId === nextCaret.blockId && storyLocatorSignature(previousCaret.story) === storyLocatorSignature(nextCaret.story) && typeof previousRange?.start === "number" && typeof nextRange?.start === "number" && Math.abs(nextRange.start - previousRange.start) <= 2);
7860
7857
  const carriedChangeIds = paintedTrackChangeId != null || sameActiveTypingCaret ? state.selection.activeChangeIds.filter((id) => paintedTrackChangeId == null || buildTrackedChangeIdContext(state.trackChanges.items).aliasesFor(id).includes(paintedTrackChangeId)) : [];
7861
7858
  const seedChangeIds = Array.isArray(seed.activeChangeIds) && seed.activeChangeIds.length > 0 ? seed.activeChangeIds : carriedChangeIds;
7862
- asyncReads.set("selection", {
7863
- token,
7864
- value: {
7865
- ...seed,
7866
- activeMarks: seedMarks,
7867
- activeCommentIds: seedCommentIds,
7868
- activeChangeIds: seedChangeIds
7869
- },
7870
- hasSettled: true,
7871
- inflightToken: deferAuthoritativeRead ? null : prev?.inflightToken ?? null
7872
- });
7859
+ seedAsyncRead("selection", token, {
7860
+ ...seed,
7861
+ activeMarks: seedMarks,
7862
+ activeCommentIds: seedCommentIds,
7863
+ activeChangeIds: seedChangeIds
7864
+ }, deferAuthoritativeRead ? null : prev?.inflightToken ?? null);
7873
7865
  };
7874
7866
  const selectionInfoMatchesHost = (info) => {
7875
7867
  const snapshot = readHostSelectionSnapshot();
7876
7868
  const target = info?.selectionTarget;
7877
7869
  if (!snapshot || target?.kind !== "selection") return false;
7878
7870
  const matches = (rawPoint, rawEndpoint) => {
7879
- const point = isPlainObject(rawPoint) ? rawPoint : void 0;
7880
- const endpoint = isPlainObject(rawEndpoint) ? rawEndpoint : void 0;
7871
+ const point = require__plugin_vue_export_helper.isPlainObject(rawPoint) ? rawPoint : void 0;
7872
+ const endpoint = require__plugin_vue_export_helper.isPlainObject(rawEndpoint) ? rawEndpoint : void 0;
7881
7873
  const offset = target.coordinateSpace === "tracked" ? endpoint?.trackedBlockOffset : endpoint?.blockOffset;
7882
7874
  return point?.kind === "text" && typeof point.blockId === "string" && point.blockId === endpoint?.blockId && typeof point.offset === "number" && point.offset === offset && storyLocatorSignature(point.story ?? target.story) === storyLocatorSignature(endpoint?.story ?? snapshot.story);
7883
7875
  };
@@ -7891,12 +7883,7 @@ function createSuperDocUI(options) {
7891
7883
  const sourceToken = contentToken();
7892
7884
  const mode = readDocumentMode();
7893
7885
  if (typeof current !== "function") {
7894
- asyncReads.set("selection", {
7895
- token,
7896
- value: null,
7897
- hasSettled: true,
7898
- inflightToken: null
7899
- });
7886
+ seedAsyncRead("selection", token, null);
7900
7887
  recompute();
7901
7888
  return selectionSliceFromInfo(null, "pending");
7902
7889
  }
@@ -7913,12 +7900,7 @@ function createSuperDocUI(options) {
7913
7900
  if (disposed) return selectionSliceFromInfo(null, "pending");
7914
7901
  const info = normalizeSelectionInfo(raw);
7915
7902
  if (selectionReadToken() !== token && !(getDoc() === doc && contentToken() === sourceToken && readDocumentMode() === mode && selectionInfoMatchesHost(info))) return attempt < 1 ? readSelectionInfoFresh(attempt + 1) : selectionSliceFromInfo(null, "pending");
7916
- asyncReads.set("selection", {
7917
- token: selectionReadToken(),
7918
- value: info,
7919
- hasSettled: true,
7920
- inflightToken: null
7921
- });
7903
+ seedAsyncRead("selection", selectionReadToken(), info);
7922
7904
  const selection = selectionSliceFromInfo(info, info ? "ready" : "pending");
7923
7905
  recompute();
7924
7906
  return selection;
@@ -7940,7 +7922,7 @@ function createSuperDocUI(options) {
7940
7922
  const readCommentsDirectory = () => {
7941
7923
  const listComments = hostMethod(getDoc()?.comments, "list");
7942
7924
  return readAsync("comments", contentToken(), () => listComments ? listComments() : void 0, (raw) => {
7943
- const items = isPlainObject(raw) ? raw.items : void 0;
7925
+ const items = require__plugin_vue_export_helper.isPlainObject(raw) ? raw.items : void 0;
7944
7926
  return Array.isArray(items) ? realComments(items) : [];
7945
7927
  });
7946
7928
  };
@@ -8190,7 +8172,7 @@ function createSuperDocUI(options) {
8190
8172
  const selectionTarget = selection.target;
8191
8173
  let selectionAnchor;
8192
8174
  if (explicitTarget) {
8193
- const explicitStart = isPlainObject(explicitTarget.start) ? explicitTarget.start : void 0;
8175
+ const explicitStart = require__plugin_vue_export_helper.isPlainObject(explicitTarget.start) ? explicitTarget.start : void 0;
8194
8176
  if (explicitTarget.kind !== "selection" || explicitStart?.kind !== "text" || typeof explicitStart.blockId !== "string" || typeof explicitStart.offset !== "number") return retainSettledActiveContentControls([], status);
8195
8177
  selectionAnchor = {
8196
8178
  blockId: explicitStart.blockId,
@@ -8286,7 +8268,7 @@ function createSuperDocUI(options) {
8286
8268
  }
8287
8269
  const getSnapshot = hostMethod(source, "getSnapshot");
8288
8270
  const snapshot = getSnapshot ? safeCall(() => getSnapshot(), null) : null;
8289
- const { undoDepth, redoDepth } = (isPlainObject(snapshot) && isPlainObject(snapshot.history) ? snapshot.history : null) ?? {};
8271
+ const { undoDepth, redoDepth } = (require__plugin_vue_export_helper.isPlainObject(snapshot) && require__plugin_vue_export_helper.isPlainObject(snapshot.history) ? snapshot.history : null) ?? {};
8290
8272
  if (typeof undoDepth !== "number" || typeof redoDepth !== "number") return historySlice;
8291
8273
  const next = {
8292
8274
  canUndo: undoDepth > 0,
@@ -8301,11 +8283,11 @@ function createSuperDocUI(options) {
8301
8283
  const computeZoom = () => {
8302
8284
  const getZoomState = hostMethod(superdoc, "getZoomState");
8303
8285
  const rawState = safeCall(getZoomState ? () => getZoomState() : void 0, null);
8304
- const state = isPlainObject(rawState) ? rawState : null;
8286
+ const state = require__plugin_vue_export_helper.isPlainObject(rawState) ? rawState : null;
8305
8287
  const value = typeof state?.value === "number" ? state.value : 100;
8306
8288
  const rawMode = state?.mode;
8307
8289
  const mode = rawMode === "manual" || rawMode === "fit-width" ? rawMode : rawMode === "fixed" ? "manual" : null;
8308
- const fit = isPlainObject(state?.fitWidth) ? state.fitWidth : void 0;
8290
+ const fit = require__plugin_vue_export_helper.isPlainObject(state?.fitWidth) ? state.fitWidth : void 0;
8309
8291
  const min = typeof fit?.min === "number" ? fit.min : typeof state?.min === "number" ? state.min : 10;
8310
8292
  const max = typeof fit?.max === "number" ? fit.max : typeof state?.max === "number" ? state.max : 100;
8311
8293
  if (!zoomFitWidth || zoomFitWidth.min !== min || zoomFitWidth.max !== max) zoomFitWidth = {
@@ -8805,7 +8787,7 @@ function createSuperDocUI(options) {
8805
8787
  storyType: "body"
8806
8788
  }
8807
8789
  }));
8808
- return isPlainObject(raw) ? raw : void 0;
8790
+ return require__plugin_vue_export_helper.isPlainObject(raw) ? raw : void 0;
8809
8791
  };
8810
8792
  /**
8811
8793
  * Returns the settled status of the query.match read backing the current
@@ -8945,8 +8927,8 @@ function createSuperDocUI(options) {
8945
8927
  };
8946
8928
  const hostCommandSupport = (command) => {
8947
8929
  const capabilities = safeCall(hostMethod(getHost(), "getCapabilities") ?? void 0, null);
8948
- const editableSubset = isPlainObject(capabilities) ? capabilities.editableSubset : void 0;
8949
- const commands = isPlainObject(editableSubset) ? editableSubset.commands : void 0;
8930
+ const editableSubset = require__plugin_vue_export_helper.isPlainObject(capabilities) ? capabilities.editableSubset : void 0;
8931
+ const commands = require__plugin_vue_export_helper.isPlainObject(editableSubset) ? editableSubset.commands : void 0;
8950
8932
  if (Array.isArray(commands)) return commands.find((entry) => entry?.command === command || entry?.id === command) ?? null;
8951
8933
  if (commands && typeof commands === "object") {
8952
8934
  const record = commands[command];
@@ -9267,8 +9249,8 @@ function createSuperDocUI(options) {
9267
9249
  /** Read one block's list state and cache status through the selected story's list-state seam. */
9268
9250
  const readListStateSnapshotForBlock = (doc, blockId, story, selection) => {
9269
9251
  const applied = doc === getDoc() ? appliedSelectionPresentation(selection)?.listState : null;
9270
- const appliedValue = isPlainObject(applied) ? applied.value : void 0;
9271
- if (isPlainObject(applied) && applied.blockId === blockId && isPlainObject(applied.story) && storyLocatorSignature(applied.story) === storyLocatorSignature(story) && isPlainObject(appliedValue) && appliedValue.success === true) return {
9252
+ const appliedValue = require__plugin_vue_export_helper.isPlainObject(applied) ? applied.value : void 0;
9253
+ if (require__plugin_vue_export_helper.isPlainObject(applied) && applied.blockId === blockId && require__plugin_vue_export_helper.isPlainObject(applied.story) && storyLocatorSignature(applied.story) === storyLocatorSignature(story) && require__plugin_vue_export_helper.isPlainObject(appliedValue) && appliedValue.success === true) return {
9272
9254
  value: appliedValue,
9273
9255
  status: "ready"
9274
9256
  };
@@ -9370,7 +9352,7 @@ function createSuperDocUI(options) {
9370
9352
  const applied = appliedSelectionPresentation(selection);
9371
9353
  if (applied) return new Map(blockIds.flatMap((id) => {
9372
9354
  const alignments = applied.paragraphAlignments;
9373
- const alignment = normalizeParagraphAlignment(isPlainObject(alignments) ? alignments[id] : void 0);
9355
+ const alignment = normalizeParagraphAlignment(require__plugin_vue_export_helper.isPlainObject(alignments) ? alignments[id] : void 0);
9374
9356
  return alignment ? [[id, alignment]] : [];
9375
9357
  }));
9376
9358
  const host = getHost();
@@ -10196,9 +10178,9 @@ function createSuperDocUI(options) {
10196
10178
  let detachDocumentSelection = null;
10197
10179
  const readHostSelectionSource = () => {
10198
10180
  const handles = safeCall(hostMethod(getEditor()?.host, "getHandles") ?? void 0, null);
10199
- const editing = isPlainObject(handles) ? handles.editing : void 0;
10200
- const selection = isPlainObject(editing) ? editing.selection : void 0;
10201
- return isPlainObject(selection) && typeof selection.subscribe === "function" ? selection : null;
10181
+ const editing = require__plugin_vue_export_helper.isPlainObject(handles) ? handles.editing : void 0;
10182
+ const selection = require__plugin_vue_export_helper.isPlainObject(editing) ? editing.selection : void 0;
10183
+ return require__plugin_vue_export_helper.isPlainObject(selection) && typeof selection.subscribe === "function" ? selection : null;
10202
10184
  };
10203
10185
  const caretSelectionNeedsProjectionPaint = () => {
10204
10186
  const host = getHost();
@@ -10239,7 +10221,7 @@ function createSuperDocUI(options) {
10239
10221
  });
10240
10222
  if (typeof unsubscribe === "function") unsubscribeCallbacks.push(() => unsubscribe());
10241
10223
  const handles = safeCall(hostMethod(getHost(), "getHandles") ?? void 0, null);
10242
- const tableSelection = isPlainObject(handles) ? handles.selection : void 0;
10224
+ const tableSelection = require__plugin_vue_export_helper.isPlainObject(handles) ? handles.selection : void 0;
10243
10225
  const subscribeWholeTable = hostMethod(tableSelection, "subscribeWholeTable");
10244
10226
  if (subscribeWholeTable) {
10245
10227
  const refreshWholeTable = (initial = false) => {
@@ -10258,8 +10240,8 @@ function createSuperDocUI(options) {
10258
10240
  };
10259
10241
  const readHostReviewSource = () => {
10260
10242
  const handles = safeCall(hostMethod(getEditor()?.host, "getHandles") ?? void 0, null);
10261
- const review = isPlainObject(handles) ? handles.review : void 0;
10262
- return isPlainObject(review) && typeof review.subscribe === "function" ? review : null;
10243
+ const review = require__plugin_vue_export_helper.isPlainObject(handles) ? handles.review : void 0;
10244
+ return require__plugin_vue_export_helper.isPlainObject(review) && typeof review.subscribe === "function" ? review : null;
10263
10245
  };
10264
10246
  const readHostActiveReviewTarget = (review) => {
10265
10247
  const getActiveReviewTarget = hostMethod(review, "getActiveReviewTarget");
@@ -10267,11 +10249,11 @@ function createSuperDocUI(options) {
10267
10249
  const getSnapshot = hostMethod(review, "getSnapshot");
10268
10250
  if (!getSnapshot) return null;
10269
10251
  const snapshot = safeCall(() => getSnapshot(), null);
10270
- return isPlainObject(snapshot) ? snapshot.activeReviewTarget ?? null : null;
10252
+ return require__plugin_vue_export_helper.isPlainObject(snapshot) ? snapshot.activeReviewTarget ?? null : null;
10271
10253
  };
10272
10254
  let trackedChangeNavigationInFlight = 0;
10273
10255
  let lastPublishedHostReviewTarget;
10274
- const isRepublishedHostReviewTarget = (left, right) => left === right || isPlainObject(left) && isPlainObject(right) && left.layoutEpoch !== right.layoutEpoch && left.origin === right.origin && left.entityType === right.entityType && left.entityId === right.entityId && left.paintedEntityId === right.paintedEntityId && storyLocatorSignature(left.story) === storyLocatorSignature(right.story);
10256
+ const isRepublishedHostReviewTarget = (left, right) => left === right || require__plugin_vue_export_helper.isPlainObject(left) && require__plugin_vue_export_helper.isPlainObject(right) && left.layoutEpoch !== right.layoutEpoch && left.origin === right.origin && left.entityType === right.entityType && left.entityId === right.entityId && left.paintedEntityId === right.paintedEntityId && storyLocatorSignature(left.story) === storyLocatorSignature(right.story);
10275
10257
  const syncTrackedChangeFocusFromHostReviewTarget = (rawTarget, rawSnapshot) => {
10276
10258
  const rejection = (rawSnapshot && typeof rawSnapshot === "object" ? rawSnapshot : null)?.lastInteractionRejection;
10277
10259
  if (rawTarget == null && rejection && typeof rejection === "object" && rejection.code === "review-target-invalidated" && rejection.detail === "not-painted" && (explicitActiveChange || explicitActiveCommentId)) return false;
@@ -10290,7 +10272,7 @@ function createSuperDocUI(options) {
10290
10272
  return true;
10291
10273
  }
10292
10274
  const previousTarget = lastPublishedHostReviewTarget?.raw;
10293
- if (!target && isPlainObject(previousTarget) && previousTarget.entityType === "comment") {
10275
+ if (!target && require__plugin_vue_export_helper.isPlainObject(previousTarget) && previousTarget.entityType === "comment") {
10294
10276
  lastPublishedHostReviewTarget = {
10295
10277
  raw: rawTarget,
10296
10278
  focus: null,
@@ -10438,7 +10420,7 @@ function createSuperDocUI(options) {
10438
10420
  const syncHostEventsSubscription = () => {
10439
10421
  const host = getEditor()?.host;
10440
10422
  const events = host?.events;
10441
- const next = isPlainObject(events) && typeof events.subscribe === "function" ? events : null;
10423
+ const next = require__plugin_vue_export_helper.isPlainObject(events) && typeof events.subscribe === "function" ? events : null;
10442
10424
  if (next === currentHostEventsSource) return;
10443
10425
  if (detachHostEvents) {
10444
10426
  detachHostEvents();
@@ -11253,11 +11235,11 @@ function createSuperDocUI(options) {
11253
11235
  }
11254
11236
  function captureInputSelectionTarget(requireTableCells = false) {
11255
11237
  const handles = safeCall(() => hostMethod(getHost(), "getHandles")?.(), null);
11256
- const selection = isPlainObject(handles) ? handles.selection : void 0;
11238
+ const selection = require__plugin_vue_export_helper.isPlainObject(handles) ? handles.selection : void 0;
11257
11239
  const held = hostMethod(selection, "getSnapshot")?.();
11258
- if (requireTableCells && (!isPlainObject(held) || !held.tableCells)) return null;
11240
+ if (requireTableCells && (!require__plugin_vue_export_helper.isPlainObject(held) || !held.tableCells)) return null;
11259
11241
  const resolved = hostMethod(selection, "toSelectionTarget")?.();
11260
- return isPlainObject(resolved) && resolved.kind === "ok" && resolved.mode === "range" ? capturedTableCellTarget(resolved.target) : null;
11242
+ return require__plugin_vue_export_helper.isPlainObject(resolved) && resolved.kind === "ok" && resolved.mode === "range" ? capturedTableCellTarget(resolved.target) : null;
11261
11243
  }
11262
11244
  function currentUnrepresentableSelectionTarget(selection) {
11263
11245
  if (selection.empty || selection.selectionTarget || selection.target?.kind !== "text") return null;
@@ -11280,8 +11262,8 @@ function createSuperDocUI(options) {
11280
11262
  }
11281
11263
  function tableCellSelectionForTarget(target) {
11282
11264
  const cellTarget = currentCellSelectionTarget();
11283
- const start = isPlainObject(target) && isPlainObject(target.start) ? target.start : void 0;
11284
- const end = isPlainObject(target) && isPlainObject(target.end) ? target.end : void 0;
11265
+ const start = require__plugin_vue_export_helper.isPlainObject(target) && require__plugin_vue_export_helper.isPlainObject(target.start) ? target.start : void 0;
11266
+ const end = require__plugin_vue_export_helper.isPlainObject(target) && require__plugin_vue_export_helper.isPlainObject(target.end) ? target.end : void 0;
11285
11267
  if (!cellTarget || start?.blockId !== cellTarget.start.blockId || end?.blockId !== cellTarget.end.blockId || start?.offset !== cellTarget.start.offset || end?.offset !== cellTarget.end.offset) return null;
11286
11268
  return {
11287
11269
  anchorBlockId: cellTarget.start.blockId,
@@ -11654,16 +11636,16 @@ function createSuperDocUI(options) {
11654
11636
  const linksApi = doc?.hyperlinks;
11655
11637
  if (!linksApi) return false;
11656
11638
  const hyperlinkHandles = hostMethod(getHost(), "getHandles")?.();
11657
- const hyperlinkEditing = isPlainObject(hyperlinkHandles) ? hyperlinkHandles.editing : void 0;
11658
- const trustedHyperlinks = isPlainObject(hyperlinkEditing) ? hyperlinkEditing.hyperlinks : void 0;
11659
- const trustedLinksApi = firstPartyCommandDoc ? isPlainObject(trustedHyperlinks) ? trustedHyperlinks : void 0 : linksApi;
11639
+ const hyperlinkEditing = require__plugin_vue_export_helper.isPlainObject(hyperlinkHandles) ? hyperlinkHandles.editing : void 0;
11640
+ const trustedHyperlinks = require__plugin_vue_export_helper.isPlainObject(hyperlinkEditing) ? hyperlinkEditing.hyperlinks : void 0;
11641
+ const trustedLinksApi = firstPartyCommandDoc ? require__plugin_vue_export_helper.isPlainObject(trustedHyperlinks) ? trustedHyperlinks : void 0 : linksApi;
11660
11642
  const record = readLinkPayloadRecord(payload);
11661
11643
  const href = readLinkPayloadHref(payload);
11662
11644
  const payloadTarget = readLinkPayloadTarget(payload);
11663
11645
  const text = typeof record.text === "string" ? record.text : void 0;
11664
11646
  const currentText = typeof record.currentText === "string" ? record.currentText : void 0;
11665
- const requestedHyperlinkTarget = isPlainObject(record.hyperlinkTarget) ? record.hyperlinkTarget : null;
11666
- const requestedTextTarget = isPlainObject(record.textTarget) ? record.textTarget : null;
11647
+ const requestedHyperlinkTarget = require__plugin_vue_export_helper.isPlainObject(record.hyperlinkTarget) ? record.hyperlinkTarget : null;
11648
+ const requestedTextTarget = require__plugin_vue_export_helper.isPlainObject(record.textTarget) ? record.textTarget : null;
11667
11649
  const hasRequestedHyperlinkTarget = typeof requestedHyperlinkTarget?.storyId === "string" && typeof requestedHyperlinkTarget?.hyperlinkNodeId === "string";
11668
11650
  const textTargets = textAddressesFromTarget(payloadTarget);
11669
11651
  const caretTarget = collapsedTextAddressFromTarget(payloadTarget);
@@ -11856,10 +11838,10 @@ function createSuperDocUI(options) {
11856
11838
  const story = selectionStoryLocator(linkSelection);
11857
11839
  try {
11858
11840
  const reads = blockIds.map((blockId) => listLinks({ within: paragraphTarget(blockId, story) }));
11859
- const validReports = (reports) => reports.every((report) => isPlainObject(report) && Array.isArray(report.items));
11841
+ const validReports = (reports) => reports.every((report) => require__plugin_vue_export_helper.isPlainObject(report) && Array.isArray(report.items));
11860
11842
  const existingFrom = (reports) => {
11861
11843
  for (const report of reports) {
11862
- const hit = (isPlainObject(report) && Array.isArray(report.items) ? report.items : []).find((item) => hyperlinkOverlapsSelection(item, linkSelection));
11844
+ const hit = (require__plugin_vue_export_helper.isPlainObject(report) && Array.isArray(report.items) ? report.items : []).find((item) => hyperlinkOverlapsSelection(item, linkSelection));
11863
11845
  if (hit) return hit;
11864
11846
  }
11865
11847
  return null;
@@ -11915,7 +11897,7 @@ function createSuperDocUI(options) {
11915
11897
  if (nonBodyStory && at.kind === "after") at = {
11916
11898
  ...at,
11917
11899
  target: {
11918
- ...isPlainObject(at.target) ? at.target : {},
11900
+ ...require__plugin_vue_export_helper.isPlainObject(at.target) ? at.target : {},
11919
11901
  story: nonBodyStory
11920
11902
  }
11921
11903
  };
@@ -11959,12 +11941,12 @@ function createSuperDocUI(options) {
11959
11941
  if (!host) return null;
11960
11942
  if (firstPartyCommandDoc !== void 0) {
11961
11943
  const handles = hostMethod(host, "getHandles")?.();
11962
- const editing = isPlainObject(handles) ? handles.editing : void 0;
11963
- const commands = isPlainObject(editing) ? editing.fields : void 0;
11964
- return isPlainObject(commands) ? commands : null;
11944
+ const editing = require__plugin_vue_export_helper.isPlainObject(handles) ? handles.editing : void 0;
11945
+ const commands = require__plugin_vue_export_helper.isPlainObject(editing) ? editing.fields : void 0;
11946
+ return require__plugin_vue_export_helper.isPlainObject(commands) ? commands : null;
11965
11947
  }
11966
11948
  const commands = hostMethod(host, "getCodeFieldEditingCommands")?.();
11967
- return isPlainObject(commands) ? commands : null;
11949
+ return require__plugin_vue_export_helper.isPlainObject(commands) ? commands : null;
11968
11950
  };
11969
11951
  /**
11970
11952
  * Route a header/footer field command (`fields.insert` at the active caret).
@@ -11995,12 +11977,12 @@ function createSuperDocUI(options) {
11995
11977
  if (!host) return null;
11996
11978
  if (firstPartyCommandDoc !== void 0) {
11997
11979
  const handles = hostMethod(host, "getHandles")?.();
11998
- const editing = isPlainObject(handles) ? handles.editing : void 0;
11999
- const commands = isPlainObject(editing) ? editing.pageNumbers : void 0;
12000
- return isPlainObject(commands) ? commands : null;
11980
+ const editing = require__plugin_vue_export_helper.isPlainObject(handles) ? handles.editing : void 0;
11981
+ const commands = require__plugin_vue_export_helper.isPlainObject(editing) ? editing.pageNumbers : void 0;
11982
+ return require__plugin_vue_export_helper.isPlainObject(commands) ? commands : null;
12001
11983
  }
12002
11984
  const commands = hostMethod(host, "getCodePageNumberEditingCommands")?.();
12003
- return isPlainObject(commands) ? commands : null;
11985
+ return require__plugin_vue_export_helper.isPlainObject(commands) ? commands : null;
12004
11986
  };
12005
11987
  /** Route a page-numbers command (`headerFooters.pageNumbers.set` or `.remove` for the caret's section). */
12006
11988
  const executePageNumbersCommand = (descriptor, input) => {
@@ -12033,12 +12015,12 @@ function createSuperDocUI(options) {
12033
12015
  if (!host) return null;
12034
12016
  if (firstPartyCommandDoc !== void 0) {
12035
12017
  const handles = hostMethod(host, "getHandles")?.();
12036
- const editing = isPlainObject(handles) ? handles.editing : void 0;
12037
- const commands = isPlainObject(editing) ? editing.tables : void 0;
12038
- return isPlainObject(commands) ? commands : null;
12018
+ const editing = require__plugin_vue_export_helper.isPlainObject(handles) ? handles.editing : void 0;
12019
+ const commands = require__plugin_vue_export_helper.isPlainObject(editing) ? editing.tables : void 0;
12020
+ return require__plugin_vue_export_helper.isPlainObject(commands) ? commands : null;
12039
12021
  }
12040
12022
  const commands = hostMethod(host, "getCodeTableEditingCommands")?.();
12041
- return isPlainObject(commands) ? commands : null;
12023
+ return require__plugin_vue_export_helper.isPlainObject(commands) ? commands : null;
12042
12024
  };
12043
12025
  /**
12044
12026
  * Route a table cell-context command (`tables.*`) against the live table
@@ -12080,7 +12062,7 @@ function createSuperDocUI(options) {
12080
12062
  };
12081
12063
  const linkPayloadHasExplicitTarget = (payload) => {
12082
12064
  const record = readLinkPayloadRecord(payload);
12083
- return Boolean(readLinkPayloadTarget(payload) || isPlainObject(record.hyperlinkTarget) || isPlainObject(record.textTarget));
12065
+ return Boolean(readLinkPayloadTarget(payload) || require__plugin_vue_export_helper.isPlainObject(record.hyperlinkTarget) || require__plugin_vue_export_helper.isPlainObject(record.textTarget));
12084
12066
  };
12085
12067
  const currentWholeTableParagraphOwner = () => {
12086
12068
  const owner = wholeTableParagraphSeed, host = getHost();
@@ -12088,7 +12070,7 @@ function createSuperDocUI(options) {
12088
12070
  const tableId = owner.info.tableSelection?.tableId;
12089
12071
  const activeTable = safeCall(() => {
12090
12072
  const handles = hostMethod(host, "getHandles")?.();
12091
- return hostMethod(isPlainObject(handles) ? handles.selection : void 0, "getWholeTableNodeId")?.();
12073
+ return hostMethod(require__plugin_vue_export_helper.isPlainObject(handles) ? handles.selection : void 0, "getWholeTableNodeId")?.();
12092
12074
  }, null);
12093
12075
  if (!tableId || activeTable !== tableId || state.selection.tableSelection?.type !== "table" || state.selection.tableSelection.tableId !== tableId || selectionSignature(state.selection) !== selectionSignature(selectionSliceFromInfo(owner.info, "ready"))) return null;
12094
12076
  const applied = appliedSelectionPresentation(state.selection);
@@ -12803,11 +12785,11 @@ function createSuperDocUI(options) {
12803
12785
  const lifecycle = error?.reason;
12804
12786
  return { reason: lifecycle === "host-not-ready" || lifecycle === "host-disposed" || lifecycle === "editing-mount-required" ? SUPERDOC_UI_REASONS.notReady : SUPERDOC_UI_REASONS.hostCapabilityUnavailable };
12805
12787
  }
12806
- const editing = isPlainObject(handles) ? handles.editing : void 0;
12807
- const editingHelper = isPlainObject(editing) ? editing.selectionTargets : void 0;
12808
- if (isPlainObject(editingHelper) && typeof editingHelper.apply === "function") return { helper: editingHelper };
12809
- const reviewHelper = isPlainObject(handles) ? handles.selection : void 0;
12810
- if (isPlainObject(reviewHelper) && typeof reviewHelper.apply === "function") return { helper: reviewHelper };
12788
+ const editing = require__plugin_vue_export_helper.isPlainObject(handles) ? handles.editing : void 0;
12789
+ const editingHelper = require__plugin_vue_export_helper.isPlainObject(editing) ? editing.selectionTargets : void 0;
12790
+ if (require__plugin_vue_export_helper.isPlainObject(editingHelper) && typeof editingHelper.apply === "function") return { helper: editingHelper };
12791
+ const reviewHelper = require__plugin_vue_export_helper.isPlainObject(handles) ? handles.selection : void 0;
12792
+ if (require__plugin_vue_export_helper.isPlainObject(reviewHelper) && typeof reviewHelper.apply === "function") return { helper: reviewHelper };
12811
12793
  return { reason: SUPERDOC_UI_REASONS.hostCapabilityUnavailable };
12812
12794
  };
12813
12795
  /** Live host SelectionTarget from editable or review-safe selection handles. */
@@ -12820,10 +12802,10 @@ function createSuperDocUI(options) {
12820
12802
  } catch {
12821
12803
  return null;
12822
12804
  }
12823
- const editing = isPlainObject(handles) ? handles.editing : void 0;
12824
- const rendered = hostMethod(isPlainObject(editing) ? editing.selection : void 0, "toSelectionTarget")?.() ?? hostMethod(isPlainObject(handles) ? handles.selection : void 0, "toSelectionTarget")?.();
12825
- if (!isPlainObject(rendered) || rendered.kind !== "ok") return null;
12826
- return isPlainObject(rendered.target) ? rendered.target : null;
12805
+ const editing = require__plugin_vue_export_helper.isPlainObject(handles) ? handles.editing : void 0;
12806
+ const rendered = hostMethod(require__plugin_vue_export_helper.isPlainObject(editing) ? editing.selection : void 0, "toSelectionTarget")?.() ?? hostMethod(require__plugin_vue_export_helper.isPlainObject(handles) ? handles.selection : void 0, "toSelectionTarget")?.();
12807
+ if (!require__plugin_vue_export_helper.isPlainObject(rendered) || rendered.kind !== "ok") return null;
12808
+ return require__plugin_vue_export_helper.isPlainObject(rendered.target) ? rendered.target : null;
12827
12809
  };
12828
12810
  const activateContentControlChrome = (id) => {
12829
12811
  const host = getHost();
@@ -12956,7 +12938,7 @@ function createSuperDocUI(options) {
12956
12938
  const getSelectionAnchorRect = hostMethod(getHost(), "getSelectionAnchorRect");
12957
12939
  if (getSelectionAnchorRect) {
12958
12940
  const fromHost = safeCall(() => getSelectionAnchorRect(input), null);
12959
- if (isPlainObject(fromHost) && (Number(fromHost.width) > 0 || Number(fromHost.height) > 0)) return fromHost;
12941
+ if (require__plugin_vue_export_helper.isPlainObject(fromHost) && (Number(fromHost.width) > 0 || Number(fromHost.height) > 0)) return fromHost;
12960
12942
  return null;
12961
12943
  }
12962
12944
  return null;
@@ -13109,13 +13091,13 @@ function createSuperDocUI(options) {
13109
13091
  try {
13110
13092
  const directory = await listBookmarks(address.story ? { in: address.story } : {});
13111
13093
  if (!current()) return unresolved();
13112
- if ((isPlainObject(directory) && Array.isArray(directory.items) ? directory.items : []).filter((item) => isPlainObject(item) && item.name === address.name).length !== 1) return unresolved();
13094
+ if ((require__plugin_vue_export_helper.isPlainObject(directory) && Array.isArray(directory.items) ? directory.items : []).filter((item) => require__plugin_vue_export_helper.isPlainObject(item) && item.name === address.name).length !== 1) return unresolved();
13113
13095
  const info = await getBookmark({ target: address });
13114
- if (!current() || !isPlainObject(info)) return unresolved();
13115
- const range = isPlainObject(info.range) ? info.range : void 0;
13116
- const infoStory = (isPlainObject(info.address) ? info.address : void 0)?.story;
13117
- const storyOutsideBody = Boolean(infoStory) && !(isPlainObject(infoStory) && infoStory.storyType === "body");
13118
- const textPoint = (point) => isPlainObject(point) && typeof point.blockId === "string" && point.blockId.length > 0 && typeof point.offset === "number" && Number.isInteger(point.offset) && point.offset >= 0 ? {
13096
+ if (!current() || !require__plugin_vue_export_helper.isPlainObject(info)) return unresolved();
13097
+ const range = require__plugin_vue_export_helper.isPlainObject(info.range) ? info.range : void 0;
13098
+ const infoStory = (require__plugin_vue_export_helper.isPlainObject(info.address) ? info.address : void 0)?.story;
13099
+ const storyOutsideBody = Boolean(infoStory) && !(require__plugin_vue_export_helper.isPlainObject(infoStory) && infoStory.storyType === "body");
13100
+ const textPoint = (point) => require__plugin_vue_export_helper.isPlainObject(point) && typeof point.blockId === "string" && point.blockId.length > 0 && typeof point.offset === "number" && Number.isInteger(point.offset) && point.offset >= 0 ? {
13119
13101
  blockId: point.blockId,
13120
13102
  offset: point.offset
13121
13103
  } : null;
@@ -13305,7 +13287,7 @@ function createSuperDocUI(options) {
13305
13287
  */
13306
13288
  const commentWriteRefusal = () => commentMutationsAreReadOnly() ? failedReceipt("Comments are read-only.", "DOCUMENT_READONLY") : null;
13307
13289
  const filterCommentsSnapshot = (items, query) => {
13308
- const record = isPlainObject(query) ? query : null;
13290
+ const record = require__plugin_vue_export_helper.isPlainObject(query) ? query : null;
13309
13291
  let filtered = Array.from(items);
13310
13292
  if (record?.includeResolved === false) filtered = filtered.filter((item) => item.status !== "resolved");
13311
13293
  const rawOffset = Number(record?.offset);
@@ -13759,7 +13741,7 @@ function createSuperDocUI(options) {
13759
13741
  }, tcApi)) return false;
13760
13742
  if (firstPartyCommandDoc) {
13761
13743
  const handles = safeCall(hostMethod(getHost(), "getHandles") ?? void 0, null);
13762
- const decide = hostMethod(isPlainObject(handles) ? handles.trackChanges : void 0, "decide");
13744
+ const decide = hostMethod(require__plugin_vue_export_helper.isPlainObject(handles) ? handles.trackChanges : void 0, "decide");
13763
13745
  return decide ? decide({
13764
13746
  decision: kind,
13765
13747
  target
@@ -13822,7 +13804,7 @@ function createSuperDocUI(options) {
13822
13804
  success: false,
13823
13805
  reason: "cancelled"
13824
13806
  };
13825
- const control = (isPlainObject(catalog) ? catalog.items : void 0)?.find((item) => item.id === id);
13807
+ const control = (require__plugin_vue_export_helper.isPlainObject(catalog) ? catalog.items : void 0)?.find((item) => item.id === id);
13826
13808
  if (!control) return {
13827
13809
  success: false,
13828
13810
  reason: "not-found"
@@ -13942,7 +13924,7 @@ function createSuperDocUI(options) {
13942
13924
  };
13943
13925
  }
13944
13926
  const mounted = hostMethod(host, "getMountedHandle")?.();
13945
- hostMethod(isPlainObject(mounted) ? mounted.focus : void 0, "focus")?.({ preventScroll: true });
13927
+ hostMethod(require__plugin_vue_export_helper.isPlainObject(mounted) ? mounted.focus : void 0, "focus")?.({ preventScroll: true });
13946
13928
  activateContentControlChrome(id);
13947
13929
  return { success: true };
13948
13930
  }
@@ -13999,7 +13981,7 @@ function createSuperDocUI(options) {
13999
13981
  const getText = hostMethod(getDoc(), "getText");
14000
13982
  const result = safeCall(getText ? () => getText({}) : void 0, null);
14001
13983
  if (typeof result === "string") return result;
14002
- if (isPlainObject(result) && typeof result.text === "string") return result.text;
13984
+ if (require__plugin_vue_export_helper.isPlainObject(result) && typeof result.text === "string") return result.text;
14003
13985
  return null;
14004
13986
  },
14005
13987
  replaceDocument: async (file) => {
@@ -14035,9 +14017,9 @@ function createSuperDocUI(options) {
14035
14017
  reason: "unavailable"
14036
14018
  };
14037
14019
  const result = safeCall(() => markSaved(version), null);
14038
- return isPlainObject(result) && result.ok === true ? { ok: true } : {
14020
+ return require__plugin_vue_export_helper.isPlainObject(result) && result.ok === true ? { ok: true } : {
14039
14021
  ok: false,
14040
- reason: isPlainObject(result) && result.reason === "document-changed" ? "document-changed" : "unavailable"
14022
+ reason: require__plugin_vue_export_helper.isPlainObject(result) && result.reason === "document-changed" ? "document-changed" : "unavailable"
14041
14023
  };
14042
14024
  }
14043
14025
  };
@@ -14289,7 +14271,7 @@ function createSuperDocUI(options) {
14289
14271
  const liveDecorations = /* @__PURE__ */ new Map();
14290
14272
  const decorationOwnerForProvider = (providerId) => {
14291
14273
  const owner = currentHostVisuals()?.providerOwner?.(providerId);
14292
- return isPlainObject(owner) && typeof owner.id === "string" ? owner : null;
14274
+ return require__plugin_vue_export_helper.isPlainObject(owner) && typeof owner.id === "string" ? owner : null;
14293
14275
  };
14294
14276
  const currentHostVisuals = () => getEditor()?.visuals ?? null;
14295
14277
  const decorationListeners = /* @__PURE__ */ new Set();
@@ -14311,7 +14293,7 @@ function createSuperDocUI(options) {
14311
14293
  };
14312
14294
  const decorationData = (id) => {
14313
14295
  const owner = currentHostVisuals()?.ownerById?.(id);
14314
- return isPlainObject(owner?.data) ? owner.data : void 0;
14296
+ return require__plugin_vue_export_helper.isPlainObject(owner?.data) ? owner.data : void 0;
14315
14297
  };
14316
14298
  const emitDecorationEvent = (type, decoration, point) => {
14317
14299
  const payload = {
@@ -14591,12 +14573,7 @@ function createSuperDocUI(options) {
14591
14573
  const resolved = await Promise.resolve(resolveMetadata({ id }));
14592
14574
  if (token !== localContentToken()) return null;
14593
14575
  const target = readMetadataResolvedTarget(resolved);
14594
- asyncReads.set(metadataResolveKey(id), {
14595
- token,
14596
- value: target,
14597
- hasSettled: true,
14598
- inflightToken: null
14599
- });
14576
+ seedAsyncRead(metadataResolveKey(id), token, target);
14600
14577
  return target;
14601
14578
  } catch {
14602
14579
  return null;
@@ -14715,11 +14692,11 @@ function createSuperDocUI(options) {
14715
14692
  const searchListeners = /* @__PURE__ */ new Set();
14716
14693
  const getHostSearch = () => {
14717
14694
  const search = getHost()?.search;
14718
- return isPlainObject(search) ? search : null;
14695
+ return require__plugin_vue_export_helper.isPlainObject(search) ? search : null;
14719
14696
  };
14720
14697
  const getEditCommandSearch = () => {
14721
14698
  const search = getEditCommands()?.search;
14722
- return isPlainObject(search) ? search : null;
14699
+ return require__plugin_vue_export_helper.isPlainObject(search) ? search : null;
14723
14700
  };
14724
14701
  const searchIsAvailable = () => {
14725
14702
  const search = getHostSearch();
@@ -15948,12 +15925,6 @@ Object.defineProperty(exports, "isAllowed", {
15948
15925
  return isAllowed;
15949
15926
  }
15950
15927
  });
15951
- Object.defineProperty(exports, "isPlainObject", {
15952
- enumerable: true,
15953
- get: function() {
15954
- return isPlainObject;
15955
- }
15956
- });
15957
15928
  Object.defineProperty(exports, "isRecord", {
15958
15929
  enumerable: true,
15959
15930
  get: function() {