@trinityui/design-system-css 2.5.0 → 2.6.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.
package/build.mjs CHANGED
@@ -2,13 +2,15 @@
2
2
  /**
3
3
  * Build script for @trinityui/design-system-css.
4
4
  *
5
- * Reads the canonical CSS source from the monorepo root and emits:
5
+ * Reads the auto-generated CSS source (produced by
6
+ * `scripts/generate-css-from-tokens.ts` from `src/tokens.ts`) and emits:
6
7
  * dist/trinity.css — identical copy of source (pretty, with banner)
7
8
  * dist/trinity.min.css — minified via esbuild for production consumers
8
9
  *
9
- * Replaces the prior `cp ../../src/styles/trinity.css dist/trinity.css`
10
- * one-liner. Fails loudly if the source is missing (the `cp` build would
11
- * silently ship an empty file if `trinity.css` were renamed).
10
+ * The previous hand-maintained `src/styles/trinity.css` has been retired —
11
+ * the canonical CSS is now generated from `tokens.ts`, so token updates
12
+ * (WCAG fixes, new semantic tokens) reach CSS-only consumers automatically.
13
+ * Fails loudly if the source is missing (`cp` would silently ship empty).
12
14
  */
13
15
  import { readFile, writeFile, mkdir, stat } from "node:fs/promises";
14
16
  import { fileURLToPath } from "node:url";
@@ -16,7 +18,7 @@ import { dirname, resolve } from "node:path";
16
18
  import { transform } from "esbuild";
17
19
 
18
20
  const here = dirname(fileURLToPath(import.meta.url));
19
- const SOURCE = resolve(here, "../../src/styles/trinity.css");
21
+ const SOURCE = resolve(here, "../../src/styles/trinity-generated.css");
20
22
  const DIST = resolve(here, "dist");
21
23
  const OUT = resolve(DIST, "trinity.css");
22
24
  const OUT_MIN = resolve(DIST, "trinity.min.css");