@scalebun/web 1.5.0 → 1.5.1

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.
@@ -5,5 +5,5 @@
5
5
  * `__SCALEBUN_VERSION__` define; both paths therefore report the same real version, and neither
6
6
  * invents one.
7
7
  */
8
- export declare const PKG_VERSION = "1.5.0";
8
+ export declare const PKG_VERSION = "1.5.1";
9
9
  //# sourceMappingURL=version.generated.d.ts.map
@@ -5,5 +5,5 @@
5
5
  * `__SCALEBUN_VERSION__` define; both paths therefore report the same real version, and neither
6
6
  * invents one.
7
7
  */
8
- export const PKG_VERSION = '1.5.0';
8
+ export const PKG_VERSION = '1.5.1';
9
9
  //# sourceMappingURL=version.generated.js.map
@@ -40,11 +40,5 @@ export declare function setUiState(name: string, value: string): void;
40
40
  * follow the visitor onto a surface where they mean nothing.
41
41
  */
42
42
  export declare function clearUiState(name?: string): void;
43
- /**
44
- * The state signature for the interaction happening RIGHT NOW.
45
- *
46
- * Read synchronously inside the event handler, never reconstructed afterwards: by the time a menu has
47
- * closed, the DOM no longer knows it was open when the click landed.
48
- */
49
43
  export declare function uiStateSignature(): string | undefined;
50
44
  //# sourceMappingURL=uiState.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"uiState.d.ts","sourceRoot":"","sources":["../../../src/features/journey/uiState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAaH,6DAA6D;AAC7D,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAI5D;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAGhD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,SAAS,CA2BrD"}
1
+ {"version":3,"file":"uiState.d.ts","sourceRoot":"","sources":["../../../src/features/journey/uiState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAaH,6DAA6D;AAC7D,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAI5D;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAGhD;AA4BD,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,SAAS,CA2BrD"}
@@ -64,6 +64,25 @@ export function clearUiState(name) {
64
64
  * Read synchronously inside the event handler, never reconstructed afterwards: by the time a menu has
65
65
  * closed, the DOM no longer knows it was open when the click landed.
66
66
  */
67
+ /**
68
+ * DEVELOPMENT OVERLAYS ARE NOT THE PRODUCT.
69
+ *
70
+ * Measured on a real app: 59 of 60 captured keyframes reported exactly one state dimension, and it
71
+ * was `nextjs-dev-tools-menu` — the framework's own dev-tools button, the only element on the page
72
+ * exposing `aria-expanded` with an id. So the entire state lane was describing a development tool
73
+ * while the app's own drawer went unrecorded.
74
+ *
75
+ * WHY IT HAS TO BE EXCLUDED AT CAPTURE rather than filtered later. A dimension is part of the state
76
+ * KEY: `sidebar:closed` and `nextjs-dev-tools-menu:closed;sidebar:closed` are two different states,
77
+ * so leaving it in fragments every count. It also spends the 96-character budget — 28 of it — and
78
+ * sorts before most real names, so a page with several dimensions could lose a real one to make room
79
+ * for a dev tool.
80
+ *
81
+ * DELIBERATELY A PREFIX LIST, not a heuristic. Matching on class names or visibility was rejected
82
+ * elsewhere in this file for inventing states; the same objection applies to guessing at what is
83
+ * "probably a dev tool". These are exact, published names owned by the frameworks that inject them.
84
+ */
85
+ const DEV_OVERLAY = /^(nextjs-|__next|vercel-live)/;
67
86
  export function uiStateSignature() {
68
87
  const dims = new Map();
69
88
  document.querySelectorAll('[aria-expanded],dialog').forEach((e) => {
@@ -73,7 +92,7 @@ export function uiStateSignature() {
73
92
  // doing the controlling. A dimension with no stable name is skipped: a generated one would
74
93
  // fragment the same state across every page load.
75
94
  const n = clean(e.getAttribute('data-scalebun-state') || e.getAttribute('aria-controls') || e.id);
76
- if (n)
95
+ if (n && !DEV_OVERLAY.test(n))
77
96
  dims.set(n, v);
78
97
  });
79
98
  for (const [k, v] of explicit)
@@ -1 +1 @@
1
- {"version":3,"file":"uiState.js","sourceRoot":"","sources":["../../../src/features/journey/uiState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,qEAAqE;AACrE,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAkB,CAAC;AAE3C;;;;GAIG;AACH,MAAM,KAAK,GAAG,CAAC,CAAS,EAAU,EAAE,CAClC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAE3E,6DAA6D;AAC7D,MAAM,UAAU,UAAU,CAAC,IAAY,EAAE,KAAa;IACpD,MAAM,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;IACtB,MAAM,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;IACvB,IAAI,CAAC,IAAI,CAAC;QAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACjC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAC,IAAa;IACxC,IAAI,IAAI,KAAK,SAAS;QAAE,QAAQ,CAAC,KAAK,EAAE,CAAC;;QACpC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;AACpC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB;IAC9B,MAAM,IAAI,GAAG,IAAI,GAAG,EAAkB,CAAC;IACvC,QAAQ,CAAC,gBAAgB,CAAC,wBAAwB,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