@nadicodeai/ui 12.1.77 → 12.1.78

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.
@@ -17,7 +17,7 @@ type KpiCardDelta = {
17
17
  upIsGood?: boolean;
18
18
  /** A volume change keeps its arrow, which is a fact, and takes no tone, which would be a judgment. */
19
19
  neutral?: boolean;
20
- /** The whole comparison line in the reader's language, e.g. "vs August", "rispetto ad agosto". */
20
+ /** The whole comparison line in the reader's language, e.g. "vs August", "rispetto al mese di agosto". */
21
21
  comparison: string;
22
22
  /** The direction in the reader's language, for a screen reader. */
23
23
  directionLabel?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"kpi-card.d.ts","sourceRoot":"","sources":["../../src/components/kpi-card.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAW3D,OAAO,EAAyB,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAEtF;;;;;GAKG;AAEH,KAAK,gBAAgB,GAAG,cAAc,CAAC;AACvC,KAAK,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;AAEtD,KAAK,YAAY,GAAG;IAClB,2CAA2C;IAC3C,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,qEAAqE;IACrE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sGAAsG;IACtG,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kGAAkG;IAClG,UAAU,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAQF,iBAAS,OAAO,CAAC,EACf,KAAK,EACL,KAAK,EACL,KAAK,EACL,IAAI,EACJ,IAAgB,EAChB,MAAM,EACN,SAAS,GACV,EAAE;IACD,KAAK,EAAE,KAA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IACD,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,SAAS,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,qBA4CA;AAED,OAAO,EAAE,OAAO,EAAE,CAAC;AACnB,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,CAAC"}
@@ -14,8 +14,8 @@
14
14
  * hop cannot see is guessed at. That is the minimum that holds the package
15
15
  * repaint ban (`packages/design-system/DESIGN.md`, "Components") against the way
16
16
  * this repository actually authors classes — a tone table beside its component
17
- * and a lookup at the call site, as in
18
- * `apps/portal/src/components/portal-overview/overview-usage-tone.ts`. Without the
17
+ * and a lookup at the call site, as `VALUE_TONE_CLASS` is in
18
+ * `packages/ui/src/components/kpi-card.tsx`. Without the
19
19
  * hop, `<Card className={tones.warning} />` repaints a primitive and no rule
20
20
  * sees it; with it, the table's own values are read.
21
21
  *
@@ -103,7 +103,7 @@ function literalFragments(node, fragments, { skipPropertyKeys, context }) {
103
103
  literalFragments(node.callee.object, fragments, { skipPropertyKeys, context });
104
104
  return;
105
105
  }
106
- // `USAGE_TONE_CLASS[kpi.tone ?? "normal"]` selects a class string, it does
106
+ // `VALUE_TONE_CLASS[tone]` selects a class string, it does
107
107
  // not contain one: the names inside the lookup are keys. The hop reads the
108
108
  // table instead — any of its values can be the one selected — and the
109
109
  // property is never descended into.
@@ -1,31 +1,30 @@
1
1
  /*
2
2
  * Legacy Zod 3 APIs, in two sets that are enforced from two different places.
3
3
  *
4
- * UNANNOTATED — the four Zod itself leaves without a `@deprecated` tag.
5
- * Verified against zod 4.4.3's declarations: `nativeEnum` and `promise` carry
6
- * only prose, `.strict()` and `.strip()` carry only a "consider…" hint. No tag
7
- * means no type-aware rule can ever fire on them, so they are this rule's own
8
- * policy and are reported in every workspace.
4
+ * UNANNOTATED — the three the installed zod 4.6.5 leaves without a
5
+ * `@deprecated` tag: `promise` carries only prose, `.strict()` and `.strip()`
6
+ * carry only a "consider…" hint. No tag means no type-aware rule can fire on
7
+ * them, so they are this rule's own policy and are reported in every
8
+ * workspace.
9
9
  *
10
- * ANNOTATED — the rest, which Zod does tag `@deprecated`.
11
- * `@typescript-eslint/no-deprecated` reports those with the library's own
12
- * replacement text, but only where lint parses with type information. In this
13
- * repository that is `@nadicodeai/ui` alone: switching the Portal on measured
14
- * 10.4s → 25.8s per lint run and surfaced 15 unrelated findings (React's
15
- * `FormEvent`, vitest's `toThrowError`), so typed lint stays ui-only (#821).
16
- * The Portal and the website are where this repository writes most of its Zod,
17
- * so the names stay listed here for them — a second copy of an upstream
18
- * annotation, kept deliberately because the alternative is no coverage at all
19
- * in two of three workspaces (#822).
10
+ * ANNOTATED — the rest, which Zod does tag `@deprecated`, `nativeEnum`
11
+ * included. `@typescript-eslint/no-deprecated` reports those with the
12
+ * library's own replacement text, but only where it is turned on, and it needs
13
+ * type information. In this repository that is `@nadicodeai/ui` alone:
14
+ * switching the Portal on measured 10.4s → 25.8s per lint run and surfaced 15
15
+ * unrelated findings (React's `FormEvent`, vitest's `toThrowError`), so it
16
+ * stays ui-only (#821). The Portal and the website are where this repository
17
+ * writes most of its Zod, so the names stay listed here for them — a second
18
+ * copy of an upstream annotation, kept deliberately because the alternative is
19
+ * no coverage at all in two of three workspaces (#822).
20
20
  *
21
21
  * The split is a rule option: `upstreamAnnotated: "report"` (default) names
22
22
  * them, `"defer"` leaves them to the type-aware rule. `@nadicodeai/ui` selects
23
- * `"defer"` in the root config, so no file is reported twice.
23
+ * `"defer"` in the root config, so no tagged API is reported twice there.
24
24
  */
25
- const LEGACY_FACTORIES = new Map([
26
- ["nativeEnum", "z.enum()"],
27
- ["promise", "await the value before parsing it"],
28
- ]);
25
+ const LEGACY_FACTORIES = new Map([["promise", "await the value before parsing it"]]);
26
+
27
+ const UPSTREAM_ANNOTATED_FACTORIES = new Map([["nativeEnum", "z.enum()"]]);
29
28
 
30
29
  const LEGACY_METHODS = {
31
30
  object: new Map([
@@ -73,9 +72,19 @@ const UPSTREAM_ANNOTATED_METHODS = {
73
72
  ]),
74
73
  };
75
74
 
76
- /** The method table a run consults: the four always, the annotated names unless deferred. */
75
+ function defersAnnotated(context) {
76
+ return context.options?.[0]?.upstreamAnnotated === "defer";
77
+ }
78
+
79
+ /** The factory table a run consults: the unannotated always, the annotated unless deferred. */
80
+ function legacyFactories(context) {
81
+ if (defersAnnotated(context)) return LEGACY_FACTORIES;
82
+ return new Map([...UPSTREAM_ANNOTATED_FACTORIES, ...LEGACY_FACTORIES]);
83
+ }
84
+
85
+ /** The method table a run consults: the unannotated always, the annotated unless deferred. */
77
86
  function legacyMethods(context) {
78
- if (context.options?.[0]?.upstreamAnnotated === "defer") return LEGACY_METHODS;
87
+ if (defersAnnotated(context)) return LEGACY_METHODS;
79
88
  const merged = {};
80
89
  for (const family of new Set([
81
90
  ...Object.keys(LEGACY_METHODS),
@@ -120,6 +129,7 @@ export const noDeprecatedZodApi = {
120
129
 
121
130
  create(context) {
122
131
  const sourceCode = context.sourceCode;
132
+ const factories = legacyFactories(context);
123
133
  const methods = legacyMethods(context);
124
134
  const zodBindings = new Set();
125
135
 
@@ -177,7 +187,7 @@ export const noDeprecatedZodApi = {
177
187
  }
178
188
 
179
189
  if (node.callee.object.type === "Identifier" && isZodBinding(node.callee.object)) {
180
- const replacement = LEGACY_FACTORIES.get(method);
190
+ const replacement = factories.get(method);
181
191
  if (replacement) {
182
192
  context.report({
183
193
  node: node.callee.property,
@@ -2,7 +2,7 @@
2
2
  * A route does not re-declare a component the package already ships.
3
3
  *
4
4
  * `@nadicodeai/ui` is the website's component surface. A route that declares
5
- * its own `Hero`, `Footer` or `NavBar` forks a shipped component into a page,
5
+ * its own `Footer`, `Card` or `Badge` forks a shipped component into a page,
6
6
  * where the package's next change does not reach it — and the two are then
7
7
  * told apart only by their import paths.
8
8
  *
@@ -10,7 +10,7 @@
10
10
  * can type the argument but cannot require that a call happened. The tier-1
11
11
  * option — a `defineAction` wrapper that makes an unvalidated or unauthorized
12
12
  * action untypeable — was tried and rejected for this change: Next binds the
13
- * exported function itself, so adopting it rewrites all 62 exported actions in
13
+ * exported function itself, so adopting it rewrites every exported action in
14
14
  * the same diff that retires the guard.
15
15
  *
16
16
  * The rule reads one function at a time — no whole-tree scan, no cross-file
@@ -27,8 +27,8 @@
27
27
  * The one glass material (DESIGN.md "Elevation & Depth"): floating chrome —
28
28
  * menus, popovers, selects, comboboxes, the command palette, and bars — may
29
29
  * carry it; content surfaces stay solid. Glass composites only over our own
30
- * content. Its edge is the floating rung's recipe, whose inset top highlight
31
- * and inner hairline only show once the fill turns translucent. A fine grain
30
+ * content. Its edge is the floating rung's recipe, its 1 px ring and faint
31
+ * shadow (DESIGN.md, "Glass"). A fine grain
32
32
  * over the fill keeps the blurred colour behind it from banding. Declared as a
33
33
  * utility so variant prefixes can gate it (navigation-menu's non-viewport
34
34
  * popup). Reduced transparency falls back to the same solid surface at the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nadicodeai/ui",
3
- "version": "12.1.77",
3
+ "version": "12.1.78",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -75,7 +75,7 @@
75
75
  "@base-ui/react": "^1.8.0",
76
76
  "@iconify-icons/logos": "^2.0.2",
77
77
  "@iconify/react": "^6.0.2",
78
- "@nadicodeai/design-system": "12.1.77",
78
+ "@nadicodeai/design-system": "12.1.78",
79
79
  "@tanstack/react-table": "^9.2.4",
80
80
  "class-variance-authority": "^0.7.1",
81
81
  "clsx": "^2.1.1",