@frontic/ui 0.5.0 → 0.6.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
@@ -24,7 +24,7 @@ npx @frontic/ui init
24
24
 
25
25
  This will:
26
26
 
27
- 1. Run `shadcn-vue init` if needed
27
+ 1. Run `@frontic/ui init` if needed
28
28
  2. Configure the Frontic registry
29
29
  3. Set up theme colors
30
30
 
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import { A as mergeEnvContent, B as DEFAULT_TAILWIND_CSS, C as configWithDefaults, D as ICON_LIBRARIES, E as transform, F as getProjectInfo, G as getConfig, H as createConfig, I as getProjectTailwindVersionFromConfig, K as getWorkspaceConfig, L as getPackageInfo, M as spinner, N as logger, O as findExistingEnvFile, P as getProjectConfig, R as DEFAULT_COMPONENTS, S as clearRegistryContext, T as updateFiles, U as findCommonRoot, V as DEFAULT_UTILS, W as findPackageRoot, _ as _createSourceFile, a as getRegistriesIndex, at as highlighter, b as handleError, c as getRegistryBaseColors, ct as DEPRECATED_COMPONENTS, d as getRegistryStyles, f as getShadcnRegistryIndex, g as resolveRegistryTree, h as fetchRegistryItems, i as getRegistriesConfig, j as parseRegistryAndItemFromString, k as getNewEnvKeys, l as getRegistryIcons, lt as REGISTRY_URL, m as resolveTree, n as fetchTree, o as getRegistry, ot as BASE_COLORS, p as resolveRegistryItems, q as resolveConfigPaths, r as getItemTargetPath, s as getRegistryBaseColor, st as BUILTIN_REGISTRIES, tt as RegistryNotConfiguredError, u as getRegistryItems, v as _getQuoteChar, w as isUniversalRegistryItem, x as buildUrlAndHeadersForRegistryItem, y as updateTailwindConfig, z as DEFAULT_TAILWIND_CONFIG } from "./registry-CgE-Q6HO.js";
2
+ import { A as mergeEnvContent, B as DEFAULT_TAILWIND_CSS, C as configWithDefaults, D as ICON_LIBRARIES, E as transform, F as getProjectInfo, G as getConfig, H as createConfig, I as getProjectTailwindVersionFromConfig, K as getWorkspaceConfig, L as getPackageInfo, M as spinner, N as logger, O as findExistingEnvFile, P as getProjectConfig, R as DEFAULT_COMPONENTS, S as clearRegistryContext, T as updateFiles, U as findCommonRoot, V as DEFAULT_UTILS, W as findPackageRoot, _ as _createSourceFile, a as getRegistriesIndex, at as highlighter, b as handleError, c as getRegistryBaseColors, ct as DEPRECATED_COMPONENTS, d as getRegistryStyles, f as getShadcnRegistryIndex, g as resolveRegistryTree, h as fetchRegistryItems, i as getRegistriesConfig, j as parseRegistryAndItemFromString, k as getNewEnvKeys, l as getRegistryIcons, lt as REGISTRY_URL, m as resolveTree, n as fetchTree, o as getRegistry, ot as BASE_COLORS, p as resolveRegistryItems, q as resolveConfigPaths, r as getItemTargetPath, s as getRegistryBaseColor, st as BUILTIN_REGISTRIES, tt as RegistryNotConfiguredError, u as getRegistryItems, v as _getQuoteChar, w as isUniversalRegistryItem, x as buildUrlAndHeadersForRegistryItem, y as updateTailwindConfig, z as DEFAULT_TAILWIND_CONFIG } from "./registry-B-cUULNn.js";
3
3
  import { _ as registrySchema, p as registryItemSchema, r as rawConfigSchema } from "./schema-DgHN-d0T.js";
4
- import { t as server } from "./mcp-CxUIP4Qu.js";
4
+ import { t as server } from "./mcp-CrpA36mf.js";
5
5
  import { Command } from "commander";
6
6
  import path, { isAbsolute, join, normalize, resolve, sep } from "pathe";
7
7
  import prompts from "prompts";
@@ -1643,7 +1643,7 @@ async function promptForConfig(defaultConfig = null) {
1643
1643
  const brandOklch = options.brandColor && isValidHex(options.brandColor) ? hexToOklch(options.brandColor) : void 0;
1644
1644
  const brandForeground = brandOklch ? getForegroundColor(brandOklch) : void 0;
1645
1645
  return rawConfigSchema.parse({
1646
- $schema: "https://shadcn-vue.com/schema.json",
1646
+ $schema: "https://schema.frontic.io/schema.json",
1647
1647
  style: options.style,
1648
1648
  tailwind: {
1649
1649
  config: options.tailwindConfig,
@@ -1760,7 +1760,7 @@ async function preFlightAdd(options) {
1760
1760
  } catch (_error) {
1761
1761
  logger.break();
1762
1762
  logger.error(`An invalid ${highlighter.info("components.json")} file was found at ${highlighter.info(options.cwd)}.\nBefore you can add components, you must create a valid ${highlighter.info("components.json")} file by running the ${highlighter.info("init")} command.`);
1763
- logger.error(`Learn more at ${highlighter.info("https://shadcn-vue.com/docs/components-json")}.`);
1763
+ logger.error(`Learn more at ${highlighter.info("https://frontic.io/docs/components-json")}.`);
1764
1764
  logger.break();
1765
1765
  process.exit(1);
1766
1766
  }
@@ -1965,7 +1965,7 @@ const build = new Command().name("build").description("Build components for a Fr
1965
1965
  const buildSpinner = spinner("Building registry...");
1966
1966
  for (const registryItem of result.data.items) {
1967
1967
  buildSpinner.start(`Building ${registryItem.name}...`);
1968
- registryItem.$schema = "https://shadcn-vue.com/schema/registry-item.json";
1968
+ registryItem.$schema = "https://schema.frontic.io/schema/registry-item.json";
1969
1969
  for (const file of registryItem.files ?? []) file.content = (await fs.readFile(path$1.resolve(resolvePaths.cwd, file.path), "utf-8")).replace(/\r\n/g, "\n");
1970
1970
  const result$1 = registryItemSchema.safeParse(registryItem);
1971
1971
  if (!result$1.success) {
@@ -2383,7 +2383,7 @@ async function preFlightMigrate(options) {
2383
2383
  } catch (_error) {
2384
2384
  logger.break();
2385
2385
  logger.error(`An invalid ${highlighter.info("components.json")} file was found at ${highlighter.info(options.cwd)}.\nBefore you can run a migration, you must create a valid ${highlighter.info("components.json")} file by running the ${highlighter.info("init")} command.`);
2386
- logger.error(`Learn more at ${highlighter.info("https://shadcn-vue.com/docs/components-json")}.`);
2386
+ logger.error(`Learn more at ${highlighter.info("https://frontic.io/docs/components-json")}.`);
2387
2387
  logger.break();
2388
2388
  process.exit(1);
2389
2389
  }
@@ -2399,7 +2399,7 @@ const migrateOptionsSchema = z.object({
2399
2399
  cwd: z.string(),
2400
2400
  list: z.boolean(),
2401
2401
  yes: z.boolean(),
2402
- migration: z.string().refine((value) => value && migrations.some((migration) => migration.name === value), { message: "You must specify a valid migration. Run `shadcn migrate --list` to see available migrations." }).optional()
2402
+ migration: z.string().refine((value) => value && migrations.some((migration) => migration.name === value), { message: "You must specify a valid migration. Run `frontic-ui migrate --list` to see available migrations." }).optional()
2403
2403
  });
2404
2404
  const migrate = new Command().name("migrate").description("run a migration.").argument("[migration]", "the migration to run.").option("-c, --cwd <cwd>", "the working directory. defaults to the current directory.", process.cwd()).option("-l, --list", "list all migrations.", false).option("-y, --yes", "skip confirmation prompt.", false).action(async (migration, opts) => {
2405
2405
  try {
@@ -2414,7 +2414,7 @@ const migrate = new Command().name("migrate").description("run a migration.").ar
2414
2414
  for (const migration$1 of migrations) logger.info(`- ${migration$1.name}: ${migration$1.description}`);
2415
2415
  return;
2416
2416
  }
2417
- if (!options.migration) throw new Error("You must specify a migration. Run `shadcn migrate --list` to see available migrations.");
2417
+ if (!options.migration) throw new Error("You must specify a migration. Run `frontic-ui migrate --list` to see available migrations.");
2418
2418
  const { errors, config } = await preFlightMigrate(options);
2419
2419
  if (errors[MISSING_DIR_OR_EMPTY_PROJECT] || errors[MISSING_CONFIG]) throw new Error("No `components.json` file found. Ensure you are at the root of your project.");
2420
2420
  if (!config) throw new Error("Something went wrong reading your `components.json` file. Please ensure you have a valid `components.json` file.");
@@ -2427,7 +2427,7 @@ const migrate = new Command().name("migrate").description("run a migration.").ar
2427
2427
 
2428
2428
  //#endregion
2429
2429
  //#region package.json
2430
- var version = "0.5.0";
2430
+ var version = "0.6.0";
2431
2431
 
2432
2432
  //#endregion
2433
2433
  //#region src/index.ts