superdoc 2.0.0-next.49 → 2.0.0-next.50

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 (29) hide show
  1. package/AGENTS.md +31 -10
  2. package/dist/chunks/{create-super-doc-ui-BmtUtDDR.es.js → create-super-doc-ui-D4UDePxr.es.js} +126 -28
  3. package/dist/chunks/{create-super-doc-ui-BNo2DvD1.cjs → create-super-doc-ui-DlSN0ENQ.cjs} +126 -28
  4. package/dist/collaboration-upgrade-engine.cjs +1 -1
  5. package/dist/collaboration-upgrade-engine.es.js +1 -1
  6. package/dist/document-api/src/contract/operation-definitions.d.ts +1 -1
  7. package/dist/public/ui-react.cjs +1 -1
  8. package/dist/public/ui-react.es.js +1 -1
  9. package/dist/public/ui.cjs +1 -1
  10. package/dist/public/ui.es.js +1 -1
  11. package/dist/shared/font-system/src/font-offerings.d.ts +1 -1
  12. package/dist/style.css +28 -28
  13. package/dist/style.layered.css +28 -28
  14. package/dist/superdoc/src/core/SuperDoc.d.ts +43 -1
  15. package/dist/superdoc/src/core/config/merge-defined.d.ts +35 -0
  16. package/dist/superdoc/src/core/config/normalize-interaction-config.d.ts +15 -0
  17. package/dist/superdoc/src/core/config/normalize-surfaces-config.d.ts +23 -0
  18. package/dist/superdoc/src/core/config/normalize-ui-config.d.ts +62 -0
  19. package/dist/superdoc/src/core/types/index.d.ts +209 -2
  20. package/dist/superdoc/src/public/index.d.cts +6 -0
  21. package/dist/superdoc/src/public/index.d.ts +3 -0
  22. package/dist/superdoc/src/public/ui.d.cts +2 -0
  23. package/dist/superdoc/src/public/ui.d.ts +1 -1
  24. package/dist/superdoc.cjs +211 -37
  25. package/dist/superdoc.es.js +211 -37
  26. package/dist-cdn/style.layered.css +1 -1
  27. package/dist-cdn/superdoc.min.css +1 -1
  28. package/dist-cdn/superdoc.min.js +37 -37
  29. package/package.json +2 -2
@@ -1724,6 +1724,7 @@ function normalizeHostSelectionApplyResult(result) {
1724
1724
  return { ok: true };
1725
1725
  }
1726
1726
  var HOST_EVENTS = [
1727
+ "document-replaced",
1727
1728
  "editorCreate",
1728
1729
  "active-editor-change",
1729
1730
  "document-mode-change",
@@ -1912,6 +1913,7 @@ function readEntityStory(row) {
1912
1913
  const address = record.address && typeof record.address === "object" ? record.address : null;
1913
1914
  if (address?.story && typeof address.story === "object") return address.story;
1914
1915
  if (record.storyLocator && typeof record.storyLocator === "object") return record.storyLocator;
1916
+ if (record.trackedChangeStory && typeof record.trackedChangeStory === "object") return record.trackedChangeStory;
1915
1917
  const target = readEntityTarget(row);
1916
1918
  if (!target || typeof target !== "object") return null;
1917
1919
  const targetRecord = target;
@@ -3396,7 +3398,9 @@ function createSuperDocUI(options) {
3396
3398
  unresolvedIds: []
3397
3399
  };
3398
3400
  const settledTrackChanges = asyncReads.get("trackChanges");
3399
- const cachedIds = new Set(settledTrackChanges?.hasSettled && Array.isArray(settledTrackChanges.value) ? settledTrackChanges.value.map(readEntityId).filter((id) => id != null) : []);
3401
+ const settledTrackChangeItems = settledTrackChanges?.hasSettled && Array.isArray(settledTrackChanges.value) ? settledTrackChanges.value : null;
3402
+ const cachedIds = new Set(settledTrackChangeItems ? settledTrackChangeItems.map(readEntityId).filter((id) => id != null) : []);
3403
+ const settledCatalogIsProvenEmpty = settledTrackChangeItems?.length === 0 && hostSourceLoadPhase() === "complete";
3400
3404
  const idsNeedingPlacement = new Set(requestedIds.filter((id) => !cachedIds.has(id)));
3401
3405
  const getTrackedChange = context.v2TrackedChanges?.getTrackedChange;
3402
3406
  const getRawTrackedChange = context.docTrackChanges?.get;
@@ -3448,7 +3452,7 @@ function createSuperDocUI(options) {
3448
3452
  }
3449
3453
  let orderedItems;
3450
3454
  const placementIds = resolvedIds.filter((id) => idsNeedingPlacement.has(id));
3451
- if (placementIds.length > 0) {
3455
+ if (placementIds.length > 0 && !settledCatalogIsProvenEmpty) {
3452
3456
  const orderResult = await hydrateTrackedChanges(context, {
3453
3457
  trackedChangesListMode: "interaction-prime",
3454
3458
  refreshReason: "mutation-render-reconcile",
@@ -3993,9 +3997,19 @@ function createSuperDocUI(options) {
3993
3997
  return fromRuntime ?? fromConfig ?? fromOptions;
3994
3998
  };
3995
3999
  const commentsReadOnlyForReview = () => {
3996
- const comments$1 = (((superdoc && typeof superdoc === "object" ? superdoc : null)?.config)?.modules)?.comments;
4000
+ const superdocRecord = superdoc && typeof superdoc === "object" ? superdoc : null;
4001
+ const resolved = (superdocRecord?.interactionConfig)?.comments;
4002
+ if (resolved && typeof resolved.readOnly === "boolean") return resolved.readOnly === true;
4003
+ const comments$1 = ((superdocRecord?.config)?.modules)?.comments;
3997
4004
  return !!comments$1 && typeof comments$1 === "object" && comments$1.readOnly === true;
3998
4005
  };
4006
+ const resolveIsForbidden = () => {
4007
+ const superdocRecord = superdoc && typeof superdoc === "object" ? superdoc : null;
4008
+ const resolved = (superdocRecord?.interactionConfig)?.comments;
4009
+ if (resolved && typeof resolved.allowResolve === "boolean") return resolved.allowResolve === false;
4010
+ const comments$1 = ((superdocRecord?.config)?.modules)?.comments;
4011
+ return !!comments$1 && typeof comments$1 === "object" && comments$1.allowResolve === false;
4012
+ };
3999
4013
  const reviewMutationsAreReadOnly = () => readDocumentMode() === "viewing" || commentsReadOnlyForReview();
4000
4014
  const normalizeSelectionInfo = (raw) => raw && typeof raw === "object" ? raw : null;
4001
4015
  const selectionSliceFromInfo = (info, status) => {
@@ -4147,7 +4161,7 @@ function createSuperDocUI(options) {
4147
4161
  } : readAsync("trackChanges", token, () => {
4148
4162
  if (listTrackedChanges) return listTrackedChanges.call(v2TrackedChanges);
4149
4163
  return tcApi?.list ? tcApi.list() : void 0;
4150
- }, (raw) => raw && Array.isArray(raw.items) ? raw.items : []);
4164
+ }, (raw) => raw && Array.isArray(raw.items) ? raw.items.filter((item) => !listTrackedChanges || storyLocatorSignature(readEntityStory(item)) === "story:body") : []);
4151
4165
  const items = (value ?? []).map(projectTrackChangesItem).filter((item) => item != null).filter((item) => {
4152
4166
  const id = readEntityId(item);
4153
4167
  return !id || !postDecisionIds?.has(id);
@@ -5824,7 +5838,10 @@ function createSuperDocUI(options) {
5824
5838
  if (typeof review.getSnapshot === "function") return safeCall(() => review.getSnapshot(), null)?.activeReviewTarget ?? null;
5825
5839
  return null;
5826
5840
  };
5827
- const syncTrackedChangeFocusFromHostReviewTarget = (rawTarget) => {
5841
+ let trackedChangeNavigationInFlight = 0;
5842
+ const syncTrackedChangeFocusFromHostReviewTarget = (rawTarget, rawSnapshot) => {
5843
+ const rejection = (rawSnapshot && typeof rawSnapshot === "object" ? rawSnapshot : null)?.lastInteractionRejection;
5844
+ if (trackedChangeNavigationInFlight > 0 && rawTarget == null && rejection && typeof rejection === "object" && rejection.code === "review-target-invalidated" && rejection.detail === "not-painted") return false;
5828
5845
  const target = rawTarget && typeof rawTarget === "object" ? rawTarget : null;
5829
5846
  let next = null;
5830
5847
  if (target?.entityType === "trackedChange" && typeof target.entityId === "string" && target.entityId.length > 0) {
@@ -5855,7 +5872,7 @@ function createSuperDocUI(options) {
5855
5872
  try {
5856
5873
  const unsubscribe = next.subscribe((snapshot) => {
5857
5874
  const snapshotRecord = snapshot && typeof snapshot === "object" ? snapshot : null;
5858
- if (!syncTrackedChangeFocusFromHostReviewTarget(snapshotRecord && Object.prototype.hasOwnProperty.call(snapshotRecord, "activeReviewTarget") ? snapshotRecord.activeReviewTarget : readHostActiveReviewTarget(next)) || attaching) return;
5875
+ if (!syncTrackedChangeFocusFromHostReviewTarget(snapshotRecord && Object.prototype.hasOwnProperty.call(snapshotRecord, "activeReviewTarget") ? snapshotRecord.activeReviewTarget : readHostActiveReviewTarget(next), snapshot) || attaching) return;
5859
5876
  recompute();
5860
5877
  });
5861
5878
  if (typeof unsubscribe === "function") detachHostReview = unsubscribe;
@@ -5989,17 +6006,32 @@ function createSuperDocUI(options) {
5989
6006
  for (const listener of [...listeners]) listener(state);
5990
6007
  };
5991
6008
  const activeEditorResetHooks = [];
5992
- const runActiveEditorResetHooks = () => {
5993
- for (const reset of activeEditorResetHooks) try {
6009
+ const documentResetHooks = [];
6010
+ const runHooks = (hooks) => {
6011
+ for (const reset of hooks) try {
5994
6012
  reset();
5995
6013
  } catch {}
5996
6014
  };
6015
+ const runActiveEditorResetHooks = () => runHooks(activeEditorResetHooks);
6016
+ const runDocumentResetHooks = () => runHooks(documentResetHooks);
5997
6017
  const detachers = [];
5998
6018
  const attach = (source, events) => {
5999
6019
  if (!source || typeof source.on !== "function") return;
6000
6020
  for (const event of events) {
6001
6021
  const handler = event === "active-editor-change" ? () => {
6002
6022
  runActiveEditorResetHooks();
6023
+ runDocumentResetHooks();
6024
+ recompute();
6025
+ } : event === "document-replaced" ? (payload) => {
6026
+ const detail = payload && typeof payload === "object" ? payload : null;
6027
+ const replacedEditor = detail?.["editor"];
6028
+ const replacedHost = detail?.["host"];
6029
+ const matchesEditor = Boolean(replacedEditor) && replacedEditor === getEditor();
6030
+ const matchesHost = Boolean(replacedHost) && replacedHost === getHost();
6031
+ if (!matchesEditor && !matchesHost) return;
6032
+ runDocumentResetHooks();
6033
+ asyncReads.clear();
6034
+ invalidateDocumentContent();
6003
6035
  recompute();
6004
6036
  } : () => recompute();
6005
6037
  try {
@@ -7717,6 +7749,8 @@ function createSuperDocUI(options) {
7717
7749
  }
7718
7750
  };
7719
7751
  function patchCommentStatus(commentId, status) {
7752
+ if (reviewMutationsAreReadOnly()) return failedReceipt("Comments are read-only.", "DOCUMENT_READONLY");
7753
+ if (resolveIsForbidden()) return failedReceipt("Resolving comments is disabled.", "DOCUMENT_READONLY");
7720
7754
  const commentsApi = getDoc()?.comments;
7721
7755
  const op = commentsApi?.patch;
7722
7756
  if (typeof op !== "function") return failedReceipt("comments.patch is unavailable.");
@@ -7726,6 +7760,7 @@ function createSuperDocUI(options) {
7726
7760
  status
7727
7761
  }), fallback), fallback);
7728
7762
  }
7763
+ const commentWriteRefusal = () => reviewMutationsAreReadOnly() ? failedReceipt("Comments are read-only.", "DOCUMENT_READONLY") : null;
7729
7764
  const filterCommentsSnapshot = (items, query) => {
7730
7765
  const record = query && typeof query === "object" ? query : null;
7731
7766
  let filtered = Array.from(items);
@@ -7759,6 +7794,8 @@ function createSuperDocUI(options) {
7759
7794
  return isPromiseLike(result) ? null : result;
7760
7795
  },
7761
7796
  createFromCapture: (capture, input) => {
7797
+ const refusal = commentWriteRefusal();
7798
+ if (refusal) return refusal;
7762
7799
  const commentsApi = getDoc()?.comments;
7763
7800
  const op = commentsApi?.create;
7764
7801
  if (typeof op !== "function") return failedReceipt("comments.create is unavailable.");
@@ -7769,6 +7806,8 @@ function createSuperDocUI(options) {
7769
7806
  }), fallback), fallback);
7770
7807
  },
7771
7808
  createFromSelection: (input) => {
7809
+ const refusal = commentWriteRefusal();
7810
+ if (refusal) return refusal;
7772
7811
  const commentsApi = getDoc()?.comments;
7773
7812
  const op = commentsApi?.create;
7774
7813
  if (typeof op !== "function") return failedReceipt("comments.create is unavailable.");
@@ -7782,6 +7821,8 @@ function createSuperDocUI(options) {
7782
7821
  }), fallback), fallback);
7783
7822
  },
7784
7823
  reply: (commentId, input) => {
7824
+ const refusal = commentWriteRefusal();
7825
+ if (refusal) return refusal;
7785
7826
  const commentsApi = getDoc()?.comments;
7786
7827
  const op = commentsApi?.reply ?? commentsApi?.create;
7787
7828
  if (typeof op !== "function") return failedReceipt("comments.reply is unavailable.");
@@ -7797,6 +7838,8 @@ function createSuperDocUI(options) {
7797
7838
  resolve: (commentId) => patchCommentStatus(commentId, "resolved"),
7798
7839
  reopen: (commentId) => patchCommentStatus(commentId, "active"),
7799
7840
  delete: (commentId) => {
7841
+ const refusal = commentWriteRefusal();
7842
+ if (refusal) return refusal;
7800
7843
  const commentsApi = getDoc()?.comments;
7801
7844
  const op = commentsApi?.delete ?? commentsApi?.remove;
7802
7845
  if (typeof op !== "function") return failedReceipt("comments.delete is unavailable.");
@@ -7876,10 +7919,22 @@ function createSuperDocUI(options) {
7876
7919
  rollback();
7877
7920
  return { success: false };
7878
7921
  }
7879
- const result = await scrollTargetIntoView(target, { behavior: "auto" });
7880
- if (!isCurrent()) return { success: false };
7881
- if (!result.ok && result.reason !== SUPERDOC_UI_REASONS.targetNotVisible) rollback();
7882
- return { success: result.ok };
7922
+ trackedChangeNavigationInFlight += 1;
7923
+ try {
7924
+ const result = await scrollTargetIntoView(target, { behavior: "auto" });
7925
+ if (!isCurrent()) return { success: false };
7926
+ if (!result.ok && result.reason !== SUPERDOC_UI_REASONS.targetNotVisible) {
7927
+ rollback();
7928
+ mirrorTrackedChangeFocusToHost(previousActiveChange);
7929
+ } else mirrorTrackedChangeFocusToHost(optimisticActiveChange);
7930
+ return { success: result.ok };
7931
+ } finally {
7932
+ trackedChangeNavigationInFlight = Math.max(0, trackedChangeNavigationInFlight - 1);
7933
+ if (trackedChangeNavigationInFlight === 0) {
7934
+ if (!isCurrent()) mirrorTrackedChangeFocusToHost(explicitActiveChange);
7935
+ else if (currentHostReviewSource) syncTrackedChangeFocusFromHostReviewTarget(readHostActiveReviewTarget(currentHostReviewSource));
7936
+ }
7937
+ }
7883
7938
  };
7884
7939
  const navigateAndScroll = (step) => {
7885
7940
  const run = navigateAndScrollNow(step);
@@ -8003,14 +8058,25 @@ function createSuperDocUI(options) {
8003
8058
  setExplicitActiveChange(previousActiveChange, { invalidateQueuedNavigation: false });
8004
8059
  recompute();
8005
8060
  };
8006
- const result = await scrollTargetIntoView(target, { behavior: "auto" });
8007
- if (!isCurrent()) return {
8008
- success: false,
8009
- ok: false
8010
- };
8011
- if (!result.ok && result.reason !== SUPERDOC_UI_REASONS.targetNotVisible) rollback();
8012
- else mirrorTrackedChangeFocusToHost(requestedActiveChange);
8013
- return result;
8061
+ trackedChangeNavigationInFlight += 1;
8062
+ try {
8063
+ const result = await scrollTargetIntoView(target, { behavior: "auto" });
8064
+ if (!isCurrent()) return {
8065
+ success: false,
8066
+ ok: false
8067
+ };
8068
+ if (!result.ok && result.reason !== SUPERDOC_UI_REASONS.targetNotVisible) {
8069
+ rollback();
8070
+ mirrorTrackedChangeFocusToHost(previousActiveChange);
8071
+ } else mirrorTrackedChangeFocusToHost(requestedActiveChange);
8072
+ return result;
8073
+ } finally {
8074
+ trackedChangeNavigationInFlight = Math.max(0, trackedChangeNavigationInFlight - 1);
8075
+ if (trackedChangeNavigationInFlight === 0) {
8076
+ if (!isCurrent()) mirrorTrackedChangeFocusToHost(explicitActiveChange);
8077
+ else if (currentHostReviewSource) syncTrackedChangeFocusFromHostReviewTarget(readHostActiveReviewTarget(currentHostReviewSource));
8078
+ }
8079
+ }
8014
8080
  }
8015
8081
  };
8016
8082
  const executeTrackDecision = (kind, input) => {
@@ -8307,21 +8373,50 @@ function createSuperDocUI(options) {
8307
8373
  return null;
8308
8374
  }
8309
8375
  const geometryObservers = /* @__PURE__ */ new Set();
8376
+ let geometryReleaseScheduled = false;
8310
8377
  const bindGeometryObserver = (entry) => {
8311
8378
  const host = getHost();
8312
8379
  if (typeof host?.observeGeometry !== "function") return;
8313
- const off = safeCall(() => host.observeGeometry(() => entry.schedule()), null);
8380
+ let subscribed = false;
8381
+ const off = safeCall(() => {
8382
+ const result = host.observeGeometry(() => entry.schedule());
8383
+ subscribed = true;
8384
+ return result;
8385
+ }, null);
8314
8386
  entry.detach = typeof off === "function" ? off : null;
8387
+ entry.boundHost = subscribed ? host : null;
8315
8388
  };
8316
8389
  const detachGeometryObserver = (entry) => {
8317
- if (!entry.detach) return;
8318
- try {
8319
- entry.detach();
8320
- } catch {}
8321
- entry.detach = null;
8390
+ if (entry.detach) {
8391
+ try {
8392
+ entry.detach();
8393
+ } catch {}
8394
+ entry.detach = null;
8395
+ }
8396
+ entry.boundHost = null;
8397
+ };
8398
+ const releaseGeometryObserversIfStillHostless = () => {
8399
+ geometryReleaseScheduled = false;
8400
+ if (disposed || getHost()) return;
8401
+ for (const entry of geometryObservers) detachGeometryObserver(entry);
8402
+ };
8403
+ const scheduleGeometryRelease = () => {
8404
+ if (geometryReleaseScheduled) return;
8405
+ geometryReleaseScheduled = true;
8406
+ if (typeof queueMicrotask === "function") {
8407
+ queueMicrotask(releaseGeometryObserversIfStillHostless);
8408
+ return;
8409
+ }
8410
+ Promise.resolve().then(releaseGeometryObserversIfStillHostless);
8322
8411
  };
8323
8412
  const rebindGeometryObservers = () => {
8413
+ const host = getHost();
8414
+ if (!host) {
8415
+ scheduleGeometryRelease();
8416
+ return;
8417
+ }
8324
8418
  for (const entry of geometryObservers) {
8419
+ if (entry.boundHost && entry.boundHost === host) continue;
8325
8420
  detachGeometryObserver(entry);
8326
8421
  bindGeometryObserver(entry);
8327
8422
  entry.schedule();
@@ -8365,7 +8460,8 @@ function createSuperDocUI(options) {
8365
8460
  unsubs.push(sub.subscribe(() => schedule()));
8366
8461
  const entry = {
8367
8462
  schedule,
8368
- detach: null
8463
+ detach: null,
8464
+ boundHost: null
8369
8465
  };
8370
8466
  bindGeometryObserver(entry);
8371
8467
  geometryObservers.add(entry);
@@ -8566,7 +8662,7 @@ function createSuperDocUI(options) {
8566
8662
  };
8567
8663
  emitSearch();
8568
8664
  };
8569
- activeEditorResetHooks.push(resetSearchForActiveEditorChange);
8665
+ documentResetHooks.push(resetSearchForActiveEditorChange);
8570
8666
  const readSearchQueryError = (record) => {
8571
8667
  if (!record) return false;
8572
8668
  const queryError = record.queryError;
@@ -9099,6 +9195,8 @@ function createSuperDocUI(options) {
9099
9195
  if (detachDocumentSelection) detachDocumentSelection();
9100
9196
  detachDocumentSelection = null;
9101
9197
  currentDocumentSelectionSource = null;
9198
+ for (const entry of geometryObservers) detachGeometryObserver(entry);
9199
+ geometryObservers.clear();
9102
9200
  listeners.clear();
9103
9201
  searchListeners.clear();
9104
9202
  painterCaptureEpoch += 1;
@@ -7,7 +7,7 @@ const COLLABORATION_UPGRADE_ENGINE_MINIMUM_NODE_MAJOR = 20;
7
7
  var PRIVATE_ENGINE_INFO = (0, __superdoc_docx_engine_collaboration_upgrade_engine.getCollaborationUpgradeEngineInfo)();
8
8
  var ENGINE_INFO = Object.freeze({
9
9
  ...PRIVATE_ENGINE_INFO,
10
- superdocVersion: "2.0.0-next.49",
10
+ superdocVersion: "2.0.0-next.50",
11
11
  roomSchemaVersion: Object.freeze({ ...PRIVATE_ENGINE_INFO.roomSchemaVersion }),
12
12
  supportedBundleVersions: SUPPORTED_COLLABORATION_UPGRADE_BUNDLE_VERSIONS,
13
13
  supportedV1ReaderContractVersions: SUPPORTED_V1_READER_CONTRACT_VERSIONS
@@ -6,7 +6,7 @@ const COLLABORATION_UPGRADE_ENGINE_MINIMUM_NODE_MAJOR = 20;
6
6
  var PRIVATE_ENGINE_INFO = getCollaborationUpgradeEngineInfo$1();
7
7
  var ENGINE_INFO = Object.freeze({
8
8
  ...PRIVATE_ENGINE_INFO,
9
- superdocVersion: "2.0.0-next.49",
9
+ superdocVersion: "2.0.0-next.50",
10
10
  roomSchemaVersion: Object.freeze({ ...PRIVATE_ENGINE_INFO.roomSchemaVersion }),
11
11
  supportedBundleVersions: SUPPORTED_COLLABORATION_UPGRADE_BUNDLE_VERSIONS,
12
12
  supportedV1ReaderContractVersions: SUPPORTED_V1_READER_CONTRACT_VERSIONS
@@ -520,7 +520,7 @@ export declare const OPERATION_DEFINITIONS: {
520
520
  readonly 'lists.attach': {
521
521
  readonly memberPath: "lists.attach";
522
522
  readonly description: "Convert non-list paragraphs to list items under an existing list sequence.";
523
- readonly expectedResult: "Returns a ListsMutateItemResult confirming attachment.";
523
+ readonly expectedResult: "Returns a ListsMutateItemResult confirming attachment. Tracked-mode results include `trackedChangeRefs` pointing at the pPrChange-backed numPr revision.";
524
524
  readonly requiresDocumentContext: true;
525
525
  readonly metadata: CommandStaticMetadata;
526
526
  readonly referenceDocPath: "lists/attach.mdx";
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_rolldown_runtime = require("../chunks/rolldown-runtime-_dR15c8t.cjs");
3
- const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-BNo2DvD1.cjs");
3
+ const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-DlSN0ENQ.cjs");
4
4
  let react = require("react");
5
5
  var SuperDocUIContext = (0, react.createContext)(null);
6
6
  function disposeOwnedUi(ref) {
@@ -1,4 +1,4 @@
1
- import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-BmtUtDDR.es.js";
1
+ import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-D4UDePxr.es.js";
2
2
  import { createContext, createElement, useCallback, useContext, useEffect, useRef, useState } from "react";
3
3
  var SuperDocUIContext = createContext(null);
4
4
  function disposeOwnedUi(ref) {
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-BNo2DvD1.cjs");
2
+ const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-DlSN0ENQ.cjs");
3
3
  exports.BUILT_IN_COMMAND_IDS = require_create_super_doc_ui.BUILT_IN_COMMAND_IDS;
4
4
  exports.createSuperDocUI = require_create_super_doc_ui.createSuperDocUI;
5
5
  exports.shallowEqual = require_create_super_doc_ui.shallowEqual;
@@ -1,2 +1,2 @@
1
- import { n as shallowEqual, r as BUILT_IN_COMMAND_IDS, t as createSuperDocUI } from "../chunks/create-super-doc-ui-BmtUtDDR.es.js";
1
+ import { n as shallowEqual, r as BUILT_IN_COMMAND_IDS, t as createSuperDocUI } from "../chunks/create-super-doc-ui-D4UDePxr.es.js";
2
2
  export { BUILT_IN_COMMAND_IDS, createSuperDocUI, shallowEqual };
@@ -89,7 +89,7 @@ export declare function getDefaultFontFamilyOptions(activation?: BundledActivati
89
89
  * The Word family names a document can curate (`include` / `exclude`): every logical family the
90
90
  * resolver substitutes to a bundled face, including category fallbacks like Verdana. The single
91
91
  * source of truth for the curation surface - {@link warnUnknownBundledSelection} validates against it
92
- * and `@superdoc-dev/fonts` generates its committed list from it. Distinct from the asset manifest's
92
+ * and `@superdoc/fonts` generates its committed list from it. Distinct from the asset manifest's
93
93
  * `replaces`, which omits category fallbacks (the reason curation keys on offerings, not `replaces`).
94
94
  */
95
95
  export declare function getBundledFamilyNames(): string[];
package/dist/style.css CHANGED
@@ -1368,28 +1368,28 @@ img[data-v-c95b2073] {
1368
1368
  background-color: #1355ff7f;
1369
1369
  }
1370
1370
 
1371
- .comment-placeholder[data-v-a1bd2282] {
1371
+ .comment-placeholder[data-v-b5be33eb] {
1372
1372
  position: absolute;
1373
1373
  width: 300px;
1374
1374
  transition: top 0.3s ease;
1375
1375
  }
1376
- .comment-placeholder.is-direct-decision-continuity-target[data-v-a1bd2282] .overflow-menu {
1376
+ .comment-placeholder.is-direct-decision-continuity-target[data-v-b5be33eb] .overflow-menu {
1377
1377
  opacity: 1;
1378
1378
  pointer-events: auto;
1379
1379
  }
1380
- .floating-comment[data-v-a1bd2282] {
1380
+ .floating-comment[data-v-b5be33eb] {
1381
1381
  position: relative;
1382
1382
  display: block;
1383
1383
  min-width: 300px;
1384
1384
  }
1385
- .sidebar-container[data-v-a1bd2282] {
1385
+ .sidebar-container[data-v-b5be33eb] {
1386
1386
  position: absolute;
1387
1387
  width: 300px;
1388
1388
  min-height: 300px;
1389
1389
  transition: transform 0.3s ease;
1390
1390
  will-change: transform;
1391
1391
  }
1392
- .section-wrapper[data-v-a1bd2282] {
1392
+ .section-wrapper[data-v-b5be33eb] {
1393
1393
  position: relative;
1394
1394
  min-height: 100%;
1395
1395
  width: 300px;
@@ -1727,11 +1727,11 @@ img[data-v-c95b2073] {
1727
1727
  pointer-events: auto;
1728
1728
  }
1729
1729
 
1730
- .superdoc[data-v-41f40a40] {
1730
+ .superdoc[data-v-2a7bfa95] {
1731
1731
  display: flex;
1732
1732
  position: relative;
1733
1733
  }
1734
- .sd-visually-hidden[data-v-41f40a40] {
1734
+ .sd-visually-hidden[data-v-2a7bfa95] {
1735
1735
  position: absolute;
1736
1736
  width: 1px;
1737
1737
  height: 1px;
@@ -1742,30 +1742,30 @@ img[data-v-c95b2073] {
1742
1742
  white-space: nowrap;
1743
1743
  border: 0;
1744
1744
  }
1745
- .right-sidebar[data-v-41f40a40] {
1745
+ .right-sidebar[data-v-2a7bfa95] {
1746
1746
  min-width: 320px;
1747
1747
  height: 100%;
1748
1748
  }
1749
- .floating-comments[data-v-41f40a40] {
1749
+ .floating-comments[data-v-2a7bfa95] {
1750
1750
  min-width: 300px;
1751
1751
  width: 300px;
1752
1752
  height: 100%;
1753
1753
  overflow: visible;
1754
1754
  }
1755
- .superdoc__layers[data-v-41f40a40] {
1755
+ .superdoc__layers[data-v-2a7bfa95] {
1756
1756
  height: 100%;
1757
1757
  position: relative;
1758
1758
  box-sizing: border-box;
1759
1759
  }
1760
- .superdoc__document[data-v-41f40a40] {
1760
+ .superdoc__document[data-v-2a7bfa95] {
1761
1761
  width: 100%;
1762
1762
  position: relative;
1763
1763
  }
1764
- .superdoc__sub-document[data-v-41f40a40] {
1764
+ .superdoc__sub-document[data-v-2a7bfa95] {
1765
1765
  width: 100%;
1766
1766
  position: relative;
1767
1767
  }
1768
- .superdoc__selection-layer[data-v-41f40a40] {
1768
+ .superdoc__selection-layer[data-v-2a7bfa95] {
1769
1769
  position: absolute;
1770
1770
  min-width: 100%;
1771
1771
  min-height: 100%;
@@ -1776,13 +1776,13 @@ img[data-v-c95b2073] {
1776
1776
  /* SD-3497: PDF whiteboard overlay sits above the rendered PDF canvas but below
1777
1777
  the PDF comment anchors (z-index 6 in PdfCommentsLayer) so anchors stay
1778
1778
  clickable, and below the selection layer (z-index 10). */
1779
- .superdoc__whiteboard-layer[data-v-41f40a40] {
1779
+ .superdoc__whiteboard-layer[data-v-2a7bfa95] {
1780
1780
  z-index: 4;
1781
1781
  }
1782
- .superdoc__temp-selection[data-v-41f40a40] {
1782
+ .superdoc__temp-selection[data-v-2a7bfa95] {
1783
1783
  position: absolute;
1784
1784
  }
1785
- .superdoc__right-sidebar[data-v-41f40a40] {
1785
+ .superdoc__right-sidebar[data-v-2a7bfa95] {
1786
1786
  width: 320px;
1787
1787
  min-width: 320px;
1788
1788
  padding: 0 10px;
@@ -1790,7 +1790,7 @@ img[data-v-c95b2073] {
1790
1790
  position: relative;
1791
1791
  z-index: 2;
1792
1792
  }
1793
- .superdoc__compact-comment-popover[data-v-41f40a40] {
1793
+ .superdoc__compact-comment-popover[data-v-2a7bfa95] {
1794
1794
  position: absolute;
1795
1795
  top: 12px;
1796
1796
  right: 12px;
@@ -1799,14 +1799,14 @@ img[data-v-c95b2073] {
1799
1799
  }
1800
1800
 
1801
1801
  /* Tools styles */
1802
- .tools[data-v-41f40a40] {
1802
+ .tools[data-v-2a7bfa95] {
1803
1803
  position: absolute;
1804
1804
  z-index: 3;
1805
1805
  display: flex;
1806
1806
  flex-direction: column;
1807
1807
  gap: var(--sd-ui-tools-gap, 6px);
1808
1808
  }
1809
- .tools-item[data-v-41f40a40] {
1809
+ .tools-item[data-v-2a7bfa95] {
1810
1810
  display: flex;
1811
1811
  align-items: center;
1812
1812
  justify-content: center;
@@ -1817,10 +1817,10 @@ img[data-v-c95b2073] {
1817
1817
  cursor: pointer;
1818
1818
  position: relative;
1819
1819
  }
1820
- .tools-item i[data-v-41f40a40] {
1820
+ .tools-item i[data-v-2a7bfa95] {
1821
1821
  cursor: pointer;
1822
1822
  }
1823
- .superdoc__tools-icon[data-v-41f40a40] {
1823
+ .superdoc__tools-icon[data-v-2a7bfa95] {
1824
1824
  width: var(--sd-ui-tools-icon-size, 20px);
1825
1825
  height: var(--sd-ui-tools-icon-size, 20px);
1826
1826
  flex-shrink: 0;
@@ -1835,22 +1835,22 @@ img[data-v-c95b2073] {
1835
1835
 
1836
1836
  /* 834px is iPad screen size in portrait orientation */
1837
1837
  @media (max-width: 834px) {
1838
- .superdoc .superdoc__layers[data-v-41f40a40] {
1838
+ .superdoc .superdoc__layers[data-v-2a7bfa95] {
1839
1839
  margin: 0;
1840
1840
  border: 0 !important;
1841
1841
  box-shadow: none;
1842
1842
  }
1843
- .superdoc__sub-document[data-v-41f40a40] {
1843
+ .superdoc__sub-document[data-v-2a7bfa95] {
1844
1844
  max-width: 100%;
1845
1845
  }
1846
- .superdoc__right-sidebar[data-v-41f40a40] {
1846
+ .superdoc__right-sidebar[data-v-2a7bfa95] {
1847
1847
  padding: 10px;
1848
1848
  position: relative;
1849
1849
  }
1850
1850
  }
1851
1851
 
1852
1852
  /* AI Writer styles */
1853
- .ai-writer-container[data-v-41f40a40] {
1853
+ .ai-writer-container[data-v-2a7bfa95] {
1854
1854
  position: fixed;
1855
1855
  z-index: 1000;
1856
1856
  background: white;
@@ -1866,10 +1866,10 @@ img[data-v-c95b2073] {
1866
1866
  transform: translateY(-50%);
1867
1867
  z-index: 50;
1868
1868
  } */
1869
- .ai-tool > svg[data-v-41f40a40] {
1869
+ .ai-tool > svg[data-v-2a7bfa95] {
1870
1870
  fill: transparent;
1871
1871
  }
1872
- .ai-tool[data-v-41f40a40]::before {
1872
+ .ai-tool[data-v-2a7bfa95]::before {
1873
1873
  content: '';
1874
1874
  position: absolute;
1875
1875
  width: 20px;
@@ -1890,7 +1890,7 @@ img[data-v-c95b2073] {
1890
1890
  filter: brightness(1.2);
1891
1891
  transition: filter 0.2s ease;
1892
1892
  }
1893
- .ai-tool[data-v-41f40a40]:hover::before {
1893
+ .ai-tool[data-v-2a7bfa95]:hover::before {
1894
1894
  filter: brightness(1.3);
1895
1895
  }
1896
1896