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.
@@ -1,101 +1,98 @@
1
- export const RE_WS_START: RegExp;
2
- export const RE_WS_END: RegExp;
3
- export const RE_ALL_WS_NBSP: RegExp;
4
- export const RE_NBSP_LEADING_GROUP: RegExp;
5
- export const RE_NBSP_LEAD_GROUP: RegExp;
6
- export const RE_NBSP_TRAILING_GROUP: RegExp;
7
- export const RE_NBSP_TRAILING_STRIP: RegExp;
8
- export const RE_EVENT_ATTR_DEFAULT: RegExp;
9
- export const RE_CAN_REMOVE_ATTR_QUOTES: RegExp;
10
- export const RE_TRAILING_SEMICOLON: RegExp;
11
- export const RE_AMP_ENTITY: RegExp;
12
- export const RE_LEGACY_ENTITIES: RegExp;
13
- export const RE_ESCAPE_LT: RegExp;
14
- export const RE_ATTR_WS_CHECK: RegExp;
15
- export const RE_ATTR_WS_COLLAPSE: RegExp;
16
- export const RE_ATTR_WS_TRIM: RegExp;
17
- export const inlineElementsToKeepWhitespaceAround: Set<string>;
18
- export const inlineElementsToKeepWhitespaceWithin: Set<string>;
19
- export const inlineElementsToKeepWhitespace: Set<string>;
20
- export const formControlElements: Set<string>;
21
- export namespace generalDefaults {
22
- let autocorrect: string;
23
- let fetchpriority: string;
24
- let loading: string;
25
- let popovertargetaction: string;
26
- }
27
- export namespace tagDefaults {
28
- namespace area {
29
- let shape: string;
30
- }
31
- namespace button {
32
- let type: string;
33
- }
34
- namespace form {
35
- let enctype: string;
36
- let method: string;
37
- }
38
- namespace html {
39
- let dir: string;
40
- }
41
- namespace img {
42
- let decoding: string;
43
- }
44
- namespace input {
45
- export let colorspace: string;
46
- let type_1: string;
47
- export { type_1 as type };
48
- }
49
- namespace link {
50
- let media: string;
51
- }
52
- namespace marquee {
53
- let behavior: string;
54
- let direction: string;
55
- }
56
- namespace meta {
57
- let media_1: string;
58
- export { media_1 as media };
59
- }
60
- namespace source {
61
- let media_2: string;
62
- export { media_2 as media };
63
- }
64
- namespace style {
65
- let media_3: string;
66
- export { media_3 as media };
67
- }
68
- namespace textarea {
69
- let wrap: string;
70
- }
71
- namespace track {
72
- let kind: string;
73
- }
74
- }
75
- export const executableScriptsMimetypes: Set<string>;
76
- export const keepScriptsMimetypes: Set<string>;
77
- export const jsonScriptTypes: Set<string>;
78
- export const isSimpleBoolean: Set<string>;
79
- export const isBooleanValue: Set<string>;
80
- export const collapsibleValues: Map<string, Set<string>>;
81
- export const srcsetElements: Set<string>;
82
- export const optionalStartTags: Set<string>;
83
- export const optionalEndTags: Set<string>;
84
- export const headerElements: Set<string>;
85
- export const descriptionElements: Set<string>;
86
- export const pBlockElements: Set<string>;
87
- export const pInlineElements: Set<string>;
88
- export const rubyEndTagOmission: Set<string>;
89
- export const rubyRtcEndTagOmission: Set<string>;
90
- export const optionElements: Set<string>;
91
- export const tableContentElements: Set<string>;
92
- export const tableSectionElements: Set<string>;
93
- export const cellElements: Set<string>;
94
- export const topLevelElements: Set<string>;
95
- export const compactElements: Set<string>;
96
- export const looseElements: Set<string>;
97
- export const trailingElements: Set<string>;
98
- export const htmlElements: Set<string>;
99
- export const reEmptyAttribute: RegExp;
100
- export const specialContentElements: Set<string>;
1
+ declare const RE_WS_START: RegExp;
2
+ declare const RE_WS_END: RegExp;
3
+ declare const RE_ALL_WS_NBSP: RegExp;
4
+ declare const RE_NBSP_LEADING_GROUP: RegExp;
5
+ declare const RE_NBSP_LEAD_GROUP: RegExp;
6
+ declare const RE_NBSP_TRAILING_GROUP: RegExp;
7
+ declare const RE_NBSP_TRAILING_STRIP: RegExp;
8
+ declare const RE_EVENT_ATTR_DEFAULT: RegExp;
9
+ declare const RE_CAN_REMOVE_ATTR_QUOTES: RegExp;
10
+ declare const RE_TRAILING_SEMICOLON: RegExp;
11
+ declare const RE_AMP_ENTITY: RegExp;
12
+ declare const RE_LEGACY_ENTITIES: RegExp;
13
+ declare const RE_ESCAPE_LT: RegExp;
14
+ declare const RE_ATTR_WS_CHECK: RegExp;
15
+ declare const RE_ATTR_WS_COLLAPSE: RegExp;
16
+ declare const RE_ATTR_WS_TRIM: RegExp;
17
+ declare const inlineElementsToKeepWhitespaceAround: Set<string>;
18
+ declare const inlineElementsToKeepWhitespaceWithin: Set<string>;
19
+ declare const inlineElementsToKeepWhitespace: Set<string>;
20
+ declare const formControlElements: Set<string>;
21
+ declare const generalDefaults: {
22
+ autocorrect: string;
23
+ fetchpriority: string;
24
+ loading: string;
25
+ popovertargetaction: string;
26
+ };
27
+ declare const tagDefaults: {
28
+ area: {
29
+ shape: string;
30
+ };
31
+ button: {
32
+ type: string;
33
+ };
34
+ form: {
35
+ enctype: string;
36
+ method: string;
37
+ };
38
+ html: {
39
+ dir: string;
40
+ };
41
+ img: {
42
+ decoding: string;
43
+ };
44
+ input: {
45
+ colorspace: string;
46
+ type: string;
47
+ };
48
+ link: {
49
+ media: string;
50
+ };
51
+ marquee: {
52
+ behavior: string;
53
+ direction: string;
54
+ };
55
+ meta: {
56
+ media: string;
57
+ };
58
+ source: {
59
+ media: string;
60
+ };
61
+ style: {
62
+ media: string;
63
+ };
64
+ textarea: {
65
+ wrap: string;
66
+ };
67
+ track: {
68
+ kind: string;
69
+ };
70
+ };
71
+ declare const executableScriptsMimetypes: Set<string>;
72
+ declare const keepScriptsMimetypes: Set<string>;
73
+ declare const isSimpleBoolean: Set<string>;
74
+ declare const isBooleanValue: Set<string>;
75
+ declare const collapsibleValues: Map<string, Set<string>>;
76
+ declare const srcsetElements: Set<string>;
77
+ declare const jsonScriptTypes: Set<string>;
78
+ declare const optionalStartTags: Set<string>;
79
+ declare const optionalEndTags: Set<string>;
80
+ declare const headerElements: Set<string>;
81
+ declare const descriptionElements: Set<string>;
82
+ declare const pBlockElements: Set<string>;
83
+ declare const pInlineElements: Set<string>;
84
+ declare const rubyEndTagOmission: Set<string>;
85
+ declare const rubyRtcEndTagOmission: Set<string>;
86
+ declare const optionElements: Set<string>;
87
+ declare const tableContentElements: Set<string>;
88
+ declare const tableSectionElements: Set<string>;
89
+ declare const cellElements: Set<string>;
90
+ declare const topLevelElements: Set<string>;
91
+ declare const compactElements: Set<string>;
92
+ declare const looseElements: Set<string>;
93
+ declare const trailingElements: Set<string>;
94
+ declare const htmlElements: Set<string>;
95
+ declare const reEmptyAttribute: RegExp;
96
+ declare const specialContentElements: Set<string>;
97
+ export { RE_WS_START, RE_WS_END, RE_ALL_WS_NBSP, RE_NBSP_LEADING_GROUP, RE_NBSP_LEAD_GROUP, RE_NBSP_TRAILING_GROUP, RE_NBSP_TRAILING_STRIP, RE_EVENT_ATTR_DEFAULT, RE_CAN_REMOVE_ATTR_QUOTES, RE_TRAILING_SEMICOLON, RE_AMP_ENTITY, RE_LEGACY_ENTITIES, RE_ESCAPE_LT, RE_ATTR_WS_CHECK, RE_ATTR_WS_COLLAPSE, RE_ATTR_WS_TRIM, inlineElementsToKeepWhitespaceAround, inlineElementsToKeepWhitespaceWithin, inlineElementsToKeepWhitespace, formControlElements, generalDefaults, tagDefaults, executableScriptsMimetypes, keepScriptsMimetypes, jsonScriptTypes, isSimpleBoolean, isBooleanValue, collapsibleValues, srcsetElements, optionalStartTags, optionalEndTags, headerElements, descriptionElements, pBlockElements, pInlineElements, rubyEndTagOmission, rubyRtcEndTagOmission, optionElements, tableContentElements, tableSectionElements, cellElements, topLevelElements, compactElements, looseElements, trailingElements, htmlElements, reEmptyAttribute, specialContentElements };
101
98
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/lib/constants.js"],"names":[],"mappings":"AAEA,iCAAoC;AACpC,+BAAkC;AAClC,oCAA2C;AAC3C,2CAAmD;AACnD,wCAA8C;AAC9C,4CAAkD;AAClD,4CAA2C;AAC3C,2CAA8C;AAC9C,+CAA0D;AAC1D,2CAAmC;AACnC,mCAA4C;AAC5C,wCAAwqB;AACxqB,kCAA0B;AAC1B,sCAAuC;AACvC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B,CAAC;AAErD,QAAA,MAAM,cAAc,aAAkC,CAAC;AAEvD,QAAA,MAAM,oBAAoB,aAA8B,CAAC;AAEzD,QAAA,MAAM,oBAAoB,aAAuC,CAAC;AAElE,QAAA,MAAM,YAAY,aAAwB,CAAC;AAE3C,QAAA,MAAM,gBAAgB,aAAoC,CAAC;AAE3D,QAAA,MAAM,eAAe,aAA4B,CAAC;AAElD,QAAA,MAAM,aAAa,aAA2C,CAAC;AAE/D,QAAA,MAAM,gBAAgB,aAA2B,CAAC;AAElD,QAAA,MAAM,YAAY,aAAgwC,CAAC;AAInxC,QAAA,MAAM,gBAAgB,QAE+B,CAAC;AAItD,QAAA,MAAM,sBAAsB,aAA+B,CAAC;AAI5D,OAAO,EAEL,WAAW,EACX,SAAS,EACT,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACrB,aAAa,EACb,kBAAkB,EAClB,YAAY,EACZ,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EAEf,oCAAoC,EACpC,oCAAoC,EACpC,8BAA8B,EAC9B,mBAAmB,EAGnB,eAAe,EACf,WAAW,EAGX,0BAA0B,EAC1B,oBAAoB,EACpB,eAAe,EAGf,eAAe,EACf,cAAc,EACd,iBAAiB,EAGjB,cAAc,EAGd,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,cAAc,EACd,oBAAoB,EACpB,oBAAoB,EACpB,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,YAAY,EAGZ,gBAAgB,EAChB,sBAAsB,EACvB,CAAC"}
@@ -1,24 +1,25 @@
1
+ import type { ProcessedOptions } from './options.js';
1
2
  /** @import { ProcessedOptions } from './options.js' */
2
3
  /**
3
4
  * @param {string} text
4
5
  * @param {string} [type]
5
6
  */
6
- export function wrapCSS(text: string, type?: string): string;
7
+ declare function wrapCSS(text: string, type?: string): string;
7
8
  /**
8
9
  * @param {string} text
9
10
  * @param {string} [type]
10
11
  */
11
- export function unwrapCSS(text: string, type?: string): string;
12
+ declare function unwrapCSS(text: string, type?: string): string;
12
13
  /**
13
14
  * @param {string} text
14
15
  * @param {{continueOnMinifyError?: boolean, log?: Function}} options
15
16
  */
16
- export function minifyJson(text: string, options: {
17
+ declare function minifyJson(text: string, options: {
17
18
  continueOnMinifyError?: boolean;
18
19
  log?: Function;
19
20
  }): string;
20
21
  /** @param {Array<{name: string, value?: string}>} attrs */
21
- export function hasJsonScriptType(attrs: Array<{
22
+ declare function hasJsonScriptType(attrs: Array<{
22
23
  name: string;
23
24
  value?: string;
24
25
  }>): boolean;
@@ -28,9 +29,9 @@ export function hasJsonScriptType(attrs: Array<{
28
29
  * @param {Array<{name: string, value?: string | undefined}>} currentAttrs
29
30
  * @param {Function} minifyHTML
30
31
  */
31
- export function processScript(text: string, options: ProcessedOptions, currentAttrs: Array<{
32
+ declare function processScript(text: string, options: ProcessedOptions, currentAttrs: Array<{
32
33
  name: string;
33
34
  value?: string | undefined;
34
35
  }>, minifyHTML: Function): Promise<any>;
35
- import type { ProcessedOptions } from './options.js';
36
+ export { wrapCSS, unwrapCSS, minifyJson, hasJsonScriptType, processScript };
36
37
  //# sourceMappingURL=content.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/lib/content.js"],"names":[],"mappings":"AAKA,uDAAuD;AAMvD;;;GAGG;AACH,8BAHW,MAAM,SACN,MAAM,UAWhB;AAED;;;GAGG;AACH,gCAHW,MAAM,SACN,MAAM,UAahB;AAID;;;GAGG;AACH,iCAHW,MAAM,WACN;IAAC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,WAAU;CAAC,UAa3D;AAED,2DAA2D;AAC3D,yCADY,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM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,44 @@
1
+ import type { HTMLAttribute } from './attributes.js';
2
+ import type { ProcessedOptions } from './options.js';
1
3
  /** @import { HTMLAttribute } from './attributes.js' */
2
4
  /** @import { ProcessedOptions } from './options.js' */
3
5
  /**
4
6
  * @param {string} optionalStartTag
5
7
  * @param {string} tag
6
8
  */
7
- export function canRemoveParentTag(optionalStartTag: string, tag: string): boolean;
9
+ declare function canRemoveParentTag(optionalStartTag: string, tag: string): boolean;
8
10
  /**
9
11
  * @param {string} optionalEndTag
10
12
  * @param {string} tag
11
13
  */
12
- export function isStartTagMandatory(optionalEndTag: string, tag: string): boolean;
14
+ declare function isStartTagMandatory(optionalEndTag: string, tag: string): boolean;
13
15
  /**
14
16
  * @param {string} optionalEndTag
15
17
  * @param {string} tag
16
18
  */
17
- export function canRemovePrecedingTag(optionalEndTag: string, tag: string): boolean;
19
+ declare function canRemovePrecedingTag(optionalEndTag: string, tag: string): boolean;
18
20
  /**
19
21
  * @param {string} tag
20
22
  * @param {HTMLAttribute[]} attrs
21
23
  */
22
- export function canRemoveElement(tag: string, attrs: HTMLAttribute[]): boolean;
24
+ declare function canRemoveElement(tag: string, attrs: HTMLAttribute[]): boolean;
23
25
  /**
24
26
  * @param {string} str - Tag name or HTML-like element spec (e.g., “td” or “<span aria-hidden='true'>”)
25
27
  * @param {ProcessedOptions} options - Options object for name normalization
26
28
  * @returns {{tag: string, attrs: Object.<string, string|undefined>|null}|null} Parsed spec or null if invalid
27
29
  */
28
- export function parseElementSpec(str: string, options: ProcessedOptions): {
30
+ declare function parseElementSpec(str: string, options: ProcessedOptions): {
29
31
  tag: string;
30
- attrs: {
31
- [x: string]: string | undefined;
32
- } | null;
32
+ attrs: Record<string, string | undefined> | null;
33
33
  } | null;
34
34
  /**
35
35
  * @param {string[]} input - Array of element specifications from `removeEmptyElementsExcept` option
36
36
  * @param {ProcessedOptions} options - Options object for parsing
37
37
  * @returns {Array<{tag: string, attrs: Object.<string, string|undefined>|null}>} Array of parsed element specs
38
38
  */
39
- export function parseRemoveEmptyElementsExcept(input: string[], options: ProcessedOptions): Array<{
39
+ declare function parseRemoveEmptyElementsExcept(input: string[], options: ProcessedOptions): Array<{
40
40
  tag: string;
41
- attrs: {
42
- [x: string]: string | undefined;
43
- } | null;
41
+ attrs: Record<string, string | undefined> | null;
44
42
  }>;
45
43
  /**
46
44
  * @param {string} tag - Element tag name
@@ -48,12 +46,9 @@ export function parseRemoveEmptyElementsExcept(input: string[], options: Process
48
46
  * @param {Array<{tag: string, attrs: Object.<string, string|undefined>|null}>} preserveList - Parsed preserve specs
49
47
  * @returns {boolean} True if the empty element should be preserved
50
48
  */
51
- export function shouldPreserveEmptyElement(tag: string, attrs: HTMLAttribute[], preserveList: Array<{
49
+ declare function shouldPreserveEmptyElement(tag: string, attrs: HTMLAttribute[], preserveList: Array<{
52
50
  tag: string;
53
- attrs: {
54
- [x: string]: string | undefined;
55
- } | null;
51
+ attrs: Record<string, string | undefined> | null;
56
52
  }>): boolean;
57
- import type { HTMLAttribute } from './attributes.js';
58
- import type { ProcessedOptions } from './options.js';
53
+ export { canRemoveParentTag, isStartTagMandatory, canRemovePrecedingTag, canRemoveElement, parseElementSpec, parseRemoveEmptyElementsExcept, shouldPreserveEmptyElement };
59
54
  //# sourceMappingURL=elements.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"elements.d.ts","sourceRoot":"","sources":["../../../src/lib/elements.js"],"names":[],"mappings":"AAaA,uDAAuD;AACvD,uDAAuD;AAIvD;;;GAGG;AACH,qDAHW,MAAM,OACN,MAAM,WAehB;AAED;;;GAGG;AACH,oDAHW,MAAM,OACN,MAAM,WAUhB;AAED;;;GAGG;AACH,sDAHW,MAAM,OACN,MAAM,WAqChB;AAID;;;GAGG;AACH,sCAHW,MAAM,SACN,aAAa,EAAE,WAwCzB;AAED;;;;GAIG;AACH,sCAJW,MAAM,WACN,gBAAgB,GACd;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE;YAAQ,MAAM,GAAE,MA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