@turntrout/subfont 1.7.1 → 1.8.0
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/CLAUDE.md +39 -13
- package/README.md +24 -14
- package/lib/FontTracerPool.d.ts +1 -0
- package/lib/FontTracerPool.d.ts.map +1 -1
- package/lib/FontTracerPool.js +46 -24
- package/lib/FontTracerPool.js.map +1 -1
- package/lib/HeadlessBrowser.d.ts +18 -0
- package/lib/HeadlessBrowser.d.ts.map +1 -0
- package/lib/HeadlessBrowser.js +216 -210
- package/lib/HeadlessBrowser.js.map +1 -0
- package/lib/codepointMaps.d.ts +4 -0
- package/lib/codepointMaps.d.ts.map +1 -0
- package/lib/codepointMaps.js +99 -0
- package/lib/codepointMaps.js.map +1 -0
- package/lib/collectFeatureGlyphIds.d.ts +3 -0
- package/lib/collectFeatureGlyphIds.d.ts.map +1 -0
- package/lib/collectFeatureGlyphIds.js +124 -138
- package/lib/collectFeatureGlyphIds.js.map +1 -0
- package/lib/collectTextsByPage.d.ts +41 -0
- package/lib/collectTextsByPage.d.ts.map +1 -0
- package/lib/collectTextsByPage.js +726 -965
- package/lib/collectTextsByPage.js.map +1 -0
- package/lib/concurrencyLimit.d.ts +3 -0
- package/lib/concurrencyLimit.d.ts.map +1 -0
- package/lib/concurrencyLimit.js +12 -11
- package/lib/concurrencyLimit.js.map +1 -0
- package/lib/escapeJsStringLiteral.d.ts +3 -0
- package/lib/escapeJsStringLiteral.d.ts.map +1 -0
- package/lib/escapeJsStringLiteral.js +7 -6
- package/lib/escapeJsStringLiteral.js.map +1 -0
- package/lib/extractReferencedCustomPropertyNames.d.ts +3 -0
- package/lib/extractReferencedCustomPropertyNames.d.ts.map +1 -0
- package/lib/extractReferencedCustomPropertyNames.js +15 -16
- package/lib/extractReferencedCustomPropertyNames.js.map +1 -0
- package/lib/extractVisibleText.d.ts +7 -0
- package/lib/extractVisibleText.d.ts.map +1 -0
- package/lib/extractVisibleText.js +110 -119
- package/lib/extractVisibleText.js.map +1 -0
- package/lib/findCustomPropertyDefinitions.d.ts +8 -0
- package/lib/findCustomPropertyDefinitions.d.ts.map +1 -0
- package/lib/findCustomPropertyDefinitions.js +41 -48
- package/lib/findCustomPropertyDefinitions.js.map +1 -0
- package/lib/fontConverter.d.ts +2 -0
- package/lib/fontConverter.d.ts.map +1 -0
- package/lib/fontConverter.js +40 -21
- package/lib/fontConverter.js.map +1 -0
- package/lib/fontConverterWorker.d.ts +2 -0
- package/lib/fontConverterWorker.d.ts.map +1 -0
- package/lib/fontConverterWorker.js +52 -15
- package/lib/fontConverterWorker.js.map +1 -0
- package/lib/fontFaceHelpers.d.ts +64 -0
- package/lib/fontFaceHelpers.d.ts.map +1 -0
- package/lib/fontFaceHelpers.js +237 -249
- package/lib/fontFaceHelpers.js.map +1 -0
- package/lib/fontFeatureHelpers.d.ts +30 -0
- package/lib/fontFeatureHelpers.d.ts.map +1 -0
- package/lib/fontFeatureHelpers.js +277 -212
- package/lib/fontFeatureHelpers.js.map +1 -0
- package/lib/fontTracerWorker.d.ts +11 -0
- package/lib/fontTracerWorker.d.ts.map +1 -0
- package/lib/fontTracerWorker.js +94 -60
- package/lib/fontTracerWorker.js.map +1 -0
- package/lib/gatherStylesheetsWithPredicates.d.ts +26 -0
- package/lib/gatherStylesheetsWithPredicates.d.ts.map +1 -0
- package/lib/gatherStylesheetsWithPredicates.js +75 -84
- package/lib/gatherStylesheetsWithPredicates.js.map +1 -0
- package/lib/getCssRulesByProperty.d.ts +29 -0
- package/lib/getCssRulesByProperty.d.ts.map +1 -0
- package/lib/getCssRulesByProperty.js +316 -316
- package/lib/getCssRulesByProperty.js.map +1 -0
- package/lib/getFontInfo.d.ts +11 -0
- package/lib/getFontInfo.d.ts.map +1 -0
- package/lib/getFontInfo.js +31 -33
- package/lib/getFontInfo.js.map +1 -0
- package/lib/initialValueByProp.d.ts +3 -0
- package/lib/initialValueByProp.d.ts.map +1 -0
- package/lib/initialValueByProp.js +20 -17
- package/lib/initialValueByProp.js.map +1 -0
- package/lib/injectSubsetDefinitions.d.ts +3 -0
- package/lib/injectSubsetDefinitions.d.ts.map +1 -0
- package/lib/injectSubsetDefinitions.js +55 -59
- package/lib/injectSubsetDefinitions.js.map +1 -0
- package/lib/normalizeFontPropertyValue.d.ts +3 -0
- package/lib/normalizeFontPropertyValue.d.ts.map +1 -0
- package/lib/normalizeFontPropertyValue.js +59 -54
- package/lib/normalizeFontPropertyValue.js.map +1 -0
- package/lib/parseCommandLineOptions.d.ts +9 -0
- package/lib/parseCommandLineOptions.d.ts.map +1 -0
- package/lib/parseCommandLineOptions.js +145 -149
- package/lib/parseCommandLineOptions.js.map +1 -0
- package/lib/parseFontVariationSettings.d.ts +3 -0
- package/lib/parseFontVariationSettings.d.ts.map +1 -0
- package/lib/parseFontVariationSettings.js +38 -36
- package/lib/parseFontVariationSettings.js.map +1 -0
- package/lib/progress.d.ts +27 -0
- package/lib/progress.d.ts.map +1 -0
- package/lib/progress.js +51 -54
- package/lib/progress.js.map +1 -0
- package/lib/sfntCache.d.ts +4 -0
- package/lib/sfntCache.d.ts.map +1 -0
- package/lib/sfntCache.js +67 -25
- package/lib/sfntCache.js.map +1 -0
- package/lib/stripLocalTokens.d.ts +3 -0
- package/lib/stripLocalTokens.d.ts.map +1 -0
- package/lib/stripLocalTokens.js +23 -21
- package/lib/stripLocalTokens.js.map +1 -0
- package/lib/subfont.d.ts +22 -1
- package/lib/subfont.d.ts.map +1 -1
- package/lib/subfont.js +7 -6
- package/lib/subfont.js.map +1 -1
- package/lib/subsetFontWithGlyphs.d.ts +4 -0
- package/lib/subsetFontWithGlyphs.d.ts.map +1 -1
- package/lib/subsetFontWithGlyphs.js +73 -14
- package/lib/subsetFontWithGlyphs.js.map +1 -1
- package/lib/subsetFonts.d.ts +1 -5
- package/lib/subsetFonts.d.ts.map +1 -1
- package/lib/subsetFonts.js +18 -17
- package/lib/subsetFonts.js.map +1 -1
- package/lib/subsetGeneration.d.ts +3 -6
- package/lib/subsetGeneration.d.ts.map +1 -1
- package/lib/subsetGeneration.js +42 -9
- package/lib/subsetGeneration.js.map +1 -1
- package/lib/types/shared.d.ts +11 -0
- package/lib/types/shared.d.ts.map +1 -0
- package/lib/types/shared.js +3 -0
- package/lib/types/shared.js.map +1 -0
- package/lib/unicodeRange.d.ts +3 -0
- package/lib/unicodeRange.d.ts.map +1 -0
- package/lib/unicodeRange.js +17 -30
- package/lib/unicodeRange.js.map +1 -0
- package/lib/unquote.d.ts +3 -0
- package/lib/unquote.d.ts.map +1 -0
- package/lib/unquote.js +18 -25
- package/lib/unquote.js.map +1 -0
- package/lib/variationAxes.d.ts +33 -0
- package/lib/variationAxes.d.ts.map +1 -0
- package/lib/variationAxes.js +127 -157
- package/lib/variationAxes.js.map +1 -0
- package/lib/warnAboutMissingGlyphs.d.ts +43 -0
- package/lib/warnAboutMissingGlyphs.d.ts.map +1 -0
- package/lib/warnAboutMissingGlyphs.js +139 -147
- package/lib/warnAboutMissingGlyphs.js.map +1 -0
- package/lib/wasmQueue.d.ts +3 -0
- package/lib/wasmQueue.d.ts.map +1 -0
- package/lib/wasmQueue.js +13 -10
- package/lib/wasmQueue.js.map +1 -0
- package/package.json +3 -2
|
@@ -1,150 +1,146 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
'
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
'Async-load the full original font as a fallback for dynamic content. Disable with --no-fallbacks',
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
const os = require("os");
|
|
3
|
+
// yargs is exported as a callable/chainable singleton; the typings only
|
|
4
|
+
// expose half of that shape, so this union (and the cast below) keeps the
|
|
5
|
+
// runtime API ergonomics without leaking `unknown` everywhere.
|
|
6
|
+
const yargsModule = require("yargs");
|
|
7
|
+
const concurrencyLimit_1 = require("./concurrencyLimit");
|
|
8
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
9
|
+
const yargsLib = yargsModule;
|
|
10
|
+
function parseCommandLineOptions(argv) {
|
|
11
|
+
let y = yargsLib;
|
|
12
|
+
if (argv) {
|
|
13
|
+
y = yargsLib(argv);
|
|
14
|
+
}
|
|
15
|
+
const maxConcurrency = (0, concurrencyLimit_1.getMaxConcurrency)();
|
|
16
|
+
const { version } = require('../package.json');
|
|
17
|
+
y.usage('Create optimal font subsets from your actual font usage.\n$0 [options] <htmlFile(s) | url(s)>')
|
|
18
|
+
.version(version)
|
|
19
|
+
.options('root', {
|
|
20
|
+
describe: 'Path to your web root (will be deduced from your input files if not specified)',
|
|
21
|
+
type: 'string',
|
|
22
|
+
})
|
|
23
|
+
.options('canonical-root', {
|
|
24
|
+
describe: 'URI root where the site will be deployed. Must be either an absolute, a protocol-relative, or a root-relative url',
|
|
25
|
+
type: 'string',
|
|
26
|
+
})
|
|
27
|
+
.options('output', {
|
|
28
|
+
alias: 'o',
|
|
29
|
+
describe: 'Directory where results should be written to',
|
|
30
|
+
type: 'string',
|
|
31
|
+
})
|
|
32
|
+
.options('text', {
|
|
33
|
+
describe: 'Additional characters to include in the subset for every @font-face found on the page',
|
|
34
|
+
type: 'string',
|
|
35
|
+
})
|
|
36
|
+
.options('fallbacks', {
|
|
37
|
+
describe: 'Async-load the full original font as a fallback for dynamic content. Disable with --no-fallbacks',
|
|
38
|
+
type: 'boolean',
|
|
39
|
+
default: true,
|
|
40
|
+
})
|
|
41
|
+
.options('dynamic', {
|
|
42
|
+
describe: 'Also trace the usage of fonts in a headless browser with JavaScript enabled',
|
|
43
|
+
type: 'boolean',
|
|
44
|
+
default: false,
|
|
45
|
+
})
|
|
46
|
+
.options('in-place', {
|
|
47
|
+
alias: 'i',
|
|
48
|
+
describe: 'Modify HTML-files in-place. Only use on build artifacts',
|
|
49
|
+
type: 'boolean',
|
|
50
|
+
default: false,
|
|
51
|
+
})
|
|
52
|
+
.options('inline-css', {
|
|
53
|
+
describe: 'Inline CSS that declares the @font-face for the subset fonts',
|
|
54
|
+
type: 'boolean',
|
|
55
|
+
default: false,
|
|
56
|
+
})
|
|
57
|
+
.options('font-display', {
|
|
58
|
+
describe: 'Injects a font-display value into the @font-face CSS',
|
|
59
|
+
type: 'string',
|
|
60
|
+
default: 'swap',
|
|
61
|
+
choices: ['auto', 'block', 'swap', 'fallback', 'optional'],
|
|
62
|
+
})
|
|
63
|
+
.options('recursive', {
|
|
64
|
+
alias: 'r',
|
|
65
|
+
describe: 'Crawl all HTML-pages linked with relative and root relative links. This stays inside your domain',
|
|
66
|
+
type: 'boolean',
|
|
67
|
+
default: false,
|
|
68
|
+
})
|
|
69
|
+
.options('relative-urls', {
|
|
70
|
+
describe: 'Issue relative urls instead of root-relative ones',
|
|
71
|
+
type: 'boolean',
|
|
72
|
+
default: false,
|
|
73
|
+
})
|
|
74
|
+
.options('silent', {
|
|
75
|
+
alias: 's',
|
|
76
|
+
describe: `Do not write anything to stdout`,
|
|
77
|
+
type: 'boolean',
|
|
78
|
+
default: false,
|
|
79
|
+
})
|
|
80
|
+
.options('debug', {
|
|
81
|
+
alias: 'd',
|
|
82
|
+
describe: 'Verbose insights into font glyph detection',
|
|
83
|
+
type: 'boolean',
|
|
84
|
+
default: false,
|
|
85
|
+
})
|
|
86
|
+
.options('dry-run', {
|
|
87
|
+
describe: `Don't write anything to disk. Shows a preview of files, sizes, and CSS changes that would be made`,
|
|
88
|
+
type: 'boolean',
|
|
89
|
+
default: false,
|
|
90
|
+
})
|
|
91
|
+
.options('cache', {
|
|
92
|
+
describe: 'Enable disk caching of subset font results between runs. Pass a directory path or use without a value for the default .subfont-cache directory',
|
|
93
|
+
type: 'string',
|
|
94
|
+
default: false,
|
|
95
|
+
coerce(val) {
|
|
96
|
+
if (val === '' || val === true)
|
|
97
|
+
return true;
|
|
98
|
+
return val;
|
|
99
|
+
},
|
|
100
|
+
})
|
|
101
|
+
.options('chrome-flags', {
|
|
102
|
+
alias: ['chromeFlags'],
|
|
103
|
+
describe: 'Custom flags to pass to the Chrome/Chromium browser for dynamic tracing (comma-separated)',
|
|
104
|
+
type: 'string',
|
|
105
|
+
coerce(flags) {
|
|
106
|
+
if (!flags)
|
|
107
|
+
return [];
|
|
108
|
+
return flags.split(',').map((f) => f.trim());
|
|
109
|
+
},
|
|
110
|
+
})
|
|
111
|
+
.options('concurrency', {
|
|
112
|
+
describe: `Maximum number of worker threads for parallel font tracing. Defaults to the number of CPU cores (max 8). Upper bound: ${maxConcurrency} (based on free memory and CPU count)`,
|
|
113
|
+
type: 'number',
|
|
114
|
+
})
|
|
115
|
+
.check((argv) => {
|
|
116
|
+
if (argv.concurrency !== undefined) {
|
|
117
|
+
if (!Number.isInteger(argv.concurrency) || argv.concurrency < 1) {
|
|
118
|
+
throw new Error('--concurrency must be a positive integer');
|
|
119
|
+
}
|
|
120
|
+
if (argv.concurrency > maxConcurrency) {
|
|
121
|
+
throw new Error(`--concurrency must not exceed ${maxConcurrency} (each worker uses ~50 MB; ${Math.round(os.freemem() / (1024 * 1024 * 1024))} GB free, ${os.cpus().length} CPUs)`);
|
|
122
|
+
}
|
|
121
123
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
.
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
return {
|
|
146
|
-
yargs,
|
|
147
|
-
inputFiles,
|
|
148
|
-
...rest,
|
|
149
|
-
};
|
|
150
|
-
};
|
|
124
|
+
return true;
|
|
125
|
+
})
|
|
126
|
+
.options('source-maps', {
|
|
127
|
+
describe: 'Preserve CSS source maps through subfont processing',
|
|
128
|
+
type: 'boolean',
|
|
129
|
+
default: false,
|
|
130
|
+
})
|
|
131
|
+
.options('strict', {
|
|
132
|
+
describe: 'Exit with a non-zero status code if any warnings are emitted during the run',
|
|
133
|
+
type: 'boolean',
|
|
134
|
+
default: false,
|
|
135
|
+
})
|
|
136
|
+
.wrap(yargsLib.terminalWidth());
|
|
137
|
+
const parsed = y.argv;
|
|
138
|
+
const { _: inputFiles, ...rest } = parsed;
|
|
139
|
+
return {
|
|
140
|
+
yargs: y,
|
|
141
|
+
inputFiles,
|
|
142
|
+
...rest,
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
module.exports = parseCommandLineOptions;
|
|
146
|
+
//# sourceMappingURL=parseCommandLineOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseCommandLineOptions.js","sourceRoot":"","sources":["../src/parseCommandLineOptions.ts"],"names":[],"mappings":";AAAA,yBAA0B;AAC1B,wEAAwE;AACxE,0EAA0E;AAC1E,+DAA+D;AAC/D,qCAAsC;AAEtC,yDAAuD;AAMvD,gDAAgD;AAChD,MAAM,QAAQ,GAAG,WAAkC,CAAC;AAWpD,SAAS,uBAAuB,CAAC,IAAe;IAC9C,IAAI,CAAC,GAAS,QAAQ,CAAC;IACvB,IAAI,IAAI,EAAE,CAAC;QACT,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IACrB,CAAC;IAED,MAAM,cAAc,GAAG,IAAA,oCAAiB,GAAE,CAAC;IAE3C,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAE/C,CAAC,CAAC,KAAK,CACL,+FAA+F,CAChG;SACE,OAAO,CAAC,OAAO,CAAC;SAChB,OAAO,CAAC,MAAM,EAAE;QACf,QAAQ,EACN,gFAAgF;QAClF,IAAI,EAAE,QAAQ;KACf,CAAC;SACD,OAAO,CAAC,gBAAgB,EAAE;QACzB,QAAQ,EACN,mHAAmH;QACrH,I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-1,39 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
switch (state) {
|
|
11
|
-
case 'BEFORE_AXIS_NAME': {
|
|
12
|
-
if (token.type !== 'string') {
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
axisName = token.value;
|
|
16
|
-
state = 'AFTER_AXIS_NAME';
|
|
17
|
-
break;
|
|
18
|
-
}
|
|
19
|
-
case 'AFTER_AXIS_NAME': {
|
|
20
|
-
if (token.type === 'word') {
|
|
21
|
-
const axisValue = parseFloat(token.value);
|
|
22
|
-
if (!isNaN(axisValue)) {
|
|
23
|
-
yield [axisName, axisValue];
|
|
24
|
-
}
|
|
1
|
+
"use strict";
|
|
2
|
+
const postcssValueParser = require("postcss-value-parser");
|
|
3
|
+
function* parseFontVariationSettings(value) {
|
|
4
|
+
let state = 'BEFORE_AXIS_NAME';
|
|
5
|
+
let axisName;
|
|
6
|
+
for (const token of postcssValueParser(value).nodes) {
|
|
7
|
+
if (token.type === 'space') {
|
|
8
|
+
continue;
|
|
25
9
|
}
|
|
26
|
-
state
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
10
|
+
switch (state) {
|
|
11
|
+
case 'BEFORE_AXIS_NAME': {
|
|
12
|
+
if (token.type !== 'string') {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
axisName = token.value;
|
|
16
|
+
state = 'AFTER_AXIS_NAME';
|
|
17
|
+
break;
|
|
18
|
+
}
|
|
19
|
+
case 'AFTER_AXIS_NAME': {
|
|
20
|
+
if (token.type === 'word') {
|
|
21
|
+
const axisValue = parseFloat(token.value);
|
|
22
|
+
if (!isNaN(axisValue) && axisName !== undefined) {
|
|
23
|
+
yield [axisName, axisValue];
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
state = 'AFTER_AXIS_VALUE';
|
|
27
|
+
break;
|
|
28
|
+
}
|
|
29
|
+
case 'AFTER_AXIS_VALUE': {
|
|
30
|
+
if (token.type !== 'div' || token.value !== ',') {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
axisName = undefined;
|
|
34
|
+
state = 'BEFORE_AXIS_NAME';
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
32
37
|
}
|
|
33
|
-
axisName = undefined;
|
|
34
|
-
state = 'BEFORE_AXIS_NAME';
|
|
35
|
-
break;
|
|
36
|
-
}
|
|
37
38
|
}
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
}
|
|
40
|
+
module.exports = parseFontVariationSettings;
|
|
41
|
+
//# sourceMappingURL=parseFontVariationSettings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseFontVariationSettings.js","sourceRoot":"","sources":["../src/parseFontVariationSettings.ts"],"names":[],"mappings":";AAAA,2DAA4D;AAE5D,QAAQ,CAAC,CAAC,0BAA0B,CAClC,KAAa;IAEb,IAAI,KAAK,GAAG,kBAAkB,CAAC;IAC/B,IAAI,QAA4B,CAAC;IACjC,KAAK,MAAM,KAAK,IAAI,kBAAkB,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC;QACpD,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;YAC3B,SAAS;QACX,CAAC;QACD,QAAQ,KAAK,EAAE,CAAC;YACd,KAAK,kBAAkB,CAAC,CAAC,CAAC;gBACxB,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;oBAC5B,OAAO;gBACT,CAAC;gBACD,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC;gBACvB,KAAK,GAAG,iBAAiB,CAAC;gBAC1B,MAAM;YACR,CAAC;YACD,KAAK,iBAAiB,CAAC,CAAC,CAAC;gBACvB,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;oBAC1B,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;oBAC1C,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;wBAChD,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;oBAC9B,CAAC;gBACH,CAAC;gBACD,KAAK,GAAG,kBAAkB,CAAC;gBAC3B,MAAM;YACR,CAAC;YACD,KAAK,kBAAkB,CAAC,CAAC,CAAC;gBACxB,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK,IAAI,KAAK,CAAC,KAAK,KAAK,GAAG,EAAE,CAAC;oBAChD,OAAO;gBACT,CAAC;gBACD,QAAQ,GAAG,SAAS,CAAC;gBACrB,KAAK,GAAG,kBAAkB,CAAC;gBAC3B,MAAM;YACR,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC;AAED,iBAAS,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface ProgressConsole {
|
|
2
|
+
log?: (...args: unknown[]) => void;
|
|
3
|
+
}
|
|
4
|
+
export interface PhaseHandle {
|
|
5
|
+
end(extraInfo?: string | null): number;
|
|
6
|
+
}
|
|
7
|
+
export interface PageProgress {
|
|
8
|
+
enabled: boolean;
|
|
9
|
+
banner(msg: string): void;
|
|
10
|
+
tick(): number;
|
|
11
|
+
done(): void;
|
|
12
|
+
}
|
|
13
|
+
interface CreatePageProgressOptions {
|
|
14
|
+
total: number;
|
|
15
|
+
console?: ProgressConsole | Console | null;
|
|
16
|
+
label: string;
|
|
17
|
+
minTotal?: number;
|
|
18
|
+
}
|
|
19
|
+
export declare function createPageProgress({ total, console, label, minTotal, }: CreatePageProgressOptions): PageProgress;
|
|
20
|
+
interface TraceablePageAsset {
|
|
21
|
+
urlOrDescription: string;
|
|
22
|
+
}
|
|
23
|
+
export declare function logTracedPage(console: ProgressConsole | Console | null | undefined, debug: boolean, index: number, total: number, asset: TraceablePageAsset, startMs: number): void;
|
|
24
|
+
export declare function logPhaseStart(console: ProgressConsole | Console | null | undefined, debug: boolean, label: string): PhaseHandle;
|
|
25
|
+
export declare function makePhaseTracker(console: ProgressConsole | Console | null | undefined, debug: boolean): (label: string) => PhaseHandle;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=progress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../src/progress.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,eAAe;IAI9B,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;CACpC;AAED,MAAM,WAAW,WAAW;IAC1B,GAAG,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAAC;CACxC;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,IAAI,IAAI,MAAM,CAAC;IACf,IAAI,IAAI,IAAI,CAAC;CACd;AAED,UAAU,yBAAyB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,GAAG,IAAI,CAAC;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAeD,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,OAAO,EACP,KAAK,EACL,QAAY,GACb,EAAE,yBAAyB,GAAG,YAAY,CAsB1C;AAED,UAAU,kBAAkB;IAC1B,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAID,wBAAgB,aAAa,CAC3B,OAAO,EAAE,eAAe,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,EACrD,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,kBAAkB,EACzB,OAAO,EAAE,MAAM,GACd,IAAI,CAKN;AAUD,wBAAgB,aAAa,CAC3B,OAAO,EAAE,eAAe,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,EACrD,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,MAAM,GACZ,WAAW,CAoBb;AASD,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,eAAe,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,EACrD,KAAK,EAAE,OAAO,GACb,CAAC,KAAK,EAAE,MAAM,KAAK,WAAW,CAEhC"}
|
package/lib/progress.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
// Helpers for surfacing phase progress to the console.
|
|
2
3
|
//
|
|
3
4
|
// Two audiences:
|
|
@@ -7,53 +8,54 @@
|
|
|
7
8
|
// goes silent. Paired "→ starting" / "← finished in Nms" markers
|
|
8
9
|
// around each slow phase mean the last line printed is always the
|
|
9
10
|
// currently-running phase.
|
|
10
|
-
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.createPageProgress = createPageProgress;
|
|
13
|
+
exports.logTracedPage = logTracedPage;
|
|
14
|
+
exports.logPhaseStart = logPhaseStart;
|
|
15
|
+
exports.makePhaseTracker = makePhaseTracker;
|
|
11
16
|
// Pick a progress step that gives roughly 10 updates across the run,
|
|
12
17
|
// clamped to [1, 10]. For a 500-page run this prints every 50; for 30,
|
|
13
18
|
// every 3. Avoids long silent stretches on large runs and per-page spam
|
|
14
19
|
// on small ones.
|
|
15
20
|
function progressStep(total) {
|
|
16
|
-
|
|
21
|
+
return Math.max(1, Math.min(10, Math.ceil(total / 10)));
|
|
17
22
|
}
|
|
18
|
-
|
|
19
23
|
// Reporter for a phase that iterates `total` items.
|
|
20
24
|
// banner(msg): optional one-line header printed immediately.
|
|
21
25
|
// tick(): call once per completed item; returns the running count.
|
|
22
26
|
// done(): prints "<label>: <total>/<total> pages done." footer.
|
|
23
27
|
// All methods no-op when disabled (missing console or below minTotal).
|
|
24
|
-
function createPageProgress({ total, console, label, minTotal = 5 }) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
28
|
+
function createPageProgress({ total, console, label, minTotal = 5, }) {
|
|
29
|
+
const enabled = Boolean(console) && total >= minTotal;
|
|
30
|
+
const step = progressStep(total);
|
|
31
|
+
let count = 0;
|
|
32
|
+
return {
|
|
33
|
+
enabled,
|
|
34
|
+
banner(msg) {
|
|
35
|
+
if (enabled && console?.log)
|
|
36
|
+
console.log(msg);
|
|
37
|
+
},
|
|
38
|
+
tick() {
|
|
39
|
+
count++;
|
|
40
|
+
if (enabled && count % step === 0 && count < total && console?.log) {
|
|
41
|
+
console.log(` ${label}: ${count}/${total} pages...`);
|
|
42
|
+
}
|
|
43
|
+
return count;
|
|
44
|
+
},
|
|
45
|
+
done() {
|
|
46
|
+
if (enabled && console?.log) {
|
|
47
|
+
console.log(` ${label}: ${total}/${total} pages done.`);
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
};
|
|
46
51
|
}
|
|
47
|
-
|
|
48
52
|
// Per-page debug line emitted right after a page finishes tracing.
|
|
49
53
|
// When a run hangs, the last-printed page identifies which page stalled.
|
|
50
54
|
function logTracedPage(console, debug, index, total, asset, startMs) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
`[subfont timing] traced [${index}/${total}] ${asset.urlOrDescription} in ${Date.now() - startMs}ms`
|
|
54
|
-
);
|
|
55
|
+
if (!debug || !console || !console.log)
|
|
56
|
+
return;
|
|
57
|
+
console.log(`[subfont timing] traced [${index}/${total}] ${asset.urlOrDescription} in ${Date.now() - startMs}ms`);
|
|
55
58
|
}
|
|
56
|
-
|
|
57
59
|
// Start/end markers for a debug phase. The "→ label..." line is printed
|
|
58
60
|
// *before* the work begins, so if the work hangs the user sees exactly
|
|
59
61
|
// which phase is in flight. The returned end() logs elapsed ms and
|
|
@@ -63,26 +65,26 @@ function logTracedPage(console, debug, index, total, asset, startMs) {
|
|
|
63
65
|
// await getSubsetsForFontUsage(...);
|
|
64
66
|
// timings.x = phase.end();
|
|
65
67
|
function logPhaseStart(console, debug, label) {
|
|
66
|
-
|
|
68
|
+
const log = console?.log;
|
|
69
|
+
if (!debug || !log) {
|
|
70
|
+
const start = Date.now();
|
|
71
|
+
return {
|
|
72
|
+
end() {
|
|
73
|
+
return Date.now() - start;
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
}
|
|
67
77
|
const start = Date.now();
|
|
78
|
+
log(`[subfont timing] → ${label}...`);
|
|
68
79
|
return {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
80
|
+
end(extraInfo) {
|
|
81
|
+
const ms = Date.now() - start;
|
|
82
|
+
const suffix = extraInfo ? ` (${extraInfo})` : '';
|
|
83
|
+
log(`[subfont timing] ← ${label}: ${ms}ms${suffix}`);
|
|
84
|
+
return ms;
|
|
85
|
+
},
|
|
72
86
|
};
|
|
73
|
-
}
|
|
74
|
-
const start = Date.now();
|
|
75
|
-
console.log(`[subfont timing] → ${label}...`);
|
|
76
|
-
return {
|
|
77
|
-
end(extraInfo) {
|
|
78
|
-
const ms = Date.now() - start;
|
|
79
|
-
const suffix = extraInfo ? ` (${extraInfo})` : '';
|
|
80
|
-
console.log(`[subfont timing] ← ${label}: ${ms}ms${suffix}`);
|
|
81
|
-
return ms;
|
|
82
|
-
},
|
|
83
|
-
};
|
|
84
87
|
}
|
|
85
|
-
|
|
86
88
|
// Bind a (console, debug) pair once at the top of a function, then use
|
|
87
89
|
// the returned tracker to open phases with a single short call:
|
|
88
90
|
//
|
|
@@ -91,11 +93,6 @@ function logPhaseStart(console, debug, label) {
|
|
|
91
93
|
// ...work...
|
|
92
94
|
// timings.x = p.end();
|
|
93
95
|
function makePhaseTracker(console, debug) {
|
|
94
|
-
|
|
96
|
+
return (label) => logPhaseStart(console, debug, label);
|
|
95
97
|
}
|
|
96
|
-
|
|
97
|
-
module.exports = {
|
|
98
|
-
createPageProgress,
|
|
99
|
-
logTracedPage,
|
|
100
|
-
makePhaseTracker,
|
|
101
|
-
};
|
|
98
|
+
//# sourceMappingURL=progress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.js","sourceRoot":"","sources":["../src/progress.ts"],"names":[],"mappings":";AAAA,uDAAuD;AACvD,EAAE;AACF,iBAAiB;AACjB,uEAAuE;AACvE,wEAAwE;AACxE,uEAAuE;AACvE,sEAAsE;AACtE,uEAAuE;AACvE,gCAAgC;;AAwChC,gDA2BC;AAQD,sCAYC;AAUD,sCAwBC;AASD,4CAKC;AA5GD,qEAAqE;AACrE,uEAAuE;AACvE,wEAAwE;AACxE,iBAAiB;AACjB,SAAS,YAAY,CAAC,KAAa;IACjC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;AAC1D,CAAC;AAED,oDAAoD;AACpD,+DAA+D;AAC/D,qEAAqE;AACrE,kEAAkE;AAClE,uEAAuE;AACvE,SAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,OAAO,EACP,KAAK,EACL,QAAQ,GAAG,CAAC,GACc;IAC1B,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,KAAK,IAAI,QAAQ,CAAC;IACtD,MAAM,IAAI,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,OAAO;QACL,OAAO;QACP,MAAM,CAAC,GAAW;YAChB,IAAI,OAAO,IAAI,OAA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