@frontic/ui 0.5.1 → 0.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/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import "./index-H1YMti1k.js";
3
- import { a as getRegistry, c as getRegistryIcons, d as getShadcnRegistryIndex, f as resolveRegistryItems, i as getRegistriesIndex, l as getRegistryItems, n as getItemTargetPath, o as getRegistryBaseColor, p as resolveTree, r as getRegistriesConfig, s as getRegistryBaseColors, t as fetchTree, u as getRegistryStyles } from "./api-5jmG88HV.js";
2
+ import "./index-Cd5RBhtD.js";
3
+ import { a as getRegistry, c as getRegistryIcons, d as getShadcnRegistryIndex, f as resolveRegistryItems, i as getRegistriesIndex, l as getRegistryItems, n as getItemTargetPath, o as getRegistryBaseColor, p as resolveTree, r as getRegistriesConfig, s as getRegistryBaseColors, t as fetchTree, u as getRegistryStyles } from "./api-DmrBFC4C.js";
4
4
  export { fetchTree, getItemTargetPath, getRegistriesConfig, getRegistriesIndex, getRegistry, getRegistryBaseColor, getRegistryBaseColors, getRegistryIcons, getRegistryItems, getRegistryStyles, getShadcnRegistryIndex, resolveRegistryItems, resolveTree };
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-CSfiKyuv.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-thK0j_gy.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";
@@ -1542,16 +1542,6 @@ async function runInit(options) {
1542
1542
  isNewProject: options.isNewProject || projectInfo?.framework.name === "nuxt4"
1543
1543
  });
1544
1544
  if (options.isNewProject && options.srcDir) await updateTailwindContent(["./src/**/*.{js,ts,jsx,tsx,mdx}"], fullConfig, { silent: options.silent });
1545
- const configPath = path.resolve(options.cwd, "components.json");
1546
- try {
1547
- const existingConfig = await fsExtra.readJson(configPath);
1548
- existingConfig.registries = existingConfig.registries || {};
1549
- existingConfig.registries["@frontic"] = { url: `${REGISTRY_URL}/styles/{style}/{name}.json` };
1550
- await promises.writeFile(configPath, `${JSON.stringify(existingConfig, null, 2)}\n`, "utf8");
1551
- if (!options.silent) logger.success("Frontic registry configured");
1552
- } catch {
1553
- logger.warn("Could not add Frontic registry to components.json");
1554
- }
1555
1545
  const { brand, brandForeground } = fullConfig.tailwind;
1556
1546
  if (!options.silent && brand) {
1557
1547
  logger.break();
@@ -1643,7 +1633,7 @@ async function promptForConfig(defaultConfig = null) {
1643
1633
  const brandOklch = options.brandColor && isValidHex(options.brandColor) ? hexToOklch(options.brandColor) : void 0;
1644
1634
  const brandForeground = brandOklch ? getForegroundColor(brandOklch) : void 0;
1645
1635
  return rawConfigSchema.parse({
1646
- $schema: "https://shadcn-vue.com/schema.json",
1636
+ $schema: "https://schema.frontic.io/schema.json",
1647
1637
  style: options.style,
1648
1638
  tailwind: {
1649
1639
  config: options.tailwindConfig,
@@ -1965,7 +1955,7 @@ const build = new Command().name("build").description("Build components for a Fr
1965
1955
  const buildSpinner = spinner("Building registry...");
1966
1956
  for (const registryItem of result.data.items) {
1967
1957
  buildSpinner.start(`Building ${registryItem.name}...`);
1968
- registryItem.$schema = "https://shadcn-vue.com/schema/registry-item.json";
1958
+ registryItem.$schema = "https://schema.frontic.io/schema/registry-item.json";
1969
1959
  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
1960
  const result$1 = registryItemSchema.safeParse(registryItem);
1971
1961
  if (!result$1.success) {
@@ -2427,7 +2417,7 @@ const migrate = new Command().name("migrate").description("run a migration.").ar
2427
2417
 
2428
2418
  //#endregion
2429
2419
  //#region package.json
2430
- var version = "0.5.1";
2420
+ var version = "0.6.1";
2431
2421
 
2432
2422
  //#endregion
2433
2423
  //#region src/index.ts