@superdoc-dev/cli 0.17.0-next.1 → 0.17.0-next.3
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 +83 -25
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -68327,7 +68327,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
|
|
|
68327
68327
|
emptyOptions2 = {};
|
|
68328
68328
|
});
|
|
68329
68329
|
|
|
68330
|
-
// ../../packages/superdoc/dist/chunks/SuperConverter-
|
|
68330
|
+
// ../../packages/superdoc/dist/chunks/SuperConverter-CfRQprW6.es.js
|
|
68331
68331
|
function getExtensionConfigField(extension$1, field, context = { name: "" }) {
|
|
68332
68332
|
const fieldValue = extension$1.config[field];
|
|
68333
68333
|
if (typeof fieldValue === "function")
|
|
@@ -102470,13 +102470,16 @@ function isSettled(status) {
|
|
|
102470
102470
|
function normalizeFamilyName(name) {
|
|
102471
102471
|
return name.trim().replace(/^['"]+|['"]+$/g, "").trim().toLowerCase();
|
|
102472
102472
|
}
|
|
102473
|
-
function buildFallback(row, physicalFamily) {
|
|
102473
|
+
function buildFallback(row, physicalFamily, verdict, faceSlot) {
|
|
102474
|
+
const glyphExceptions = faceSlot ? row.glyphExceptions?.filter((g2) => g2.slot === faceSlot) : row.glyphExceptions ? [...row.glyphExceptions] : undefined;
|
|
102474
102475
|
return {
|
|
102475
102476
|
substituteFamily: physicalFamily,
|
|
102476
102477
|
policyAction: row.policyAction,
|
|
102477
|
-
verdict
|
|
102478
|
-
lineBreakSafe: LINE_BREAK_SAFE_VERDICTS.has(
|
|
102479
|
-
|
|
102478
|
+
verdict,
|
|
102479
|
+
lineBreakSafe: LINE_BREAK_SAFE_VERDICTS.has(verdict),
|
|
102480
|
+
faces: row.faces,
|
|
102481
|
+
evidenceId: row.evidenceId,
|
|
102482
|
+
...glyphExceptions && glyphExceptions.length > 0 ? { glyphExceptions } : {}
|
|
102480
102483
|
};
|
|
102481
102484
|
}
|
|
102482
102485
|
function decideRow(row, canRenderFamily$1) {
|
|
@@ -102505,7 +102508,27 @@ function decideRow(row, canRenderFamily$1) {
|
|
|
102505
102508
|
};
|
|
102506
102509
|
return {
|
|
102507
102510
|
kind: "fallback",
|
|
102508
|
-
fallback: buildFallback(row, physicalFamily)
|
|
102511
|
+
fallback: buildFallback(row, physicalFamily, verdict)
|
|
102512
|
+
};
|
|
102513
|
+
}
|
|
102514
|
+
function isFaceScoped(row) {
|
|
102515
|
+
const f2 = row.faces;
|
|
102516
|
+
return f2.regular || f2.bold || f2.italic || f2.boldItalic;
|
|
102517
|
+
}
|
|
102518
|
+
function decideRowForFace(row, face, canRenderFamily$1) {
|
|
102519
|
+
const base$1 = decideRow(row, canRenderFamily$1);
|
|
102520
|
+
if (base$1.kind !== "fallback")
|
|
102521
|
+
return base$1;
|
|
102522
|
+
if (isFaceScoped(row) && !row.faces[face])
|
|
102523
|
+
return {
|
|
102524
|
+
kind: "face_missing",
|
|
102525
|
+
substituteFamily: base$1.fallback.substituteFamily,
|
|
102526
|
+
evidenceId: row.evidenceId
|
|
102527
|
+
};
|
|
102528
|
+
const faceVerdict = row.faceVerdicts?.[face] ?? row.verdict;
|
|
102529
|
+
return {
|
|
102530
|
+
kind: "fallback",
|
|
102531
|
+
fallback: buildFallback(row, base$1.fallback.substituteFamily, faceVerdict, face)
|
|
102509
102532
|
};
|
|
102510
102533
|
}
|
|
102511
102534
|
function getFallbackDecision(family$1, options = {}) {
|
|
@@ -102516,6 +102539,14 @@ function getRenderableFallback(family$1, options) {
|
|
|
102516
102539
|
const decision = getFallbackDecision(family$1, options);
|
|
102517
102540
|
return decision.kind === "fallback" ? decision.fallback : null;
|
|
102518
102541
|
}
|
|
102542
|
+
function getFallbackDecisionForFace(family$1, face, options = {}) {
|
|
102543
|
+
const row = BY_LOGICAL.get(normalizeFamilyName(family$1));
|
|
102544
|
+
return row ? decideRowForFace(row, face, options.canRenderFamily) : { kind: "unknown" };
|
|
102545
|
+
}
|
|
102546
|
+
function getRenderableFallbackForFace(family$1, face, options) {
|
|
102547
|
+
const decision = getFallbackDecisionForFace(family$1, face, options);
|
|
102548
|
+
return decision.kind === "fallback" ? decision.fallback : null;
|
|
102549
|
+
}
|
|
102519
102550
|
function fourFaces(filePrefix) {
|
|
102520
102551
|
return [
|
|
102521
102552
|
{
|
|
@@ -102646,6 +102677,17 @@ function installBundledSubstitutes(registry, options = {}) {
|
|
|
102646
102677
|
});
|
|
102647
102678
|
}
|
|
102648
102679
|
}
|
|
102680
|
+
function toEvidence(fallback) {
|
|
102681
|
+
if (!fallback)
|
|
102682
|
+
return;
|
|
102683
|
+
return {
|
|
102684
|
+
evidenceId: fallback.evidenceId,
|
|
102685
|
+
policyAction: fallback.policyAction,
|
|
102686
|
+
verdict: fallback.verdict,
|
|
102687
|
+
lineBreakSafe: fallback.lineBreakSafe,
|
|
102688
|
+
...fallback.glyphExceptions ? { glyphExceptions: fallback.glyphExceptions } : {}
|
|
102689
|
+
};
|
|
102690
|
+
}
|
|
102649
102691
|
function buildFontReport(logicalFamilies, registry, resolver$1) {
|
|
102650
102692
|
const seen = /* @__PURE__ */ new Set;
|
|
102651
102693
|
const report = [];
|
|
@@ -102655,13 +102697,15 @@ function buildFontReport(logicalFamilies, registry, resolver$1) {
|
|
|
102655
102697
|
seen.add(logical);
|
|
102656
102698
|
const { physicalFamily, reason } = resolver$1 ? resolver$1.resolveFontFamily(logical) : resolveFontFamily(logical);
|
|
102657
102699
|
const loadStatus = registry.getStatus(physicalFamily);
|
|
102700
|
+
const evidence = isRenderedSubstitute(reason) ? toEvidence(getRenderableFallback(logical, RENDER_ALL)) : undefined;
|
|
102658
102701
|
report.push({
|
|
102659
102702
|
logicalFamily: logical,
|
|
102660
102703
|
physicalFamily,
|
|
102661
102704
|
reason,
|
|
102662
102705
|
loadStatus,
|
|
102663
102706
|
exportFamily: logical,
|
|
102664
|
-
missing: reason === "category_fallback" || isSettled(loadStatus) && loadStatus !== "loaded"
|
|
102707
|
+
missing: reason === "category_fallback" || isSettled(loadStatus) && loadStatus !== "loaded",
|
|
102708
|
+
...evidence ? { evidence } : {}
|
|
102665
102709
|
});
|
|
102666
102710
|
}
|
|
102667
102711
|
return report;
|
|
@@ -102688,6 +102732,7 @@ function buildFaceReport(usedFaces, registry, resolver$1) {
|
|
|
102688
102732
|
style
|
|
102689
102733
|
});
|
|
102690
102734
|
const missing = reason === "fallback_face_absent" || reason === "category_fallback" || isSettled(loadStatus) && loadStatus !== "loaded";
|
|
102735
|
+
const evidence = isRenderedSubstitute(reason) ? toEvidence(getRenderableFallbackForFace(logicalFamily, faceSlotFor(face), RENDER_ALL)) : undefined;
|
|
102691
102736
|
report.push({
|
|
102692
102737
|
logicalFamily,
|
|
102693
102738
|
physicalFamily: reason === "registered_face" ? logicalFamily : physicalFamily,
|
|
@@ -102695,7 +102740,8 @@ function buildFaceReport(usedFaces, registry, resolver$1) {
|
|
|
102695
102740
|
loadStatus,
|
|
102696
102741
|
exportFamily: logicalFamily,
|
|
102697
102742
|
missing,
|
|
102698
|
-
face
|
|
102743
|
+
face,
|
|
102744
|
+
...evidence ? { evidence } : {}
|
|
102699
102745
|
});
|
|
102700
102746
|
}
|
|
102701
102747
|
return report;
|
|
@@ -129787,7 +129833,17 @@ var isRegExp = (value) => {
|
|
|
129787
129833
|
out.add(this.resolvePrimaryPhysicalFamily(family$1));
|
|
129788
129834
|
return [...out];
|
|
129789
129835
|
}
|
|
129790
|
-
}, defaultResolver, DEFAULT_FONT_MEASURE_CONTEXT, fontConfigVersion = 0, defaultAssetBase = "/fonts/", installedRegistries,
|
|
129836
|
+
}, defaultResolver, DEFAULT_FONT_MEASURE_CONTEXT, fontConfigVersion = 0, defaultAssetBase = "/fonts/", installedRegistries, faceSlotFor = ({ weight, style }) => {
|
|
129837
|
+
const bold2 = weight === "700";
|
|
129838
|
+
const italic = style === "italic";
|
|
129839
|
+
if (bold2 && italic)
|
|
129840
|
+
return "boldItalic";
|
|
129841
|
+
if (bold2)
|
|
129842
|
+
return "bold";
|
|
129843
|
+
if (italic)
|
|
129844
|
+
return "italic";
|
|
129845
|
+
return "regular";
|
|
129846
|
+
}, isRenderedSubstitute = (reason) => reason === "bundled_substitute" || reason === "category_fallback", RENDER_ALL, FS_TYPE_RESTRICTED = 2, FS_SELECTION_ITALIC = 1, BOLD_WEIGHT_THRESHOLD = 600, SFNT_TABLE_DIR_OFFSET = 12, SFNT_TABLE_RECORD_SIZE = 16, OS2_USWEIGHTCLASS = 4, OS2_FSTYPE = 8, OS2_FSSELECTION = 62, OS2_MIN_LENGTH, DEFAULT_FONT_LOAD_TIMEOUT_MS = 3000, DEFAULT_PROBE_SIZE = "16px", FontRegistry = class {
|
|
129791
129847
|
#fontSet;
|
|
129792
129848
|
#FontFaceCtor;
|
|
129793
129849
|
#probeSize;
|
|
@@ -134104,7 +134160,7 @@ var isRegExp = (value) => {
|
|
|
134104
134160
|
state.kern = kernNode.attributes["w:val"];
|
|
134105
134161
|
}
|
|
134106
134162
|
}, SuperConverter;
|
|
134107
|
-
var
|
|
134163
|
+
var init_SuperConverter_CfRQprW6_es = __esm(() => {
|
|
134108
134164
|
init_rolldown_runtime_Bg48TavK_es();
|
|
134109
134165
|
init_jszip_C49i9kUs_es();
|
|
134110
134166
|
init_xml_js_CqGKpaft_es();
|
|
@@ -172047,6 +172103,7 @@ var init_SuperConverter_C6RGktKO_es = __esm(() => {
|
|
|
172047
172103
|
fontSignature: ""
|
|
172048
172104
|
});
|
|
172049
172105
|
installedRegistries = /* @__PURE__ */ new WeakMap;
|
|
172106
|
+
RENDER_ALL = { canRenderFamily: () => true };
|
|
172050
172107
|
OS2_MIN_LENGTH = OS2_FSSELECTION + 2;
|
|
172051
172108
|
registriesByFontSet = /* @__PURE__ */ new WeakMap;
|
|
172052
172109
|
PHYSICAL_GENERIC = Object.freeze({
|
|
@@ -173851,7 +173908,7 @@ var init_SuperConverter_C6RGktKO_es = __esm(() => {
|
|
|
173851
173908
|
};
|
|
173852
173909
|
});
|
|
173853
173910
|
|
|
173854
|
-
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-
|
|
173911
|
+
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-DOEFHsWP.es.js
|
|
173855
173912
|
function parseSizeUnit(val = "0") {
|
|
173856
173913
|
const length3 = val.toString() || "0";
|
|
173857
173914
|
const value = Number.parseFloat(length3);
|
|
@@ -184209,8 +184266,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
|
|
|
184209
184266
|
}
|
|
184210
184267
|
};
|
|
184211
184268
|
};
|
|
184212
|
-
var
|
|
184213
|
-
|
|
184269
|
+
var init_create_headless_toolbar_DOEFHsWP_es = __esm(() => {
|
|
184270
|
+
init_SuperConverter_CfRQprW6_es();
|
|
184214
184271
|
init_uuid_B2wVPhPi_es();
|
|
184215
184272
|
init_constants_D9qj59G2_es();
|
|
184216
184273
|
init_dist_B8HfvhaK_es();
|
|
@@ -233373,7 +233430,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
233373
233430
|
init_remark_gfm_BhnWr3yf_es();
|
|
233374
233431
|
});
|
|
233375
233432
|
|
|
233376
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
233433
|
+
// ../../packages/superdoc/dist/chunks/src-CDxARMZD.es.js
|
|
233377
233434
|
function deleteProps(obj, propOrProps) {
|
|
233378
233435
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
233379
233436
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -330704,13 +330761,13 @@ menclose::after {
|
|
|
330704
330761
|
return;
|
|
330705
330762
|
console.log(...args$1);
|
|
330706
330763
|
}, 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, TRACKED_MARK_NAMES;
|
|
330707
|
-
var
|
|
330764
|
+
var init_src_CDxARMZD_es = __esm(() => {
|
|
330708
330765
|
init_rolldown_runtime_Bg48TavK_es();
|
|
330709
|
-
|
|
330766
|
+
init_SuperConverter_CfRQprW6_es();
|
|
330710
330767
|
init_jszip_C49i9kUs_es();
|
|
330711
330768
|
init_xml_js_CqGKpaft_es();
|
|
330712
330769
|
init_uuid_B2wVPhPi_es();
|
|
330713
|
-
|
|
330770
|
+
init_create_headless_toolbar_DOEFHsWP_es();
|
|
330714
330771
|
init_constants_D9qj59G2_es();
|
|
330715
330772
|
init_dist_B8HfvhaK_es();
|
|
330716
330773
|
init_unified_Dsuw2be5_es();
|
|
@@ -357087,6 +357144,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
357087
357144
|
editor: this
|
|
357088
357145
|
});
|
|
357089
357146
|
console.error(err);
|
|
357147
|
+
throw err;
|
|
357090
357148
|
}
|
|
357091
357149
|
}
|
|
357092
357150
|
#endCollaboration() {
|
|
@@ -365614,11 +365672,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
365614
365672
|
]);
|
|
365615
365673
|
});
|
|
365616
365674
|
|
|
365617
|
-
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-
|
|
365675
|
+
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-CanMzNxA.es.js
|
|
365618
365676
|
var headlessToolbarConstants, 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;
|
|
365619
|
-
var
|
|
365620
|
-
|
|
365621
|
-
|
|
365677
|
+
var init_create_super_doc_ui_CanMzNxA_es = __esm(() => {
|
|
365678
|
+
init_SuperConverter_CfRQprW6_es();
|
|
365679
|
+
init_create_headless_toolbar_DOEFHsWP_es();
|
|
365622
365680
|
headlessToolbarConstants = {
|
|
365623
365681
|
DEFAULT_TEXT_ALIGN_OPTIONS: [
|
|
365624
365682
|
{
|
|
@@ -365900,16 +365958,16 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
|
|
|
365900
365958
|
|
|
365901
365959
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
365902
365960
|
var init_super_editor_es = __esm(() => {
|
|
365903
|
-
|
|
365904
|
-
|
|
365961
|
+
init_src_CDxARMZD_es();
|
|
365962
|
+
init_SuperConverter_CfRQprW6_es();
|
|
365905
365963
|
init_jszip_C49i9kUs_es();
|
|
365906
365964
|
init_xml_js_CqGKpaft_es();
|
|
365907
|
-
|
|
365965
|
+
init_create_headless_toolbar_DOEFHsWP_es();
|
|
365908
365966
|
init_constants_D9qj59G2_es();
|
|
365909
365967
|
init_dist_B8HfvhaK_es();
|
|
365910
365968
|
init_unified_Dsuw2be5_es();
|
|
365911
365969
|
init_DocxZipper_FUsfThjV_es();
|
|
365912
|
-
|
|
365970
|
+
init_create_super_doc_ui_CanMzNxA_es();
|
|
365913
365971
|
init_ui_C5PAS9hY_es();
|
|
365914
365972
|
init_eventemitter3_BnGqBE_Q_es();
|
|
365915
365973
|
init_errors_CNaD6vcg_es();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/cli",
|
|
3
|
-
"version": "0.17.0-next.
|
|
3
|
+
"version": "0.17.0-next.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
35
|
"optionalDependencies": {
|
|
36
|
-
"@superdoc-dev/cli-darwin-x64": "0.17.0-next.
|
|
37
|
-
"@superdoc-dev/cli-darwin-arm64": "0.17.0-next.
|
|
38
|
-
"@superdoc-dev/cli-linux-x64": "0.17.0-next.
|
|
39
|
-
"@superdoc-dev/cli-
|
|
40
|
-
"@superdoc-dev/cli-
|
|
36
|
+
"@superdoc-dev/cli-darwin-x64": "0.17.0-next.3",
|
|
37
|
+
"@superdoc-dev/cli-darwin-arm64": "0.17.0-next.3",
|
|
38
|
+
"@superdoc-dev/cli-linux-x64": "0.17.0-next.3",
|
|
39
|
+
"@superdoc-dev/cli-linux-arm64": "0.17.0-next.3",
|
|
40
|
+
"@superdoc-dev/cli-windows-x64": "0.17.0-next.3"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"predev": "node scripts/ensure-superdoc-build.js",
|