shadcn 4.2.1-beta.0 → 4.3.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/mcp/index.js CHANGED
@@ -1 +1 @@
1
- export{b as server}from'../chunk-C7EWIKNS.js';import'../chunk-BT5UJFAL.js';import'../chunk-HW2MEAJZ.js';import'../chunk-WLJDV6SE.js';import'../chunk-CHWMSXYA.js';
1
+ export{b as server}from'../chunk-KJ7WG52C.js';import'../chunk-42UQOK2K.js';import'../chunk-HW2MEAJZ.js';import'../chunk-WLJDV6SE.js';import'../chunk-CHWMSXYA.js';
@@ -1,12 +1,12 @@
1
1
  declare const PRESET_BASES: readonly ["radix", "base"];
2
- declare const PRESET_STYLES: readonly ["nova", "vega", "maia", "lyra", "mira", "luma"];
2
+ declare const PRESET_STYLES: readonly ["nova", "vega", "maia", "lyra", "mira", "luma", "sera"];
3
3
  declare const PRESET_BASE_COLORS: readonly ["neutral", "stone", "zinc", "gray", "mauve", "olive", "mist", "taupe"];
4
4
  declare const PRESET_THEMES: readonly ["neutral", "stone", "zinc", "gray", "amber", "blue", "cyan", "emerald", "fuchsia", "green", "indigo", "lime", "orange", "pink", "purple", "red", "rose", "sky", "teal", "violet", "yellow", "mauve", "olive", "mist", "taupe"];
5
5
  declare const PRESET_CHART_COLORS: readonly ["neutral", "stone", "zinc", "gray", "amber", "blue", "cyan", "emerald", "fuchsia", "green", "indigo", "lime", "orange", "pink", "purple", "red", "rose", "sky", "teal", "violet", "yellow", "mauve", "olive", "mist", "taupe"];
6
6
  declare const V1_CHART_COLOR_MAP: Record<string, string>;
7
7
  declare const PRESET_ICON_LIBRARIES: readonly ["lucide", "hugeicons", "tabler", "phosphor", "remixicon"];
8
- declare const PRESET_FONTS: readonly ["inter", "noto-sans", "nunito-sans", "figtree", "roboto", "raleway", "dm-sans", "public-sans", "outfit", "jetbrains-mono", "geist", "geist-mono", "lora", "merriweather", "playfair-display", "noto-serif", "roboto-slab", "oxanium", "manrope", "space-grotesk", "montserrat", "ibm-plex-sans", "source-sans-3", "instrument-sans"];
9
- declare const PRESET_FONT_HEADINGS: readonly ["inherit", "inter", "noto-sans", "nunito-sans", "figtree", "roboto", "raleway", "dm-sans", "public-sans", "outfit", "jetbrains-mono", "geist", "geist-mono", "lora", "merriweather", "playfair-display", "noto-serif", "roboto-slab", "oxanium", "manrope", "space-grotesk", "montserrat", "ibm-plex-sans", "source-sans-3", "instrument-sans"];
8
+ declare const PRESET_FONTS: readonly ["inter", "noto-sans", "nunito-sans", "figtree", "roboto", "raleway", "dm-sans", "public-sans", "outfit", "jetbrains-mono", "geist", "geist-mono", "lora", "merriweather", "playfair-display", "noto-serif", "roboto-slab", "oxanium", "manrope", "space-grotesk", "montserrat", "ibm-plex-sans", "source-sans-3", "instrument-sans", "eb-garamond", "instrument-serif"];
9
+ declare const PRESET_FONT_HEADINGS: readonly ["inherit", "inter", "noto-sans", "nunito-sans", "figtree", "roboto", "raleway", "dm-sans", "public-sans", "outfit", "jetbrains-mono", "geist", "geist-mono", "lora", "merriweather", "playfair-display", "noto-serif", "roboto-slab", "oxanium", "manrope", "space-grotesk", "montserrat", "ibm-plex-sans", "source-sans-3", "instrument-sans", "eb-garamond", "instrument-serif"];
10
10
  declare const PRESET_RADII: readonly ["default", "none", "small", "medium", "large"];
11
11
  declare const PRESET_MENU_ACCENTS: readonly ["subtle", "bold"];
12
12
  declare const PRESET_MENU_COLORS: readonly ["default", "inverted", "default-translucent", "inverted-translucent"];
@@ -1 +1 @@
1
- export{m as DEFAULT_PRESET_CONFIG,a as PRESET_BASES,c as PRESET_BASE_COLORS,e as PRESET_CHART_COLORS,h as PRESET_FONTS,i as PRESET_FONT_HEADINGS,g as PRESET_ICON_LIBRARIES,k as PRESET_MENU_ACCENTS,l as PRESET_MENU_COLORS,j as PRESET_RADII,b as PRESET_STYLES,d as PRESET_THEMES,f as V1_CHART_COLOR_MAP,q as decodePreset,p as encodePreset,o as fromBase62,t as generateRandomConfig,u as generateRandomPreset,r as isPresetCode,s as isValidPreset,n as toBase62}from'../chunk-F4TYWGJP.js';
1
+ export{m as DEFAULT_PRESET_CONFIG,a as PRESET_BASES,c as PRESET_BASE_COLORS,e as PRESET_CHART_COLORS,h as PRESET_FONTS,i as PRESET_FONT_HEADINGS,g as PRESET_ICON_LIBRARIES,k as PRESET_MENU_ACCENTS,l as PRESET_MENU_COLORS,j as PRESET_RADII,b as PRESET_STYLES,d as PRESET_THEMES,f as V1_CHART_COLOR_MAP,q as decodePreset,p as encodePreset,o as fromBase62,t as generateRandomConfig,u as generateRandomPreset,r as isPresetCode,s as isValidPreset,n as toBase62}from'../chunk-XEZLDAV3.js';
@@ -1 +1 @@
1
- export{p as RegistriesIndexParseError,f as RegistryError,j as RegistryFetchError,i as RegistryForbiddenError,o as RegistryInvalidNamespaceError,l as RegistryLocalFileError,n as RegistryMissingEnvironmentVariablesError,k as RegistryNotConfiguredError,g as RegistryNotFoundError,m as RegistryParseError,h as RegistryUnauthorizedError,ma as getRegistries,na as getRegistriesIndex,aa as getRegistry,ba as getRegistryItems,ca as resolveRegistryItems,va as searchRegistries}from'../chunk-BT5UJFAL.js';import'../chunk-HW2MEAJZ.js';import'../chunk-WLJDV6SE.js';import'../chunk-CHWMSXYA.js';
1
+ export{p as RegistriesIndexParseError,f as RegistryError,j as RegistryFetchError,i as RegistryForbiddenError,o as RegistryInvalidNamespaceError,l as RegistryLocalFileError,n as RegistryMissingEnvironmentVariablesError,k as RegistryNotConfiguredError,g as RegistryNotFoundError,m as RegistryParseError,h as RegistryUnauthorizedError,ma as getRegistries,na as getRegistriesIndex,aa as getRegistry,ba as getRegistryItems,ca as resolveRegistryItems,va as searchRegistries}from'../chunk-42UQOK2K.js';import'../chunk-HW2MEAJZ.js';import'../chunk-WLJDV6SE.js';import'../chunk-CHWMSXYA.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shadcn",
3
- "version": "4.2.1-beta.0",
3
+ "version": "4.3.1",
4
4
  "description": "Add components to your apps.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -61,24 +61,6 @@
61
61
  }
62
62
  },
63
63
  "bin": "./dist/index.js",
64
- "scripts": {
65
- "dev": "tsup --watch",
66
- "build": "tsup",
67
- "typecheck": "tsc --noEmit",
68
- "clean": "rimraf dist && rimraf components",
69
- "start:dev": "cross-env REGISTRY_URL=http://localhost:4000/r SHADCN_TEMPLATE_DIR=../../templates node dist/index.js",
70
- "start:prod": "cross-env REGISTRY_URL=https://ui.shadcn.com/r node dist/index.js",
71
- "start": "node dist/index.js",
72
- "format:write": "prettier --write \"**/*.{ts,tsx,mdx}\" --cache",
73
- "format:check": "prettier --check \"**/*.{ts,tsx,mdx}\" --cache",
74
- "release": "changeset version",
75
- "pub:beta": "pnpm build && pnpm publish --no-git-checks --access public --tag beta",
76
- "pub:next": "pnpm build && pnpm publish --no-git-checks --access public --tag next",
77
- "pub:release": "pnpm build && pnpm publish --access public",
78
- "test": "vitest run",
79
- "test:dev": "REGISTRY_URL=http://localhost:4000/r SHADCN_TEMPLATE_DIR=../../templates vitest run",
80
- "mcp:inspect": "pnpm dlx @modelcontextprotocol/inspector node dist/index.js mcp"
81
- },
82
64
  "dependencies": {
83
65
  "@babel/core": "^7.28.0",
84
66
  "@babel/parser": "^7.28.0",
@@ -125,5 +107,23 @@
125
107
  "tsup": "^8.5.0",
126
108
  "type-fest": "^4.41.0",
127
109
  "typescript": "^5.9.2"
110
+ },
111
+ "scripts": {
112
+ "dev": "tsup --watch",
113
+ "build": "tsup",
114
+ "typecheck": "tsc --noEmit",
115
+ "clean": "rimraf dist && rimraf components",
116
+ "start:dev": "cross-env REGISTRY_URL=http://localhost:4000/r SHADCN_TEMPLATE_DIR=../../templates node dist/index.js",
117
+ "start:prod": "cross-env REGISTRY_URL=https://ui.shadcn.com/r node dist/index.js",
118
+ "start": "node dist/index.js",
119
+ "format:write": "prettier --write \"**/*.{ts,tsx,mdx}\" --cache",
120
+ "format:check": "prettier --check \"**/*.{ts,tsx,mdx}\" --cache",
121
+ "release": "changeset version",
122
+ "pub:beta": "pnpm build && pnpm publish --no-git-checks --access public --tag beta",
123
+ "pub:next": "pnpm build && pnpm publish --no-git-checks --access public --tag next",
124
+ "pub:release": "pnpm build && pnpm publish --access public",
125
+ "test": "vitest run",
126
+ "test:dev": "REGISTRY_URL=http://localhost:4000/r SHADCN_TEMPLATE_DIR=../../templates vitest run",
127
+ "mcp:inspect": "pnpm dlx @modelcontextprotocol/inspector node dist/index.js mcp"
128
128
  }
129
- }
129
+ }
@@ -1 +0,0 @@
1
- var A=["radix","base"],m=["nova","vega","maia","lyra","mira","luma"],p=["neutral","stone","zinc","gray","mauve","olive","mist","taupe"],c=["neutral","stone","zinc","gray","amber","blue","cyan","emerald","fuchsia","green","indigo","lime","orange","pink","purple","red","rose","sky","teal","violet","yellow","mauve","olive","mist","taupe"],b=c,I={neutral:"blue",stone:"lime",zinc:"amber",mauve:"emerald",olive:"violet",mist:"rose",taupe:"cyan"},R=["lucide","hugeicons","tabler","phosphor","remixicon"],E=["inter","noto-sans","nunito-sans","figtree","roboto","raleway","dm-sans","public-sans","outfit","jetbrains-mono","geist","geist-mono","lora","merriweather","playfair-display","noto-serif","roboto-slab","oxanium","manrope","space-grotesk","montserrat","ibm-plex-sans","source-sans-3","instrument-sans"],g=["inherit",...E],_=["default","none","small","medium","large"],y=["subtle","bold"],d=["default","inverted","default-translucent","inverted-translucent"],f=[{key:"menuColor",values:d,bits:3},{key:"menuAccent",values:y,bits:3},{key:"radius",values:_,bits:4},{key:"font",values:E,bits:6},{key:"iconLibrary",values:R,bits:6},{key:"theme",values:c,bits:6},{key:"baseColor",values:p,bits:6},{key:"style",values:m,bits:6}],a=[...f,{key:"chartColor",values:b,bits:6},{key:"fontHeading",values:g,bits:5}],T=Object.fromEntries(a.map(e=>[e.key,e.values[0]])),l="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",P="b",S=["a","b"];function C(e){if(e===0)return "0";let t="",n=e;for(;n>0;)t=l[n%62]+t,n=Math.floor(n/62);return t}function x(e){let t=0;for(let n=0;n<e.length;n++){let s=l.indexOf(e[n]);if(s===-1)return -1;t=t*62+s;}return t}function O(e){let t={...T,...e},n=0,s=0;for(let o of a){let i=o.values.indexOf(t[o.key]);n+=(i===-1?0:i)*2**s,s+=o.bits;}return P+C(n)}function v(e){if(!e||e.length<2)return null;let t=e[0];if(!S.includes(t))return null;let n=t==="a"?f:a,s=x(e.slice(1));if(s<0)return null;let o={},i=0;for(let r of n){let u=Math.floor(s/2**i)%2**r.bits;o[r.key]=u<r.values.length?r.values[u]:r.values[0],i+=r.bits;}return t==="a"&&(o.fontHeading="inherit"),o}function N(e){if(!e||e.length<2||e.length>10||!S.includes(e[0]))return false;for(let t=1;t<e.length;t++)if(l.indexOf(e[t])===-1)return false;return true}function k(e){return v(e)!==null}function h(){let e=t=>t[Math.floor(Math.random()*t.length)];return Object.fromEntries(a.map(t=>[t.key,e(t.values)]))}function L(){return O(h())}export{A as a,m as b,p as c,c as d,b as e,I as f,R as g,E as h,g as i,_ as j,y as k,d as l,T as m,C as n,x as o,O as p,v as q,N as r,k as s,h as t,L as u};