@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.
- package/README.md +5 -0
- package/dist/-core/src/utils.js +10 -0
- package/dist/_virtual/rolldown_runtime.js +33 -0
- package/dist/index.js +1 -2
- package/dist/node_modules/@hookform/resolvers/dist/resolvers.js +34 -0
- package/dist/node_modules/@hookform/resolvers/zod/dist/zod.js +118 -0
- package/dist/node_modules/@swc/helpers/cjs/_interop_require_default.js +14 -0
- package/dist/node_modules/@swc/helpers/cjs/_interop_require_wildcard.js +35 -0
- package/dist/node_modules/lucide-react/dist/esm/Icon.js +25 -0
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +24 -0
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +21 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-left.js +20 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-right.js +20 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/ellipsis.js +33 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/funnel.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/house.js +20 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/loader-circle.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/plus.js +20 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/refresh-ccw.js +31 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/refresh-cw.js +31 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/search.js +22 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/triangle-alert.js +27 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/x.js +20 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js +22 -0
- package/dist/node_modules/next/dist/client/add-base-path.js +30 -0
- package/dist/node_modules/next/dist/client/add-locale.js +29 -0
- package/dist/node_modules/next/dist/client/detect-domain-locale.js +26 -0
- package/dist/node_modules/next/dist/client/get-domain-locale.js +41 -0
- package/dist/node_modules/next/dist/client/has-base-path.js +28 -0
- package/dist/node_modules/next/dist/client/link.js +311 -0
- package/dist/node_modules/next/dist/client/normalize-locale-path.js +30 -0
- package/dist/node_modules/next/dist/client/normalize-trailing-slash.js +34 -0
- package/dist/node_modules/next/dist/client/request-idle-callback.js +44 -0
- package/dist/node_modules/next/dist/client/resolve-href.js +86 -0
- package/dist/node_modules/next/dist/client/use-intersection.js +104 -0
- package/dist/node_modules/next/dist/client/use-merged-ref.js +56 -0
- package/dist/node_modules/next/dist/compiled/path-to-regexp/index.js +372 -0
- package/dist/node_modules/next/dist/lib/constants.js +316 -0
- package/dist/node_modules/next/dist/lib/route-pattern-normalizer.js +69 -0
- package/dist/node_modules/next/dist/shared/lib/escape-regexp.js +23 -0
- package/dist/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js +22 -0
- package/dist/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js +42 -0
- package/dist/node_modules/next/dist/shared/lib/invariant-error.js +23 -0
- package/dist/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js +23 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/add-locale.js +30 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js +24 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/app-paths.js +41 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/format-url.js +78 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js +151 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/get-segment-param.js +77 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/index.js +32 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/interception-routes.js +92 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/interpolate-as.js +41 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/is-dynamic.js +26 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/is-local-url.js +31 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/omit.js +24 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/parse-loader-tree.js +33 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/parse-path.js +36 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js +24 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/querystring.js +56 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js +26 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/route-match-utils.js +94 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/route-matcher.js +46 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/route-regex.js +203 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/sorted-routes.js +167 -0
- package/dist/node_modules/next/dist/shared/lib/router-context.shared-runtime.js +20 -0
- package/dist/node_modules/next/dist/shared/lib/segment.js +80 -0
- package/dist/node_modules/next/dist/shared/lib/utils/error-once.js +25 -0
- package/dist/node_modules/next/dist/shared/lib/utils.js +172 -0
- package/dist/node_modules/next/link.js +12 -0
- package/dist/node_modules/react-hook-form/dist/index.esm.js +2074 -0
- package/dist/node_modules/zod/v4/classic/errors.js +29 -0
- package/dist/node_modules/zod/v4/classic/iso.js +37 -0
- package/dist/node_modules/zod/v4/classic/parse.js +19 -0
- package/dist/node_modules/zod/v4/classic/schemas.js +418 -0
- package/dist/node_modules/zod/v4/core/api.js +404 -0
- package/dist/node_modules/zod/v4/core/checks.js +225 -0
- package/dist/node_modules/zod/v4/core/core.js +61 -0
- package/dist/node_modules/zod/v4/core/errors.js +62 -0
- package/dist/node_modules/zod/v4/core/json-schema-processors.js +148 -0
- package/dist/node_modules/zod/v4/core/parse.js +109 -0
- package/dist/node_modules/zod/v4/core/regexes.js +57 -0
- package/dist/node_modules/zod/v4/core/registries.js +52 -0
- package/dist/node_modules/zod/v4/core/schemas.js +744 -0
- package/dist/node_modules/zod/v4/core/to-json-schema.js +260 -0
- package/dist/node_modules/zod/v4/core/util.js +155 -0
- package/dist/node_modules/zod/v4/core/versions.js +9 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/accordion.js +2 -3
- package/dist/ui/alert-dialog.js +2 -3
- package/dist/ui/alert.js +2 -3
- package/dist/ui/aspect-ratio.js +1 -2
- package/dist/ui/atoms/FilterSelect/FilterSelect.js +1 -2
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.js +4 -5
- package/dist/ui/atoms/Pagination/Pagination.js +5 -3
- package/dist/ui/atoms/SearchInput/SearchInput.js +3 -3
- package/dist/ui/avatar.js +2 -3
- package/dist/ui/badge.js +2 -3
- package/dist/ui/breadcrumb.js +5 -5
- package/dist/ui/button.js +2 -3
- package/dist/ui/card.js +2 -3
- package/dist/ui/carousel.js +1 -2
- package/dist/ui/checkbox.js +2 -3
- package/dist/ui/collapsible.js +1 -2
- package/dist/ui/command.js +1 -2
- package/dist/ui/context-menu.js +2 -3
- package/dist/ui/date-picker.js +2 -3
- package/dist/ui/date-range-picker.js +2 -3
- package/dist/ui/datetime-picker.js +1 -2
- package/dist/ui/dialog.js +2 -3
- package/dist/ui/dropdown-menu.js +2 -3
- package/dist/ui/empty-state.js +2 -3
- package/dist/ui/empty.js +2 -3
- package/dist/ui/fab.js +2 -3
- package/dist/ui/field.js +2 -3
- package/dist/ui/form.js +2 -3
- package/dist/ui/hover-card.js +2 -3
- package/dist/ui/icons/Check.js +1 -2
- package/dist/ui/icons/ChevronDown.js +1 -2
- package/dist/ui/icons/ChevronRight.js +1 -2
- package/dist/ui/icons/ChevronUp.js +1 -2
- package/dist/ui/icons/CircleUser.js +1 -2
- package/dist/ui/icons/Info.js +1 -2
- package/dist/ui/icons/Key.js +1 -2
- package/dist/ui/icons/MoonStar.js +1 -2
- package/dist/ui/icons/Sun.js +1 -2
- package/dist/ui/icons/X.js +1 -2
- package/dist/ui/icons/iconWithClassName.js +1 -2
- package/dist/ui/input.js +2 -3
- package/dist/ui/label.js +2 -3
- package/dist/ui/link.js +2 -3
- package/dist/ui/loading-button.js +1 -2
- package/dist/ui/loading-overlay.js +1 -2
- package/dist/ui/loading-screen.js +1 -2
- package/dist/ui/marketing/FeatureGrid.js +1 -2
- package/dist/ui/marketing/Hero.js +2 -3
- package/dist/ui/marketing/PricingTable.js +2 -3
- package/dist/ui/menubar.js +2 -3
- package/dist/ui/molecules/Autocomplete/index.js +1 -2
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.js +5 -4
- package/dist/ui/molecules/SkeletonList.js +1 -2
- package/dist/ui/nativewind-env.d.js +0 -0
- package/dist/ui/navigation-menu.js +2 -3
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.js +6 -5
- package/dist/ui/organisms/ListPage/ListPage.js +13 -9
- package/dist/ui/page-header.js +2 -3
- package/dist/ui/password-strength.js +1 -2
- package/dist/ui/popover.js +2 -3
- package/dist/ui/progress.js +2 -3
- package/dist/ui/radio-group.js +2 -3
- package/dist/ui/select.js +2 -3
- package/dist/ui/separator.js +2 -3
- package/dist/ui/sheet.js +1 -2
- package/dist/ui/sidebar.js +1 -2
- package/dist/ui/skeleton.js +2 -3
- package/dist/ui/stack.js +2 -3
- package/dist/ui/stepper.js +2 -3
- package/dist/ui/switch.js +2 -3
- package/dist/ui/table.js +2 -3
- package/dist/ui/tabs.js +2 -3
- package/dist/ui/text.js +2 -3
- package/dist/ui/textarea.js +2 -3
- package/dist/ui/time-picker.js +2 -3
- package/dist/ui/toggle-group.js +2 -3
- package/dist/ui/toggle.js +2 -3
- package/dist/ui/tooltip.js +2 -3
- package/dist/ui/typography.js +2 -3
- package/dist/ui/useColorScheme.js +1 -2
- package/dist/ui/useListState.js +1 -2
- package/dist/ui/usecases/UseCaseCard.js +1 -2
- package/dist/ui/usecases/UserStoryCard.js +1 -2
- package/dist/ui/utils.js +1 -2
- package/package.json +204 -114
- package/dist/index.d.ts +0 -5
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/ui/accordion.d.ts +0 -36
- package/dist/ui/accordion.d.ts.map +0 -1
- package/dist/ui/accordion.js.map +0 -1
- package/dist/ui/alert-dialog.d.ts +0 -72
- package/dist/ui/alert-dialog.d.ts.map +0 -1
- package/dist/ui/alert-dialog.js.map +0 -1
- package/dist/ui/alert.d.ts +0 -37
- package/dist/ui/alert.d.ts.map +0 -1
- package/dist/ui/alert.js.map +0 -1
- package/dist/ui/aspect-ratio.d.ts +0 -12
- package/dist/ui/aspect-ratio.d.ts.map +0 -1
- package/dist/ui/aspect-ratio.js.map +0 -1
- package/dist/ui/atoms/FilterSelect/FilterSelect.d.ts +0 -8
- package/dist/ui/atoms/FilterSelect/FilterSelect.d.ts.map +0 -1
- package/dist/ui/atoms/FilterSelect/FilterSelect.js.map +0 -1
- package/dist/ui/atoms/FilterSelect/index.d.ts +0 -3
- package/dist/ui/atoms/FilterSelect/types.d.ts +0 -19
- package/dist/ui/atoms/FilterSelect/types.d.ts.map +0 -1
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.d.ts +0 -23
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.d.ts.map +0 -1
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.js.map +0 -1
- package/dist/ui/atoms/LoadingSpinner/index.d.ts +0 -2
- package/dist/ui/atoms/Pagination/Pagination.d.ts +0 -8
- package/dist/ui/atoms/Pagination/Pagination.d.ts.map +0 -1
- package/dist/ui/atoms/Pagination/Pagination.js.map +0 -1
- package/dist/ui/atoms/Pagination/index.d.ts +0 -3
- package/dist/ui/atoms/Pagination/types.d.ts +0 -16
- package/dist/ui/atoms/Pagination/types.d.ts.map +0 -1
- package/dist/ui/atoms/SearchInput/SearchInput.d.ts +0 -8
- package/dist/ui/atoms/SearchInput/SearchInput.d.ts.map +0 -1
- package/dist/ui/atoms/SearchInput/SearchInput.js.map +0 -1
- package/dist/ui/atoms/SearchInput/index.d.ts +0 -3
- package/dist/ui/atoms/SearchInput/types.d.ts +0 -13
- package/dist/ui/atoms/SearchInput/types.d.ts.map +0 -1
- package/dist/ui/avatar.d.ts +0 -28
- package/dist/ui/avatar.d.ts.map +0 -1
- package/dist/ui/avatar.js.map +0 -1
- package/dist/ui/badge.d.ts +0 -22
- package/dist/ui/badge.d.ts.map +0 -1
- package/dist/ui/badge.js.map +0 -1
- package/dist/ui/breadcrumb.d.ts +0 -39
- package/dist/ui/breadcrumb.d.ts.map +0 -1
- package/dist/ui/breadcrumb.js.map +0 -1
- package/dist/ui/button.d.ts +0 -26
- package/dist/ui/button.d.ts.map +0 -1
- package/dist/ui/button.js.map +0 -1
- package/dist/ui/card.d.ts +0 -44
- package/dist/ui/card.d.ts.map +0 -1
- package/dist/ui/card.js.map +0 -1
- package/dist/ui/carousel.d.ts +0 -5
- package/dist/ui/carousel.d.ts.map +0 -1
- package/dist/ui/carousel.js.map +0 -1
- package/dist/ui/checkbox.d.ts +0 -17
- package/dist/ui/checkbox.d.ts.map +0 -1
- package/dist/ui/checkbox.js.map +0 -1
- package/dist/ui/collapsible.d.ts +0 -25
- package/dist/ui/collapsible.d.ts.map +0 -1
- package/dist/ui/collapsible.js.map +0 -1
- package/dist/ui/command.d.ts +0 -5
- package/dist/ui/command.d.ts.map +0 -1
- package/dist/ui/command.js.map +0 -1
- package/dist/ui/context-menu.d.ts +0 -110
- package/dist/ui/context-menu.d.ts.map +0 -1
- package/dist/ui/context-menu.js.map +0 -1
- package/dist/ui/date-picker.d.ts +0 -24
- package/dist/ui/date-picker.d.ts.map +0 -1
- package/dist/ui/date-picker.js.map +0 -1
- package/dist/ui/date-range-picker.d.ts +0 -31
- package/dist/ui/date-range-picker.d.ts.map +0 -1
- package/dist/ui/date-range-picker.js.map +0 -1
- package/dist/ui/datetime-picker.d.ts +0 -28
- package/dist/ui/datetime-picker.d.ts.map +0 -1
- package/dist/ui/datetime-picker.js.map +0 -1
- package/dist/ui/dialog.d.ts +0 -69
- package/dist/ui/dialog.d.ts.map +0 -1
- package/dist/ui/dialog.js.map +0 -1
- package/dist/ui/dropdown-menu.d.ts +0 -112
- package/dist/ui/dropdown-menu.d.ts.map +0 -1
- package/dist/ui/dropdown-menu.js.map +0 -1
- package/dist/ui/empty-state.d.ts +0 -29
- package/dist/ui/empty-state.d.ts.map +0 -1
- package/dist/ui/empty-state.js.map +0 -1
- package/dist/ui/empty.d.ts +0 -37
- package/dist/ui/empty.d.ts.map +0 -1
- package/dist/ui/empty.js.map +0 -1
- package/dist/ui/fab.d.ts +0 -36
- package/dist/ui/fab.d.ts.map +0 -1
- package/dist/ui/fab.js.map +0 -1
- package/dist/ui/field.d.ts +0 -67
- package/dist/ui/field.d.ts.map +0 -1
- package/dist/ui/field.js.map +0 -1
- package/dist/ui/form.d.ts +0 -50
- package/dist/ui/form.d.ts.map +0 -1
- package/dist/ui/form.js.map +0 -1
- package/dist/ui/hover-card.d.ts +0 -30
- package/dist/ui/hover-card.d.ts.map +0 -1
- package/dist/ui/hover-card.js.map +0 -1
- package/dist/ui/icons/Check.d.ts +0 -2
- package/dist/ui/icons/Check.js.map +0 -1
- package/dist/ui/icons/ChevronDown.d.ts +0 -2
- package/dist/ui/icons/ChevronDown.js.map +0 -1
- package/dist/ui/icons/ChevronRight.d.ts +0 -2
- package/dist/ui/icons/ChevronRight.js.map +0 -1
- package/dist/ui/icons/ChevronUp.d.ts +0 -2
- package/dist/ui/icons/ChevronUp.js.map +0 -1
- package/dist/ui/icons/CircleUser.d.ts +0 -2
- package/dist/ui/icons/CircleUser.js.map +0 -1
- package/dist/ui/icons/Info.d.ts +0 -2
- package/dist/ui/icons/Info.js.map +0 -1
- package/dist/ui/icons/Key.d.ts +0 -2
- package/dist/ui/icons/Key.js.map +0 -1
- package/dist/ui/icons/MoonStar.d.ts +0 -2
- package/dist/ui/icons/MoonStar.js.map +0 -1
- package/dist/ui/icons/Sun.d.ts +0 -2
- package/dist/ui/icons/Sun.js.map +0 -1
- package/dist/ui/icons/X.d.ts +0 -2
- package/dist/ui/icons/X.js.map +0 -1
- package/dist/ui/icons/iconWithClassName.d.ts +0 -7
- package/dist/ui/icons/iconWithClassName.d.ts.map +0 -1
- package/dist/ui/icons/iconWithClassName.js.map +0 -1
- package/dist/ui/input.d.ts +0 -15
- package/dist/ui/input.d.ts.map +0 -1
- package/dist/ui/input.js.map +0 -1
- package/dist/ui/label.d.ts +0 -16
- package/dist/ui/label.d.ts.map +0 -1
- package/dist/ui/label.js.map +0 -1
- package/dist/ui/link.d.ts +0 -14
- package/dist/ui/link.d.ts.map +0 -1
- package/dist/ui/link.js.map +0 -1
- package/dist/ui/loading-button.d.ts +0 -20
- package/dist/ui/loading-button.d.ts.map +0 -1
- package/dist/ui/loading-button.js.map +0 -1
- package/dist/ui/loading-overlay.d.ts +0 -16
- package/dist/ui/loading-overlay.d.ts.map +0 -1
- package/dist/ui/loading-overlay.js.map +0 -1
- package/dist/ui/loading-screen.d.ts +0 -14
- package/dist/ui/loading-screen.d.ts.map +0 -1
- package/dist/ui/loading-screen.js.map +0 -1
- package/dist/ui/marketing/FeatureGrid.d.ts +0 -21
- package/dist/ui/marketing/FeatureGrid.d.ts.map +0 -1
- package/dist/ui/marketing/FeatureGrid.js.map +0 -1
- package/dist/ui/marketing/Hero.d.ts +0 -28
- package/dist/ui/marketing/Hero.d.ts.map +0 -1
- package/dist/ui/marketing/Hero.js.map +0 -1
- package/dist/ui/marketing/PricingTable.d.ts +0 -25
- package/dist/ui/marketing/PricingTable.d.ts.map +0 -1
- package/dist/ui/marketing/PricingTable.js.map +0 -1
- package/dist/ui/marketing/index.d.ts +0 -4
- package/dist/ui/menubar.d.ts +0 -115
- package/dist/ui/menubar.d.ts.map +0 -1
- package/dist/ui/menubar.js.map +0 -1
- package/dist/ui/molecules/Autocomplete/index.d.ts +0 -5
- package/dist/ui/molecules/Autocomplete/index.d.ts.map +0 -1
- package/dist/ui/molecules/Autocomplete/index.js.map +0 -1
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.d.ts +0 -8
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.d.ts.map +0 -1
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.js.map +0 -1
- package/dist/ui/molecules/SearchAndFilter/index.d.ts +0 -3
- package/dist/ui/molecules/SearchAndFilter/types.d.ts +0 -25
- package/dist/ui/molecules/SearchAndFilter/types.d.ts.map +0 -1
- package/dist/ui/molecules/SkeletonList.d.ts +0 -16
- package/dist/ui/molecules/SkeletonList.d.ts.map +0 -1
- package/dist/ui/molecules/SkeletonList.js.map +0 -1
- package/dist/ui/nativewind-env.d.ts +0 -1
- package/dist/ui/navigation-menu.d.ts +0 -68
- package/dist/ui/navigation-menu.d.ts.map +0 -1
- package/dist/ui/navigation-menu.js.map +0 -1
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.d.ts +0 -30
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.d.ts.map +0 -1
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.js.map +0 -1
- package/dist/ui/organisms/ErrorBoundary/index.d.ts +0 -2
- package/dist/ui/organisms/ListPage/ListPage.d.ts +0 -29
- package/dist/ui/organisms/ListPage/ListPage.d.ts.map +0 -1
- package/dist/ui/organisms/ListPage/ListPage.js.map +0 -1
- package/dist/ui/organisms/ListPage/index.d.ts +0 -3
- package/dist/ui/organisms/ListPage/types.d.ts +0 -42
- package/dist/ui/organisms/ListPage/types.d.ts.map +0 -1
- package/dist/ui/page-header.d.ts +0 -27
- package/dist/ui/page-header.d.ts.map +0 -1
- package/dist/ui/page-header.js.map +0 -1
- package/dist/ui/password-strength.d.ts +0 -21
- package/dist/ui/password-strength.d.ts.map +0 -1
- package/dist/ui/password-strength.js.map +0 -1
- package/dist/ui/popover.d.ts +0 -30
- package/dist/ui/popover.d.ts.map +0 -1
- package/dist/ui/popover.js.map +0 -1
- package/dist/ui/progress.d.ts +0 -17
- package/dist/ui/progress.d.ts.map +0 -1
- package/dist/ui/progress.js.map +0 -1
- package/dist/ui/radio-group.d.ts +0 -15
- package/dist/ui/radio-group.d.ts.map +0 -1
- package/dist/ui/radio-group.js.map +0 -1
- package/dist/ui/select.d.ts +0 -84
- package/dist/ui/select.d.ts.map +0 -1
- package/dist/ui/select.js.map +0 -1
- package/dist/ui/separator.d.ts +0 -16
- package/dist/ui/separator.d.ts.map +0 -1
- package/dist/ui/separator.js.map +0 -1
- package/dist/ui/sheet.d.ts +0 -5
- package/dist/ui/sheet.d.ts.map +0 -1
- package/dist/ui/sheet.js.map +0 -1
- package/dist/ui/sidebar.d.ts +0 -5
- package/dist/ui/sidebar.d.ts.map +0 -1
- package/dist/ui/sidebar.js.map +0 -1
- package/dist/ui/skeleton.d.ts +0 -12
- package/dist/ui/skeleton.d.ts.map +0 -1
- package/dist/ui/skeleton.js.map +0 -1
- package/dist/ui/stack.d.ts +0 -77
- package/dist/ui/stack.d.ts.map +0 -1
- package/dist/ui/stack.js.map +0 -1
- package/dist/ui/stepper.d.ts +0 -23
- package/dist/ui/stepper.d.ts.map +0 -1
- package/dist/ui/stepper.js.map +0 -1
- package/dist/ui/switch.d.ts +0 -15
- package/dist/ui/switch.d.ts.map +0 -1
- package/dist/ui/switch.js.map +0 -1
- package/dist/ui/table.d.ts +0 -51
- package/dist/ui/table.d.ts.map +0 -1
- package/dist/ui/table.js.map +0 -1
- package/dist/ui/tabs.d.ts +0 -33
- package/dist/ui/tabs.d.ts.map +0 -1
- package/dist/ui/tabs.js.map +0 -1
- package/dist/ui/text.d.ts +0 -21
- package/dist/ui/text.d.ts.map +0 -1
- package/dist/ui/text.js.map +0 -1
- package/dist/ui/textarea.d.ts +0 -10
- package/dist/ui/textarea.d.ts.map +0 -1
- package/dist/ui/textarea.js.map +0 -1
- package/dist/ui/time-picker.d.ts +0 -22
- package/dist/ui/time-picker.d.ts.map +0 -1
- package/dist/ui/time-picker.js.map +0 -1
- package/dist/ui/toggle-group.d.ts +0 -36
- package/dist/ui/toggle-group.d.ts.map +0 -1
- package/dist/ui/toggle-group.js.map +0 -1
- package/dist/ui/toggle.d.ts +0 -34
- package/dist/ui/toggle.d.ts.map +0 -1
- package/dist/ui/toggle.js.map +0 -1
- package/dist/ui/tooltip.d.ts +0 -32
- package/dist/ui/tooltip.d.ts.map +0 -1
- package/dist/ui/tooltip.js.map +0 -1
- package/dist/ui/typography.d.ts +0 -65
- package/dist/ui/typography.d.ts.map +0 -1
- package/dist/ui/typography.js.map +0 -1
- package/dist/ui/useColorScheme.d.ts +0 -12
- package/dist/ui/useColorScheme.d.ts.map +0 -1
- package/dist/ui/useColorScheme.js.map +0 -1
- package/dist/ui/useListState.d.ts +0 -34
- package/dist/ui/useListState.d.ts.map +0 -1
- package/dist/ui/useListState.js.map +0 -1
- package/dist/ui/usecases/UseCaseCard.d.ts +0 -19
- package/dist/ui/usecases/UseCaseCard.d.ts.map +0 -1
- package/dist/ui/usecases/UseCaseCard.js.map +0 -1
- package/dist/ui/usecases/UserStoryCard.d.ts +0 -15
- package/dist/ui/usecases/UserStoryCard.d.ts.map +0 -1
- package/dist/ui/usecases/UserStoryCard.js.map +0 -1
- package/dist/ui/usecases/index.d.ts +0 -3
- package/dist/ui/utils.d.ts +0 -7
- package/dist/ui/utils.d.ts.map +0 -1
- package/dist/ui/utils.js.map +0 -1
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { globalRegistry } from "./registries.js";
|
|
2
|
+
|
|
3
|
+
//#region ../../../node_modules/zod/v4/core/to-json-schema.js
|
|
4
|
+
function initializeContext(params) {
|
|
5
|
+
let target = params?.target ?? "draft-2020-12";
|
|
6
|
+
if (target === "draft-4") target = "draft-04";
|
|
7
|
+
if (target === "draft-7") target = "draft-07";
|
|
8
|
+
return {
|
|
9
|
+
processors: params.processors ?? {},
|
|
10
|
+
metadataRegistry: params?.metadata ?? globalRegistry,
|
|
11
|
+
target,
|
|
12
|
+
unrepresentable: params?.unrepresentable ?? "throw",
|
|
13
|
+
override: params?.override ?? (() => {}),
|
|
14
|
+
io: params?.io ?? "output",
|
|
15
|
+
counter: 0,
|
|
16
|
+
seen: /* @__PURE__ */ new Map(),
|
|
17
|
+
cycles: params?.cycles ?? "ref",
|
|
18
|
+
reused: params?.reused ?? "inline",
|
|
19
|
+
external: params?.external ?? void 0
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
function process(schema, ctx, _params = {
|
|
23
|
+
path: [],
|
|
24
|
+
schemaPath: []
|
|
25
|
+
}) {
|
|
26
|
+
var _a;
|
|
27
|
+
const def = schema._zod.def;
|
|
28
|
+
const seen = ctx.seen.get(schema);
|
|
29
|
+
if (seen) {
|
|
30
|
+
seen.count++;
|
|
31
|
+
if (_params.schemaPath.includes(schema)) seen.cycle = _params.path;
|
|
32
|
+
return seen.schema;
|
|
33
|
+
}
|
|
34
|
+
const result = {
|
|
35
|
+
schema: {},
|
|
36
|
+
count: 1,
|
|
37
|
+
cycle: void 0,
|
|
38
|
+
path: _params.path
|
|
39
|
+
};
|
|
40
|
+
ctx.seen.set(schema, result);
|
|
41
|
+
const overrideSchema = schema._zod.toJSONSchema?.();
|
|
42
|
+
if (overrideSchema) result.schema = overrideSchema;
|
|
43
|
+
else {
|
|
44
|
+
const params = {
|
|
45
|
+
..._params,
|
|
46
|
+
schemaPath: [..._params.schemaPath, schema],
|
|
47
|
+
path: _params.path
|
|
48
|
+
};
|
|
49
|
+
const parent = schema._zod.parent;
|
|
50
|
+
if (parent) {
|
|
51
|
+
result.ref = parent;
|
|
52
|
+
process(parent, ctx, params);
|
|
53
|
+
ctx.seen.get(parent).isParent = true;
|
|
54
|
+
} else if (schema._zod.processJSONSchema) schema._zod.processJSONSchema(ctx, result.schema, params);
|
|
55
|
+
else {
|
|
56
|
+
const _json = result.schema;
|
|
57
|
+
const processor = ctx.processors[def.type];
|
|
58
|
+
if (!processor) throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`);
|
|
59
|
+
processor(schema, ctx, _json, params);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
const meta = ctx.metadataRegistry.get(schema);
|
|
63
|
+
if (meta) Object.assign(result.schema, meta);
|
|
64
|
+
if (ctx.io === "input" && isTransforming(schema)) {
|
|
65
|
+
delete result.schema.examples;
|
|
66
|
+
delete result.schema.default;
|
|
67
|
+
}
|
|
68
|
+
if (ctx.io === "input" && result.schema._prefault) (_a = result.schema).default ?? (_a.default = result.schema._prefault);
|
|
69
|
+
delete result.schema._prefault;
|
|
70
|
+
return ctx.seen.get(schema).schema;
|
|
71
|
+
}
|
|
72
|
+
function extractDefs(ctx, schema) {
|
|
73
|
+
const root = ctx.seen.get(schema);
|
|
74
|
+
if (!root) throw new Error("Unprocessed schema. This is a bug in Zod.");
|
|
75
|
+
const makeURI = (entry) => {
|
|
76
|
+
const defsSegment = ctx.target === "draft-2020-12" ? "$defs" : "definitions";
|
|
77
|
+
if (ctx.external) {
|
|
78
|
+
const externalId = ctx.external.registry.get(entry[0])?.id;
|
|
79
|
+
const uriGenerator = ctx.external.uri ?? ((id$1) => id$1);
|
|
80
|
+
if (externalId) return { ref: uriGenerator(externalId) };
|
|
81
|
+
const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`;
|
|
82
|
+
entry[1].defId = id;
|
|
83
|
+
return {
|
|
84
|
+
defId: id,
|
|
85
|
+
ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}`
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
if (entry[1] === root) return { ref: "#" };
|
|
89
|
+
const defUriPrefix = `#/${defsSegment}/`;
|
|
90
|
+
const defId = entry[1].schema.id ?? `__schema${ctx.counter++}`;
|
|
91
|
+
return {
|
|
92
|
+
defId,
|
|
93
|
+
ref: defUriPrefix + defId
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
const extractToDef = (entry) => {
|
|
97
|
+
if (entry[1].schema.$ref) return;
|
|
98
|
+
const seen = entry[1];
|
|
99
|
+
const { ref, defId } = makeURI(entry);
|
|
100
|
+
seen.def = { ...seen.schema };
|
|
101
|
+
if (defId) seen.defId = defId;
|
|
102
|
+
const schema$1 = seen.schema;
|
|
103
|
+
for (const key in schema$1) delete schema$1[key];
|
|
104
|
+
schema$1.$ref = ref;
|
|
105
|
+
};
|
|
106
|
+
if (ctx.cycles === "throw") for (const entry of ctx.seen.entries()) {
|
|
107
|
+
const seen = entry[1];
|
|
108
|
+
if (seen.cycle) throw new Error(`Cycle detected: #/${seen.cycle?.join("/")}/<root>
|
|
109
|
+
|
|
110
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
|
|
111
|
+
}
|
|
112
|
+
for (const entry of ctx.seen.entries()) {
|
|
113
|
+
const seen = entry[1];
|
|
114
|
+
if (schema === entry[0]) {
|
|
115
|
+
extractToDef(entry);
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
if (ctx.external) {
|
|
119
|
+
const ext = ctx.external.registry.get(entry[0])?.id;
|
|
120
|
+
if (schema !== entry[0] && ext) {
|
|
121
|
+
extractToDef(entry);
|
|
122
|
+
continue;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
if (ctx.metadataRegistry.get(entry[0])?.id) {
|
|
126
|
+
extractToDef(entry);
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
129
|
+
if (seen.cycle) {
|
|
130
|
+
extractToDef(entry);
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
if (seen.count > 1) {
|
|
134
|
+
if (ctx.reused === "ref") {
|
|
135
|
+
extractToDef(entry);
|
|
136
|
+
continue;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
function finalize(ctx, schema) {
|
|
142
|
+
const root = ctx.seen.get(schema);
|
|
143
|
+
if (!root) throw new Error("Unprocessed schema. This is a bug in Zod.");
|
|
144
|
+
const flattenRef = (zodSchema) => {
|
|
145
|
+
const seen = ctx.seen.get(zodSchema);
|
|
146
|
+
const schema$1 = seen.def ?? seen.schema;
|
|
147
|
+
const _cached = { ...schema$1 };
|
|
148
|
+
if (seen.ref === null) return;
|
|
149
|
+
const ref = seen.ref;
|
|
150
|
+
seen.ref = null;
|
|
151
|
+
if (ref) {
|
|
152
|
+
flattenRef(ref);
|
|
153
|
+
const refSchema = ctx.seen.get(ref).schema;
|
|
154
|
+
if (refSchema.$ref && (ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0")) {
|
|
155
|
+
schema$1.allOf = schema$1.allOf ?? [];
|
|
156
|
+
schema$1.allOf.push(refSchema);
|
|
157
|
+
} else {
|
|
158
|
+
Object.assign(schema$1, refSchema);
|
|
159
|
+
Object.assign(schema$1, _cached);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
if (!seen.isParent) ctx.override({
|
|
163
|
+
zodSchema,
|
|
164
|
+
jsonSchema: schema$1,
|
|
165
|
+
path: seen.path ?? []
|
|
166
|
+
});
|
|
167
|
+
};
|
|
168
|
+
for (const entry of [...ctx.seen.entries()].reverse()) flattenRef(entry[0]);
|
|
169
|
+
const result = {};
|
|
170
|
+
if (ctx.target === "draft-2020-12") result.$schema = "https://json-schema.org/draft/2020-12/schema";
|
|
171
|
+
else if (ctx.target === "draft-07") result.$schema = "http://json-schema.org/draft-07/schema#";
|
|
172
|
+
else if (ctx.target === "draft-04") result.$schema = "http://json-schema.org/draft-04/schema#";
|
|
173
|
+
else if (ctx.target === "openapi-3.0") {}
|
|
174
|
+
if (ctx.external?.uri) {
|
|
175
|
+
const id = ctx.external.registry.get(schema)?.id;
|
|
176
|
+
if (!id) throw new Error("Schema is missing an `id` property");
|
|
177
|
+
result.$id = ctx.external.uri(id);
|
|
178
|
+
}
|
|
179
|
+
Object.assign(result, root.def ?? root.schema);
|
|
180
|
+
const defs = ctx.external?.defs ?? {};
|
|
181
|
+
for (const entry of ctx.seen.entries()) {
|
|
182
|
+
const seen = entry[1];
|
|
183
|
+
if (seen.def && seen.defId) defs[seen.defId] = seen.def;
|
|
184
|
+
}
|
|
185
|
+
if (ctx.external) {} else if (Object.keys(defs).length > 0) if (ctx.target === "draft-2020-12") result.$defs = defs;
|
|
186
|
+
else result.definitions = defs;
|
|
187
|
+
try {
|
|
188
|
+
const finalized = JSON.parse(JSON.stringify(result));
|
|
189
|
+
Object.defineProperty(finalized, "~standard", {
|
|
190
|
+
value: {
|
|
191
|
+
...schema["~standard"],
|
|
192
|
+
jsonSchema: {
|
|
193
|
+
input: createStandardJSONSchemaMethod(schema, "input"),
|
|
194
|
+
output: createStandardJSONSchemaMethod(schema, "output")
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
enumerable: false,
|
|
198
|
+
writable: false
|
|
199
|
+
});
|
|
200
|
+
return finalized;
|
|
201
|
+
} catch (_err) {
|
|
202
|
+
throw new Error("Error converting schema to JSON.");
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
function isTransforming(_schema, _ctx) {
|
|
206
|
+
const ctx = _ctx ?? { seen: /* @__PURE__ */ new Set() };
|
|
207
|
+
if (ctx.seen.has(_schema)) return false;
|
|
208
|
+
ctx.seen.add(_schema);
|
|
209
|
+
const def = _schema._zod.def;
|
|
210
|
+
if (def.type === "transform") return true;
|
|
211
|
+
if (def.type === "array") return isTransforming(def.element, ctx);
|
|
212
|
+
if (def.type === "set") return isTransforming(def.valueType, ctx);
|
|
213
|
+
if (def.type === "lazy") return isTransforming(def.getter(), ctx);
|
|
214
|
+
if (def.type === "promise" || def.type === "optional" || def.type === "nonoptional" || def.type === "nullable" || def.type === "readonly" || def.type === "default" || def.type === "prefault") return isTransforming(def.innerType, ctx);
|
|
215
|
+
if (def.type === "intersection") return isTransforming(def.left, ctx) || isTransforming(def.right, ctx);
|
|
216
|
+
if (def.type === "record" || def.type === "map") return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
|
|
217
|
+
if (def.type === "pipe") return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
|
|
218
|
+
if (def.type === "object") {
|
|
219
|
+
for (const key in def.shape) if (isTransforming(def.shape[key], ctx)) return true;
|
|
220
|
+
return false;
|
|
221
|
+
}
|
|
222
|
+
if (def.type === "union") {
|
|
223
|
+
for (const option of def.options) if (isTransforming(option, ctx)) return true;
|
|
224
|
+
return false;
|
|
225
|
+
}
|
|
226
|
+
if (def.type === "tuple") {
|
|
227
|
+
for (const item of def.items) if (isTransforming(item, ctx)) return true;
|
|
228
|
+
if (def.rest && isTransforming(def.rest, ctx)) return true;
|
|
229
|
+
return false;
|
|
230
|
+
}
|
|
231
|
+
return false;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Creates a toJSONSchema method for a schema instance.
|
|
235
|
+
* This encapsulates the logic of initializing context, processing, extracting defs, and finalizing.
|
|
236
|
+
*/
|
|
237
|
+
const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
|
|
238
|
+
const ctx = initializeContext({
|
|
239
|
+
...params,
|
|
240
|
+
processors
|
|
241
|
+
});
|
|
242
|
+
process(schema, ctx);
|
|
243
|
+
extractDefs(ctx, schema);
|
|
244
|
+
return finalize(ctx, schema);
|
|
245
|
+
};
|
|
246
|
+
const createStandardJSONSchemaMethod = (schema, io) => (params) => {
|
|
247
|
+
const { libraryOptions, target } = params ?? {};
|
|
248
|
+
const ctx = initializeContext({
|
|
249
|
+
...libraryOptions ?? {},
|
|
250
|
+
target,
|
|
251
|
+
io,
|
|
252
|
+
processors: {}
|
|
253
|
+
});
|
|
254
|
+
process(schema, ctx);
|
|
255
|
+
extractDefs(ctx, schema);
|
|
256
|
+
return finalize(ctx, schema);
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
//#endregion
|
|
260
|
+
export { createStandardJSONSchemaMethod, createToJSONSchemaMethod, process };
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
//#region ../../../node_modules/zod/v4/core/util.js
|
|
2
|
+
function jsonStringifyReplacer(_, value) {
|
|
3
|
+
if (typeof value === "bigint") return value.toString();
|
|
4
|
+
return value;
|
|
5
|
+
}
|
|
6
|
+
function cached(getter) {
|
|
7
|
+
return { get value() {
|
|
8
|
+
{
|
|
9
|
+
const value = getter();
|
|
10
|
+
Object.defineProperty(this, "value", { value });
|
|
11
|
+
return value;
|
|
12
|
+
}
|
|
13
|
+
throw new Error("cached value already set");
|
|
14
|
+
} };
|
|
15
|
+
}
|
|
16
|
+
function nullish(input) {
|
|
17
|
+
return input === null || input === void 0;
|
|
18
|
+
}
|
|
19
|
+
function cleanRegex(source) {
|
|
20
|
+
const start = source.startsWith("^") ? 1 : 0;
|
|
21
|
+
const end = source.endsWith("$") ? source.length - 1 : source.length;
|
|
22
|
+
return source.slice(start, end);
|
|
23
|
+
}
|
|
24
|
+
const EVALUATING = Symbol("evaluating");
|
|
25
|
+
function defineLazy(object, key, getter) {
|
|
26
|
+
let value = void 0;
|
|
27
|
+
Object.defineProperty(object, key, {
|
|
28
|
+
get() {
|
|
29
|
+
if (value === EVALUATING) return;
|
|
30
|
+
if (value === void 0) {
|
|
31
|
+
value = EVALUATING;
|
|
32
|
+
value = getter();
|
|
33
|
+
}
|
|
34
|
+
return value;
|
|
35
|
+
},
|
|
36
|
+
set(v) {
|
|
37
|
+
Object.defineProperty(object, key, { value: v });
|
|
38
|
+
},
|
|
39
|
+
configurable: true
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function mergeDefs(...defs) {
|
|
43
|
+
const mergedDescriptors = {};
|
|
44
|
+
for (const def of defs) {
|
|
45
|
+
const descriptors = Object.getOwnPropertyDescriptors(def);
|
|
46
|
+
Object.assign(mergedDescriptors, descriptors);
|
|
47
|
+
}
|
|
48
|
+
return Object.defineProperties({}, mergedDescriptors);
|
|
49
|
+
}
|
|
50
|
+
function slugify(input) {
|
|
51
|
+
return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
52
|
+
}
|
|
53
|
+
const captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {};
|
|
54
|
+
function isObject(data) {
|
|
55
|
+
return typeof data === "object" && data !== null && !Array.isArray(data);
|
|
56
|
+
}
|
|
57
|
+
const allowsEval = cached(() => {
|
|
58
|
+
if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) return false;
|
|
59
|
+
try {
|
|
60
|
+
new Function("");
|
|
61
|
+
return true;
|
|
62
|
+
} catch (_) {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
function isPlainObject(o) {
|
|
67
|
+
if (isObject(o) === false) return false;
|
|
68
|
+
const ctor = o.constructor;
|
|
69
|
+
if (ctor === void 0) return true;
|
|
70
|
+
if (typeof ctor !== "function") return true;
|
|
71
|
+
const prot = ctor.prototype;
|
|
72
|
+
if (isObject(prot) === false) return false;
|
|
73
|
+
if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) return false;
|
|
74
|
+
return true;
|
|
75
|
+
}
|
|
76
|
+
function shallowClone(o) {
|
|
77
|
+
if (isPlainObject(o)) return { ...o };
|
|
78
|
+
if (Array.isArray(o)) return [...o];
|
|
79
|
+
return o;
|
|
80
|
+
}
|
|
81
|
+
function escapeRegex(str) {
|
|
82
|
+
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
83
|
+
}
|
|
84
|
+
function clone(inst, def, params) {
|
|
85
|
+
const cl = new inst._zod.constr(def ?? inst._zod.def);
|
|
86
|
+
if (!def || params?.parent) cl._zod.parent = inst;
|
|
87
|
+
return cl;
|
|
88
|
+
}
|
|
89
|
+
function normalizeParams(_params) {
|
|
90
|
+
const params = _params;
|
|
91
|
+
if (!params) return {};
|
|
92
|
+
if (typeof params === "string") return { error: () => params };
|
|
93
|
+
if (params?.message !== void 0) {
|
|
94
|
+
if (params?.error !== void 0) throw new Error("Cannot specify both `message` and `error` params");
|
|
95
|
+
params.error = params.message;
|
|
96
|
+
}
|
|
97
|
+
delete params.message;
|
|
98
|
+
if (typeof params.error === "string") return {
|
|
99
|
+
...params,
|
|
100
|
+
error: () => params.error
|
|
101
|
+
};
|
|
102
|
+
return params;
|
|
103
|
+
}
|
|
104
|
+
const NUMBER_FORMAT_RANGES = {
|
|
105
|
+
safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
|
|
106
|
+
int32: [-2147483648, 2147483647],
|
|
107
|
+
uint32: [0, 4294967295],
|
|
108
|
+
float32: [-34028234663852886e22, 34028234663852886e22],
|
|
109
|
+
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
110
|
+
};
|
|
111
|
+
function aborted(x, startIndex = 0) {
|
|
112
|
+
if (x.aborted === true) return true;
|
|
113
|
+
for (let i = startIndex; i < x.issues.length; i++) if (x.issues[i]?.continue !== true) return true;
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
function prefixIssues(path, issues) {
|
|
117
|
+
return issues.map((iss) => {
|
|
118
|
+
var _a;
|
|
119
|
+
(_a = iss).path ?? (_a.path = []);
|
|
120
|
+
iss.path.unshift(path);
|
|
121
|
+
return iss;
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
function unwrapMessage(message) {
|
|
125
|
+
return typeof message === "string" ? message : message?.message;
|
|
126
|
+
}
|
|
127
|
+
function finalizeIssue(iss, ctx, config) {
|
|
128
|
+
const full = {
|
|
129
|
+
...iss,
|
|
130
|
+
path: iss.path ?? []
|
|
131
|
+
};
|
|
132
|
+
if (!iss.message) full.message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config.customError?.(iss)) ?? unwrapMessage(config.localeError?.(iss)) ?? "Invalid input";
|
|
133
|
+
delete full.inst;
|
|
134
|
+
delete full.continue;
|
|
135
|
+
if (!ctx?.reportInput) delete full.input;
|
|
136
|
+
return full;
|
|
137
|
+
}
|
|
138
|
+
function getLengthableOrigin(input) {
|
|
139
|
+
if (Array.isArray(input)) return "array";
|
|
140
|
+
if (typeof input === "string") return "string";
|
|
141
|
+
return "unknown";
|
|
142
|
+
}
|
|
143
|
+
function issue(...args) {
|
|
144
|
+
const [iss, input, inst] = args;
|
|
145
|
+
if (typeof iss === "string") return {
|
|
146
|
+
message: iss,
|
|
147
|
+
code: "custom",
|
|
148
|
+
input,
|
|
149
|
+
inst
|
|
150
|
+
};
|
|
151
|
+
return { ...iss };
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
//#endregion
|
|
155
|
+
export { aborted, captureStackTrace, cleanRegex, clone, defineLazy, escapeRegex, finalizeIssue, getLengthableOrigin, isPlainObject, issue, jsonStringifyReplacer, mergeDefs, normalizeParams, nullish, prefixIssues, shallowClone, slugify };
|