@makoai/app-sdk 2.24.0 → 2.26.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
@@ -577,6 +577,9 @@ stays the default:
577
577
  - `SheetContent closeLabel="Fermer"`: the close button's screen-reader label.
578
578
  - `SelectContent container={document.fullscreenElement ?? undefined}`: where
579
579
  the list portals, for a fullscreen page.
580
+ - `Badge variant="success" | "warning" | "danger" | "info" | "violet" | "muted"`
581
+ (2.26): status tones in the house tokens (`--positive`, `--warning`,
582
+ `--negative`, `--brand`, `--chart-4`). Stock variants are unchanged.
580
583
 
581
584
  `tailwind.css` lets Tailwind see the SDK's classes (`@source`) and maps the
582
585
  house tokens onto Tailwind's colour names (`bg-popover`,
@@ -616,6 +619,10 @@ Run it in an app folder (or pass several). It exits 1 on a finding;
616
619
  - `local-shadcn`: a `src/components/ui/<name>.tsx` the SDK ships.
617
620
  - `react-version` (2.24): React below 19 in an app that uses shadcn
618
621
  (`src/components/ui`, radix-ui, or the SDK's `/components` or `/menu`).
622
+ From 2.25 it also flags React 19 with recharts 2 and no react-is 19
623
+ override. recharts 2 reads chart children with react-is 18, which drops
624
+ anything inside a `<>` fragment: a chart loses its reference lines. The
625
+ fix is `"pnpm": { "overrides": { "react-is": "^19.1.10" } }`.
619
626
 
620
627
  `--rules=react-version` runs only the named rules (2.24).
621
628
 
@@ -17,6 +17,14 @@ const badgeVariants = cva(
17
17
  "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
18
18
  ghost: "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
19
19
  link: "text-primary underline-offset-4 [a&]:hover:underline",
20
+ // Mako thin prop (2.26): status tones in the house tokens, light and
21
+ // dark alike. From the FR dashboards' copies (fr-sales, fr-renewals, fr-sdr).
22
+ success: "border-[color-mix(in_srgb,var(--positive)_30%,transparent)] bg-[color-mix(in_srgb,var(--positive)_12%,transparent)] text-[var(--positive)]",
23
+ warning: "border-[color-mix(in_srgb,var(--warning)_30%,transparent)] bg-[color-mix(in_srgb,var(--warning)_12%,transparent)] text-[var(--warning)]",
24
+ danger: "border-[color-mix(in_srgb,var(--negative)_30%,transparent)] bg-[color-mix(in_srgb,var(--negative)_12%,transparent)] text-[var(--negative)]",
25
+ info: "border-[color-mix(in_srgb,var(--brand)_30%,transparent)] bg-[color-mix(in_srgb,var(--brand)_12%,transparent)] text-[var(--brand)]",
26
+ violet: "border-[color-mix(in_srgb,var(--chart-4)_30%,transparent)] bg-[color-mix(in_srgb,var(--chart-4)_12%,transparent)] text-[var(--chart-4)]",
27
+ muted: "border-border bg-muted text-muted-foreground",
20
28
  },
21
29
  },
22
30
  defaultVariants: {
package/index.js CHANGED
@@ -38,7 +38,7 @@ import {
38
38
  * in a page (or this export) says which SDK a deployed app actually runs.
39
39
  * Kept in step with package.json by snapshot.test.mjs.
40
40
  */
41
- export const SDK_VERSION = "2.24.0";
41
+ export const SDK_VERSION = "2.26.0";
42
42
  if (typeof window !== "undefined") {
43
43
  try {
44
44
  window.__MAKO_APP_SDK__ = SDK_VERSION;
package/lint.js CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
- // mako-app-lint (2.21; react-version and --rules from 2.24): app rules a
2
+ // mako-app-lint (2.21; react-version and --rules from 2.24, recharts check
3
+ // 2.25): app rules a
3
4
  // reviewer kept repeating.
4
5
  //
5
6
  // utc-display getUTC*, timeZone: "UTC" or toISOString().slice in display
@@ -11,6 +12,10 @@
11
12
  // radix-ui, or the SDK's /components or /menu). shadcn's stock
12
13
  // components pass refs as props, which React 18 drops: on
13
14
  // 18 Nov 2026 a Calendar's arrow keys stopped moving focus.
15
+ // Also React 19 with recharts 2 and no react-is 19 override:
16
+ // recharts 2 reads chart children with react-is 18, which
17
+ // drops anything in a <> fragment (19 Nov 2026: reference
18
+ // lines vanished from a chart).
14
19
  //
15
20
  // Usage: npx mako-app-lint [app dir …] [--warn] [--rules=a,b]. Exit 1 on
16
21
  // findings unless --warn. --rules runs only the named rules. A line ending in `// mako-lint-ignore utc-display` is skipped (a
@@ -48,7 +53,12 @@ export function minMajor(range) {
48
53
  return m ? Number(m[1]) : null;
49
54
  }
50
55
 
51
- /** react-version: React below 19 with shadcn in the app. */
56
+ /** The react-is range an override pins: pnpm.overrides, npm overrides or yarn resolutions. */
57
+ function reactIsOverride(pkg) {
58
+ return pkg.pnpm?.overrides?.["react-is"] ?? pkg.overrides?.["react-is"] ?? pkg.resolutions?.["react-is"];
59
+ }
60
+
61
+ /** react-version: React below 19 with shadcn, or React 19 with recharts 2 on react-is 18. */
52
62
  function reactVersionFindings(appDir) {
53
63
  const pj = path.join(appDir, "package.json");
54
64
  if (!existsSync(pj)) return [];
@@ -60,7 +70,16 @@ function reactVersionFindings(appDir) {
60
70
  }
61
71
  const deps = { ...pkg.dependencies, ...pkg.devDependencies };
62
72
  const major = minMajor(deps.react);
63
- if (major == null || major >= 19) return [];
73
+ if (major == null) return [];
74
+ if (major >= 19) {
75
+ if (minMajor(deps.recharts) !== 2 || (minMajor(reactIsOverride(pkg)) ?? 0) >= 19) return [];
76
+ return [{
77
+ file: "package.json",
78
+ line: 1,
79
+ rule: "react-version",
80
+ message: `React ${deps.react} with recharts ${deps.recharts}: recharts 2 reads chart children with react-is 18, which drops anything in a <> fragment. Add "pnpm": { "overrides": { "react-is": "^19.1.10" } }`,
81
+ }];
82
+ }
64
83
  const why = [];
65
84
  if (existsSync(path.join(appDir, "src", "components", "ui"))) why.push("src/components/ui");
66
85
  if (Object.keys(deps).some(d => d === "radix-ui" || d.startsWith("@radix-ui/"))) why.push("radix-ui");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@makoai/app-sdk",
3
- "version": "2.24.0",
3
+ "version": "2.26.0",
4
4
  "description": "Mako app SDK: data bindings (useQuery/useDuckDB), URL state, theme, and the house dashboard kit (/ui).",
5
5
  "license": "MIT",
6
6
  "repository": {