@zazz-ui/core 0.14.2 → 0.14.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  Notable changes to `@zazz-ui/core`, grouped by primitive or base scope under each version. The grouping is load-bearing: the `zazz-ui` CLI's `update` and `diff` print only the slice that touches the files you've vendored. Breaking entries are flagged **BREAKING** with a one-line migration note. During 0.x, a minor bump means at least one breaking entry (ADR-0010 has the full definition of "breaking").
2
2
 
3
+ ## 0.14.3 (2026-11-18)
4
+
5
+ ### base
6
+
7
+ - `findHeadBlock` and the head-block comparison in `head.ts` (behind the language server's head-block fixes and the CLI) no longer use regexes that CodeQL flags as polynomial on long whitespace runs. Results are unchanged.
8
+
3
9
  ## 0.14.2 (2026-11-17)
4
10
 
5
11
  ### drawer
package/README.md CHANGED
@@ -20,7 +20,7 @@ import "@zazz-ui/core"; // custom elements and shared behaviors
20
20
  From a CDN, the script needs an import map for its one dependency and the Interest Invokers polyfill:
21
21
 
22
22
  ```html
23
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@zazz-ui/core@0.14.2/dist/zazz.css" />
23
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@zazz-ui/core@0.14.3/dist/zazz.css" />
24
24
  <script type="importmap">
25
25
  {
26
26
  "imports": {
@@ -32,7 +32,7 @@ From a CDN, the script needs an import map for its one dependency and the Intere
32
32
  type="module"
33
33
  src="https://cdn.jsdelivr.net/npm/invokers@2.2.2/dist/esm/production/interest.js"
34
34
  ></script>
35
- <script type="module" src="https://cdn.jsdelivr.net/npm/@zazz-ui/core@0.14.2/dist/zazz.js"></script>
35
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@zazz-ui/core@0.14.3/dist/zazz.js"></script>
36
36
  ```
37
37
 
38
38
  Use an exact version in CDN URLs. Under a strict `script-src`, give the import map and the theme script the response's nonce (`buildHead({ nonce })` does); the docs' [security page](https://zazz.sh/docs/install/security/) has the full policy, including `style-src-attr` for the utilities. The [installation guide](https://zazz.sh/docs/install/installation/) has the complete `<head>`, with fonts, the theme script, a per-primitive variant, and integrity hashes on every URL; `buildHead({ cdn: { version } })` from `@zazz-ui/core/head` returns the same markup. Each release also includes `dist/sri.json` with the SHA-384 hash of every published file.
package/dist/sri.json CHANGED
@@ -71,7 +71,7 @@
71
71
  "src/base/utilities.js": "sha384-/bREfylmbbEKfS1OMLpBtTP8dZZ4YVgJuXmY5k7bT15b2G0m0ijJyni9bJu0YgaP",
72
72
  "src/base/utils.js": "sha384-LYgZQdVhTZM9VrjMl/pn8005MC3zL6kqOodJEs4Xi0fPysol71QaYnq9egqgrUfh",
73
73
  "src/base/zazz-element.js": "sha384-dTk+HZujh1qWzZBaxgcZA1t01lvr311gYirU4RGX8utXCpTEGWGfiE28XGjBIAos",
74
- "src/head.js": "sha384-a1tYQhmmp7O/q6gEhWsRRuXzwEqByLKl5dAkbUkKf7HaPBqjpL4NeW2tc6Kt0yR6",
74
+ "src/head.js": "sha384-qsFhpXZXDDB5uTe1cZoUHo+Swt85lXYGdPK8G0d9qRiSJBwNgfmSRjH10MJUEUxH",
75
75
  "src/index.css": "sha384-mLMa5WjyDJiRcvPK0LtP83sWR2GPTC7Koay4v7F1iR5NgU4o/T/q2Uab7GCJKLh9",
76
76
  "src/index.js": "sha384-tKxj7/ptI/LHsCebZAPCQPAtgmVoUEnwfTcBPRBlOfb86vQJM98GNaG4P+jtGR+S",
77
77
  "src/manifest.js": "sha384-SK7NTDFsKfOYUSrAAPSat0MpAga/4RgGb0PnfVEB/wMLYlLGh6zW2VJCQRL4fycV",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zazz-ui/core",
3
- "version": "0.14.2",
3
+ "version": "0.14.3",
4
4
  "description": "Zazz Design Framework — a zero-build, semantic-token CSS + vanilla JS UI kit built on modern web standards.",
5
5
  "keywords": [
6
6
  "cascade-layers",
package/src/head.d.ts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oC;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,WAAW,CAAC;IACrB,wCAAwC;IACxC,MAAM,EAAE,MAAM,CAAC;CAChB;AAKD,yEAAyE;AACzE,wBAAgB,UAAU,CAAC,OAAO,GAAE,WAAgB,GAAG,MAAM,CAI5D;AAED,+FAA+F;AAC/F,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAiBjE;AAgBD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,WAAW,GACpB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAa1D;AAED,0FAA0F;AAC1F,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,MAAM,CAG1F"}
package/src/head.js CHANGED
@@ -330,7 +330,8 @@ export function findHeadBlock(html) {
330
330
  return undefined;
331
331
  }
332
332
  }
333
- const indent = /(?:^|\n)([ \t]*)$/.exec(html.slice(0, open.index))?.[1] ?? "";
333
+ const before = html.slice(html.lastIndexOf("\n", open.index - 1) + 1, open.index);
334
+ const indent = /^[ \t]*$/.test(before) ? before : "";
334
335
  return { markerStart: open.index, start, end, options, indent };
335
336
  }
336
337
  /**
@@ -338,11 +339,11 @@ export function findHeadBlock(html) {
338
339
  * void elements, and those differences don't make a head block out of date.
339
340
  */
340
341
  function normalizeHead(html) {
341
- return html
342
+ return (html
342
343
  .replace(/\s+/g, " ")
343
- .replace(/\s*\/>/g, ">")
344
- .replace(/\s+>/g, ">")
345
- .trim();
344
+ // Whitespace is one space by now, so ` ?` covers what `\s*` would.
345
+ .replace(/ ?\/?>/g, ">")
346
+ .trim());
346
347
  }
347
348
  /**
348
349
  * @description The edit that renders `head` between the page's markers,
package/src/head.ts CHANGED
@@ -516,7 +516,8 @@ export function findHeadBlock(html: string): HeadBlock | undefined {
516
516
  return undefined;
517
517
  }
518
518
  }
519
- const indent = /(?:^|\n)([ \t]*)$/.exec(html.slice(0, open.index))?.[1] ?? "";
519
+ const before = html.slice(html.lastIndexOf("\n", open.index - 1) + 1, open.index);
520
+ const indent = /^[ \t]*$/.test(before) ? before : "";
520
521
  return { markerStart: open.index, start, end, options, indent };
521
522
  }
522
523
 
@@ -525,11 +526,13 @@ export function findHeadBlock(html: string): HeadBlock | undefined {
525
526
  * void elements, and those differences don't make a head block out of date.
526
527
  */
527
528
  function normalizeHead(html: string): string {
528
- return html
529
- .replace(/\s+/g, " ")
530
- .replace(/\s*\/>/g, ">")
531
- .replace(/\s+>/g, ">")
532
- .trim();
529
+ return (
530
+ html
531
+ .replace(/\s+/g, " ")
532
+ // Whitespace is one space by now, so ` ?` covers what `\s*` would.
533
+ .replace(/ ?\/?>/g, ">")
534
+ .trim()
535
+ );
533
536
  }
534
537
 
535
538
  /**