asterui 0.12.0 → 0.12.2

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 (299) hide show
  1. package/README.md +1 -1
  2. package/dist/components/Calendar.d.ts +23 -0
  3. package/dist/components/Checkbox.d.ts +10 -0
  4. package/dist/components/Dock.d.ts +38 -0
  5. package/dist/components/Form.d.ts +27 -2
  6. package/dist/components/Mask.d.ts +14 -0
  7. package/dist/components/Radio.d.ts +7 -1
  8. package/dist/components/Status.d.ts +18 -0
  9. package/dist/index.css +1 -0
  10. package/dist/index.d.ts +12 -3
  11. package/dist/index.js +203 -192
  12. package/dist/index.js.map +1 -1
  13. package/dist/index10.js +85 -59
  14. package/dist/index10.js.map +1 -1
  15. package/dist/index100.js +44 -11
  16. package/dist/index100.js.map +1 -1
  17. package/dist/index101.js +11 -29
  18. package/dist/index101.js.map +1 -1
  19. package/dist/index102.js +13 -16
  20. package/dist/index102.js.map +1 -1
  21. package/dist/index103.js +7 -10792
  22. package/dist/index103.js.map +1 -1
  23. package/dist/index104.js +13 -5
  24. package/dist/index104.js.map +1 -1
  25. package/dist/index105.js +30 -41
  26. package/dist/index105.js.map +1 -1
  27. package/dist/index106.js +18 -2
  28. package/dist/index106.js.map +1 -1
  29. package/dist/index107.js +174 -7
  30. package/dist/index107.js.map +1 -1
  31. package/dist/index109.js +10788 -25
  32. package/dist/index109.js.map +1 -1
  33. package/dist/index110.js +5 -30
  34. package/dist/index110.js.map +1 -1
  35. package/dist/index111.js +42 -2
  36. package/dist/index111.js.map +1 -1
  37. package/dist/index112.js +2 -72
  38. package/dist/index112.js.map +1 -1
  39. package/dist/index113.js +6 -38
  40. package/dist/index113.js.map +1 -1
  41. package/dist/index114.js +150 -24
  42. package/dist/index114.js.map +1 -1
  43. package/dist/index115.js +29 -20
  44. package/dist/index115.js.map +1 -1
  45. package/dist/index116.js +29 -23
  46. package/dist/index116.js.map +1 -1
  47. package/dist/index117.js +2 -20
  48. package/dist/index117.js.map +1 -1
  49. package/dist/index118.js +71 -99
  50. package/dist/index118.js.map +1 -1
  51. package/dist/index119.js +37 -358
  52. package/dist/index119.js.map +1 -1
  53. package/dist/index120.js +23 -22
  54. package/dist/index120.js.map +1 -1
  55. package/dist/index121.js +20 -72
  56. package/dist/index121.js.map +1 -1
  57. package/dist/index122.js +23 -15
  58. package/dist/index122.js.map +1 -1
  59. package/dist/index123.js +19 -65
  60. package/dist/index123.js.map +1 -1
  61. package/dist/index124.js +92 -136
  62. package/dist/index124.js.map +1 -1
  63. package/dist/index125.js +360 -2
  64. package/dist/index125.js.map +1 -1
  65. package/dist/index126.js +23 -54
  66. package/dist/index126.js.map +1 -1
  67. package/dist/index127.js +73 -2
  68. package/dist/index127.js.map +1 -1
  69. package/dist/index128.js +16 -2
  70. package/dist/index128.js.map +1 -1
  71. package/dist/index129.js +66 -2
  72. package/dist/index129.js.map +1 -1
  73. package/dist/index13.js +35 -95
  74. package/dist/index13.js.map +1 -1
  75. package/dist/index130.js +144 -2
  76. package/dist/index130.js.map +1 -1
  77. package/dist/index131.js +2 -2
  78. package/dist/index132.js +56 -2
  79. package/dist/index132.js.map +1 -1
  80. package/dist/index135.js +2 -32
  81. package/dist/index135.js.map +1 -1
  82. package/dist/index137.js +2 -8
  83. package/dist/index137.js.map +1 -1
  84. package/dist/index138.js +2 -2
  85. package/dist/index139.js +2 -2
  86. package/dist/index14.js +90 -153
  87. package/dist/index14.js.map +1 -1
  88. package/dist/index140.js +2 -21
  89. package/dist/index140.js.map +1 -1
  90. package/dist/index141.js +32 -2
  91. package/dist/index141.js.map +1 -1
  92. package/dist/index142.js +2 -24
  93. package/dist/index142.js.map +1 -1
  94. package/dist/index143.js +7 -70
  95. package/dist/index143.js.map +1 -1
  96. package/dist/index144.js +2 -21
  97. package/dist/index144.js.map +1 -1
  98. package/dist/index145.js +2 -34
  99. package/dist/index145.js.map +1 -1
  100. package/dist/index146.js +20 -69
  101. package/dist/index146.js.map +1 -1
  102. package/dist/index147.js +2 -2
  103. package/dist/index148.js +23 -21
  104. package/dist/index148.js.map +1 -1
  105. package/dist/index149.js +71 -2
  106. package/dist/index149.js.map +1 -1
  107. package/dist/index15.js +154 -146
  108. package/dist/index15.js.map +1 -1
  109. package/dist/index150.js +21 -2
  110. package/dist/index150.js.map +1 -1
  111. package/dist/index151.js +34 -2
  112. package/dist/index151.js.map +1 -1
  113. package/dist/index152.js +70 -2
  114. package/dist/index152.js.map +1 -1
  115. package/dist/index153.js +2 -4
  116. package/dist/index153.js.map +1 -1
  117. package/dist/index154.js +25 -0
  118. package/dist/index154.js.map +1 -0
  119. package/dist/index155.js +5 -0
  120. package/dist/index155.js.map +1 -0
  121. package/dist/index156.js +5 -0
  122. package/dist/index156.js.map +1 -0
  123. package/dist/index157.js +5 -0
  124. package/dist/index157.js.map +1 -0
  125. package/dist/index158.js +5 -0
  126. package/dist/index158.js.map +1 -0
  127. package/dist/index159.js +7 -0
  128. package/dist/index159.js.map +1 -0
  129. package/dist/index16.js +150 -5
  130. package/dist/index16.js.map +1 -1
  131. package/dist/index17.js +5 -71
  132. package/dist/index17.js.map +1 -1
  133. package/dist/index18.js +71 -17
  134. package/dist/index18.js.map +1 -1
  135. package/dist/index19.js +15 -96
  136. package/dist/index19.js.map +1 -1
  137. package/dist/index20.js +89 -105
  138. package/dist/index20.js.map +1 -1
  139. package/dist/index21.js +107 -177
  140. package/dist/index21.js.map +1 -1
  141. package/dist/index22.js +181 -107
  142. package/dist/index22.js.map +1 -1
  143. package/dist/index23.js +110 -19
  144. package/dist/index23.js.map +1 -1
  145. package/dist/index24.js +19 -32
  146. package/dist/index24.js.map +1 -1
  147. package/dist/index25.js +42 -40
  148. package/dist/index25.js.map +1 -1
  149. package/dist/index26.js +31 -11
  150. package/dist/index26.js.map +1 -1
  151. package/dist/index27.js +41 -33
  152. package/dist/index27.js.map +1 -1
  153. package/dist/index28.js +12 -63
  154. package/dist/index28.js.map +1 -1
  155. package/dist/index29.js +33 -80
  156. package/dist/index29.js.map +1 -1
  157. package/dist/index30.js +63 -18
  158. package/dist/index30.js.map +1 -1
  159. package/dist/index31.js +78 -159
  160. package/dist/index31.js.map +1 -1
  161. package/dist/index32.js +16 -1080
  162. package/dist/index32.js.map +1 -1
  163. package/dist/index33.js +218 -16
  164. package/dist/index33.js.map +1 -1
  165. package/dist/index34.js +1081 -121
  166. package/dist/index34.js.map +1 -1
  167. package/dist/index35.js +17 -39
  168. package/dist/index35.js.map +1 -1
  169. package/dist/index36.js +121 -190
  170. package/dist/index36.js.map +1 -1
  171. package/dist/index37.js +37 -94
  172. package/dist/index37.js.map +1 -1
  173. package/dist/index38.js +186 -157
  174. package/dist/index38.js.map +1 -1
  175. package/dist/index39.js +89 -138
  176. package/dist/index39.js.map +1 -1
  177. package/dist/index40.js +161 -14
  178. package/dist/index40.js.map +1 -1
  179. package/dist/index41.js +146 -18
  180. package/dist/index41.js.map +1 -1
  181. package/dist/index42.js +14 -20
  182. package/dist/index42.js.map +1 -1
  183. package/dist/index43.js +15 -116
  184. package/dist/index43.js.map +1 -1
  185. package/dist/index44.js +18 -10
  186. package/dist/index44.js.map +1 -1
  187. package/dist/index45.js +119 -35
  188. package/dist/index45.js.map +1 -1
  189. package/dist/index46.js +12 -115
  190. package/dist/index46.js.map +1 -1
  191. package/dist/index47.js +33 -174
  192. package/dist/index47.js.map +1 -1
  193. package/dist/index48.js +10 -147
  194. package/dist/index48.js.map +1 -1
  195. package/dist/index49.js +116 -12
  196. package/dist/index49.js.map +1 -1
  197. package/dist/index50.js +176 -22
  198. package/dist/index50.js.map +1 -1
  199. package/dist/index51.js +147 -14
  200. package/dist/index51.js.map +1 -1
  201. package/dist/index52.js +10 -5
  202. package/dist/index52.js.map +1 -1
  203. package/dist/index53.js +21 -265
  204. package/dist/index53.js.map +1 -1
  205. package/dist/index54.js +10 -13
  206. package/dist/index54.js.map +1 -1
  207. package/dist/index55.js +7 -122
  208. package/dist/index55.js.map +1 -1
  209. package/dist/index56.js +262 -106
  210. package/dist/index56.js.map +1 -1
  211. package/dist/index57.js +14 -167
  212. package/dist/index57.js.map +1 -1
  213. package/dist/index58.js +121 -31
  214. package/dist/index58.js.map +1 -1
  215. package/dist/index59.js +107 -119
  216. package/dist/index59.js.map +1 -1
  217. package/dist/index60.js +161 -77
  218. package/dist/index60.js.map +1 -1
  219. package/dist/index61.js +31 -19
  220. package/dist/index61.js.map +1 -1
  221. package/dist/index62.js +117 -69
  222. package/dist/index62.js.map +1 -1
  223. package/dist/index63.js +82 -53
  224. package/dist/index63.js.map +1 -1
  225. package/dist/index64.js +19 -44
  226. package/dist/index64.js.map +1 -1
  227. package/dist/index65.js +70 -48
  228. package/dist/index65.js.map +1 -1
  229. package/dist/index66.js +55 -60
  230. package/dist/index66.js.map +1 -1
  231. package/dist/index67.js +39 -101
  232. package/dist/index67.js.map +1 -1
  233. package/dist/index68.js +52 -41
  234. package/dist/index68.js.map +1 -1
  235. package/dist/index69.js +58 -64
  236. package/dist/index69.js.map +1 -1
  237. package/dist/index70.js +105 -19
  238. package/dist/index70.js.map +1 -1
  239. package/dist/index71.js +41 -46
  240. package/dist/index71.js.map +1 -1
  241. package/dist/index72.js +63 -129
  242. package/dist/index72.js.map +1 -1
  243. package/dist/index73.js +19 -50
  244. package/dist/index73.js.map +1 -1
  245. package/dist/index74.js +46 -22
  246. package/dist/index74.js.map +1 -1
  247. package/dist/index75.js +134 -22
  248. package/dist/index75.js.map +1 -1
  249. package/dist/index76.js +51 -328
  250. package/dist/index76.js.map +1 -1
  251. package/dist/index77.js +19 -53
  252. package/dist/index77.js.map +1 -1
  253. package/dist/index78.js +31 -40
  254. package/dist/index78.js.map +1 -1
  255. package/dist/index79.js +22 -23
  256. package/dist/index79.js.map +1 -1
  257. package/dist/index80.js +319 -85
  258. package/dist/index80.js.map +1 -1
  259. package/dist/index81.js +52 -126
  260. package/dist/index81.js.map +1 -1
  261. package/dist/index82.js +39 -160
  262. package/dist/index82.js.map +1 -1
  263. package/dist/index83.js +23 -65
  264. package/dist/index83.js.map +1 -1
  265. package/dist/index84.js +95 -35
  266. package/dist/index84.js.map +1 -1
  267. package/dist/index85.js +126 -230
  268. package/dist/index85.js.map +1 -1
  269. package/dist/index86.js +159 -32
  270. package/dist/index86.js.map +1 -1
  271. package/dist/index87.js +60 -205
  272. package/dist/index87.js.map +1 -1
  273. package/dist/index88.js +34 -212
  274. package/dist/index88.js.map +1 -1
  275. package/dist/index89.js +229 -290
  276. package/dist/index89.js.map +1 -1
  277. package/dist/index90.js +32 -176
  278. package/dist/index90.js.map +1 -1
  279. package/dist/index91.js +199 -247
  280. package/dist/index91.js.map +1 -1
  281. package/dist/index92.js +211 -12
  282. package/dist/index92.js.map +1 -1
  283. package/dist/index93.js +290 -28
  284. package/dist/index93.js.map +1 -1
  285. package/dist/index94.js +177 -5
  286. package/dist/index94.js.map +1 -1
  287. package/dist/index95.js +257 -13
  288. package/dist/index95.js.map +1 -1
  289. package/dist/index96.js +13 -45
  290. package/dist/index96.js.map +1 -1
  291. package/dist/index97.js +32 -12
  292. package/dist/index97.js.map +1 -1
  293. package/dist/index98.js +5 -14
  294. package/dist/index98.js.map +1 -1
  295. package/dist/index99.js +13 -7
  296. package/dist/index99.js.map +1 -1
  297. package/package.json +2 -1
  298. package/dist/index108.js +0 -155
  299. package/dist/index108.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index15.js","sources":["../src/components/Chart.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react'\nimport ApexCharts from 'apexcharts'\nimport type { ApexOptions } from 'apexcharts'\n\nexport interface ChartProps {\n /** Chart type */\n type: 'line' | 'area' | 'bar' | 'pie' | 'donut' | 'radialBar' | 'scatter' | 'bubble' | 'heatmap' | 'candlestick' | 'boxPlot' | 'radar' | 'polarArea' | 'rangeBar' | 'rangeArea' | 'treemap'\n /** Chart series data */\n series: ApexAxisChartSeries | ApexNonAxisChartSeries\n /** Chart width */\n width?: string | number\n /** Chart height */\n height?: string | number\n /** ApexCharts options (merged with theme defaults) */\n options?: ApexOptions\n /** Use daisyUI theme colors */\n themed?: boolean\n /** Additional CSS classes */\n className?: string\n}\n\n// Get CSS variable value from root\nfunction getCssVar(varName: string): string {\n if (typeof document === 'undefined') return ''\n return getComputedStyle(document.documentElement).getPropertyValue(varName).trim()\n}\n\n// Convert oklch to hex (approximate)\nfunction oklchToHex(oklch: string): string {\n // Parse oklch(L C H) format\n const match = oklch.match(/oklch\\(\\s*([\\d.]+)%?\\s+([\\d.]+)\\s+([\\d.]+)/)\n if (!match) return ''\n\n const l = parseFloat(match[1]) / 100 // Lightness 0-1\n const c = parseFloat(match[2]) // Chroma\n const h = parseFloat(match[3]) // Hue in degrees\n\n // Simplified oklch to sRGB conversion\n // This is an approximation - full conversion is complex\n const hRad = (h * Math.PI) / 180\n const a = c * Math.cos(hRad)\n const b = c * Math.sin(hRad)\n\n // Approximate conversion to linear RGB\n const l_ = l + 0.3963377774 * a + 0.2158037573 * b\n const m_ = l - 0.1055613458 * a - 0.0638541728 * b\n const s_ = l - 0.0894841775 * a - 1.2914855480 * b\n\n const l3 = l_ * l_ * l_\n const m3 = m_ * m_ * m_\n const s3 = s_ * s_ * s_\n\n let r = 4.0767416621 * l3 - 3.3077115913 * m3 + 0.2309699292 * s3\n let g = -1.2684380046 * l3 + 2.6097574011 * m3 - 0.3413193965 * s3\n let bl = -0.0041960863 * l3 - 0.7034186147 * m3 + 1.7076147010 * s3\n\n // Clamp and convert to sRGB\n const toSrgb = (x: number) => {\n x = Math.max(0, Math.min(1, x))\n return x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1/2.4) - 0.055\n }\n\n r = Math.round(toSrgb(r) * 255)\n g = Math.round(toSrgb(g) * 255)\n bl = Math.round(toSrgb(bl) * 255)\n\n return `#${r.toString(16).padStart(2, '0')}${g.toString(16).padStart(2, '0')}${bl.toString(16).padStart(2, '0')}`\n}\n\n// Get daisyUI theme colors from CSS variables\nfunction getThemeColors(): string[] {\n if (typeof document === 'undefined') return []\n\n const colorVars = [\n '--color-primary',\n '--color-secondary',\n '--color-accent',\n '--color-info',\n '--color-success',\n '--color-warning',\n '--color-error',\n ]\n\n return colorVars\n .map(varName => {\n const value = getCssVar(varName)\n if (value.includes('oklch')) {\n return oklchToHex(value)\n }\n return value\n })\n .filter(Boolean)\n}\n\n// Get theme-aware chart options\nfunction getThemedOptions(): Partial<ApexOptions> {\n const colors = getThemeColors()\n\n // Get text color from CSS variable\n const baseContentVar = getCssVar('--color-base-content')\n const textColor = baseContentVar.includes('oklch')\n ? oklchToHex(baseContentVar)\n : (baseContentVar || '#888888')\n\n // Get grid color from CSS variable\n const base300Var = getCssVar('--color-base-300')\n const gridColor = base300Var.includes('oklch')\n ? oklchToHex(base300Var)\n : (base300Var || '#e0e0e0')\n\n // Determine if dark theme by checking luminance of text color\n // If text is light, we're on dark theme\n const textMatch = textColor.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)\n const isDark = textMatch\n ? (parseInt(textMatch[1], 16) + parseInt(textMatch[2], 16) + parseInt(textMatch[3], 16)) / 3 > 128\n : false\n\n return {\n colors: colors.length > 0 ? colors : undefined,\n theme: {\n mode: isDark ? 'dark' : 'light',\n },\n chart: {\n background: 'transparent',\n foreColor: textColor,\n },\n grid: {\n borderColor: gridColor,\n },\n xaxis: {\n labels: {\n style: {\n colors: textColor,\n },\n },\n axisBorder: {\n color: gridColor,\n },\n axisTicks: {\n color: gridColor,\n },\n },\n yaxis: {\n labels: {\n style: {\n colors: textColor,\n },\n },\n },\n legend: {\n labels: {\n colors: textColor,\n },\n },\n tooltip: {\n theme: isDark ? 'dark' : 'light',\n style: {\n fontSize: '12px',\n },\n x: {\n show: true,\n },\n marker: {\n show: true,\n },\n },\n dataLabels: {\n style: {\n colors: [textColor, textColor, textColor, textColor, textColor, textColor, textColor],\n },\n background: {\n enabled: false,\n },\n dropShadow: {\n enabled: false,\n },\n },\n }\n}\n\n// Deep merge objects\nfunction deepMerge<T extends Record<string, unknown>>(target: T, source: Partial<T>): T {\n const result = { ...target }\n\n for (const key in source) {\n if (source[key] !== undefined) {\n if (\n typeof source[key] === 'object' &&\n source[key] !== null &&\n !Array.isArray(source[key]) &&\n typeof target[key] === 'object' &&\n target[key] !== null &&\n !Array.isArray(target[key])\n ) {\n result[key] = deepMerge(\n target[key] as Record<string, unknown>,\n source[key] as Record<string, unknown>\n ) as T[Extract<keyof T, string>]\n } else {\n result[key] = source[key] as T[Extract<keyof T, string>]\n }\n }\n }\n\n return result\n}\n\nexport const Chart: React.FC<ChartProps> = ({\n type,\n series,\n width = '100%',\n height = 350,\n options = {},\n themed = true,\n className = '',\n}) => {\n const chartRef = useRef<HTMLDivElement>(null)\n const chartInstance = useRef<ApexCharts | null>(null)\n const [, setMounted] = useState(false)\n\n // Build final options\n const buildOptions = (): ApexOptions => {\n const baseOptions: ApexOptions = {\n chart: {\n type,\n width,\n height,\n },\n series,\n }\n\n if (themed) {\n const themedOpts = getThemedOptions()\n return deepMerge(deepMerge(baseOptions as unknown as Record<string, unknown>, themedOpts as unknown as Record<string, unknown>), options as unknown as Record<string, unknown>) as ApexOptions\n }\n\n return deepMerge(baseOptions as unknown as Record<string, unknown>, options as unknown as Record<string, unknown>) as ApexOptions\n }\n\n // Initialize chart\n useEffect(() => {\n if (!chartRef.current) return\n\n const opts = buildOptions()\n chartInstance.current = new ApexCharts(chartRef.current, opts)\n chartInstance.current.render()\n setMounted(true)\n\n return () => {\n if (chartInstance.current) {\n chartInstance.current.destroy()\n chartInstance.current = null\n }\n }\n }, []) // eslint-disable-line react-hooks/exhaustive-deps\n\n // Update chart when props change\n useEffect(() => {\n if (!chartInstance.current) return\n\n const opts = buildOptions()\n chartInstance.current.updateOptions(opts, true, true)\n }, [type, series, width, height, options, themed]) // eslint-disable-line react-hooks/exhaustive-deps\n\n // Listen for theme changes\n useEffect(() => {\n if (!themed || typeof window === 'undefined') return\n\n const observer = new MutationObserver(() => {\n if (chartInstance.current) {\n const opts = buildOptions()\n chartInstance.current.updateOptions(opts, true, true)\n }\n })\n\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['data-theme', 'class'],\n })\n\n return () => observer.disconnect()\n }, [themed]) // eslint-disable-line react-hooks/exhaustive-deps\n\n return <div ref={chartRef} className={className} />\n}\n"],"names":["getCssVar","varName","oklchToHex","oklch","match","l","c","hRad","a","b","l_","m_","s_","l3","m3","s3","r","g","bl","toSrgb","x","getThemeColors","value","getThemedOptions","colors","baseContentVar","textColor","base300Var","gridColor","textMatch","isDark","deepMerge","target","source","result","key","Chart","type","series","width","height","options","themed","className","chartRef","useRef","chartInstance","setMounted","useState","buildOptions","baseOptions","themedOpts","useEffect","opts","ApexCharts","observer","jsx"],"mappings":";;;AAsBA,SAASA,EAAUC,GAAyB;AAC1C,SAAI,OAAO,WAAa,MAAoB,KACrC,iBAAiB,SAAS,eAAe,EAAE,iBAAiBA,CAAO,EAAE,KAAA;AAC9E;AAGA,SAASC,EAAWC,GAAuB;AAEzC,QAAMC,IAAQD,EAAM,MAAM,4CAA4C;AACtE,MAAI,CAACC,EAAO,QAAO;AAEnB,QAAMC,IAAI,WAAWD,EAAM,CAAC,CAAC,IAAI,KAC3BE,IAAI,WAAWF,EAAM,CAAC,CAAC,GAKvBG,IAJI,WAAWH,EAAM,CAAC,CAAC,IAIX,KAAK,KAAM,KACvBI,IAAIF,IAAI,KAAK,IAAIC,CAAI,GACrBE,IAAIH,IAAI,KAAK,IAAIC,CAAI,GAGrBG,IAAKL,IAAI,eAAeG,IAAI,eAAeC,GAC3CE,IAAKN,IAAI,eAAeG,IAAI,eAAeC,GAC3CG,IAAKP,IAAI,eAAeG,IAAI,cAAeC,GAE3CI,IAAKH,IAAKA,IAAKA,GACfI,IAAKH,IAAKA,IAAKA,GACfI,IAAKH,IAAKA,IAAKA;AAErB,MAAII,IAAI,eAAeH,IAAK,eAAeC,IAAK,eAAeC,GAC3DE,IAAI,gBAAgBJ,IAAK,eAAeC,IAAK,eAAeC,GAC5DG,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,EAAc,QAAQ,QAAA,GACtBA,EAAc,UAAU;AAAA,IAE5B;AAAA,EACF,GAAG,CAAA,CAAE,GAGLM,EAAU,MAAM;AACd,QAAI,CAACN,EAAc,QAAS;AAE5B,UAAMO,IAAOJ,EAAA;AACb,IAAAH,EAAc,QAAQ,cAAcO,GAAM,IAAM,EAAI;AAAA,EACtD,GAAG,CAAChB,GAAMC,GAAQC,GAAOC,GAAQC,GAASC,CAAM,CAAC,GAGjDU,EAAU,MAAM;AACd,QAAI,CAACV,KAAU,OAAO,SAAW,IAAa;AAE9C,UAAMa,IAAW,IAAI,iBAAiB,MAAM;AAC1C,UAAIT,EAAc,SAAS;AACzB,cAAMO,IAAOJ,EAAA;AACb,QAAAH,EAAc,QAAQ,cAAcO,GAAM,IAAM,EAAI;AAAA,MACtD;AAAA,IACF,CAAC;AAED,WAAAE,EAAS,QAAQ,SAAS,iBAAiB;AAAA,MACzC,YAAY;AAAA,MACZ,iBAAiB,CAAC,cAAc,OAAO;AAAA,IAAA,CACxC,GAEM,MAAMA,EAAS,WAAA;AAAA,EACxB,GAAG,CAACb,CAAM,CAAC,GAEJ,gBAAAc,EAAC,OAAA,EAAI,KAAKZ,GAAU,WAAAD,EAAA,CAAsB;AACnD;"}
1
+ {"version":3,"file":"index15.js","sources":["../src/components/Cascader.tsx"],"sourcesContent":["import React, { useState, useRef, useEffect, useCallback, useId } from 'react'\n\nexport interface CascaderOption {\n value: string | number\n label: React.ReactNode\n disabled?: boolean\n children?: CascaderOption[]\n}\n\nexport interface CascaderProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {\n options: CascaderOption[]\n value?: (string | number)[]\n onChange?: (value: (string | number)[], selectedOptions: CascaderOption[]) => void\n placeholder?: string\n disabled?: boolean\n allowClear?: boolean\n expandTrigger?: 'click' | 'hover'\n displayRender?: (labels: React.ReactNode[], selectedOptions: CascaderOption[]) => React.ReactNode\n size?: 'xs' | 'sm' | 'md' | 'lg'\n}\n\nexport function Cascader({\n options,\n value,\n onChange,\n placeholder = 'Please select',\n disabled = false,\n allowClear = true,\n expandTrigger = 'click',\n displayRender,\n size = 'md',\n className = '',\n ...rest\n}: CascaderProps) {\n const [isOpen, setIsOpen] = useState(false)\n const [selectedPath, setSelectedPath] = useState<(string | number)[]>(value || [])\n const [hoveredPath, setHoveredPath] = useState<(string | number)[]>([])\n const containerRef = useRef<HTMLDivElement>(null)\n const inputId = useId()\n const listboxId = useId()\n\n // Sync with controlled value\n useEffect(() => {\n if (value !== undefined) {\n setSelectedPath(value)\n }\n }, [value])\n\n // Close on outside click\n useEffect(() => {\n const handleClickOutside = (e: MouseEvent) => {\n if (containerRef.current && !containerRef.current.contains(e.target as Node)) {\n setIsOpen(false)\n setHoveredPath([])\n }\n }\n\n if (isOpen) {\n document.addEventListener('mousedown', handleClickOutside)\n return () => document.removeEventListener('mousedown', handleClickOutside)\n }\n }, [isOpen])\n\n // Get options at each level based on path\n const getOptionsAtLevel = useCallback((level: number, path: (string | number)[]): CascaderOption[] => {\n if (level === 0) return options\n\n let currentOptions = options\n for (let i = 0; i < level; i++) {\n const selected = currentOptions.find(opt => opt.value === path[i])\n if (!selected?.children) return []\n currentOptions = selected.children\n }\n return currentOptions\n }, [options])\n\n // Get selected options objects from path\n const getSelectedOptions = useCallback((path: (string | number)[]): CascaderOption[] => {\n const result: CascaderOption[] = []\n let currentOptions = options\n\n for (const val of path) {\n const found = currentOptions.find(opt => opt.value === val)\n if (!found) break\n result.push(found)\n currentOptions = found.children || []\n }\n\n return result\n }, [options])\n\n // Determine which path to use for displaying columns\n const activePath = isOpen ? (hoveredPath.length > 0 ? hoveredPath : selectedPath) : selectedPath\n\n // Build columns to display\n const columns: CascaderOption[][] = []\n columns.push(options)\n\n for (let i = 0; i < activePath.length; i++) {\n const nextOptions = getOptionsAtLevel(i + 1, activePath)\n if (nextOptions.length > 0) {\n columns.push(nextOptions)\n }\n }\n\n const handleOptionClick = (option: CascaderOption, level: number) => {\n if (option.disabled) return\n\n const newPath = [...activePath.slice(0, level), option.value]\n\n if (option.children && option.children.length > 0) {\n // Has children - just expand, don't select yet\n setHoveredPath(newPath)\n } else {\n // Leaf node - select and close\n setSelectedPath(newPath)\n setIsOpen(false)\n setHoveredPath([])\n onChange?.(newPath, getSelectedOptions(newPath))\n }\n }\n\n const handleOptionHover = (option: CascaderOption, level: number) => {\n if (expandTrigger !== 'hover' || option.disabled) return\n\n const newPath = [...activePath.slice(0, level), option.value]\n setHoveredPath(newPath)\n }\n\n const handleClear = (e: React.MouseEvent) => {\n e.stopPropagation()\n setSelectedPath([])\n onChange?.([], [])\n }\n\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if (disabled) return\n\n switch (e.key) {\n case 'Enter':\n case ' ':\n e.preventDefault()\n setIsOpen(!isOpen)\n break\n case 'Escape':\n e.preventDefault()\n setIsOpen(false)\n setHoveredPath([])\n break\n }\n }\n\n // Display value\n const selectedOptions = getSelectedOptions(selectedPath)\n const labels = selectedOptions.map(opt => opt.label)\n const displayValue = displayRender\n ? displayRender(labels, selectedOptions)\n : labels.join(' / ')\n\n // Size classes\n const sizeClasses = {\n xs: 'input-xs text-xs',\n sm: 'input-sm text-sm',\n md: 'input-md',\n lg: 'input-lg text-lg',\n }\n\n const dropdownSizeClasses = {\n xs: 'text-xs',\n sm: 'text-sm',\n md: 'text-base',\n lg: 'text-lg',\n }\n\n return (\n <div ref={containerRef} className={`relative inline-block w-full ${className}`} data-state={isOpen ? 'open' : 'closed'} {...rest}>\n {/* Input/Trigger */}\n <div\n id={inputId}\n role=\"combobox\"\n aria-expanded={isOpen}\n aria-haspopup=\"listbox\"\n aria-controls={listboxId}\n tabIndex={disabled ? -1 : 0}\n className={`input input-bordered w-full flex items-center justify-between cursor-pointer ${sizeClasses[size]} ${\n disabled ? 'input-disabled cursor-not-allowed' : ''\n } ${isOpen ? 'border-primary' : ''}`}\n onClick={() => !disabled && setIsOpen(!isOpen)}\n onKeyDown={handleKeyDown}\n >\n <span className={selectedPath.length === 0 ? 'text-base-content/50' : ''}>\n {selectedPath.length > 0 ? displayValue : placeholder}\n </span>\n <div className=\"flex items-center gap-1\">\n {allowClear && selectedPath.length > 0 && !disabled && (\n <button\n type=\"button\"\n className=\"btn btn-ghost btn-xs btn-circle\"\n onClick={handleClear}\n aria-label=\"Clear selection\"\n >\n <svg className=\"w-3 h-3\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n </button>\n )}\n <svg\n className={`w-4 h-4 transition-transform ${isOpen ? 'rotate-180' : ''}`}\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M19 9l-7 7-7-7\" />\n </svg>\n </div>\n </div>\n\n {/* Dropdown */}\n {isOpen && (\n <div\n id={listboxId}\n className={`absolute z-50 mt-1 bg-base-100 border border-base-300 rounded-lg shadow-lg flex ${dropdownSizeClasses[size]}`}\n >\n {columns.map((columnOptions, colIndex) => (\n <ul\n key={colIndex}\n role=\"listbox\"\n className={`min-w-[120px] max-h-[200px] overflow-y-auto py-1 ${\n colIndex > 0 ? 'border-l border-base-300' : ''\n }`}\n >\n {columnOptions.map((option) => {\n const isSelected = selectedPath[colIndex] === option.value\n const isHovered = activePath[colIndex] === option.value\n const hasChildren = option.children && option.children.length > 0\n\n return (\n <li\n key={option.value}\n role=\"option\"\n aria-selected={isSelected}\n aria-disabled={option.disabled}\n className={`px-3 py-2 cursor-pointer flex items-center justify-between gap-2 ${\n option.disabled\n ? 'text-base-content/30 cursor-not-allowed'\n : isSelected\n ? 'bg-primary text-primary-content'\n : isHovered\n ? 'bg-base-200'\n : 'hover:bg-base-200'\n }`}\n onClick={() => handleOptionClick(option, colIndex)}\n onMouseEnter={() => handleOptionHover(option, colIndex)}\n >\n <span>{option.label}</span>\n {hasChildren && (\n <svg className=\"w-4 h-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M9 5l7 7-7 7\" />\n </svg>\n )}\n </li>\n )\n })}\n </ul>\n ))}\n </div>\n )}\n </div>\n )\n}\n"],"names":["Cascader","options","value","onChange","placeholder","disabled","allowClear","expandTrigger","displayRender","size","className","rest","isOpen","setIsOpen","useState","selectedPath","setSelectedPath","hoveredPath","setHoveredPath","containerRef","useRef","inputId","useId","listboxId","useEffect","handleClickOutside","e","getOptionsAtLevel","useCallback","level","path","currentOptions","i","selected","opt","getSelectedOptions","result","val","found","activePath","columns","nextOptions","handleOptionClick","option","newPath","handleOptionHover","handleClear","handleKeyDown","selectedOptions","labels","displayValue","sizeClasses","dropdownSizeClasses","jsxs","jsx","columnOptions","colIndex","isSelected","isHovered","hasChildren"],"mappings":";;AAqBO,SAASA,EAAS;AAAA,EACvB,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,UAAAC,IAAW;AAAA,EACX,YAAAC,IAAa;AAAA,EACb,eAAAC,IAAgB;AAAA,EAChB,eAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,WAAAC,IAAY;AAAA,EACZ,GAAGC;AACL,GAAkB;AAChB,QAAM,CAACC,GAAQC,CAAS,IAAIC,EAAS,EAAK,GACpC,CAACC,GAAcC,CAAe,IAAIF,EAA8BZ,KAAS,CAAA,CAAE,GAC3E,CAACe,GAAaC,CAAc,IAAIJ,EAA8B,CAAA,CAAE,GAChEK,IAAeC,EAAuB,IAAI,GAC1CC,IAAUC,EAAA,GACVC,IAAYD,EAAA;AAGlB,EAAAE,EAAU,MAAM;AACd,IAAItB,MAAU,UACZc,EAAgBd,CAAK;AAAA,EAEzB,GAAG,CAACA,CAAK,CAAC,GAGVsB,EAAU,MAAM;AACd,UAAMC,IAAqB,CAACC,MAAkB;AAC5C,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O;AAAA,cAAA;AAAA,YAwBlB,CAAC;AAAA,UAAA;AAAA,UArCIa;AAAA,QAAA,CAuCR;AAAA,MAAA;AAAA,IAAA;AAAA,EACH,GAEJ;AAEJ;"}
package/dist/index150.js CHANGED
@@ -1,5 +1,24 @@
1
- var e = {};
1
+ import { __require as g } from "./index129.js";
2
+ var r, i;
3
+ function s() {
4
+ if (i) return r;
5
+ i = 1;
6
+ const o = g();
7
+ function e(t) {
8
+ this.mode = o.BYTE, typeof t == "string" ? this.data = new TextEncoder().encode(t) : this.data = new Uint8Array(t);
9
+ }
10
+ return e.getBitsLength = function(n) {
11
+ return n * 8;
12
+ }, e.prototype.getLength = function() {
13
+ return this.data.length;
14
+ }, e.prototype.getBitsLength = function() {
15
+ return e.getBitsLength(this.data.length);
16
+ }, e.prototype.write = function(t) {
17
+ for (let n = 0, a = this.data.length; n < a; n++)
18
+ t.put(this.data[n], 8);
19
+ }, r = e, r;
20
+ }
2
21
  export {
3
- e as __exports
22
+ s as __require
4
23
  };
5
24
  //# sourceMappingURL=index150.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index150.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"index150.js","sources":["../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/byte-data.js"],"sourcesContent":["const Mode = require('./mode')\n\nfunction ByteData (data) {\n this.mode = Mode.BYTE\n if (typeof (data) === 'string') {\n this.data = new TextEncoder().encode(data)\n } else {\n this.data = new Uint8Array(data)\n }\n}\n\nByteData.getBitsLength = function getBitsLength (length) {\n return length * 8\n}\n\nByteData.prototype.getLength = function getLength () {\n return this.data.length\n}\n\nByteData.prototype.getBitsLength = function getBitsLength () {\n return ByteData.getBitsLength(this.data.length)\n}\n\nByteData.prototype.write = function (bitBuffer) {\n for (let i = 0, l = this.data.length; i < l; i++) {\n bitBuffer.put(this.data[i], 8)\n }\n}\n\nmodule.exports = ByteData\n"],"names":["Mode","require$$0","ByteData","data","length","bitBuffer","i","l","byteData"],"mappings":";;;;;AAAA,QAAMA,IAAOC,EAAA;AAEb,WAASC,EAAUC,GAAM;AACvB,SAAK,OAAOH,EAAK,MACb,OAAQG,KAAU,WACpB,KAAK,OAAO,IAAI,YAAW,EAAG,OAAOA,CAAI,IAEzC,KAAK,OAAO,IAAI,WAAWA,CAAI;AAAA,EAEnC;AAEA,SAAAD,EAAS,gBAAgB,SAAwBE,GAAQ;AACvD,WAAOA,IAAS;AAAA,EAClB,GAEAF,EAAS,UAAU,YAAY,WAAsB;AACnD,WAAO,KAAK,KAAK;AAAA,EACnB,GAEAA,EAAS,UAAU,gBAAgB,WAA0B;AAC3D,WAAOA,EAAS,cAAc,KAAK,KAAK,MAAM;AAAA,EAChD,GAEAA,EAAS,UAAU,QAAQ,SAAUG,GAAW;AAC9C,aAASC,IAAI,GAAGC,IAAI,KAAK,KAAK,QAAQD,IAAIC,GAAGD;AAC3C,MAAAD,EAAU,IAAI,KAAK,KAAKC,CAAC,GAAG,CAAC;AAAA,EAEjC,GAEAE,IAAiBN;;","x_google_ignoreList":[0]}
package/dist/index151.js CHANGED
@@ -1,5 +1,37 @@
1
- var r = { exports: {} };
1
+ import { __require as u } from "./index129.js";
2
+ import { __require as h } from "./index118.js";
3
+ var a, n;
4
+ function c() {
5
+ if (n) return a;
6
+ n = 1;
7
+ const o = u(), s = h();
8
+ function r(i) {
9
+ this.mode = o.KANJI, this.data = i;
10
+ }
11
+ return r.getBitsLength = function(e) {
12
+ return e * 13;
13
+ }, r.prototype.getLength = function() {
14
+ return this.data.length;
15
+ }, r.prototype.getBitsLength = function() {
16
+ return r.getBitsLength(this.data.length);
17
+ }, r.prototype.write = function(i) {
18
+ let e;
19
+ for (e = 0; e < this.data.length; e++) {
20
+ let t = s.toSJIS(this.data[e]);
21
+ if (t >= 33088 && t <= 40956)
22
+ t -= 33088;
23
+ else if (t >= 57408 && t <= 60351)
24
+ t -= 49472;
25
+ else
26
+ throw new Error(
27
+ "Invalid SJIS character: " + this.data[e] + `
28
+ Make sure your charset is UTF-8`
29
+ );
30
+ t = (t >>> 8 & 255) * 192 + (t & 255), i.put(t, 13);
31
+ }
32
+ }, a = r, a;
33
+ }
2
34
  export {
3
- r as __module
35
+ c as __require
4
36
  };
5
37
  //# sourceMappingURL=index151.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index151.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"index151.js","sources":["../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/kanji-data.js"],"sourcesContent":["const Mode = require('./mode')\nconst Utils = require('./utils')\n\nfunction KanjiData (data) {\n this.mode = Mode.KANJI\n this.data = data\n}\n\nKanjiData.getBitsLength = function getBitsLength (length) {\n return length * 13\n}\n\nKanjiData.prototype.getLength = function getLength () {\n return this.data.length\n}\n\nKanjiData.prototype.getBitsLength = function getBitsLength () {\n return KanjiData.getBitsLength(this.data.length)\n}\n\nKanjiData.prototype.write = function (bitBuffer) {\n let i\n\n // In the Shift JIS system, Kanji characters are represented by a two byte combination.\n // These byte values are shifted from the JIS X 0208 values.\n // JIS X 0208 gives details of the shift coded representation.\n for (i = 0; i < this.data.length; i++) {\n let value = Utils.toSJIS(this.data[i])\n\n // For characters with Shift JIS values from 0x8140 to 0x9FFC:\n if (value >= 0x8140 && value <= 0x9FFC) {\n // Subtract 0x8140 from Shift JIS value\n value -= 0x8140\n\n // For characters with Shift JIS values from 0xE040 to 0xEBBF\n } else if (value >= 0xE040 && value <= 0xEBBF) {\n // Subtract 0xC140 from Shift JIS value\n value -= 0xC140\n } else {\n throw new Error(\n 'Invalid SJIS character: ' + this.data[i] + '\\n' +\n 'Make sure your charset is UTF-8')\n }\n\n // Multiply most significant byte of result by 0xC0\n // and add least significant byte to product\n value = (((value >>> 8) & 0xff) * 0xC0) + (value & 0xff)\n\n // Convert result to a 13-bit binary string\n bitBuffer.put(value, 13)\n }\n}\n\nmodule.exports = KanjiData\n"],"names":["Mode","require$$0","Utils","require$$1","KanjiData","data","length","bitBuffer","i","value","kanjiData"],"mappings":";;;;;;AAAA,QAAMA,IAAOC,EAAA,GACPC,IAAQC,EAAA;AAEd,WAASC,EAAWC,GAAM;AACxB,SAAK,OAAOL,EAAK,OACjB,KAAK,OAAOK;AAAA,EACd;AAEA,SAAAD,EAAU,gBAAgB,SAAwBE,GAAQ;AACxD,WAAOA,IAAS;AAAA,EAClB,GAEAF,EAAU,UAAU,YAAY,WAAsB;AACpD,WAAO,KAAK,KAAK;AAAA,EACnB,GAEAA,EAAU,UAAU,gBAAgB,WAA0B;AAC5D,WAAOA,EAAU,cAAc,KAAK,KAAK,MAAM;AAAA,EACjD,GAEAA,EAAU,UAAU,QAAQ,SAAUG,GAAW;AAC/C,QAAIC;AAKJ,SAAKA,IAAI,GAAGA,IAAI,KAAK,KAAK,QAAQA,KAAK;AACrC,UAAIC,IAAQP,EAAM,OAAO,KAAK,KAAKM,CAAC,CAAC;AAGrC,UAAIC,KAAS,SAAUA,KAAS;AAE9B,QAAAA,KAAS;AAAA,eAGAA,KAAS,SAAUA,KAAS;AAErC,QAAAA,KAAS;AAAA;AAET,cAAM,IAAI;AAAA,UACR,6BAA6B,KAAK,KAAKD,CAAC,IAAI;AAAA;AAAA,QACX;AAKrC,MAAAC,KAAWA,MAAU,IAAK,OAAQ,OAASA,IAAQ,MAGnDF,EAAU,IAAIE,GAAO,EAAE;AAAA,IAC3B;AAAA,EACA,GAEAC,IAAiBN;;","x_google_ignoreList":[0]}
package/dist/index152.js CHANGED
@@ -1,5 +1,73 @@
1
- var a = {};
1
+ import { __module as c } from "./index157.js";
2
+ var m;
3
+ function j() {
4
+ return m ? c.exports : (m = 1, (function(y) {
5
+ var u = {
6
+ single_source_shortest_paths: function(o, t, e) {
7
+ var r = {}, i = {};
8
+ i[t] = 0;
9
+ var n = u.PriorityQueue.make();
10
+ n.push(t, 0);
11
+ for (var f, p, s, h, _, d, a, v, l; !n.empty(); ) {
12
+ f = n.pop(), p = f.value, h = f.cost, _ = o[p] || {};
13
+ for (s in _)
14
+ _.hasOwnProperty(s) && (d = _[s], a = h + d, v = i[s], l = typeof i[s] > "u", (l || v > a) && (i[s] = a, n.push(s, a), r[s] = p));
15
+ }
16
+ if (typeof e < "u" && typeof i[e] > "u") {
17
+ var q = ["Could not find a path from ", t, " to ", e, "."].join("");
18
+ throw new Error(q);
19
+ }
20
+ return r;
21
+ },
22
+ extract_shortest_path_from_predecessor_list: function(o, t) {
23
+ for (var e = [], r = t; r; )
24
+ e.push(r), o[r], r = o[r];
25
+ return e.reverse(), e;
26
+ },
27
+ find_path: function(o, t, e) {
28
+ var r = u.single_source_shortest_paths(o, t, e);
29
+ return u.extract_shortest_path_from_predecessor_list(
30
+ r,
31
+ e
32
+ );
33
+ },
34
+ /**
35
+ * A very naive priority queue implementation.
36
+ */
37
+ PriorityQueue: {
38
+ make: function(o) {
39
+ var t = u.PriorityQueue, e = {}, r;
40
+ o = o || {};
41
+ for (r in t)
42
+ t.hasOwnProperty(r) && (e[r] = t[r]);
43
+ return e.queue = [], e.sorter = o.sorter || t.default_sorter, e;
44
+ },
45
+ default_sorter: function(o, t) {
46
+ return o.cost - t.cost;
47
+ },
48
+ /**
49
+ * Add a new item to the queue and ensure the highest priority element
50
+ * is at the front of the queue.
51
+ */
52
+ push: function(o, t) {
53
+ var e = { value: o, cost: t };
54
+ this.queue.push(e), this.queue.sort(this.sorter);
55
+ },
56
+ /**
57
+ * Return the highest priority element in the queue.
58
+ */
59
+ pop: function() {
60
+ return this.queue.shift();
61
+ },
62
+ empty: function() {
63
+ return this.queue.length === 0;
64
+ }
65
+ }
66
+ };
67
+ y.exports = u;
68
+ })(c), c.exports);
69
+ }
2
70
  export {
3
- a as __exports
71
+ j as __require
4
72
  };
5
73
  //# sourceMappingURL=index152.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index152.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"index152.js","sources":["../../../node_modules/.pnpm/dijkstrajs@1.0.3/node_modules/dijkstrajs/dijkstra.js"],"sourcesContent":["'use strict';\n\n/******************************************************************************\n * Created 2008-08-19.\n *\n * Dijkstra path-finding functions. Adapted from the Dijkstar Python project.\n *\n * Copyright (C) 2008\n * Wyatt Baldwin <self@wyattbaldwin.com>\n * All rights reserved\n *\n * Licensed under the MIT license.\n *\n * http://www.opensource.org/licenses/mit-license.php\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *****************************************************************************/\nvar dijkstra = {\n single_source_shortest_paths: function(graph, s, d) {\n // Predecessor map for each node that has been encountered.\n // node ID => predecessor node ID\n var predecessors = {};\n\n // Costs of shortest paths from s to all nodes encountered.\n // node ID => cost\n var costs = {};\n costs[s] = 0;\n\n // Costs of shortest paths from s to all nodes encountered; differs from\n // `costs` in that it provides easy access to the node that currently has\n // the known shortest path from s.\n // XXX: Do we actually need both `costs` and `open`?\n var open = dijkstra.PriorityQueue.make();\n open.push(s, 0);\n\n var closest,\n u, v,\n cost_of_s_to_u,\n adjacent_nodes,\n cost_of_e,\n cost_of_s_to_u_plus_cost_of_e,\n cost_of_s_to_v,\n first_visit;\n while (!open.empty()) {\n // In the nodes remaining in graph that have a known cost from s,\n // find the node, u, that currently has the shortest path from s.\n closest = open.pop();\n u = closest.value;\n cost_of_s_to_u = closest.cost;\n\n // Get nodes adjacent to u...\n adjacent_nodes = graph[u] || {};\n\n // ...and explore the edges that connect u to those nodes, updating\n // the cost of the shortest paths to any or all of those nodes as\n // necessary. v is the node across the current edge from u.\n for (v in adjacent_nodes) {\n if (adjacent_nodes.hasOwnProperty(v)) {\n // Get the cost of the edge running from u to v.\n cost_of_e = adjacent_nodes[v];\n\n // Cost of s to u plus the cost of u to v across e--this is *a*\n // cost from s to v that may or may not be less than the current\n // known cost to v.\n cost_of_s_to_u_plus_cost_of_e = cost_of_s_to_u + cost_of_e;\n\n // If we haven't visited v yet OR if the current known cost from s to\n // v is greater than the new cost we just found (cost of s to u plus\n // cost of u to v across e), update v's cost in the cost list and\n // update v's predecessor in the predecessor list (it's now u).\n cost_of_s_to_v = costs[v];\n first_visit = (typeof costs[v] === 'undefined');\n if (first_visit || cost_of_s_to_v > cost_of_s_to_u_plus_cost_of_e) {\n costs[v] = cost_of_s_to_u_plus_cost_of_e;\n open.push(v, cost_of_s_to_u_plus_cost_of_e);\n predecessors[v] = u;\n }\n }\n }\n }\n\n if (typeof d !== 'undefined' && typeof costs[d] === 'undefined') {\n var msg = ['Could not find a path from ', s, ' to ', d, '.'].join('');\n throw new Error(msg);\n }\n\n return predecessors;\n },\n\n extract_shortest_path_from_predecessor_list: function(predecessors, d) {\n var nodes = [];\n var u = d;\n var predecessor;\n while (u) {\n nodes.push(u);\n predecessor = predecessors[u];\n u = predecessors[u];\n }\n nodes.reverse();\n return nodes;\n },\n\n find_path: function(graph, s, d) {\n var predecessors = dijkstra.single_source_shortest_paths(graph, s, d);\n return dijkstra.extract_shortest_path_from_predecessor_list(\n predecessors, d);\n },\n\n /**\n * A very naive priority queue implementation.\n */\n PriorityQueue: {\n make: function (opts) {\n var T = dijkstra.PriorityQueue,\n t = {},\n key;\n opts = opts || {};\n for (key in T) {\n if (T.hasOwnProperty(key)) {\n t[key] = T[key];\n }\n }\n t.queue = [];\n t.sorter = opts.sorter || T.default_sorter;\n return t;\n },\n\n default_sorter: function (a, b) {\n return a.cost - b.cost;\n },\n\n /**\n * Add a new item to the queue and ensure the highest priority element\n * is at the front of the queue.\n */\n push: function (value, cost) {\n var item = {value: value, cost: cost};\n this.queue.push(item);\n this.queue.sort(this.sorter);\n },\n\n /**\n * Return the highest priority element in the queue.\n */\n pop: function () {\n return this.queue.shift();\n },\n\n empty: function () {\n return this.queue.length === 0;\n }\n }\n};\n\n\n// node.js module exports\nif (typeof module !== 'undefined') {\n module.exports = dijkstra;\n}\n"],"names":["dijkstra","graph","s","d","predecessors","costs","open","closest","u","v","cost_of_s_to_u","adjacent_nodes","cost_of_e","cost_of_s_to_u_plus_cost_of_e","cost_of_s_to_v","first_visit","msg","nodes","opts","T","t","key","a","b","value","cost","item","module"],"mappings":";;;;AAuBA,QAAIA,IAAW;AAAA,MACb,8BAA8B,SAASC,GAAOC,GAAGC,GAAG;AAGlD,YAAIC,IAAe,CAAA,GAIfC,IAAQ,CAAA;AACZ,QAAAA,EAAMH,CAAC,IAAI;AAMX,YAAII,IAAON,EAAS,cAAc,KAAI;AACtC,QAAAM,EAAK,KAAKJ,GAAG,CAAC;AAUd,iBARIK,GACAC,GAAGC,GACHC,GACAC,GACAC,GACAC,GACAC,GACAC,GACG,CAACT,EAAK,WAAS;AAGpB,UAAAC,IAAUD,EAAK,IAAG,GAClBE,IAAID,EAAQ,OACZG,IAAiBH,EAAQ,MAGzBI,IAAiBV,EAAMO,CAAC,KAAK,CAAA;AAK7B,eAAKC,KAAKE;AACR,YAAIA,EAAe,eAAeF,CAAC,MAEjCG,IAAYD,EAAeF,CAAC,GAK5BI,IAAgCH,IAAiBE,GAMjDE,IAAiBT,EAAMI,CAAC,GACxBM,IAAe,OAAOV,EAAMI,CAAC,IAAM,MAC/BM,KAAeD,IAAiBD,OAClCR,EAAMI,CAAC,IAAII,GACXP,EAAK,KAAKG,GAAGI,CAA6B,GAC1CT,EAAaK,CAAC,IAAID;AAAA,QAI9B;AAEI,YAAI,OAAOL,IAAM,OAAe,OAAOE,EAAMF,CAAC,IAAM,KAAa;AAC/D,cAAIa,I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EI,OAAO,WAAY;AACjB,iBAAO,KAAK,MAAM,WAAW;AAAA,QACnC;AAAA,MACA;AAAA;AAME,IAAAC,YAAiB3B;AAAA;;","x_google_ignoreList":[0]}
package/dist/index153.js CHANGED
@@ -1,7 +1,5 @@
1
- function e(t) {
2
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
3
- }
1
+ var o = {};
4
2
  export {
5
- e as getDefaultExportFromCjs
3
+ o as __exports
6
4
  };
7
5
  //# sourceMappingURL=index153.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index153.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
1
+ {"version":3,"file":"index153.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,25 @@
1
+ import { __exports as t } from "./index158.js";
2
+ var u;
3
+ function f() {
4
+ if (u) return t;
5
+ u = 1;
6
+ const i = new Uint8Array(512), n = new Uint8Array(256);
7
+ return (function() {
8
+ let r = 1;
9
+ for (let e = 0; e < 255; e++)
10
+ i[e] = r, n[r] = e, r <<= 1, r & 256 && (r ^= 285);
11
+ for (let e = 255; e < 512; e++)
12
+ i[e] = i[e - 255];
13
+ })(), t.log = function(r) {
14
+ if (r < 1) throw new Error("log(" + r + ")");
15
+ return n[r];
16
+ }, t.exp = function(r) {
17
+ return i[r];
18
+ }, t.mul = function(r, e) {
19
+ return r === 0 || e === 0 ? 0 : i[n[r] + n[e]];
20
+ }, t;
21
+ }
22
+ export {
23
+ f as __require
24
+ };
25
+ //# sourceMappingURL=index154.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index154.js","sources":["../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/galois-field.js"],"sourcesContent":["const EXP_TABLE = new Uint8Array(512)\nconst LOG_TABLE = new Uint8Array(256)\n/**\n * Precompute the log and anti-log tables for faster computation later\n *\n * For each possible value in the galois field 2^8, we will pre-compute\n * the logarithm and anti-logarithm (exponential) of this value\n *\n * ref {@link https://en.wikiversity.org/wiki/Reed%E2%80%93Solomon_codes_for_coders#Introduction_to_mathematical_fields}\n */\n;(function initTables () {\n let x = 1\n for (let i = 0; i < 255; i++) {\n EXP_TABLE[i] = x\n LOG_TABLE[x] = i\n\n x <<= 1 // multiply by 2\n\n // The QR code specification says to use byte-wise modulo 100011101 arithmetic.\n // This means that when a number is 256 or larger, it should be XORed with 0x11D.\n if (x & 0x100) { // similar to x >= 256, but a lot faster (because 0x100 == 256)\n x ^= 0x11D\n }\n }\n\n // Optimization: double the size of the anti-log table so that we don't need to mod 255 to\n // stay inside the bounds (because we will mainly use this table for the multiplication of\n // two GF numbers, no more).\n // @see {@link mul}\n for (let i = 255; i < 512; i++) {\n EXP_TABLE[i] = EXP_TABLE[i - 255]\n }\n}())\n\n/**\n * Returns log value of n inside Galois Field\n *\n * @param {Number} n\n * @return {Number}\n */\nexports.log = function log (n) {\n if (n < 1) throw new Error('log(' + n + ')')\n return LOG_TABLE[n]\n}\n\n/**\n * Returns anti-log value of n inside Galois Field\n *\n * @param {Number} n\n * @return {Number}\n */\nexports.exp = function exp (n) {\n return EXP_TABLE[n]\n}\n\n/**\n * Multiplies two number inside Galois Field\n *\n * @param {Number} x\n * @param {Number} y\n * @return {Number}\n */\nexports.mul = function mul (x, y) {\n if (x === 0 || y === 0) return 0\n\n // should be EXP_TABLE[(LOG_TABLE[x] + LOG_TABLE[y]) % 255] if EXP_TABLE wasn't oversized\n // @see {@link initTables}\n return EXP_TABLE[LOG_TABLE[x] + LOG_TABLE[y]]\n}\n"],"names":["EXP_TABLE","LOG_TABLE","x","i","galoisField","n","y"],"mappings":";;;;;AAAA,QAAMA,IAAY,IAAI,WAAW,GAAG,GAC9BC,IAAY,IAAI,WAAW,GAAG;AASnC,UAAC,WAAuB;AACvB,QAAIC,IAAI;AACR,aAASC,IAAI,GAAGA,IAAI,KAAKA;AACvB,MAAAH,EAAUG,CAAC,IAAID,GACfD,EAAUC,CAAC,IAAIC,GAEfD,MAAM,GAIFA,IAAI,QACNA,KAAK;AAQT,aAASC,IAAI,KAAKA,IAAI,KAAKA;AACzB,MAAAH,EAAUG,CAAC,IAAIH,EAAUG,IAAI,GAAG;AAAA,EAEpC,GAAC,GAQDC,EAAA,MAAc,SAAcC,GAAG;AAC7B,QAAIA,IAAI,EAAG,OAAM,IAAI,MAAM,SAASA,IAAI,GAAG;AAC3C,WAAOJ,EAAUI,CAAC;AAAA,EACpB,GAQAD,EAAA,MAAc,SAAcC,GAAG;AAC7B,WAAOL,EAAUK,CAAC;AAAA,EACpB,GASAD,EAAA,MAAc,SAAcF,GAAGI,GAAG;AAChC,WAAIJ,MAAM,KAAKI,MAAM,IAAU,IAIxBN,EAAUC,EAAUC,CAAC,IAAID,EAAUK,CAAC,CAAC;AAAA,EAC9C;;","x_google_ignoreList":[0]}
@@ -0,0 +1,5 @@
1
+ var e = {};
2
+ export {
3
+ e as __exports
4
+ };
5
+ //# sourceMappingURL=index155.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index155.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,5 @@
1
+ var e = {};
2
+ export {
3
+ e as __exports
4
+ };
5
+ //# sourceMappingURL=index156.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index156.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,5 @@
1
+ var r = { exports: {} };
2
+ export {
3
+ r as __module
4
+ };
5
+ //# sourceMappingURL=index157.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index157.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,5 @@
1
+ var a = {};
2
+ export {
3
+ a as __exports
4
+ };
5
+ //# sourceMappingURL=index158.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index158.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,7 @@
1
+ function e(t) {
2
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
3
+ }
4
+ export {
5
+ e as getDefaultExportFromCjs
6
+ };
7
+ //# sourceMappingURL=index159.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index159.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
package/dist/index16.js CHANGED
@@ -1,8 +1,153 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- const o = ({ id: e, children: s, className: r = "", ...a }) => /* @__PURE__ */ t("div", { id: e, className: `carousel-item ${r}`, ...a, children: s }), l = ({ children: e, snap: s = "start", vertical: r = !1, className: a = "", ...c }) => /* @__PURE__ */ t("div", { className: `carousel ${s === "center" ? "carousel-center" : s === "end" ? "carousel-end" : ""} ${r ? "carousel-vertical" : ""} ${a}`.trim(), ...c, children: e });
3
- l.Item = o;
1
+ import { jsx as w } from "react/jsx-runtime";
2
+ import { useRef as C, useState as v, useEffect as M } from "react";
3
+ import O from "./index109.js";
4
+ function S(o) {
5
+ return typeof document > "u" ? "" : getComputedStyle(document.documentElement).getPropertyValue(o).trim();
6
+ }
7
+ function x(o) {
8
+ const e = o.match(/oklch\(\s*([\d.]+)%?\s+([\d.]+)\s+([\d.]+)/);
9
+ if (!e) return "";
10
+ const t = parseFloat(e[1]) / 100, r = parseFloat(e[2]), c = parseFloat(e[3]) * Math.PI / 180, l = r * Math.cos(c), u = r * Math.sin(c), n = t + 0.3963377774 * l + 0.2158037573 * u, f = t - 0.1055613458 * l - 0.0638541728 * u, i = t - 0.0894841775 * l - 1.291485548 * u, s = n * n * n, d = f * f * f, m = i * i * i;
11
+ let b = 4.0767416621 * s - 3.3077115913 * d + 0.2309699292 * m, y = -1.2684380046 * s + 2.6097574011 * d - 0.3413193965 * m, g = -0.0041960863 * s - 0.7034186147 * d + 1.707614701 * m;
12
+ const k = (p) => (p = Math.max(0, Math.min(1, p)), p <= 31308e-7 ? 12.92 * p : 1.055 * Math.pow(p, 1 / 2.4) - 0.055);
13
+ return b = Math.round(k(b) * 255), y = Math.round(k(y) * 255), g = Math.round(k(g) * 255), `#${b.toString(16).padStart(2, "0")}${y.toString(16).padStart(2, "0")}${g.toString(16).padStart(2, "0")}`;
14
+ }
15
+ function V() {
16
+ return typeof document > "u" ? [] : [
17
+ "--color-primary",
18
+ "--color-secondary",
19
+ "--color-accent",
20
+ "--color-info",
21
+ "--color-success",
22
+ "--color-warning",
23
+ "--color-error"
24
+ ].map((e) => {
25
+ const t = S(e);
26
+ return t.includes("oklch") ? x(t) : t;
27
+ }).filter(Boolean);
28
+ }
29
+ function I() {
30
+ const o = V(), e = S("--color-base-content"), t = e.includes("oklch") ? x(e) : e || "#888888", r = S("--color-base-300"), a = r.includes("oklch") ? x(r) : r || "#e0e0e0", c = t.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i), l = c ? (parseInt(c[1], 16) + parseInt(c[2], 16) + parseInt(c[3], 16)) / 3 > 128 : !1;
31
+ return {
32
+ colors: o.length > 0 ? o : void 0,
33
+ theme: {
34
+ mode: l ? "dark" : "light"
35
+ },
36
+ chart: {
37
+ background: "transparent",
38
+ foreColor: t
39
+ },
40
+ grid: {
41
+ borderColor: a
42
+ },
43
+ xaxis: {
44
+ labels: {
45
+ style: {
46
+ colors: t
47
+ }
48
+ },
49
+ axisBorder: {
50
+ color: a
51
+ },
52
+ axisTicks: {
53
+ color: a
54
+ }
55
+ },
56
+ yaxis: {
57
+ labels: {
58
+ style: {
59
+ colors: t
60
+ }
61
+ }
62
+ },
63
+ legend: {
64
+ labels: {
65
+ colors: t
66
+ }
67
+ },
68
+ tooltip: {
69
+ theme: l ? "dark" : "light",
70
+ style: {
71
+ fontSize: "12px"
72
+ },
73
+ x: {
74
+ show: !0
75
+ },
76
+ marker: {
77
+ show: !0
78
+ }
79
+ },
80
+ dataLabels: {
81
+ style: {
82
+ colors: [t, t, t, t, t, t, t]
83
+ },
84
+ background: {
85
+ enabled: !1
86
+ },
87
+ dropShadow: {
88
+ enabled: !1
89
+ }
90
+ }
91
+ };
92
+ }
93
+ function h(o, e) {
94
+ const t = { ...o };
95
+ for (const r in e)
96
+ e[r] !== void 0 && (typeof e[r] == "object" && e[r] !== null && !Array.isArray(e[r]) && typeof o[r] == "object" && o[r] !== null && !Array.isArray(o[r]) ? t[r] = h(
97
+ o[r],
98
+ e[r]
99
+ ) : t[r] = e[r]);
100
+ return t;
101
+ }
102
+ const $ = ({
103
+ type: o,
104
+ series: e,
105
+ width: t = "100%",
106
+ height: r = 350,
107
+ options: a = {},
108
+ themed: c = !0,
109
+ className: l = ""
110
+ }) => {
111
+ const u = C(null), n = C(null), [, f] = v(!1), i = () => {
112
+ const s = {
113
+ chart: {
114
+ type: o,
115
+ width: t,
116
+ height: r
117
+ },
118
+ series: e
119
+ };
120
+ if (c) {
121
+ const d = I();
122
+ return h(h(s, d), a);
123
+ }
124
+ return h(s, a);
125
+ };
126
+ return M(() => {
127
+ if (!u.current) return;
128
+ const s = i();
129
+ return n.current = new O(u.current, s), n.current.render(), f(!0), () => {
130
+ n.current && (n.current.destroy(), n.current = null);
131
+ };
132
+ }, []), M(() => {
133
+ if (!n.current) return;
134
+ const s = i();
135
+ n.current.updateOptions(s, !0, !0);
136
+ }, [o, e, t, r, a, c]), M(() => {
137
+ if (!c || typeof window > "u") return;
138
+ const s = new MutationObserver(() => {
139
+ if (n.current) {
140
+ const d = i();
141
+ n.current.updateOptions(d, !0, !0);
142
+ }
143
+ });
144
+ return s.observe(document.documentElement, {
145
+ attributes: !0,
146
+ attributeFilter: ["data-theme", "class"]
147
+ }), () => s.disconnect();
148
+ }, [c]), /* @__PURE__ */ w("div", { ref: u, className: l });
149
+ };
4
150
  export {
5
- l as Carousel,
6
- o as CarouselItem
151
+ $ as Chart
7
152
  };
8
153
  //# sourceMappingURL=index16.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index16.js","sources":["../src/components/Carousel.tsx"],"sourcesContent":["import React from 'react'\n\nexport interface CarouselItemProps extends React.HTMLAttributes<HTMLDivElement> {\n id?: string\n children: React.ReactNode\n}\n\nexport const CarouselItem: React.FC<CarouselItemProps> = ({ id, children, className = '', ...rest }) => {\n return (\n <div id={id} className={`carousel-item ${className}`} {...rest}>\n {children}\n </div>\n )\n}\n\nexport interface CarouselProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode\n snap?: 'start' | 'center' | 'end'\n vertical?: boolean\n}\n\nexport const Carousel: React.FC<CarouselProps> & {\n Item: typeof CarouselItem\n} = ({ children, snap = 'start', vertical = false, className = '', ...rest }) => {\n const snapClass = snap === 'center' ? 'carousel-center' : snap === 'end' ? 'carousel-end' : ''\n const directionClass = vertical ? 'carousel-vertical' : ''\n\n return (\n <div className={`carousel ${snapClass} ${directionClass} ${className}`.trim()} {...rest}>\n {children}\n </div>\n )\n}\n\nCarousel.Item = CarouselItem\n"],"names":["CarouselItem","id","children","className","rest","jsx","Carousel","snap","vertical"],"mappings":";AAOO,MAAMA,IAA4C,CAAC,EAAE,IAAAC,GAAI,UAAAC,GAAU,WAAAC,IAAY,IAAI,GAAGC,QAEzF,gBAAAC,EAAC,SAAI,IAAAJ,GAAQ,WAAW,iBAAiBE,CAAS,IAAK,GAAGC,GACvD,UAAAF,EAAA,CACH,GAUSI,IAET,CAAC,EAAE,UAAAJ,GAAU,MAAAK,IAAO,SAAS,UAAAC,IAAW,IAAO,WAAAL,IAAY,IAAI,GAAGC,EAAA,MAKlE,gBAAAC,EAAC,OAAA,EAAI,WAAW,YAJAE,MAAS,WAAW,oBAAoBA,MAAS,QAAQ,iBAAiB,EAIrD,IAHhBC,IAAW,sBAAsB,EAGC,IAAIL,CAAS,GAAG,KAAA,GAAS,GAAGC,GAChF,UAAAF,GACH;AAIJI,EAAS,OAAON;"}
1
+ {"version":3,"file":"index16.js","sources":["../src/components/Chart.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react'\nimport ApexCharts from 'apexcharts'\nimport type { ApexOptions } from 'apexcharts'\n\nexport interface ChartProps {\n /** Chart type */\n type: 'line' | 'area' | 'bar' | 'pie' | 'donut' | 'radialBar' | 'scatter' | 'bubble' | 'heatmap' | 'candlestick' | 'boxPlot' | 'radar' | 'polarArea' | 'rangeBar' | 'rangeArea' | 'treemap'\n /** Chart series data */\n series: ApexAxisChartSeries | ApexNonAxisChartSeries\n /** Chart width */\n width?: string | number\n /** Chart height */\n height?: string | number\n /** ApexCharts options (merged with theme defaults) */\n options?: ApexOptions\n /** Use daisyUI theme colors */\n themed?: boolean\n /** Additional CSS classes */\n className?: string\n}\n\n// Get CSS variable value from root\nfunction getCssVar(varName: string): string {\n if (typeof document === 'undefined') return ''\n return getComputedStyle(document.documentElement).getPropertyValue(varName).trim()\n}\n\n// Convert oklch to hex (approximate)\nfunction oklchToHex(oklch: string): string {\n // Parse oklch(L C H) format\n const match = oklch.match(/oklch\\(\\s*([\\d.]+)%?\\s+([\\d.]+)\\s+([\\d.]+)/)\n if (!match) return ''\n\n const l = parseFloat(match[1]) / 100 // Lightness 0-1\n const c = parseFloat(match[2]) // Chroma\n const h = parseFloat(match[3]) // Hue in degrees\n\n // Simplified oklch to sRGB conversion\n // This is an approximation - full conversion is complex\n const hRad = (h * Math.PI) / 180\n const a = c * Math.cos(hRad)\n const b = c * Math.sin(hRad)\n\n // Approximate conversion to linear RGB\n const l_ = l + 0.3963377774 * a + 0.2158037573 * b\n const m_ = l - 0.1055613458 * a - 0.0638541728 * b\n const s_ = l - 0.0894841775 * a - 1.2914855480 * b\n\n const l3 = l_ * l_ * l_\n const m3 = m_ * m_ * m_\n const s3 = s_ * s_ * s_\n\n let r = 4.0767416621 * l3 - 3.3077115913 * m3 + 0.2309699292 * s3\n let g = -1.2684380046 * l3 + 2.6097574011 * m3 - 0.3413193965 * s3\n let bl = -0.0041960863 * l3 - 0.7034186147 * m3 + 1.7076147010 * s3\n\n // Clamp and convert to sRGB\n const toSrgb = (x: number) => {\n x = Math.max(0, Math.min(1, x))\n return x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1/2.4) - 0.055\n }\n\n r = Math.round(toSrgb(r) * 255)\n g = Math.round(toSrgb(g) * 255)\n bl = Math.round(toSrgb(bl) * 255)\n\n return `#${r.toString(16).padStart(2, '0')}${g.toString(16).padStart(2, '0')}${bl.toString(16).padStart(2, '0')}`\n}\n\n// Get daisyUI theme colors from CSS variables\nfunction getThemeColors(): string[] {\n if (typeof document === 'undefined') return []\n\n const colorVars = [\n '--color-primary',\n '--color-secondary',\n '--color-accent',\n '--color-info',\n '--color-success',\n '--color-warning',\n '--color-error',\n ]\n\n return colorVars\n .map(varName => {\n const value = getCssVar(varName)\n if (value.includes('oklch')) {\n return oklchToHex(value)\n }\n return value\n })\n .filter(Boolean)\n}\n\n// Get theme-aware chart options\nfunction getThemedOptions(): Partial<ApexOptions> {\n const colors = getThemeColors()\n\n // Get text color from CSS variable\n const baseContentVar = getCssVar('--color-base-content')\n const textColor = baseContentVar.includes('oklch')\n ? oklchToHex(baseContentVar)\n : (baseContentVar || '#888888')\n\n // Get grid color from CSS variable\n const base300Var = getCssVar('--color-base-300')\n const gridColor = base300Var.includes('oklch')\n ? oklchToHex(base300Var)\n : (base300Var || '#e0e0e0')\n\n // Determine if dark theme by checking luminance of text color\n // If text is light, we're on dark theme\n const textMatch = textColor.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)\n const isDark = textMatch\n ? (parseInt(textMatch[1], 16) + parseInt(textMatch[2], 16) + parseInt(textMatch[3], 16)) / 3 > 128\n : false\n\n return {\n colors: colors.length > 0 ? colors : undefined,\n theme: {\n mode: isDark ? 'dark' : 'light',\n },\n chart: {\n background: 'transparent',\n foreColor: textColor,\n },\n grid: {\n borderColor: gridColor,\n },\n xaxis: {\n labels: {\n style: {\n colors: textColor,\n },\n },\n axisBorder: {\n color: gridColor,\n },\n axisTicks: {\n color: gridColor,\n },\n },\n yaxis: {\n labels: {\n style: {\n colors: textColor,\n },\n },\n },\n legend: {\n labels: {\n colors: textColor,\n },\n },\n tooltip: {\n theme: isDark ? 'dark' : 'light',\n style: {\n fontSize: '12px',\n },\n x: {\n show: true,\n },\n marker: {\n show: true,\n },\n },\n dataLabels: {\n style: {\n colors: [textColor, textColor, textColor, textColor, textColor, textColor, textColor],\n },\n background: {\n enabled: false,\n },\n dropShadow: {\n enabled: false,\n },\n },\n }\n}\n\n// Deep merge objects\nfunction deepMerge<T extends Record<string, unknown>>(target: T, source: Partial<T>): T {\n const result = { ...target }\n\n for (const key in source) {\n if (source[key] !== undefined) {\n if (\n typeof source[key] === 'object' &&\n source[key] !== null &&\n !Array.isArray(source[key]) &&\n typeof target[key] === 'object' &&\n target[key] !== null &&\n !Array.isArray(target[key])\n ) {\n result[key] = deepMerge(\n target[key] as Record<string, unknown>,\n source[key] as Record<string, unknown>\n ) as T[Extract<keyof T, string>]\n } else {\n result[key] = source[key] as T[Extract<keyof T, string>]\n }\n }\n }\n\n return result\n}\n\nexport const Chart: React.FC<ChartProps> = ({\n type,\n series,\n width = '100%',\n height = 350,\n options = {},\n themed = true,\n className = '',\n}) => {\n const chartRef = useRef<HTMLDivElement>(null)\n const chartInstance = useRef<ApexCharts | null>(null)\n const [, setMounted] = useState(false)\n\n // Build final options\n const buildOptions = (): ApexOptions => {\n const baseOptions: ApexOptions = {\n chart: {\n type,\n width,\n height,\n },\n series,\n }\n\n if (themed) {\n const themedOpts = getThemedOptions()\n return deepMerge(deepMerge(baseOptions as unknown as Record<string, unknown>, themedOpts as unknown as Record<string, unknown>), options as unknown as Record<string, unknown>) as ApexOptions\n }\n\n return deepMerge(baseOptions as unknown as Record<string, unknown>, options as unknown as Record<string, unknown>) as ApexOptions\n }\n\n // Initialize chart\n useEffect(() => {\n if (!chartRef.current) return\n\n const opts = buildOptions()\n chartInstance.current = new ApexCharts(chartRef.current, opts)\n chartInstance.current.render()\n setMounted(true)\n\n return () => {\n if (chartInstance.current) {\n chartInstance.current.destroy()\n chartInstance.current = null\n }\n }\n }, []) // eslint-disable-line react-hooks/exhaustive-deps\n\n // Update chart when props change\n useEffect(() => {\n if (!chartInstance.current) return\n\n const opts = buildOptions()\n chartInstance.current.updateOptions(opts, true, true)\n }, [type, series, width, height, options, themed]) // eslint-disable-line react-hooks/exhaustive-deps\n\n // Listen for theme changes\n useEffect(() => {\n if (!themed || typeof window === 'undefined') return\n\n const observer = new MutationObserver(() => {\n if (chartInstance.current) {\n const opts = buildOptions()\n chartInstance.current.updateOptions(opts, true, true)\n }\n })\n\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['data-theme', 'class'],\n })\n\n return () => observer.disconnect()\n }, [themed]) // eslint-disable-line react-hooks/exhaustive-deps\n\n return <div ref={chartRef} className={className} />\n}\n"],"names":["getCssVar","varName","oklchToHex","oklch","match","l","c","hRad","a","b","l_","m_","s_","l3","m3","s3","r","g","bl","toSrgb","x","getThemeColors","value","getThemedOptions","colors","baseContentVar","textColor","base300Var","gridColor","textMatch","isDark","deepMerge","target","source","result","key","Chart","type","series","width","height","options","themed","className","chartRef","useRef","chartInstance","setMounted","useState","buildOptions","baseOptions","themedOpts","useEffect","opts","ApexCharts","observer","jsx"],"mappings":";;;AAsBA,SAASA,EAAUC,GAAyB;AAC1C,SAAI,OAAO,WAAa,MAAoB,KACrC,iBAAiB,SAAS,eAAe,EAAE,iBAAiBA,CAAO,EAAE,KAAA;AAC9E;AAGA,SAASC,EAAWC,GAAuB;AAEzC,QAAMC,IAAQD,EAAM,MAAM,4CAA4C;AACtE,MAAI,CAACC,EAAO,QAAO;AAEnB,QAAMC,IAAI,WAAWD,EAAM,CAAC,CAAC,IAAI,KAC3BE,IAAI,WAAWF,EAAM,CAAC,CAAC,GAKvBG,IAJI,WAAWH,EAAM,CAAC,CAAC,IAIX,KAAK,KAAM,KACvBI,IAAIF,IAAI,KAAK,IAAIC,CAAI,GACrBE,IAAIH,IAAI,KAAK,IAAIC,CAAI,GAGrBG,IAAKL,IAAI,eAAeG,IAAI,eAAeC,GAC3CE,IAAKN,IAAI,eAAeG,IAAI,eAAeC,GAC3CG,IAAKP,IAAI,eAAeG,IAA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AAU,MAAM;AACd,QAAI,CAACR,EAAS,QAAS;AAEvB,UAAMS,IAAOJ,EAAA;AACb,WAAAH,EAAc,UAAU,IAAIQ,EAAWV,EAAS,SAASS,CAAI,GAC7DP,EAAc,QAAQ,OAAA,GACtBC,EAAW,EAAI,GAER,MAAM;AACX,MAAID,EAAc,YAChBA,EAAc,QAAQ,QAAA,GACtBA,EAAc,UAAU;AAAA,IAE5B;AAAA,EACF,GAAG,CAAA,CAAE,GAGLM,EAAU,MAAM;AACd,QAAI,CAACN,EAAc,QAAS;AAE5B,UAAMO,IAAOJ,EAAA;AACb,IAAAH,EAAc,QAAQ,cAAcO,GAAM,IAAM,EAAI;AAAA,EACtD,GAAG,CAAChB,GAAMC,GAAQC,GAAOC,GAAQC,GAASC,CAAM,CAAC,GAGjDU,EAAU,MAAM;AACd,QAAI,CAACV,KAAU,OAAO,SAAW,IAAa;AAE9C,UAAMa,IAAW,IAAI,iBAAiB,MAAM;AAC1C,UAAIT,EAAc,SAAS;AACzB,cAAMO,IAAOJ,EAAA;AACb,QAAAH,EAAc,QAAQ,cAAcO,GAAM,IAAM,EAAI;AAAA,MACtD;AAAA,IACF,CAAC;AAED,WAAAE,EAAS,QAAQ,SAAS,iBAAiB;AAAA,MACzC,YAAY;AAAA,MACZ,iBAAiB,CAAC,cAAc,OAAO;AAAA,IAAA,CACxC,GAEM,MAAMA,EAAS,WAAA;AAAA,EACxB,GAAG,CAACb,CAAM,CAAC,GAEJ,gBAAAc,EAAC,OAAA,EAAI,KAAKZ,GAAU,WAAAD,EAAA,CAAsB;AACnD;"}
package/dist/index17.js CHANGED
@@ -1,74 +1,8 @@
1
- import { jsxs as r, jsx as o } from "react/jsx-runtime";
2
- import { useState as f, useId as v, createContext as N, useContext as w } from "react";
3
- const d = N(null);
4
- function g({
5
- children: t,
6
- title: s,
7
- open: l,
8
- defaultOpen: u = !1,
9
- onChange: m,
10
- icon: C = "arrow",
11
- className: h = "",
12
- ...c
13
- }) {
14
- const [x, b] = f(u), e = l !== void 0 ? l : x, n = v(), a = () => {
15
- const p = !e;
16
- l === void 0 && b(p), m?.(p);
17
- }, i = [
18
- "collapse",
19
- "bg-base-200",
20
- {
21
- arrow: "collapse-arrow",
22
- plus: "collapse-plus",
23
- none: ""
24
- }[C],
25
- e && "collapse-open",
26
- !e && "collapse-close",
27
- h
28
- ].filter(Boolean).join(" ");
29
- return s !== void 0 ? /* @__PURE__ */ r("div", { className: i, "data-state": e ? "open" : "closed", ...c, children: [
30
- /* @__PURE__ */ o(
31
- "input",
32
- {
33
- type: "checkbox",
34
- id: n,
35
- className: "peer",
36
- checked: e,
37
- onChange: a,
38
- style: { position: "absolute", opacity: 0, pointerEvents: "none" }
39
- }
40
- ),
41
- /* @__PURE__ */ o("label", { htmlFor: n, className: "collapse-title text-xl font-medium", children: s }),
42
- /* @__PURE__ */ o("div", { className: "collapse-content", children: t })
43
- ] }) : /* @__PURE__ */ o(d.Provider, { value: { isOpen: e, toggle: a, checkboxId: n }, children: /* @__PURE__ */ r("div", { className: i, "data-state": e ? "open" : "closed", ...c, children: [
44
- /* @__PURE__ */ o(
45
- "input",
46
- {
47
- type: "checkbox",
48
- id: n,
49
- className: "peer",
50
- checked: e,
51
- onChange: a,
52
- style: { position: "absolute", opacity: 0, pointerEvents: "none" }
53
- }
54
- ),
55
- t
56
- ] }) });
57
- }
58
- function k({ children: t, className: s = "" }) {
59
- const l = w(d);
60
- if (!l)
61
- throw new Error("Collapse.Title must be used within Collapse");
62
- return /* @__PURE__ */ o("label", { htmlFor: l.checkboxId, className: `collapse-title text-xl font-medium ${s}`, children: t });
63
- }
64
- function y({ children: t, className: s = "" }) {
65
- return /* @__PURE__ */ o("div", { className: `collapse-content ${s}`, children: t });
66
- }
67
- const E = Object.assign(g, {
68
- Title: k,
69
- Content: y
70
- });
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ const o = ({ id: e, children: s, className: r = "", ...a }) => /* @__PURE__ */ t("div", { id: e, className: `carousel-item ${r}`, ...a, children: s }), l = ({ children: e, snap: s = "start", vertical: r = !1, className: a = "", ...c }) => /* @__PURE__ */ t("div", { className: `carousel ${s === "center" ? "carousel-center" : s === "end" ? "carousel-end" : ""} ${r ? "carousel-vertical" : ""} ${a}`.trim(), ...c, children: e });
3
+ l.Item = o;
71
4
  export {
72
- E as Collapse
5
+ l as Carousel,
6
+ o as CarouselItem
73
7
  };
74
8
  //# sourceMappingURL=index17.js.map