@lssm/lib.ui-kit 1.11.0 → 1.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 (439) hide show
  1. package/README.md +5 -0
  2. package/dist/-core/src/utils.js +10 -0
  3. package/dist/_virtual/rolldown_runtime.js +33 -0
  4. package/dist/index.js +1 -2
  5. package/dist/node_modules/@hookform/resolvers/dist/resolvers.js +34 -0
  6. package/dist/node_modules/@hookform/resolvers/zod/dist/zod.js +118 -0
  7. package/dist/node_modules/@swc/helpers/cjs/_interop_require_default.js +14 -0
  8. package/dist/node_modules/@swc/helpers/cjs/_interop_require_wildcard.js +35 -0
  9. package/dist/node_modules/lucide-react/dist/esm/Icon.js +25 -0
  10. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +24 -0
  11. package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +21 -0
  12. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js +17 -0
  13. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.js +17 -0
  14. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js +17 -0
  15. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js +17 -0
  16. package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-left.js +20 -0
  17. package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-right.js +20 -0
  18. package/dist/node_modules/lucide-react/dist/esm/icons/ellipsis.js +33 -0
  19. package/dist/node_modules/lucide-react/dist/esm/icons/funnel.js +17 -0
  20. package/dist/node_modules/lucide-react/dist/esm/icons/house.js +20 -0
  21. package/dist/node_modules/lucide-react/dist/esm/icons/loader-circle.js +17 -0
  22. package/dist/node_modules/lucide-react/dist/esm/icons/plus.js +20 -0
  23. package/dist/node_modules/lucide-react/dist/esm/icons/refresh-ccw.js +31 -0
  24. package/dist/node_modules/lucide-react/dist/esm/icons/refresh-cw.js +31 -0
  25. package/dist/node_modules/lucide-react/dist/esm/icons/search.js +22 -0
  26. package/dist/node_modules/lucide-react/dist/esm/icons/triangle-alert.js +27 -0
  27. package/dist/node_modules/lucide-react/dist/esm/icons/x.js +20 -0
  28. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js +22 -0
  29. package/dist/node_modules/next/dist/client/add-base-path.js +30 -0
  30. package/dist/node_modules/next/dist/client/add-locale.js +29 -0
  31. package/dist/node_modules/next/dist/client/detect-domain-locale.js +26 -0
  32. package/dist/node_modules/next/dist/client/get-domain-locale.js +41 -0
  33. package/dist/node_modules/next/dist/client/has-base-path.js +28 -0
  34. package/dist/node_modules/next/dist/client/link.js +311 -0
  35. package/dist/node_modules/next/dist/client/normalize-locale-path.js +30 -0
  36. package/dist/node_modules/next/dist/client/normalize-trailing-slash.js +34 -0
  37. package/dist/node_modules/next/dist/client/request-idle-callback.js +44 -0
  38. package/dist/node_modules/next/dist/client/resolve-href.js +86 -0
  39. package/dist/node_modules/next/dist/client/use-intersection.js +104 -0
  40. package/dist/node_modules/next/dist/client/use-merged-ref.js +56 -0
  41. package/dist/node_modules/next/dist/compiled/path-to-regexp/index.js +372 -0
  42. package/dist/node_modules/next/dist/lib/constants.js +316 -0
  43. package/dist/node_modules/next/dist/lib/route-pattern-normalizer.js +69 -0
  44. package/dist/node_modules/next/dist/shared/lib/escape-regexp.js +23 -0
  45. package/dist/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js +22 -0
  46. package/dist/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js +42 -0
  47. package/dist/node_modules/next/dist/shared/lib/invariant-error.js +23 -0
  48. package/dist/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js +23 -0
  49. package/dist/node_modules/next/dist/shared/lib/router/utils/add-locale.js +30 -0
  50. package/dist/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js +24 -0
  51. package/dist/node_modules/next/dist/shared/lib/router/utils/app-paths.js +41 -0
  52. package/dist/node_modules/next/dist/shared/lib/router/utils/format-url.js +78 -0
  53. package/dist/node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js +151 -0
  54. package/dist/node_modules/next/dist/shared/lib/router/utils/get-segment-param.js +77 -0
  55. package/dist/node_modules/next/dist/shared/lib/router/utils/index.js +32 -0
  56. package/dist/node_modules/next/dist/shared/lib/router/utils/interception-routes.js +92 -0
  57. package/dist/node_modules/next/dist/shared/lib/router/utils/interpolate-as.js +41 -0
  58. package/dist/node_modules/next/dist/shared/lib/router/utils/is-dynamic.js +26 -0
  59. package/dist/node_modules/next/dist/shared/lib/router/utils/is-local-url.js +31 -0
  60. package/dist/node_modules/next/dist/shared/lib/router/utils/omit.js +24 -0
  61. package/dist/node_modules/next/dist/shared/lib/router/utils/parse-loader-tree.js +33 -0
  62. package/dist/node_modules/next/dist/shared/lib/router/utils/parse-path.js +36 -0
  63. package/dist/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js +24 -0
  64. package/dist/node_modules/next/dist/shared/lib/router/utils/querystring.js +56 -0
  65. package/dist/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js +26 -0
  66. package/dist/node_modules/next/dist/shared/lib/router/utils/route-match-utils.js +94 -0
  67. package/dist/node_modules/next/dist/shared/lib/router/utils/route-matcher.js +46 -0
  68. package/dist/node_modules/next/dist/shared/lib/router/utils/route-regex.js +203 -0
  69. package/dist/node_modules/next/dist/shared/lib/router/utils/sorted-routes.js +167 -0
  70. package/dist/node_modules/next/dist/shared/lib/router-context.shared-runtime.js +20 -0
  71. package/dist/node_modules/next/dist/shared/lib/segment.js +80 -0
  72. package/dist/node_modules/next/dist/shared/lib/utils/error-once.js +25 -0
  73. package/dist/node_modules/next/dist/shared/lib/utils.js +172 -0
  74. package/dist/node_modules/next/link.js +12 -0
  75. package/dist/node_modules/react-hook-form/dist/index.esm.js +2074 -0
  76. package/dist/node_modules/zod/v4/classic/errors.js +29 -0
  77. package/dist/node_modules/zod/v4/classic/iso.js +37 -0
  78. package/dist/node_modules/zod/v4/classic/parse.js +19 -0
  79. package/dist/node_modules/zod/v4/classic/schemas.js +418 -0
  80. package/dist/node_modules/zod/v4/core/api.js +404 -0
  81. package/dist/node_modules/zod/v4/core/checks.js +225 -0
  82. package/dist/node_modules/zod/v4/core/core.js +61 -0
  83. package/dist/node_modules/zod/v4/core/errors.js +62 -0
  84. package/dist/node_modules/zod/v4/core/json-schema-processors.js +148 -0
  85. package/dist/node_modules/zod/v4/core/parse.js +109 -0
  86. package/dist/node_modules/zod/v4/core/regexes.js +57 -0
  87. package/dist/node_modules/zod/v4/core/registries.js +52 -0
  88. package/dist/node_modules/zod/v4/core/schemas.js +744 -0
  89. package/dist/node_modules/zod/v4/core/to-json-schema.js +260 -0
  90. package/dist/node_modules/zod/v4/core/util.js +155 -0
  91. package/dist/node_modules/zod/v4/core/versions.js +9 -0
  92. package/dist/tsconfig.tsbuildinfo +1 -1
  93. package/dist/ui/accordion.js +2 -3
  94. package/dist/ui/alert-dialog.js +2 -3
  95. package/dist/ui/alert.js +2 -3
  96. package/dist/ui/aspect-ratio.js +1 -2
  97. package/dist/ui/atoms/FilterSelect/FilterSelect.js +1 -2
  98. package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.js +4 -5
  99. package/dist/ui/atoms/Pagination/Pagination.js +5 -3
  100. package/dist/ui/atoms/SearchInput/SearchInput.js +3 -3
  101. package/dist/ui/avatar.js +2 -3
  102. package/dist/ui/badge.js +2 -3
  103. package/dist/ui/breadcrumb.js +5 -5
  104. package/dist/ui/button.js +2 -3
  105. package/dist/ui/card.js +2 -3
  106. package/dist/ui/carousel.js +1 -2
  107. package/dist/ui/checkbox.js +2 -3
  108. package/dist/ui/collapsible.js +1 -2
  109. package/dist/ui/command.js +1 -2
  110. package/dist/ui/context-menu.js +2 -3
  111. package/dist/ui/date-picker.js +2 -3
  112. package/dist/ui/date-range-picker.js +2 -3
  113. package/dist/ui/datetime-picker.js +1 -2
  114. package/dist/ui/dialog.js +2 -3
  115. package/dist/ui/dropdown-menu.js +2 -3
  116. package/dist/ui/empty-state.js +2 -3
  117. package/dist/ui/empty.js +2 -3
  118. package/dist/ui/fab.js +2 -3
  119. package/dist/ui/field.js +2 -3
  120. package/dist/ui/form.js +2 -3
  121. package/dist/ui/hover-card.js +2 -3
  122. package/dist/ui/icons/Check.js +1 -2
  123. package/dist/ui/icons/ChevronDown.js +1 -2
  124. package/dist/ui/icons/ChevronRight.js +1 -2
  125. package/dist/ui/icons/ChevronUp.js +1 -2
  126. package/dist/ui/icons/CircleUser.js +1 -2
  127. package/dist/ui/icons/Info.js +1 -2
  128. package/dist/ui/icons/Key.js +1 -2
  129. package/dist/ui/icons/MoonStar.js +1 -2
  130. package/dist/ui/icons/Sun.js +1 -2
  131. package/dist/ui/icons/X.js +1 -2
  132. package/dist/ui/icons/iconWithClassName.js +1 -2
  133. package/dist/ui/input.js +2 -3
  134. package/dist/ui/label.js +2 -3
  135. package/dist/ui/link.js +2 -3
  136. package/dist/ui/loading-button.js +1 -2
  137. package/dist/ui/loading-overlay.js +1 -2
  138. package/dist/ui/loading-screen.js +1 -2
  139. package/dist/ui/marketing/FeatureGrid.js +1 -2
  140. package/dist/ui/marketing/Hero.js +2 -3
  141. package/dist/ui/marketing/PricingTable.js +2 -3
  142. package/dist/ui/menubar.js +2 -3
  143. package/dist/ui/molecules/Autocomplete/index.js +1 -2
  144. package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.js +5 -4
  145. package/dist/ui/molecules/SkeletonList.js +1 -2
  146. package/dist/ui/nativewind-env.d.js +0 -0
  147. package/dist/ui/navigation-menu.js +2 -3
  148. package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.js +6 -5
  149. package/dist/ui/organisms/ListPage/ListPage.js +13 -9
  150. package/dist/ui/page-header.js +2 -3
  151. package/dist/ui/password-strength.js +1 -2
  152. package/dist/ui/popover.js +2 -3
  153. package/dist/ui/progress.js +2 -3
  154. package/dist/ui/radio-group.js +2 -3
  155. package/dist/ui/select.js +2 -3
  156. package/dist/ui/separator.js +2 -3
  157. package/dist/ui/sheet.js +1 -2
  158. package/dist/ui/sidebar.js +1 -2
  159. package/dist/ui/skeleton.js +2 -3
  160. package/dist/ui/stack.js +2 -3
  161. package/dist/ui/stepper.js +2 -3
  162. package/dist/ui/switch.js +2 -3
  163. package/dist/ui/table.js +2 -3
  164. package/dist/ui/tabs.js +2 -3
  165. package/dist/ui/text.js +2 -3
  166. package/dist/ui/textarea.js +2 -3
  167. package/dist/ui/time-picker.js +2 -3
  168. package/dist/ui/toggle-group.js +2 -3
  169. package/dist/ui/toggle.js +2 -3
  170. package/dist/ui/tooltip.js +2 -3
  171. package/dist/ui/typography.js +2 -3
  172. package/dist/ui/useColorScheme.js +1 -2
  173. package/dist/ui/useListState.js +1 -2
  174. package/dist/ui/usecases/UseCaseCard.js +1 -2
  175. package/dist/ui/usecases/UserStoryCard.js +1 -2
  176. package/dist/ui/utils.js +1 -2
  177. package/package.json +204 -114
  178. package/dist/index.d.ts +0 -5
  179. package/dist/index.d.ts.map +0 -1
  180. package/dist/index.js.map +0 -1
  181. package/dist/ui/accordion.d.ts +0 -36
  182. package/dist/ui/accordion.d.ts.map +0 -1
  183. package/dist/ui/accordion.js.map +0 -1
  184. package/dist/ui/alert-dialog.d.ts +0 -72
  185. package/dist/ui/alert-dialog.d.ts.map +0 -1
  186. package/dist/ui/alert-dialog.js.map +0 -1
  187. package/dist/ui/alert.d.ts +0 -37
  188. package/dist/ui/alert.d.ts.map +0 -1
  189. package/dist/ui/alert.js.map +0 -1
  190. package/dist/ui/aspect-ratio.d.ts +0 -12
  191. package/dist/ui/aspect-ratio.d.ts.map +0 -1
  192. package/dist/ui/aspect-ratio.js.map +0 -1
  193. package/dist/ui/atoms/FilterSelect/FilterSelect.d.ts +0 -8
  194. package/dist/ui/atoms/FilterSelect/FilterSelect.d.ts.map +0 -1
  195. package/dist/ui/atoms/FilterSelect/FilterSelect.js.map +0 -1
  196. package/dist/ui/atoms/FilterSelect/index.d.ts +0 -3
  197. package/dist/ui/atoms/FilterSelect/types.d.ts +0 -19
  198. package/dist/ui/atoms/FilterSelect/types.d.ts.map +0 -1
  199. package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.d.ts +0 -23
  200. package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.d.ts.map +0 -1
  201. package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.js.map +0 -1
  202. package/dist/ui/atoms/LoadingSpinner/index.d.ts +0 -2
  203. package/dist/ui/atoms/Pagination/Pagination.d.ts +0 -8
  204. package/dist/ui/atoms/Pagination/Pagination.d.ts.map +0 -1
  205. package/dist/ui/atoms/Pagination/Pagination.js.map +0 -1
  206. package/dist/ui/atoms/Pagination/index.d.ts +0 -3
  207. package/dist/ui/atoms/Pagination/types.d.ts +0 -16
  208. package/dist/ui/atoms/Pagination/types.d.ts.map +0 -1
  209. package/dist/ui/atoms/SearchInput/SearchInput.d.ts +0 -8
  210. package/dist/ui/atoms/SearchInput/SearchInput.d.ts.map +0 -1
  211. package/dist/ui/atoms/SearchInput/SearchInput.js.map +0 -1
  212. package/dist/ui/atoms/SearchInput/index.d.ts +0 -3
  213. package/dist/ui/atoms/SearchInput/types.d.ts +0 -13
  214. package/dist/ui/atoms/SearchInput/types.d.ts.map +0 -1
  215. package/dist/ui/avatar.d.ts +0 -28
  216. package/dist/ui/avatar.d.ts.map +0 -1
  217. package/dist/ui/avatar.js.map +0 -1
  218. package/dist/ui/badge.d.ts +0 -22
  219. package/dist/ui/badge.d.ts.map +0 -1
  220. package/dist/ui/badge.js.map +0 -1
  221. package/dist/ui/breadcrumb.d.ts +0 -39
  222. package/dist/ui/breadcrumb.d.ts.map +0 -1
  223. package/dist/ui/breadcrumb.js.map +0 -1
  224. package/dist/ui/button.d.ts +0 -26
  225. package/dist/ui/button.d.ts.map +0 -1
  226. package/dist/ui/button.js.map +0 -1
  227. package/dist/ui/card.d.ts +0 -44
  228. package/dist/ui/card.d.ts.map +0 -1
  229. package/dist/ui/card.js.map +0 -1
  230. package/dist/ui/carousel.d.ts +0 -5
  231. package/dist/ui/carousel.d.ts.map +0 -1
  232. package/dist/ui/carousel.js.map +0 -1
  233. package/dist/ui/checkbox.d.ts +0 -17
  234. package/dist/ui/checkbox.d.ts.map +0 -1
  235. package/dist/ui/checkbox.js.map +0 -1
  236. package/dist/ui/collapsible.d.ts +0 -25
  237. package/dist/ui/collapsible.d.ts.map +0 -1
  238. package/dist/ui/collapsible.js.map +0 -1
  239. package/dist/ui/command.d.ts +0 -5
  240. package/dist/ui/command.d.ts.map +0 -1
  241. package/dist/ui/command.js.map +0 -1
  242. package/dist/ui/context-menu.d.ts +0 -110
  243. package/dist/ui/context-menu.d.ts.map +0 -1
  244. package/dist/ui/context-menu.js.map +0 -1
  245. package/dist/ui/date-picker.d.ts +0 -24
  246. package/dist/ui/date-picker.d.ts.map +0 -1
  247. package/dist/ui/date-picker.js.map +0 -1
  248. package/dist/ui/date-range-picker.d.ts +0 -31
  249. package/dist/ui/date-range-picker.d.ts.map +0 -1
  250. package/dist/ui/date-range-picker.js.map +0 -1
  251. package/dist/ui/datetime-picker.d.ts +0 -28
  252. package/dist/ui/datetime-picker.d.ts.map +0 -1
  253. package/dist/ui/datetime-picker.js.map +0 -1
  254. package/dist/ui/dialog.d.ts +0 -69
  255. package/dist/ui/dialog.d.ts.map +0 -1
  256. package/dist/ui/dialog.js.map +0 -1
  257. package/dist/ui/dropdown-menu.d.ts +0 -112
  258. package/dist/ui/dropdown-menu.d.ts.map +0 -1
  259. package/dist/ui/dropdown-menu.js.map +0 -1
  260. package/dist/ui/empty-state.d.ts +0 -29
  261. package/dist/ui/empty-state.d.ts.map +0 -1
  262. package/dist/ui/empty-state.js.map +0 -1
  263. package/dist/ui/empty.d.ts +0 -37
  264. package/dist/ui/empty.d.ts.map +0 -1
  265. package/dist/ui/empty.js.map +0 -1
  266. package/dist/ui/fab.d.ts +0 -36
  267. package/dist/ui/fab.d.ts.map +0 -1
  268. package/dist/ui/fab.js.map +0 -1
  269. package/dist/ui/field.d.ts +0 -67
  270. package/dist/ui/field.d.ts.map +0 -1
  271. package/dist/ui/field.js.map +0 -1
  272. package/dist/ui/form.d.ts +0 -50
  273. package/dist/ui/form.d.ts.map +0 -1
  274. package/dist/ui/form.js.map +0 -1
  275. package/dist/ui/hover-card.d.ts +0 -30
  276. package/dist/ui/hover-card.d.ts.map +0 -1
  277. package/dist/ui/hover-card.js.map +0 -1
  278. package/dist/ui/icons/Check.d.ts +0 -2
  279. package/dist/ui/icons/Check.js.map +0 -1
  280. package/dist/ui/icons/ChevronDown.d.ts +0 -2
  281. package/dist/ui/icons/ChevronDown.js.map +0 -1
  282. package/dist/ui/icons/ChevronRight.d.ts +0 -2
  283. package/dist/ui/icons/ChevronRight.js.map +0 -1
  284. package/dist/ui/icons/ChevronUp.d.ts +0 -2
  285. package/dist/ui/icons/ChevronUp.js.map +0 -1
  286. package/dist/ui/icons/CircleUser.d.ts +0 -2
  287. package/dist/ui/icons/CircleUser.js.map +0 -1
  288. package/dist/ui/icons/Info.d.ts +0 -2
  289. package/dist/ui/icons/Info.js.map +0 -1
  290. package/dist/ui/icons/Key.d.ts +0 -2
  291. package/dist/ui/icons/Key.js.map +0 -1
  292. package/dist/ui/icons/MoonStar.d.ts +0 -2
  293. package/dist/ui/icons/MoonStar.js.map +0 -1
  294. package/dist/ui/icons/Sun.d.ts +0 -2
  295. package/dist/ui/icons/Sun.js.map +0 -1
  296. package/dist/ui/icons/X.d.ts +0 -2
  297. package/dist/ui/icons/X.js.map +0 -1
  298. package/dist/ui/icons/iconWithClassName.d.ts +0 -7
  299. package/dist/ui/icons/iconWithClassName.d.ts.map +0 -1
  300. package/dist/ui/icons/iconWithClassName.js.map +0 -1
  301. package/dist/ui/input.d.ts +0 -15
  302. package/dist/ui/input.d.ts.map +0 -1
  303. package/dist/ui/input.js.map +0 -1
  304. package/dist/ui/label.d.ts +0 -16
  305. package/dist/ui/label.d.ts.map +0 -1
  306. package/dist/ui/label.js.map +0 -1
  307. package/dist/ui/link.d.ts +0 -14
  308. package/dist/ui/link.d.ts.map +0 -1
  309. package/dist/ui/link.js.map +0 -1
  310. package/dist/ui/loading-button.d.ts +0 -20
  311. package/dist/ui/loading-button.d.ts.map +0 -1
  312. package/dist/ui/loading-button.js.map +0 -1
  313. package/dist/ui/loading-overlay.d.ts +0 -16
  314. package/dist/ui/loading-overlay.d.ts.map +0 -1
  315. package/dist/ui/loading-overlay.js.map +0 -1
  316. package/dist/ui/loading-screen.d.ts +0 -14
  317. package/dist/ui/loading-screen.d.ts.map +0 -1
  318. package/dist/ui/loading-screen.js.map +0 -1
  319. package/dist/ui/marketing/FeatureGrid.d.ts +0 -21
  320. package/dist/ui/marketing/FeatureGrid.d.ts.map +0 -1
  321. package/dist/ui/marketing/FeatureGrid.js.map +0 -1
  322. package/dist/ui/marketing/Hero.d.ts +0 -28
  323. package/dist/ui/marketing/Hero.d.ts.map +0 -1
  324. package/dist/ui/marketing/Hero.js.map +0 -1
  325. package/dist/ui/marketing/PricingTable.d.ts +0 -25
  326. package/dist/ui/marketing/PricingTable.d.ts.map +0 -1
  327. package/dist/ui/marketing/PricingTable.js.map +0 -1
  328. package/dist/ui/marketing/index.d.ts +0 -4
  329. package/dist/ui/menubar.d.ts +0 -115
  330. package/dist/ui/menubar.d.ts.map +0 -1
  331. package/dist/ui/menubar.js.map +0 -1
  332. package/dist/ui/molecules/Autocomplete/index.d.ts +0 -5
  333. package/dist/ui/molecules/Autocomplete/index.d.ts.map +0 -1
  334. package/dist/ui/molecules/Autocomplete/index.js.map +0 -1
  335. package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.d.ts +0 -8
  336. package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.d.ts.map +0 -1
  337. package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.js.map +0 -1
  338. package/dist/ui/molecules/SearchAndFilter/index.d.ts +0 -3
  339. package/dist/ui/molecules/SearchAndFilter/types.d.ts +0 -25
  340. package/dist/ui/molecules/SearchAndFilter/types.d.ts.map +0 -1
  341. package/dist/ui/molecules/SkeletonList.d.ts +0 -16
  342. package/dist/ui/molecules/SkeletonList.d.ts.map +0 -1
  343. package/dist/ui/molecules/SkeletonList.js.map +0 -1
  344. package/dist/ui/nativewind-env.d.ts +0 -1
  345. package/dist/ui/navigation-menu.d.ts +0 -68
  346. package/dist/ui/navigation-menu.d.ts.map +0 -1
  347. package/dist/ui/navigation-menu.js.map +0 -1
  348. package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.d.ts +0 -30
  349. package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.d.ts.map +0 -1
  350. package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.js.map +0 -1
  351. package/dist/ui/organisms/ErrorBoundary/index.d.ts +0 -2
  352. package/dist/ui/organisms/ListPage/ListPage.d.ts +0 -29
  353. package/dist/ui/organisms/ListPage/ListPage.d.ts.map +0 -1
  354. package/dist/ui/organisms/ListPage/ListPage.js.map +0 -1
  355. package/dist/ui/organisms/ListPage/index.d.ts +0 -3
  356. package/dist/ui/organisms/ListPage/types.d.ts +0 -42
  357. package/dist/ui/organisms/ListPage/types.d.ts.map +0 -1
  358. package/dist/ui/page-header.d.ts +0 -27
  359. package/dist/ui/page-header.d.ts.map +0 -1
  360. package/dist/ui/page-header.js.map +0 -1
  361. package/dist/ui/password-strength.d.ts +0 -21
  362. package/dist/ui/password-strength.d.ts.map +0 -1
  363. package/dist/ui/password-strength.js.map +0 -1
  364. package/dist/ui/popover.d.ts +0 -30
  365. package/dist/ui/popover.d.ts.map +0 -1
  366. package/dist/ui/popover.js.map +0 -1
  367. package/dist/ui/progress.d.ts +0 -17
  368. package/dist/ui/progress.d.ts.map +0 -1
  369. package/dist/ui/progress.js.map +0 -1
  370. package/dist/ui/radio-group.d.ts +0 -15
  371. package/dist/ui/radio-group.d.ts.map +0 -1
  372. package/dist/ui/radio-group.js.map +0 -1
  373. package/dist/ui/select.d.ts +0 -84
  374. package/dist/ui/select.d.ts.map +0 -1
  375. package/dist/ui/select.js.map +0 -1
  376. package/dist/ui/separator.d.ts +0 -16
  377. package/dist/ui/separator.d.ts.map +0 -1
  378. package/dist/ui/separator.js.map +0 -1
  379. package/dist/ui/sheet.d.ts +0 -5
  380. package/dist/ui/sheet.d.ts.map +0 -1
  381. package/dist/ui/sheet.js.map +0 -1
  382. package/dist/ui/sidebar.d.ts +0 -5
  383. package/dist/ui/sidebar.d.ts.map +0 -1
  384. package/dist/ui/sidebar.js.map +0 -1
  385. package/dist/ui/skeleton.d.ts +0 -12
  386. package/dist/ui/skeleton.d.ts.map +0 -1
  387. package/dist/ui/skeleton.js.map +0 -1
  388. package/dist/ui/stack.d.ts +0 -77
  389. package/dist/ui/stack.d.ts.map +0 -1
  390. package/dist/ui/stack.js.map +0 -1
  391. package/dist/ui/stepper.d.ts +0 -23
  392. package/dist/ui/stepper.d.ts.map +0 -1
  393. package/dist/ui/stepper.js.map +0 -1
  394. package/dist/ui/switch.d.ts +0 -15
  395. package/dist/ui/switch.d.ts.map +0 -1
  396. package/dist/ui/switch.js.map +0 -1
  397. package/dist/ui/table.d.ts +0 -51
  398. package/dist/ui/table.d.ts.map +0 -1
  399. package/dist/ui/table.js.map +0 -1
  400. package/dist/ui/tabs.d.ts +0 -33
  401. package/dist/ui/tabs.d.ts.map +0 -1
  402. package/dist/ui/tabs.js.map +0 -1
  403. package/dist/ui/text.d.ts +0 -21
  404. package/dist/ui/text.d.ts.map +0 -1
  405. package/dist/ui/text.js.map +0 -1
  406. package/dist/ui/textarea.d.ts +0 -10
  407. package/dist/ui/textarea.d.ts.map +0 -1
  408. package/dist/ui/textarea.js.map +0 -1
  409. package/dist/ui/time-picker.d.ts +0 -22
  410. package/dist/ui/time-picker.d.ts.map +0 -1
  411. package/dist/ui/time-picker.js.map +0 -1
  412. package/dist/ui/toggle-group.d.ts +0 -36
  413. package/dist/ui/toggle-group.d.ts.map +0 -1
  414. package/dist/ui/toggle-group.js.map +0 -1
  415. package/dist/ui/toggle.d.ts +0 -34
  416. package/dist/ui/toggle.d.ts.map +0 -1
  417. package/dist/ui/toggle.js.map +0 -1
  418. package/dist/ui/tooltip.d.ts +0 -32
  419. package/dist/ui/tooltip.d.ts.map +0 -1
  420. package/dist/ui/tooltip.js.map +0 -1
  421. package/dist/ui/typography.d.ts +0 -65
  422. package/dist/ui/typography.d.ts.map +0 -1
  423. package/dist/ui/typography.js.map +0 -1
  424. package/dist/ui/useColorScheme.d.ts +0 -12
  425. package/dist/ui/useColorScheme.d.ts.map +0 -1
  426. package/dist/ui/useColorScheme.js.map +0 -1
  427. package/dist/ui/useListState.d.ts +0 -34
  428. package/dist/ui/useListState.d.ts.map +0 -1
  429. package/dist/ui/useListState.js.map +0 -1
  430. package/dist/ui/usecases/UseCaseCard.d.ts +0 -19
  431. package/dist/ui/usecases/UseCaseCard.d.ts.map +0 -1
  432. package/dist/ui/usecases/UseCaseCard.js.map +0 -1
  433. package/dist/ui/usecases/UserStoryCard.d.ts +0 -15
  434. package/dist/ui/usecases/UserStoryCard.d.ts.map +0 -1
  435. package/dist/ui/usecases/UserStoryCard.js.map +0 -1
  436. package/dist/ui/usecases/index.d.ts +0 -3
  437. package/dist/ui/utils.d.ts +0 -7
  438. package/dist/ui/utils.d.ts.map +0 -1
  439. package/dist/ui/utils.js.map +0 -1
@@ -0,0 +1,744 @@
1
+ import { $ZodAsyncError, $ZodEncodeError, $constructor, config } from "./core.js";
2
+ import { aborted, cleanRegex, clone, defineLazy, finalizeIssue, isPlainObject, issue, prefixIssues } from "./util.js";
3
+ import { safeParse, safeParseAsync } from "./parse.js";
4
+ import { base64, base64url, cidrv4, cidrv6, cuid, cuid2, date, datetime, duration, e164, email, emoji, guid, ipv4, ipv6, ksuid, nanoid, string, time, ulid, uuid, xid } from "./regexes.js";
5
+ import { $ZodCheck, $ZodCheckStringFormat } from "./checks.js";
6
+ import { version } from "./versions.js";
7
+
8
+ //#region ../../../node_modules/zod/v4/core/schemas.js
9
+ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
10
+ var _a;
11
+ inst ?? (inst = {});
12
+ inst._zod.def = def;
13
+ inst._zod.bag = inst._zod.bag || {};
14
+ inst._zod.version = version;
15
+ const checks = [...inst._zod.def.checks ?? []];
16
+ if (inst._zod.traits.has("$ZodCheck")) checks.unshift(inst);
17
+ for (const ch of checks) for (const fn of ch._zod.onattach) fn(inst);
18
+ if (checks.length === 0) {
19
+ (_a = inst._zod).deferred ?? (_a.deferred = []);
20
+ inst._zod.deferred?.push(() => {
21
+ inst._zod.run = inst._zod.parse;
22
+ });
23
+ } else {
24
+ const runChecks = (payload, checks$1, ctx) => {
25
+ let isAborted = aborted(payload);
26
+ let asyncResult;
27
+ for (const ch of checks$1) {
28
+ if (ch._zod.def.when) {
29
+ if (!ch._zod.def.when(payload)) continue;
30
+ } else if (isAborted) continue;
31
+ const currLen = payload.issues.length;
32
+ const _ = ch._zod.check(payload);
33
+ if (_ instanceof Promise && ctx?.async === false) throw new $ZodAsyncError();
34
+ if (asyncResult || _ instanceof Promise) asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {
35
+ await _;
36
+ if (payload.issues.length === currLen) return;
37
+ if (!isAborted) isAborted = aborted(payload, currLen);
38
+ });
39
+ else {
40
+ if (payload.issues.length === currLen) continue;
41
+ if (!isAborted) isAborted = aborted(payload, currLen);
42
+ }
43
+ }
44
+ if (asyncResult) return asyncResult.then(() => {
45
+ return payload;
46
+ });
47
+ return payload;
48
+ };
49
+ const handleCanaryResult = (canary, payload, ctx) => {
50
+ if (aborted(canary)) {
51
+ canary.aborted = true;
52
+ return canary;
53
+ }
54
+ const checkResult = runChecks(payload, checks, ctx);
55
+ if (checkResult instanceof Promise) {
56
+ if (ctx.async === false) throw new $ZodAsyncError();
57
+ return checkResult.then((checkResult$1) => inst._zod.parse(checkResult$1, ctx));
58
+ }
59
+ return inst._zod.parse(checkResult, ctx);
60
+ };
61
+ inst._zod.run = (payload, ctx) => {
62
+ if (ctx.skipChecks) return inst._zod.parse(payload, ctx);
63
+ if (ctx.direction === "backward") {
64
+ const canary = inst._zod.parse({
65
+ value: payload.value,
66
+ issues: []
67
+ }, {
68
+ ...ctx,
69
+ skipChecks: true
70
+ });
71
+ if (canary instanceof Promise) return canary.then((canary$1) => {
72
+ return handleCanaryResult(canary$1, payload, ctx);
73
+ });
74
+ return handleCanaryResult(canary, payload, ctx);
75
+ }
76
+ const result = inst._zod.parse(payload, ctx);
77
+ if (result instanceof Promise) {
78
+ if (ctx.async === false) throw new $ZodAsyncError();
79
+ return result.then((result$1) => runChecks(result$1, checks, ctx));
80
+ }
81
+ return runChecks(result, checks, ctx);
82
+ };
83
+ }
84
+ inst["~standard"] = {
85
+ validate: (value) => {
86
+ try {
87
+ const r = safeParse(inst, value);
88
+ return r.success ? { value: r.data } : { issues: r.error?.issues };
89
+ } catch (_) {
90
+ return safeParseAsync(inst, value).then((r) => r.success ? { value: r.data } : { issues: r.error?.issues });
91
+ }
92
+ },
93
+ vendor: "zod",
94
+ version: 1
95
+ };
96
+ });
97
+ const $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
98
+ $ZodType.init(inst, def);
99
+ inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string(inst._zod.bag);
100
+ inst._zod.parse = (payload, _) => {
101
+ if (def.coerce) try {
102
+ payload.value = String(payload.value);
103
+ } catch (_$1) {}
104
+ if (typeof payload.value === "string") return payload;
105
+ payload.issues.push({
106
+ expected: "string",
107
+ code: "invalid_type",
108
+ input: payload.value,
109
+ inst
110
+ });
111
+ return payload;
112
+ };
113
+ });
114
+ const $ZodStringFormat = /* @__PURE__ */ $constructor("$ZodStringFormat", (inst, def) => {
115
+ $ZodCheckStringFormat.init(inst, def);
116
+ $ZodString.init(inst, def);
117
+ });
118
+ const $ZodGUID = /* @__PURE__ */ $constructor("$ZodGUID", (inst, def) => {
119
+ def.pattern ?? (def.pattern = guid);
120
+ $ZodStringFormat.init(inst, def);
121
+ });
122
+ const $ZodUUID = /* @__PURE__ */ $constructor("$ZodUUID", (inst, def) => {
123
+ if (def.version) {
124
+ const v = {
125
+ v1: 1,
126
+ v2: 2,
127
+ v3: 3,
128
+ v4: 4,
129
+ v5: 5,
130
+ v6: 6,
131
+ v7: 7,
132
+ v8: 8
133
+ }[def.version];
134
+ if (v === void 0) throw new Error(`Invalid UUID version: "${def.version}"`);
135
+ def.pattern ?? (def.pattern = uuid(v));
136
+ } else def.pattern ?? (def.pattern = uuid());
137
+ $ZodStringFormat.init(inst, def);
138
+ });
139
+ const $ZodEmail = /* @__PURE__ */ $constructor("$ZodEmail", (inst, def) => {
140
+ def.pattern ?? (def.pattern = email);
141
+ $ZodStringFormat.init(inst, def);
142
+ });
143
+ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
144
+ $ZodStringFormat.init(inst, def);
145
+ inst._zod.check = (payload) => {
146
+ try {
147
+ const trimmed = payload.value.trim();
148
+ const url = new URL(trimmed);
149
+ if (def.hostname) {
150
+ def.hostname.lastIndex = 0;
151
+ if (!def.hostname.test(url.hostname)) payload.issues.push({
152
+ code: "invalid_format",
153
+ format: "url",
154
+ note: "Invalid hostname",
155
+ pattern: def.hostname.source,
156
+ input: payload.value,
157
+ inst,
158
+ continue: !def.abort
159
+ });
160
+ }
161
+ if (def.protocol) {
162
+ def.protocol.lastIndex = 0;
163
+ if (!def.protocol.test(url.protocol.endsWith(":") ? url.protocol.slice(0, -1) : url.protocol)) payload.issues.push({
164
+ code: "invalid_format",
165
+ format: "url",
166
+ note: "Invalid protocol",
167
+ pattern: def.protocol.source,
168
+ input: payload.value,
169
+ inst,
170
+ continue: !def.abort
171
+ });
172
+ }
173
+ if (def.normalize) payload.value = url.href;
174
+ else payload.value = trimmed;
175
+ return;
176
+ } catch (_) {
177
+ payload.issues.push({
178
+ code: "invalid_format",
179
+ format: "url",
180
+ input: payload.value,
181
+ inst,
182
+ continue: !def.abort
183
+ });
184
+ }
185
+ };
186
+ });
187
+ const $ZodEmoji = /* @__PURE__ */ $constructor("$ZodEmoji", (inst, def) => {
188
+ def.pattern ?? (def.pattern = emoji());
189
+ $ZodStringFormat.init(inst, def);
190
+ });
191
+ const $ZodNanoID = /* @__PURE__ */ $constructor("$ZodNanoID", (inst, def) => {
192
+ def.pattern ?? (def.pattern = nanoid);
193
+ $ZodStringFormat.init(inst, def);
194
+ });
195
+ const $ZodCUID = /* @__PURE__ */ $constructor("$ZodCUID", (inst, def) => {
196
+ def.pattern ?? (def.pattern = cuid);
197
+ $ZodStringFormat.init(inst, def);
198
+ });
199
+ const $ZodCUID2 = /* @__PURE__ */ $constructor("$ZodCUID2", (inst, def) => {
200
+ def.pattern ?? (def.pattern = cuid2);
201
+ $ZodStringFormat.init(inst, def);
202
+ });
203
+ const $ZodULID = /* @__PURE__ */ $constructor("$ZodULID", (inst, def) => {
204
+ def.pattern ?? (def.pattern = ulid);
205
+ $ZodStringFormat.init(inst, def);
206
+ });
207
+ const $ZodXID = /* @__PURE__ */ $constructor("$ZodXID", (inst, def) => {
208
+ def.pattern ?? (def.pattern = xid);
209
+ $ZodStringFormat.init(inst, def);
210
+ });
211
+ const $ZodKSUID = /* @__PURE__ */ $constructor("$ZodKSUID", (inst, def) => {
212
+ def.pattern ?? (def.pattern = ksuid);
213
+ $ZodStringFormat.init(inst, def);
214
+ });
215
+ const $ZodISODateTime = /* @__PURE__ */ $constructor("$ZodISODateTime", (inst, def) => {
216
+ def.pattern ?? (def.pattern = datetime(def));
217
+ $ZodStringFormat.init(inst, def);
218
+ });
219
+ const $ZodISODate = /* @__PURE__ */ $constructor("$ZodISODate", (inst, def) => {
220
+ def.pattern ?? (def.pattern = date);
221
+ $ZodStringFormat.init(inst, def);
222
+ });
223
+ const $ZodISOTime = /* @__PURE__ */ $constructor("$ZodISOTime", (inst, def) => {
224
+ def.pattern ?? (def.pattern = time(def));
225
+ $ZodStringFormat.init(inst, def);
226
+ });
227
+ const $ZodISODuration = /* @__PURE__ */ $constructor("$ZodISODuration", (inst, def) => {
228
+ def.pattern ?? (def.pattern = duration);
229
+ $ZodStringFormat.init(inst, def);
230
+ });
231
+ const $ZodIPv4 = /* @__PURE__ */ $constructor("$ZodIPv4", (inst, def) => {
232
+ def.pattern ?? (def.pattern = ipv4);
233
+ $ZodStringFormat.init(inst, def);
234
+ inst._zod.bag.format = `ipv4`;
235
+ });
236
+ const $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => {
237
+ def.pattern ?? (def.pattern = ipv6);
238
+ $ZodStringFormat.init(inst, def);
239
+ inst._zod.bag.format = `ipv6`;
240
+ inst._zod.check = (payload) => {
241
+ try {
242
+ new URL(`http://[${payload.value}]`);
243
+ } catch {
244
+ payload.issues.push({
245
+ code: "invalid_format",
246
+ format: "ipv6",
247
+ input: payload.value,
248
+ inst,
249
+ continue: !def.abort
250
+ });
251
+ }
252
+ };
253
+ });
254
+ const $ZodCIDRv4 = /* @__PURE__ */ $constructor("$ZodCIDRv4", (inst, def) => {
255
+ def.pattern ?? (def.pattern = cidrv4);
256
+ $ZodStringFormat.init(inst, def);
257
+ });
258
+ const $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => {
259
+ def.pattern ?? (def.pattern = cidrv6);
260
+ $ZodStringFormat.init(inst, def);
261
+ inst._zod.check = (payload) => {
262
+ const parts = payload.value.split("/");
263
+ try {
264
+ if (parts.length !== 2) throw new Error();
265
+ const [address, prefix] = parts;
266
+ if (!prefix) throw new Error();
267
+ const prefixNum = Number(prefix);
268
+ if (`${prefixNum}` !== prefix) throw new Error();
269
+ if (prefixNum < 0 || prefixNum > 128) throw new Error();
270
+ new URL(`http://[${address}]`);
271
+ } catch {
272
+ payload.issues.push({
273
+ code: "invalid_format",
274
+ format: "cidrv6",
275
+ input: payload.value,
276
+ inst,
277
+ continue: !def.abort
278
+ });
279
+ }
280
+ };
281
+ });
282
+ function isValidBase64(data) {
283
+ if (data === "") return true;
284
+ if (data.length % 4 !== 0) return false;
285
+ try {
286
+ atob(data);
287
+ return true;
288
+ } catch {
289
+ return false;
290
+ }
291
+ }
292
+ const $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => {
293
+ def.pattern ?? (def.pattern = base64);
294
+ $ZodStringFormat.init(inst, def);
295
+ inst._zod.bag.contentEncoding = "base64";
296
+ inst._zod.check = (payload) => {
297
+ if (isValidBase64(payload.value)) return;
298
+ payload.issues.push({
299
+ code: "invalid_format",
300
+ format: "base64",
301
+ input: payload.value,
302
+ inst,
303
+ continue: !def.abort
304
+ });
305
+ };
306
+ });
307
+ function isValidBase64URL(data) {
308
+ if (!base64url.test(data)) return false;
309
+ const base64$1 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/");
310
+ return isValidBase64(base64$1.padEnd(Math.ceil(base64$1.length / 4) * 4, "="));
311
+ }
312
+ const $ZodBase64URL = /* @__PURE__ */ $constructor("$ZodBase64URL", (inst, def) => {
313
+ def.pattern ?? (def.pattern = base64url);
314
+ $ZodStringFormat.init(inst, def);
315
+ inst._zod.bag.contentEncoding = "base64url";
316
+ inst._zod.check = (payload) => {
317
+ if (isValidBase64URL(payload.value)) return;
318
+ payload.issues.push({
319
+ code: "invalid_format",
320
+ format: "base64url",
321
+ input: payload.value,
322
+ inst,
323
+ continue: !def.abort
324
+ });
325
+ };
326
+ });
327
+ const $ZodE164 = /* @__PURE__ */ $constructor("$ZodE164", (inst, def) => {
328
+ def.pattern ?? (def.pattern = e164);
329
+ $ZodStringFormat.init(inst, def);
330
+ });
331
+ function isValidJWT(token, algorithm = null) {
332
+ try {
333
+ const tokensParts = token.split(".");
334
+ if (tokensParts.length !== 3) return false;
335
+ const [header] = tokensParts;
336
+ if (!header) return false;
337
+ const parsedHeader = JSON.parse(atob(header));
338
+ if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT") return false;
339
+ if (!parsedHeader.alg) return false;
340
+ if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm)) return false;
341
+ return true;
342
+ } catch {
343
+ return false;
344
+ }
345
+ }
346
+ const $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => {
347
+ $ZodStringFormat.init(inst, def);
348
+ inst._zod.check = (payload) => {
349
+ if (isValidJWT(payload.value, def.alg)) return;
350
+ payload.issues.push({
351
+ code: "invalid_format",
352
+ format: "jwt",
353
+ input: payload.value,
354
+ inst,
355
+ continue: !def.abort
356
+ });
357
+ };
358
+ });
359
+ function handleArrayResult(result, final, index) {
360
+ if (result.issues.length) final.issues.push(...prefixIssues(index, result.issues));
361
+ final.value[index] = result.value;
362
+ }
363
+ const $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
364
+ $ZodType.init(inst, def);
365
+ inst._zod.parse = (payload, ctx) => {
366
+ const input = payload.value;
367
+ if (!Array.isArray(input)) {
368
+ payload.issues.push({
369
+ expected: "array",
370
+ code: "invalid_type",
371
+ input,
372
+ inst
373
+ });
374
+ return payload;
375
+ }
376
+ payload.value = Array(input.length);
377
+ const proms = [];
378
+ for (let i = 0; i < input.length; i++) {
379
+ const item = input[i];
380
+ const result = def.element._zod.run({
381
+ value: item,
382
+ issues: []
383
+ }, ctx);
384
+ if (result instanceof Promise) proms.push(result.then((result$1) => handleArrayResult(result$1, payload, i)));
385
+ else handleArrayResult(result, payload, i);
386
+ }
387
+ if (proms.length) return Promise.all(proms).then(() => payload);
388
+ return payload;
389
+ };
390
+ });
391
+ function handleUnionResults(results, final, inst, ctx) {
392
+ for (const result of results) if (result.issues.length === 0) {
393
+ final.value = result.value;
394
+ return final;
395
+ }
396
+ const nonaborted = results.filter((r) => !aborted(r));
397
+ if (nonaborted.length === 1) {
398
+ final.value = nonaborted[0].value;
399
+ return nonaborted[0];
400
+ }
401
+ final.issues.push({
402
+ code: "invalid_union",
403
+ input: final.value,
404
+ inst,
405
+ errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
406
+ });
407
+ return final;
408
+ }
409
+ const $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
410
+ $ZodType.init(inst, def);
411
+ defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0);
412
+ defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0);
413
+ defineLazy(inst._zod, "values", () => {
414
+ if (def.options.every((o) => o._zod.values)) return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));
415
+ });
416
+ defineLazy(inst._zod, "pattern", () => {
417
+ if (def.options.every((o) => o._zod.pattern)) {
418
+ const patterns = def.options.map((o) => o._zod.pattern);
419
+ return /* @__PURE__ */ new RegExp(`^(${patterns.map((p) => cleanRegex(p.source)).join("|")})$`);
420
+ }
421
+ });
422
+ const single = def.options.length === 1;
423
+ const first = def.options[0]._zod.run;
424
+ inst._zod.parse = (payload, ctx) => {
425
+ if (single) return first(payload, ctx);
426
+ let async = false;
427
+ const results = [];
428
+ for (const option of def.options) {
429
+ const result = option._zod.run({
430
+ value: payload.value,
431
+ issues: []
432
+ }, ctx);
433
+ if (result instanceof Promise) {
434
+ results.push(result);
435
+ async = true;
436
+ } else {
437
+ if (result.issues.length === 0) return result;
438
+ results.push(result);
439
+ }
440
+ }
441
+ if (!async) return handleUnionResults(results, payload, inst, ctx);
442
+ return Promise.all(results).then((results$1) => {
443
+ return handleUnionResults(results$1, payload, inst, ctx);
444
+ });
445
+ };
446
+ });
447
+ const $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
448
+ $ZodType.init(inst, def);
449
+ inst._zod.parse = (payload, ctx) => {
450
+ const input = payload.value;
451
+ const left = def.left._zod.run({
452
+ value: input,
453
+ issues: []
454
+ }, ctx);
455
+ const right = def.right._zod.run({
456
+ value: input,
457
+ issues: []
458
+ }, ctx);
459
+ if (left instanceof Promise || right instanceof Promise) return Promise.all([left, right]).then(([left$1, right$1]) => {
460
+ return handleIntersectionResults(payload, left$1, right$1);
461
+ });
462
+ return handleIntersectionResults(payload, left, right);
463
+ };
464
+ });
465
+ function mergeValues(a, b) {
466
+ if (a === b) return {
467
+ valid: true,
468
+ data: a
469
+ };
470
+ if (a instanceof Date && b instanceof Date && +a === +b) return {
471
+ valid: true,
472
+ data: a
473
+ };
474
+ if (isPlainObject(a) && isPlainObject(b)) {
475
+ const bKeys = Object.keys(b);
476
+ const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
477
+ const newObj = {
478
+ ...a,
479
+ ...b
480
+ };
481
+ for (const key of sharedKeys) {
482
+ const sharedValue = mergeValues(a[key], b[key]);
483
+ if (!sharedValue.valid) return {
484
+ valid: false,
485
+ mergeErrorPath: [key, ...sharedValue.mergeErrorPath]
486
+ };
487
+ newObj[key] = sharedValue.data;
488
+ }
489
+ return {
490
+ valid: true,
491
+ data: newObj
492
+ };
493
+ }
494
+ if (Array.isArray(a) && Array.isArray(b)) {
495
+ if (a.length !== b.length) return {
496
+ valid: false,
497
+ mergeErrorPath: []
498
+ };
499
+ const newArray = [];
500
+ for (let index = 0; index < a.length; index++) {
501
+ const itemA = a[index];
502
+ const itemB = b[index];
503
+ const sharedValue = mergeValues(itemA, itemB);
504
+ if (!sharedValue.valid) return {
505
+ valid: false,
506
+ mergeErrorPath: [index, ...sharedValue.mergeErrorPath]
507
+ };
508
+ newArray.push(sharedValue.data);
509
+ }
510
+ return {
511
+ valid: true,
512
+ data: newArray
513
+ };
514
+ }
515
+ return {
516
+ valid: false,
517
+ mergeErrorPath: []
518
+ };
519
+ }
520
+ function handleIntersectionResults(result, left, right) {
521
+ if (left.issues.length) result.issues.push(...left.issues);
522
+ if (right.issues.length) result.issues.push(...right.issues);
523
+ if (aborted(result)) return result;
524
+ const merged = mergeValues(left.value, right.value);
525
+ if (!merged.valid) throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(merged.mergeErrorPath)}`);
526
+ result.value = merged.data;
527
+ return result;
528
+ }
529
+ const $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
530
+ $ZodType.init(inst, def);
531
+ inst._zod.parse = (payload, ctx) => {
532
+ if (ctx.direction === "backward") throw new $ZodEncodeError(inst.constructor.name);
533
+ const _out = def.transform(payload.value, payload);
534
+ if (ctx.async) return (_out instanceof Promise ? _out : Promise.resolve(_out)).then((output) => {
535
+ payload.value = output;
536
+ return payload;
537
+ });
538
+ if (_out instanceof Promise) throw new $ZodAsyncError();
539
+ payload.value = _out;
540
+ return payload;
541
+ };
542
+ });
543
+ function handleOptionalResult(result, input) {
544
+ if (result.issues.length && input === void 0) return {
545
+ issues: [],
546
+ value: void 0
547
+ };
548
+ return result;
549
+ }
550
+ const $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
551
+ $ZodType.init(inst, def);
552
+ inst._zod.optin = "optional";
553
+ inst._zod.optout = "optional";
554
+ defineLazy(inst._zod, "values", () => {
555
+ return def.innerType._zod.values ? new Set([...def.innerType._zod.values, void 0]) : void 0;
556
+ });
557
+ defineLazy(inst._zod, "pattern", () => {
558
+ const pattern = def.innerType._zod.pattern;
559
+ return pattern ? /* @__PURE__ */ new RegExp(`^(${cleanRegex(pattern.source)})?$`) : void 0;
560
+ });
561
+ inst._zod.parse = (payload, ctx) => {
562
+ if (def.innerType._zod.optin === "optional") {
563
+ const result = def.innerType._zod.run(payload, ctx);
564
+ if (result instanceof Promise) return result.then((r) => handleOptionalResult(r, payload.value));
565
+ return handleOptionalResult(result, payload.value);
566
+ }
567
+ if (payload.value === void 0) return payload;
568
+ return def.innerType._zod.run(payload, ctx);
569
+ };
570
+ });
571
+ const $ZodNullable = /* @__PURE__ */ $constructor("$ZodNullable", (inst, def) => {
572
+ $ZodType.init(inst, def);
573
+ defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
574
+ defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
575
+ defineLazy(inst._zod, "pattern", () => {
576
+ const pattern = def.innerType._zod.pattern;
577
+ return pattern ? /* @__PURE__ */ new RegExp(`^(${cleanRegex(pattern.source)}|null)$`) : void 0;
578
+ });
579
+ defineLazy(inst._zod, "values", () => {
580
+ return def.innerType._zod.values ? new Set([...def.innerType._zod.values, null]) : void 0;
581
+ });
582
+ inst._zod.parse = (payload, ctx) => {
583
+ if (payload.value === null) return payload;
584
+ return def.innerType._zod.run(payload, ctx);
585
+ };
586
+ });
587
+ const $ZodDefault = /* @__PURE__ */ $constructor("$ZodDefault", (inst, def) => {
588
+ $ZodType.init(inst, def);
589
+ inst._zod.optin = "optional";
590
+ defineLazy(inst._zod, "values", () => def.innerType._zod.values);
591
+ inst._zod.parse = (payload, ctx) => {
592
+ if (ctx.direction === "backward") return def.innerType._zod.run(payload, ctx);
593
+ if (payload.value === void 0) {
594
+ payload.value = def.defaultValue;
595
+ /**
596
+ * $ZodDefault returns the default value immediately in forward direction.
597
+ * It doesn't pass the default value into the validator ("prefault"). There's no reason to pass the default value through validation. The validity of the default is enforced by TypeScript statically. Otherwise, it's the responsibility of the user to ensure the default is valid. In the case of pipes with divergent in/out types, you can specify the default on the `in` schema of your ZodPipe to set a "prefault" for the pipe. */
598
+ return payload;
599
+ }
600
+ const result = def.innerType._zod.run(payload, ctx);
601
+ if (result instanceof Promise) return result.then((result$1) => handleDefaultResult(result$1, def));
602
+ return handleDefaultResult(result, def);
603
+ };
604
+ });
605
+ function handleDefaultResult(payload, def) {
606
+ if (payload.value === void 0) payload.value = def.defaultValue;
607
+ return payload;
608
+ }
609
+ const $ZodPrefault = /* @__PURE__ */ $constructor("$ZodPrefault", (inst, def) => {
610
+ $ZodType.init(inst, def);
611
+ inst._zod.optin = "optional";
612
+ defineLazy(inst._zod, "values", () => def.innerType._zod.values);
613
+ inst._zod.parse = (payload, ctx) => {
614
+ if (ctx.direction === "backward") return def.innerType._zod.run(payload, ctx);
615
+ if (payload.value === void 0) payload.value = def.defaultValue;
616
+ return def.innerType._zod.run(payload, ctx);
617
+ };
618
+ });
619
+ const $ZodNonOptional = /* @__PURE__ */ $constructor("$ZodNonOptional", (inst, def) => {
620
+ $ZodType.init(inst, def);
621
+ defineLazy(inst._zod, "values", () => {
622
+ const v = def.innerType._zod.values;
623
+ return v ? new Set([...v].filter((x) => x !== void 0)) : void 0;
624
+ });
625
+ inst._zod.parse = (payload, ctx) => {
626
+ const result = def.innerType._zod.run(payload, ctx);
627
+ if (result instanceof Promise) return result.then((result$1) => handleNonOptionalResult(result$1, inst));
628
+ return handleNonOptionalResult(result, inst);
629
+ };
630
+ });
631
+ function handleNonOptionalResult(payload, inst) {
632
+ if (!payload.issues.length && payload.value === void 0) payload.issues.push({
633
+ code: "invalid_type",
634
+ expected: "nonoptional",
635
+ input: payload.value,
636
+ inst
637
+ });
638
+ return payload;
639
+ }
640
+ const $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
641
+ $ZodType.init(inst, def);
642
+ defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
643
+ defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
644
+ defineLazy(inst._zod, "values", () => def.innerType._zod.values);
645
+ inst._zod.parse = (payload, ctx) => {
646
+ if (ctx.direction === "backward") return def.innerType._zod.run(payload, ctx);
647
+ const result = def.innerType._zod.run(payload, ctx);
648
+ if (result instanceof Promise) return result.then((result$1) => {
649
+ payload.value = result$1.value;
650
+ if (result$1.issues.length) {
651
+ payload.value = def.catchValue({
652
+ ...payload,
653
+ error: { issues: result$1.issues.map((iss) => finalizeIssue(iss, ctx, config())) },
654
+ input: payload.value
655
+ });
656
+ payload.issues = [];
657
+ }
658
+ return payload;
659
+ });
660
+ payload.value = result.value;
661
+ if (result.issues.length) {
662
+ payload.value = def.catchValue({
663
+ ...payload,
664
+ error: { issues: result.issues.map((iss) => finalizeIssue(iss, ctx, config())) },
665
+ input: payload.value
666
+ });
667
+ payload.issues = [];
668
+ }
669
+ return payload;
670
+ };
671
+ });
672
+ const $ZodPipe = /* @__PURE__ */ $constructor("$ZodPipe", (inst, def) => {
673
+ $ZodType.init(inst, def);
674
+ defineLazy(inst._zod, "values", () => def.in._zod.values);
675
+ defineLazy(inst._zod, "optin", () => def.in._zod.optin);
676
+ defineLazy(inst._zod, "optout", () => def.out._zod.optout);
677
+ defineLazy(inst._zod, "propValues", () => def.in._zod.propValues);
678
+ inst._zod.parse = (payload, ctx) => {
679
+ if (ctx.direction === "backward") {
680
+ const right = def.out._zod.run(payload, ctx);
681
+ if (right instanceof Promise) return right.then((right$1) => handlePipeResult(right$1, def.in, ctx));
682
+ return handlePipeResult(right, def.in, ctx);
683
+ }
684
+ const left = def.in._zod.run(payload, ctx);
685
+ if (left instanceof Promise) return left.then((left$1) => handlePipeResult(left$1, def.out, ctx));
686
+ return handlePipeResult(left, def.out, ctx);
687
+ };
688
+ });
689
+ function handlePipeResult(left, next, ctx) {
690
+ if (left.issues.length) {
691
+ left.aborted = true;
692
+ return left;
693
+ }
694
+ return next._zod.run({
695
+ value: left.value,
696
+ issues: left.issues
697
+ }, ctx);
698
+ }
699
+ const $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
700
+ $ZodType.init(inst, def);
701
+ defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
702
+ defineLazy(inst._zod, "values", () => def.innerType._zod.values);
703
+ defineLazy(inst._zod, "optin", () => def.innerType?._zod?.optin);
704
+ defineLazy(inst._zod, "optout", () => def.innerType?._zod?.optout);
705
+ inst._zod.parse = (payload, ctx) => {
706
+ if (ctx.direction === "backward") return def.innerType._zod.run(payload, ctx);
707
+ const result = def.innerType._zod.run(payload, ctx);
708
+ if (result instanceof Promise) return result.then(handleReadonlyResult);
709
+ return handleReadonlyResult(result);
710
+ };
711
+ });
712
+ function handleReadonlyResult(payload) {
713
+ payload.value = Object.freeze(payload.value);
714
+ return payload;
715
+ }
716
+ const $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
717
+ $ZodCheck.init(inst, def);
718
+ $ZodType.init(inst, def);
719
+ inst._zod.parse = (payload, _) => {
720
+ return payload;
721
+ };
722
+ inst._zod.check = (payload) => {
723
+ const input = payload.value;
724
+ const r = def.fn(input);
725
+ if (r instanceof Promise) return r.then((r$1) => handleRefineResult(r$1, payload, input, inst));
726
+ handleRefineResult(r, payload, input, inst);
727
+ };
728
+ });
729
+ function handleRefineResult(result, payload, input, inst) {
730
+ if (!result) {
731
+ const _iss = {
732
+ code: "custom",
733
+ input,
734
+ inst,
735
+ path: [...inst._zod.def.path ?? []],
736
+ continue: !inst._zod.def.abort
737
+ };
738
+ if (inst._zod.def.params) _iss.params = inst._zod.def.params;
739
+ payload.issues.push(issue(_iss));
740
+ }
741
+ }
742
+
743
+ //#endregion
744
+ export { $ZodArray, $ZodBase64, $ZodBase64URL, $ZodCIDRv4, $ZodCIDRv6, $ZodCUID, $ZodCUID2, $ZodCatch, $ZodCustom, $ZodDefault, $ZodE164, $ZodEmail, $ZodEmoji, $ZodGUID, $ZodIPv4, $ZodIPv6, $ZodISODate, $ZodISODateTime, $ZodISODuration, $ZodISOTime, $ZodIntersection, $ZodJWT, $ZodKSUID, $ZodNanoID, $ZodNonOptional, $ZodNullable, $ZodOptional, $ZodPipe, $ZodPrefault, $ZodReadonly, $ZodString, $ZodStringFormat, $ZodTransform, $ZodType, $ZodULID, $ZodURL, $ZodUUID, $ZodUnion, $ZodXID };