@urbicon-ui/blocks 6.40.3 → 6.40.4

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,19 +1,19 @@
1
1
  import { type SlotNames, type VariantProps } from '../../utils/variants.js';
2
2
  export declare const tooltipVariants: ((props?: {
3
3
  open?: boolean | undefined;
4
- intent?: "info" | "primary" | "secondary" | "success" | "warning" | "danger" | "neutral" | undefined;
4
+ intent?: "primary" | "secondary" | "success" | "warning" | "danger" | "neutral" | "info" | undefined;
5
5
  size?: "sm" | "md" | "lg" | undefined;
6
6
  } | undefined) => {
7
7
  base: (props?: ({
8
8
  open?: boolean | undefined;
9
- intent?: "info" | "primary" | "secondary" | "success" | "warning" | "danger" | "neutral" | undefined;
9
+ intent?: "primary" | "secondary" | "success" | "warning" | "danger" | "neutral" | "info" | undefined;
10
10
  size?: "sm" | "md" | "lg" | undefined;
11
11
  } & {
12
12
  class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
13
13
  }) | undefined) => string;
14
14
  arrow: (props?: ({
15
15
  open?: boolean | undefined;
16
- intent?: "info" | "primary" | "secondary" | "success" | "warning" | "danger" | "neutral" | undefined;
16
+ intent?: "primary" | "secondary" | "success" | "warning" | "danger" | "neutral" | "info" | undefined;
17
17
  size?: "sm" | "md" | "lg" | undefined;
18
18
  } & {
19
19
  class?: string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | (string | number | false | /*elided*/ any | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined)[] | Record<string, boolean | null | undefined> | null | undefined;
@@ -23,8 +23,14 @@
23
23
  * (e.g. Sunset shifts it warm, Ocean cool) so that
24
24
  * surfaces, text and borders harmonise instead of
25
25
  * reading as a fixed cool grey. Only the hue shifts;
26
- * lightness and chroma match the foundation ramp, so
27
- * WCAG contrast is preserved.
26
+ * lightness and chroma match the foundation ramp. On this
27
+ * near-zero-chroma chassis ramp (chroma ≈ 0.01) that keeps
28
+ * WCAG contrast effectively unchanged (measured 5.95–6.05:1
29
+ * across every theme). It is NOT a general rule: at higher
30
+ * chroma, luminance still moves with hue at constant L/C
31
+ * (an accent ramp can slip under AA that way), which is why
32
+ * contrast.test.ts measures every theme rather than trusting
33
+ * this comment.
28
34
  *
29
35
  * Because surface-*, text-* and border-* all derive from --color-neutral-*
30
36
  * in semantic.css, re-tinting that one ramp flows through the whole chassis
@@ -103,10 +103,12 @@ const ROUTE_TARGET_TIMEOUT_MS = 4000;
103
103
  * `route` is a normalized pathname (leading `/`), so the suffix test lands on a real segment
104
104
  * boundary — `/myexpenses` does not end with `/expenses`.
105
105
  */
106
+ /** Drop a single trailing slash (except the root) — the one normalization both the
107
+ * own-vs-foreign heuristic and the pre-navigation skip agree on. */
108
+ const stripTrailingSlash = (s) => (s.length > 1 && s.endsWith('/') ? s.slice(0, -1) : s);
106
109
  function looksLikeNormalizedRoute(landed, route) {
107
- const stripSlash = (s) => (s.length > 1 && s.endsWith('/') ? s.slice(0, -1) : s);
108
- const l = stripSlash(landed);
109
- const r = stripSlash(route);
110
+ const l = stripTrailingSlash(landed);
111
+ const r = stripTrailingSlash(route);
110
112
  return l === r || l.endsWith(r);
111
113
  }
112
114
  let tourIdCounter = 0;
@@ -510,7 +512,17 @@ export class GuideController {
510
512
  const route = this.currentStep?.route;
511
513
  if (route == null)
512
514
  return;
513
- if (route === this.#navSource.current())
515
+ // Already on the (logical) route nothing to do. Normalize only a trailing
516
+ // slash before comparing, NOT the full own-vs-foreign heuristic: under a
517
+ // normalizing router the current path is `/expenses/` for a step route of
518
+ // `/expenses`, and an exact compare would re-navigate to the same logical
519
+ // route — a router that no-op's that `goto` emits no report, leaving a
520
+ // targetless expectation armed (a spurious DEV foreign-nav warning). The
521
+ // heuristic's `endsWith` prefix match is deliberately NOT used here: it would
522
+ // treat a genuine `/reports/summary` → `/summary` advance as "already there"
523
+ // and silently strand the tour. Prefix/locale forms are still recognized as
524
+ // OWN *after* navigating, on the async path (where they are DEV-warned).
525
+ if (stripTrailingSlash(route) === stripTrailingSlash(this.#navSource.current()))
514
526
  return;
515
527
  if (!this.#navigate) {
516
528
  if (this.#dev) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@urbicon-ui/blocks",
3
- "version": "6.40.3",
3
+ "version": "6.40.4",
4
4
  "description": "Svelte 5 UI component library with Tailwind CSS 4, OKLCH design tokens and zero runtime dependencies",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -93,8 +93,8 @@
93
93
  "@sveltejs/package": "^2.5.8",
94
94
  "@sveltejs/vite-plugin-svelte": "^7.0.0",
95
95
  "@tailwindcss/vite": "^4.3.1",
96
- "@urbicon-ui/i18n": "6.40.3",
97
- "@urbicon-ui/shared-types": "6.40.3",
96
+ "@urbicon-ui/i18n": "6.40.4",
97
+ "@urbicon-ui/shared-types": "6.40.4",
98
98
  "prettier": "^3.8.4",
99
99
  "prettier-plugin-svelte": "^4.1.1",
100
100
  "prettier-plugin-tailwindcss": "^0.8.0",