inventive-ui 0.0.7 → 0.0.9

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/dist/index.js CHANGED
@@ -190,7 +190,7 @@ var BANNER_COMPACT = [
190
190
  var FULL_BANNER_WIDTH = 101;
191
191
  function resolveCliVersion() {
192
192
  try {
193
- return true ? "0.0.7" : "1.0.0";
193
+ return true ? "0.0.9" : "1.0.0";
194
194
  } catch {
195
195
  return "1.0.0";
196
196
  }
@@ -1955,60 +1955,15 @@ function patchViteConfigContent(source) {
1955
1955
  }
1956
1956
 
1957
1957
  // src/utils/config-patch/iui-config.ts
1958
- var BUILD_BLOCK = ` /**
1959
- * Compile-first CSS \u2014 scanned at build time by the Vite/Webpack/Next plugin.
1960
- * Do not import style-map ".generated" files into the browser graph.
1961
- * scanDirs / scanPackages default in Framework \u2014 override only when needed.
1962
- * See Framework docs/01-compile-first-guide.md for all build options.
1963
- */
1964
- build: {
1965
- safelist: [],
1966
- includeShadeMatrix: false,
1967
- includeThemePresets: true,
1968
- includeThemeGrayScale: true,
1969
- resolvePalettePatterns: true,
1970
- includeArbitraryScan: true,
1971
- writeFiles: false,
1972
- minify: true,
1973
- useAst: true,
1974
- },
1975
- `;
1976
- var BUILD_DEFAULT_ENTRIES = [
1977
- ["safelist", "[]"],
1978
- ["includeShadeMatrix", "false"],
1979
- ["includeThemePresets", "true"],
1980
- ["includeThemeGrayScale", "true"],
1981
- ["resolvePalettePatterns", "true"],
1982
- ["includeArbitraryScan", "true"],
1983
- ["writeFiles", "false"],
1984
- ["minify", "true"],
1985
- ["useAst", "true"]
1986
- ];
1958
+ var DEPRECATED_BUILD_FLAG = /\b(includeShadeMatrix|includeThemePresets|includeThemeGrayScale|resolvePalettePatterns|includeArbitraryScan|packageSafelist|useAst|writeFiles)\s*:/;
1987
1959
  function patchProjectConfigBuildBlock(content) {
1988
- if (!/\bbuild\s*:\s*\{/.test(content)) {
1989
- const updated = content.replace(
1990
- /(\n)(};)\s*\n(\s*export default config;)/,
1991
- `$1${BUILD_BLOCK}$1$2
1992
- $3`
1993
- );
1994
- if (updated === content) return { content, changed: false };
1995
- return { content: updated, changed: true };
1996
- }
1997
- let next = content;
1998
- let changed = false;
1999
- if (!/\bbuild\s*:\s*\{/.test(next)) {
1960
+ if (DEPRECATED_BUILD_FLAG.test(content)) {
2000
1961
  return { content, changed: false };
2001
1962
  }
2002
- for (const [key, value] of BUILD_DEFAULT_ENTRIES) {
2003
- if (new RegExp(`\\b${key}\\s*:`).test(next)) continue;
2004
- const replaced = next.replace(/(\bbuild\s*:\s*\{\n)/, `$1 ${key}: ${value},
2005
- `);
2006
- if (replaced !== next) {
2007
- next = replaced;
2008
- changed = true;
2009
- }
1963
+ if (/\bscan\s*:\s*\{/.test(content)) {
1964
+ return { content, changed: false };
2010
1965
  }
2011
- return { content: next, changed };
1966
+ return { content, changed: false };
2012
1967
  }
2013
1968
 
2014
1969
  // src/utils/config-patch/component-config.ts
@@ -7853,40 +7808,21 @@ function checkCompileFirstReadiness(cwd = process.cwd(), _options = {}) {
7853
7808
  const configPath = path24.join(cwd, PROJECT_CONFIG_FILE);
7854
7809
  if (fs19.existsSync(configPath)) {
7855
7810
  const configContent = fs19.readFileSync(configPath, "utf-8");
7856
- if (!/\bbuild\s*:\s*\{/.test(configContent)) {
7857
- warnings.push("iui.config.ts is missing a compile-first `build` block");
7858
- hints.push(
7859
- "Framework applies default scanDirs/scanPackages \u2014 merge other build flags from docs/01-compile-first-guide.md or run a fresh iui init"
7811
+ if (/packageSafelist\s*:\s*false/.test(configContent)) {
7812
+ warnings.push(
7813
+ "Deprecated iui.config build.packageSafelist \u2014 remove it; Framework always merges IUI package compile contracts"
7814
+ );
7815
+ }
7816
+ if (/includeShadeMatrix\s*:/.test(configContent)) {
7817
+ warnings.push(
7818
+ "Deprecated compiler flags in iui.config build.* \u2014 remove them; compile policy is Framework-internal"
7819
+ );
7820
+ hints.push("Use theme + optional scan.dirs only. See Framework docs/01-compile-first-guide.md");
7821
+ }
7822
+ if (/scanPackages\s*:/.test(configContent) || /scan\.packages\s*:/.test(configContent)) {
7823
+ warnings.push(
7824
+ "Deprecated scanPackages in iui.config \u2014 IUI packages are discovered from package.json dependencies"
7860
7825
  );
7861
- } else {
7862
- if (/packageSafelist\s*:\s*false/.test(configContent)) {
7863
- warnings.push(
7864
- "iui.config.ts build.packageSafelist is false \u2014 package compile.safelist contracts from scanPackages will not merge"
7865
- );
7866
- hints.push(
7867
- "Remove packageSafelist: false to use Framework default (true) so @inventive-ui/components compile.safelist is included"
7868
- );
7869
- }
7870
- if (!/includeShadeMatrix\s*:\s*false/.test(configContent)) {
7871
- warnings.push("iui.config.ts build.includeShadeMatrix should be false unless you need the full compose() matrix");
7872
- }
7873
- if (!/includeThemePresets\s*:\s*true/.test(configContent)) {
7874
- warnings.push("iui.config.ts build.includeThemePresets should be true");
7875
- }
7876
- if (!/includeThemeGrayScale\s*:\s*true/.test(configContent)) {
7877
- warnings.push(
7878
- "iui.config.ts build.includeThemeGrayScale should be true (pre-expand theme gray gray-2\u202698 utilities)"
7879
- );
7880
- }
7881
- if (!/resolvePalettePatterns\s*:\s*true/.test(configContent)) {
7882
- warnings.push("iui.config.ts build.resolvePalettePatterns should be true");
7883
- }
7884
- if (!/includeArbitraryScan\s*:\s*true/.test(configContent)) {
7885
- warnings.push("iui.config.ts build.includeArbitraryScan should be true");
7886
- }
7887
- if (!/useAst\s*:\s*true/.test(configContent)) {
7888
- warnings.push("iui.config.ts build.useAst should be true");
7889
- }
7890
7826
  }
7891
7827
  }
7892
7828
  if (projectHasViteTooling(cwd)) {
@@ -8736,7 +8672,7 @@ async function updateCommand(opts = {}) {
8736
8672
  const auth = await ensureAuthSession();
8737
8673
  await ensureLicenseSession();
8738
8674
  const inProject = isInsideProject();
8739
- const currentCliVersion = true ? "0.0.7" : "unknown";
8675
+ const currentCliVersion = true ? "0.0.9" : "unknown";
8740
8676
  const latestCliVersion = await fetchLatestCliVersion(auth.token);
8741
8677
  const cliUpdateAvailable = latestCliVersion !== null && isVersionGreater(latestCliVersion, currentCliVersion);
8742
8678
  if (latestCliVersion && cliUpdateAvailable) {
@@ -9018,7 +8954,7 @@ var AUTH_EXEMPT_COMMANDS = /* @__PURE__ */ new Set([
9018
8954
  "doctor",
9019
8955
  "list"
9020
8956
  ]);
9021
- program.name("iui").description("The official CLI for the Inventive UI Design System").version(true ? "0.0.7" : "1.0.0").option("-C, --cwd <dir>", "Run as if started in the given directory").option("-q, --quiet", "Minimal output (also respects IUI_QUIET=1)").option("--no-color", "Disable ANSI colors");
8957
+ program.name("iui").description("The official CLI for the Inventive UI Design System").version(true ? "0.0.9" : "1.0.0").option("-C, --cwd <dir>", "Run as if started in the given directory").option("-q, --quiet", "Minimal output (also respects IUI_QUIET=1)").option("--no-color", "Disable ANSI colors");
9022
8958
  program.command("login").description("Authenticate with GitHub and link your license").option("-f, --force", "Force re-authentication and register this device").option("--bootstrap", "After login, run optional setup prompts").action((opts) => loginCommand(opts));
9023
8959
  program.command("logout").description("Remove stored credentials").action(logoutCommand);
9024
8960
  program.command("whoami").description("Show authenticated identity and license details").action(whoamiCommand);