html-minifier-next 7.2.0 → 7.3.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/README.md CHANGED
@@ -73,7 +73,7 @@ For editor support (validation, autocomplete, and inline documentation) in JSON
73
73
 
74
74
  **JavaScript module configuration example** (requires `"type": "module"` in the project’s package.json, or use a .mjs extension):
75
75
 
76
- ```javascript
76
+ ```js
77
77
  export default {
78
78
  collapseWhitespace: true,
79
79
  removeComments: true,
@@ -84,7 +84,7 @@ export default {
84
84
 
85
85
  ### Node.js
86
86
 
87
- ```javascript
87
+ ```js
88
88
  import { minify } from 'html-minifier-next';
89
89
 
90
90
  const result = await minify('<p title="example" id="moo">foo</p>', {
@@ -198,7 +198,7 @@ When `minifyCSS` is set to `true`, HTML Minifier Next uses [Lightning CSS](https
198
198
 
199
199
  You can pass Lightning CSS configuration options by providing an object:
200
200
 
201
- ```javascript
201
+ ```js
202
202
  const result = await minify(html, {
203
203
  minifyCSS: {
204
204
  targets: {
@@ -221,7 +221,7 @@ Available Lightning CSS options when passed as an object:
221
221
 
222
222
  For advanced usage, you can also pass a function:
223
223
 
224
- ```javascript
224
+ ```js
225
225
  const result = await minify(html, {
226
226
  minifyCSS: function(text, type) {
227
227
  // `text`: CSS string to minify
@@ -237,7 +237,7 @@ When `minifyJS` is set to `true`, HTML Minifier Next uses [Terser](https://terse
237
237
 
238
238
  You can choose between different JS minifiers using the `engine` field:
239
239
 
240
- ```javascript
240
+ ```js
241
241
  const result = await minify(html, {
242
242
  minifyJS: {
243
243
  engine: 'swc', // Use SWC for faster minification
@@ -261,7 +261,7 @@ npm i -D @swc/core
261
261
 
262
262
  You can pass engine-specific configuration options:
263
263
 
264
- ```javascript
264
+ ```js
265
265
  // Using Terser with custom options
266
266
  const result = await minify(html, {
267
267
  minifyJS: {
@@ -281,7 +281,7 @@ const result = await minify(html, {
281
281
 
282
282
  For advanced usage, you can also pass a function:
283
283
 
284
- ```javascript
284
+ ```js
285
285
  const result = await minify(html, {
286
286
  minifyJS: function(text, inline) {
287
287
  // `text`: JavaScript string to minify
@@ -295,7 +295,7 @@ const result = await minify(html, {
295
295
 
296
296
  When `minifySVG` is set to `true`, HTML Minifier Next uses [SVGO](https://svgo.dev/) to optimize inline SVG elements. Complete `<svg>` subtrees are extracted and processed as a block, enabling deep structural optimization:
297
297
 
298
- ```javascript
298
+ ```js
299
299
  const result = await minify(html, {
300
300
  minifySVG: true // Enable with SVGO defaults
301
301
  });
@@ -303,7 +303,7 @@ const result = await minify(html, {
303
303
 
304
304
  You can pass custom SVGO options:
305
305
 
306
- ```javascript
306
+ ```js
307
307
  const result = await minify(html, {
308
308
  minifySVG: {
309
309
  plugins: [{
@@ -328,7 +328,7 @@ const result = await minify(html, {
328
328
 
329
329
  HTML Minifier Next uses in-memory caches to improve performance when processing multiple files or repeated content. The cache sizes can be configured for optimal performance based on your use case:
330
330
 
331
- ```javascript
331
+ ```js
332
332
  const result = await minify(html, {
333
333
  minifyCSS: true,
334
334
  minifyJS: true,
@@ -379,9 +379,34 @@ npx html-minifier-next --minify-css --minify-js --minify-svg input.html
379
379
 
380
380
  * Cache locking: Caches are created on the first `minify()` call and persist for the process lifetime. Cache sizes are locked after first initialization—subsequent calls reuse the same caches even if different `cacheCSS`, `cacheJS`, or `cacheSVG` options are provided. The first call’s options determine the cache sizes.
381
381
  * Zero values: Explicit `0` values are coerced to `1` (minimum functional cache size) to avoid immediate eviction. To keep the cache footprint as small as possible, use a small number like `10` or `50` instead of `0`.
382
+ * Entry size cap: Individual CSS, JavaScript, or SVG blocks larger than 1 MB are minified normally but not stored in the cache—this bounds worst-case cache memory without affecting realistically sized inline content. (This cutoff is fixed and not configurable.)
382
383
 
383
384
  The caches persist across multiple `minify()` calls, making them particularly effective when processing many files in a batch operation.
384
385
 
386
+ **Inspecting cache effectiveness:**
387
+
388
+ Use `getCacheStats()` to see hit/miss counts and current occupancy for each cache:
389
+
390
+ ```js
391
+ import { minify, getCacheStats } from 'html-minifier-next';
392
+
393
+ // After minifying pages that share templated CSS/JS…
394
+ for (const html of pages) {
395
+ await minify(html, { minifyCSS: true, minifyJS: true });
396
+ }
397
+
398
+ console.log(getCacheStats());
399
+ // {
400
+ // css: { gets: 392, hits: 298, size: 94, limit: 500 },
401
+ // js: { gets: 1196, hits: 1192, size: 4, limit: 500 },
402
+ // svg: { gets: 0, hits: 0, size: 0, limit: 500 }
403
+ // }
404
+ ```
405
+
406
+ A cache that was never exercised (e.g., `minifySVG` disabled, or `minify()` not yet called) reports all-zero stats.
407
+
408
+ The CLI’s `--verbose` and `--dry` modes print the same information to STDERR at the end of a run, omitting caches that were never touched.
409
+
385
410
  ## Minification comparison
386
411
 
387
412
  Please see [**the Minifier Benchmarks project**](https://github.com/j9t/minifier-benchmarks) for details on how HTML Minifier Next compares to other minifiers.
@@ -501,7 +526,7 @@ This minifier includes protection against regular expression denial of service (
501
526
 
502
527
  **Safe patterns** (recommended):
503
528
 
504
- ```javascript
529
+ ```js
505
530
  ignoreCustomFragments: [
506
531
  /<%[\s\S]{0,1000}?%>/, // JSP/ASP with explicit bounds
507
532
  /<\?php[\s\S]{0,5000}?\?>/, // PHP with bounds
@@ -511,7 +536,7 @@ ignoreCustomFragments: [
511
536
 
512
537
  **Potentially unsafe patterns** (will trigger warnings):
513
538
 
514
- ```javascript
539
+ ```js
515
540
  ignoreCustomFragments: [
516
541
  /<%[\s\S]*?%>/, // Unlimited quantifiers
517
542
  /<!--[\s\S]*?-->/, // Could cause issues with very long comments
@@ -522,7 +547,7 @@ ignoreCustomFragments: [
522
547
 
523
548
  **Template engine configurations:**
524
549
 
525
- ```javascript
550
+ ```js
526
551
  // Handlebars/Mustache
527
552
  ignoreCustomFragments: [/\{\{[\s\S]{0,1000}?\}\}/]
528
553
 
@@ -552,7 +577,7 @@ The escaping requirements for `ignoreCustomFragments` patterns differ depending
552
577
 
553
578
  **Programmatic (JavaScript/Node.js):**
554
579
 
555
- ```javascript
580
+ ```js
556
581
  ignoreCustomFragments: [/\{%[\s\S]{0,1000}?%\}/, /\{\{[\s\S]{0,500}?\}\}/]
557
582
  ```
558
583
 
@@ -642,6 +667,6 @@ With many thanks to the previous authors of and contributors to HTML Minifier, e
642
667
 
643
668
  You might like some of my other work:
644
669
 
645
- * Optimization tools: [hihtml](https://github.com/j9t/hihtml) · HTML Minifier Next · [ObsoHTML](https://github.com/j9t/obsohtml) · [Image Guard](https://github.com/j9t/image-guard) · [Compressor.js Next](https://github.com/j9t/compressorjs-next) · [.htaccess Punk](https://github.com/j9t/htaccess-punk)
670
+ * Optimization tools: [hihtml](https://github.com/j9t/hihtml) · HTML Minifier Next · [ObsoHTML](https://github.com/j9t/obsohtml) · [CSS Dedup](https://github.com/j9t/css-dedup) · [Image Guard](https://github.com/j9t/image-guard) · [Compressor.js Next](https://github.com/j9t/compressorjs-next) · [.htaccess Punk](https://github.com/j9t/htaccess-punk)
646
671
  * Defense tools: [IA Defensa](https://iadefensa.com/solutions/)
647
672
  * Resources for quality web development: [Articles](https://meiert.com/topics/development/) · [Books](https://meiert.com/topics/books/) (including [_On Web Development_](https://meiert.com/blog/on-web-development-2/)) · [News](https://frontenddogma.com/) · [Terminology](https://webglossary.info/)
package/cli.js CHANGED
@@ -452,6 +452,26 @@ program.helpOption('-h, --help', 'Display help for command');
452
452
  return { originalSize, minifiedSize, saved, sign, percentage };
453
453
  }
454
454
 
455
+ // Print a one-line-per-cache hits/misses/size summary to STDERR, skipping caches
456
+ // that were never touched (e.g., their minifier is disabled)
457
+ async function printCacheStats() {
458
+ const { getCacheStats } = await import('./src/htmlminifier.js');
459
+ const cacheStats = getCacheStats();
460
+ const labels = { css: 'CSS', js: 'JS', svg: 'SVG' };
461
+
462
+ const lines = Object.keys(labels).reduce((acc, key) => {
463
+ const { gets, hits, size, limit } = cacheStats[key];
464
+ if (gets === 0) return acc;
465
+ const misses = gets - hits;
466
+ acc.push(` ${labels[key]} cache: ${hits.toLocaleString()} hit${hits === 1 ? '' : 's'}, ${misses.toLocaleString()} miss${misses === 1 ? '' : 'es'}, ${size.toLocaleString()}/${limit.toLocaleString()} entries`);
467
+ return acc;
468
+ }, []);
469
+
470
+ if (lines.length === 0) return;
471
+ console.error('Cache stats:');
472
+ lines.forEach(line => console.error(line));
473
+ }
474
+
455
475
  async function processFile(inputFile, outputFile, isDryRun = false, isVerbose = false) {
456
476
  const data = await fs.promises.readFile(inputFile, { encoding: 'utf8' }).catch(err => {
457
477
  fatal('Cannot read ' + inputFile + '\n' + err.message);
@@ -698,6 +718,7 @@ program.helpOption('-h, --help', 'Display help for command');
698
718
  console.error(` Original: ${stats.originalSize.toLocaleString()} bytes`);
699
719
  console.error(` Minified: ${stats.minifiedSize.toLocaleString()} bytes`);
700
720
  console.error(` Saved: ${stats.sign}${Math.abs(stats.saved).toLocaleString()} bytes (${stats.percentage}%)`);
721
+ await printCacheStats();
701
722
  return;
702
723
  }
703
724
 
@@ -705,6 +726,7 @@ program.helpOption('-h, --help', 'Display help for command');
705
726
  if (programOptions.verbose) {
706
727
  const inputSource = program.args.length > 0 ? program.args.join(', ') : 'STDIN';
707
728
  console.error(` ${MARK_SUCCESS}✓${MARK_RESET} ${inputSource}: ${stats.originalSize.toLocaleString()} → ${stats.minifiedSize.toLocaleString()} bytes (${stats.sign}${Math.abs(stats.saved).toLocaleString()}, ${stats.percentage}%)`);
729
+ await printCacheStats();
708
730
  }
709
731
 
710
732
  if (programOptions.output) {
@@ -833,6 +855,10 @@ program.helpOption('-h, --help', 'Display help for command');
833
855
  console.error('---');
834
856
  console.error(`Total: ${totalOriginal.toLocaleString()} → ${totalMinified.toLocaleString()} bytes (${sign}${Math.abs(totalSaved).toLocaleString()}, ${totalPercentage}%)`);
835
857
  }
858
+
859
+ if (isVerbose) {
860
+ await printCacheStats();
861
+ }
836
862
  })();
837
863
  } else if (filesProvided) { // Minifying one or more files specified on the CMD line
838
864
  // Process each file independently, then concatenate outputs
@@ -881,12 +907,14 @@ program.helpOption('-h, --help', 'Display help for command');
881
907
  console.error(` Original: ${stats.originalSize.toLocaleString()} bytes`);
882
908
  console.error(` Minified: ${stats.minifiedSize.toLocaleString()} bytes`);
883
909
  console.error(` Saved: ${stats.sign}${Math.abs(stats.saved).toLocaleString()} bytes (${stats.percentage}%)`);
910
+ await printCacheStats();
884
911
  process.exit(0);
885
912
  }
886
913
 
887
914
  if (programOptions.verbose) {
888
915
  const inputSource = capturedFiles.join(', ');
889
916
  console.error(` ${MARK_SUCCESS}✓${MARK_RESET} ${inputSource}: ${stats.originalSize.toLocaleString()} → ${stats.minifiedSize.toLocaleString()} bytes (${stats.sign}${Math.abs(stats.saved).toLocaleString()}, ${stats.percentage}%)`);
917
+ await printCacheStats();
890
918
  }
891
919
 
892
920
  if (programOptions.output) {
@@ -1,15 +1,4 @@
1
- export function minify(value: string, options?: MinifierOptions): Promise<string>;
2
- declare namespace _default {
3
- export { minify };
4
- export { presets };
5
- export { getPreset };
6
- export { getPresetNames };
7
- }
8
- export default _default;
9
- /**
10
- * Representation of an attribute from the HTML parser.
11
- * Internal counterpart: `HTMLAttribute` in `lib/attributes.js`—keep in sync.
12
- */
1
+ import { presets, getPreset, getPresetNames } from './presets.js';
13
2
  export type HTMLAttribute = {
14
3
  name: string;
15
4
  value?: string;
@@ -18,10 +7,6 @@ export type HTMLAttribute = {
18
7
  customOpen?: string;
19
8
  customClose?: string;
20
9
  };
21
- /**
22
- * Options that control how HTML is minified. All of these are optional
23
- * and usually default to a disabled/safe value unless noted.
24
- */
25
10
  export type MinifierOptions = {
26
11
  /**
27
12
  * Predicate that determines whether whitespace inside a given element
@@ -264,7 +249,7 @@ export type MinifierOptions = {
264
249
  * Default: `false`
265
250
  */
266
251
  minifyJS?: boolean | import("terser").MinifyOptions | {
267
- engine?: "terser" | "swc";
252
+ engine?: 'terser' | 'swc';
268
253
  [key: string]: any;
269
254
  } | ((text: string, inline?: boolean) => Promise<string> | string);
270
255
  /**
@@ -470,8 +455,80 @@ export type MinifierOptions = {
470
455
  */
471
456
  useShortDoctype?: boolean;
472
457
  };
473
- import { presets } from './presets.js';
474
- import { getPreset } from './presets.js';
475
- import { getPresetNames } from './presets.js';
458
+ export type CacheStats = {
459
+ /**
460
+ * Number of lookups attempted against the cache.
461
+ */
462
+ gets: number;
463
+ /**
464
+ * Number of lookups that found a cached entry.
465
+ */
466
+ hits: number;
467
+ /**
468
+ * Number of entries currently held in the cache.
469
+ */
470
+ size: number;
471
+ /**
472
+ * Maximum number of entries the cache can hold.
473
+ */
474
+ limit: number;
475
+ };
476
+ /**
477
+ * Get hit/miss statistics for the CSS, JavaScript, and SVG minification caches.
478
+ *
479
+ * Each cache is created lazily on the first `minify()` call (see `initCaches`); before
480
+ * that first call, or for a cache never exercised (e.g., `minifyCSS` disabled), its
481
+ * entry reports all-zero stats.
482
+ *
483
+ * @returns {{ css: CacheStats, js: CacheStats, svg: CacheStats }}
484
+ */
485
+ export declare function getCacheStats(): {
486
+ css: CacheStats;
487
+ js: CacheStats;
488
+ svg: CacheStats;
489
+ };
490
+ /**
491
+ * @param {string} value
492
+ * @param {MinifierOptions} [options]
493
+ * @returns {Promise<string>}
494
+ */
495
+ export declare const minify: (value: string, options?: MinifierOptions) => Promise<string>;
476
496
  export { presets, getPreset, getPresetNames };
497
+ declare const _default: {
498
+ minify: typeof minify;
499
+ presets: {
500
+ conservative: {
501
+ caseSensitive: boolean;
502
+ collapseBooleanAttributes: boolean;
503
+ collapseWhitespace: boolean;
504
+ conservativeCollapse: boolean;
505
+ preserveLineBreaks: boolean;
506
+ removeComments: boolean;
507
+ removeDefaultTypeAttributes: boolean;
508
+ useShortDoctype: boolean;
509
+ };
510
+ comprehensive: {
511
+ collapseAttributeWhitespace: boolean;
512
+ collapseBooleanAttributes: boolean;
513
+ collapseWhitespace: boolean;
514
+ decodeEntities: boolean;
515
+ mergeScripts: boolean;
516
+ minifyCSS: boolean;
517
+ minifyJS: boolean;
518
+ minifySVG: boolean;
519
+ minifyURLs: boolean;
520
+ removeAttributeQuotes: boolean;
521
+ removeComments: boolean;
522
+ removeDefaultTypeAttributes: boolean;
523
+ removeEmptyAttributes: boolean;
524
+ removeOptionalTags: boolean;
525
+ removeRedundantAttributes: boolean;
526
+ useShortDoctype: boolean;
527
+ };
528
+ };
529
+ getPreset: typeof getPreset;
530
+ getPresetNames: typeof getPresetNames;
531
+ getCacheStats: typeof getCacheStats;
532
+ };
533
+ export default _default;
477
534
  //# sourceMappingURL=htmlminifier.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"htmlminifier.d.ts","sourceRoot":"","sources":["../../src/htmlminifier.js"],"names":[],"mappings":"AA42DO,8BAJI,MAAM,YACN,eAAe,GACb,OAAO,CAAC,MAAM,CAAC,CA0B3B;;;;;;;;;;;;;UAn0DS,MAAM;YACN,MAAM;YACN,MAAM;mBACN,MAAM;iBACN,MAAM;kBACN,MAAM;;;;;;;;;;;;;4BAQN,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,qBAAqB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,KAAK,OAAO;;;;;;;wBAMjG,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,KAAK,EAAE,aAAa,EAAE,GAAG,SAAS,EAAE,iBAAiB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,KAAK,OAAO;;;;;;;;;;eAMhH,MAAM;;;;;;;;;;cASN,MAAM;;;;;;;;;;eASN,MAAM;;;;;;;;oBASN,OAAO;;;;;;;;;kCAON,OAAO;;;;;;;;gCAQR,OAAO;;;;;;;;kCAOP,OAAO;;;;;;;;yBAOP,OAAO;;;;;;;;2BAOP,OAAO;;;;;;;;4BAOP,OAAO;;;;;;;2BAOP,OAAO;;;;;;;;uBAMP,MAAM,EAAE;;;;;;yBAOR,MAAM;;;;;;yBAKN,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE;;;;;;;4BAKlB,MAAM,EAAE;;;;;;;oCAMR,MAAM;;;;;;;qBAMN,OAAO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,eAAe,AAAhC,CAKF,EALS,OAAO,CAKhB;CAAA,CAAA;AAiEE,YAAkB,UAAU,GAG5B;;;;IAAe,IAAI,EAAZ,MAAM,CACb;;;;IAAe,IAAI,EAAZ,MAAM,CACb;;;;IAAe,IAAI,EAAZ,MAAM,CACb;;;;IAAe,KAAK,EAAb,MAAM,CACf;CAAA,CAAA;AA41CD;;;;;;;;GAQG;AACH,wBAAgB,aAAa,IAFhB;IAAE,GAAG,EAAE,UAAU,CAAC;IAAC,EAAE,EAAE,UAAU,CAAC;IAAC,GAAG,EAAE,UAAU,CAAA;CAAE,CAQhE;AAED;;;;GAIG;AACH,eAAO,MAAM,MAAM,UAJR,MAAM,YACN,eAAe,KACb,OAAO,CAAC,MAAM,CA0B1B,CAAC;AAEF,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC"}
@@ -1,14 +1,3 @@
1
- export const endTag: RegExp;
2
- export class HTMLParser {
3
- /**
4
- * @param {string} html
5
- * @param {HTMLParserHandler} handler
6
- */
7
- constructor(html: string, handler: HTMLParserHandler);
8
- html: string;
9
- handler: HTMLParserHandler;
10
- parse(): Promise<void>;
11
- }
12
1
  export type HTMLParserHandler = {
13
2
  start?: Function;
14
3
  end?: Function;
@@ -21,4 +10,15 @@ export type HTMLParserHandler = {
21
10
  customAttrSurround?: RegExp[][] | undefined;
22
11
  customAttrAssign?: RegExp[] | undefined;
23
12
  };
13
+ export declare const endTag: RegExp;
14
+ export declare class HTMLParser {
15
+ html: string;
16
+ handler: HTMLParserHandler;
17
+ /**
18
+ * @param {string} html
19
+ * @param {HTMLParserHandler} handler
20
+ */
21
+ constructor(html: string, handler: HTMLParserHandler);
22
+ parse(): Promise<void>;
23
+ }
24
24
  //# sourceMappingURL=htmlparser.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"htmlparser.d.ts","sourceRoot":"","sources":["../../src/htmlparser.js"],"names":[],"mappings":"AAyEA,4BAAkE;AA2HlE;IACE;;;OAGG;IACH,kBAHW,MAAM,WACN,iBAAiB,EAK3B;IAFC,aAAgB;IAChB,2BAAsB;IAGxB,uBA4nBC;CACF;gCA7zBY;IACR,KAAK,CAAC,WAAW;IACjB,GAAG,CAAC,WAAW;IACf,KAAK,CAAC,WAAW;IACjB,OAAO,CAAC,WAAW;IACnB,OAAO,CAAC,WAAW;IACnB,oBAAoB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3C,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACpC,YAAY,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACnC,kBAAkB,CAAC,EAAE,MAAM,EAAE,EAAE,GAAG,SAAS,CAAC;IAC5C,gBAAgB,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;CACxC"}
1
+ {"version":3,"file":"htmlparser.d.ts","sourceRoot":"","sources":["../../src/htmlparser.js"],"names":[],"mappings":"AAcG,YAWG,iBAAiB,GAXV;IACR,KAAK,CAAC,WAAW;IACjB,GAAG,CAAC,WAAW;IACf,KAAK,CAAC,WAAW;IACjB,OAAO,CAAC,WAAW;IACnB,OAAO,CAAC,WAAW;IACnB,oBAAoB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3C,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACpC,YAAY,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACnC,kBAAkB,CAAC,EAAE,MAAM,EAAE,EAAE,GAAG,SAAS,CAAC;IAC5C,gBAAgB,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;CACxC,CAAmB;AAgDvB,eAAO,MAAM,MAAM,QAA8C,CAAC;AA2HlE,qBAAa,UAAU;IAMd,IAAI;IACJ,OAAO;IANd;;;OAGG;IACH,YAAY,IAAI,EAHL,MAGK,EAAE,OAAO,EAFd,iBAEc,EAGxB;IAEK,KAAK,kBA4nBV;CACF"}
@@ -1,6 +1,4 @@
1
- /**
2
- * Internal counterpart of the public typedef in `htmlminifier.js`—keep in sync.
3
- */
1
+ import type { ProcessedOptions } from './options.js';
4
2
  export type HTMLAttribute = {
5
3
  name: string;
6
4
  value?: string | undefined;
@@ -13,97 +11,106 @@ export type HTMLAttribute = {
13
11
  * @param {string} text
14
12
  * @param {ProcessedOptions} options
15
13
  */
16
- export function isIgnoredComment(text: string, options: ProcessedOptions): boolean;
14
+ declare function isIgnoredComment(text: string, options: ProcessedOptions): boolean;
17
15
  /**
18
16
  * @param {string} attrName
19
17
  * @param {{customEventAttributes?: RegExp[]}} options
20
18
  */
21
- export function isEventAttribute(attrName: string, options: {
19
+ declare function isEventAttribute(attrName: string, options: {
22
20
  customEventAttributes?: RegExp[];
23
21
  }): boolean;
24
22
  /** @param {string} value */
25
- export function canRemoveAttributeQuotes(value: string): boolean;
23
+ declare function canRemoveAttributeQuotes(value: string): boolean;
26
24
  /**
27
25
  * @param {HTMLAttribute[]} attributes
28
26
  * @param {string} attribute
29
27
  */
30
- export function attributesInclude(attributes: HTMLAttribute[], attribute: string): boolean;
28
+ declare function attributesInclude(attributes: HTMLAttribute[], attribute: string): boolean;
29
+ /**
30
+ * Remove duplicate attributes from an attribute list.
31
+ * Per HTML spec, when an attribute appears multiple times, the first occurrence wins.
32
+ * Duplicate attributes result in invalid HTML, so only the first is kept.
33
+ * @param {HTMLAttribute[]} attrs - Array of attribute objects with `name` property
34
+ * @param {boolean} caseSensitive - Whether to compare names case-sensitively (for XML/SVG)
35
+ * @returns {HTMLAttribute[]} Deduplicated attribute array (modifies in place and returns)
36
+ */
37
+ declare function deduplicateAttributes(attrs: HTMLAttribute[], caseSensitive: boolean): HTMLAttribute[];
31
38
  /**
32
39
  * @param {string} tag
33
40
  * @param {string} attrName
34
41
  * @param {string} attrValue
35
42
  * @param {HTMLAttribute[]} attrs
36
43
  */
37
- export function isAttributeRedundant(tag: string, attrName: string, attrValue: string, attrs: HTMLAttribute[]): boolean;
38
- export function isScriptTypeAttribute(attrValue?: string): boolean;
39
- export function keepScriptTypeAttribute(attrValue?: string): boolean;
44
+ declare function isAttributeRedundant(tag: string, attrName: string, attrValue: string, attrs: HTMLAttribute[]): boolean;
45
+ declare function isScriptTypeAttribute(attrValue?: string): boolean;
46
+ declare function keepScriptTypeAttribute(attrValue?: string): boolean;
40
47
  /**
41
48
  * @param {string} tag
42
49
  * @param {HTMLAttribute[]} attrs
43
50
  */
44
- export function isExecutableScript(tag: string, attrs: HTMLAttribute[]): boolean;
45
- export function isStyleLinkTypeAttribute(attrValue?: string): boolean;
51
+ declare function isExecutableScript(tag: string, attrs: HTMLAttribute[]): boolean;
52
+ declare function isStyleLinkTypeAttribute(attrValue?: string): boolean;
46
53
  /**
47
54
  * @param {string} tag
48
55
  * @param {HTMLAttribute[]} attrs
49
56
  */
50
- export function isStyleElement(tag: string, attrs: HTMLAttribute[]): boolean;
57
+ declare function isStyleElement(tag: string, attrs: HTMLAttribute[]): boolean;
51
58
  /**
52
59
  * @param {string} attrName
53
60
  * @param {string} attrValue
54
61
  */
55
- export function isBooleanAttribute(attrName: string, attrValue: string): boolean | undefined;
62
+ declare function isBooleanAttribute(attrName: string, attrValue: string): boolean | undefined;
56
63
  /**
57
64
  * @param {string} attrName
58
65
  * @param {string} tag
59
66
  */
60
- export function isUriTypeAttribute(attrName: string, tag: string): boolean;
67
+ declare function isUriTypeAttribute(attrName: string, tag: string): boolean;
61
68
  /**
62
69
  * @param {string} attrName
63
70
  * @param {string} tag
64
71
  */
65
- export function isNumberTypeAttribute(attrName: string, tag: string): boolean;
72
+ declare function isNumberTypeAttribute(attrName: string, tag: string): boolean;
66
73
  /**
67
74
  * @param {string} tag
68
75
  * @param {HTMLAttribute[]} attrs
69
76
  * @param {string} value
70
77
  */
71
- export function isLinkType(tag: string, attrs: HTMLAttribute[], value: string): boolean;
78
+ declare function isLinkType(tag: string, attrs: HTMLAttribute[], value: string): boolean;
72
79
  /**
73
80
  * @param {string} tag
74
81
  * @param {HTMLAttribute[]} attrs
75
82
  * @param {string} attrName
76
83
  */
77
- export function isMediaQuery(tag: string, attrs: HTMLAttribute[], attrName: string): boolean;
84
+ declare function isMediaQuery(tag: string, attrs: HTMLAttribute[], attrName: string): boolean;
78
85
  /**
79
86
  * @param {string} attrName
80
87
  * @param {string} tag
81
88
  */
82
- export function isSrcset(attrName: string, tag: string): boolean;
89
+ declare function isSrcset(attrName: string, tag: string): boolean;
83
90
  /**
84
91
  * @param {string} tag
85
92
  * @param {HTMLAttribute[]} attrs
86
93
  */
87
- export function isMetaViewport(tag: string, attrs: HTMLAttribute[]): boolean;
94
+ declare function isMetaViewport(tag: string, attrs: HTMLAttribute[]): boolean;
88
95
  /**
89
96
  * @param {string} tag
90
97
  * @param {HTMLAttribute[]} attrs
91
98
  */
92
- export function isContentSecurityPolicy(tag: string, attrs: HTMLAttribute[]): boolean;
99
+ declare function isContentSecurityPolicy(tag: string, attrs: HTMLAttribute[]): boolean;
93
100
  /**
94
101
  * @param {string} tag
95
102
  * @param {string} attrName
96
103
  * @param {string | undefined} attrValue
97
104
  * @param {{removeEmptyAttributes?: boolean | Function}} options
98
105
  */
99
- export function canDeleteEmptyAttribute(tag: string, attrName: string, attrValue: string | undefined, options: {
106
+ declare function canDeleteEmptyAttribute(tag: string, attrName: string, attrValue: string | undefined, options: {
100
107
  removeEmptyAttributes?: boolean | Function;
101
108
  }): any;
102
109
  /**
103
110
  * @param {string} name
104
111
  * @param {HTMLAttribute[]} attrs
105
112
  */
106
- export function hasAttrName(name: string, attrs: HTMLAttribute[]): boolean;
113
+ declare function hasAttrName(name: string, attrs: HTMLAttribute[]): boolean;
107
114
  /**
108
115
  * @param {string} tag
109
116
  * @param {string} attrName
@@ -112,7 +119,7 @@ export function hasAttrName(name: string, attrs: HTMLAttribute[]): boolean;
112
119
  * @param {HTMLAttribute[]} attrs
113
120
  * @param {Function} minifyHTMLSelf
114
121
  */
115
- export function cleanAttributeValue(tag: string, attrName: string, attrValue: string, options: ProcessedOptions, attrs: HTMLAttribute[], minifyHTMLSelf: Function): any;
122
+ declare function cleanAttributeValue(tag: string, attrName: string, attrValue: string, options: ProcessedOptions, attrs: HTMLAttribute[], minifyHTMLSelf: Function): any;
116
123
  /**
117
124
  * @param {HTMLAttribute} attr
118
125
  * @param {HTMLAttribute[]} attrs
@@ -120,15 +127,15 @@ export function cleanAttributeValue(tag: string, attrName: string, attrValue: st
120
127
  * @param {ProcessedOptions} options
121
128
  * @param {Function} minifyHTML
122
129
  */
123
- export function normalizeAttr(attr: HTMLAttribute, attrs: HTMLAttribute[], tag: string, options: ProcessedOptions, minifyHTML: Function): {
130
+ declare function normalizeAttr(attr: HTMLAttribute, attrs: HTMLAttribute[], tag: string, options: ProcessedOptions, minifyHTML: Function): PromiseLike<{
124
131
  attr: HTMLAttribute;
125
132
  name: string;
126
133
  value: string | undefined;
127
- } | PromiseLike<{
134
+ } | undefined> | {
128
135
  attr: HTMLAttribute;
129
136
  name: string;
130
137
  value: string | undefined;
131
- } | undefined> | undefined;
138
+ } | undefined;
132
139
  /**
133
140
  * @param {{name: string, value: string | undefined, attr: HTMLAttribute}} normalized
134
141
  * @param {string | boolean | undefined} hasUnarySlash
@@ -136,19 +143,10 @@ export function normalizeAttr(attr: HTMLAttribute, attrs: HTMLAttribute[], tag:
136
143
  * @param {boolean} isLast
137
144
  * @param {string | undefined} uidAttr
138
145
  */
139
- export function buildAttr(normalized: {
146
+ declare function buildAttr(normalized: {
140
147
  name: string;
141
148
  value: string | undefined;
142
149
  attr: HTMLAttribute;
143
150
  }, hasUnarySlash: string | boolean | undefined, options: ProcessedOptions, isLast: boolean, uidAttr: string | undefined): string;
144
- /**
145
- * Remove duplicate attributes from an attribute list.
146
- * Per HTML spec, when an attribute appears multiple times, the first occurrence wins.
147
- * Duplicate attributes result in invalid HTML, so only the first is kept.
148
- * @param {HTMLAttribute[]} attrs - Array of attribute objects with `name` property
149
- * @param {boolean} caseSensitive - Whether to compare names case-sensitively (for XML/SVG)
150
- * @returns {HTMLAttribute[]} Deduplicated attribute array (modifies in place and returns)
151
- */
152
- export function deduplicateAttributes(attrs: HTMLAttribute[], caseSensitive: boolean): HTMLAttribute[];
153
- import type { ProcessedOptions } from './options.js';
151
+ export { isIgnoredComment, isEventAttribute, canRemoveAttributeQuotes, attributesInclude, isAttributeRedundant, isScriptTypeAttribute, keepScriptTypeAttribute, isExecutableScript, isStyleLinkTypeAttribute, isStyleElement, isBooleanAttribute, isUriTypeAttribute, isNumberTypeAttribute, isLinkType, isMediaQuery, isSrcset, isMetaViewport, isContentSecurityPolicy, canDeleteEmptyAttribute, hasAttrName, cleanAttributeValue, normalizeAttr, buildAttr, deduplicateAttributes };
154
152
  //# sourceMappingURL=attributes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../../src/lib/attributes.js"],"names":[],"mappings":";;;4BA0Ba;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE;AAiB3I;;;GAGG;AACH,uCAHW,MAAM,WACN,gBAAgB,WAS1B;AAED;;;GAGG;AACH,2CAHW,MAAM,WACN;IAAC,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAA;CAAC,WAa5C;AAED,4BAA4B;AAC5B,gDADY,MAAM,WAIjB;AAED;;;GAGG;AACH,8CAHW,aAAa,EAAE,aACf,MAAM,WAShB;AA+BD;;;;;GAKG;AACH,0CALW,MAAM,YACN,MAAM,aACN,MAAM,SACN,aAAa,EAAE,WAyCzB;AAED,mEAGC;AAED,qEAGC;AAED;;;GAGG;AACH,wCAHW,MAAM,SACN,aAAa,EAAE,WAYzB;AAED,sEAGC;AAED;;;GAGG;AACH,oCAHW,MAAM,SACN,aAAa,EAAE,WAYzB;AAED;;;GAGG;AACH,6CAHW,MAAM,aACN,MAAM,uBAMhB;AAmBD;;;GAGG;AACH,6CAHW,MAAM,OACN,MAAM,WAKhB;AAgBD;;;GAGG;AACH,gDAHW,MAAM,OACN,MAAM,WAKhB;AAED;;;;GAIG;AACH,gCAJW,MAAM,SACN,aAAa,EAAE,SACf,MAAM,WAYhB;AAED;;;;GAIG;AACH,kCAJW,MAAM,SACN,aAAa,EAAE,YACf,MAAM,WAIhB;AAED;;;GAGG;AACH,mCAHW,MAAM,OACN,MAAM,WAKhB;AAED;;;GAGG;AACH,oCAHW,MAAM,SACN,aAAa,EAAE,WAYzB;AAED;;;GAGG;AACH,6CAHW,MAAM,SACN,aAAa,EAAE,WAYzB;AAED;;;;;GAKG;AACH,6CALW,MAAM,YACN,MAAM,aACN,MAAM,GAAG,SAAS,WAClB;IAAC,qBAAqB,CAAC,EAAE,OAAO,WAAW,CAAA;CAAC,OAWtD;AAED;;;GAGG;AACH,kCAHW,MAAM,SACN,aAAa,EAAE,WASzB;AAUD;;;;;;;GAOG;AACH,yCAPW,MAAM,YACN,MAAM,aACN,MAAM,WACN,gBAAgB,SAChB,aAAa,EAAE,iCA4NzB;AAwBD;;;;;;GAMG;AACH,oCANW,aAAa,SACb,aAAa,EAAE,OACf,MAAM,WACN,gBAAgB;;;;;;;;2BAe1B;AA0DD;;;;;;GAMG;AACH,sCANW;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,IAAI,EAAE,aAAa,CAAA;CAAC,iBAC9D,MAAM,GAAG,OAAO,GAAG,SAAS,WAC5B,gBAAgB,UAChB,OAAO,WACP,MAAM,GAAG,SAAS,UA0H5B;AApuBD;;;;;;;GAOG;AACH,6CAJW,aAAa,EAAE,iBACf,OAAO,GACL,aAAa,EAAE,CAqB3B;sCAlGqC,cAAc"}
1
+ {"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../../src/lib/attributes.js"],"names":[],"mappings":"AAqBI,OAAQ,KAA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