@fusion.dev/helix-diagnostics 0.169.0 → 0.170.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
@@ -313,6 +313,7 @@ diagnostics counts it by kind and tag. None fails a CI job.
313
313
  | `picture-in-picture-refused` | The browser refused picture in picture |
314
314
  | `refused-length` | A grid's `min` is not a length it can write, so it lays out by `columns` |
315
315
  | `removed-callback` | A React prop is a callback that was removed and never ran from JSX. Development builds only (the `development` export condition) |
316
+ | `served-rows-differ` | A data table's first drawn page differs from the rows the page served, so the rows change once it draws. Development builds only (the `development` export condition) |
316
317
  | `solid-handler-syntax` | A React prop uses Solid's `on:` syntax. Development builds only (the `development` export condition) |
317
318
  | `stencil-regions-unused` | A graph stencil's regions could not be used |
318
319
  | `stencil-without-inside` | A graph stencil has no inside to place the notes in |
package/dist/analyze.js CHANGED
@@ -7,9 +7,32 @@ export const targets = (selector) => {
7
7
  }
8
8
  return [...found];
9
9
  };
10
+ const bare = (selector) => {
11
+ let out = '';
12
+ for (let at = 0; at < selector.length; at += 1) {
13
+ const held = /^:(?:has|not)\(/.exec(selector.slice(at));
14
+ if (held === null) {
15
+ out += selector[at];
16
+ continue;
17
+ }
18
+ let depth = 0;
19
+ for (at += held[0].length - 1; at < selector.length; at += 1) {
20
+ if (selector[at] === '(') {
21
+ depth += 1;
22
+ }
23
+ else if (selector[at] === ')') {
24
+ depth -= 1;
25
+ if (depth === 0) {
26
+ break;
27
+ }
28
+ }
29
+ }
30
+ }
31
+ return out;
32
+ };
10
33
  export const parts = (selector) => {
11
34
  const found = [];
12
- for (const match of selector.matchAll(/(helix-[a-z0-9-]+)((?:[^\s>+~,]*))::part\(\s*([^)]*?)\s*\)/g)) {
35
+ for (const match of bare(selector).matchAll(/(helix-[a-z0-9-]+)((?:[^\s>+~,]*))::part\(\s*([^)]*?)\s*\)/g)) {
13
36
  const names = (match[3] ?? '').split(/\s+/).filter(Boolean);
14
37
  if (match[1] && names.length > 0) {
15
38
  found.push({ names, tag: match[1] });
package/dist/version.d.ts CHANGED
@@ -6,4 +6,4 @@
6
6
  * release, so the two never disagree; a spec beside this holds them to it.
7
7
  * Nothing else in the running code knows which release it is.
8
8
  */
9
- export declare const VERSION = "0.169.0";
9
+ export declare const VERSION = "0.170.0";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.169.0';
1
+ export const VERSION = '0.170.0';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fusion.dev/helix-diagnostics",
3
3
  "description": "Finds the Helix mistakes that are valid CSS: dead parts, misnamed hooks, two copies of the library.",
4
- "version": "0.169.0",
4
+ "version": "0.170.0",
5
5
  "license": "MIT",
6
6
  "author": "Ross Sheppard <ross.sheppard@fusion.dev>",
7
7
  "repository": {
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "bugs": "https://github.com/project-fusion/fusion/issues",
35
35
  "devDependencies": {
36
- "@fusion.dev/helix-testing": "0.169.0",
36
+ "@fusion.dev/helix-testing": "0.170.0",
37
37
  "@types/bun": "^1.4.2"
38
38
  },
39
39
  "homepage": "https://fusion.dev",