@superdoc-dev/cli 0.11.0-next.18 → 0.11.0-next.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +220 -52
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -217927,7 +217927,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
217927
217927
|
init_remark_gfm_BhnWr3yf_es();
|
|
217928
217928
|
});
|
|
217929
217929
|
|
|
217930
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
217930
|
+
// ../../packages/superdoc/dist/chunks/src-IynDnUzG.es.js
|
|
217931
217931
|
function deleteProps(obj, propOrProps) {
|
|
217932
217932
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
217933
217933
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -249567,6 +249567,8 @@ function metadataGetWrapper(editor, input2) {
|
|
|
249567
249567
|
return findEntry(getConvertedXml2(editor), input2.id);
|
|
249568
249568
|
}
|
|
249569
249569
|
function metadataResolveWrapper(editor, input2) {
|
|
249570
|
+
if (!hasPayloadEntry(getConvertedXml2(editor), input2.id))
|
|
249571
|
+
return null;
|
|
249570
249572
|
const target = resolveAnchorTarget(editor, input2.id);
|
|
249571
249573
|
return target ? {
|
|
249572
249574
|
id: input2.id,
|
|
@@ -256391,6 +256393,17 @@ function compactSnapshotObject(input2) {
|
|
|
256391
256393
|
}
|
|
256392
256394
|
return out;
|
|
256393
256395
|
}
|
|
256396
|
+
function applyLayoutIdentityDataset(element3, identity) {
|
|
256397
|
+
if (!identity) {
|
|
256398
|
+
delete element3.dataset[DATASET_KEYS.LAYOUT_FRAGMENT_ID];
|
|
256399
|
+
delete element3.dataset[DATASET_KEYS.LAYOUT_BLOCK_REF];
|
|
256400
|
+
delete element3.dataset[DATASET_KEYS.LAYOUT_STORY];
|
|
256401
|
+
return;
|
|
256402
|
+
}
|
|
256403
|
+
element3.dataset[DATASET_KEYS.LAYOUT_FRAGMENT_ID] = identity.fragmentId;
|
|
256404
|
+
element3.dataset[DATASET_KEYS.LAYOUT_BLOCK_REF] = identity.blockRef;
|
|
256405
|
+
element3.dataset[DATASET_KEYS.LAYOUT_STORY] = encodeLayoutStoryDataset(identity.story);
|
|
256406
|
+
}
|
|
256394
256407
|
function applySourceAnchorDataset(element3, sourceAnchor) {
|
|
256395
256408
|
if (!sourceAnchor) {
|
|
256396
256409
|
delete element3.dataset.sourceAnchor;
|
|
@@ -256430,6 +256443,27 @@ function readNearestSourceAnchor(element3) {
|
|
|
256430
256443
|
return;
|
|
256431
256444
|
return readSourceAnchorDataset(element3) ?? readSourceAnchorDataset(element3.closest(`.${CLASS_NAMES$1.fragment}`));
|
|
256432
256445
|
}
|
|
256446
|
+
function readLayoutIdentityDataset(element3) {
|
|
256447
|
+
if (!element3)
|
|
256448
|
+
return;
|
|
256449
|
+
const fragmentId = element3.dataset?.[DATASET_KEYS.LAYOUT_FRAGMENT_ID];
|
|
256450
|
+
const blockRef = element3.dataset?.[DATASET_KEYS.LAYOUT_BLOCK_REF];
|
|
256451
|
+
const story = decodeLayoutStoryDataset(element3.dataset?.[DATASET_KEYS.LAYOUT_STORY]);
|
|
256452
|
+
if (!fragmentId || !blockRef || story.kind === "unknown")
|
|
256453
|
+
return;
|
|
256454
|
+
return compactSnapshotObject({
|
|
256455
|
+
schema: LAYOUT_BOUNDARY_SCHEMA,
|
|
256456
|
+
story,
|
|
256457
|
+
blockRef,
|
|
256458
|
+
fragmentId,
|
|
256459
|
+
sourceAnchor: readNearestSourceAnchor(element3)
|
|
256460
|
+
});
|
|
256461
|
+
}
|
|
256462
|
+
function readNearestLayoutSourceIdentity(element3) {
|
|
256463
|
+
if (!element3)
|
|
256464
|
+
return;
|
|
256465
|
+
return readLayoutIdentityDataset(element3) ?? readLayoutIdentityDataset(element3.closest(`.${CLASS_NAMES$1.fragment}`));
|
|
256466
|
+
}
|
|
256433
256467
|
function shouldIncludeInlineImageSnapshotElement(element3) {
|
|
256434
256468
|
if (element3.classList.contains(DOM_CLASS_NAMES.INLINE_IMAGE_CLIP_WRAPPER))
|
|
256435
256469
|
return true;
|
|
@@ -256456,7 +256490,8 @@ function collectPaintSnapshotEntitiesFromDomRoot(rootEl) {
|
|
|
256456
256490
|
pmEnd: readSnapshotDatasetNumber(element3.dataset.pmEnd),
|
|
256457
256491
|
fieldId: element3.dataset.fieldId || null,
|
|
256458
256492
|
fieldType: element3.dataset.fieldType || null,
|
|
256459
|
-
type: element3.dataset.type || null
|
|
256493
|
+
type: element3.dataset.type || null,
|
|
256494
|
+
layoutSourceIdentity: readNearestLayoutSourceIdentity(element3)
|
|
256460
256495
|
}));
|
|
256461
256496
|
}
|
|
256462
256497
|
const blockSdtElements = Array.from(rootEl.querySelectorAll(`.${DOM_CLASS_NAMES.BLOCK_SDT}[data-sdt-id]`));
|
|
@@ -256470,7 +256505,8 @@ function collectPaintSnapshotEntitiesFromDomRoot(rootEl) {
|
|
|
256470
256505
|
pageIndex,
|
|
256471
256506
|
sdtId,
|
|
256472
256507
|
pmStart: readSnapshotDatasetNumber(element3.dataset.pmStart),
|
|
256473
|
-
pmEnd: readSnapshotDatasetNumber(element3.dataset.pmEnd)
|
|
256508
|
+
pmEnd: readSnapshotDatasetNumber(element3.dataset.pmEnd),
|
|
256509
|
+
layoutSourceIdentity: readNearestLayoutSourceIdentity(element3)
|
|
256474
256510
|
}));
|
|
256475
256511
|
}
|
|
256476
256512
|
const inlineSdtElements = Array.from(rootEl.querySelectorAll(`.${DOM_CLASS_NAMES.INLINE_SDT_WRAPPER}[data-sdt-id]`));
|
|
@@ -256484,7 +256520,8 @@ function collectPaintSnapshotEntitiesFromDomRoot(rootEl) {
|
|
|
256484
256520
|
pageIndex,
|
|
256485
256521
|
sdtId,
|
|
256486
256522
|
pmStart: readSnapshotDatasetNumber(element3.dataset.pmStart),
|
|
256487
|
-
pmEnd: readSnapshotDatasetNumber(element3.dataset.pmEnd)
|
|
256523
|
+
pmEnd: readSnapshotDatasetNumber(element3.dataset.pmEnd),
|
|
256524
|
+
layoutSourceIdentity: readNearestLayoutSourceIdentity(element3)
|
|
256488
256525
|
}));
|
|
256489
256526
|
}
|
|
256490
256527
|
const inlineImageElements = Array.from(rootEl.querySelectorAll(`.${DOM_CLASS_NAMES.INLINE_IMAGE_CLIP_WRAPPER}[data-pm-start], .${DOM_CLASS_NAMES.INLINE_IMAGE}[data-pm-start]`));
|
|
@@ -256500,7 +256537,8 @@ function collectPaintSnapshotEntitiesFromDomRoot(rootEl) {
|
|
|
256500
256537
|
kind: "inline",
|
|
256501
256538
|
pmStart: readSnapshotDatasetNumber(element3.dataset.pmStart),
|
|
256502
256539
|
pmEnd: readSnapshotDatasetNumber(element3.dataset.pmEnd),
|
|
256503
|
-
sourceAnchor: readNearestSourceAnchor(element3)
|
|
256540
|
+
sourceAnchor: readNearestSourceAnchor(element3),
|
|
256541
|
+
layoutSourceIdentity: readNearestLayoutSourceIdentity(element3)
|
|
256504
256542
|
}));
|
|
256505
256543
|
}
|
|
256506
256544
|
const fragmentImageElements = Array.from(rootEl.querySelectorAll(`.${DOM_CLASS_NAMES.IMAGE_FRAGMENT}[data-pm-start]`));
|
|
@@ -256515,7 +256553,8 @@ function collectPaintSnapshotEntitiesFromDomRoot(rootEl) {
|
|
|
256515
256553
|
pmStart: readSnapshotDatasetNumber(element3.dataset.pmStart),
|
|
256516
256554
|
pmEnd: readSnapshotDatasetNumber(element3.dataset.pmEnd),
|
|
256517
256555
|
blockId: element3.getAttribute("data-sd-block-id"),
|
|
256518
|
-
sourceAnchor: readNearestSourceAnchor(element3)
|
|
256556
|
+
sourceAnchor: readNearestSourceAnchor(element3),
|
|
256557
|
+
layoutSourceIdentity: readNearestLayoutSourceIdentity(element3)
|
|
256519
256558
|
}));
|
|
256520
256559
|
}
|
|
256521
256560
|
return entities;
|
|
@@ -257064,9 +257103,10 @@ function applyPaintVersions(item, visualVersion) {
|
|
|
257064
257103
|
} else
|
|
257065
257104
|
item.paintCacheVersion = visualVersion;
|
|
257066
257105
|
}
|
|
257067
|
-
function resolveFragmentItem(fragment2, fragmentIndex, pageIndex, blockMap, blockVersionCache) {
|
|
257106
|
+
function resolveFragmentItem(fragment2, fragmentIndex, pageIndex, blockMap, blockVersionCache, story) {
|
|
257068
257107
|
const sdtContainerKey = resolveFragmentSdtContainerKey(fragment2, blockMap);
|
|
257069
257108
|
const version$1 = fragmentSignature(fragment2, computeBlockVersion(fragment2.blockId, blockMap, blockVersionCache));
|
|
257109
|
+
const layoutSourceIdentity = resolveFragmentLayoutIdentity(fragment2, story);
|
|
257070
257110
|
switch (fragment2.kind) {
|
|
257071
257111
|
case "table": {
|
|
257072
257112
|
const item = resolveTableItem(fragment2, fragmentIndex, pageIndex, blockMap);
|
|
@@ -257074,6 +257114,7 @@ function resolveFragmentItem(fragment2, fragmentIndex, pageIndex, blockMap, bloc
|
|
|
257074
257114
|
item.sdtContainerKey = sdtContainerKey;
|
|
257075
257115
|
if (fragment2.sourceAnchor != null)
|
|
257076
257116
|
item.sourceAnchor = fragment2.sourceAnchor;
|
|
257117
|
+
item.layoutSourceIdentity = layoutSourceIdentity;
|
|
257077
257118
|
applyPaintVersions(item, version$1);
|
|
257078
257119
|
return item;
|
|
257079
257120
|
}
|
|
@@ -257083,6 +257124,7 @@ function resolveFragmentItem(fragment2, fragmentIndex, pageIndex, blockMap, bloc
|
|
|
257083
257124
|
item.sdtContainerKey = sdtContainerKey;
|
|
257084
257125
|
if (fragment2.sourceAnchor != null)
|
|
257085
257126
|
item.sourceAnchor = fragment2.sourceAnchor;
|
|
257127
|
+
item.layoutSourceIdentity = layoutSourceIdentity;
|
|
257086
257128
|
applyPaintVersions(item, version$1);
|
|
257087
257129
|
return item;
|
|
257088
257130
|
}
|
|
@@ -257092,6 +257134,7 @@ function resolveFragmentItem(fragment2, fragmentIndex, pageIndex, blockMap, bloc
|
|
|
257092
257134
|
item.sdtContainerKey = sdtContainerKey;
|
|
257093
257135
|
if (fragment2.sourceAnchor != null)
|
|
257094
257136
|
item.sourceAnchor = fragment2.sourceAnchor;
|
|
257137
|
+
item.layoutSourceIdentity = layoutSourceIdentity;
|
|
257095
257138
|
applyPaintVersions(item, version$1);
|
|
257096
257139
|
return item;
|
|
257097
257140
|
}
|
|
@@ -257109,7 +257152,8 @@ function resolveFragmentItem(fragment2, fragmentIndex, pageIndex, blockMap, bloc
|
|
|
257109
257152
|
fragment: fragment2,
|
|
257110
257153
|
blockId: fragment2.blockId,
|
|
257111
257154
|
fragmentIndex,
|
|
257112
|
-
content: resolveParagraphContentIfApplicable(fragment2, blockMap)
|
|
257155
|
+
content: resolveParagraphContentIfApplicable(fragment2, blockMap),
|
|
257156
|
+
layoutSourceIdentity
|
|
257113
257157
|
};
|
|
257114
257158
|
if (sdtContainerKey != null)
|
|
257115
257159
|
item.sdtContainerKey = sdtContainerKey;
|
|
@@ -257196,14 +257240,14 @@ function resolveLayout(input2) {
|
|
|
257196
257240
|
resolved.layoutEpoch = layout.layoutEpoch;
|
|
257197
257241
|
return resolved;
|
|
257198
257242
|
}
|
|
257199
|
-
function resolveHeaderFooterLayout(layout, blocks2, measures) {
|
|
257243
|
+
function resolveHeaderFooterLayout(layout, blocks2, measures, story) {
|
|
257200
257244
|
const pages = layout.pages.map((page) => {
|
|
257201
257245
|
const blockMap = buildBlockMap(page.blocks ?? blocks2, page.measures ?? measures);
|
|
257202
257246
|
const blockVersionCache = /* @__PURE__ */ new Map;
|
|
257203
257247
|
return {
|
|
257204
257248
|
number: page.number,
|
|
257205
257249
|
numberText: page.numberText,
|
|
257206
|
-
items: page.fragments.map((fragment2, fragmentIndex) => resolveFragmentItem(fragment2, fragmentIndex, page.number - 1, blockMap, blockVersionCache))
|
|
257250
|
+
items: page.fragments.map((fragment2, fragmentIndex) => resolveFragmentItem(fragment2, fragmentIndex, page.number - 1, blockMap, blockVersionCache, story))
|
|
257207
257251
|
};
|
|
257208
257252
|
});
|
|
257209
257253
|
return {
|
|
@@ -261755,6 +261799,13 @@ function layoutHeaderFooter(blocks2, measures, constraints, kind) {
|
|
|
261755
261799
|
});
|
|
261756
261800
|
if (kind === "footer" && constraints.pageHeight != null)
|
|
261757
261801
|
normalizeFragmentsForRegion(layout.pages, blocks2, measures, kind, constraints);
|
|
261802
|
+
const story = kind ? { kind } : undefined;
|
|
261803
|
+
if (story)
|
|
261804
|
+
for (const page of layout.pages)
|
|
261805
|
+
page.fragments = page.fragments.map((fragment2) => ({
|
|
261806
|
+
...fragment2,
|
|
261807
|
+
layoutSourceIdentity: buildLayoutSourceIdentityForFragment(fragment2, story)
|
|
261808
|
+
}));
|
|
261758
261809
|
const idToIndex = /* @__PURE__ */ new Map;
|
|
261759
261810
|
for (let i4 = 0;i4 < blocks2.length; i4 += 1)
|
|
261760
261811
|
idToIndex.set(blocks2[i4].id, i4);
|
|
@@ -275432,8 +275483,16 @@ function setSurfaceRangeEnd(range, entry, pos) {
|
|
|
275432
275483
|
range.setEndAfter(entry.el);
|
|
275433
275484
|
return true;
|
|
275434
275485
|
}
|
|
275435
|
-
function
|
|
275436
|
-
|
|
275486
|
+
function buildHeaderFooterStory(kind, id2) {
|
|
275487
|
+
const normalizedId = typeof id2 === "string" && id2.length > 0 ? id2 : undefined;
|
|
275488
|
+
return normalizedId ? namedStoryLocator(kind, normalizedId) : { kind };
|
|
275489
|
+
}
|
|
275490
|
+
function storyIdFromHeaderFooterLayoutKey(key2) {
|
|
275491
|
+
return key2.replace(/::s\d+$/, "");
|
|
275492
|
+
}
|
|
275493
|
+
function resolveResult(result, storyId) {
|
|
275494
|
+
const story = buildHeaderFooterStory(result.kind, storyId ?? String(result.type));
|
|
275495
|
+
return resolveHeaderFooterLayout(result.layout, result.blocks, result.measures, story);
|
|
275437
275496
|
}
|
|
275438
275497
|
function shiftResolvedPaintItemY(item, yOffset) {
|
|
275439
275498
|
if (item.kind === "group")
|
|
@@ -275946,6 +276005,55 @@ var Node$13 = class Node$14 {
|
|
|
275946
276005
|
return;
|
|
275947
276006
|
const candidate = run2.pmEnd;
|
|
275948
276007
|
return typeof candidate === "number" ? candidate : undefined;
|
|
276008
|
+
}, LAYOUT_BOUNDARY_SCHEMA = "layout-identity/1", bodyStoryLocator = () => ({ kind: "body" }), namedStoryLocator = (kind, id2) => id2 ? {
|
|
276009
|
+
kind,
|
|
276010
|
+
id: id2
|
|
276011
|
+
} : { kind: "unknown" }, computeLayoutFragmentId = (input2) => {
|
|
276012
|
+
const story = input2.story ?? bodyStoryLocator();
|
|
276013
|
+
const storySegment = story.kind === "body" ? "body" : `${story.kind}:${story.id ?? ""}`;
|
|
276014
|
+
let variant;
|
|
276015
|
+
if (input2.kind === "para")
|
|
276016
|
+
variant = `para:${input2.fromLine ?? 0}:${input2.toLine ?? ""}`;
|
|
276017
|
+
else if (input2.kind === "list-item")
|
|
276018
|
+
variant = `list-item:${input2.itemId ?? ""}:${input2.fromLine ?? 0}:${input2.toLine ?? ""}`;
|
|
276019
|
+
else if (input2.kind === "table") {
|
|
276020
|
+
const partialKey = input2.partialRow ? `:${input2.partialRow.rowIndex ?? ""}:${input2.partialRow.fromLineByCell?.join(",") ?? ""}-${input2.partialRow.toLineByCell?.join(",") ?? ""}` : "";
|
|
276021
|
+
variant = `table:${input2.fromRow ?? 0}:${input2.toRow ?? ""}${partialKey}`;
|
|
276022
|
+
} else if (input2.kind === "image" || input2.kind === "drawing")
|
|
276023
|
+
variant = `${input2.kind}:${input2.x ?? ""}:${input2.y ?? ""}`;
|
|
276024
|
+
else
|
|
276025
|
+
variant = input2.kind;
|
|
276026
|
+
return `${storySegment}|${input2.blockId}|${variant}`;
|
|
276027
|
+
}, buildLayoutSourceIdentity = (input2) => ({
|
|
276028
|
+
schema: LAYOUT_BOUNDARY_SCHEMA,
|
|
276029
|
+
story: input2.story ?? bodyStoryLocator(),
|
|
276030
|
+
blockRef: input2.blockId,
|
|
276031
|
+
fragmentId: computeLayoutFragmentId(input2),
|
|
276032
|
+
sourceAnchor: input2.sourceAnchor
|
|
276033
|
+
}), sameStoryLocator = (left$1, right$1) => left$1.kind === right$1.kind && (left$1.id ?? "") === (right$1.id ?? ""), shouldKeepExistingIdentity = (existing, story) => {
|
|
276034
|
+
if (!story)
|
|
276035
|
+
return true;
|
|
276036
|
+
if (sameStoryLocator(existing.story, story))
|
|
276037
|
+
return true;
|
|
276038
|
+
return story.kind === "body" && existing.story.kind !== "body";
|
|
276039
|
+
}, buildLayoutSourceIdentityForFragment = (fragment2, story) => {
|
|
276040
|
+
const existing = fragment2.layoutSourceIdentity;
|
|
276041
|
+
if (existing && shouldKeepExistingIdentity(existing, story))
|
|
276042
|
+
return existing;
|
|
276043
|
+
return buildLayoutSourceIdentity({
|
|
276044
|
+
blockId: fragment2.blockId,
|
|
276045
|
+
story: story ?? existing?.story,
|
|
276046
|
+
kind: fragment2.kind,
|
|
276047
|
+
fromLine: fragment2.kind === "para" || fragment2.kind === "list-item" ? fragment2.fromLine : undefined,
|
|
276048
|
+
toLine: fragment2.kind === "para" || fragment2.kind === "list-item" ? fragment2.toLine : undefined,
|
|
276049
|
+
fromRow: fragment2.kind === "table" ? fragment2.fromRow : undefined,
|
|
276050
|
+
toRow: fragment2.kind === "table" ? fragment2.toRow : undefined,
|
|
276051
|
+
itemId: fragment2.kind === "list-item" ? fragment2.itemId : undefined,
|
|
276052
|
+
x: fragment2.kind === "image" || fragment2.kind === "drawing" ? fragment2.x : undefined,
|
|
276053
|
+
y: fragment2.kind === "image" || fragment2.kind === "drawing" ? fragment2.y : undefined,
|
|
276054
|
+
partialRow: fragment2.kind === "table" ? fragment2.partialRow : undefined,
|
|
276055
|
+
sourceAnchor: fragment2.sourceAnchor ?? existing?.sourceAnchor
|
|
276056
|
+
});
|
|
275949
276057
|
}, engines_exports, floor4, abs2, min$1 = (a2, b$1) => a2 < b$1 ? a2 : b$1, max$1 = (a2, b$1) => a2 > b$1 ? a2 : b$1, isNegativeZero2 = (n) => n !== 0 ? n < 0 : 1 / n < 0, BIT182, BIT192, BIT202, BIT212, BIT222, BIT232, BIT242, BIT252, BIT262, BIT272, BIT282, BIT292, BIT302, BIT312, MAX_SAFE_INTEGER4, MIN_SAFE_INTEGER2, isInteger4, create$23 = () => /* @__PURE__ */ new Set, every$1 = (arr, f2) => {
|
|
275950
276058
|
for (let i4 = 0;i4 < arr.length; i4++)
|
|
275951
276059
|
if (!f2(arr[i4], i4, arr))
|
|
@@ -286536,7 +286644,28 @@ var Node$13 = class Node$14 {
|
|
|
286536
286644
|
if (!allowedRanges?.length)
|
|
286537
286645
|
return false;
|
|
286538
286646
|
return allowedRanges.some((allowed) => range.from >= allowed.from && range.to <= allowed.to);
|
|
286539
|
-
}, PermissionRanges, Protection, DOM_CLASS_NAMES, DATA_ATTRS, DATASET_KEYS,
|
|
286647
|
+
}, PermissionRanges, Protection, DOM_CLASS_NAMES, DATA_ATTRS, DATASET_KEYS, encodeLayoutStoryDataset = (story) => story.kind === "body" ? "body" : story.id ? `${story.kind}:${story.id}` : story.kind, decodeLayoutStoryDataset = (raw) => {
|
|
286648
|
+
if (!raw)
|
|
286649
|
+
return { kind: "unknown" };
|
|
286650
|
+
if (raw === "body")
|
|
286651
|
+
return { kind: "body" };
|
|
286652
|
+
const idx = raw.indexOf(":");
|
|
286653
|
+
const kind = idx === -1 ? raw : raw.slice(0, idx);
|
|
286654
|
+
const id2 = idx === -1 ? undefined : raw.slice(idx + 1);
|
|
286655
|
+
switch (kind) {
|
|
286656
|
+
case "body":
|
|
286657
|
+
case "header":
|
|
286658
|
+
case "footer":
|
|
286659
|
+
case "footnote":
|
|
286660
|
+
case "endnote":
|
|
286661
|
+
return id2 ? {
|
|
286662
|
+
kind,
|
|
286663
|
+
id: id2
|
|
286664
|
+
} : { kind };
|
|
286665
|
+
default:
|
|
286666
|
+
return { kind: "unknown" };
|
|
286667
|
+
}
|
|
286668
|
+
}, DRAGGABLE_SELECTOR, VerticalNavigationPluginKey, createDefaultState = () => ({ goalX: null }), VerticalNavigation, STRONG_RTL_CHAR_RE$1, STRONG_LTR_CHAR_RE, isStrongRtl = (char) => STRONG_RTL_CHAR_RE$1.test(char), isStrongLtr = (char) => STRONG_LTR_CHAR_RE.test(char), hasMixedDirectionBoundary = (leftChar, rightChar) => isStrongRtl(leftChar) && isStrongLtr(rightChar) || isStrongLtr(leftChar) && isStrongRtl(rightChar), resolveCaretPoint = (doc$12, range) => {
|
|
286540
286669
|
const rect = range.getBoundingClientRect();
|
|
286541
286670
|
if (rect && Number.isFinite(rect.left) && Number.isFinite(rect.top)) {
|
|
286542
286671
|
if (rect.width === 0 && rect.height === 0)
|
|
@@ -294468,7 +294597,21 @@ menclose::after {
|
|
|
294468
294597
|
menclose.setAttribute("notation", notations.join(" "));
|
|
294469
294598
|
menclose.appendChild(innerMrow);
|
|
294470
294599
|
return menclose;
|
|
294471
|
-
}, MATHML_NS = "http://www.w3.org/1998/Math/MathML", MATH_OBJECT_REGISTRY, ARGUMENT_ELEMENTS,
|
|
294600
|
+
}, MATHML_NS = "http://www.w3.org/1998/Math/MathML", MATH_OBJECT_REGISTRY, ARGUMENT_ELEMENTS, resolveOrBuildFragmentIdentity = (fragment2, story, existing) => buildLayoutSourceIdentityForFragment(existing ? {
|
|
294601
|
+
...fragment2,
|
|
294602
|
+
layoutSourceIdentity: existing,
|
|
294603
|
+
sourceAnchor: fragment2.sourceAnchor ?? existing.sourceAnchor
|
|
294604
|
+
} : fragment2, story), resolveSectionStory = (section) => {
|
|
294605
|
+
if (!section || section === "body")
|
|
294606
|
+
return;
|
|
294607
|
+
return { kind: section };
|
|
294608
|
+
}, resolveDecorationStory = (kind, data) => {
|
|
294609
|
+
const id2 = data.headerFooterRefId ?? data.sectionType;
|
|
294610
|
+
return typeof id2 === "string" && id2.length > 0 ? {
|
|
294611
|
+
kind,
|
|
294612
|
+
id: id2
|
|
294613
|
+
} : { kind };
|
|
294614
|
+
}, LIST_MARKER_GAP$1 = 8, DEFAULT_PAGE_HEIGHT_PX = 1056, DEFAULT_VIRTUALIZED_PAGE_GAP = 72, LINK_DATASET_KEYS, MAX_HREF_LENGTH = 2048, SAFE_ANCHOR_PATTERN, MAX_DATA_URL_LENGTH, VALID_IMAGE_DATA_URL, SVG_NS = "http://www.w3.org/2000/svg", WORDART_LINE_FILL_RATIO = 0.9, MAX_RESIZE_MULTIPLIER = 3, FALLBACK_MAX_DIMENSION = 1000, MIN_IMAGE_DIMENSION = 20, AMBIGUOUS_LINK_PATTERNS, linkMetrics, TRACK_CHANGE_BASE_CLASS, TRACK_CHANGE_MODIFIER_CLASS, LINK_TARGET_SET, normalizeAnchor$1 = (value) => {
|
|
294472
294615
|
if (typeof value !== "string")
|
|
294473
294616
|
return null;
|
|
294474
294617
|
const trimmed = value.trim();
|
|
@@ -295212,7 +295355,9 @@ menclose::after {
|
|
|
295212
295355
|
return `{${Object.keys(record).sort().filter((key2) => record[key2] !== undefined).map((key2) => `${JSON.stringify(key2)}:${stableSerializeEvidenceValue(record[key2])}`).join(",")}}`;
|
|
295213
295356
|
}
|
|
295214
295357
|
return JSON.stringify(String(value));
|
|
295215
|
-
}, sourceAnchorSignature = (sourceAnchor) => sourceAnchor ? stableSerializeEvidenceValue(sourceAnchor) : "",
|
|
295358
|
+
}, sourceAnchorSignature = (sourceAnchor) => sourceAnchor ? stableSerializeEvidenceValue(sourceAnchor) : "", resolveFragmentLayoutIdentity = (fragment2, story) => {
|
|
295359
|
+
return buildLayoutSourceIdentityForFragment(fragment2, story);
|
|
295360
|
+
}, deriveBlockVersion = (block) => {
|
|
295216
295361
|
if (block.kind === "paragraph") {
|
|
295217
295362
|
const markerVersion = hasListMarkerProperties(block.attrs) ? `marker:${block.attrs.numberingProperties.numId ?? ""}:${block.attrs.numberingProperties.ilvl ?? 0}:${block.attrs.wordLayout?.marker?.markerText ?? ""}` : "";
|
|
295218
295363
|
const runsVersion = block.runs.map((run2) => {
|
|
@@ -304579,14 +304724,14 @@ menclose::after {
|
|
|
304579
304724
|
}
|
|
304580
304725
|
set headerLayoutResults(results) {
|
|
304581
304726
|
this.#headerLayoutResults = results;
|
|
304582
|
-
this.#resolvedHeaderLayouts = results ? results.map(resolveResult) : null;
|
|
304727
|
+
this.#resolvedHeaderLayouts = results ? results.map((result) => resolveResult(result)) : null;
|
|
304583
304728
|
}
|
|
304584
304729
|
get footerLayoutResults() {
|
|
304585
304730
|
return this.#footerLayoutResults;
|
|
304586
304731
|
}
|
|
304587
304732
|
set footerLayoutResults(results) {
|
|
304588
304733
|
this.#footerLayoutResults = results;
|
|
304589
|
-
this.#resolvedFooterLayouts = results ? results.map(resolveResult) : null;
|
|
304734
|
+
this.#resolvedFooterLayouts = results ? results.map((result) => resolveResult(result)) : null;
|
|
304590
304735
|
}
|
|
304591
304736
|
get headerLayoutsByRId() {
|
|
304592
304737
|
return this.#headerLayoutsByRId;
|
|
@@ -304641,8 +304786,8 @@ menclose::after {
|
|
|
304641
304786
|
setLayoutResults(headerResults, footerResults) {
|
|
304642
304787
|
this.#headerLayoutResults = headerResults;
|
|
304643
304788
|
this.#footerLayoutResults = footerResults;
|
|
304644
|
-
this.#resolvedHeaderLayouts = headerResults ? headerResults.map(resolveResult) : null;
|
|
304645
|
-
this.#resolvedFooterLayouts = footerResults ? footerResults.map(resolveResult) : null;
|
|
304789
|
+
this.#resolvedHeaderLayouts = headerResults ? headerResults.map((result) => resolveResult(result)) : null;
|
|
304790
|
+
this.#resolvedFooterLayouts = footerResults ? footerResults.map((result) => resolveResult(result)) : null;
|
|
304646
304791
|
}
|
|
304647
304792
|
initialize() {
|
|
304648
304793
|
if (!this.#options.editor)
|
|
@@ -305337,10 +305482,10 @@ menclose::after {
|
|
|
305337
305482
|
});
|
|
305338
305483
|
this.#resolvedHeaderByRId.clear();
|
|
305339
305484
|
for (const [key2, result] of this.#headerLayoutsByRId)
|
|
305340
|
-
this.#resolvedHeaderByRId.set(key2, resolveResult(result));
|
|
305485
|
+
this.#resolvedHeaderByRId.set(key2, resolveResult(result, storyIdFromHeaderFooterLayoutKey(key2)));
|
|
305341
305486
|
this.#resolvedFooterByRId.clear();
|
|
305342
305487
|
for (const [key2, result] of this.#footerLayoutsByRId)
|
|
305343
|
-
this.#resolvedFooterByRId.set(key2, resolveResult(result));
|
|
305488
|
+
this.#resolvedFooterByRId.set(key2, resolveResult(result, storyIdFromHeaderFooterLayoutKey(key2)));
|
|
305344
305489
|
}
|
|
305345
305490
|
#computeMetrics(kind, layoutHeight, box, pageHeight, footerMargin) {
|
|
305346
305491
|
const validatedLayoutHeight = Number.isFinite(layoutHeight) && layoutHeight >= 0 ? layoutHeight : 0;
|
|
@@ -305738,13 +305883,13 @@ menclose::after {
|
|
|
305738
305883
|
this.#footerDecorationProvider = this.createDecorationProvider("footer", resolvedLayout);
|
|
305739
305884
|
this.rebuildRegions(resolvedLayout);
|
|
305740
305885
|
}
|
|
305741
|
-
resolveAlignedDecorationItems(fragments, slotPageNumber, result, cachedResolvedLayout, contextLabel) {
|
|
305886
|
+
resolveAlignedDecorationItems(fragments, slotPageNumber, result, cachedResolvedLayout, contextLabel, storyId) {
|
|
305742
305887
|
const cachedItems = cachedResolvedLayout?.pages.find((page) => page.number === slotPageNumber)?.items;
|
|
305743
305888
|
if (cachedItems && cachedItems.length === fragments.length)
|
|
305744
305889
|
return cachedItems;
|
|
305745
305890
|
if (cachedItems)
|
|
305746
305891
|
console.warn(`[HeaderFooterSessionManager] Resolved items length (${cachedItems.length}) does not match fragments length (${fragments.length}) for ${contextLabel}. Recomputing items.`);
|
|
305747
|
-
const freshItems =
|
|
305892
|
+
const freshItems = resolveResult(result, storyId).pages.find((page) => page.number === slotPageNumber)?.items;
|
|
305748
305893
|
if (freshItems && freshItems.length === fragments.length)
|
|
305749
305894
|
return freshItems;
|
|
305750
305895
|
if (freshItems)
|
|
@@ -305805,7 +305950,7 @@ menclose::after {
|
|
|
305805
305950
|
if (slotPage$1) {
|
|
305806
305951
|
const fragments$1 = slotPage$1.fragments ?? [];
|
|
305807
305952
|
const rIdResolvedLayout = resolvedByRId.get(rIdLayoutKey);
|
|
305808
|
-
const alignedItems = this.resolveAlignedDecorationItems(fragments$1, slotPage$1.number, rIdLayout, rIdResolvedLayout, `rId '${rIdLayoutKey}' page ${pageNumber}
|
|
305953
|
+
const alignedItems = this.resolveAlignedDecorationItems(fragments$1, slotPage$1.number, rIdLayout, rIdResolvedLayout, `rId '${rIdLayoutKey}' page ${pageNumber}`, sectionRId);
|
|
305809
305954
|
if (!alignedItems)
|
|
305810
305955
|
return null;
|
|
305811
305956
|
const pageHeight$1 = page?.height ?? resolvedLayout.pages[0]?.height ?? layoutOptions.pageSize?.h ?? defaultPageSize.h;
|
|
@@ -305853,8 +305998,10 @@ menclose::after {
|
|
|
305853
305998
|
if (!slotPage)
|
|
305854
305999
|
return null;
|
|
305855
306000
|
const fragments = slotPage.fragments ?? [];
|
|
306001
|
+
const fallbackId = this.#headerFooterManager?.getVariantId(kind, headerFooterType);
|
|
306002
|
+
const finalHeaderId = sectionRId ?? fallbackId ?? undefined;
|
|
305856
306003
|
const resolvedVariant = resolvedResults?.[variantIndex];
|
|
305857
|
-
const alignedVariantItems = this.resolveAlignedDecorationItems(fragments, slotPage.number, variant, resolvedVariant, `variant '${headerFooterType}' page ${pageNumber}
|
|
306004
|
+
const alignedVariantItems = this.resolveAlignedDecorationItems(fragments, slotPage.number, variant, resolvedVariant, `variant '${headerFooterType}' page ${pageNumber}`, finalHeaderId ?? headerFooterType);
|
|
305858
306005
|
if (!alignedVariantItems)
|
|
305859
306006
|
return null;
|
|
305860
306007
|
const pageHeight = page?.height ?? resolvedLayout.pages[0]?.height ?? layoutOptions.pageSize?.h ?? defaultPageSize.h;
|
|
@@ -305863,8 +306010,6 @@ menclose::after {
|
|
|
305863
306010
|
const box = this.#computeDecorationBox(kind, decorationMargins, pageHeight);
|
|
305864
306011
|
const rawLayoutHeight = variant.layout.height ?? 0;
|
|
305865
306012
|
const metrics = this.#computeMetrics(kind, rawLayoutHeight, box, pageHeight, margins?.footer ?? 0);
|
|
305866
|
-
const fallbackId = this.#headerFooterManager?.getVariantId(kind, headerFooterType);
|
|
305867
|
-
const finalHeaderId = sectionRId ?? fallbackId ?? undefined;
|
|
305868
306013
|
const layoutMinY = variant.layout.minY ?? 0;
|
|
305869
306014
|
return {
|
|
305870
306015
|
fragments: normalizeDecorationFragments(fragments, layoutMinY),
|
|
@@ -306166,7 +306311,7 @@ menclose::after {
|
|
|
306166
306311
|
return;
|
|
306167
306312
|
console.log(...args$1);
|
|
306168
306313
|
}, HEADER_FOOTER_INIT_BUDGET_MS = 200, MAX_ZOOM_WARNING_THRESHOLD = 10, MAX_SELECTION_RECTS_PER_USER = 100, SEMANTIC_RESIZE_DEBOUNCE_MS = 120, MIN_SEMANTIC_CONTENT_WIDTH_PX = 1, GLOBAL_PERFORMANCE, PresentationEditor, ICONS, TEXTS, tableActionsOptions;
|
|
306169
|
-
var
|
|
306314
|
+
var init_src_IynDnUzG_es = __esm(() => {
|
|
306170
306315
|
init_rolldown_runtime_Bg48TavK_es();
|
|
306171
306316
|
init_SuperConverter_CzwJ7ds9_es();
|
|
306172
306317
|
init_jszip_C49i9kUs_es();
|
|
@@ -324582,7 +324727,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
324582
324727
|
DRAGGABLE: "data-draggable",
|
|
324583
324728
|
DISPLAY_LABEL: "data-display-label",
|
|
324584
324729
|
VARIANT: "data-variant",
|
|
324585
|
-
TYPE: "data-type"
|
|
324730
|
+
TYPE: "data-type",
|
|
324731
|
+
LAYOUT_BOUNDARY_SCHEMA: "data-layout-boundary-schema",
|
|
324732
|
+
LAYOUT_FRAGMENT_ID: "data-layout-fragment-id",
|
|
324733
|
+
LAYOUT_STORY: "data-layout-story",
|
|
324734
|
+
LAYOUT_BLOCK_REF: "data-layout-block-ref"
|
|
324586
324735
|
};
|
|
324587
324736
|
DATASET_KEYS = {
|
|
324588
324737
|
PM_START: "pmStart",
|
|
@@ -324596,7 +324745,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
324596
324745
|
DRAGGABLE: "draggable",
|
|
324597
324746
|
DISPLAY_LABEL: "displayLabel",
|
|
324598
324747
|
VARIANT: "variant",
|
|
324599
|
-
TYPE: "type"
|
|
324748
|
+
TYPE: "type",
|
|
324749
|
+
LAYOUT_BOUNDARY_SCHEMA: "layoutBoundarySchema",
|
|
324750
|
+
LAYOUT_FRAGMENT_ID: "layoutFragmentId",
|
|
324751
|
+
LAYOUT_STORY: "layoutStory",
|
|
324752
|
+
LAYOUT_BLOCK_REF: "layoutBlockRef"
|
|
324600
324753
|
};
|
|
324601
324754
|
`${DOM_CLASS_NAMES.BLOCK_SDT}${DATA_ATTRS.SDT_ID}`;
|
|
324602
324755
|
DRAGGABLE_SELECTOR = `[${DATA_ATTRS.DRAGGABLE}="true"]`;
|
|
@@ -332773,7 +332926,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
332773
332926
|
style: style2,
|
|
332774
332927
|
markers,
|
|
332775
332928
|
tabs,
|
|
332776
|
-
sourceAnchor: readNearestSourceAnchor(lineEl) ?? readNearestSourceAnchor(options.wrapperEl) ?? options.sourceAnchor
|
|
332929
|
+
sourceAnchor: readNearestSourceAnchor(lineEl) ?? readNearestSourceAnchor(options.wrapperEl) ?? options.sourceAnchor,
|
|
332930
|
+
layoutSourceIdentity: readNearestLayoutSourceIdentity(lineEl) ?? readNearestLayoutSourceIdentity(options.wrapperEl)
|
|
332777
332931
|
}));
|
|
332778
332932
|
page.lineCount += 1;
|
|
332779
332933
|
builder.lineCount += 1;
|
|
@@ -332811,7 +332965,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
332811
332965
|
style: snapshotLineStyleFromElement(lineEl),
|
|
332812
332966
|
markers,
|
|
332813
332967
|
tabs,
|
|
332814
|
-
sourceAnchor: readNearestSourceAnchor(lineEl)
|
|
332968
|
+
sourceAnchor: readNearestSourceAnchor(lineEl),
|
|
332969
|
+
layoutSourceIdentity: readNearestLayoutSourceIdentity(lineEl)
|
|
332815
332970
|
}));
|
|
332816
332971
|
}
|
|
332817
332972
|
const pageNumberRaw = pageEl.dataset?.pageNumber;
|
|
@@ -333234,6 +333389,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
333234
333389
|
el.dataset.layoutEpoch = String(this.layoutEpoch);
|
|
333235
333390
|
el.dataset.pageNumber = String(page.number);
|
|
333236
333391
|
el.dataset.pageIndex = String(pageIndex);
|
|
333392
|
+
el.dataset[DATASET_KEYS.LAYOUT_BOUNDARY_SCHEMA] = LAYOUT_BOUNDARY_SCHEMA;
|
|
333237
333393
|
if (!this.isSemanticFlow && this.options.ruler?.enabled) {
|
|
333238
333394
|
const rulerEl = this.renderPageRuler(width, page);
|
|
333239
333395
|
if (rulerEl)
|
|
@@ -333456,6 +333612,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
333456
333612
|
pageNumber: page.number,
|
|
333457
333613
|
totalPages: this.totalPages,
|
|
333458
333614
|
section: kind,
|
|
333615
|
+
story: resolveDecorationStory(kind, data),
|
|
333459
333616
|
pageNumberText: page.numberText,
|
|
333460
333617
|
pageIndex
|
|
333461
333618
|
};
|
|
@@ -333694,6 +333851,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
333694
333851
|
applyStyles(el, pageStyles(page.width, page.height, this.getEffectivePageStyles()));
|
|
333695
333852
|
this.applySemanticPageOverrides(el);
|
|
333696
333853
|
el.dataset.layoutEpoch = String(this.layoutEpoch);
|
|
333854
|
+
el.dataset[DATASET_KEYS.LAYOUT_BOUNDARY_SCHEMA] = LAYOUT_BOUNDARY_SCHEMA;
|
|
333697
333855
|
const contextBase = {
|
|
333698
333856
|
pageNumber: page.number,
|
|
333699
333857
|
totalPages: this.totalPages,
|
|
@@ -333793,9 +333951,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
333793
333951
|
overflow: "visible"
|
|
333794
333952
|
} : fragmentStyles);
|
|
333795
333953
|
if (resolvedItem)
|
|
333796
|
-
this.applyResolvedFragmentFrame(fragmentEl, resolvedItem, fragment2, context.section);
|
|
333954
|
+
this.applyResolvedFragmentFrame(fragmentEl, resolvedItem, fragment2, context.section, context.story);
|
|
333797
333955
|
else
|
|
333798
|
-
this.applyFragmentFrame(fragmentEl, fragment2, context.section);
|
|
333956
|
+
this.applyFragmentFrame(fragmentEl, fragment2, context.section, context.story);
|
|
333799
333957
|
if (isTocEntry)
|
|
333800
333958
|
fragmentEl.classList.add("superdoc-toc-entry");
|
|
333801
333959
|
if (paraContinuesFromPrev)
|
|
@@ -333923,6 +334081,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
333923
334081
|
this.capturePaintSnapshotLine(lineEl, context, {
|
|
333924
334082
|
inTableFragment: false,
|
|
333925
334083
|
inTableParagraph: false,
|
|
334084
|
+
wrapperEl: fragmentEl,
|
|
333926
334085
|
sourceAnchor: resolvedItem?.sourceAnchor
|
|
333927
334086
|
});
|
|
333928
334087
|
fragmentEl.appendChild(lineEl);
|
|
@@ -334062,6 +334221,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
334062
334221
|
this.capturePaintSnapshotLine(lineEl, context, {
|
|
334063
334222
|
inTableFragment: false,
|
|
334064
334223
|
inTableParagraph: false,
|
|
334224
|
+
wrapperEl: fragmentEl,
|
|
334065
334225
|
sourceAnchor: resolvedItem?.sourceAnchor
|
|
334066
334226
|
});
|
|
334067
334227
|
fragmentEl.appendChild(lineEl);
|
|
@@ -334144,13 +334304,14 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
334144
334304
|
fragmentEl.classList.add(CLASS_NAMES$1.fragment, `${CLASS_NAMES$1.fragment}-list-item`);
|
|
334145
334305
|
applyStyles(fragmentEl, fragmentStyles);
|
|
334146
334306
|
if (resolvedItem)
|
|
334147
|
-
this.applyResolvedListItemWrapperFrame(fragmentEl, fragment2, resolvedItem, context.section);
|
|
334307
|
+
this.applyResolvedListItemWrapperFrame(fragmentEl, fragment2, resolvedItem, context.section, context.story);
|
|
334148
334308
|
else {
|
|
334149
334309
|
fragmentEl.style.left = `${fragment2.x - fragment2.markerWidth}px`;
|
|
334150
334310
|
fragmentEl.style.top = `${fragment2.y}px`;
|
|
334151
334311
|
fragmentEl.style.width = `${fragment2.markerWidth + fragment2.width}px`;
|
|
334152
334312
|
fragmentEl.dataset.blockId = fragment2.blockId;
|
|
334153
334313
|
applySourceAnchorDataset(fragmentEl, fragment2.sourceAnchor);
|
|
334314
|
+
applyLayoutIdentityDataset(fragmentEl, resolveOrBuildFragmentIdentity(fragment2, context.story));
|
|
334154
334315
|
}
|
|
334155
334316
|
fragmentEl.dataset.itemId = fragment2.itemId;
|
|
334156
334317
|
const paragraphMetadata = item.paragraph.attrs?.sdt;
|
|
@@ -334219,6 +334380,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
334219
334380
|
this.capturePaintSnapshotLine(lineEl, context, {
|
|
334220
334381
|
inTableFragment: false,
|
|
334221
334382
|
inTableParagraph: false,
|
|
334383
|
+
wrapperEl: fragmentEl,
|
|
334222
334384
|
sourceAnchor: resolvedItem?.sourceAnchor
|
|
334223
334385
|
});
|
|
334224
334386
|
contentEl.appendChild(lineEl);
|
|
@@ -334244,9 +334406,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
334244
334406
|
fragmentEl.classList.add(CLASS_NAMES$1.fragment, DOM_CLASS_NAMES.IMAGE_FRAGMENT);
|
|
334245
334407
|
applyStyles(fragmentEl, fragmentStyles);
|
|
334246
334408
|
if (resolvedItem)
|
|
334247
|
-
this.applyResolvedFragmentFrame(fragmentEl, resolvedItem, fragment2, context.section);
|
|
334409
|
+
this.applyResolvedFragmentFrame(fragmentEl, resolvedItem, fragment2, context.section, context.story);
|
|
334248
334410
|
else {
|
|
334249
|
-
this.applyFragmentFrame(fragmentEl, fragment2, context.section);
|
|
334411
|
+
this.applyFragmentFrame(fragmentEl, fragment2, context.section, context.story);
|
|
334250
334412
|
fragmentEl.style.height = `${fragment2.height}px`;
|
|
334251
334413
|
this.applyFragmentWrapperZIndex(fragmentEl, fragment2);
|
|
334252
334414
|
}
|
|
@@ -334361,9 +334523,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
334361
334523
|
fragmentEl.classList.add(CLASS_NAMES$1.fragment, "superdoc-drawing-fragment");
|
|
334362
334524
|
applyStyles(fragmentEl, fragmentStyles);
|
|
334363
334525
|
if (resolvedItem)
|
|
334364
|
-
this.applyResolvedFragmentFrame(fragmentEl, resolvedItem, fragment2, context.section);
|
|
334526
|
+
this.applyResolvedFragmentFrame(fragmentEl, resolvedItem, fragment2, context.section, context.story);
|
|
334365
334527
|
else {
|
|
334366
|
-
this.applyFragmentFrame(fragmentEl, fragment2, context.section);
|
|
334528
|
+
this.applyFragmentFrame(fragmentEl, fragment2, context.section, context.story);
|
|
334367
334529
|
fragmentEl.style.height = `${fragment2.height}px`;
|
|
334368
334530
|
this.applyFragmentWrapperZIndex(fragmentEl, fragment2);
|
|
334369
334531
|
}
|
|
@@ -335042,7 +335204,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
335042
335204
|
if (!this.doc)
|
|
335043
335205
|
throw new Error("DomPainter: document is not available");
|
|
335044
335206
|
const applyFragmentFrameWithSection = (el$1, frag) => {
|
|
335045
|
-
this.applyFragmentFrame(el$1, frag, context.section);
|
|
335207
|
+
this.applyFragmentFrame(el$1, frag, context.section, context.story);
|
|
335046
335208
|
};
|
|
335047
335209
|
const tableCellExpandedRunsCache = /* @__PURE__ */ new WeakMap;
|
|
335048
335210
|
const renderLineForTableCell = (block, line, ctx$1, lineIndex, isLastLine, resolvedListTextStartPx) => {
|
|
@@ -335091,7 +335253,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
335091
335253
|
applyStyles
|
|
335092
335254
|
});
|
|
335093
335255
|
if (resolvedItem) {
|
|
335094
|
-
this.applyResolvedFragmentFrame(el, resolvedItem, fragment2, context.section);
|
|
335256
|
+
this.applyResolvedFragmentFrame(el, resolvedItem, fragment2, context.section, context.story);
|
|
335095
335257
|
if (sdtBoundary?.widthOverride != null)
|
|
335096
335258
|
el.style.width = `${sdtBoundary.widthOverride}px`;
|
|
335097
335259
|
}
|
|
@@ -336260,27 +336422,29 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
336260
336422
|
}
|
|
336261
336423
|
updateFragmentElement(el, fragment2, section, resolvedItem) {
|
|
336262
336424
|
const fragmentItem = resolvedItem?.kind === "fragment" ? resolvedItem : undefined;
|
|
336425
|
+
const story = resolveSectionStory(section);
|
|
336263
336426
|
if (fragment2.kind === "list-item" && fragmentItem) {
|
|
336264
|
-
this.applyResolvedListItemWrapperFrame(el, fragment2, fragmentItem, section);
|
|
336427
|
+
this.applyResolvedListItemWrapperFrame(el, fragment2, fragmentItem, section, story);
|
|
336265
336428
|
return;
|
|
336266
336429
|
}
|
|
336267
336430
|
if (fragmentItem)
|
|
336268
|
-
this.applyResolvedFragmentFrame(el, fragmentItem, fragment2, section);
|
|
336431
|
+
this.applyResolvedFragmentFrame(el, fragmentItem, fragment2, section, story);
|
|
336269
336432
|
else {
|
|
336270
|
-
this.applyFragmentFrame(el, fragment2, section);
|
|
336433
|
+
this.applyFragmentFrame(el, fragment2, section, story);
|
|
336271
336434
|
if (fragment2.kind === "image" || fragment2.kind === "drawing") {
|
|
336272
336435
|
el.style.height = `${fragment2.height}px`;
|
|
336273
336436
|
this.applyFragmentWrapperZIndex(el, fragment2);
|
|
336274
336437
|
}
|
|
336275
336438
|
}
|
|
336276
336439
|
}
|
|
336277
|
-
applyFragmentFrame(el, fragment2, section) {
|
|
336440
|
+
applyFragmentFrame(el, fragment2, section, story) {
|
|
336278
336441
|
el.style.left = `${fragment2.x}px`;
|
|
336279
336442
|
el.style.top = `${fragment2.y}px`;
|
|
336280
336443
|
el.style.width = `${fragment2.width}px`;
|
|
336281
336444
|
el.dataset.blockId = fragment2.blockId;
|
|
336282
336445
|
el.dataset.layoutEpoch = String(this.layoutEpoch);
|
|
336283
336446
|
applySourceAnchorDataset(el, fragment2.sourceAnchor);
|
|
336447
|
+
applyLayoutIdentityDataset(el, resolveOrBuildFragmentIdentity(fragment2, story ?? resolveSectionStory(section)));
|
|
336284
336448
|
if (typeof fragment2.blockId === "string" && fragment2.blockId.startsWith("footnote-"))
|
|
336285
336449
|
el.setAttribute("contenteditable", "false");
|
|
336286
336450
|
if (fragment2.kind === "para") {
|
|
@@ -336355,20 +336519,24 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
336355
336519
|
applyFragmentWrapperZIndex(el, fragment2, resolvedZIndex) {
|
|
336356
336520
|
el.style.zIndex = this.resolveFragmentWrapperZIndex(fragment2, resolvedZIndex);
|
|
336357
336521
|
}
|
|
336358
|
-
applyResolvedFragmentFrame(el, item, fragment2, section) {
|
|
336522
|
+
applyResolvedFragmentFrame(el, item, fragment2, section, story) {
|
|
336359
336523
|
el.style.left = `${item.x}px`;
|
|
336360
336524
|
el.style.top = `${item.y}px`;
|
|
336361
336525
|
el.style.width = `${item.width}px`;
|
|
336362
336526
|
el.dataset.blockId = item.blockId;
|
|
336363
336527
|
el.dataset.layoutEpoch = String(this.layoutEpoch);
|
|
336364
336528
|
applySourceAnchorDataset(el, item.sourceAnchor);
|
|
336529
|
+
applyLayoutIdentityDataset(el, resolveOrBuildFragmentIdentity(fragment2, story ?? resolveSectionStory(section), item.layoutSourceIdentity ? {
|
|
336530
|
+
...item.layoutSourceIdentity,
|
|
336531
|
+
sourceAnchor: item.sourceAnchor ?? item.layoutSourceIdentity.sourceAnchor
|
|
336532
|
+
} : undefined));
|
|
336365
336533
|
this.applyFragmentWrapperZIndex(el, fragment2, item.zIndex);
|
|
336366
336534
|
if (item.fragmentKind === "image" || item.fragmentKind === "drawing" || item.fragmentKind === "table")
|
|
336367
336535
|
el.style.height = `${item.height}px`;
|
|
336368
336536
|
this.applyFragmentPmAttributes(el, fragment2, section, item);
|
|
336369
336537
|
}
|
|
336370
|
-
applyResolvedListItemWrapperFrame(el, fragment2, item, section) {
|
|
336371
|
-
this.applyResolvedFragmentFrame(el, item, fragment2, section);
|
|
336538
|
+
applyResolvedListItemWrapperFrame(el, fragment2, item, section, story) {
|
|
336539
|
+
this.applyResolvedFragmentFrame(el, item, fragment2, section, story);
|
|
336372
336540
|
const mw = item.markerWidth ?? 0;
|
|
336373
336541
|
el.style.left = `${item.x - mw}px`;
|
|
336374
336542
|
el.style.width = `${item.width + mw}px`;
|
|
@@ -343865,9 +344033,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
343865
344033
|
];
|
|
343866
344034
|
});
|
|
343867
344035
|
|
|
343868
|
-
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-
|
|
344036
|
+
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-naojUqQe.es.js
|
|
343869
344037
|
var MOD_ALIASES, ALT_ALIASES, CTRL_ALIASES, SHIFT_ALIASES, BUILTIN_CONTEXT_MENU_GROUPS, BUILTIN_GROUP_ORDER, RESERVED_PROXY_PROPERTY_NAMES, ALL_TOOLBAR_COMMAND_IDS, EMPTY_ACTIVE_IDS;
|
|
343870
|
-
var
|
|
344038
|
+
var init_create_super_doc_ui_naojUqQe_es = __esm(() => {
|
|
343871
344039
|
init_SuperConverter_CzwJ7ds9_es();
|
|
343872
344040
|
init_create_headless_toolbar_BQTnHkb4_es();
|
|
343873
344041
|
MOD_ALIASES = new Set([
|
|
@@ -343911,7 +344079,7 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
|
|
|
343911
344079
|
|
|
343912
344080
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
343913
344081
|
var init_super_editor_es = __esm(() => {
|
|
343914
|
-
|
|
344082
|
+
init_src_IynDnUzG_es();
|
|
343915
344083
|
init_SuperConverter_CzwJ7ds9_es();
|
|
343916
344084
|
init_jszip_C49i9kUs_es();
|
|
343917
344085
|
init_xml_js_CqGKpaft_es();
|
|
@@ -343920,7 +344088,7 @@ var init_super_editor_es = __esm(() => {
|
|
|
343920
344088
|
init_dist_B8HfvhaK_es();
|
|
343921
344089
|
init_unified_Dsuw2be5_es();
|
|
343922
344090
|
init_DocxZipper_CZMPWpOp_es();
|
|
343923
|
-
|
|
344091
|
+
init_create_super_doc_ui_naojUqQe_es();
|
|
343924
344092
|
init_ui_C5PAS9hY_es();
|
|
343925
344093
|
init_eventemitter3_BnGqBE_Q_es();
|
|
343926
344094
|
init_errors_CNaD6vcg_es();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/cli",
|
|
3
|
-
"version": "0.11.0-next.
|
|
3
|
+
"version": "0.11.0-next.19",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -25,20 +25,20 @@
|
|
|
25
25
|
"@types/ws": "^8.5.13",
|
|
26
26
|
"typescript": "^5.9.2",
|
|
27
27
|
"@superdoc/document-api": "0.0.1",
|
|
28
|
+
"@superdoc/super-editor": "0.0.1",
|
|
28
29
|
"@superdoc/pm-adapter": "0.0.0",
|
|
29
|
-
"superdoc": "1.33.1"
|
|
30
|
-
"@superdoc/super-editor": "0.0.1"
|
|
30
|
+
"superdoc": "1.33.1"
|
|
31
31
|
},
|
|
32
32
|
"module": "src/index.ts",
|
|
33
33
|
"publishConfig": {
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
36
|
"optionalDependencies": {
|
|
37
|
-
"@superdoc-dev/cli-darwin-arm64": "0.11.0-next.
|
|
38
|
-
"@superdoc-dev/cli-
|
|
39
|
-
"@superdoc-dev/cli-
|
|
40
|
-
"@superdoc-dev/cli-
|
|
41
|
-
"@superdoc-dev/cli-linux-arm64": "0.11.0-next.
|
|
37
|
+
"@superdoc-dev/cli-darwin-arm64": "0.11.0-next.19",
|
|
38
|
+
"@superdoc-dev/cli-linux-x64": "0.11.0-next.19",
|
|
39
|
+
"@superdoc-dev/cli-windows-x64": "0.11.0-next.19",
|
|
40
|
+
"@superdoc-dev/cli-darwin-x64": "0.11.0-next.19",
|
|
41
|
+
"@superdoc-dev/cli-linux-arm64": "0.11.0-next.19"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"predev": "node scripts/ensure-superdoc-build.js",
|