@incognia/cosmik 0.40.2-beta.2 → 0.41.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.
Files changed (288) hide show
  1. package/README.md +19 -7
  2. package/dist/Alert/index.d.ts +2 -2
  3. package/dist/Alert/index.d.ts.map +1 -1
  4. package/dist/AlertDialog/index.d.ts +5 -5
  5. package/dist/AlertDialog/index.d.ts.map +1 -1
  6. package/dist/Badge/index.d.ts +6 -7
  7. package/dist/Badge/index.d.ts.map +1 -1
  8. package/dist/Button/index.d.ts +6 -6
  9. package/dist/Button/index.d.ts.map +1 -1
  10. package/dist/Calendar/index.d.ts +1 -1
  11. package/dist/Colors.d.ts +71 -0
  12. package/dist/Colors.d.ts.map +1 -0
  13. package/dist/Command/index.d.ts +20 -20
  14. package/dist/Command/index.d.ts.map +1 -1
  15. package/dist/Dialog/index.d.ts +2 -2
  16. package/dist/Dialog/index.d.ts.map +1 -1
  17. package/dist/DropdownMenu/index.d.ts +4 -4
  18. package/dist/DropdownMenu/index.d.ts.map +1 -1
  19. package/dist/Filter/index.d.ts +4 -2
  20. package/dist/Filter/index.d.ts.map +1 -1
  21. package/dist/FilterBar/GradientScroll.d.ts +4 -4
  22. package/dist/FilterBar/index.d.ts +2 -2
  23. package/dist/Label/index.d.ts +2 -2
  24. package/dist/Layout/index.d.ts +1 -1
  25. package/dist/Layout/index.d.ts.map +1 -1
  26. package/dist/Pagination/index.d.ts +3 -3
  27. package/dist/Pagination/index.d.ts.map +1 -1
  28. package/dist/Popover/index.d.ts +1 -1
  29. package/dist/Popover/index.d.ts.map +1 -1
  30. package/dist/Select/index.d.ts +1 -1
  31. package/dist/Select/index.d.ts.map +1 -1
  32. package/dist/Sheet/index.d.ts +23 -13
  33. package/dist/Sheet/index.d.ts.map +1 -1
  34. package/dist/Skeleton/index.d.ts +1 -0
  35. package/dist/Skeleton/index.d.ts.map +1 -1
  36. package/dist/Sonner/index.d.ts +1 -0
  37. package/dist/Sonner/index.d.ts.map +1 -1
  38. package/dist/Table/index.d.ts +2 -2
  39. package/dist/Table/index.d.ts.map +1 -1
  40. package/dist/Tabs/index.d.ts +1 -1
  41. package/dist/Tabs/index.d.ts.map +1 -1
  42. package/dist/TagInput/index.d.ts +2 -2
  43. package/dist/TagInput/index.d.ts.map +1 -1
  44. package/dist/Toggle/index.d.ts +3 -3
  45. package/dist/ToggleGroup/index.d.ts +13 -4
  46. package/dist/ToggleGroup/index.d.ts.map +1 -1
  47. package/dist/Tooltip/index.d.ts +11 -7
  48. package/dist/Tooltip/index.d.ts.map +1 -1
  49. package/dist/cosmik.css +1 -1
  50. package/dist/index.cjs +1 -1
  51. package/dist/index.d.ts +9 -1
  52. package/dist/index.d.ts.map +1 -1
  53. package/dist/index.js +178 -173
  54. package/dist/index.js.map +1 -1
  55. package/dist/index10.cjs +1 -1
  56. package/dist/index10.cjs.map +1 -1
  57. package/dist/index10.js +34 -127
  58. package/dist/index10.js.map +1 -1
  59. package/dist/index11.cjs +1 -1
  60. package/dist/index11.cjs.map +1 -1
  61. package/dist/index11.js +28 -105
  62. package/dist/index11.js.map +1 -1
  63. package/dist/index12.cjs +1 -1
  64. package/dist/index12.cjs.map +1 -1
  65. package/dist/index12.js +112 -112
  66. package/dist/index12.js.map +1 -1
  67. package/dist/index13.cjs +1 -1
  68. package/dist/index13.cjs.map +1 -1
  69. package/dist/index13.js +103 -96
  70. package/dist/index13.js.map +1 -1
  71. package/dist/index14.cjs +1 -1
  72. package/dist/index14.cjs.map +1 -1
  73. package/dist/index14.js +141 -22
  74. package/dist/index14.js.map +1 -1
  75. package/dist/index15.cjs +1 -1
  76. package/dist/index15.cjs.map +1 -1
  77. package/dist/index15.js +105 -22
  78. package/dist/index15.js.map +1 -1
  79. package/dist/index16.cjs +1 -1
  80. package/dist/index16.cjs.map +1 -1
  81. package/dist/index16.js +22 -17
  82. package/dist/index16.js.map +1 -1
  83. package/dist/index17.cjs +1 -1
  84. package/dist/index17.cjs.map +1 -1
  85. package/dist/index17.js +22 -58
  86. package/dist/index17.js.map +1 -1
  87. package/dist/index18.cjs +1 -1
  88. package/dist/index18.cjs.map +1 -1
  89. package/dist/index18.js +17 -20
  90. package/dist/index18.js.map +1 -1
  91. package/dist/index19.cjs +1 -1
  92. package/dist/index19.cjs.map +1 -1
  93. package/dist/index19.js +64 -96
  94. package/dist/index19.js.map +1 -1
  95. package/dist/index2.cjs +2 -0
  96. package/dist/index2.cjs.map +1 -0
  97. package/dist/index2.js +5 -0
  98. package/dist/index2.js.map +1 -0
  99. package/dist/index20.cjs +1 -1
  100. package/dist/index20.cjs.map +1 -1
  101. package/dist/index20.js +20 -22
  102. package/dist/index20.js.map +1 -1
  103. package/dist/index21.cjs +1 -1
  104. package/dist/index21.cjs.map +1 -1
  105. package/dist/index21.js +93 -21
  106. package/dist/index21.js.map +1 -1
  107. package/dist/index22.cjs +1 -1
  108. package/dist/index22.cjs.map +1 -1
  109. package/dist/index22.js +19 -27
  110. package/dist/index22.js.map +1 -1
  111. package/dist/index23.cjs +1 -1
  112. package/dist/index23.cjs.map +1 -1
  113. package/dist/index23.js +19 -126
  114. package/dist/index23.js.map +1 -1
  115. package/dist/index24.cjs +1 -1
  116. package/dist/index24.cjs.map +1 -1
  117. package/dist/index24.js +30 -23
  118. package/dist/index24.js.map +1 -1
  119. package/dist/index25.cjs +1 -1
  120. package/dist/index25.cjs.map +1 -1
  121. package/dist/index25.js +130 -128
  122. package/dist/index25.js.map +1 -1
  123. package/dist/index26.cjs +1 -1
  124. package/dist/index26.cjs.map +1 -1
  125. package/dist/index26.js +21 -13
  126. package/dist/index26.js.map +1 -1
  127. package/dist/index27.cjs +1 -1
  128. package/dist/index27.cjs.map +1 -1
  129. package/dist/index27.js +103 -28
  130. package/dist/index27.js.map +1 -1
  131. package/dist/index28.cjs +1 -1
  132. package/dist/index28.cjs.map +1 -1
  133. package/dist/index28.js +15 -27
  134. package/dist/index28.js.map +1 -1
  135. package/dist/index29.cjs +1 -1
  136. package/dist/index29.cjs.map +1 -1
  137. package/dist/index29.js +30 -108
  138. package/dist/index29.js.map +1 -1
  139. package/dist/index3.cjs +1 -1
  140. package/dist/index3.cjs.map +1 -1
  141. package/dist/index3.js +70 -54
  142. package/dist/index3.js.map +1 -1
  143. package/dist/index30.cjs +1 -1
  144. package/dist/index30.cjs.map +1 -1
  145. package/dist/index30.js +23 -38
  146. package/dist/index30.js.map +1 -1
  147. package/dist/index31.cjs +1 -1
  148. package/dist/index31.cjs.map +1 -1
  149. package/dist/index31.js +102 -73
  150. package/dist/index31.js.map +1 -1
  151. package/dist/index32.cjs +1 -1
  152. package/dist/index32.cjs.map +1 -1
  153. package/dist/index32.js +42 -23
  154. package/dist/index32.js.map +1 -1
  155. package/dist/index33.cjs +1 -1
  156. package/dist/index33.cjs.map +1 -1
  157. package/dist/index33.js +78 -78
  158. package/dist/index33.js.map +1 -1
  159. package/dist/index34.cjs +1 -1
  160. package/dist/index34.cjs.map +1 -1
  161. package/dist/index34.js +20 -67
  162. package/dist/index34.js.map +1 -1
  163. package/dist/index35.cjs +1 -1
  164. package/dist/index35.cjs.map +1 -1
  165. package/dist/index35.js +75 -55
  166. package/dist/index35.js.map +1 -1
  167. package/dist/index36.cjs +1 -1
  168. package/dist/index36.cjs.map +1 -1
  169. package/dist/index36.js +36 -58
  170. package/dist/index36.js.map +1 -1
  171. package/dist/index37.cjs +1 -1
  172. package/dist/index37.cjs.map +1 -1
  173. package/dist/index37.js +33 -3
  174. package/dist/index37.js.map +1 -1
  175. package/dist/index38.cjs +1 -1
  176. package/dist/index38.cjs.map +1 -1
  177. package/dist/index38.js +65 -33
  178. package/dist/index38.js.map +1 -1
  179. package/dist/index39.cjs +1 -1
  180. package/dist/index39.cjs.map +1 -1
  181. package/dist/index39.js +261 -11
  182. package/dist/index39.js.map +1 -1
  183. package/dist/index4.cjs +1 -1
  184. package/dist/index4.cjs.map +1 -1
  185. package/dist/index4.js +324 -112
  186. package/dist/index4.js.map +1 -1
  187. package/dist/index40.cjs +1 -1
  188. package/dist/index40.cjs.map +1 -1
  189. package/dist/index40.js +6 -118
  190. package/dist/index40.js.map +1 -1
  191. package/dist/index41.cjs +1 -1
  192. package/dist/index41.cjs.map +1 -1
  193. package/dist/index41.js +12 -13
  194. package/dist/index41.js.map +1 -1
  195. package/dist/index42.cjs +1 -1
  196. package/dist/index42.cjs.map +1 -1
  197. package/dist/index42.js +118 -7
  198. package/dist/index42.js.map +1 -1
  199. package/dist/index43.cjs +1 -1
  200. package/dist/index43.cjs.map +1 -1
  201. package/dist/index43.js +14 -2
  202. package/dist/index43.js.map +1 -1
  203. package/dist/index44.cjs +1 -9
  204. package/dist/index44.cjs.map +1 -1
  205. package/dist/index44.js +3 -25
  206. package/dist/index44.js.map +1 -1
  207. package/dist/index45.cjs +1 -22
  208. package/dist/index45.cjs.map +1 -1
  209. package/dist/index45.js +104 -601
  210. package/dist/index45.js.map +1 -1
  211. package/dist/index46.cjs +1 -1
  212. package/dist/index46.cjs.map +1 -1
  213. package/dist/index46.js +32 -13
  214. package/dist/index46.js.map +1 -1
  215. package/dist/index47.cjs +1 -1
  216. package/dist/index47.cjs.map +1 -1
  217. package/dist/index47.js +2 -2729
  218. package/dist/index47.js.map +1 -1
  219. package/dist/index48.cjs +9 -1
  220. package/dist/index48.cjs.map +1 -1
  221. package/dist/index48.js +30 -2
  222. package/dist/index48.js.map +1 -1
  223. package/dist/index49.cjs +19 -1
  224. package/dist/index49.cjs.map +1 -1
  225. package/dist/index49.js +599 -2
  226. package/dist/index49.js.map +1 -1
  227. package/dist/index5.cjs +1 -1
  228. package/dist/index5.cjs.map +1 -1
  229. package/dist/index5.js +41 -77
  230. package/dist/index5.js.map +1 -1
  231. package/dist/index50.cjs +2 -0
  232. package/dist/index50.cjs.map +1 -0
  233. package/dist/index50.js +5 -0
  234. package/dist/index50.js.map +1 -0
  235. package/dist/index51.cjs +2 -0
  236. package/dist/index51.cjs.map +1 -0
  237. package/dist/index51.js +154 -0
  238. package/dist/index51.js.map +1 -0
  239. package/dist/index52.cjs +2 -0
  240. package/dist/index52.cjs.map +1 -0
  241. package/dist/index52.js +19 -0
  242. package/dist/index52.js.map +1 -0
  243. package/dist/index53.cjs +2 -0
  244. package/dist/index53.cjs.map +1 -0
  245. package/dist/index53.js +345 -0
  246. package/dist/index53.js.map +1 -0
  247. package/dist/index54.cjs +2 -0
  248. package/dist/index54.cjs.map +1 -0
  249. package/dist/index54.js +48 -0
  250. package/dist/index54.js.map +1 -0
  251. package/dist/index55.cjs +2 -0
  252. package/dist/index55.cjs.map +1 -0
  253. package/dist/index55.js +5 -0
  254. package/dist/index55.js.map +1 -0
  255. package/dist/index56.cjs +2 -0
  256. package/dist/index56.cjs.map +1 -0
  257. package/dist/index56.js +5 -0
  258. package/dist/index56.js.map +1 -0
  259. package/dist/index57.cjs +2 -0
  260. package/dist/index57.cjs.map +1 -0
  261. package/dist/index57.js +5 -0
  262. package/dist/index57.js.map +1 -0
  263. package/dist/index58.cjs +2 -0
  264. package/dist/index58.cjs.map +1 -0
  265. package/dist/index58.js +7 -0
  266. package/dist/index58.js.map +1 -0
  267. package/dist/index6.cjs +1 -1
  268. package/dist/index6.cjs.map +1 -1
  269. package/dist/index6.js +110 -157
  270. package/dist/index6.js.map +1 -1
  271. package/dist/index7.cjs +1 -1
  272. package/dist/index7.cjs.map +1 -1
  273. package/dist/index7.js +85 -65
  274. package/dist/index7.js.map +1 -1
  275. package/dist/index8.cjs +1 -1
  276. package/dist/index8.cjs.map +1 -1
  277. package/dist/index8.js +155 -42
  278. package/dist/index8.js.map +1 -1
  279. package/dist/index9.cjs +1 -1
  280. package/dist/index9.cjs.map +1 -1
  281. package/dist/index9.js +70 -33
  282. package/dist/index9.js.map +1 -1
  283. package/dist/lib/utils.d.ts +1 -1
  284. package/dist/lib/utils.d.ts.map +1 -1
  285. package/dist/tailwind-theme-config.d.ts +318 -0
  286. package/dist/tailwind-theme-config.d.ts.map +1 -0
  287. package/package.json +62 -58
  288. package/dist/cosmik-theme.css +0 -185
@@ -1 +1 @@
1
- {"version":3,"file":"index37.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
1
+ {"version":3,"file":"index37.js","sources":["../src/Tooltip/index.tsx"],"sourcesContent":["'use client'\n\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip'\nimport { VariantProps, cva } from 'class-variance-authority'\nimport * as React from 'react'\nimport { cn } from '../lib/utils'\n\nconst tooltipContentVariants = cva(\n 'z-50 overflow-hidden rounded px-12 py-8 text-sm shadow-200 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n {\n variants: {\n variant: {\n default: 'bg-gray-800 text-white text-sm',\n inverted: 'bg-white text-gray-800 border border-gray-900-8'\n }\n },\n defaultVariants: {\n variant: 'default'\n }\n }\n)\n\nconst TooltipProvider = TooltipPrimitive.Provider\n\nconst Tooltip = TooltipPrimitive.Root\n\nconst TooltipPortal = TooltipPrimitive.Portal\n\nconst TooltipTrigger = TooltipPrimitive.Trigger\n\ninterface TooltipContentProps\n extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>,\n VariantProps<typeof tooltipContentVariants> {\n asChild?: boolean\n}\n\nconst TooltipContent = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n TooltipContentProps\n>(({ variant, className, sideOffset = 4, ...props }, ref) => (\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(tooltipContentVariants({ variant, className }))}\n {...props}\n />\n))\nTooltipContent.displayName = TooltipPrimitive.Content.displayName\n\nexport {\n Tooltip,\n TooltipContent,\n TooltipPortal,\n TooltipProvider,\n TooltipTrigger\n}\n"],"names":["tooltipContentVariants","cva","TooltipProvider","TooltipPrimitive","Tooltip","TooltipPortal","TooltipTrigger","TooltipContent","React","variant","className","sideOffset","props","ref","jsx","cn"],"mappings":";;;;;AAOA,MAAMA,IAAyBC;AAAA,EAC7B;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,IACX;AAAA,EACF;AACF,GAEMC,IAAkBC,EAAiB,UAEnCC,IAAUD,EAAiB,MAE3BE,IAAgBF,EAAiB,QAEjCG,IAAiBH,EAAiB,SAQlCI,IAAiBC,EAAM,WAG3B,CAAC,EAAE,SAAAC,GAAS,WAAAC,GAAW,YAAAC,IAAa,GAAG,GAAGC,EAAM,GAAGC,MACnDC,gBAAAA,EAAA;AAAA,EAACX,EAAiB;AAAA,EAAjB;AAAA,IACC,KAAAU;AAAA,IACA,YAAAF;AAAA,IACA,WAAWI,EAAGf,EAAuB,EAAE,SAAAS,GAAS,WAAAC,EAAW,CAAA,CAAC;AAAA,IAC3D,GAAGE;AAAA,EAAA;AACN,CACD;AACDL,EAAe,cAAcJ,EAAiB,QAAQ;"}
package/dist/index38.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./index46.cjs"),y=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,r=C.clsx,O=(t,l)=>e=>{var s;if(l?.variants==null)return r(t,e?.class,e?.className);const{variants:v,defaultVariants:u}=l,V=Object.keys(v).map(n=>{const a=e?.[n],d=u?.[n];if(a===null)return null;const i=y(a)||y(d);return v[n][i]}),c=e&&Object.entries(e).reduce((n,a)=>{let[d,i]=a;return i===void 0||(n[d]=i),n},{}),N=l==null||(s=l.compoundVariants)===null||s===void 0?void 0:s.reduce((n,a)=>{let{class:d,className:i,...b}=a;return Object.entries(b).every(f=>{let[m,o]=f;return Array.isArray(o)?o.includes({...u,...c}[m]):{...u,...c}[m]===o})?[...n,d,i]:n},[]);return r(t,V,N,e?.class,e?.className)};exports.cva=O;exports.cx=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index40.cjs"),m=require("@radix-ui/react-navigation-menu"),f=require("react"),x=require("./index26.cjs"),r=require("./index41.cjs");function c(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>e[i]})}}return t.default=e,Object.freeze(t)}const a=c(m),o=c(f),u=o.forwardRef((e,t)=>n.jsxRuntimeExports.jsx(a.Root,{ref:t,orientation:"vertical",...e}));u.displayName=a.Root.displayName;const l=o.forwardRef(({className:e,...t},i)=>n.jsxRuntimeExports.jsx(a.List,{ref:i,className:r.cn("group flex flex-col list-none items-center justify-center pb-16",e),...t}));l.displayName=a.List.displayName;function g({className:e,...t}){return n.jsxRuntimeExports.jsx("div",{className:r.cn("flex items-start justify-start text-sm text-gray-800 mt-16 mb-2 px-16",e),...t})}function v({...e}){return n.jsxRuntimeExports.jsx(x.Separator,{...e})}const p=o.forwardRef(({className:e,...t},i)=>n.jsxRuntimeExports.jsx(a.Item,{ref:i,className:r.cn("w-full",e),...t}));p.displayName=a.Item.displayName;const N=o.forwardRef(({className:e,...t},i)=>n.jsxRuntimeExports.jsx(a.Link,{ref:i,className:r.cn("flex justify-start px-12 py-[10px] w-full font-normal text-gray-800 hover:bg-gray-200 hover:text-purple-800 focus-visible:outline-none focus-visible:bg-gray-200 focus-visible:text-purple-900 data-[active]:bg-purple-900 hover:data-[active]:bg-purple-900 data-[active]:text-white",e),...t}));exports.VerticalNavigationMenu=u;exports.VerticalNavigationMenuHeading=g;exports.VerticalNavigationMenuItem=p;exports.VerticalNavigationMenuLink=N;exports.VerticalNavigationMenuList=l;exports.VerticalNavigationMenuSeparator=v;
2
2
  //# sourceMappingURL=index38.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index38.cjs","sources":["../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.mjs"],"sourcesContent":["/**\n * Copyright 2022 Joe Bell. All rights reserved.\n *\n * This file is licensed to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with the\n * License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or implied. See the\n * License for the specific language governing permissions and limitations under\n * the License.\n */ import { clsx } from \"clsx\";\nconst falsyToString = (value)=>typeof value === \"boolean\" ? `${value}` : value === 0 ? \"0\" : value;\nexport const cx = clsx;\nexport const cva = (base, config)=>(props)=>{\n var _config_compoundVariants;\n if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n const { variants, defaultVariants } = config;\n const getVariantClassNames = Object.keys(variants).map((variant)=>{\n const variantProp = props === null || props === void 0 ? void 0 : props[variant];\n const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];\n if (variantProp === null) return null;\n const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);\n return variants[variant][variantKey];\n });\n const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{\n let [key, value] = param;\n if (value === undefined) {\n return acc;\n }\n acc[key] = value;\n return acc;\n }, {});\n const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param)=>{\n let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;\n return Object.entries(compoundVariantOptions).every((param)=>{\n let [key, value] = param;\n return Array.isArray(value) ? value.includes({\n ...defaultVariants,\n ...propsWithoutUndefined\n }[key]) : ({\n ...defaultVariants,\n ...propsWithoutUndefined\n })[key] === value;\n }) ? [\n ...acc,\n cvClass,\n cvClassName\n ] : acc;\n }, []);\n return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n };\n\n"],"names":["falsyToString","value","cx","clsx","cva","base","config","props","_config_compoundVariants","variants","defaultVariants","getVariantClassNames","variant","variantProp","defaultVariantProp","variantKey","propsWithoutUndefined","acc","param","key","getCompoundVariantClassNames","cvClass","cvClassName","compoundVariantOptions"],"mappings":"iHAeMA,EAAiBC,GAAQ,OAAOA,GAAU,UAAY,GAAGA,CAAK,GAAKA,IAAU,EAAI,IAAMA,EAChFC,EAAKC,EAAAA,KACLC,EAAM,CAACC,EAAMC,IAAUC,GAAQ,CACpC,IAAIC,EACJ,GAAqDF,GAAO,UAAa,KAAM,OAAOJ,EAAGG,EAAoDE,GAAM,MAAqDA,GAAM,SAAS,EACvN,KAAM,CAAE,SAAAE,EAAU,gBAAAC,CAAe,EAAKJ,EAChCK,EAAuB,OAAO,KAAKF,CAAQ,EAAE,IAAKG,GAAU,CAC9D,MAAMC,EAA4DN,IAAMK,CAAO,EACzEE,EAAuFJ,IAAgBE,CAAO,EACpH,GAAIC,IAAgB,KAAM,OAAO,KACjC,MAAME,EAAaf,EAAca,CAAW,GAAKb,EAAcc,CAAkB,EACjF,OAAOL,EAASG,CAAO,EAAEG,CAAU,CACvC,CAAC,EACKC,EAAwBT,GAAS,OAAO,QAAQA,CAAK,EAAE,OAAO,CAACU,EAAKC,IAAQ,CAC9E,GAAI,CAACC,EAAKlB,CAAK,EAAIiB,EACnB,OAAIjB,IAAU,SAGdgB,EAAIE,CAAG,EAAIlB,GACJgB,CACX,EAAG,CAAA,CAAE,EACCG,EAA+Bd,GAAW,OAAsCE,EAA2BF,EAAO,oBAAsB,MAAQE,IAA6B,OAAvG,OAAyHA,EAAyB,OAAO,CAACS,EAAKC,IAAQ,CAC/O,GAAI,CAAE,MAAOG,EAAS,UAAWC,EAAa,GAAGC,CAAsB,EAAKL,EAC5E,OAAO,OAAO,QAAQK,CAAsB,EAAE,MAAOL,GAAQ,CACzD,GAAI,CAACC,EAAKlB,CAAK,EAAIiB,EACnB,OAAO,MAAM,QAAQjB,CAAK,EAAIA,EAAM,SAAS,CACzC,GAAGS,EACH,GAAGM,CACvB,EAAkBG,CAAG,CAAC,EAAK,CACP,GAAGT,EACH,GAAGM,CACvB,EAAmBG,CAAG,IAAMlB,CAChB,CAAC,EAAI,CACD,GAAGgB,EACHI,EACAC,CAChB,EAAgBL,CACR,EAAG,CAAA,CAAE,EACL,OAAOf,EAAGG,EAAMM,EAAsBS,EAA4Eb,GAAM,MAAqDA,GAAM,SAAS,CAChM","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index38.cjs","sources":["../src/VerticalNavigationMenu/index.tsx"],"sourcesContent":["import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu'\nimport * as React from 'react'\nimport { Separator } from '../Separator'\nimport { cn } from '../lib/utils'\n\nconst VerticalNavigationMenu = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>\n>((props, ref) => (\n <NavigationMenuPrimitive.Root ref={ref} orientation=\"vertical\" {...props} />\n))\nVerticalNavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName\n\nconst VerticalNavigationMenuList = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.List\n ref={ref}\n className={cn(\n 'group flex flex-col list-none items-center justify-center pb-16',\n className\n )}\n {...props}\n />\n))\nVerticalNavigationMenuList.displayName =\n NavigationMenuPrimitive.List.displayName\n\nfunction VerticalNavigationMenuHeading({\n className,\n ...props\n}: React.ComponentPropsWithoutRef<'div'>) {\n return (\n <div\n className={cn(\n 'flex items-start justify-start text-sm text-gray-800 mt-16 mb-2 px-16',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction VerticalNavigationMenuSeparator({\n ...props\n}: React.ComponentPropsWithoutRef<'div'>) {\n return <Separator {...props} />\n}\n\nconst VerticalNavigationMenuItem = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Item\n ref={ref}\n className={cn('w-full', className)}\n {...props}\n />\n))\nVerticalNavigationMenuItem.displayName =\n NavigationMenuPrimitive.Item.displayName\n\nconst VerticalNavigationMenuLink = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Link>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Link>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Link\n ref={ref}\n className={cn(\n 'flex justify-start px-12 py-[10px] w-full font-normal text-gray-800 \\\n hover:bg-gray-200 hover:text-purple-800 \\\n focus-visible:outline-none focus-visible:bg-gray-200 focus-visible:text-purple-900 \\\n data-[active]:bg-purple-900 hover:data-[active]:bg-purple-900 data-[active]:text-white',\n className\n )}\n {...props}\n />\n))\n\nexport {\n VerticalNavigationMenu,\n VerticalNavigationMenuHeading,\n VerticalNavigationMenuItem,\n VerticalNavigationMenuLink,\n VerticalNavigationMenuList,\n VerticalNavigationMenuSeparator\n}\n"],"names":["VerticalNavigationMenu","React","props","ref","jsx","NavigationMenuPrimitive","VerticalNavigationMenuList","className","cn","VerticalNavigationMenuHeading","VerticalNavigationMenuSeparator","Separator","VerticalNavigationMenuItem","VerticalNavigationMenuLink"],"mappings":"wgBAKMA,EAAyBC,EAAM,WAGnC,CAACC,EAAOC,IACRC,EAAAA,kBAAAA,IAACC,EAAwB,KAAxB,CAA6B,IAAAF,EAAU,YAAY,WAAY,GAAGD,CAAO,CAAA,CAC3E,EACDF,EAAuB,YAAcK,EAAwB,KAAK,YAE5D,MAAAC,EAA6BL,EAAM,WAGvC,CAAC,CAAE,UAAAM,EAAW,GAAGL,CAAM,EAAGC,IAC1BC,EAAA,kBAAA,IAACC,EAAwB,KAAxB,CACC,IAAAF,EACA,UAAWK,EAAA,GACT,kEACAD,CACF,EACC,GAAGL,CAAA,CACN,CACD,EACDI,EAA2B,YACzBD,EAAwB,KAAK,YAE/B,SAASI,EAA8B,CACrC,UAAAF,EACA,GAAGL,CACL,EAA0C,CAEtC,OAAAE,EAAA,kBAAA,IAAC,MAAA,CACC,UAAWI,EAAA,GACT,wEACAD,CACF,EACC,GAAGL,CAAA,CAAA,CAGV,CAEA,SAASQ,EAAgC,CACvC,GAAGR,CACL,EAA0C,CACjC,OAAAE,EAAA,kBAAA,IAACO,EAAW,UAAA,CAAA,GAAGT,CAAO,CAAA,CAC/B,CAEM,MAAAU,EAA6BX,EAAM,WAGvC,CAAC,CAAE,UAAAM,EAAW,GAAGL,CAAM,EAAGC,IAC1BC,EAAA,kBAAA,IAACC,EAAwB,KAAxB,CACC,IAAAF,EACA,UAAWK,EAAAA,GAAG,SAAUD,CAAS,EAChC,GAAGL,CAAA,CACN,CACD,EACDU,EAA2B,YACzBP,EAAwB,KAAK,YAEzB,MAAAQ,EAA6BZ,EAAM,WAGvC,CAAC,CAAE,UAAAM,EAAW,GAAGL,CAAM,EAAGC,IAC1BC,EAAA,kBAAA,IAACC,EAAwB,KAAxB,CACC,IAAAF,EACA,UAAWK,EAAA,GACT,oSAIAD,CACF,EACC,GAAGL,CAAA,CACN,CACD"}
package/dist/index38.js CHANGED
@@ -1,36 +1,68 @@
1
- import { clsx as O } from "./index46.js";
2
- const m = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = O, j = (e, l) => (n) => {
3
- var s;
4
- if (l?.variants == null) return y(e, n?.class, n?.className);
5
- const { variants: r, defaultVariants: d } = l, V = Object.keys(r).map((t) => {
6
- const a = n?.[t], u = d?.[t];
7
- if (a === null) return null;
8
- const i = m(a) || m(u);
9
- return r[t][i];
10
- }), v = n && Object.entries(n).reduce((t, a) => {
11
- let [u, i] = a;
12
- return i === void 0 || (t[u] = i), t;
13
- }, {}), N = l == null || (s = l.compoundVariants) === null || s === void 0 ? void 0 : s.reduce((t, a) => {
14
- let { class: u, className: i, ...f } = a;
15
- return Object.entries(f).every((C) => {
16
- let [c, o] = C;
17
- return Array.isArray(o) ? o.includes({
18
- ...d,
19
- ...v
20
- }[c]) : {
21
- ...d,
22
- ...v
23
- }[c] === o;
24
- }) ? [
25
- ...t,
26
- u,
27
- i
28
- ] : t;
29
- }, []);
30
- return y(e, V, N, n?.class, n?.className);
31
- };
1
+ import { j as i } from "./index40.js";
2
+ import * as a from "@radix-ui/react-navigation-menu";
3
+ import * as o from "react";
4
+ import { Separator as n } from "./index26.js";
5
+ import { cn as s } from "./index41.js";
6
+ const l = o.forwardRef((t, e) => /* @__PURE__ */ i.jsx(a.Root, { ref: e, orientation: "vertical", ...t }));
7
+ l.displayName = a.Root.displayName;
8
+ const m = o.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i.jsx(
9
+ a.List,
10
+ {
11
+ ref: r,
12
+ className: s(
13
+ "group flex flex-col list-none items-center justify-center pb-16",
14
+ t
15
+ ),
16
+ ...e
17
+ }
18
+ ));
19
+ m.displayName = a.List.displayName;
20
+ function x({
21
+ className: t,
22
+ ...e
23
+ }) {
24
+ return /* @__PURE__ */ i.jsx(
25
+ "div",
26
+ {
27
+ className: s(
28
+ "flex items-start justify-start text-sm text-gray-800 mt-16 mb-2 px-16",
29
+ t
30
+ ),
31
+ ...e
32
+ }
33
+ );
34
+ }
35
+ function v({
36
+ ...t
37
+ }) {
38
+ return /* @__PURE__ */ i.jsx(n, { ...t });
39
+ }
40
+ const p = o.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i.jsx(
41
+ a.Item,
42
+ {
43
+ ref: r,
44
+ className: s("w-full", t),
45
+ ...e
46
+ }
47
+ ));
48
+ p.displayName = a.Item.displayName;
49
+ const g = o.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i.jsx(
50
+ a.Link,
51
+ {
52
+ ref: r,
53
+ className: s(
54
+ "flex justify-start px-12 py-[10px] w-full font-normal text-gray-800 hover:bg-gray-200 hover:text-purple-800 focus-visible:outline-none focus-visible:bg-gray-200 focus-visible:text-purple-900 data-[active]:bg-purple-900 hover:data-[active]:bg-purple-900 data-[active]:text-white",
55
+ t
56
+ ),
57
+ ...e
58
+ }
59
+ ));
32
60
  export {
33
- j as cva,
34
- y as cx
61
+ l as VerticalNavigationMenu,
62
+ x as VerticalNavigationMenuHeading,
63
+ p as VerticalNavigationMenuItem,
64
+ g as VerticalNavigationMenuLink,
65
+ m as VerticalNavigationMenuList,
66
+ v as VerticalNavigationMenuSeparator
35
67
  };
36
68
  //# sourceMappingURL=index38.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index38.js","sources":["../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.mjs"],"sourcesContent":["/**\n * Copyright 2022 Joe Bell. All rights reserved.\n *\n * This file is licensed to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with the\n * License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or implied. See the\n * License for the specific language governing permissions and limitations under\n * the License.\n */ import { clsx } from \"clsx\";\nconst falsyToString = (value)=>typeof value === \"boolean\" ? `${value}` : value === 0 ? \"0\" : value;\nexport const cx = clsx;\nexport const cva = (base, config)=>(props)=>{\n var _config_compoundVariants;\n if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n const { variants, defaultVariants } = config;\n const getVariantClassNames = Object.keys(variants).map((variant)=>{\n const variantProp = props === null || props === void 0 ? void 0 : props[variant];\n const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];\n if (variantProp === null) return null;\n const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);\n return variants[variant][variantKey];\n });\n const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{\n let [key, value] = param;\n if (value === undefined) {\n return acc;\n }\n acc[key] = value;\n return acc;\n }, {});\n const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param)=>{\n let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;\n return Object.entries(compoundVariantOptions).every((param)=>{\n let [key, value] = param;\n return Array.isArray(value) ? value.includes({\n ...defaultVariants,\n ...propsWithoutUndefined\n }[key]) : ({\n ...defaultVariants,\n ...propsWithoutUndefined\n })[key] === value;\n }) ? [\n ...acc,\n cvClass,\n cvClassName\n ] : acc;\n }, []);\n return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n };\n\n"],"names":["falsyToString","value","cx","clsx","cva","base","config","props","_config_compoundVariants","variants","defaultVariants","getVariantClassNames","variant","variantProp","defaultVariantProp","variantKey","propsWithoutUndefined","acc","param","key","getCompoundVariantClassNames","cvClass","cvClassName","compoundVariantOptions"],"mappings":";AAeA,MAAMA,IAAgB,CAACC,MAAQ,OAAOA,KAAU,YAAY,GAAGA,CAAK,KAAKA,MAAU,IAAI,MAAMA,GAChFC,IAAKC,GACLC,IAAM,CAACC,GAAMC,MAAS,CAACC,MAAQ;AACpC,MAAIC;AACJ,MAAqDF,GAAO,YAAa,KAAM,QAAOJ,EAAGG,GAAoDE,GAAM,OAAqDA,GAAM,SAAS;AACvN,QAAM,EAAE,UAAAE,GAAU,iBAAAC,EAAe,IAAKJ,GAChCK,IAAuB,OAAO,KAAKF,CAAQ,EAAE,IAAI,CAACG,MAAU;AAC9D,UAAMC,IAA4DN,IAAMK,CAAO,GACzEE,IAAuFJ,IAAgBE,CAAO;AACpH,QAAIC,MAAgB,KAAM,QAAO;AACjC,UAAME,IAAaf,EAAca,CAAW,KAAKb,EAAcc,CAAkB;AACjF,WAAOL,EAASG,CAAO,EAAEG,CAAU;AAAA,EACvC,CAAC,GACKC,IAAwBT,KAAS,OAAO,QAAQA,CAAK,EAAE,OAAO,CAACU,GAAKC,MAAQ;AAC9E,QAAI,CAACC,GAAKlB,CAAK,IAAIiB;AACnB,WAAIjB,MAAU,WAGdgB,EAAIE,CAAG,IAAIlB,IACJgB;AAAA,EACX,GAAG,CAAA,CAAE,GACCG,IAA+Bd,KAAW,SAAsCE,IAA2BF,EAAO,sBAAsB,QAAQE,MAA6B,SAAvG,SAAyHA,EAAyB,OAAO,CAACS,GAAKC,MAAQ;AAC/O,QAAI,EAAE,OAAOG,GAAS,WAAWC,GAAa,GAAGC,EAAsB,IAAKL;AAC5E,WAAO,OAAO,QAAQK,CAAsB,EAAE,MAAM,CAACL,MAAQ;AACzD,UAAI,CAACC,GAAKlB,CAAK,IAAIiB;AACnB,aAAO,MAAM,QAAQjB,CAAK,IAAIA,EAAM,SAAS;AAAA,QACzC,GAAGS;AAAA,QACH,GAAGM;AAAA,MACvB,EAAkBG,CAAG,CAAC,IAAK;AAAA,QACP,GAAGT;AAAA,QACH,GAAGM;AAAA,MACvB,EAAmBG,CAAG,MAAMlB;AAAA,IAChB,CAAC,IAAI;AAAA,MACD,GAAGgB;AAAA,MACHI;AAAA,MACAC;AAAA,IAChB,IAAgBL;AAAA,EACR,GAAG,CAAA,CAAE;AACL,SAAOf,EAAGG,GAAMM,GAAsBS,GAA4Eb,GAAM,OAAqDA,GAAM,SAAS;AAChM;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index38.js","sources":["../src/VerticalNavigationMenu/index.tsx"],"sourcesContent":["import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu'\nimport * as React from 'react'\nimport { Separator } from '../Separator'\nimport { cn } from '../lib/utils'\n\nconst VerticalNavigationMenu = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>\n>((props, ref) => (\n <NavigationMenuPrimitive.Root ref={ref} orientation=\"vertical\" {...props} />\n))\nVerticalNavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName\n\nconst VerticalNavigationMenuList = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.List\n ref={ref}\n className={cn(\n 'group flex flex-col list-none items-center justify-center pb-16',\n className\n )}\n {...props}\n />\n))\nVerticalNavigationMenuList.displayName =\n NavigationMenuPrimitive.List.displayName\n\nfunction VerticalNavigationMenuHeading({\n className,\n ...props\n}: React.ComponentPropsWithoutRef<'div'>) {\n return (\n <div\n className={cn(\n 'flex items-start justify-start text-sm text-gray-800 mt-16 mb-2 px-16',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction VerticalNavigationMenuSeparator({\n ...props\n}: React.ComponentPropsWithoutRef<'div'>) {\n return <Separator {...props} />\n}\n\nconst VerticalNavigationMenuItem = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Item\n ref={ref}\n className={cn('w-full', className)}\n {...props}\n />\n))\nVerticalNavigationMenuItem.displayName =\n NavigationMenuPrimitive.Item.displayName\n\nconst VerticalNavigationMenuLink = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Link>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Link>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Link\n ref={ref}\n className={cn(\n 'flex justify-start px-12 py-[10px] w-full font-normal text-gray-800 \\\n hover:bg-gray-200 hover:text-purple-800 \\\n focus-visible:outline-none focus-visible:bg-gray-200 focus-visible:text-purple-900 \\\n data-[active]:bg-purple-900 hover:data-[active]:bg-purple-900 data-[active]:text-white',\n className\n )}\n {...props}\n />\n))\n\nexport {\n VerticalNavigationMenu,\n VerticalNavigationMenuHeading,\n VerticalNavigationMenuItem,\n VerticalNavigationMenuLink,\n VerticalNavigationMenuList,\n VerticalNavigationMenuSeparator\n}\n"],"names":["VerticalNavigationMenu","React","props","ref","jsx","NavigationMenuPrimitive","VerticalNavigationMenuList","className","cn","VerticalNavigationMenuHeading","VerticalNavigationMenuSeparator","Separator","VerticalNavigationMenuItem","VerticalNavigationMenuLink"],"mappings":";;;;;AAKA,MAAMA,IAAyBC,EAAM,WAGnC,CAACC,GAAOC,MACRC,gBAAAA,EAAAA,IAACC,EAAwB,MAAxB,EAA6B,KAAAF,GAAU,aAAY,YAAY,GAAGD,EAAO,CAAA,CAC3E;AACDF,EAAuB,cAAcK,EAAwB,KAAK;AAE5D,MAAAC,IAA6BL,EAAM,WAGvC,CAAC,EAAE,WAAAM,GAAW,GAAGL,EAAM,GAAGC,MAC1BC,gBAAAA,EAAA;AAAA,EAACC,EAAwB;AAAA,EAAxB;AAAA,IACC,KAAAF;AAAA,IACA,WAAWK;AAAA,MACT;AAAA,MACAD;AAAA,IACF;AAAA,IACC,GAAGL;AAAA,EAAA;AACN,CACD;AACDI,EAA2B,cACzBD,EAAwB,KAAK;AAE/B,SAASI,EAA8B;AAAA,EACrC,WAAAF;AAAA,EACA,GAAGL;AACL,GAA0C;AAEtC,SAAAE,gBAAAA,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWI;AAAA,QACT;AAAA,QACAD;AAAA,MACF;AAAA,MACC,GAAGL;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASQ,EAAgC;AAAA,EACvC,GAAGR;AACL,GAA0C;AACjC,SAAAE,gBAAAA,EAAA,IAACO,GAAW,EAAA,GAAGT,EAAO,CAAA;AAC/B;AAEM,MAAAU,IAA6BX,EAAM,WAGvC,CAAC,EAAE,WAAAM,GAAW,GAAGL,EAAM,GAAGC,MAC1BC,gBAAAA,EAAA;AAAA,EAACC,EAAwB;AAAA,EAAxB;AAAA,IACC,KAAAF;AAAA,IACA,WAAWK,EAAG,UAAUD,CAAS;AAAA,IAChC,GAAGL;AAAA,EAAA;AACN,CACD;AACDU,EAA2B,cACzBP,EAAwB,KAAK;AAEzB,MAAAQ,IAA6BZ,EAAM,WAGvC,CAAC,EAAE,WAAAM,GAAW,GAAGL,EAAM,GAAGC,MAC1BC,gBAAAA,EAAA;AAAA,EAACC,EAAwB;AAAA,EAAxB;AAAA,IACC,KAAAF;AAAA,IACA,WAAWK;AAAA,MACT;AAAA,MAIAD;AAAA,IACF;AAAA,IACC,GAAGL;AAAA,EAAA;AACN,CACD;"}
package/dist/index39.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index46.cjs"),o=require("./index47.cjs");function r(...e){return o.twMerge(c.clsx(e))}function i(e,n){let t;return(...u)=>{clearTimeout(t),t=setTimeout(()=>e(...u),n)}}exports.cn=r;exports.debounce=i;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const m=require("./index44.cjs"),w=require("./index45.cjs"),v=require("./index46.cjs"),f=w.colorStringExports,l=v.colorConvert,y=["keyword","gray","hex"],b={};for(const t of Object.keys(l))b[[...l[t].labels].sort().join("")]=t;const p={};function h(t,r){if(!(this instanceof h))return new h(t,r);if(r&&r in y&&(r=null),r&&!(r in l))throw new Error("Unknown model: "+r);let o,n;if(t==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof h)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if(typeof t=="string"){const e=f.get(t);if(e===null)throw new Error("Unable to parse color from string: "+t);this.model=e.model,n=l[this.model].channels,this.color=e.value.slice(0,n),this.valpha=typeof e.value[n]=="number"?e.value[n]:1}else if(t.length>0){this.model=r||"rgb",n=l[this.model].channels;const e=Array.prototype.slice.call(t,0,n);this.color=d(e,n),this.valpha=typeof t[n]=="number"?t[n]:1}else if(typeof t=="number")this.model="rgb",this.color=[t>>16&255,t>>8&255,t&255],this.valpha=1;else{this.valpha=1;const e=Object.keys(t);"alpha"in t&&(e.splice(e.indexOf("alpha"),1),this.valpha=typeof t.alpha=="number"?t.alpha:0);const a=e.sort().join("");if(!(a in b))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=b[a];const{labels:u}=l[this.model],c=[];for(o=0;o<u.length;o++)c.push(t[u[o]]);this.color=d(c)}if(p[this.model])for(n=l[this.model].channels,o=0;o<n;o++){const e=p[this.model][o];e&&(this.color[o]=e(this.color[o]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}h.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let r=this.model in f.to?this:this.rgb();r=r.round(typeof t=="number"?t:1);const o=r.valpha===1?r.color:[...r.color,this.valpha];return f.to[r.model](o)},percentString(t){const r=this.rgb().round(typeof t=="number"?t:1),o=r.valpha===1?r.color:[...r.color,this.valpha];return f.to.rgb.percent(o)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const t={},{channels:r}=l[this.model],{labels:o}=l[this.model];for(let n=0;n<r;n++)t[o[n]]=this.color[n];return this.valpha!==1&&(t.alpha=this.valpha),t},unitArray(){const t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,this.valpha!==1&&t.push(this.valpha),t},unitObject(){const t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,this.valpha!==1&&(t.alpha=this.valpha),t},round(t){return t=Math.max(t||0,0),new h([...this.color.map(k(t)),this.valpha],this.model)},alpha(t){return t!==void 0?new h([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},red:s("rgb",0,i(255)),green:s("rgb",1,i(255)),blue:s("rgb",2,i(255)),hue:s(["hsl","hsv","hsl","hwb","hcg"],0,t=>(t%360+360)%360),saturationl:s("hsl",1,i(100)),lightness:s("hsl",2,i(100)),saturationv:s("hsv",1,i(100)),value:s("hsv",2,i(100)),chroma:s("hcg",1,i(100)),gray:s("hcg",2,i(100)),white:s("hwb",1,i(100)),wblack:s("hwb",2,i(100)),cyan:s("cmyk",0,i(100)),magenta:s("cmyk",1,i(100)),yellow:s("cmyk",2,i(100)),black:s("cmyk",3,i(100)),x:s("xyz",0,i(95.047)),y:s("xyz",1,i(100)),z:s("xyz",2,i(108.833)),l:s("lab",0,i(100)),a:s("lab",1),b:s("lab",2),keyword(t){return t!==void 0?new h(t):l[this.model].keyword(this.color)},hex(t){return t!==void 0?new h(t):f.to.hex(this.rgb().round().color)},hexa(t){if(t!==void 0)return new h(t);const r=this.rgb().round().color;let o=Math.round(this.valpha*255).toString(16).toUpperCase();return o.length===1&&(o="0"+o),f.to.hex(r)+o},rgbNumber(){const t=this.rgb().color;return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255},luminosity(){const t=this.rgb().color,r=[];for(const[o,n]of t.entries()){const e=n/255;r[o]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return .2126*r[0]+.7152*r[1]+.0722*r[2]},contrast(t){const r=this.luminosity(),o=t.luminosity();return r>o?(r+.05)/(o+.05):(o+.05)/(r+.05)},level(t){const r=this.contrast(t);return r>=7?"AAA":r>=4.5?"AA":""},isDark(){const t=this.rgb().color;return(t[0]*2126+t[1]*7152+t[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const t=this.rgb();for(let r=0;r<3;r++)t.color[r]=255-t.color[r];return t},lighten(t){const r=this.hsl();return r.color[2]+=r.color[2]*t,r},darken(t){const r=this.hsl();return r.color[2]-=r.color[2]*t,r},saturate(t){const r=this.hsl();return r.color[1]+=r.color[1]*t,r},desaturate(t){const r=this.hsl();return r.color[1]-=r.color[1]*t,r},whiten(t){const r=this.hwb();return r.color[1]+=r.color[1]*t,r},blacken(t){const r=this.hwb();return r.color[2]+=r.color[2]*t,r},grayscale(){const t=this.rgb().color,r=t[0]*.3+t[1]*.59+t[2]*.11;return h.rgb(r,r,r)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){const r=this.hsl();let o=r.color[0];return o=(o+t)%360,o=o<0?360+o:o,r.color[0]=o,r},mix(t,r){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);const o=t.rgb(),n=this.rgb(),e=r===void 0?.5:r,a=2*e-1,u=o.alpha()-n.alpha(),c=((a*u===-1?a:(a+u)/(1+a*u))+1)/2,g=1-c;return h.rgb(c*o.red()+g*n.red(),c*o.green()+g*n.green(),c*o.blue()+g*n.blue(),o.alpha()*e+n.alpha()*(1-e))}};for(const t of Object.keys(l)){if(y.includes(t))continue;const{channels:r}=l[t];h.prototype[t]=function(...o){return this.model===t?new h(this):o.length>0?new h(o,t):new h([...A(l[this.model][t].raw(this.color)),this.valpha],t)},h[t]=function(...o){let n=o[0];return typeof n=="number"&&(n=d(o,r)),new h(n,t)}}function x(t,r){return Number(t.toFixed(r))}function k(t){return function(r){return x(r,t)}}function s(t,r,o){t=Array.isArray(t)?t:[t];for(const n of t)(p[n]||(p[n]=[]))[r]=o;return t=t[0],function(n){let e;return n!==void 0?(o&&(n=o(n)),e=this[t](),e.color[r]=n,e):(e=this[t]().color[r],o&&(e=o(e)),e)}}function i(t){return function(r){return Math.max(0,Math.min(t,r))}}function A(t){return Array.isArray(t)?t:[t]}function d(t,r){for(let o=0;o<r;o++)typeof t[o]!="number"&&(t[o]=0);return t}var F=h;const M=m.getDefaultExportFromCjs(F);exports.default=M;
2
2
  //# sourceMappingURL=index39.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index39.cjs","sources":["../src/lib/utils.ts"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n\nexport function debounce<F extends (...args: Parameters<F>) => ReturnType<F>>(\n func: F,\n waitFor: number\n) {\n let timeout: ReturnType<typeof setTimeout>\n\n const debounced = (...args: Parameters<F>) => {\n clearTimeout(timeout)\n timeout = setTimeout(() => func(...args), waitFor)\n }\n\n return debounced\n}\n"],"names":["cn","inputs","twMerge","clsx","debounce","func","waitFor","timeout","args"],"mappings":"4IAGO,SAASA,KAAMC,EAAsB,CAC1C,OAAOC,EAAAA,QAAQC,OAAKF,CAAM,CAAC,CAC7B,CAEO,SAASG,EACdC,EACAC,EACA,CACA,IAAIC,EAOJ,MALkB,IAAIC,IAAwB,CAC5C,aAAaD,CAAO,EACpBA,EAAU,WAAW,IAAMF,EAAK,GAAGG,CAAI,EAAGF,CAAO,CACnD,CAGF"}
1
+ {"version":3,"file":"index39.cjs","sources":["../node_modules/.pnpm/color@4.2.3/node_modules/color/index.js"],"sourcesContent":["const colorString = require('color-string');\nconst convert = require('color-convert');\n\nconst skippedModels = [\n\t// To be honest, I don't really feel like keyword belongs in color convert, but eh.\n\t'keyword',\n\n\t// Gray conflicts with some method names, and has its own method defined.\n\t'gray',\n\n\t// Shouldn't really be in color-convert either...\n\t'hex',\n];\n\nconst hashedModelKeys = {};\nfor (const model of Object.keys(convert)) {\n\thashedModelKeys[[...convert[model].labels].sort().join('')] = model;\n}\n\nconst limiters = {};\n\nfunction Color(object, model) {\n\tif (!(this instanceof Color)) {\n\t\treturn new Color(object, model);\n\t}\n\n\tif (model && model in skippedModels) {\n\t\tmodel = null;\n\t}\n\n\tif (model && !(model in convert)) {\n\t\tthrow new Error('Unknown model: ' + model);\n\t}\n\n\tlet i;\n\tlet channels;\n\n\tif (object == null) { // eslint-disable-line no-eq-null,eqeqeq\n\t\tthis.model = 'rgb';\n\t\tthis.color = [0, 0, 0];\n\t\tthis.valpha = 1;\n\t} else if (object instanceof Color) {\n\t\tthis.model = object.model;\n\t\tthis.color = [...object.color];\n\t\tthis.valpha = object.valpha;\n\t} else if (typeof object === 'string') {\n\t\tconst result = colorString.get(object);\n\t\tif (result === null) {\n\t\t\tthrow new Error('Unable to parse color from string: ' + object);\n\t\t}\n\n\t\tthis.model = result.model;\n\t\tchannels = convert[this.model].channels;\n\t\tthis.color = result.value.slice(0, channels);\n\t\tthis.valpha = typeof result.value[channels] === 'number' ? result.value[channels] : 1;\n\t} else if (object.length > 0) {\n\t\tthis.model = model || 'rgb';\n\t\tchannels = convert[this.model].channels;\n\t\tconst newArray = Array.prototype.slice.call(object, 0, channels);\n\t\tthis.color = zeroArray(newArray, channels);\n\t\tthis.valpha = typeof object[channels] === 'number' ? object[channels] : 1;\n\t} else if (typeof object === 'number') {\n\t\t// This is always RGB - can be converted later on.\n\t\tthis.model = 'rgb';\n\t\tthis.color = [\n\t\t\t(object >> 16) & 0xFF,\n\t\t\t(object >> 8) & 0xFF,\n\t\t\tobject & 0xFF,\n\t\t];\n\t\tthis.valpha = 1;\n\t} else {\n\t\tthis.valpha = 1;\n\n\t\tconst keys = Object.keys(object);\n\t\tif ('alpha' in object) {\n\t\t\tkeys.splice(keys.indexOf('alpha'), 1);\n\t\t\tthis.valpha = typeof object.alpha === 'number' ? object.alpha : 0;\n\t\t}\n\n\t\tconst hashedKeys = keys.sort().join('');\n\t\tif (!(hashedKeys in hashedModelKeys)) {\n\t\t\tthrow new Error('Unable to parse color from object: ' + JSON.stringify(object));\n\t\t}\n\n\t\tthis.model = hashedModelKeys[hashedKeys];\n\n\t\tconst {labels} = convert[this.model];\n\t\tconst color = [];\n\t\tfor (i = 0; i < labels.length; i++) {\n\t\t\tcolor.push(object[labels[i]]);\n\t\t}\n\n\t\tthis.color = zeroArray(color);\n\t}\n\n\t// Perform limitations (clamping, etc.)\n\tif (limiters[this.model]) {\n\t\tchannels = convert[this.model].channels;\n\t\tfor (i = 0; i < channels; i++) {\n\t\t\tconst limit = limiters[this.model][i];\n\t\t\tif (limit) {\n\t\t\t\tthis.color[i] = limit(this.color[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\tthis.valpha = Math.max(0, Math.min(1, this.valpha));\n\n\tif (Object.freeze) {\n\t\tObject.freeze(this);\n\t}\n}\n\nColor.prototype = {\n\ttoString() {\n\t\treturn this.string();\n\t},\n\n\ttoJSON() {\n\t\treturn this[this.model]();\n\t},\n\n\tstring(places) {\n\t\tlet self = this.model in colorString.to ? this : this.rgb();\n\t\tself = self.round(typeof places === 'number' ? places : 1);\n\t\tconst args = self.valpha === 1 ? self.color : [...self.color, this.valpha];\n\t\treturn colorString.to[self.model](args);\n\t},\n\n\tpercentString(places) {\n\t\tconst self = this.rgb().round(typeof places === 'number' ? places : 1);\n\t\tconst args = self.valpha === 1 ? self.color : [...self.color, this.valpha];\n\t\treturn colorString.to.rgb.percent(args);\n\t},\n\n\tarray() {\n\t\treturn this.valpha === 1 ? [...this.color] : [...this.color, this.valpha];\n\t},\n\n\tobject() {\n\t\tconst result = {};\n\t\tconst {channels} = convert[this.model];\n\t\tconst {labels} = convert[this.model];\n\n\t\tfor (let i = 0; i < channels; i++) {\n\t\t\tresult[labels[i]] = this.color[i];\n\t\t}\n\n\t\tif (this.valpha !== 1) {\n\t\t\tresult.alpha = this.valpha;\n\t\t}\n\n\t\treturn result;\n\t},\n\n\tunitArray() {\n\t\tconst rgb = this.rgb().color;\n\t\trgb[0] /= 255;\n\t\trgb[1] /= 255;\n\t\trgb[2] /= 255;\n\n\t\tif (this.valpha !== 1) {\n\t\t\trgb.push(this.valpha);\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tunitObject() {\n\t\tconst rgb = this.rgb().object();\n\t\trgb.r /= 255;\n\t\trgb.g /= 255;\n\t\trgb.b /= 255;\n\n\t\tif (this.valpha !== 1) {\n\t\t\trgb.alpha = this.valpha;\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tround(places) {\n\t\tplaces = Math.max(places || 0, 0);\n\t\treturn new Color([...this.color.map(roundToPlace(places)), this.valpha], this.model);\n\t},\n\n\talpha(value) {\n\t\tif (value !== undefined) {\n\t\t\treturn new Color([...this.color, Math.max(0, Math.min(1, value))], this.model);\n\t\t}\n\n\t\treturn this.valpha;\n\t},\n\n\t// Rgb\n\tred: getset('rgb', 0, maxfn(255)),\n\tgreen: getset('rgb', 1, maxfn(255)),\n\tblue: getset('rgb', 2, maxfn(255)),\n\n\thue: getset(['hsl', 'hsv', 'hsl', 'hwb', 'hcg'], 0, value => ((value % 360) + 360) % 360),\n\n\tsaturationl: getset('hsl', 1, maxfn(100)),\n\tlightness: getset('hsl', 2, maxfn(100)),\n\n\tsaturationv: getset('hsv', 1, maxfn(100)),\n\tvalue: getset('hsv', 2, maxfn(100)),\n\n\tchroma: getset('hcg', 1, maxfn(100)),\n\tgray: getset('hcg', 2, maxfn(100)),\n\n\twhite: getset('hwb', 1, maxfn(100)),\n\twblack: getset('hwb', 2, maxfn(100)),\n\n\tcyan: getset('cmyk', 0, maxfn(100)),\n\tmagenta: getset('cmyk', 1, maxfn(100)),\n\tyellow: getset('cmyk', 2, maxfn(100)),\n\tblack: getset('cmyk', 3, maxfn(100)),\n\n\tx: getset('xyz', 0, maxfn(95.047)),\n\ty: getset('xyz', 1, maxfn(100)),\n\tz: getset('xyz', 2, maxfn(108.833)),\n\n\tl: getset('lab', 0, maxfn(100)),\n\ta: getset('lab', 1),\n\tb: getset('lab', 2),\n\n\tkeyword(value) {\n\t\tif (value !== undefined) {\n\t\t\treturn new Color(value);\n\t\t}\n\n\t\treturn convert[this.model].keyword(this.color);\n\t},\n\n\thex(value) {\n\t\tif (value !== undefined) {\n\t\t\treturn new Color(value);\n\t\t}\n\n\t\treturn colorString.to.hex(this.rgb().round().color);\n\t},\n\n\thexa(value) {\n\t\tif (value !== undefined) {\n\t\t\treturn new Color(value);\n\t\t}\n\n\t\tconst rgbArray = this.rgb().round().color;\n\n\t\tlet alphaHex = Math.round(this.valpha * 255).toString(16).toUpperCase();\n\t\tif (alphaHex.length === 1) {\n\t\t\talphaHex = '0' + alphaHex;\n\t\t}\n\n\t\treturn colorString.to.hex(rgbArray) + alphaHex;\n\t},\n\n\trgbNumber() {\n\t\tconst rgb = this.rgb().color;\n\t\treturn ((rgb[0] & 0xFF) << 16) | ((rgb[1] & 0xFF) << 8) | (rgb[2] & 0xFF);\n\t},\n\n\tluminosity() {\n\t\t// http://www.w3.org/TR/WCAG20/#relativeluminancedef\n\t\tconst rgb = this.rgb().color;\n\n\t\tconst lum = [];\n\t\tfor (const [i, element] of rgb.entries()) {\n\t\t\tconst chan = element / 255;\n\t\t\tlum[i] = (chan <= 0.04045) ? chan / 12.92 : ((chan + 0.055) / 1.055) ** 2.4;\n\t\t}\n\n\t\treturn 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];\n\t},\n\n\tcontrast(color2) {\n\t\t// http://www.w3.org/TR/WCAG20/#contrast-ratiodef\n\t\tconst lum1 = this.luminosity();\n\t\tconst lum2 = color2.luminosity();\n\n\t\tif (lum1 > lum2) {\n\t\t\treturn (lum1 + 0.05) / (lum2 + 0.05);\n\t\t}\n\n\t\treturn (lum2 + 0.05) / (lum1 + 0.05);\n\t},\n\n\tlevel(color2) {\n\t\t// https://www.w3.org/TR/WCAG/#contrast-enhanced\n\t\tconst contrastRatio = this.contrast(color2);\n\t\tif (contrastRatio >= 7) {\n\t\t\treturn 'AAA';\n\t\t}\n\n\t\treturn (contrastRatio >= 4.5) ? 'AA' : '';\n\t},\n\n\tisDark() {\n\t\t// YIQ equation from http://24ways.org/2010/calculating-color-contrast\n\t\tconst rgb = this.rgb().color;\n\t\tconst yiq = (rgb[0] * 2126 + rgb[1] * 7152 + rgb[2] * 722) / 10000;\n\t\treturn yiq < 128;\n\t},\n\n\tisLight() {\n\t\treturn !this.isDark();\n\t},\n\n\tnegate() {\n\t\tconst rgb = this.rgb();\n\t\tfor (let i = 0; i < 3; i++) {\n\t\t\trgb.color[i] = 255 - rgb.color[i];\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tlighten(ratio) {\n\t\tconst hsl = this.hsl();\n\t\thsl.color[2] += hsl.color[2] * ratio;\n\t\treturn hsl;\n\t},\n\n\tdarken(ratio) {\n\t\tconst hsl = this.hsl();\n\t\thsl.color[2] -= hsl.color[2] * ratio;\n\t\treturn hsl;\n\t},\n\n\tsaturate(ratio) {\n\t\tconst hsl = this.hsl();\n\t\thsl.color[1] += hsl.color[1] * ratio;\n\t\treturn hsl;\n\t},\n\n\tdesaturate(ratio) {\n\t\tconst hsl = this.hsl();\n\t\thsl.color[1] -= hsl.color[1] * ratio;\n\t\treturn hsl;\n\t},\n\n\twhiten(ratio) {\n\t\tconst hwb = this.hwb();\n\t\thwb.color[1] += hwb.color[1] * ratio;\n\t\treturn hwb;\n\t},\n\n\tblacken(ratio) {\n\t\tconst hwb = this.hwb();\n\t\thwb.color[2] += hwb.color[2] * ratio;\n\t\treturn hwb;\n\t},\n\n\tgrayscale() {\n\t\t// http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale\n\t\tconst rgb = this.rgb().color;\n\t\tconst value = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;\n\t\treturn Color.rgb(value, value, value);\n\t},\n\n\tfade(ratio) {\n\t\treturn this.alpha(this.valpha - (this.valpha * ratio));\n\t},\n\n\topaquer(ratio) {\n\t\treturn this.alpha(this.valpha + (this.valpha * ratio));\n\t},\n\n\trotate(degrees) {\n\t\tconst hsl = this.hsl();\n\t\tlet hue = hsl.color[0];\n\t\thue = (hue + degrees) % 360;\n\t\thue = hue < 0 ? 360 + hue : hue;\n\t\thsl.color[0] = hue;\n\t\treturn hsl;\n\t},\n\n\tmix(mixinColor, weight) {\n\t\t// Ported from sass implementation in C\n\t\t// https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209\n\t\tif (!mixinColor || !mixinColor.rgb) {\n\t\t\tthrow new Error('Argument to \"mix\" was not a Color instance, but rather an instance of ' + typeof mixinColor);\n\t\t}\n\n\t\tconst color1 = mixinColor.rgb();\n\t\tconst color2 = this.rgb();\n\t\tconst p = weight === undefined ? 0.5 : weight;\n\n\t\tconst w = 2 * p - 1;\n\t\tconst a = color1.alpha() - color2.alpha();\n\n\t\tconst w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2;\n\t\tconst w2 = 1 - w1;\n\n\t\treturn Color.rgb(\n\t\t\tw1 * color1.red() + w2 * color2.red(),\n\t\t\tw1 * color1.green() + w2 * color2.green(),\n\t\t\tw1 * color1.blue() + w2 * color2.blue(),\n\t\t\tcolor1.alpha() * p + color2.alpha() * (1 - p));\n\t},\n};\n\n// Model conversion methods and static constructors\nfor (const model of Object.keys(convert)) {\n\tif (skippedModels.includes(model)) {\n\t\tcontinue;\n\t}\n\n\tconst {channels} = convert[model];\n\n\t// Conversion methods\n\tColor.prototype[model] = function (...args) {\n\t\tif (this.model === model) {\n\t\t\treturn new Color(this);\n\t\t}\n\n\t\tif (args.length > 0) {\n\t\t\treturn new Color(args, model);\n\t\t}\n\n\t\treturn new Color([...assertArray(convert[this.model][model].raw(this.color)), this.valpha], model);\n\t};\n\n\t// 'static' construction methods\n\tColor[model] = function (...args) {\n\t\tlet color = args[0];\n\t\tif (typeof color === 'number') {\n\t\t\tcolor = zeroArray(args, channels);\n\t\t}\n\n\t\treturn new Color(color, model);\n\t};\n}\n\nfunction roundTo(number, places) {\n\treturn Number(number.toFixed(places));\n}\n\nfunction roundToPlace(places) {\n\treturn function (number) {\n\t\treturn roundTo(number, places);\n\t};\n}\n\nfunction getset(model, channel, modifier) {\n\tmodel = Array.isArray(model) ? model : [model];\n\n\tfor (const m of model) {\n\t\t(limiters[m] || (limiters[m] = []))[channel] = modifier;\n\t}\n\n\tmodel = model[0];\n\n\treturn function (value) {\n\t\tlet result;\n\n\t\tif (value !== undefined) {\n\t\t\tif (modifier) {\n\t\t\t\tvalue = modifier(value);\n\t\t\t}\n\n\t\t\tresult = this[model]();\n\t\t\tresult.color[channel] = value;\n\t\t\treturn result;\n\t\t}\n\n\t\tresult = this[model]().color[channel];\n\t\tif (modifier) {\n\t\t\tresult = modifier(result);\n\t\t}\n\n\t\treturn result;\n\t};\n}\n\nfunction maxfn(max) {\n\treturn function (v) {\n\t\treturn Math.max(0, Math.min(max, v));\n\t};\n}\n\nfunction assertArray(value) {\n\treturn Array.isArray(value) ? value : [value];\n}\n\nfunction zeroArray(array, length) {\n\tfor (let i = 0; i < length; i++) {\n\t\tif (typeof array[i] !== 'number') {\n\t\t\tarray[i] = 0;\n\t\t}\n\t}\n\n\treturn array;\n}\n\nmodule.exports = Color;\n"],"names":["colorString","require$$0","convert","require$$1","skippedModels","hashedModelKeys","model","limiters","Color","object","i","channels","result","newArray","zeroArray","keys","hashedKeys","labels","color","limit","places","self","args","rgb","roundToPlace","value","getset","maxfn","rgbArray","alphaHex","lum","element","chan","color2","lum1","lum2","contrastRatio","ratio","hsl","hwb","degrees","hue","mixinColor","weight","color1","p","w","a","w1","w2","assertArray","roundTo","number","channel","modifier","m","max","v","array","length"],"mappings":"mMAAMA,EAAcC,EAAAA,mBACdC,EAAUC,EAAAA,aAEVC,EAAgB,CAErB,UAGA,OAGA,KACD,EAEMC,EAAkB,CAAA,EACxB,UAAWC,KAAS,OAAO,KAAKJ,CAAO,EACtCG,EAAgB,CAAC,GAAGH,EAAQI,CAAK,EAAE,MAAM,EAAE,KAAI,EAAG,KAAK,EAAE,CAAC,EAAIA,EAG/D,MAAMC,EAAW,CAAA,EAEjB,SAASC,EAAMC,EAAQH,EAAO,CAC7B,GAAI,EAAE,gBAAgBE,GACrB,OAAO,IAAIA,EAAMC,EAAQH,CAAK,EAO/B,GAJIA,GAASA,KAASF,IACrBE,EAAQ,MAGLA,GAAS,EAAEA,KAASJ,GACvB,MAAM,IAAI,MAAM,kBAAoBI,CAAK,EAG1C,IAAII,EACAC,EAEJ,GAAIF,GAAU,KACb,KAAK,MAAQ,MACb,KAAK,MAAQ,CAAC,EAAG,EAAG,CAAC,EACrB,KAA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EA,IAAAxC,EAAiBV","x_google_ignoreList":[0]}
package/dist/index39.js CHANGED
@@ -1,16 +1,266 @@
1
- import { clsx as r } from "./index46.js";
2
- import { twMerge as u } from "./index47.js";
3
- function d(...e) {
4
- return u(r(e));
5
- }
6
- function f(e, o) {
7
- let t;
8
- return (...n) => {
9
- clearTimeout(t), t = setTimeout(() => e(...n), o);
1
+ import { getDefaultExportFromCjs as d } from "./index44.js";
2
+ import { c as w } from "./index45.js";
3
+ import { c as v } from "./index46.js";
4
+ const f = w, l = v, y = [
5
+ // To be honest, I don't really feel like keyword belongs in color convert, but eh.
6
+ "keyword",
7
+ // Gray conflicts with some method names, and has its own method defined.
8
+ "gray",
9
+ // Shouldn't really be in color-convert either...
10
+ "hex"
11
+ ], b = {};
12
+ for (const t of Object.keys(l))
13
+ b[[...l[t].labels].sort().join("")] = t;
14
+ const p = {};
15
+ function i(t, r) {
16
+ if (!(this instanceof i))
17
+ return new i(t, r);
18
+ if (r && r in y && (r = null), r && !(r in l))
19
+ throw new Error("Unknown model: " + r);
20
+ let o, n;
21
+ if (t == null)
22
+ this.model = "rgb", this.color = [0, 0, 0], this.valpha = 1;
23
+ else if (t instanceof i)
24
+ this.model = t.model, this.color = [...t.color], this.valpha = t.valpha;
25
+ else if (typeof t == "string") {
26
+ const s = f.get(t);
27
+ if (s === null)
28
+ throw new Error("Unable to parse color from string: " + t);
29
+ this.model = s.model, n = l[this.model].channels, this.color = s.value.slice(0, n), this.valpha = typeof s.value[n] == "number" ? s.value[n] : 1;
30
+ } else if (t.length > 0) {
31
+ this.model = r || "rgb", n = l[this.model].channels;
32
+ const s = Array.prototype.slice.call(t, 0, n);
33
+ this.color = m(s, n), this.valpha = typeof t[n] == "number" ? t[n] : 1;
34
+ } else if (typeof t == "number")
35
+ this.model = "rgb", this.color = [
36
+ t >> 16 & 255,
37
+ t >> 8 & 255,
38
+ t & 255
39
+ ], this.valpha = 1;
40
+ else {
41
+ this.valpha = 1;
42
+ const s = Object.keys(t);
43
+ "alpha" in t && (s.splice(s.indexOf("alpha"), 1), this.valpha = typeof t.alpha == "number" ? t.alpha : 0);
44
+ const a = s.sort().join("");
45
+ if (!(a in b))
46
+ throw new Error("Unable to parse color from object: " + JSON.stringify(t));
47
+ this.model = b[a];
48
+ const { labels: u } = l[this.model], c = [];
49
+ for (o = 0; o < u.length; o++)
50
+ c.push(t[u[o]]);
51
+ this.color = m(c);
52
+ }
53
+ if (p[this.model])
54
+ for (n = l[this.model].channels, o = 0; o < n; o++) {
55
+ const s = p[this.model][o];
56
+ s && (this.color[o] = s(this.color[o]));
57
+ }
58
+ this.valpha = Math.max(0, Math.min(1, this.valpha)), Object.freeze && Object.freeze(this);
59
+ }
60
+ i.prototype = {
61
+ toString() {
62
+ return this.string();
63
+ },
64
+ toJSON() {
65
+ return this[this.model]();
66
+ },
67
+ string(t) {
68
+ let r = this.model in f.to ? this : this.rgb();
69
+ r = r.round(typeof t == "number" ? t : 1);
70
+ const o = r.valpha === 1 ? r.color : [...r.color, this.valpha];
71
+ return f.to[r.model](o);
72
+ },
73
+ percentString(t) {
74
+ const r = this.rgb().round(typeof t == "number" ? t : 1), o = r.valpha === 1 ? r.color : [...r.color, this.valpha];
75
+ return f.to.rgb.percent(o);
76
+ },
77
+ array() {
78
+ return this.valpha === 1 ? [...this.color] : [...this.color, this.valpha];
79
+ },
80
+ object() {
81
+ const t = {}, { channels: r } = l[this.model], { labels: o } = l[this.model];
82
+ for (let n = 0; n < r; n++)
83
+ t[o[n]] = this.color[n];
84
+ return this.valpha !== 1 && (t.alpha = this.valpha), t;
85
+ },
86
+ unitArray() {
87
+ const t = this.rgb().color;
88
+ return t[0] /= 255, t[1] /= 255, t[2] /= 255, this.valpha !== 1 && t.push(this.valpha), t;
89
+ },
90
+ unitObject() {
91
+ const t = this.rgb().object();
92
+ return t.r /= 255, t.g /= 255, t.b /= 255, this.valpha !== 1 && (t.alpha = this.valpha), t;
93
+ },
94
+ round(t) {
95
+ return t = Math.max(t || 0, 0), new i([...this.color.map(k(t)), this.valpha], this.model);
96
+ },
97
+ alpha(t) {
98
+ return t !== void 0 ? new i([...this.color, Math.max(0, Math.min(1, t))], this.model) : this.valpha;
99
+ },
100
+ // Rgb
101
+ red: e("rgb", 0, h(255)),
102
+ green: e("rgb", 1, h(255)),
103
+ blue: e("rgb", 2, h(255)),
104
+ hue: e(["hsl", "hsv", "hsl", "hwb", "hcg"], 0, (t) => (t % 360 + 360) % 360),
105
+ saturationl: e("hsl", 1, h(100)),
106
+ lightness: e("hsl", 2, h(100)),
107
+ saturationv: e("hsv", 1, h(100)),
108
+ value: e("hsv", 2, h(100)),
109
+ chroma: e("hcg", 1, h(100)),
110
+ gray: e("hcg", 2, h(100)),
111
+ white: e("hwb", 1, h(100)),
112
+ wblack: e("hwb", 2, h(100)),
113
+ cyan: e("cmyk", 0, h(100)),
114
+ magenta: e("cmyk", 1, h(100)),
115
+ yellow: e("cmyk", 2, h(100)),
116
+ black: e("cmyk", 3, h(100)),
117
+ x: e("xyz", 0, h(95.047)),
118
+ y: e("xyz", 1, h(100)),
119
+ z: e("xyz", 2, h(108.833)),
120
+ l: e("lab", 0, h(100)),
121
+ a: e("lab", 1),
122
+ b: e("lab", 2),
123
+ keyword(t) {
124
+ return t !== void 0 ? new i(t) : l[this.model].keyword(this.color);
125
+ },
126
+ hex(t) {
127
+ return t !== void 0 ? new i(t) : f.to.hex(this.rgb().round().color);
128
+ },
129
+ hexa(t) {
130
+ if (t !== void 0)
131
+ return new i(t);
132
+ const r = this.rgb().round().color;
133
+ let o = Math.round(this.valpha * 255).toString(16).toUpperCase();
134
+ return o.length === 1 && (o = "0" + o), f.to.hex(r) + o;
135
+ },
136
+ rgbNumber() {
137
+ const t = this.rgb().color;
138
+ return (t[0] & 255) << 16 | (t[1] & 255) << 8 | t[2] & 255;
139
+ },
140
+ luminosity() {
141
+ const t = this.rgb().color, r = [];
142
+ for (const [o, n] of t.entries()) {
143
+ const s = n / 255;
144
+ r[o] = s <= 0.04045 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4;
145
+ }
146
+ return 0.2126 * r[0] + 0.7152 * r[1] + 0.0722 * r[2];
147
+ },
148
+ contrast(t) {
149
+ const r = this.luminosity(), o = t.luminosity();
150
+ return r > o ? (r + 0.05) / (o + 0.05) : (o + 0.05) / (r + 0.05);
151
+ },
152
+ level(t) {
153
+ const r = this.contrast(t);
154
+ return r >= 7 ? "AAA" : r >= 4.5 ? "AA" : "";
155
+ },
156
+ isDark() {
157
+ const t = this.rgb().color;
158
+ return (t[0] * 2126 + t[1] * 7152 + t[2] * 722) / 1e4 < 128;
159
+ },
160
+ isLight() {
161
+ return !this.isDark();
162
+ },
163
+ negate() {
164
+ const t = this.rgb();
165
+ for (let r = 0; r < 3; r++)
166
+ t.color[r] = 255 - t.color[r];
167
+ return t;
168
+ },
169
+ lighten(t) {
170
+ const r = this.hsl();
171
+ return r.color[2] += r.color[2] * t, r;
172
+ },
173
+ darken(t) {
174
+ const r = this.hsl();
175
+ return r.color[2] -= r.color[2] * t, r;
176
+ },
177
+ saturate(t) {
178
+ const r = this.hsl();
179
+ return r.color[1] += r.color[1] * t, r;
180
+ },
181
+ desaturate(t) {
182
+ const r = this.hsl();
183
+ return r.color[1] -= r.color[1] * t, r;
184
+ },
185
+ whiten(t) {
186
+ const r = this.hwb();
187
+ return r.color[1] += r.color[1] * t, r;
188
+ },
189
+ blacken(t) {
190
+ const r = this.hwb();
191
+ return r.color[2] += r.color[2] * t, r;
192
+ },
193
+ grayscale() {
194
+ const t = this.rgb().color, r = t[0] * 0.3 + t[1] * 0.59 + t[2] * 0.11;
195
+ return i.rgb(r, r, r);
196
+ },
197
+ fade(t) {
198
+ return this.alpha(this.valpha - this.valpha * t);
199
+ },
200
+ opaquer(t) {
201
+ return this.alpha(this.valpha + this.valpha * t);
202
+ },
203
+ rotate(t) {
204
+ const r = this.hsl();
205
+ let o = r.color[0];
206
+ return o = (o + t) % 360, o = o < 0 ? 360 + o : o, r.color[0] = o, r;
207
+ },
208
+ mix(t, r) {
209
+ if (!t || !t.rgb)
210
+ throw new Error('Argument to "mix" was not a Color instance, but rather an instance of ' + typeof t);
211
+ const o = t.rgb(), n = this.rgb(), s = r === void 0 ? 0.5 : r, a = 2 * s - 1, u = o.alpha() - n.alpha(), c = ((a * u === -1 ? a : (a + u) / (1 + a * u)) + 1) / 2, g = 1 - c;
212
+ return i.rgb(
213
+ c * o.red() + g * n.red(),
214
+ c * o.green() + g * n.green(),
215
+ c * o.blue() + g * n.blue(),
216
+ o.alpha() * s + n.alpha() * (1 - s)
217
+ );
218
+ }
219
+ };
220
+ for (const t of Object.keys(l)) {
221
+ if (y.includes(t))
222
+ continue;
223
+ const { channels: r } = l[t];
224
+ i.prototype[t] = function(...o) {
225
+ return this.model === t ? new i(this) : o.length > 0 ? new i(o, t) : new i([...A(l[this.model][t].raw(this.color)), this.valpha], t);
226
+ }, i[t] = function(...o) {
227
+ let n = o[0];
228
+ return typeof n == "number" && (n = m(o, r)), new i(n, t);
229
+ };
230
+ }
231
+ function x(t, r) {
232
+ return Number(t.toFixed(r));
233
+ }
234
+ function k(t) {
235
+ return function(r) {
236
+ return x(r, t);
10
237
  };
11
238
  }
239
+ function e(t, r, o) {
240
+ t = Array.isArray(t) ? t : [t];
241
+ for (const n of t)
242
+ (p[n] || (p[n] = []))[r] = o;
243
+ return t = t[0], function(n) {
244
+ let s;
245
+ return n !== void 0 ? (o && (n = o(n)), s = this[t](), s.color[r] = n, s) : (s = this[t]().color[r], o && (s = o(s)), s);
246
+ };
247
+ }
248
+ function h(t) {
249
+ return function(r) {
250
+ return Math.max(0, Math.min(t, r));
251
+ };
252
+ }
253
+ function A(t) {
254
+ return Array.isArray(t) ? t : [t];
255
+ }
256
+ function m(t, r) {
257
+ for (let o = 0; o < r; o++)
258
+ typeof t[o] != "number" && (t[o] = 0);
259
+ return t;
260
+ }
261
+ var F = i;
262
+ const S = /* @__PURE__ */ d(F);
12
263
  export {
13
- d as cn,
14
- f as debounce
264
+ S as default
15
265
  };
16
266
  //# sourceMappingURL=index39.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index39.js","sources":["../src/lib/utils.ts"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n\nexport function debounce<F extends (...args: Parameters<F>) => ReturnType<F>>(\n func: F,\n waitFor: number\n) {\n let timeout: ReturnType<typeof setTimeout>\n\n const debounced = (...args: Parameters<F>) => {\n clearTimeout(timeout)\n timeout = setTimeout(() => func(...args), waitFor)\n }\n\n return debounced\n}\n"],"names":["cn","inputs","twMerge","clsx","debounce","func","waitFor","timeout","args"],"mappings":";;AAGO,SAASA,KAAMC,GAAsB;AAC1C,SAAOC,EAAQC,EAAKF,CAAM,CAAC;AAC7B;AAEO,SAASG,EACdC,GACAC,GACA;AACA,MAAIC;AAOJ,SALkB,IAAIC,MAAwB;AAC5C,iBAAaD,CAAO,GACpBA,IAAU,WAAW,MAAMF,EAAK,GAAGG,CAAI,GAAGF,CAAO;AAAA,EACnD;AAGF;"}
1
+ {"version":3,"file":"index39.js","sources":["../node_modules/.pnpm/color@4.2.3/node_modules/color/index.js"],"sourcesContent":["const colorString = require('color-string');\nconst convert = require('color-convert');\n\nconst skippedModels = [\n\t// To be honest, I don't really feel like keyword belongs in color convert, but eh.\n\t'keyword',\n\n\t// Gray conflicts with some method names, and has its own method defined.\n\t'gray',\n\n\t// Shouldn't really be in color-convert either...\n\t'hex',\n];\n\nconst hashedModelKeys = {};\nfor (const model of Object.keys(convert)) {\n\thashedModelKeys[[...convert[model].labels].sort().join('')] = model;\n}\n\nconst limiters = {};\n\nfunction Color(object, model) {\n\tif (!(this instanceof Color)) {\n\t\treturn new Color(object, model);\n\t}\n\n\tif (model && model in skippedModels) {\n\t\tmodel = null;\n\t}\n\n\tif (model && !(model in convert)) {\n\t\tthrow new Error('Unknown model: ' + model);\n\t}\n\n\tlet i;\n\tlet channels;\n\n\tif (object == null) { // eslint-disable-line no-eq-null,eqeqeq\n\t\tthis.model = 'rgb';\n\t\tthis.color = [0, 0, 0];\n\t\tthis.valpha = 1;\n\t} else if (object instanceof Color) {\n\t\tthis.model = object.model;\n\t\tthis.color = [...object.color];\n\t\tthis.valpha = object.valpha;\n\t} else if (typeof object === 'string') {\n\t\tconst result = colorString.get(object);\n\t\tif (result === null) {\n\t\t\tthrow new Error('Unable to parse color from string: ' + object);\n\t\t}\n\n\t\tthis.model = result.model;\n\t\tchannels = convert[this.model].channels;\n\t\tthis.color = result.value.slice(0, channels);\n\t\tthis.valpha = typeof result.value[channels] === 'number' ? result.value[channels] : 1;\n\t} else if (object.length > 0) {\n\t\tthis.model = model || 'rgb';\n\t\tchannels = convert[this.model].channels;\n\t\tconst newArray = Array.prototype.slice.call(object, 0, channels);\n\t\tthis.color = zeroArray(newArray, channels);\n\t\tthis.valpha = typeof object[channels] === 'number' ? object[channels] : 1;\n\t} else if (typeof object === 'number') {\n\t\t// This is always RGB - can be converted later on.\n\t\tthis.model = 'rgb';\n\t\tthis.color = [\n\t\t\t(object >> 16) & 0xFF,\n\t\t\t(object >> 8) & 0xFF,\n\t\t\tobject & 0xFF,\n\t\t];\n\t\tthis.valpha = 1;\n\t} else {\n\t\tthis.valpha = 1;\n\n\t\tconst keys = Object.keys(object);\n\t\tif ('alpha' in object) {\n\t\t\tkeys.splice(keys.indexOf('alpha'), 1);\n\t\t\tthis.valpha = typeof object.alpha === 'number' ? object.alpha : 0;\n\t\t}\n\n\t\tconst hashedKeys = keys.sort().join('');\n\t\tif (!(hashedKeys in hashedModelKeys)) {\n\t\t\tthrow new Error('Unable to parse color from object: ' + JSON.stringify(object));\n\t\t}\n\n\t\tthis.model = hashedModelKeys[hashedKeys];\n\n\t\tconst {labels} = convert[this.model];\n\t\tconst color = [];\n\t\tfor (i = 0; i < labels.length; i++) {\n\t\t\tcolor.push(object[labels[i]]);\n\t\t}\n\n\t\tthis.color = zeroArray(color);\n\t}\n\n\t// Perform limitations (clamping, etc.)\n\tif (limiters[this.model]) {\n\t\tchannels = convert[this.model].channels;\n\t\tfor (i = 0; i < channels; i++) {\n\t\t\tconst limit = limiters[this.model][i];\n\t\t\tif (limit) {\n\t\t\t\tthis.color[i] = limit(this.color[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\tthis.valpha = Math.max(0, Math.min(1, this.valpha));\n\n\tif (Object.freeze) {\n\t\tObject.freeze(this);\n\t}\n}\n\nColor.prototype = {\n\ttoString() {\n\t\treturn this.string();\n\t},\n\n\ttoJSON() {\n\t\treturn this[this.model]();\n\t},\n\n\tstring(places) {\n\t\tlet self = this.model in colorString.to ? this : this.rgb();\n\t\tself = self.round(typeof places === 'number' ? places : 1);\n\t\tconst args = self.valpha === 1 ? self.color : [...self.color, this.valpha];\n\t\treturn colorString.to[self.model](args);\n\t},\n\n\tpercentString(places) {\n\t\tconst self = this.rgb().round(typeof places === 'number' ? places : 1);\n\t\tconst args = self.valpha === 1 ? self.color : [...self.color, this.valpha];\n\t\treturn colorString.to.rgb.percent(args);\n\t},\n\n\tarray() {\n\t\treturn this.valpha === 1 ? [...this.color] : [...this.color, this.valpha];\n\t},\n\n\tobject() {\n\t\tconst result = {};\n\t\tconst {channels} = convert[this.model];\n\t\tconst {labels} = convert[this.model];\n\n\t\tfor (let i = 0; i < channels; i++) {\n\t\t\tresult[labels[i]] = this.color[i];\n\t\t}\n\n\t\tif (this.valpha !== 1) {\n\t\t\tresult.alpha = this.valpha;\n\t\t}\n\n\t\treturn result;\n\t},\n\n\tunitArray() {\n\t\tconst rgb = this.rgb().color;\n\t\trgb[0] /= 255;\n\t\trgb[1] /= 255;\n\t\trgb[2] /= 255;\n\n\t\tif (this.valpha !== 1) {\n\t\t\trgb.push(this.valpha);\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tunitObject() {\n\t\tconst rgb = this.rgb().object();\n\t\trgb.r /= 255;\n\t\trgb.g /= 255;\n\t\trgb.b /= 255;\n\n\t\tif (this.valpha !== 1) {\n\t\t\trgb.alpha = this.valpha;\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tround(places) {\n\t\tplaces = Math.max(places || 0, 0);\n\t\treturn new Color([...this.color.map(roundToPlace(places)), this.valpha], this.model);\n\t},\n\n\talpha(value) {\n\t\tif (value !== undefined) {\n\t\t\treturn new Color([...this.color, Math.max(0, Math.min(1, value))], this.model);\n\t\t}\n\n\t\treturn this.valpha;\n\t},\n\n\t// Rgb\n\tred: getset('rgb', 0, maxfn(255)),\n\tgreen: getset('rgb', 1, maxfn(255)),\n\tblue: getset('rgb', 2, maxfn(255)),\n\n\thue: getset(['hsl', 'hsv', 'hsl', 'hwb', 'hcg'], 0, value => ((value % 360) + 360) % 360),\n\n\tsaturationl: getset('hsl', 1, maxfn(100)),\n\tlightness: getset('hsl', 2, maxfn(100)),\n\n\tsaturationv: getset('hsv', 1, maxfn(100)),\n\tvalue: getset('hsv', 2, maxfn(100)),\n\n\tchroma: getset('hcg', 1, maxfn(100)),\n\tgray: getset('hcg', 2, maxfn(100)),\n\n\twhite: getset('hwb', 1, maxfn(100)),\n\twblack: getset('hwb', 2, maxfn(100)),\n\n\tcyan: getset('cmyk', 0, maxfn(100)),\n\tmagenta: getset('cmyk', 1, maxfn(100)),\n\tyellow: getset('cmyk', 2, maxfn(100)),\n\tblack: getset('cmyk', 3, maxfn(100)),\n\n\tx: getset('xyz', 0, maxfn(95.047)),\n\ty: getset('xyz', 1, maxfn(100)),\n\tz: getset('xyz', 2, maxfn(108.833)),\n\n\tl: getset('lab', 0, maxfn(100)),\n\ta: getset('lab', 1),\n\tb: getset('lab', 2),\n\n\tkeyword(value) {\n\t\tif (value !== undefined) {\n\t\t\treturn new Color(value);\n\t\t}\n\n\t\treturn convert[this.model].keyword(this.color);\n\t},\n\n\thex(value) {\n\t\tif (value !== undefined) {\n\t\t\treturn new Color(value);\n\t\t}\n\n\t\treturn colorString.to.hex(this.rgb().round().color);\n\t},\n\n\thexa(value) {\n\t\tif (value !== undefined) {\n\t\t\treturn new Color(value);\n\t\t}\n\n\t\tconst rgbArray = this.rgb().round().color;\n\n\t\tlet alphaHex = Math.round(this.valpha * 255).toString(16).toUpperCase();\n\t\tif (alphaHex.length === 1) {\n\t\t\talphaHex = '0' + alphaHex;\n\t\t}\n\n\t\treturn colorString.to.hex(rgbArray) + alphaHex;\n\t},\n\n\trgbNumber() {\n\t\tconst rgb = this.rgb().color;\n\t\treturn ((rgb[0] & 0xFF) << 16) | ((rgb[1] & 0xFF) << 8) | (rgb[2] & 0xFF);\n\t},\n\n\tluminosity() {\n\t\t// http://www.w3.org/TR/WCAG20/#relativeluminancedef\n\t\tconst rgb = this.rgb().color;\n\n\t\tconst lum = [];\n\t\tfor (const [i, element] of rgb.entries()) {\n\t\t\tconst chan = element / 255;\n\t\t\tlum[i] = (chan <= 0.04045) ? chan / 12.92 : ((chan + 0.055) / 1.055) ** 2.4;\n\t\t}\n\n\t\treturn 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];\n\t},\n\n\tcontrast(color2) {\n\t\t// http://www.w3.org/TR/WCAG20/#contrast-ratiodef\n\t\tconst lum1 = this.luminosity();\n\t\tconst lum2 = color2.luminosity();\n\n\t\tif (lum1 > lum2) {\n\t\t\treturn (lum1 + 0.05) / (lum2 + 0.05);\n\t\t}\n\n\t\treturn (lum2 + 0.05) / (lum1 + 0.05);\n\t},\n\n\tlevel(color2) {\n\t\t// https://www.w3.org/TR/WCAG/#contrast-enhanced\n\t\tconst contrastRatio = this.contrast(color2);\n\t\tif (contrastRatio >= 7) {\n\t\t\treturn 'AAA';\n\t\t}\n\n\t\treturn (contrastRatio >= 4.5) ? 'AA' : '';\n\t},\n\n\tisDark() {\n\t\t// YIQ equation from http://24ways.org/2010/calculating-color-contrast\n\t\tconst rgb = this.rgb().color;\n\t\tconst yiq = (rgb[0] * 2126 + rgb[1] * 7152 + rgb[2] * 722) / 10000;\n\t\treturn yiq < 128;\n\t},\n\n\tisLight() {\n\t\treturn !this.isDark();\n\t},\n\n\tnegate() {\n\t\tconst rgb = this.rgb();\n\t\tfor (let i = 0; i < 3; i++) {\n\t\t\trgb.color[i] = 255 - rgb.color[i];\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tlighten(ratio) {\n\t\tconst hsl = this.hsl();\n\t\thsl.color[2] += hsl.color[2] * ratio;\n\t\treturn hsl;\n\t},\n\n\tdarken(ratio) {\n\t\tconst hsl = this.hsl();\n\t\thsl.color[2] -= hsl.color[2] * ratio;\n\t\treturn hsl;\n\t},\n\n\tsaturate(ratio) {\n\t\tconst hsl = this.hsl();\n\t\thsl.color[1] += hsl.color[1] * ratio;\n\t\treturn hsl;\n\t},\n\n\tdesaturate(ratio) {\n\t\tconst hsl = this.hsl();\n\t\thsl.color[1] -= hsl.color[1] * ratio;\n\t\treturn hsl;\n\t},\n\n\twhiten(ratio) {\n\t\tconst hwb = this.hwb();\n\t\thwb.color[1] += hwb.color[1] * ratio;\n\t\treturn hwb;\n\t},\n\n\tblacken(ratio) {\n\t\tconst hwb = this.hwb();\n\t\thwb.color[2] += hwb.color[2] * ratio;\n\t\treturn hwb;\n\t},\n\n\tgrayscale() {\n\t\t// http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale\n\t\tconst rgb = this.rgb().color;\n\t\tconst value = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;\n\t\treturn Color.rgb(value, value, value);\n\t},\n\n\tfade(ratio) {\n\t\treturn this.alpha(this.valpha - (this.valpha * ratio));\n\t},\n\n\topaquer(ratio) {\n\t\treturn this.alpha(this.valpha + (this.valpha * ratio));\n\t},\n\n\trotate(degrees) {\n\t\tconst hsl = this.hsl();\n\t\tlet hue = hsl.color[0];\n\t\thue = (hue + degrees) % 360;\n\t\thue = hue < 0 ? 360 + hue : hue;\n\t\thsl.color[0] = hue;\n\t\treturn hsl;\n\t},\n\n\tmix(mixinColor, weight) {\n\t\t// Ported from sass implementation in C\n\t\t// https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209\n\t\tif (!mixinColor || !mixinColor.rgb) {\n\t\t\tthrow new Error('Argument to \"mix\" was not a Color instance, but rather an instance of ' + typeof mixinColor);\n\t\t}\n\n\t\tconst color1 = mixinColor.rgb();\n\t\tconst color2 = this.rgb();\n\t\tconst p = weight === undefined ? 0.5 : weight;\n\n\t\tconst w = 2 * p - 1;\n\t\tconst a = color1.alpha() - color2.alpha();\n\n\t\tconst w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2;\n\t\tconst w2 = 1 - w1;\n\n\t\treturn Color.rgb(\n\t\t\tw1 * color1.red() + w2 * color2.red(),\n\t\t\tw1 * color1.green() + w2 * color2.green(),\n\t\t\tw1 * color1.blue() + w2 * color2.blue(),\n\t\t\tcolor1.alpha() * p + color2.alpha() * (1 - p));\n\t},\n};\n\n// Model conversion methods and static constructors\nfor (const model of Object.keys(convert)) {\n\tif (skippedModels.includes(model)) {\n\t\tcontinue;\n\t}\n\n\tconst {channels} = convert[model];\n\n\t// Conversion methods\n\tColor.prototype[model] = function (...args) {\n\t\tif (this.model === model) {\n\t\t\treturn new Color(this);\n\t\t}\n\n\t\tif (args.length > 0) {\n\t\t\treturn new Color(args, model);\n\t\t}\n\n\t\treturn new Color([...assertArray(convert[this.model][model].raw(this.color)), this.valpha], model);\n\t};\n\n\t// 'static' construction methods\n\tColor[model] = function (...args) {\n\t\tlet color = args[0];\n\t\tif (typeof color === 'number') {\n\t\t\tcolor = zeroArray(args, channels);\n\t\t}\n\n\t\treturn new Color(color, model);\n\t};\n}\n\nfunction roundTo(number, places) {\n\treturn Number(number.toFixed(places));\n}\n\nfunction roundToPlace(places) {\n\treturn function (number) {\n\t\treturn roundTo(number, places);\n\t};\n}\n\nfunction getset(model, channel, modifier) {\n\tmodel = Array.isArray(model) ? model : [model];\n\n\tfor (const m of model) {\n\t\t(limiters[m] || (limiters[m] = []))[channel] = modifier;\n\t}\n\n\tmodel = model[0];\n\n\treturn function (value) {\n\t\tlet result;\n\n\t\tif (value !== undefined) {\n\t\t\tif (modifier) {\n\t\t\t\tvalue = modifier(value);\n\t\t\t}\n\n\t\t\tresult = this[model]();\n\t\t\tresult.color[channel] = value;\n\t\t\treturn result;\n\t\t}\n\n\t\tresult = this[model]().color[channel];\n\t\tif (modifier) {\n\t\t\tresult = modifier(result);\n\t\t}\n\n\t\treturn result;\n\t};\n}\n\nfunction maxfn(max) {\n\treturn function (v) {\n\t\treturn Math.max(0, Math.min(max, v));\n\t};\n}\n\nfunction assertArray(value) {\n\treturn Array.isArray(value) ? value : [value];\n}\n\nfunction zeroArray(array, length) {\n\tfor (let i = 0; i < length; i++) {\n\t\tif (typeof array[i] !== 'number') {\n\t\t\tarray[i] = 0;\n\t\t}\n\t}\n\n\treturn array;\n}\n\nmodule.exports = Color;\n"],"names":["colorString","require$$0","convert","require$$1","skippedModels","hashedModelKeys","model","limiters","Color","object","i","channels","result","newArray","zeroArray","keys","hashedKeys","labels","color","limit","places","self","args","rgb","roundToPlace","value","getset","maxfn","rgbArray","alphaHex","lum","element","chan","color2","lum1","lum2","contrastRatio","ratio","hsl","hwb","degrees","hue","mixinColor","weight","color1","p","w","a","w1","w2","assertArray","roundTo","number","channel","modifier","m","max","v","array","length"],"mappings":";;;AAAA,MAAMA,IAAcC,GACdC,IAAUC,GAEVC,IAAgB;AAAA;AAAA,EAErB;AAAA;AAAA,EAGA;AAAA;AAAA,EAGA;AACD,GAEMC,IAAkB,CAAA;AACxB,WAAWC,KAAS,OAAO,KAAKJ,CAAO;AACtC,EAAAG,EAAgB,CAAC,GAAGH,EAAQI,CAAK,EAAE,MAAM,EAAE,KAAI,EAAG,KAAK,EAAE,CAAC,IAAIA;AAG/D,MAAMC,IAAW,CAAA;AAEjB,SAASC,EAAMC,GAAQH,GAAO;AAC7B,MAAI,EAAE,gBAAgBE;AACrB,WAAO,IAAIA,EAAMC,GAAQH,CAAK;AAO/B,MAJIA,KA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