@gem-sdk/hash-class-names 1.22.26 → 1.22.27

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/cjs/index.js CHANGED
@@ -5,7 +5,8 @@ var cssEscape = require('./css-escape.js');
5
5
  var cssParser = require('./css-parser.js');
6
6
 
7
7
  const hashClassNames = (html, css, options)=>{
8
- const { html: htmlWithoutLiquid, arrayMatch } = replaceLiquidToBKPlaceholder(html);
8
+ const stringBreak = '<!-- End extra file -->';
9
+ const { html: htmlWithoutLiquid, arrayMatch } = replaceLiquidToBKPlaceholder(html.join(stringBreak));
9
10
  const documentFragment = parse5.parseFragment(htmlWithoutLiquid);
10
11
  const jsonHTML = documentFragment.childNodes;
11
12
  if (jsonHTML?.length) {
@@ -161,11 +162,11 @@ const hashClassNames = (html, css, options)=>{
161
162
  }
162
163
  newHTML = replaceBKPlaceholderToLiquid(newHTML, arrayMatch);
163
164
  return options?.getOrderClass ? {
164
- html: newHTML,
165
+ html: newHTML.split(stringBreak),
165
166
  css: newCSS,
166
167
  orderClass: options?.getOrderClass ? orderClasses : []
167
168
  } : {
168
- html: newHTML,
169
+ html: newHTML.split(stringBreak),
169
170
  css: newCSS
170
171
  };
171
172
  }
package/dist/esm/index.js CHANGED
@@ -3,7 +3,8 @@ import { cssEscape } from './css-escape.js';
3
3
  import { cssToJson, jsonToCss } from './css-parser.js';
4
4
 
5
5
  const hashClassNames = (html, css, options)=>{
6
- const { html: htmlWithoutLiquid, arrayMatch } = replaceLiquidToBKPlaceholder(html);
6
+ const stringBreak = '<!-- End extra file -->';
7
+ const { html: htmlWithoutLiquid, arrayMatch } = replaceLiquidToBKPlaceholder(html.join(stringBreak));
7
8
  const documentFragment = parseFragment(htmlWithoutLiquid);
8
9
  const jsonHTML = documentFragment.childNodes;
9
10
  if (jsonHTML?.length) {
@@ -159,11 +160,11 @@ const hashClassNames = (html, css, options)=>{
159
160
  }
160
161
  newHTML = replaceBKPlaceholderToLiquid(newHTML, arrayMatch);
161
162
  return options?.getOrderClass ? {
162
- html: newHTML,
163
+ html: newHTML.split(stringBreak),
163
164
  css: newCSS,
164
165
  orderClass: options?.getOrderClass ? orderClasses : []
165
166
  } : {
166
- html: newHTML,
167
+ html: newHTML.split(stringBreak),
167
168
  css: newCSS
168
169
  };
169
170
  }
@@ -5,12 +5,12 @@ type Node = {
5
5
  }[];
6
6
  childNodes?: Node[];
7
7
  };
8
- declare const hashClassNames: (html: string, css: string, options?: {
8
+ declare const hashClassNames: (html: string[], css: string, options?: {
9
9
  ignoreClasses?: string[];
10
10
  classList?: string[];
11
11
  getOrderClass?: boolean;
12
12
  }) => {
13
- html: string;
13
+ html: string[];
14
14
  css: string;
15
15
  orderClass?: {
16
16
  oldClass: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/hash-class-names",
3
- "version": "1.22.26",
3
+ "version": "1.22.27",
4
4
  "license": "MIT",
5
5
  "main": "dist/cjs/index.js",
6
6
  "scripts": {