@kinetixui/cli 0.23.0 → 0.23.2

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.
Files changed (2) hide show
  1. package/dist/index.js +10 -9
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2535,10 +2535,11 @@ function header3(symbol, theme2) {
2535
2535
  "//",
2536
2536
  `// Theme colour ${design.brand} \xB7 ${design.neutral} neutral \xB7 ${design.chartPalette} charts`,
2537
2537
  "//",
2538
- "// COLOURS ONLY. KinetixUI for SwiftUI is themeable through `KinetixColors`; corner radius and",
2539
- "// elevation are literals inside each view, with no token to override. This design's radius",
2540
- `// (${design.radius}) and surface treatment (${design.surface}) therefore are NOT carried here \u2014 they`,
2541
- "// apply on the web. Nothing is silently dropped; there is nowhere for them to go yet.",
2538
+ "// COLOURS ONLY \u2014 and that is now a limit of this exporter rather than of the package. SwiftUI",
2539
+ "// gained `KinetixRadii` and `KinetixElevations` alongside `KinetixColors`, so there is somewhere",
2540
+ `// for a radius to land; this file does not write one yet. This design's radius (${design.radius}) and`,
2541
+ `// surface treatment (${design.surface}) are therefore NOT carried here \u2014 set them by hand for now:`,
2542
+ "// `KinetixTheme(light: \u2026, dark: \u2026, radii: \u2026, elevations: \u2026)`. Nothing is silently dropped.",
2542
2543
  "//",
2543
2544
  "// A field written as `KinetixColorsSwiftUI.\u2026` is one this design did not change, and it keeps",
2544
2545
  "// following the library.",
@@ -2610,7 +2611,7 @@ function presetDecode(input, opts) {
2610
2611
  pc8.dim(
2611
2612
  // Wrapped so that no command name is split across lines — a reader scanning for `theme build`
2612
2613
  // should find it, and so should a test.
2613
- " A preset describes a design, not a stylesheet.\n\n kinetixui preset css <code> the same web CSS the workspace's Copy CSS produces\n kinetixui preset swiftui <code> a SwiftUI colour theme\n kinetixui preset compose <code> a Jetpack Compose colour theme\n kinetixui preset flutter <code> a Flutter colour theme\n\n For a file of literal colours, `kinetixui theme build` is unchanged."
2614
+ " A preset describes a design, not a stylesheet.\n\n kinetixui preset css <code> the same web CSS the workspace exports\n kinetixui preset swiftui <code> a SwiftUI colour theme\n kinetixui preset compose <code> a Jetpack Compose colour theme\n kinetixui preset flutter <code> a Flutter colour theme\n\n For a file of literal colours, `kinetixui theme build` is unchanged."
2614
2615
  )
2615
2616
  );
2616
2617
  console.log();
@@ -2875,7 +2876,7 @@ async function themeBuild(name, options) {
2875
2876
  console.log(pc9.dim("(no checkable pairs \u2014 set at least one base + foreground, or just a base to auto-derive one)"));
2876
2877
  }
2877
2878
  console.log();
2878
- console.log("Native (SwiftUI/Compose/Flutter) theme output isn't built yet \u2014 this compiles to CSS only.");
2879
+ console.log("This command compiles to CSS only. For a native theme, run `preset swiftui`, `preset compose` or `preset flutter` on a KX1 preset.");
2879
2880
  console.log(pc9.dim("See https://kinetixui.com/docs/cli#theme for the current scope."));
2880
2881
  if (failed > 0 && options.failOnContrast) {
2881
2882
  process.exitCode = 1;
@@ -2885,7 +2886,7 @@ async function themeBuild(name, options) {
2885
2886
  // package.json
2886
2887
  var package_default = {
2887
2888
  name: "@kinetixui/cli",
2888
- version: "0.23.0",
2889
+ version: "0.23.2",
2889
2890
  description: "Add KinetixUI components and tokens to your project.",
2890
2891
  type: "module",
2891
2892
  license: "MIT",
@@ -2992,7 +2993,7 @@ theme.command("create").description("Scaffold kinetixui-themes/<name>.csv with e
2992
2993
  process.exitCode = 1;
2993
2994
  }
2994
2995
  });
2995
- theme.command("build").description("Compile kinetixui-themes/<name>.csv to CSS and print a WCAG AA contrast report. CSS only \u2014 no native (SwiftUI/Compose/Flutter) output yet.").argument("<name>", "theme name, e.g. acme").option("--no-fail-on-contrast", "exit 0 even if a pair fails WCAG AA").action(async (name, opts) => {
2996
+ theme.command("build").description("Compile kinetixui-themes/<name>.csv to CSS and print a WCAG AA contrast report. This command is CSS only; native themes come from `preset swiftui|compose|flutter`.").argument("<name>", "theme name, e.g. acme").option("--no-fail-on-contrast", "exit 0 even if a pair fails WCAG AA").action(async (name, opts) => {
2996
2997
  try {
2997
2998
  await themeBuild(name, { failOnContrast: opts.failOnContrast });
2998
2999
  } catch (err) {
@@ -3009,7 +3010,7 @@ preset.command("decode").description("Show what a preset contains. Accepts a KX1
3009
3010
  process.exitCode = 1;
3010
3011
  }
3011
3012
  });
3012
- preset.command("css").description("Resolve a preset into its web CSS override block \u2014 the same output as Copy CSS in the workspace. Web CSS only; no native (SwiftUI/Compose/Flutter) output.").argument("<preset>", "a KX1_ code, or a share URL").option("-o, --output <file>", "write to a file instead of stdout").action(async (input, opts) => {
3013
+ preset.command("css").description("Resolve a preset into its web CSS override block \u2014 the same output the workspace exports for Web CSS. This command is CSS only; see `preset swiftui|compose|flutter`.").argument("<preset>", "a KX1_ code, or a share URL").option("-o, --output <file>", "write to a file instead of stdout").action(async (input, opts) => {
3013
3014
  try {
3014
3015
  await presetCss(input, { output: opts.output });
3015
3016
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kinetixui/cli",
3
- "version": "0.23.0",
3
+ "version": "0.23.2",
4
4
  "description": "Add KinetixUI components and tokens to your project.",
5
5
  "type": "module",
6
6
  "license": "MIT",