@fairmint/ui 0.3.33 → 0.3.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/index3.cjs +3 -5
- package/dist/_virtual/index3.cjs.map +1 -1
- package/dist/_virtual/index3.js +2 -5
- package/dist/_virtual/index3.js.map +1 -1
- package/dist/_virtual/index4.cjs +5 -3
- package/dist/_virtual/index4.cjs.map +1 -1
- package/dist/_virtual/index4.js +5 -2
- package/dist/_virtual/index4.js.map +1 -1
- package/dist/components/BrandedLoadingScreen/BrandedLoadingScreen.d.ts +1 -1
- package/dist/components/BrandedLoadingScreen/BrandedLoadingScreen.d.ts.map +1 -1
- package/dist/components/ErrorFallback/ErrorFallback.d.ts +1 -1
- package/dist/components/ErrorFallback/ErrorFallback.d.ts.map +1 -1
- package/dist/components/FairmintLogo/FairmintBrandLogo.d.ts +1 -1
- package/dist/components/FairmintLogo/FairmintBrandLogo.d.ts.map +1 -1
- package/dist/components/FairmintLogo/FairmintLogo.d.ts +1 -1
- package/dist/components/FairmintLogo/FairmintLogo.d.ts.map +1 -1
- package/dist/components/FairmintLogo/FairmintLogoGraphic.d.ts +1 -1
- package/dist/components/FairmintLogo/FairmintLogoGraphic.d.ts.map +1 -1
- package/dist/components/FairmintLogo/FairmintLogoMark.d.ts +1 -1
- package/dist/components/FairmintLogo/FairmintLogoMark.d.ts.map +1 -1
- package/dist/components/FairmintLogo/FairmintLogoMarkRounded.d.ts +1 -1
- package/dist/components/FairmintLogo/FairmintLogoMarkRounded.d.ts.map +1 -1
- package/dist/components/FairmintProvider/FairmintNotifications.d.ts +1 -1
- package/dist/components/FairmintProvider/FairmintNotifications.d.ts.map +1 -1
- package/dist/components/FairmintProvider/FairmintProvider.d.ts +1 -1
- package/dist/components/FairmintProvider/FairmintProvider.d.ts.map +1 -1
- package/dist/components/LoadingOverlay/LoadingOverlay.d.ts +1 -1
- package/dist/components/LoadingOverlay/LoadingOverlay.d.ts.map +1 -1
- package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +1 -1
- package/dist/components/LoadingSpinner/LoadingSpinner.d.ts.map +1 -1
- package/dist/components/form/BirthdayDatePicker/BirthdayDatePicker.d.ts +1 -1
- package/dist/components/form/BirthdayDatePicker/BirthdayDatePicker.d.ts.map +1 -1
- package/dist/components/form/EmailField.d.ts +1 -1
- package/dist/components/form/EmailField.d.ts.map +1 -1
- package/dist/components/form/EthereumAddressField/EthereumAddressField.d.ts +1 -1
- package/dist/components/form/EthereumAddressField/EthereumAddressField.d.ts.map +1 -1
- package/dist/components/form/Form.d.ts +1 -1
- package/dist/components/form/Form.d.ts.map +1 -1
- package/dist/components/form/FormField.d.ts +1 -1
- package/dist/components/form/FormField.d.ts.map +1 -1
- package/dist/components/form/PasswordField.d.ts +1 -1
- package/dist/components/form/PasswordField.d.ts.map +1 -1
- package/dist/components/form/PhoneField.d.ts +2 -1
- package/dist/components/form/PhoneField.d.ts.map +1 -1
- package/dist/components/form/SignatureNameField/SignatureNameField.d.ts +1 -1
- package/dist/components/form/SignatureNameField/SignatureNameField.d.ts.map +1 -1
- package/dist/components/form/USStateField/USStateField.d.ts +1 -1
- package/dist/components/form/USStateField/USStateField.d.ts.map +1 -1
- package/dist/components/form/ZipField/ZipField.d.ts +1 -1
- package/dist/components/form/ZipField/ZipField.d.ts.map +1 -1
- package/dist/components/generic/AgentSuggestion/AgentSuggestion.d.ts +2 -2
- package/dist/components/generic/AgentSuggestion/AgentSuggestion.d.ts.map +1 -1
- package/dist/components/generic/AnimateIn/AnimateIn.d.ts +1 -1
- package/dist/components/generic/AnimateIn/AnimateIn.d.ts.map +1 -1
- package/dist/components/generic/Banner/Banner.d.ts +1 -1
- package/dist/components/generic/Banner/Banner.d.ts.map +1 -1
- package/dist/components/generic/BottomSheet/BottomSheet.d.ts +1 -1
- package/dist/components/generic/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/components/generic/ClickableCard/ClickableCard.d.ts +1 -1
- package/dist/components/generic/ClickableCard/ClickableCard.d.ts.map +1 -1
- package/dist/components/generic/ColorDot/ColorDot.d.ts +1 -1
- package/dist/components/generic/ColorDot/ColorDot.d.ts.map +1 -1
- package/dist/components/generic/CompanyBanner/CompanyBanner.d.ts +1 -1
- package/dist/components/generic/CompanyBanner/CompanyBanner.d.ts.map +1 -1
- package/dist/components/generic/ConfidentialityBanner/ConfidentialityBanner.d.ts +1 -1
- package/dist/components/generic/ConfidentialityBanner/ConfidentialityBanner.d.ts.map +1 -1
- package/dist/components/generic/ConfirmDialog/ConfirmDialog.d.ts +1 -1
- package/dist/components/generic/ConfirmDialog/ConfirmDialog.d.ts.map +1 -1
- package/dist/components/generic/Currency/Currency.d.ts +2 -1
- package/dist/components/generic/Currency/Currency.d.ts.map +1 -1
- package/dist/components/generic/DataRow/DataRow.d.ts +3 -3
- package/dist/components/generic/DataRow/DataRow.d.ts.map +1 -1
- package/dist/components/generic/DataTable/DataTable.d.ts +1 -1
- package/dist/components/generic/DataTable/DataTable.d.ts.map +1 -1
- package/dist/components/generic/DateDisplay/DateDisplay.d.ts +1 -1
- package/dist/components/generic/DateDisplay/DateDisplay.d.ts.map +1 -1
- package/dist/components/generic/DetailDrawer/DetailDrawer.d.ts +1 -1
- package/dist/components/generic/DetailDrawer/DetailDrawer.d.ts.map +1 -1
- package/dist/components/generic/DocumentRow/DocumentRow.d.ts +1 -1
- package/dist/components/generic/DocumentRow/DocumentRow.d.ts.map +1 -1
- package/dist/components/generic/EditableSection/EditableSection.d.ts +1 -1
- package/dist/components/generic/EditableSection/EditableSection.d.ts.map +1 -1
- package/dist/components/generic/EmptyState/EmptyState.d.ts +1 -1
- package/dist/components/generic/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/components/generic/ErrorPage/ErrorPage.d.ts +1 -1
- package/dist/components/generic/ErrorPage/ErrorPage.d.ts.map +1 -1
- package/dist/components/generic/Eyebrow/Eyebrow.d.ts +1 -1
- package/dist/components/generic/Eyebrow/Eyebrow.d.ts.map +1 -1
- package/dist/components/generic/FileDropzone/FileDropzone.d.ts +1 -1
- package/dist/components/generic/FileDropzone/FileDropzone.d.ts.map +1 -1
- package/dist/components/generic/ListRow/ListRow.d.ts +1 -1
- package/dist/components/generic/ListRow/ListRow.d.ts.map +1 -1
- package/dist/components/generic/NotificationRow/NotificationRow.d.ts +1 -1
- package/dist/components/generic/NotificationRow/NotificationRow.d.ts.map +1 -1
- package/dist/components/generic/Percent/Percent.d.ts +1 -1
- package/dist/components/generic/Percent/Percent.d.ts.map +1 -1
- package/dist/components/generic/PhotoCropModal/PhotoCropModal.d.ts +1 -1
- package/dist/components/generic/PhotoCropModal/PhotoCropModal.d.ts.map +1 -1
- package/dist/components/generic/ProcessingState/ProcessingState.d.ts +1 -1
- package/dist/components/generic/ProcessingState/ProcessingState.d.ts.map +1 -1
- package/dist/components/generic/RadioCard/RadioCard.d.ts +1 -1
- package/dist/components/generic/RadioCard/RadioCard.d.ts.map +1 -1
- package/dist/components/generic/SearchInput/SearchInput.d.ts +1 -1
- package/dist/components/generic/SearchInput/SearchInput.d.ts.map +1 -1
- package/dist/components/generic/StatCard/StatCard.d.ts +1 -1
- package/dist/components/generic/StatCard/StatCard.d.ts.map +1 -1
- package/dist/components/generic/StatusBadge/StatusBadge.d.ts +1 -1
- package/dist/components/generic/StatusBadge/StatusBadge.d.ts.map +1 -1
- package/dist/components/generic/StepCard/StepCard.d.ts +1 -1
- package/dist/components/generic/StepCard/StepCard.d.ts.map +1 -1
- package/dist/components/generic/StepFlow/StepFlow.d.ts +1 -1
- package/dist/components/generic/StepFlow/StepFlow.d.ts.map +1 -1
- package/dist/components/generic/StepProgress/StepProgress.d.ts +1 -1
- package/dist/components/generic/StepProgress/StepProgress.d.ts.map +1 -1
- package/dist/components/generic/TablePagination/TablePagination.d.ts +1 -1
- package/dist/components/generic/TablePagination/TablePagination.d.ts.map +1 -1
- package/dist/components/generic/TaskInboxPopover/TaskInboxPopover.d.ts +1 -1
- package/dist/components/generic/TaskInboxPopover/TaskInboxPopover.d.ts.map +1 -1
- package/dist/components/generic/TaskRow/TaskRow.d.ts +1 -1
- package/dist/components/generic/TaskRow/TaskRow.d.ts.map +1 -1
- package/dist/components/generic/ValidationWarning/ValidationWarning.d.ts +1 -1
- package/dist/components/generic/ValidationWarning/ValidationWarning.d.ts.map +1 -1
- package/dist/components/layout/AccountSheet/AccountSheet.d.ts +1 -1
- package/dist/components/layout/AccountSheet/AccountSheet.d.ts.map +1 -1
- package/dist/components/layout/AppHeader/AppHeader.d.ts +1 -1
- package/dist/components/layout/AppHeader/AppHeader.d.ts.map +1 -1
- package/dist/components/layout/MobileNav/MobileNav.d.ts +1 -1
- package/dist/components/layout/MobileNav/MobileNav.d.ts.map +1 -1
- package/dist/components/layout/PageHeader/PageHeader.d.ts +1 -1
- package/dist/components/layout/PageHeader/PageHeader.d.ts.map +1 -1
- package/dist/components/layout/SideNav/SideNav.d.ts +1 -1
- package/dist/components/layout/SideNav/SideNav.d.ts.map +1 -1
- package/dist/components/layout/UserMenu/UserMenu.d.ts +1 -1
- package/dist/components/layout/UserMenu/UserMenu.d.ts.map +1 -1
- package/dist/components/primitives/Alert/Alert.d.ts +1 -1
- package/dist/components/primitives/Alert/Alert.d.ts.map +1 -1
- package/dist/components/primitives/Drawer/Drawer.d.ts +1 -1
- package/dist/components/primitives/Drawer/Drawer.d.ts.map +1 -1
- package/dist/components/primitives/Loader/Loader.d.ts +1 -1
- package/dist/components/primitives/Loader/Loader.d.ts.map +1 -1
- package/dist/components/primitives/Menu/Menu.d.ts +1 -1
- package/dist/components/primitives/Menu/Menu.d.ts.map +1 -1
- package/dist/components/primitives/Modal/Modal.d.ts +1 -1
- package/dist/components/primitives/Modal/Modal.d.ts.map +1 -1
- package/dist/components/primitives/Pdf/Pdf.d.ts +2 -2
- package/dist/components/primitives/Pdf/Pdf.d.ts.map +1 -1
- package/dist/components/primitives/Popover/Popover.d.ts +1 -1
- package/dist/components/primitives/Popover/Popover.d.ts.map +1 -1
- package/dist/components/primitives/Skeleton/Skeleton.d.ts +1 -1
- package/dist/components/primitives/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/components/primitives/Table/Table.d.ts +1 -1
- package/dist/components/primitives/Table/Table.d.ts.map +1 -1
- package/dist/components/primitives/Tabs/Tabs.d.ts +3 -3
- package/dist/components/primitives/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/primitives/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/primitives/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/primitives/layout.d.ts +8 -8
- package/dist/components/primitives/layout.d.ts.map +1 -1
- package/dist/components/primitives/muiCompat.cjs.map +1 -1
- package/dist/components/primitives/muiCompat.d.ts +41 -42
- package/dist/components/primitives/muiCompat.d.ts.map +1 -1
- package/dist/components/primitives/muiCompat.js.map +1 -1
- package/dist/components/specific/DocumentRow/DocumentRow.d.ts +1 -1
- package/dist/components/specific/DocumentRow/DocumentRow.d.ts.map +1 -1
- package/dist/components/specific/EquityGrantCard/EquityGrantCard.d.ts +1 -1
- package/dist/components/specific/EquityGrantCard/EquityGrantCard.d.ts.map +1 -1
- package/dist/components/specific/EquityRibbonChart/EquityRibbonChart.d.ts +1 -1
- package/dist/components/specific/EquityRibbonChart/EquityRibbonChart.d.ts.map +1 -1
- package/dist/components/specific/EquityRibbonChart/FairmintRibbonMark.d.ts +1 -1
- package/dist/components/specific/EquityRibbonChart/FairmintRibbonMark.d.ts.map +1 -1
- package/dist/components/specific/InvestmentCard/InvestmentCard.d.ts +1 -1
- package/dist/components/specific/InvestmentCard/InvestmentCard.d.ts.map +1 -1
- package/dist/components/specific/InvestorProfileCard/InvestorProfileCard.d.ts +1 -1
- package/dist/components/specific/InvestorProfileCard/InvestorProfileCard.d.ts.map +1 -1
- package/dist/components/specific/WalletList/WalletList.d.ts +1 -1
- package/dist/components/specific/WalletList/WalletList.d.ts.map +1 -1
- package/dist/components/specific/WalletListItem/WalletListItem.d.ts +1 -1
- package/dist/components/specific/WalletListItem/WalletListItem.d.ts.map +1 -1
- package/dist/node_modules/@mantine/form/esm/hooks/use-form-status/use-form-status.cjs +1 -1
- package/dist/node_modules/@mantine/form/esm/hooks/use-form-status/use-form-status.js +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/createReactComponent.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconActivity.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconActivity.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertCircle.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertCircle.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowsExchange.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowsExchange.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowsMaximize.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowsMaximize.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowsSort.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowsSort.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconAward.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconAward.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBell.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBell.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBolt.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBolt.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBrandFacebook.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBrandFacebook.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBrandInstagram.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBrandInstagram.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBrandLinkedin.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBrandLinkedin.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBrandX.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBrandX.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBrandYoutube.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBrandYoutube.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBriefcase.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBriefcase.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBuilding.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBuilding.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBuildingBank.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBuildingBank.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCalendar.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCalendar.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCalendarEvent.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCalendarEvent.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCashBanknote.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCashBanknote.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCategory.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCategory.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCertificate.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCertificate.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconChartBar.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconChartBar.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconChartDots.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconChartDots.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconChartPie.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconChartPie.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronUp.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronUp.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleCheck.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleCheck.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleMinus.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleMinus.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleOff.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleOff.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleX.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleX.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconClipboardCheck.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconClipboardCheck.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconClock.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconClock.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCloudUpload.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCloudUpload.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceFloppy.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceFloppy.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconDots.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconDots.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconEdit.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconEdit.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconEye.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconEye.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconFile.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconFile.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconFileDownload.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconFileDownload.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconFilePlus.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconFilePlus.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconFileText.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconFileText.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconFileTypePdf.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconFileTypePdf.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderPlus.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderPlus.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconHourglass.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconHourglass.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconLanguage.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconLanguage.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutSidebarLeftCollapse.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutSidebarLeftCollapse.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutSidebarLeftExpand.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutSidebarLeftExpand.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconMail.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconMail.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconMapPin.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconMapPin.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconNews.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconNews.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconPencil.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconPencil.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPause.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPause.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlay.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlay.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStop.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStop.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconPlus.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconPlus.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconRefresh.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconRefresh.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconReload.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconReload.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconRocket.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconRocket.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSearchOff.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSearchOff.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSend.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSend.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSettings.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSettings.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconShieldCheck.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconShieldCheck.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconShieldDollar.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconShieldDollar.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconShieldOff.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconShieldOff.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSitemap.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSitemap.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSparkles.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSparkles.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconStar.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconStar.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconTable.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconTable.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconThumbDown.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconThumbDown.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconThumbUp.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconThumbUp.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconTimeline.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconTimeline.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconTrendingUp.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconTrendingUp.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconTrophy.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconTrophy.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUpload.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUpload.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUserCheck.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUserCheck.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUserCircle.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUserCircle.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUserPlus.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUserPlus.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUsers.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUsers.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUsersGroup.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUsersGroup.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUsersPlus.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUsersPlus.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconX.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js.map +1 -1
- package/dist/node_modules/dayjs/dayjs.min.cjs +4 -4
- package/dist/node_modules/dayjs/dayjs.min.cjs.map +1 -1
- package/dist/node_modules/dayjs/dayjs.min.js +4 -4
- package/dist/node_modules/dayjs/dayjs.min.js.map +1 -1
- package/dist/node_modules/prop-types/index.cjs +1 -1
- package/dist/node_modules/prop-types/index.js +1 -1
- package/dist/node_modules/zod/v4/classic/checks.cjs +0 -1
- package/dist/node_modules/zod/v4/classic/checks.cjs.map +1 -1
- package/dist/node_modules/zod/v4/classic/checks.js +0 -1
- package/dist/node_modules/zod/v4/classic/checks.js.map +1 -1
- package/dist/node_modules/zod/v4/classic/coerce.cjs +1 -2
- package/dist/node_modules/zod/v4/classic/coerce.cjs.map +1 -1
- package/dist/node_modules/zod/v4/classic/coerce.js +1 -2
- package/dist/node_modules/zod/v4/classic/coerce.js.map +1 -1
- package/dist/node_modules/zod/v4/classic/compat.cjs +0 -1
- package/dist/node_modules/zod/v4/classic/compat.cjs.map +1 -1
- package/dist/node_modules/zod/v4/classic/compat.js +0 -1
- package/dist/node_modules/zod/v4/classic/compat.js.map +1 -1
- package/dist/node_modules/zod/v4/classic/errors.cjs +4 -5
- package/dist/node_modules/zod/v4/classic/errors.cjs.map +1 -1
- package/dist/node_modules/zod/v4/classic/errors.js +4 -5
- package/dist/node_modules/zod/v4/classic/errors.js.map +1 -1
- package/dist/node_modules/zod/v4/classic/external.cjs +2 -0
- package/dist/node_modules/zod/v4/classic/external.cjs.map +1 -1
- package/dist/node_modules/zod/v4/classic/external.js +3 -1
- package/dist/node_modules/zod/v4/classic/from-json-schema.cjs +16 -10
- package/dist/node_modules/zod/v4/classic/from-json-schema.cjs.map +1 -1
- package/dist/node_modules/zod/v4/classic/from-json-schema.js +16 -10
- package/dist/node_modules/zod/v4/classic/from-json-schema.js.map +1 -1
- package/dist/node_modules/zod/v4/classic/iso.cjs +2 -3
- package/dist/node_modules/zod/v4/classic/iso.cjs.map +1 -1
- package/dist/node_modules/zod/v4/classic/iso.js +2 -3
- package/dist/node_modules/zod/v4/classic/iso.js.map +1 -1
- package/dist/node_modules/zod/v4/classic/parse.cjs +1 -2
- package/dist/node_modules/zod/v4/classic/parse.cjs.map +1 -1
- package/dist/node_modules/zod/v4/classic/parse.js +1 -2
- package/dist/node_modules/zod/v4/classic/parse.js.map +1 -1
- package/dist/node_modules/zod/v4/classic/schemas.cjs +325 -112
- package/dist/node_modules/zod/v4/classic/schemas.cjs.map +1 -1
- package/dist/node_modules/zod/v4/classic/schemas.js +327 -114
- package/dist/node_modules/zod/v4/classic/schemas.js.map +1 -1
- package/dist/node_modules/zod/v4/core/api.cjs +2 -2
- package/dist/node_modules/zod/v4/core/api.cjs.map +1 -1
- package/dist/node_modules/zod/v4/core/api.js +2 -2
- package/dist/node_modules/zod/v4/core/api.js.map +1 -1
- package/dist/node_modules/zod/v4/core/core.cjs +6 -4
- package/dist/node_modules/zod/v4/core/core.cjs.map +1 -1
- package/dist/node_modules/zod/v4/core/core.js +6 -4
- package/dist/node_modules/zod/v4/core/core.js.map +1 -1
- package/dist/node_modules/zod/v4/core/errors.cjs +24 -21
- package/dist/node_modules/zod/v4/core/errors.cjs.map +1 -1
- package/dist/node_modules/zod/v4/core/errors.js +24 -21
- package/dist/node_modules/zod/v4/core/errors.js.map +1 -1
- package/dist/node_modules/zod/v4/core/index.cjs +1 -0
- package/dist/node_modules/zod/v4/core/index.cjs.map +1 -1
- package/dist/node_modules/zod/v4/core/index.js +2 -1
- package/dist/node_modules/zod/v4/core/json-schema-processors.cjs +15 -22
- package/dist/node_modules/zod/v4/core/json-schema-processors.cjs.map +1 -1
- package/dist/node_modules/zod/v4/core/json-schema-processors.js +15 -22
- package/dist/node_modules/zod/v4/core/json-schema-processors.js.map +1 -1
- package/dist/node_modules/zod/v4/core/parse.cjs +7 -7
- package/dist/node_modules/zod/v4/core/parse.cjs.map +1 -1
- package/dist/node_modules/zod/v4/core/parse.js +7 -7
- package/dist/node_modules/zod/v4/core/parse.js.map +1 -1
- package/dist/node_modules/zod/v4/core/regexes.cjs +3 -1
- package/dist/node_modules/zod/v4/core/regexes.cjs.map +1 -1
- package/dist/node_modules/zod/v4/core/regexes.js +3 -1
- package/dist/node_modules/zod/v4/core/regexes.js.map +1 -1
- package/dist/node_modules/zod/v4/core/schemas.cjs +176 -53
- package/dist/node_modules/zod/v4/core/schemas.cjs.map +1 -1
- package/dist/node_modules/zod/v4/core/schemas.js +178 -55
- package/dist/node_modules/zod/v4/core/schemas.js.map +1 -1
- package/dist/node_modules/zod/v4/core/to-json-schema.cjs +8 -1
- package/dist/node_modules/zod/v4/core/to-json-schema.cjs.map +1 -1
- package/dist/node_modules/zod/v4/core/to-json-schema.js +8 -1
- package/dist/node_modules/zod/v4/core/to-json-schema.js.map +1 -1
- package/dist/node_modules/zod/v4/core/util.cjs +45 -27
- package/dist/node_modules/zod/v4/core/util.cjs.map +1 -1
- package/dist/node_modules/zod/v4/core/util.js +45 -27
- package/dist/node_modules/zod/v4/core/util.js.map +1 -1
- package/dist/node_modules/zod/v4/core/versions.cjs +2 -2
- package/dist/node_modules/zod/v4/core/versions.cjs.map +1 -1
- package/dist/node_modules/zod/v4/core/versions.js +2 -2
- package/dist/node_modules/zod/v4/core/versions.js.map +1 -1
- package/dist/node_modules/zod/v4/locales/el.cjs +112 -0
- package/dist/node_modules/zod/v4/locales/el.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/el.js +113 -0
- package/dist/node_modules/zod/v4/locales/el.js.map +1 -0
- package/dist/node_modules/zod/v4/locales/en.cjs +4 -0
- package/dist/node_modules/zod/v4/locales/en.cjs.map +1 -1
- package/dist/node_modules/zod/v4/locales/en.js +4 -0
- package/dist/node_modules/zod/v4/locales/en.js.map +1 -1
- package/dist/node_modules/zod/v4/locales/fr.cjs +25 -8
- package/dist/node_modules/zod/v4/locales/fr.cjs.map +1 -1
- package/dist/node_modules/zod/v4/locales/fr.js +25 -8
- package/dist/node_modules/zod/v4/locales/fr.js.map +1 -1
- package/dist/node_modules/zod/v4/locales/hr.cjs +125 -0
- package/dist/node_modules/zod/v4/locales/hr.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/hr.js +126 -0
- package/dist/node_modules/zod/v4/locales/hr.js.map +1 -0
- package/dist/node_modules/zod/v4/locales/index.cjs +6 -0
- package/dist/node_modules/zod/v4/locales/index.cjs.map +1 -1
- package/dist/node_modules/zod/v4/locales/index.js +88 -82
- package/dist/node_modules/zod/v4/locales/index.js.map +1 -1
- package/dist/node_modules/zod/v4/locales/it.cjs +1 -1
- package/dist/node_modules/zod/v4/locales/it.cjs.map +1 -1
- package/dist/node_modules/zod/v4/locales/it.js +1 -1
- package/dist/node_modules/zod/v4/locales/it.js.map +1 -1
- package/dist/node_modules/zod/v4/locales/ka.cjs +8 -8
- package/dist/node_modules/zod/v4/locales/ka.cjs.map +1 -1
- package/dist/node_modules/zod/v4/locales/ka.js +8 -8
- package/dist/node_modules/zod/v4/locales/ka.js.map +1 -1
- package/dist/node_modules/zod/v4/locales/ro.cjs +122 -0
- package/dist/node_modules/zod/v4/locales/ro.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/ro.js +123 -0
- package/dist/node_modules/zod/v4/locales/ro.js.map +1 -0
- package/dist/node_modules/zod/v4/locales/uz.cjs +2 -1
- package/dist/node_modules/zod/v4/locales/uz.cjs.map +1 -1
- package/dist/node_modules/zod/v4/locales/uz.js +2 -1
- package/dist/node_modules/zod/v4/locales/uz.js.map +1 -1
- package/package.json +22 -22
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"from-json-schema.cjs","sources":["../../../../../node_modules/zod/v4/classic/from-json-schema.js"],"sourcesContent":["import { globalRegistry } from \"../core/registries.js\";\nimport * as _checks from \"./checks.js\";\nimport * as _iso from \"./iso.js\";\nimport * as _schemas from \"./schemas.js\";\n// Local z object to avoid circular dependency with ../index.js\nconst z = {\n ..._schemas,\n ..._checks,\n iso: _iso,\n};\n// Keys that are recognized and handled by the conversion logic\nconst RECOGNIZED_KEYS = new Set([\n // Schema identification\n \"$schema\",\n \"$ref\",\n \"$defs\",\n \"definitions\",\n // Core schema keywords\n \"$id\",\n \"id\",\n \"$comment\",\n \"$anchor\",\n \"$vocabulary\",\n \"$dynamicRef\",\n \"$dynamicAnchor\",\n // Type\n \"type\",\n \"enum\",\n \"const\",\n // Composition\n \"anyOf\",\n \"oneOf\",\n \"allOf\",\n \"not\",\n // Object\n \"properties\",\n \"required\",\n \"additionalProperties\",\n \"patternProperties\",\n \"propertyNames\",\n \"minProperties\",\n \"maxProperties\",\n // Array\n \"items\",\n \"prefixItems\",\n \"additionalItems\",\n \"minItems\",\n \"maxItems\",\n \"uniqueItems\",\n \"contains\",\n \"minContains\",\n \"maxContains\",\n // String\n \"minLength\",\n \"maxLength\",\n \"pattern\",\n \"format\",\n // Number\n \"minimum\",\n \"maximum\",\n \"exclusiveMinimum\",\n \"exclusiveMaximum\",\n \"multipleOf\",\n // Already handled metadata\n \"description\",\n \"default\",\n // Content\n \"contentEncoding\",\n \"contentMediaType\",\n \"contentSchema\",\n // Unsupported (error-throwing)\n \"unevaluatedItems\",\n \"unevaluatedProperties\",\n \"if\",\n \"then\",\n \"else\",\n \"dependentSchemas\",\n \"dependentRequired\",\n // OpenAPI\n \"nullable\",\n \"readOnly\",\n]);\nfunction detectVersion(schema, defaultTarget) {\n const $schema = schema.$schema;\n if ($schema === \"https://json-schema.org/draft/2020-12/schema\") {\n return \"draft-2020-12\";\n }\n if ($schema === \"http://json-schema.org/draft-07/schema#\") {\n return \"draft-7\";\n }\n if ($schema === \"http://json-schema.org/draft-04/schema#\") {\n return \"draft-4\";\n }\n // Use defaultTarget if provided, otherwise default to draft-2020-12\n return defaultTarget ?? \"draft-2020-12\";\n}\nfunction resolveRef(ref, ctx) {\n if (!ref.startsWith(\"#\")) {\n throw new Error(\"External $ref is not supported, only local refs (#/...) are allowed\");\n }\n const path = ref.slice(1).split(\"/\").filter(Boolean);\n // Handle root reference \"#\"\n if (path.length === 0) {\n return ctx.rootSchema;\n }\n const defsKey = ctx.version === \"draft-2020-12\" ? \"$defs\" : \"definitions\";\n if (path[0] === defsKey) {\n const key = path[1];\n if (!key || !ctx.defs[key]) {\n throw new Error(`Reference not found: ${ref}`);\n }\n return ctx.defs[key];\n }\n throw new Error(`Reference not found: ${ref}`);\n}\nfunction convertBaseSchema(schema, ctx) {\n // Handle unsupported features\n if (schema.not !== undefined) {\n // Special case: { not: {} } represents never\n if (typeof schema.not === \"object\" && Object.keys(schema.not).length === 0) {\n return z.never();\n }\n throw new Error(\"not is not supported in Zod (except { not: {} } for never)\");\n }\n if (schema.unevaluatedItems !== undefined) {\n throw new Error(\"unevaluatedItems is not supported\");\n }\n if (schema.unevaluatedProperties !== undefined) {\n throw new Error(\"unevaluatedProperties is not supported\");\n }\n if (schema.if !== undefined || schema.then !== undefined || schema.else !== undefined) {\n throw new Error(\"Conditional schemas (if/then/else) are not supported\");\n }\n if (schema.dependentSchemas !== undefined || schema.dependentRequired !== undefined) {\n throw new Error(\"dependentSchemas and dependentRequired are not supported\");\n }\n // Handle $ref\n if (schema.$ref) {\n const refPath = schema.$ref;\n if (ctx.refs.has(refPath)) {\n return ctx.refs.get(refPath);\n }\n if (ctx.processing.has(refPath)) {\n // Circular reference - use lazy\n return z.lazy(() => {\n if (!ctx.refs.has(refPath)) {\n throw new Error(`Circular reference not resolved: ${refPath}`);\n }\n return ctx.refs.get(refPath);\n });\n }\n ctx.processing.add(refPath);\n const resolved = resolveRef(refPath, ctx);\n const zodSchema = convertSchema(resolved, ctx);\n ctx.refs.set(refPath, zodSchema);\n ctx.processing.delete(refPath);\n return zodSchema;\n }\n // Handle enum\n if (schema.enum !== undefined) {\n const enumValues = schema.enum;\n // Special case: OpenAPI 3.0 null representation { type: \"string\", nullable: true, enum: [null] }\n if (ctx.version === \"openapi-3.0\" &&\n schema.nullable === true &&\n enumValues.length === 1 &&\n enumValues[0] === null) {\n return z.null();\n }\n if (enumValues.length === 0) {\n return z.never();\n }\n if (enumValues.length === 1) {\n return z.literal(enumValues[0]);\n }\n // Check if all values are strings\n if (enumValues.every((v) => typeof v === \"string\")) {\n return z.enum(enumValues);\n }\n // Mixed types - use union of literals\n const literalSchemas = enumValues.map((v) => z.literal(v));\n if (literalSchemas.length < 2) {\n return literalSchemas[0];\n }\n return z.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]);\n }\n // Handle const\n if (schema.const !== undefined) {\n return z.literal(schema.const);\n }\n // Handle type\n const type = schema.type;\n if (Array.isArray(type)) {\n // Expand type array into anyOf union\n const typeSchemas = type.map((t) => {\n const typeSchema = { ...schema, type: t };\n return convertBaseSchema(typeSchema, ctx);\n });\n if (typeSchemas.length === 0) {\n return z.never();\n }\n if (typeSchemas.length === 1) {\n return typeSchemas[0];\n }\n return z.union(typeSchemas);\n }\n if (!type) {\n // No type specified - empty schema (any)\n return z.any();\n }\n let zodSchema;\n switch (type) {\n case \"string\": {\n let stringSchema = z.string();\n // Apply format using .check() with Zod format functions\n if (schema.format) {\n const format = schema.format;\n // Map common formats to Zod check functions\n if (format === \"email\") {\n stringSchema = stringSchema.check(z.email());\n }\n else if (format === \"uri\" || format === \"uri-reference\") {\n stringSchema = stringSchema.check(z.url());\n }\n else if (format === \"uuid\" || format === \"guid\") {\n stringSchema = stringSchema.check(z.uuid());\n }\n else if (format === \"date-time\") {\n stringSchema = stringSchema.check(z.iso.datetime());\n }\n else if (format === \"date\") {\n stringSchema = stringSchema.check(z.iso.date());\n }\n else if (format === \"time\") {\n stringSchema = stringSchema.check(z.iso.time());\n }\n else if (format === \"duration\") {\n stringSchema = stringSchema.check(z.iso.duration());\n }\n else if (format === \"ipv4\") {\n stringSchema = stringSchema.check(z.ipv4());\n }\n else if (format === \"ipv6\") {\n stringSchema = stringSchema.check(z.ipv6());\n }\n else if (format === \"mac\") {\n stringSchema = stringSchema.check(z.mac());\n }\n else if (format === \"cidr\") {\n stringSchema = stringSchema.check(z.cidrv4());\n }\n else if (format === \"cidr-v6\") {\n stringSchema = stringSchema.check(z.cidrv6());\n }\n else if (format === \"base64\") {\n stringSchema = stringSchema.check(z.base64());\n }\n else if (format === \"base64url\") {\n stringSchema = stringSchema.check(z.base64url());\n }\n else if (format === \"e164\") {\n stringSchema = stringSchema.check(z.e164());\n }\n else if (format === \"jwt\") {\n stringSchema = stringSchema.check(z.jwt());\n }\n else if (format === \"emoji\") {\n stringSchema = stringSchema.check(z.emoji());\n }\n else if (format === \"nanoid\") {\n stringSchema = stringSchema.check(z.nanoid());\n }\n else if (format === \"cuid\") {\n stringSchema = stringSchema.check(z.cuid());\n }\n else if (format === \"cuid2\") {\n stringSchema = stringSchema.check(z.cuid2());\n }\n else if (format === \"ulid\") {\n stringSchema = stringSchema.check(z.ulid());\n }\n else if (format === \"xid\") {\n stringSchema = stringSchema.check(z.xid());\n }\n else if (format === \"ksuid\") {\n stringSchema = stringSchema.check(z.ksuid());\n }\n // Note: json-string format is not currently supported by Zod\n // Custom formats are ignored - keep as plain string\n }\n // Apply constraints\n if (typeof schema.minLength === \"number\") {\n stringSchema = stringSchema.min(schema.minLength);\n }\n if (typeof schema.maxLength === \"number\") {\n stringSchema = stringSchema.max(schema.maxLength);\n }\n if (schema.pattern) {\n // JSON Schema patterns are not implicitly anchored (match anywhere in string)\n stringSchema = stringSchema.regex(new RegExp(schema.pattern));\n }\n zodSchema = stringSchema;\n break;\n }\n case \"number\":\n case \"integer\": {\n let numberSchema = type === \"integer\" ? z.number().int() : z.number();\n // Apply constraints\n if (typeof schema.minimum === \"number\") {\n numberSchema = numberSchema.min(schema.minimum);\n }\n if (typeof schema.maximum === \"number\") {\n numberSchema = numberSchema.max(schema.maximum);\n }\n if (typeof schema.exclusiveMinimum === \"number\") {\n numberSchema = numberSchema.gt(schema.exclusiveMinimum);\n }\n else if (schema.exclusiveMinimum === true && typeof schema.minimum === \"number\") {\n numberSchema = numberSchema.gt(schema.minimum);\n }\n if (typeof schema.exclusiveMaximum === \"number\") {\n numberSchema = numberSchema.lt(schema.exclusiveMaximum);\n }\n else if (schema.exclusiveMaximum === true && typeof schema.maximum === \"number\") {\n numberSchema = numberSchema.lt(schema.maximum);\n }\n if (typeof schema.multipleOf === \"number\") {\n numberSchema = numberSchema.multipleOf(schema.multipleOf);\n }\n zodSchema = numberSchema;\n break;\n }\n case \"boolean\": {\n zodSchema = z.boolean();\n break;\n }\n case \"null\": {\n zodSchema = z.null();\n break;\n }\n case \"object\": {\n const shape = {};\n const properties = schema.properties || {};\n const requiredSet = new Set(schema.required || []);\n // Convert properties - mark optional ones\n for (const [key, propSchema] of Object.entries(properties)) {\n const propZodSchema = convertSchema(propSchema, ctx);\n // If not in required array, make it optional\n shape[key] = requiredSet.has(key) ? propZodSchema : propZodSchema.optional();\n }\n // Handle propertyNames\n if (schema.propertyNames) {\n const keySchema = convertSchema(schema.propertyNames, ctx);\n const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === \"object\"\n ? convertSchema(schema.additionalProperties, ctx)\n : z.any();\n // Case A: No properties (pure record)\n if (Object.keys(shape).length === 0) {\n zodSchema = z.record(keySchema, valueSchema);\n break;\n }\n // Case B: With properties (intersection of object and looseRecord)\n const objectSchema = z.object(shape).passthrough();\n const recordSchema = z.looseRecord(keySchema, valueSchema);\n zodSchema = z.intersection(objectSchema, recordSchema);\n break;\n }\n // Handle patternProperties\n if (schema.patternProperties) {\n // patternProperties: keys matching pattern must satisfy corresponding schema\n // Use loose records so non-matching keys pass through\n const patternProps = schema.patternProperties;\n const patternKeys = Object.keys(patternProps);\n const looseRecords = [];\n for (const pattern of patternKeys) {\n const patternValue = convertSchema(patternProps[pattern], ctx);\n const keySchema = z.string().regex(new RegExp(pattern));\n looseRecords.push(z.looseRecord(keySchema, patternValue));\n }\n // Build intersection: object schema + all pattern property records\n const schemasToIntersect = [];\n if (Object.keys(shape).length > 0) {\n // Use passthrough so patternProperties can validate additional keys\n schemasToIntersect.push(z.object(shape).passthrough());\n }\n schemasToIntersect.push(...looseRecords);\n if (schemasToIntersect.length === 0) {\n zodSchema = z.object({}).passthrough();\n }\n else if (schemasToIntersect.length === 1) {\n zodSchema = schemasToIntersect[0];\n }\n else {\n // Chain intersections: (A & B) & C & D ...\n let result = z.intersection(schemasToIntersect[0], schemasToIntersect[1]);\n for (let i = 2; i < schemasToIntersect.length; i++) {\n result = z.intersection(result, schemasToIntersect[i]);\n }\n zodSchema = result;\n }\n break;\n }\n // Handle additionalProperties\n // In JSON Schema, additionalProperties defaults to true (allow any extra properties)\n // In Zod, objects strip unknown keys by default, so we need to handle this explicitly\n const objectSchema = z.object(shape);\n if (schema.additionalProperties === false) {\n // Strict mode - no extra properties allowed\n zodSchema = objectSchema.strict();\n }\n else if (typeof schema.additionalProperties === \"object\") {\n // Extra properties must match the specified schema\n zodSchema = objectSchema.catchall(convertSchema(schema.additionalProperties, ctx));\n }\n else {\n // additionalProperties is true or undefined - allow any extra properties (passthrough)\n zodSchema = objectSchema.passthrough();\n }\n break;\n }\n case \"array\": {\n // TODO: uniqueItems is not supported\n // TODO: contains/minContains/maxContains are not supported\n // Check if this is a tuple (prefixItems or items as array)\n const prefixItems = schema.prefixItems;\n const items = schema.items;\n if (prefixItems && Array.isArray(prefixItems)) {\n // Tuple with prefixItems (draft-2020-12)\n const tupleItems = prefixItems.map((item) => convertSchema(item, ctx));\n const rest = items && typeof items === \"object\" && !Array.isArray(items)\n ? convertSchema(items, ctx)\n : undefined;\n if (rest) {\n zodSchema = z.tuple(tupleItems).rest(rest);\n }\n else {\n zodSchema = z.tuple(tupleItems);\n }\n // Apply minItems/maxItems constraints to tuples\n if (typeof schema.minItems === \"number\") {\n zodSchema = zodSchema.check(z.minLength(schema.minItems));\n }\n if (typeof schema.maxItems === \"number\") {\n zodSchema = zodSchema.check(z.maxLength(schema.maxItems));\n }\n }\n else if (Array.isArray(items)) {\n // Tuple with items array (draft-7)\n const tupleItems = items.map((item) => convertSchema(item, ctx));\n const rest = schema.additionalItems && typeof schema.additionalItems === \"object\"\n ? convertSchema(schema.additionalItems, ctx)\n : undefined; // additionalItems: false means no rest, handled by default tuple behavior\n if (rest) {\n zodSchema = z.tuple(tupleItems).rest(rest);\n }\n else {\n zodSchema = z.tuple(tupleItems);\n }\n // Apply minItems/maxItems constraints to tuples\n if (typeof schema.minItems === \"number\") {\n zodSchema = zodSchema.check(z.minLength(schema.minItems));\n }\n if (typeof schema.maxItems === \"number\") {\n zodSchema = zodSchema.check(z.maxLength(schema.maxItems));\n }\n }\n else if (items !== undefined) {\n // Regular array\n const element = convertSchema(items, ctx);\n let arraySchema = z.array(element);\n // Apply constraints\n if (typeof schema.minItems === \"number\") {\n arraySchema = arraySchema.min(schema.minItems);\n }\n if (typeof schema.maxItems === \"number\") {\n arraySchema = arraySchema.max(schema.maxItems);\n }\n zodSchema = arraySchema;\n }\n else {\n // No items specified - array of any\n zodSchema = z.array(z.any());\n }\n break;\n }\n default:\n throw new Error(`Unsupported type: ${type}`);\n }\n // Apply metadata\n if (schema.description) {\n zodSchema = zodSchema.describe(schema.description);\n }\n if (schema.default !== undefined) {\n zodSchema = zodSchema.default(schema.default);\n }\n return zodSchema;\n}\nfunction convertSchema(schema, ctx) {\n if (typeof schema === \"boolean\") {\n return schema ? z.any() : z.never();\n }\n // Convert base schema first (ignoring composition keywords)\n let baseSchema = convertBaseSchema(schema, ctx);\n const hasExplicitType = schema.type || schema.enum !== undefined || schema.const !== undefined;\n // Process composition keywords LAST (they can appear together)\n // Handle anyOf - wrap base schema with union\n if (schema.anyOf && Array.isArray(schema.anyOf)) {\n const options = schema.anyOf.map((s) => convertSchema(s, ctx));\n const anyOfUnion = z.union(options);\n baseSchema = hasExplicitType ? z.intersection(baseSchema, anyOfUnion) : anyOfUnion;\n }\n // Handle oneOf - exclusive union (exactly one must match)\n if (schema.oneOf && Array.isArray(schema.oneOf)) {\n const options = schema.oneOf.map((s) => convertSchema(s, ctx));\n const oneOfUnion = z.xor(options);\n baseSchema = hasExplicitType ? z.intersection(baseSchema, oneOfUnion) : oneOfUnion;\n }\n // Handle allOf - wrap base schema with intersection\n if (schema.allOf && Array.isArray(schema.allOf)) {\n if (schema.allOf.length === 0) {\n baseSchema = hasExplicitType ? baseSchema : z.any();\n }\n else {\n let result = hasExplicitType ? baseSchema : convertSchema(schema.allOf[0], ctx);\n const startIdx = hasExplicitType ? 0 : 1;\n for (let i = startIdx; i < schema.allOf.length; i++) {\n result = z.intersection(result, convertSchema(schema.allOf[i], ctx));\n }\n baseSchema = result;\n }\n }\n // Handle nullable (OpenAPI 3.0)\n if (schema.nullable === true && ctx.version === \"openapi-3.0\") {\n baseSchema = z.nullable(baseSchema);\n }\n // Handle readOnly\n if (schema.readOnly === true) {\n baseSchema = z.readonly(baseSchema);\n }\n // Collect metadata: core schema keywords and unrecognized keys\n const extraMeta = {};\n // Core schema keywords that should be captured as metadata\n const coreMetadataKeys = [\"$id\", \"id\", \"$comment\", \"$anchor\", \"$vocabulary\", \"$dynamicRef\", \"$dynamicAnchor\"];\n for (const key of coreMetadataKeys) {\n if (key in schema) {\n extraMeta[key] = schema[key];\n }\n }\n // Content keywords - store as metadata\n const contentMetadataKeys = [\"contentEncoding\", \"contentMediaType\", \"contentSchema\"];\n for (const key of contentMetadataKeys) {\n if (key in schema) {\n extraMeta[key] = schema[key];\n }\n }\n // Unrecognized keys (custom metadata)\n for (const key of Object.keys(schema)) {\n if (!RECOGNIZED_KEYS.has(key)) {\n extraMeta[key] = schema[key];\n }\n }\n if (Object.keys(extraMeta).length > 0) {\n ctx.registry.add(baseSchema, extraMeta);\n }\n return baseSchema;\n}\n/**\n * Converts a JSON Schema to a Zod schema. This function should be considered semi-experimental. It's behavior is liable to change. */\nexport function fromJSONSchema(schema, params) {\n // Handle boolean schemas\n if (typeof schema === \"boolean\") {\n return schema ? z.any() : z.never();\n }\n const version = detectVersion(schema, params?.defaultTarget);\n const defs = (schema.$defs || schema.definitions || {});\n const ctx = {\n version,\n defs,\n refs: new Map(),\n processing: new Set(),\n rootSchema: schema,\n registry: params?.registry ?? globalRegistry,\n };\n return convertSchema(schema, ctx);\n}\n"],"names":["_schemas","_checks","zodSchema","objectSchema","globalRegistry"],"mappings":";;;;;;AAKA,MAAM,IAAI;AAAA,EACN,GAAGA;AAAAA,EACH,GAAGC;AAAAA,EACH;AACJ;AAEA,MAAM,kBAAkB,oBAAI,IAAI;AAAA;AAAA,EAE5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;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O,cAAc,QAAQ,GAAG;AACpC;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"from-json-schema.cjs","sources":["../../../../../node_modules/zod/v4/classic/from-json-schema.js"],"sourcesContent":["import { globalRegistry } from \"../core/registries.js\";\nimport * as _checks from \"./checks.js\";\nimport * as _iso from \"./iso.js\";\nimport * as _schemas from \"./schemas.js\";\n// Local z object to avoid circular dependency with ../index.js\nconst z = {\n ..._schemas,\n ..._checks,\n iso: _iso,\n};\n// Keys that are recognized and handled by the conversion logic\nconst RECOGNIZED_KEYS = /*@__PURE__*/ new Set([\n // Schema identification\n \"$schema\",\n \"$ref\",\n \"$defs\",\n \"definitions\",\n // Core schema keywords\n \"$id\",\n \"id\",\n \"$comment\",\n \"$anchor\",\n \"$vocabulary\",\n \"$dynamicRef\",\n \"$dynamicAnchor\",\n // Type\n \"type\",\n \"enum\",\n \"const\",\n // Composition\n \"anyOf\",\n \"oneOf\",\n \"allOf\",\n \"not\",\n // Object\n \"properties\",\n \"required\",\n \"additionalProperties\",\n \"patternProperties\",\n \"propertyNames\",\n \"minProperties\",\n \"maxProperties\",\n // Array\n \"items\",\n \"prefixItems\",\n \"additionalItems\",\n \"minItems\",\n \"maxItems\",\n \"uniqueItems\",\n \"contains\",\n \"minContains\",\n \"maxContains\",\n // String\n \"minLength\",\n \"maxLength\",\n \"pattern\",\n \"format\",\n // Number\n \"minimum\",\n \"maximum\",\n \"exclusiveMinimum\",\n \"exclusiveMaximum\",\n \"multipleOf\",\n // Already handled metadata\n \"description\",\n \"default\",\n // Content\n \"contentEncoding\",\n \"contentMediaType\",\n \"contentSchema\",\n // Unsupported (error-throwing)\n \"unevaluatedItems\",\n \"unevaluatedProperties\",\n \"if\",\n \"then\",\n \"else\",\n \"dependentSchemas\",\n \"dependentRequired\",\n // OpenAPI\n \"nullable\",\n \"readOnly\",\n]);\nfunction detectVersion(schema, defaultTarget) {\n const $schema = schema.$schema;\n if ($schema === \"https://json-schema.org/draft/2020-12/schema\") {\n return \"draft-2020-12\";\n }\n if ($schema === \"http://json-schema.org/draft-07/schema#\") {\n return \"draft-7\";\n }\n if ($schema === \"http://json-schema.org/draft-04/schema#\") {\n return \"draft-4\";\n }\n // Use defaultTarget if provided, otherwise default to draft-2020-12\n return defaultTarget ?? \"draft-2020-12\";\n}\nfunction resolveRef(ref, ctx) {\n if (!ref.startsWith(\"#\")) {\n throw new Error(\"External $ref is not supported, only local refs (#/...) are allowed\");\n }\n const path = ref.slice(1).split(\"/\").filter(Boolean);\n // Handle root reference \"#\"\n if (path.length === 0) {\n return ctx.rootSchema;\n }\n const defsKey = ctx.version === \"draft-2020-12\" ? \"$defs\" : \"definitions\";\n if (path[0] === defsKey) {\n const key = path[1];\n if (!key || !ctx.defs[key]) {\n throw new Error(`Reference not found: ${ref}`);\n }\n return ctx.defs[key];\n }\n throw new Error(`Reference not found: ${ref}`);\n}\nfunction convertBaseSchema(schema, ctx) {\n // Handle unsupported features\n if (schema.not !== undefined) {\n // Special case: { not: {} } represents never\n if (typeof schema.not === \"object\" && Object.keys(schema.not).length === 0) {\n return z.never();\n }\n throw new Error(\"not is not supported in Zod (except { not: {} } for never)\");\n }\n if (schema.unevaluatedItems !== undefined) {\n throw new Error(\"unevaluatedItems is not supported\");\n }\n if (schema.unevaluatedProperties !== undefined) {\n throw new Error(\"unevaluatedProperties is not supported\");\n }\n if (schema.if !== undefined || schema.then !== undefined || schema.else !== undefined) {\n throw new Error(\"Conditional schemas (if/then/else) are not supported\");\n }\n if (schema.dependentSchemas !== undefined || schema.dependentRequired !== undefined) {\n throw new Error(\"dependentSchemas and dependentRequired are not supported\");\n }\n // Handle $ref\n if (schema.$ref) {\n const refPath = schema.$ref;\n if (ctx.refs.has(refPath)) {\n return ctx.refs.get(refPath);\n }\n if (ctx.processing.has(refPath)) {\n // Circular reference - use lazy\n return z.lazy(() => {\n if (!ctx.refs.has(refPath)) {\n throw new Error(`Circular reference not resolved: ${refPath}`);\n }\n return ctx.refs.get(refPath);\n });\n }\n ctx.processing.add(refPath);\n const resolved = resolveRef(refPath, ctx);\n const zodSchema = convertSchema(resolved, ctx);\n ctx.refs.set(refPath, zodSchema);\n ctx.processing.delete(refPath);\n return zodSchema;\n }\n // Handle enum\n if (schema.enum !== undefined) {\n const enumValues = schema.enum;\n // Special case: OpenAPI 3.0 null representation { type: \"string\", nullable: true, enum: [null] }\n if (ctx.version === \"openapi-3.0\" &&\n schema.nullable === true &&\n enumValues.length === 1 &&\n enumValues[0] === null) {\n return z.null();\n }\n if (enumValues.length === 0) {\n return z.never();\n }\n if (enumValues.length === 1) {\n return z.literal(enumValues[0]);\n }\n // Check if all values are strings\n if (enumValues.every((v) => typeof v === \"string\")) {\n return z.enum(enumValues);\n }\n // Mixed types - use union of literals\n const literalSchemas = enumValues.map((v) => z.literal(v));\n if (literalSchemas.length < 2) {\n return literalSchemas[0];\n }\n return z.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]);\n }\n // Handle const\n if (schema.const !== undefined) {\n return z.literal(schema.const);\n }\n // Handle type\n const type = schema.type;\n if (Array.isArray(type)) {\n // Expand type array into anyOf union\n const typeSchemas = type.map((t) => {\n const typeSchema = { ...schema, type: t };\n return convertBaseSchema(typeSchema, ctx);\n });\n if (typeSchemas.length === 0) {\n return z.never();\n }\n if (typeSchemas.length === 1) {\n return typeSchemas[0];\n }\n return z.union(typeSchemas);\n }\n if (!type) {\n // No type specified - empty schema (any)\n return z.any();\n }\n let zodSchema;\n switch (type) {\n case \"string\": {\n let stringSchema = z.string();\n // Apply format using .check() with Zod format functions\n if (schema.format) {\n const format = schema.format;\n // Map common formats to Zod check functions\n if (format === \"email\") {\n stringSchema = stringSchema.check(z.email());\n }\n else if (format === \"uri\" || format === \"uri-reference\") {\n stringSchema = stringSchema.check(z.url());\n }\n else if (format === \"uuid\" || format === \"guid\") {\n stringSchema = stringSchema.check(z.uuid());\n }\n else if (format === \"date-time\") {\n stringSchema = stringSchema.check(z.iso.datetime());\n }\n else if (format === \"date\") {\n stringSchema = stringSchema.check(z.iso.date());\n }\n else if (format === \"time\") {\n stringSchema = stringSchema.check(z.iso.time());\n }\n else if (format === \"duration\") {\n stringSchema = stringSchema.check(z.iso.duration());\n }\n else if (format === \"ipv4\") {\n stringSchema = stringSchema.check(z.ipv4());\n }\n else if (format === \"ipv6\") {\n stringSchema = stringSchema.check(z.ipv6());\n }\n else if (format === \"mac\") {\n stringSchema = stringSchema.check(z.mac());\n }\n else if (format === \"cidr\") {\n stringSchema = stringSchema.check(z.cidrv4());\n }\n else if (format === \"cidr-v6\") {\n stringSchema = stringSchema.check(z.cidrv6());\n }\n else if (format === \"base64\") {\n stringSchema = stringSchema.check(z.base64());\n }\n else if (format === \"base64url\") {\n stringSchema = stringSchema.check(z.base64url());\n }\n else if (format === \"e164\") {\n stringSchema = stringSchema.check(z.e164());\n }\n else if (format === \"jwt\") {\n stringSchema = stringSchema.check(z.jwt());\n }\n else if (format === \"emoji\") {\n stringSchema = stringSchema.check(z.emoji());\n }\n else if (format === \"nanoid\") {\n stringSchema = stringSchema.check(z.nanoid());\n }\n else if (format === \"cuid\") {\n stringSchema = stringSchema.check(z.cuid());\n }\n else if (format === \"cuid2\") {\n stringSchema = stringSchema.check(z.cuid2());\n }\n else if (format === \"ulid\") {\n stringSchema = stringSchema.check(z.ulid());\n }\n else if (format === \"xid\") {\n stringSchema = stringSchema.check(z.xid());\n }\n else if (format === \"ksuid\") {\n stringSchema = stringSchema.check(z.ksuid());\n }\n // Note: json-string format is not currently supported by Zod\n // Custom formats are ignored - keep as plain string\n }\n // Apply constraints\n if (typeof schema.minLength === \"number\") {\n stringSchema = stringSchema.min(schema.minLength);\n }\n if (typeof schema.maxLength === \"number\") {\n stringSchema = stringSchema.max(schema.maxLength);\n }\n if (schema.pattern) {\n // JSON Schema patterns are not implicitly anchored (match anywhere in string)\n stringSchema = stringSchema.regex(new RegExp(schema.pattern));\n }\n zodSchema = stringSchema;\n break;\n }\n case \"number\":\n case \"integer\": {\n let numberSchema = type === \"integer\" ? z.number().int() : z.number();\n // Apply constraints\n if (typeof schema.minimum === \"number\") {\n numberSchema = numberSchema.min(schema.minimum);\n }\n if (typeof schema.maximum === \"number\") {\n numberSchema = numberSchema.max(schema.maximum);\n }\n if (typeof schema.exclusiveMinimum === \"number\") {\n numberSchema = numberSchema.gt(schema.exclusiveMinimum);\n }\n else if (schema.exclusiveMinimum === true && typeof schema.minimum === \"number\") {\n numberSchema = numberSchema.gt(schema.minimum);\n }\n if (typeof schema.exclusiveMaximum === \"number\") {\n numberSchema = numberSchema.lt(schema.exclusiveMaximum);\n }\n else if (schema.exclusiveMaximum === true && typeof schema.maximum === \"number\") {\n numberSchema = numberSchema.lt(schema.maximum);\n }\n if (typeof schema.multipleOf === \"number\") {\n numberSchema = numberSchema.multipleOf(schema.multipleOf);\n }\n zodSchema = numberSchema;\n break;\n }\n case \"boolean\": {\n zodSchema = z.boolean();\n break;\n }\n case \"null\": {\n zodSchema = z.null();\n break;\n }\n case \"object\": {\n const shape = {};\n const properties = schema.properties || {};\n const requiredSet = new Set(schema.required || []);\n // Convert properties - mark optional ones\n for (const [key, propSchema] of Object.entries(properties)) {\n const propZodSchema = convertSchema(propSchema, ctx);\n // If not in required array, make it optional\n shape[key] = requiredSet.has(key) ? propZodSchema : propZodSchema.optional();\n }\n // Handle propertyNames\n if (schema.propertyNames) {\n const keySchema = convertSchema(schema.propertyNames, ctx);\n const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === \"object\"\n ? convertSchema(schema.additionalProperties, ctx)\n : z.any();\n // Case A: No properties (pure record)\n if (Object.keys(shape).length === 0) {\n zodSchema = z.record(keySchema, valueSchema);\n break;\n }\n // Case B: With properties (intersection of object and looseRecord)\n const objectSchema = z.object(shape).passthrough();\n const recordSchema = z.looseRecord(keySchema, valueSchema);\n zodSchema = z.intersection(objectSchema, recordSchema);\n break;\n }\n // Handle patternProperties\n if (schema.patternProperties) {\n // patternProperties: keys matching pattern must satisfy corresponding schema\n // Use loose records so non-matching keys pass through\n const patternProps = schema.patternProperties;\n const patternKeys = Object.keys(patternProps);\n const looseRecords = [];\n for (const pattern of patternKeys) {\n const patternValue = convertSchema(patternProps[pattern], ctx);\n const keySchema = z.string().regex(new RegExp(pattern));\n looseRecords.push(z.looseRecord(keySchema, patternValue));\n }\n // Build intersection: object schema + all pattern property records\n const schemasToIntersect = [];\n if (Object.keys(shape).length > 0) {\n // Use passthrough so patternProperties can validate additional keys\n schemasToIntersect.push(z.object(shape).passthrough());\n }\n schemasToIntersect.push(...looseRecords);\n if (schemasToIntersect.length === 0) {\n zodSchema = z.object({}).passthrough();\n }\n else if (schemasToIntersect.length === 1) {\n zodSchema = schemasToIntersect[0];\n }\n else {\n // Chain intersections: (A & B) & C & D ...\n let result = z.intersection(schemasToIntersect[0], schemasToIntersect[1]);\n for (let i = 2; i < schemasToIntersect.length; i++) {\n result = z.intersection(result, schemasToIntersect[i]);\n }\n zodSchema = result;\n }\n break;\n }\n // Handle additionalProperties\n // In JSON Schema, additionalProperties defaults to true (allow any extra properties)\n // In Zod, objects strip unknown keys by default, so we need to handle this explicitly\n const objectSchema = z.object(shape);\n if (schema.additionalProperties === false) {\n // Strict mode - no extra properties allowed\n zodSchema = objectSchema.strict();\n }\n else if (typeof schema.additionalProperties === \"object\") {\n // Extra properties must match the specified schema\n zodSchema = objectSchema.catchall(convertSchema(schema.additionalProperties, ctx));\n }\n else {\n // additionalProperties is true or undefined - allow any extra properties (passthrough)\n zodSchema = objectSchema.passthrough();\n }\n break;\n }\n case \"array\": {\n // TODO: uniqueItems is not supported\n // TODO: contains/minContains/maxContains are not supported\n // Check if this is a tuple (prefixItems or items as array)\n const prefixItems = schema.prefixItems;\n const items = schema.items;\n if (prefixItems && Array.isArray(prefixItems)) {\n // Tuple with prefixItems (draft-2020-12)\n const tupleItems = prefixItems.map((item) => convertSchema(item, ctx));\n const rest = items && typeof items === \"object\" && !Array.isArray(items)\n ? convertSchema(items, ctx)\n : undefined;\n if (rest) {\n zodSchema = z.tuple(tupleItems).rest(rest);\n }\n else {\n zodSchema = z.tuple(tupleItems);\n }\n // Apply minItems/maxItems constraints to tuples\n if (typeof schema.minItems === \"number\") {\n zodSchema = zodSchema.check(z.minLength(schema.minItems));\n }\n if (typeof schema.maxItems === \"number\") {\n zodSchema = zodSchema.check(z.maxLength(schema.maxItems));\n }\n }\n else if (Array.isArray(items)) {\n // Tuple with items array (draft-7)\n const tupleItems = items.map((item) => convertSchema(item, ctx));\n const rest = schema.additionalItems && typeof schema.additionalItems === \"object\"\n ? convertSchema(schema.additionalItems, ctx)\n : undefined; // additionalItems: false means no rest, handled by default tuple behavior\n if (rest) {\n zodSchema = z.tuple(tupleItems).rest(rest);\n }\n else {\n zodSchema = z.tuple(tupleItems);\n }\n // Apply minItems/maxItems constraints to tuples\n if (typeof schema.minItems === \"number\") {\n zodSchema = zodSchema.check(z.minLength(schema.minItems));\n }\n if (typeof schema.maxItems === \"number\") {\n zodSchema = zodSchema.check(z.maxLength(schema.maxItems));\n }\n }\n else if (items !== undefined) {\n // Regular array\n const element = convertSchema(items, ctx);\n let arraySchema = z.array(element);\n // Apply constraints\n if (typeof schema.minItems === \"number\") {\n arraySchema = arraySchema.min(schema.minItems);\n }\n if (typeof schema.maxItems === \"number\") {\n arraySchema = arraySchema.max(schema.maxItems);\n }\n zodSchema = arraySchema;\n }\n else {\n // No items specified - array of any\n zodSchema = z.array(z.any());\n }\n break;\n }\n default:\n throw new Error(`Unsupported type: ${type}`);\n }\n return zodSchema;\n}\nfunction convertSchema(schema, ctx) {\n if (typeof schema === \"boolean\") {\n return schema ? z.any() : z.never();\n }\n // Convert base schema first (ignoring composition keywords)\n let baseSchema = convertBaseSchema(schema, ctx);\n const hasExplicitType = schema.type || schema.enum !== undefined || schema.const !== undefined;\n // Process composition keywords LAST (they can appear together)\n // Handle anyOf - wrap base schema with union\n if (schema.anyOf && Array.isArray(schema.anyOf)) {\n const options = schema.anyOf.map((s) => convertSchema(s, ctx));\n const anyOfUnion = z.union(options);\n baseSchema = hasExplicitType ? z.intersection(baseSchema, anyOfUnion) : anyOfUnion;\n }\n // Handle oneOf - exclusive union (exactly one must match)\n if (schema.oneOf && Array.isArray(schema.oneOf)) {\n const options = schema.oneOf.map((s) => convertSchema(s, ctx));\n const oneOfUnion = z.xor(options);\n baseSchema = hasExplicitType ? z.intersection(baseSchema, oneOfUnion) : oneOfUnion;\n }\n // Handle allOf - wrap base schema with intersection\n if (schema.allOf && Array.isArray(schema.allOf)) {\n if (schema.allOf.length === 0) {\n baseSchema = hasExplicitType ? baseSchema : z.any();\n }\n else {\n let result = hasExplicitType ? baseSchema : convertSchema(schema.allOf[0], ctx);\n const startIdx = hasExplicitType ? 0 : 1;\n for (let i = startIdx; i < schema.allOf.length; i++) {\n result = z.intersection(result, convertSchema(schema.allOf[i], ctx));\n }\n baseSchema = result;\n }\n }\n // Handle nullable (OpenAPI 3.0)\n if (schema.nullable === true && ctx.version === \"openapi-3.0\") {\n baseSchema = z.nullable(baseSchema);\n }\n // Handle readOnly\n if (schema.readOnly === true) {\n baseSchema = z.readonly(baseSchema);\n }\n // Apply `default` so it wraps the fully-composed schema. This ensures\n // `parse(undefined) -> default` works regardless of which branch of\n // `convertBaseSchema` produced the inner schema (enum/const/not/typed/etc.).\n if (schema.default !== undefined) {\n baseSchema = baseSchema.default(schema.default);\n }\n // Collect non-description annotation metadata into the user-supplied\n // registry. Description is handled separately below via `.describe()` to\n // preserve the contract that `schema.description` reads from globalRegistry.\n const extraMeta = {};\n const coreMetadataKeys = [\"$id\", \"id\", \"$comment\", \"$anchor\", \"$vocabulary\", \"$dynamicRef\", \"$dynamicAnchor\"];\n for (const key of coreMetadataKeys) {\n if (key in schema) {\n extraMeta[key] = schema[key];\n }\n }\n const contentMetadataKeys = [\"contentEncoding\", \"contentMediaType\", \"contentSchema\"];\n for (const key of contentMetadataKeys) {\n if (key in schema) {\n extraMeta[key] = schema[key];\n }\n }\n for (const key of Object.keys(schema)) {\n if (!RECOGNIZED_KEYS.has(key)) {\n extraMeta[key] = schema[key];\n }\n }\n if (Object.keys(extraMeta).length > 0) {\n ctx.registry.add(baseSchema, extraMeta);\n }\n // Apply description last. `.describe()` clones the schema and sets\n // `_zod.parent` on the clone, so registry lookups on the returned reference\n // still resolve `extraMeta` via parent inheritance.\n if (schema.description) {\n baseSchema = baseSchema.describe(schema.description);\n }\n return baseSchema;\n}\n/**\n * Converts a JSON Schema to a Zod schema. This function should be considered semi-experimental. It's behavior is liable to change. */\nexport function fromJSONSchema(schema, params) {\n // Handle boolean schemas\n if (typeof schema === \"boolean\") {\n return schema ? z.any() : z.never();\n }\n // Normalize input via a JSON round-trip. This guarantees the converter\n // walks a plain, finite, JSON-valid object graph: cyclic inputs fail here,\n // getter/Proxy-based properties are materialized into static values, and\n // class instances collapse to plain objects.\n let normalized;\n try {\n normalized = JSON.parse(JSON.stringify(schema));\n }\n catch {\n throw new Error(\"fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas\");\n }\n const version = detectVersion(normalized, params?.defaultTarget);\n const defs = (normalized.$defs || normalized.definitions || {});\n const ctx = {\n version,\n defs,\n refs: new Map(),\n processing: new Set(),\n rootSchema: normalized,\n registry: params?.registry ?? globalRegistry,\n };\n return convertSchema(normalized, ctx);\n}\n"],"names":["_schemas","_checks","zodSchema","objectSchema","globalRegistry"],"mappings":";;;;;;AAKA,MAAM,IAAI;AAAA,EACN,GAAGA;AAAAA,EACH,GAAGC;AAAAA,EACH;AACJ;AAEA,MAAM,kBAAgC,oBAAI,IAAI;AAAA;AAAA,EAE1C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA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QAAQ;AAE3C,MAAI,OAAO,WAAW,WAAW;AAC7B,WAAO,SAAS,EAAE,IAAG,IAAK,EAAE,MAAK;AAAA,EACrC;AAKA,MAAI;AACJ,MAAI;AACA,iBAAa,KAAK,MAAM,KAAK,UAAU,MAAM,CAAC;AAAA,EAClD,QACM;AACF,UAAM,IAAI,MAAM,gGAAgG;AAAA,EACpH;AACA,QAAM,UAAU,cAAc,YAAY,QAAQ,aAAa;AAC/D,QAAM,OAAQ,WAAW,SAAS,WAAW,eAAe,CAAA;AAC5D,QAAM,MAAM;AAAA,IACR;AAAA,IACA;AAAA,IACA,MAAM,oBAAI,IAAG;AAAA,IACb,YAAY,oBAAI,IAAG;AAAA,IACnB,YAAY;AAAA,IACZ,UAAU,QAAQ,YAAYC,WAAAA;AAAAA,EACtC;AACI,SAAO,cAAc,YAAY,GAAG;AACxC;;","x_google_ignoreList":[0]}
|
|
@@ -393,12 +393,6 @@ function convertBaseSchema(schema, ctx) {
|
|
|
393
393
|
default:
|
|
394
394
|
throw new Error(`Unsupported type: ${type}`);
|
|
395
395
|
}
|
|
396
|
-
if (schema.description) {
|
|
397
|
-
zodSchema = zodSchema.describe(schema.description);
|
|
398
|
-
}
|
|
399
|
-
if (schema.default !== void 0) {
|
|
400
|
-
zodSchema = zodSchema.default(schema.default);
|
|
401
|
-
}
|
|
402
396
|
return zodSchema;
|
|
403
397
|
}
|
|
404
398
|
function convertSchema(schema, ctx) {
|
|
@@ -435,6 +429,9 @@ function convertSchema(schema, ctx) {
|
|
|
435
429
|
if (schema.readOnly === true) {
|
|
436
430
|
baseSchema = z.readonly(baseSchema);
|
|
437
431
|
}
|
|
432
|
+
if (schema.default !== void 0) {
|
|
433
|
+
baseSchema = baseSchema.default(schema.default);
|
|
434
|
+
}
|
|
438
435
|
const extraMeta = {};
|
|
439
436
|
const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
|
|
440
437
|
for (const key of coreMetadataKeys) {
|
|
@@ -456,23 +453,32 @@ function convertSchema(schema, ctx) {
|
|
|
456
453
|
if (Object.keys(extraMeta).length > 0) {
|
|
457
454
|
ctx.registry.add(baseSchema, extraMeta);
|
|
458
455
|
}
|
|
456
|
+
if (schema.description) {
|
|
457
|
+
baseSchema = baseSchema.describe(schema.description);
|
|
458
|
+
}
|
|
459
459
|
return baseSchema;
|
|
460
460
|
}
|
|
461
461
|
function fromJSONSchema(schema, params) {
|
|
462
462
|
if (typeof schema === "boolean") {
|
|
463
463
|
return schema ? z.any() : z.never();
|
|
464
464
|
}
|
|
465
|
-
|
|
466
|
-
|
|
465
|
+
let normalized;
|
|
466
|
+
try {
|
|
467
|
+
normalized = JSON.parse(JSON.stringify(schema));
|
|
468
|
+
} catch {
|
|
469
|
+
throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas");
|
|
470
|
+
}
|
|
471
|
+
const version = detectVersion(normalized, params?.defaultTarget);
|
|
472
|
+
const defs = normalized.$defs || normalized.definitions || {};
|
|
467
473
|
const ctx = {
|
|
468
474
|
version,
|
|
469
475
|
defs,
|
|
470
476
|
refs: /* @__PURE__ */ new Map(),
|
|
471
477
|
processing: /* @__PURE__ */ new Set(),
|
|
472
|
-
rootSchema:
|
|
478
|
+
rootSchema: normalized,
|
|
473
479
|
registry: params?.registry ?? globalRegistry
|
|
474
480
|
};
|
|
475
|
-
return convertSchema(
|
|
481
|
+
return convertSchema(normalized, ctx);
|
|
476
482
|
}
|
|
477
483
|
export {
|
|
478
484
|
fromJSONSchema
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"from-json-schema.js","sources":["../../../../../node_modules/zod/v4/classic/from-json-schema.js"],"sourcesContent":["import { globalRegistry } from \"../core/registries.js\";\nimport * as _checks from \"./checks.js\";\nimport * as _iso from \"./iso.js\";\nimport * as _schemas from \"./schemas.js\";\n// Local z object to avoid circular dependency with ../index.js\nconst z = {\n ..._schemas,\n ..._checks,\n iso: _iso,\n};\n// Keys that are recognized and handled by the conversion logic\nconst RECOGNIZED_KEYS = new Set([\n // Schema identification\n \"$schema\",\n \"$ref\",\n \"$defs\",\n \"definitions\",\n // Core schema keywords\n \"$id\",\n \"id\",\n \"$comment\",\n \"$anchor\",\n \"$vocabulary\",\n \"$dynamicRef\",\n \"$dynamicAnchor\",\n // Type\n \"type\",\n \"enum\",\n \"const\",\n // Composition\n \"anyOf\",\n \"oneOf\",\n \"allOf\",\n \"not\",\n // Object\n \"properties\",\n \"required\",\n \"additionalProperties\",\n \"patternProperties\",\n \"propertyNames\",\n \"minProperties\",\n \"maxProperties\",\n // Array\n \"items\",\n \"prefixItems\",\n \"additionalItems\",\n \"minItems\",\n \"maxItems\",\n \"uniqueItems\",\n \"contains\",\n \"minContains\",\n \"maxContains\",\n // String\n \"minLength\",\n \"maxLength\",\n \"pattern\",\n \"format\",\n // Number\n \"minimum\",\n \"maximum\",\n \"exclusiveMinimum\",\n \"exclusiveMaximum\",\n \"multipleOf\",\n // Already handled metadata\n \"description\",\n \"default\",\n // Content\n \"contentEncoding\",\n \"contentMediaType\",\n \"contentSchema\",\n // Unsupported (error-throwing)\n \"unevaluatedItems\",\n \"unevaluatedProperties\",\n \"if\",\n \"then\",\n \"else\",\n \"dependentSchemas\",\n \"dependentRequired\",\n // OpenAPI\n \"nullable\",\n \"readOnly\",\n]);\nfunction detectVersion(schema, defaultTarget) {\n const $schema = schema.$schema;\n if ($schema === \"https://json-schema.org/draft/2020-12/schema\") {\n return \"draft-2020-12\";\n }\n if ($schema === \"http://json-schema.org/draft-07/schema#\") {\n return \"draft-7\";\n }\n if ($schema === \"http://json-schema.org/draft-04/schema#\") {\n return \"draft-4\";\n }\n // Use defaultTarget if provided, otherwise default to draft-2020-12\n return defaultTarget ?? \"draft-2020-12\";\n}\nfunction resolveRef(ref, ctx) {\n if (!ref.startsWith(\"#\")) {\n throw new Error(\"External $ref is not supported, only local refs (#/...) are allowed\");\n }\n const path = ref.slice(1).split(\"/\").filter(Boolean);\n // Handle root reference \"#\"\n if (path.length === 0) {\n return ctx.rootSchema;\n }\n const defsKey = ctx.version === \"draft-2020-12\" ? \"$defs\" : \"definitions\";\n if (path[0] === defsKey) {\n const key = path[1];\n if (!key || !ctx.defs[key]) {\n throw new Error(`Reference not found: ${ref}`);\n }\n return ctx.defs[key];\n }\n throw new Error(`Reference not found: ${ref}`);\n}\nfunction convertBaseSchema(schema, ctx) {\n // Handle unsupported features\n if (schema.not !== undefined) {\n // Special case: { not: {} } represents never\n if (typeof schema.not === \"object\" && Object.keys(schema.not).length === 0) {\n return z.never();\n }\n throw new Error(\"not is not supported in Zod (except { not: {} } for never)\");\n }\n if (schema.unevaluatedItems !== undefined) {\n throw new Error(\"unevaluatedItems is not supported\");\n }\n if (schema.unevaluatedProperties !== undefined) {\n throw new Error(\"unevaluatedProperties is not supported\");\n }\n if (schema.if !== undefined || schema.then !== undefined || schema.else !== undefined) {\n throw new Error(\"Conditional schemas (if/then/else) are not supported\");\n }\n if (schema.dependentSchemas !== undefined || schema.dependentRequired !== undefined) {\n throw new Error(\"dependentSchemas and dependentRequired are not supported\");\n }\n // Handle $ref\n if (schema.$ref) {\n const refPath = schema.$ref;\n if (ctx.refs.has(refPath)) {\n return ctx.refs.get(refPath);\n }\n if (ctx.processing.has(refPath)) {\n // Circular reference - use lazy\n return z.lazy(() => {\n if (!ctx.refs.has(refPath)) {\n throw new Error(`Circular reference not resolved: ${refPath}`);\n }\n return ctx.refs.get(refPath);\n });\n }\n ctx.processing.add(refPath);\n const resolved = resolveRef(refPath, ctx);\n const zodSchema = convertSchema(resolved, ctx);\n ctx.refs.set(refPath, zodSchema);\n ctx.processing.delete(refPath);\n return zodSchema;\n }\n // Handle enum\n if (schema.enum !== undefined) {\n const enumValues = schema.enum;\n // Special case: OpenAPI 3.0 null representation { type: \"string\", nullable: true, enum: [null] }\n if (ctx.version === \"openapi-3.0\" &&\n schema.nullable === true &&\n enumValues.length === 1 &&\n enumValues[0] === null) {\n return z.null();\n }\n if (enumValues.length === 0) {\n return z.never();\n }\n if (enumValues.length === 1) {\n return z.literal(enumValues[0]);\n }\n // Check if all values are strings\n if (enumValues.every((v) => typeof v === \"string\")) {\n return z.enum(enumValues);\n }\n // Mixed types - use union of literals\n const literalSchemas = enumValues.map((v) => z.literal(v));\n if (literalSchemas.length < 2) {\n return literalSchemas[0];\n }\n return z.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]);\n }\n // Handle const\n if (schema.const !== undefined) {\n return z.literal(schema.const);\n }\n // Handle type\n const type = schema.type;\n if (Array.isArray(type)) {\n // Expand type array into anyOf union\n const typeSchemas = type.map((t) => {\n const typeSchema = { ...schema, type: t };\n return convertBaseSchema(typeSchema, ctx);\n });\n if (typeSchemas.length === 0) {\n return z.never();\n }\n if (typeSchemas.length === 1) {\n return typeSchemas[0];\n }\n return z.union(typeSchemas);\n }\n if (!type) {\n // No type specified - empty schema (any)\n return z.any();\n }\n let zodSchema;\n switch (type) {\n case \"string\": {\n let stringSchema = z.string();\n // Apply format using .check() with Zod format functions\n if (schema.format) {\n const format = schema.format;\n // Map common formats to Zod check functions\n if (format === \"email\") {\n stringSchema = stringSchema.check(z.email());\n }\n else if (format === \"uri\" || format === \"uri-reference\") {\n stringSchema = stringSchema.check(z.url());\n }\n else if (format === \"uuid\" || format === \"guid\") {\n stringSchema = stringSchema.check(z.uuid());\n }\n else if (format === \"date-time\") {\n stringSchema = stringSchema.check(z.iso.datetime());\n }\n else if (format === \"date\") {\n stringSchema = stringSchema.check(z.iso.date());\n }\n else if (format === \"time\") {\n stringSchema = stringSchema.check(z.iso.time());\n }\n else if (format === \"duration\") {\n stringSchema = stringSchema.check(z.iso.duration());\n }\n else if (format === \"ipv4\") {\n stringSchema = stringSchema.check(z.ipv4());\n }\n else if (format === \"ipv6\") {\n stringSchema = stringSchema.check(z.ipv6());\n }\n else if (format === \"mac\") {\n stringSchema = stringSchema.check(z.mac());\n }\n else if (format === \"cidr\") {\n stringSchema = stringSchema.check(z.cidrv4());\n }\n else if (format === \"cidr-v6\") {\n stringSchema = stringSchema.check(z.cidrv6());\n }\n else if (format === \"base64\") {\n stringSchema = stringSchema.check(z.base64());\n }\n else if (format === \"base64url\") {\n stringSchema = stringSchema.check(z.base64url());\n }\n else if (format === \"e164\") {\n stringSchema = stringSchema.check(z.e164());\n }\n else if (format === \"jwt\") {\n stringSchema = stringSchema.check(z.jwt());\n }\n else if (format === \"emoji\") {\n stringSchema = stringSchema.check(z.emoji());\n }\n else if (format === \"nanoid\") {\n stringSchema = stringSchema.check(z.nanoid());\n }\n else if (format === \"cuid\") {\n stringSchema = stringSchema.check(z.cuid());\n }\n else if (format === \"cuid2\") {\n stringSchema = stringSchema.check(z.cuid2());\n }\n else if (format === \"ulid\") {\n stringSchema = stringSchema.check(z.ulid());\n }\n else if (format === \"xid\") {\n stringSchema = stringSchema.check(z.xid());\n }\n else if (format === \"ksuid\") {\n stringSchema = stringSchema.check(z.ksuid());\n }\n // Note: json-string format is not currently supported by Zod\n // Custom formats are ignored - keep as plain string\n }\n // Apply constraints\n if (typeof schema.minLength === \"number\") {\n stringSchema = stringSchema.min(schema.minLength);\n }\n if (typeof schema.maxLength === \"number\") {\n stringSchema = stringSchema.max(schema.maxLength);\n }\n if (schema.pattern) {\n // JSON Schema patterns are not implicitly anchored (match anywhere in string)\n stringSchema = stringSchema.regex(new RegExp(schema.pattern));\n }\n zodSchema = stringSchema;\n break;\n }\n case \"number\":\n case \"integer\": {\n let numberSchema = type === \"integer\" ? z.number().int() : z.number();\n // Apply constraints\n if (typeof schema.minimum === \"number\") {\n numberSchema = numberSchema.min(schema.minimum);\n }\n if (typeof schema.maximum === \"number\") {\n numberSchema = numberSchema.max(schema.maximum);\n }\n if (typeof schema.exclusiveMinimum === \"number\") {\n numberSchema = numberSchema.gt(schema.exclusiveMinimum);\n }\n else if (schema.exclusiveMinimum === true && typeof schema.minimum === \"number\") {\n numberSchema = numberSchema.gt(schema.minimum);\n }\n if (typeof schema.exclusiveMaximum === \"number\") {\n numberSchema = numberSchema.lt(schema.exclusiveMaximum);\n }\n else if (schema.exclusiveMaximum === true && typeof schema.maximum === \"number\") {\n numberSchema = numberSchema.lt(schema.maximum);\n }\n if (typeof schema.multipleOf === \"number\") {\n numberSchema = numberSchema.multipleOf(schema.multipleOf);\n }\n zodSchema = numberSchema;\n break;\n }\n case \"boolean\": {\n zodSchema = z.boolean();\n break;\n }\n case \"null\": {\n zodSchema = z.null();\n break;\n }\n case \"object\": {\n const shape = {};\n const properties = schema.properties || {};\n const requiredSet = new Set(schema.required || []);\n // Convert properties - mark optional ones\n for (const [key, propSchema] of Object.entries(properties)) {\n const propZodSchema = convertSchema(propSchema, ctx);\n // If not in required array, make it optional\n shape[key] = requiredSet.has(key) ? propZodSchema : propZodSchema.optional();\n }\n // Handle propertyNames\n if (schema.propertyNames) {\n const keySchema = convertSchema(schema.propertyNames, ctx);\n const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === \"object\"\n ? convertSchema(schema.additionalProperties, ctx)\n : z.any();\n // Case A: No properties (pure record)\n if (Object.keys(shape).length === 0) {\n zodSchema = z.record(keySchema, valueSchema);\n break;\n }\n // Case B: With properties (intersection of object and looseRecord)\n const objectSchema = z.object(shape).passthrough();\n const recordSchema = z.looseRecord(keySchema, valueSchema);\n zodSchema = z.intersection(objectSchema, recordSchema);\n break;\n }\n // Handle patternProperties\n if (schema.patternProperties) {\n // patternProperties: keys matching pattern must satisfy corresponding schema\n // Use loose records so non-matching keys pass through\n const patternProps = schema.patternProperties;\n const patternKeys = Object.keys(patternProps);\n const looseRecords = [];\n for (const pattern of patternKeys) {\n const patternValue = convertSchema(patternProps[pattern], ctx);\n const keySchema = z.string().regex(new RegExp(pattern));\n looseRecords.push(z.looseRecord(keySchema, patternValue));\n }\n // Build intersection: object schema + all pattern property records\n const schemasToIntersect = [];\n if (Object.keys(shape).length > 0) {\n // Use passthrough so patternProperties can validate additional keys\n schemasToIntersect.push(z.object(shape).passthrough());\n }\n schemasToIntersect.push(...looseRecords);\n if (schemasToIntersect.length === 0) {\n zodSchema = z.object({}).passthrough();\n }\n else if (schemasToIntersect.length === 1) {\n zodSchema = schemasToIntersect[0];\n }\n else {\n // Chain intersections: (A & B) & C & D ...\n let result = z.intersection(schemasToIntersect[0], schemasToIntersect[1]);\n for (let i = 2; i < schemasToIntersect.length; i++) {\n result = z.intersection(result, schemasToIntersect[i]);\n }\n zodSchema = result;\n }\n break;\n }\n // Handle additionalProperties\n // In JSON Schema, additionalProperties defaults to true (allow any extra properties)\n // In Zod, objects strip unknown keys by default, so we need to handle this explicitly\n const objectSchema = z.object(shape);\n if (schema.additionalProperties === false) {\n // Strict mode - no extra properties allowed\n zodSchema = objectSchema.strict();\n }\n else if (typeof schema.additionalProperties === \"object\") {\n // Extra properties must match the specified schema\n zodSchema = objectSchema.catchall(convertSchema(schema.additionalProperties, ctx));\n }\n else {\n // additionalProperties is true or undefined - allow any extra properties (passthrough)\n zodSchema = objectSchema.passthrough();\n }\n break;\n }\n case \"array\": {\n // TODO: uniqueItems is not supported\n // TODO: contains/minContains/maxContains are not supported\n // Check if this is a tuple (prefixItems or items as array)\n const prefixItems = schema.prefixItems;\n const items = schema.items;\n if (prefixItems && Array.isArray(prefixItems)) {\n // Tuple with prefixItems (draft-2020-12)\n const tupleItems = prefixItems.map((item) => convertSchema(item, ctx));\n const rest = items && typeof items === \"object\" && !Array.isArray(items)\n ? convertSchema(items, ctx)\n : undefined;\n if (rest) {\n zodSchema = z.tuple(tupleItems).rest(rest);\n }\n else {\n zodSchema = z.tuple(tupleItems);\n }\n // Apply minItems/maxItems constraints to tuples\n if (typeof schema.minItems === \"number\") {\n zodSchema = zodSchema.check(z.minLength(schema.minItems));\n }\n if (typeof schema.maxItems === \"number\") {\n zodSchema = zodSchema.check(z.maxLength(schema.maxItems));\n }\n }\n else if (Array.isArray(items)) {\n // Tuple with items array (draft-7)\n const tupleItems = items.map((item) => convertSchema(item, ctx));\n const rest = schema.additionalItems && typeof schema.additionalItems === \"object\"\n ? convertSchema(schema.additionalItems, ctx)\n : undefined; // additionalItems: false means no rest, handled by default tuple behavior\n if (rest) {\n zodSchema = z.tuple(tupleItems).rest(rest);\n }\n else {\n zodSchema = z.tuple(tupleItems);\n }\n // Apply minItems/maxItems constraints to tuples\n if (typeof schema.minItems === \"number\") {\n zodSchema = zodSchema.check(z.minLength(schema.minItems));\n }\n if (typeof schema.maxItems === \"number\") {\n zodSchema = zodSchema.check(z.maxLength(schema.maxItems));\n }\n }\n else if (items !== undefined) {\n // Regular array\n const element = convertSchema(items, ctx);\n let arraySchema = z.array(element);\n // Apply constraints\n if (typeof schema.minItems === \"number\") {\n arraySchema = arraySchema.min(schema.minItems);\n }\n if (typeof schema.maxItems === \"number\") {\n arraySchema = arraySchema.max(schema.maxItems);\n }\n zodSchema = arraySchema;\n }\n else {\n // No items specified - array of any\n zodSchema = z.array(z.any());\n }\n break;\n }\n default:\n throw new Error(`Unsupported type: ${type}`);\n }\n // Apply metadata\n if (schema.description) {\n zodSchema = zodSchema.describe(schema.description);\n }\n if (schema.default !== undefined) {\n zodSchema = zodSchema.default(schema.default);\n }\n return zodSchema;\n}\nfunction convertSchema(schema, ctx) {\n if (typeof schema === \"boolean\") {\n return schema ? z.any() : z.never();\n }\n // Convert base schema first (ignoring composition keywords)\n let baseSchema = convertBaseSchema(schema, ctx);\n const hasExplicitType = schema.type || schema.enum !== undefined || schema.const !== undefined;\n // Process composition keywords LAST (they can appear together)\n // Handle anyOf - wrap base schema with union\n if (schema.anyOf && Array.isArray(schema.anyOf)) {\n const options = schema.anyOf.map((s) => convertSchema(s, ctx));\n const anyOfUnion = z.union(options);\n baseSchema = hasExplicitType ? z.intersection(baseSchema, anyOfUnion) : anyOfUnion;\n }\n // Handle oneOf - exclusive union (exactly one must match)\n if (schema.oneOf && Array.isArray(schema.oneOf)) {\n const options = schema.oneOf.map((s) => convertSchema(s, ctx));\n const oneOfUnion = z.xor(options);\n baseSchema = hasExplicitType ? z.intersection(baseSchema, oneOfUnion) : oneOfUnion;\n }\n // Handle allOf - wrap base schema with intersection\n if (schema.allOf && Array.isArray(schema.allOf)) {\n if (schema.allOf.length === 0) {\n baseSchema = hasExplicitType ? baseSchema : z.any();\n }\n else {\n let result = hasExplicitType ? baseSchema : convertSchema(schema.allOf[0], ctx);\n const startIdx = hasExplicitType ? 0 : 1;\n for (let i = startIdx; i < schema.allOf.length; i++) {\n result = z.intersection(result, convertSchema(schema.allOf[i], ctx));\n }\n baseSchema = result;\n }\n }\n // Handle nullable (OpenAPI 3.0)\n if (schema.nullable === true && ctx.version === \"openapi-3.0\") {\n baseSchema = z.nullable(baseSchema);\n }\n // Handle readOnly\n if (schema.readOnly === true) {\n baseSchema = z.readonly(baseSchema);\n }\n // Collect metadata: core schema keywords and unrecognized keys\n const extraMeta = {};\n // Core schema keywords that should be captured as metadata\n const coreMetadataKeys = [\"$id\", \"id\", \"$comment\", \"$anchor\", \"$vocabulary\", \"$dynamicRef\", \"$dynamicAnchor\"];\n for (const key of coreMetadataKeys) {\n if (key in schema) {\n extraMeta[key] = schema[key];\n }\n }\n // Content keywords - store as metadata\n const contentMetadataKeys = [\"contentEncoding\", \"contentMediaType\", \"contentSchema\"];\n for (const key of contentMetadataKeys) {\n if (key in schema) {\n extraMeta[key] = schema[key];\n }\n }\n // Unrecognized keys (custom metadata)\n for (const key of Object.keys(schema)) {\n if (!RECOGNIZED_KEYS.has(key)) {\n extraMeta[key] = schema[key];\n }\n }\n if (Object.keys(extraMeta).length > 0) {\n ctx.registry.add(baseSchema, extraMeta);\n }\n return baseSchema;\n}\n/**\n * Converts a JSON Schema to a Zod schema. This function should be considered semi-experimental. It's behavior is liable to change. */\nexport function fromJSONSchema(schema, params) {\n // Handle boolean schemas\n if (typeof schema === \"boolean\") {\n return schema ? z.any() : z.never();\n }\n const version = detectVersion(schema, params?.defaultTarget);\n const defs = (schema.$defs || schema.definitions || {});\n const ctx = {\n version,\n defs,\n refs: new Map(),\n processing: new Set(),\n rootSchema: schema,\n registry: params?.registry ?? globalRegistry,\n };\n return convertSchema(schema, ctx);\n}\n"],"names":["_schemas","_checks","zodSchema","objectSchema"],"mappings":";;;;AAKA,MAAM,IAAI;AAAA,EACN,GAAGA;AAAAA,EACH,GAAGC;AAAAA,EACH;AACJ;AAEA,MAAM,kBAAkB,oBAAI,IAAI;AAAA;AAAA,EAE5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AACJ,CAAC;AACD,SAAS,cAAc,QAAQ,eAAe;AAC1C,QAAM,UAAU,OAAO;AACvB,MAAI,YAAY,gDAAgD;AAC5D,WAAO;AAAA,EACX;AACA,MAAI,YAAY,2CAA2C;AACvD,WAAO;AAAA,EACX;AACA,MAAI,YAAY,2CAA2C;AACvD,WAAO;AAAA,EACX;AAEA,SAAO,iBAAiB;AAC5B;AACA,SAAS,WAAW,KAAK,KAAK;AAC1B,MAAI,CAAC,IAAI,WAAW,GAAG,GAAG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G,IAAI,OAAO,GAAG;AAAA,IAC/B;AAAA,EACJ;AAEA,QAAM,sBAAsB,CAAC,mBAAmB,oBAAoB,eAAe;AACnF,aAAW,OAAO,qBAAqB;AACnC,QAAI,OAAO,QAAQ;AACf,gBAAU,GAAG,IAAI,OAAO,GAAG;AAAA,IAC/B;AAAA,EACJ;AAEA,aAAW,OAAO,OAAO,KAAK,MAAM,GAAG;AACnC,QAAI,CAAC,gBAAgB,IAAI,GAAG,GAAG;AAC3B,gBAAU,GAAG,IAAI,OAAO,GAAG;AAAA,IAC/B;AAAA,EACJ;AACA,MAAI,OAAO,KAAK,SAAS,EAAE,SAAS,GAAG;AACnC,QAAI,SAAS,IAAI,YAAY,SAAS;AAAA,EAC1C;AACA,SAAO;AACX;AAGO,SAAS,eAAe,QAAQ,QAAQ;AAE3C,MAAI,OAAO,WAAW,WAAW;AAC7B,WAAO,SAAS,EAAE,IAAG,IAAK,EAAE,MAAK;AAAA,EACrC;AACA,QAAM,UAAU,cAAc,QAAQ,QAAQ,aAAa;AAC3D,QAAM,OAAQ,OAAO,SAAS,OAAO,eAAe,CAAA;AACpD,QAAM,MAAM;AAAA,IACR;AAAA,IACA;AAAA,IACA,MAAM,oBAAI,IAAG;AAAA,IACb,YAAY,oBAAI,IAAG;AAAA,IACnB,YAAY;AAAA,IACZ,UAAU,QAAQ,YAAY;AAAA,EACtC;AACI,SAAO,cAAc,QAAQ,GAAG;AACpC;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"from-json-schema.js","sources":["../../../../../node_modules/zod/v4/classic/from-json-schema.js"],"sourcesContent":["import { globalRegistry } from \"../core/registries.js\";\nimport * as _checks from \"./checks.js\";\nimport * as _iso from \"./iso.js\";\nimport * as _schemas from \"./schemas.js\";\n// Local z object to avoid circular dependency with ../index.js\nconst z = {\n ..._schemas,\n ..._checks,\n iso: _iso,\n};\n// Keys that are recognized and handled by the conversion logic\nconst RECOGNIZED_KEYS = /*@__PURE__*/ new Set([\n // Schema identification\n \"$schema\",\n \"$ref\",\n \"$defs\",\n \"definitions\",\n // Core schema keywords\n \"$id\",\n \"id\",\n \"$comment\",\n \"$anchor\",\n \"$vocabulary\",\n \"$dynamicRef\",\n \"$dynamicAnchor\",\n // Type\n \"type\",\n \"enum\",\n \"const\",\n // Composition\n \"anyOf\",\n \"oneOf\",\n \"allOf\",\n \"not\",\n // Object\n \"properties\",\n \"required\",\n \"additionalProperties\",\n \"patternProperties\",\n \"propertyNames\",\n \"minProperties\",\n \"maxProperties\",\n // Array\n \"items\",\n \"prefixItems\",\n \"additionalItems\",\n \"minItems\",\n \"maxItems\",\n \"uniqueItems\",\n \"contains\",\n \"minContains\",\n \"maxContains\",\n // String\n \"minLength\",\n \"maxLength\",\n \"pattern\",\n \"format\",\n // Number\n \"minimum\",\n \"maximum\",\n \"exclusiveMinimum\",\n \"exclusiveMaximum\",\n \"multipleOf\",\n // Already handled metadata\n \"description\",\n \"default\",\n // Content\n \"contentEncoding\",\n \"contentMediaType\",\n \"contentSchema\",\n // Unsupported (error-throwing)\n \"unevaluatedItems\",\n \"unevaluatedProperties\",\n \"if\",\n \"then\",\n \"else\",\n \"dependentSchemas\",\n \"dependentRequired\",\n // OpenAPI\n \"nullable\",\n \"readOnly\",\n]);\nfunction detectVersion(schema, defaultTarget) {\n const $schema = schema.$schema;\n if ($schema === \"https://json-schema.org/draft/2020-12/schema\") {\n return \"draft-2020-12\";\n }\n if ($schema === \"http://json-schema.org/draft-07/schema#\") {\n return \"draft-7\";\n }\n if ($schema === \"http://json-schema.org/draft-04/schema#\") {\n return \"draft-4\";\n }\n // Use defaultTarget if provided, otherwise default to draft-2020-12\n return defaultTarget ?? \"draft-2020-12\";\n}\nfunction resolveRef(ref, ctx) {\n if (!ref.startsWith(\"#\")) {\n throw new Error(\"External $ref is not supported, only local refs (#/...) are allowed\");\n }\n const path = ref.slice(1).split(\"/\").filter(Boolean);\n // Handle root reference \"#\"\n if (path.length === 0) {\n return ctx.rootSchema;\n }\n const defsKey = ctx.version === \"draft-2020-12\" ? \"$defs\" : \"definitions\";\n if (path[0] === defsKey) {\n const key = path[1];\n if (!key || !ctx.defs[key]) {\n throw new Error(`Reference not found: ${ref}`);\n }\n return ctx.defs[key];\n }\n throw new Error(`Reference not found: ${ref}`);\n}\nfunction convertBaseSchema(schema, ctx) {\n // Handle unsupported features\n if (schema.not !== undefined) {\n // Special case: { not: {} } represents never\n if (typeof schema.not === \"object\" && Object.keys(schema.not).length === 0) {\n return z.never();\n }\n throw new Error(\"not is not supported in Zod (except { not: {} } for never)\");\n }\n if (schema.unevaluatedItems !== undefined) {\n throw new Error(\"unevaluatedItems is not supported\");\n }\n if (schema.unevaluatedProperties !== undefined) {\n throw new Error(\"unevaluatedProperties is not supported\");\n }\n if (schema.if !== undefined || schema.then !== undefined || schema.else !== undefined) {\n throw new Error(\"Conditional schemas (if/then/else) are not supported\");\n }\n if (schema.dependentSchemas !== undefined || schema.dependentRequired !== undefined) {\n throw new Error(\"dependentSchemas and dependentRequired are not supported\");\n }\n // Handle $ref\n if (schema.$ref) {\n const refPath = schema.$ref;\n if (ctx.refs.has(refPath)) {\n return ctx.refs.get(refPath);\n }\n if (ctx.processing.has(refPath)) {\n // Circular reference - use lazy\n return z.lazy(() => {\n if (!ctx.refs.has(refPath)) {\n throw new Error(`Circular reference not resolved: ${refPath}`);\n }\n return ctx.refs.get(refPath);\n });\n }\n ctx.processing.add(refPath);\n const resolved = resolveRef(refPath, ctx);\n const zodSchema = convertSchema(resolved, ctx);\n ctx.refs.set(refPath, zodSchema);\n ctx.processing.delete(refPath);\n return zodSchema;\n }\n // Handle enum\n if (schema.enum !== undefined) {\n const enumValues = schema.enum;\n // Special case: OpenAPI 3.0 null representation { type: \"string\", nullable: true, enum: [null] }\n if (ctx.version === \"openapi-3.0\" &&\n schema.nullable === true &&\n enumValues.length === 1 &&\n enumValues[0] === null) {\n return z.null();\n }\n if (enumValues.length === 0) {\n return z.never();\n }\n if (enumValues.length === 1) {\n return z.literal(enumValues[0]);\n }\n // Check if all values are strings\n if (enumValues.every((v) => typeof v === \"string\")) {\n return z.enum(enumValues);\n }\n // Mixed types - use union of literals\n const literalSchemas = enumValues.map((v) => z.literal(v));\n if (literalSchemas.length < 2) {\n return literalSchemas[0];\n }\n return z.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]);\n }\n // Handle const\n if (schema.const !== undefined) {\n return z.literal(schema.const);\n }\n // Handle type\n const type = schema.type;\n if (Array.isArray(type)) {\n // Expand type array into anyOf union\n const typeSchemas = type.map((t) => {\n const typeSchema = { ...schema, type: t };\n return convertBaseSchema(typeSchema, ctx);\n });\n if (typeSchemas.length === 0) {\n return z.never();\n }\n if (typeSchemas.length === 1) {\n return typeSchemas[0];\n }\n return z.union(typeSchemas);\n }\n if (!type) {\n // No type specified - empty schema (any)\n return z.any();\n }\n let zodSchema;\n switch (type) {\n case \"string\": {\n let stringSchema = z.string();\n // Apply format using .check() with Zod format functions\n if (schema.format) {\n const format = schema.format;\n // Map common formats to Zod check functions\n if (format === \"email\") {\n stringSchema = stringSchema.check(z.email());\n }\n else if (format === \"uri\" || format === \"uri-reference\") {\n stringSchema = stringSchema.check(z.url());\n }\n else if (format === \"uuid\" || format === \"guid\") {\n stringSchema = stringSchema.check(z.uuid());\n }\n else if (format === \"date-time\") {\n stringSchema = stringSchema.check(z.iso.datetime());\n }\n else if (format === \"date\") {\n stringSchema = stringSchema.check(z.iso.date());\n }\n else if (format === \"time\") {\n stringSchema = stringSchema.check(z.iso.time());\n }\n else if (format === \"duration\") {\n stringSchema = stringSchema.check(z.iso.duration());\n }\n else if (format === \"ipv4\") {\n stringSchema = stringSchema.check(z.ipv4());\n }\n else if (format === \"ipv6\") {\n stringSchema = stringSchema.check(z.ipv6());\n }\n else if (format === \"mac\") {\n stringSchema = stringSchema.check(z.mac());\n }\n else if (format === \"cidr\") {\n stringSchema = stringSchema.check(z.cidrv4());\n }\n else if (format === \"cidr-v6\") {\n stringSchema = stringSchema.check(z.cidrv6());\n }\n else if (format === \"base64\") {\n stringSchema = stringSchema.check(z.base64());\n }\n else if (format === \"base64url\") {\n stringSchema = stringSchema.check(z.base64url());\n }\n else if (format === \"e164\") {\n stringSchema = stringSchema.check(z.e164());\n }\n else if (format === \"jwt\") {\n stringSchema = stringSchema.check(z.jwt());\n }\n else if (format === \"emoji\") {\n stringSchema = stringSchema.check(z.emoji());\n }\n else if (format === \"nanoid\") {\n stringSchema = stringSchema.check(z.nanoid());\n }\n else if (format === \"cuid\") {\n stringSchema = stringSchema.check(z.cuid());\n }\n else if (format === \"cuid2\") {\n stringSchema = stringSchema.check(z.cuid2());\n }\n else if (format === \"ulid\") {\n stringSchema = stringSchema.check(z.ulid());\n }\n else if (format === \"xid\") {\n stringSchema = stringSchema.check(z.xid());\n }\n else if (format === \"ksuid\") {\n stringSchema = stringSchema.check(z.ksuid());\n }\n // Note: json-string format is not currently supported by Zod\n // Custom formats are ignored - keep as plain string\n }\n // Apply constraints\n if (typeof schema.minLength === \"number\") {\n stringSchema = stringSchema.min(schema.minLength);\n }\n if (typeof schema.maxLength === \"number\") {\n stringSchema = stringSchema.max(schema.maxLength);\n }\n if (schema.pattern) {\n // JSON Schema patterns are not implicitly anchored (match anywhere in string)\n stringSchema = stringSchema.regex(new RegExp(schema.pattern));\n }\n zodSchema = stringSchema;\n break;\n }\n case \"number\":\n case \"integer\": {\n let numberSchema = type === \"integer\" ? z.number().int() : z.number();\n // Apply constraints\n if (typeof schema.minimum === \"number\") {\n numberSchema = numberSchema.min(schema.minimum);\n }\n if (typeof schema.maximum === \"number\") {\n numberSchema = numberSchema.max(schema.maximum);\n }\n if (typeof schema.exclusiveMinimum === \"number\") {\n numberSchema = numberSchema.gt(schema.exclusiveMinimum);\n }\n else if (schema.exclusiveMinimum === true && typeof schema.minimum === \"number\") {\n numberSchema = numberSchema.gt(schema.minimum);\n }\n if (typeof schema.exclusiveMaximum === \"number\") {\n numberSchema = numberSchema.lt(schema.exclusiveMaximum);\n }\n else if (schema.exclusiveMaximum === true && typeof schema.maximum === \"number\") {\n numberSchema = numberSchema.lt(schema.maximum);\n }\n if (typeof schema.multipleOf === \"number\") {\n numberSchema = numberSchema.multipleOf(schema.multipleOf);\n }\n zodSchema = numberSchema;\n break;\n }\n case \"boolean\": {\n zodSchema = z.boolean();\n break;\n }\n case \"null\": {\n zodSchema = z.null();\n break;\n }\n case \"object\": {\n const shape = {};\n const properties = schema.properties || {};\n const requiredSet = new Set(schema.required || []);\n // Convert properties - mark optional ones\n for (const [key, propSchema] of Object.entries(properties)) {\n const propZodSchema = convertSchema(propSchema, ctx);\n // If not in required array, make it optional\n shape[key] = requiredSet.has(key) ? propZodSchema : propZodSchema.optional();\n }\n // Handle propertyNames\n if (schema.propertyNames) {\n const keySchema = convertSchema(schema.propertyNames, ctx);\n const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === \"object\"\n ? convertSchema(schema.additionalProperties, ctx)\n : z.any();\n // Case A: No properties (pure record)\n if (Object.keys(shape).length === 0) {\n zodSchema = z.record(keySchema, valueSchema);\n break;\n }\n // Case B: With properties (intersection of object and looseRecord)\n const objectSchema = z.object(shape).passthrough();\n const recordSchema = z.looseRecord(keySchema, valueSchema);\n zodSchema = z.intersection(objectSchema, recordSchema);\n break;\n }\n // Handle patternProperties\n if (schema.patternProperties) {\n // patternProperties: keys matching pattern must satisfy corresponding schema\n // Use loose records so non-matching keys pass through\n const patternProps = schema.patternProperties;\n const patternKeys = Object.keys(patternProps);\n const looseRecords = [];\n for (const pattern of patternKeys) {\n const patternValue = convertSchema(patternProps[pattern], ctx);\n const keySchema = z.string().regex(new RegExp(pattern));\n looseRecords.push(z.looseRecord(keySchema, patternValue));\n }\n // Build intersection: object schema + all pattern property records\n const schemasToIntersect = [];\n if (Object.keys(shape).length > 0) {\n // Use passthrough so patternProperties can validate additional keys\n schemasToIntersect.push(z.object(shape).passthrough());\n }\n schemasToIntersect.push(...looseRecords);\n if (schemasToIntersect.length === 0) {\n zodSchema = z.object({}).passthrough();\n }\n else if (schemasToIntersect.length === 1) {\n zodSchema = schemasToIntersect[0];\n }\n else {\n // Chain intersections: (A & B) & C & D ...\n let result = z.intersection(schemasToIntersect[0], schemasToIntersect[1]);\n for (let i = 2; i < schemasToIntersect.length; i++) {\n result = z.intersection(result, schemasToIntersect[i]);\n }\n zodSchema = result;\n }\n break;\n }\n // Handle additionalProperties\n // In JSON Schema, additionalProperties defaults to true (allow any extra properties)\n // In Zod, objects strip unknown keys by default, so we need to handle this explicitly\n const objectSchema = z.object(shape);\n if (schema.additionalProperties === false) {\n // Strict mode - no extra properties allowed\n zodSchema = objectSchema.strict();\n }\n else if (typeof schema.additionalProperties === \"object\") {\n // Extra properties must match the specified schema\n zodSchema = objectSchema.catchall(convertSchema(schema.additionalProperties, ctx));\n }\n else {\n // additionalProperties is true or undefined - allow any extra properties (passthrough)\n zodSchema = objectSchema.passthrough();\n }\n break;\n }\n case \"array\": {\n // TODO: uniqueItems is not supported\n // TODO: contains/minContains/maxContains are not supported\n // Check if this is a tuple (prefixItems or items as array)\n const prefixItems = schema.prefixItems;\n const items = schema.items;\n if (prefixItems && Array.isArray(prefixItems)) {\n // Tuple with prefixItems (draft-2020-12)\n const tupleItems = prefixItems.map((item) => convertSchema(item, ctx));\n const rest = items && typeof items === \"object\" && !Array.isArray(items)\n ? convertSchema(items, ctx)\n : undefined;\n if (rest) {\n zodSchema = z.tuple(tupleItems).rest(rest);\n }\n else {\n zodSchema = z.tuple(tupleItems);\n }\n // Apply minItems/maxItems constraints to tuples\n if (typeof schema.minItems === \"number\") {\n zodSchema = zodSchema.check(z.minLength(schema.minItems));\n }\n if (typeof schema.maxItems === \"number\") {\n zodSchema = zodSchema.check(z.maxLength(schema.maxItems));\n }\n }\n else if (Array.isArray(items)) {\n // Tuple with items array (draft-7)\n const tupleItems = items.map((item) => convertSchema(item, ctx));\n const rest = schema.additionalItems && typeof schema.additionalItems === \"object\"\n ? convertSchema(schema.additionalItems, ctx)\n : undefined; // additionalItems: false means no rest, handled by default tuple behavior\n if (rest) {\n zodSchema = z.tuple(tupleItems).rest(rest);\n }\n else {\n zodSchema = z.tuple(tupleItems);\n }\n // Apply minItems/maxItems constraints to tuples\n if (typeof schema.minItems === \"number\") {\n zodSchema = zodSchema.check(z.minLength(schema.minItems));\n }\n if (typeof schema.maxItems === \"number\") {\n zodSchema = zodSchema.check(z.maxLength(schema.maxItems));\n }\n }\n else if (items !== undefined) {\n // Regular array\n const element = convertSchema(items, ctx);\n let arraySchema = z.array(element);\n // Apply constraints\n if (typeof schema.minItems === \"number\") {\n arraySchema = arraySchema.min(schema.minItems);\n }\n if (typeof schema.maxItems === \"number\") {\n arraySchema = arraySchema.max(schema.maxItems);\n }\n zodSchema = arraySchema;\n }\n else {\n // No items specified - array of any\n zodSchema = z.array(z.any());\n }\n break;\n }\n default:\n throw new Error(`Unsupported type: ${type}`);\n }\n return zodSchema;\n}\nfunction convertSchema(schema, ctx) {\n if (typeof schema === \"boolean\") {\n return schema ? z.any() : z.never();\n }\n // Convert base schema first (ignoring composition keywords)\n let baseSchema = convertBaseSchema(schema, ctx);\n const hasExplicitType = schema.type || schema.enum !== undefined || schema.const !== undefined;\n // Process composition keywords LAST (they can appear together)\n // Handle anyOf - wrap base schema with union\n if (schema.anyOf && Array.isArray(schema.anyOf)) {\n const options = schema.anyOf.map((s) => convertSchema(s, ctx));\n const anyOfUnion = z.union(options);\n baseSchema = hasExplicitType ? z.intersection(baseSchema, anyOfUnion) : anyOfUnion;\n }\n // Handle oneOf - exclusive union (exactly one must match)\n if (schema.oneOf && Array.isArray(schema.oneOf)) {\n const options = schema.oneOf.map((s) => convertSchema(s, ctx));\n const oneOfUnion = z.xor(options);\n baseSchema = hasExplicitType ? z.intersection(baseSchema, oneOfUnion) : oneOfUnion;\n }\n // Handle allOf - wrap base schema with intersection\n if (schema.allOf && Array.isArray(schema.allOf)) {\n if (schema.allOf.length === 0) {\n baseSchema = hasExplicitType ? baseSchema : z.any();\n }\n else {\n let result = hasExplicitType ? baseSchema : convertSchema(schema.allOf[0], ctx);\n const startIdx = hasExplicitType ? 0 : 1;\n for (let i = startIdx; i < schema.allOf.length; i++) {\n result = z.intersection(result, convertSchema(schema.allOf[i], ctx));\n }\n baseSchema = result;\n }\n }\n // Handle nullable (OpenAPI 3.0)\n if (schema.nullable === true && ctx.version === \"openapi-3.0\") {\n baseSchema = z.nullable(baseSchema);\n }\n // Handle readOnly\n if (schema.readOnly === true) {\n baseSchema = z.readonly(baseSchema);\n }\n // Apply `default` so it wraps the fully-composed schema. This ensures\n // `parse(undefined) -> default` works regardless of which branch of\n // `convertBaseSchema` produced the inner schema (enum/const/not/typed/etc.).\n if (schema.default !== undefined) {\n baseSchema = baseSchema.default(schema.default);\n }\n // Collect non-description annotation metadata into the user-supplied\n // registry. Description is handled separately below via `.describe()` to\n // preserve the contract that `schema.description` reads from globalRegistry.\n const extraMeta = {};\n const coreMetadataKeys = [\"$id\", \"id\", \"$comment\", \"$anchor\", \"$vocabulary\", \"$dynamicRef\", \"$dynamicAnchor\"];\n for (const key of coreMetadataKeys) {\n if (key in schema) {\n extraMeta[key] = schema[key];\n }\n }\n const contentMetadataKeys = [\"contentEncoding\", \"contentMediaType\", \"contentSchema\"];\n for (const key of contentMetadataKeys) {\n if (key in schema) {\n extraMeta[key] = schema[key];\n }\n }\n for (const key of Object.keys(schema)) {\n if (!RECOGNIZED_KEYS.has(key)) {\n extraMeta[key] = schema[key];\n }\n }\n if (Object.keys(extraMeta).length > 0) {\n ctx.registry.add(baseSchema, extraMeta);\n }\n // Apply description last. `.describe()` clones the schema and sets\n // `_zod.parent` on the clone, so registry lookups on the returned reference\n // still resolve `extraMeta` via parent inheritance.\n if (schema.description) {\n baseSchema = baseSchema.describe(schema.description);\n }\n return baseSchema;\n}\n/**\n * Converts a JSON Schema to a Zod schema. This function should be considered semi-experimental. It's behavior is liable to change. */\nexport function fromJSONSchema(schema, params) {\n // Handle boolean schemas\n if (typeof schema === \"boolean\") {\n return schema ? z.any() : z.never();\n }\n // Normalize input via a JSON round-trip. This guarantees the converter\n // walks a plain, finite, JSON-valid object graph: cyclic inputs fail here,\n // getter/Proxy-based properties are materialized into static values, and\n // class instances collapse to plain objects.\n let normalized;\n try {\n normalized = JSON.parse(JSON.stringify(schema));\n }\n catch {\n throw new Error(\"fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas\");\n }\n const version = detectVersion(normalized, params?.defaultTarget);\n const defs = (normalized.$defs || normalized.definitions || {});\n const ctx = {\n version,\n defs,\n refs: new Map(),\n processing: new Set(),\n rootSchema: normalized,\n registry: params?.registry ?? globalRegistry,\n };\n return convertSchema(normalized, ctx);\n}\n"],"names":["_schemas","_checks","zodSchema","objectSchema"],"mappings":";;;;AAKA,MAAM,IAAI;AAAA,EACN,GAAGA;AAAAA,EACH,GAAGC;AAAAA,EACH;AACJ;AAEA,MAAM,kBAAgC,oBAAI,IAAI;AAAA;AAAA,EAE1C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AA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I,IAAG;AAAA,IACb,YAAY,oBAAI,IAAG;AAAA,IACnB,YAAY;AAAA,IACZ,UAAU,QAAQ,YAAY;AAAA,EACtC;AACI,SAAO,cAAc,YAAY,GAAG;AACxC;","x_google_ignoreList":[0]}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const schemas$1 = require("./schemas.cjs");
|
|
3
4
|
const core = require("../core/core.cjs");
|
|
4
|
-
const schemas = require("../core/schemas.cjs");
|
|
5
|
-
require("../core/registries.cjs");
|
|
6
5
|
const api = require("../core/api.cjs");
|
|
7
|
-
const schemas
|
|
6
|
+
const schemas = require("../core/schemas.cjs");
|
|
8
7
|
const ZodISODateTime = /* @__PURE__ */ core.$constructor("ZodISODateTime", (inst, def) => {
|
|
9
8
|
schemas.$ZodISODateTime.init(inst, def);
|
|
10
9
|
schemas$1.ZodStringFormat.init(inst, def);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iso.cjs","sources":["../../../../../node_modules/zod/v4/classic/iso.js"],"sourcesContent":["import * as core from \"../core/index.js\";\nimport * as schemas from \"./schemas.js\";\nexport const ZodISODateTime = /*@__PURE__*/ core.$constructor(\"ZodISODateTime\", (inst, def) => {\n core.$ZodISODateTime.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function datetime(params) {\n return core._isoDateTime(ZodISODateTime, params);\n}\nexport const ZodISODate = /*@__PURE__*/ core.$constructor(\"ZodISODate\", (inst, def) => {\n core.$ZodISODate.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function date(params) {\n return core._isoDate(ZodISODate, params);\n}\nexport const ZodISOTime = /*@__PURE__*/ core.$constructor(\"ZodISOTime\", (inst, def) => {\n core.$ZodISOTime.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function time(params) {\n return core._isoTime(ZodISOTime, params);\n}\nexport const ZodISODuration = /*@__PURE__*/ core.$constructor(\"ZodISODuration\", (inst, def) => {\n core.$ZodISODuration.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function duration(params) {\n return core._isoDuration(ZodISODuration, params);\n}\n"],"names":["core.$constructor","core.$ZodISODateTime","schemas.ZodStringFormat","core._isoDateTime","core.$ZodISODate","core._isoDate","core.$ZodISOTime","core._isoTime","core.$ZodISODuration","core._isoDuration"],"mappings":"
|
|
1
|
+
{"version":3,"file":"iso.cjs","sources":["../../../../../node_modules/zod/v4/classic/iso.js"],"sourcesContent":["import * as core from \"../core/index.js\";\nimport * as schemas from \"./schemas.js\";\nexport const ZodISODateTime = /*@__PURE__*/ core.$constructor(\"ZodISODateTime\", (inst, def) => {\n core.$ZodISODateTime.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function datetime(params) {\n return core._isoDateTime(ZodISODateTime, params);\n}\nexport const ZodISODate = /*@__PURE__*/ core.$constructor(\"ZodISODate\", (inst, def) => {\n core.$ZodISODate.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function date(params) {\n return core._isoDate(ZodISODate, params);\n}\nexport const ZodISOTime = /*@__PURE__*/ core.$constructor(\"ZodISOTime\", (inst, def) => {\n core.$ZodISOTime.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function time(params) {\n return core._isoTime(ZodISOTime, params);\n}\nexport const ZodISODuration = /*@__PURE__*/ core.$constructor(\"ZodISODuration\", (inst, def) => {\n core.$ZodISODuration.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function duration(params) {\n return core._isoDuration(ZodISODuration, params);\n}\n"],"names":["core.$constructor","core.$ZodISODateTime","schemas.ZodStringFormat","core._isoDateTime","core.$ZodISODate","core._isoDate","core.$ZodISOTime","core._isoTime","core.$ZodISODuration","core._isoDuration"],"mappings":";;;;;;AAEY,MAAC,iBAA+BA,qBAAAA,aAAkB,kBAAkB,CAAC,MAAM,QAAQ;AAC3FC,0BAAqB,KAAK,MAAM,GAAG;AACnCC,4BAAwB,KAAK,MAAM,GAAG;AAC1C,CAAC;AACM,SAAS,SAAS,QAAQ;AAC7B,SAAOC,IAAAA,aAAkB,gBAAgB,MAAM;AACnD;AACY,MAAC,aAA2BH,qBAAAA,aAAkB,cAAc,CAAC,MAAM,QAAQ;AACnFI,sBAAiB,KAAK,MAAM,GAAG;AAC/BF,4BAAwB,KAAK,MAAM,GAAG;AAC1C,CAAC;AACM,SAAS,KAAK,QAAQ;AACzB,SAAOG,IAAAA,SAAc,YAAY,MAAM;AAC3C;AACY,MAAC,aAA2BL,qBAAAA,aAAkB,cAAc,CAAC,MAAM,QAAQ;AACnFM,sBAAiB,KAAK,MAAM,GAAG;AAC/BJ,4BAAwB,KAAK,MAAM,GAAG;AAC1C,CAAC;AACM,SAAS,KAAK,QAAQ;AACzB,SAAOK,IAAAA,SAAc,YAAY,MAAM;AAC3C;AACY,MAAC,iBAA+BP,qBAAAA,aAAkB,kBAAkB,CAAC,MAAM,QAAQ;AAC3FQ,0BAAqB,KAAK,MAAM,GAAG;AACnCN,4BAAwB,KAAK,MAAM,GAAG;AAC1C,CAAC;AACM,SAAS,SAAS,QAAQ;AAC7B,SAAOO,IAAAA,aAAkB,gBAAgB,MAAM;AACnD;;;;;;;;;","x_google_ignoreList":[0]}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
import { ZodStringFormat } from "./schemas.js";
|
|
1
2
|
import { $constructor } from "../core/core.js";
|
|
2
|
-
import { $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration } from "../core/schemas.js";
|
|
3
|
-
import "../core/registries.js";
|
|
4
3
|
import { _isoDate, _isoDateTime, _isoDuration, _isoTime } from "../core/api.js";
|
|
5
|
-
import {
|
|
4
|
+
import { $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration } from "../core/schemas.js";
|
|
6
5
|
const ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def) => {
|
|
7
6
|
$ZodISODateTime.init(inst, def);
|
|
8
7
|
ZodStringFormat.init(inst, def);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iso.js","sources":["../../../../../node_modules/zod/v4/classic/iso.js"],"sourcesContent":["import * as core from \"../core/index.js\";\nimport * as schemas from \"./schemas.js\";\nexport const ZodISODateTime = /*@__PURE__*/ core.$constructor(\"ZodISODateTime\", (inst, def) => {\n core.$ZodISODateTime.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function datetime(params) {\n return core._isoDateTime(ZodISODateTime, params);\n}\nexport const ZodISODate = /*@__PURE__*/ core.$constructor(\"ZodISODate\", (inst, def) => {\n core.$ZodISODate.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function date(params) {\n return core._isoDate(ZodISODate, params);\n}\nexport const ZodISOTime = /*@__PURE__*/ core.$constructor(\"ZodISOTime\", (inst, def) => {\n core.$ZodISOTime.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function time(params) {\n return core._isoTime(ZodISOTime, params);\n}\nexport const ZodISODuration = /*@__PURE__*/ core.$constructor(\"ZodISODuration\", (inst, def) => {\n core.$ZodISODuration.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function duration(params) {\n return core._isoDuration(ZodISODuration, params);\n}\n"],"names":["core.$constructor","core.$ZodISODateTime","schemas.ZodStringFormat","core._isoDateTime","core.$ZodISODate","core._isoDate","core.$ZodISOTime","core._isoTime","core.$ZodISODuration","core._isoDuration"],"mappings":"
|
|
1
|
+
{"version":3,"file":"iso.js","sources":["../../../../../node_modules/zod/v4/classic/iso.js"],"sourcesContent":["import * as core from \"../core/index.js\";\nimport * as schemas from \"./schemas.js\";\nexport const ZodISODateTime = /*@__PURE__*/ core.$constructor(\"ZodISODateTime\", (inst, def) => {\n core.$ZodISODateTime.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function datetime(params) {\n return core._isoDateTime(ZodISODateTime, params);\n}\nexport const ZodISODate = /*@__PURE__*/ core.$constructor(\"ZodISODate\", (inst, def) => {\n core.$ZodISODate.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function date(params) {\n return core._isoDate(ZodISODate, params);\n}\nexport const ZodISOTime = /*@__PURE__*/ core.$constructor(\"ZodISOTime\", (inst, def) => {\n core.$ZodISOTime.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function time(params) {\n return core._isoTime(ZodISOTime, params);\n}\nexport const ZodISODuration = /*@__PURE__*/ core.$constructor(\"ZodISODuration\", (inst, def) => {\n core.$ZodISODuration.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function duration(params) {\n return core._isoDuration(ZodISODuration, params);\n}\n"],"names":["core.$constructor","core.$ZodISODateTime","schemas.ZodStringFormat","core._isoDateTime","core.$ZodISODate","core._isoDate","core.$ZodISOTime","core._isoTime","core.$ZodISODuration","core._isoDuration"],"mappings":";;;;AAEY,MAAC,iBAA+BA,6BAAkB,kBAAkB,CAAC,MAAM,QAAQ;AAC3FC,kBAAqB,KAAK,MAAM,GAAG;AACnCC,kBAAwB,KAAK,MAAM,GAAG;AAC1C,CAAC;AACM,SAAS,SAAS,QAAQ;AAC7B,SAAOC,aAAkB,gBAAgB,MAAM;AACnD;AACY,MAAC,aAA2BH,6BAAkB,cAAc,CAAC,MAAM,QAAQ;AACnFI,cAAiB,KAAK,MAAM,GAAG;AAC/BF,kBAAwB,KAAK,MAAM,GAAG;AAC1C,CAAC;AACM,SAAS,KAAK,QAAQ;AACzB,SAAOG,SAAc,YAAY,MAAM;AAC3C;AACY,MAAC,aAA2BL,6BAAkB,cAAc,CAAC,MAAM,QAAQ;AACnFM,cAAiB,KAAK,MAAM,GAAG;AAC/BJ,kBAAwB,KAAK,MAAM,GAAG;AAC1C,CAAC;AACM,SAAS,KAAK,QAAQ;AACzB,SAAOK,SAAc,YAAY,MAAM;AAC3C;AACY,MAAC,iBAA+BP,6BAAkB,kBAAkB,CAAC,MAAM,QAAQ;AAC3FQ,kBAAqB,KAAK,MAAM,GAAG;AACnCN,kBAAwB,KAAK,MAAM,GAAG;AAC1C,CAAC;AACM,SAAS,SAAS,QAAQ;AAC7B,SAAOO,aAAkB,gBAAgB,MAAM;AACnD;","x_google_ignoreList":[0]}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const parse$1 = require("../core/parse.cjs");
|
|
4
|
-
require("../core/registries.cjs");
|
|
5
3
|
const errors = require("./errors.cjs");
|
|
4
|
+
const parse$1 = require("../core/parse.cjs");
|
|
6
5
|
const parse = /* @__PURE__ */ parse$1._parse(errors.ZodRealError);
|
|
7
6
|
const parseAsync = /* @__PURE__ */ parse$1._parseAsync(errors.ZodRealError);
|
|
8
7
|
const safeParse = /* @__PURE__ */ parse$1._safeParse(errors.ZodRealError);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse.cjs","sources":["../../../../../node_modules/zod/v4/classic/parse.js"],"sourcesContent":["import * as core from \"../core/index.js\";\nimport { ZodRealError } from \"./errors.js\";\nexport const parse = /* @__PURE__ */ core._parse(ZodRealError);\nexport const parseAsync = /* @__PURE__ */ core._parseAsync(ZodRealError);\nexport const safeParse = /* @__PURE__ */ core._safeParse(ZodRealError);\nexport const safeParseAsync = /* @__PURE__ */ core._safeParseAsync(ZodRealError);\n// Codec functions\nexport const encode = /* @__PURE__ */ core._encode(ZodRealError);\nexport const decode = /* @__PURE__ */ core._decode(ZodRealError);\nexport const encodeAsync = /* @__PURE__ */ core._encodeAsync(ZodRealError);\nexport const decodeAsync = /* @__PURE__ */ core._decodeAsync(ZodRealError);\nexport const safeEncode = /* @__PURE__ */ core._safeEncode(ZodRealError);\nexport const safeDecode = /* @__PURE__ */ core._safeDecode(ZodRealError);\nexport const safeEncodeAsync = /* @__PURE__ */ core._safeEncodeAsync(ZodRealError);\nexport const safeDecodeAsync = /* @__PURE__ */ core._safeDecodeAsync(ZodRealError);\n"],"names":["core._parse","ZodRealError","core._parseAsync","core._safeParse","core._safeParseAsync","core._encode","core._decode","core._encodeAsync","core._decodeAsync","core._safeEncode","core._safeDecode","core._safeEncodeAsync","core._safeDecodeAsync"],"mappings":"
|
|
1
|
+
{"version":3,"file":"parse.cjs","sources":["../../../../../node_modules/zod/v4/classic/parse.js"],"sourcesContent":["import * as core from \"../core/index.js\";\nimport { ZodRealError } from \"./errors.js\";\nexport const parse = /* @__PURE__ */ core._parse(ZodRealError);\nexport const parseAsync = /* @__PURE__ */ core._parseAsync(ZodRealError);\nexport const safeParse = /* @__PURE__ */ core._safeParse(ZodRealError);\nexport const safeParseAsync = /* @__PURE__ */ core._safeParseAsync(ZodRealError);\n// Codec functions\nexport const encode = /* @__PURE__ */ core._encode(ZodRealError);\nexport const decode = /* @__PURE__ */ core._decode(ZodRealError);\nexport const encodeAsync = /* @__PURE__ */ core._encodeAsync(ZodRealError);\nexport const decodeAsync = /* @__PURE__ */ core._decodeAsync(ZodRealError);\nexport const safeEncode = /* @__PURE__ */ core._safeEncode(ZodRealError);\nexport const safeDecode = /* @__PURE__ */ core._safeDecode(ZodRealError);\nexport const safeEncodeAsync = /* @__PURE__ */ core._safeEncodeAsync(ZodRealError);\nexport const safeDecodeAsync = /* @__PURE__ */ core._safeDecodeAsync(ZodRealError);\n"],"names":["core._parse","ZodRealError","core._parseAsync","core._safeParse","core._safeParseAsync","core._encode","core._decode","core._encodeAsync","core._decodeAsync","core._safeEncode","core._safeDecode","core._safeEncodeAsync","core._safeDecodeAsync"],"mappings":";;;;AAEY,MAAC,QAAwBA,wBAAAA,OAAYC,OAAAA,YAAY;AACjD,MAAC,aAA6BC,wBAAAA,YAAiBD,OAAAA,YAAY;AAC3D,MAAC,YAA4BE,wBAAAA,WAAgBF,OAAAA,YAAY;AACzD,MAAC,iBAAiCG,wBAAAA,gBAAqBH,OAAAA,YAAY;AAEnE,MAAC,SAAyBI,wBAAAA,QAAaJ,OAAAA,YAAY;AACnD,MAAC,SAAyBK,wBAAAA,QAAaL,OAAAA,YAAY;AACnD,MAAC,cAA8BM,wBAAAA,aAAkBN,OAAAA,YAAY;AAC7D,MAAC,cAA8BO,wBAAAA,aAAkBP,OAAAA,YAAY;AAC7D,MAAC,aAA6BQ,wBAAAA,YAAiBR,OAAAA,YAAY;AAC3D,MAAC,aAA6BS,wBAAAA,YAAiBT,OAAAA,YAAY;AAC3D,MAAC,kBAAkCU,wBAAAA,iBAAsBV,OAAAA,YAAY;AACrE,MAAC,kBAAkCW,wBAAAA,iBAAsBX,OAAAA,YAAY;;;;;;;;;;;;;","x_google_ignoreList":[0]}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { _decode, _decodeAsync, _encode, _encodeAsync, _parse, _parseAsync, _safeDecode, _safeDecodeAsync, _safeEncode, _safeEncodeAsync, _safeParse, _safeParseAsync } from "../core/parse.js";
|
|
2
|
-
import "../core/registries.js";
|
|
3
1
|
import { ZodRealError } from "./errors.js";
|
|
2
|
+
import { _decode, _decodeAsync, _encode, _encodeAsync, _parse, _parseAsync, _safeDecode, _safeDecodeAsync, _safeEncode, _safeEncodeAsync, _safeParse, _safeParseAsync } from "../core/parse.js";
|
|
4
3
|
const parse = /* @__PURE__ */ _parse(ZodRealError);
|
|
5
4
|
const parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
|
|
6
5
|
const safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse.js","sources":["../../../../../node_modules/zod/v4/classic/parse.js"],"sourcesContent":["import * as core from \"../core/index.js\";\nimport { ZodRealError } from \"./errors.js\";\nexport const parse = /* @__PURE__ */ core._parse(ZodRealError);\nexport const parseAsync = /* @__PURE__ */ core._parseAsync(ZodRealError);\nexport const safeParse = /* @__PURE__ */ core._safeParse(ZodRealError);\nexport const safeParseAsync = /* @__PURE__ */ core._safeParseAsync(ZodRealError);\n// Codec functions\nexport const encode = /* @__PURE__ */ core._encode(ZodRealError);\nexport const decode = /* @__PURE__ */ core._decode(ZodRealError);\nexport const encodeAsync = /* @__PURE__ */ core._encodeAsync(ZodRealError);\nexport const decodeAsync = /* @__PURE__ */ core._decodeAsync(ZodRealError);\nexport const safeEncode = /* @__PURE__ */ core._safeEncode(ZodRealError);\nexport const safeDecode = /* @__PURE__ */ core._safeDecode(ZodRealError);\nexport const safeEncodeAsync = /* @__PURE__ */ core._safeEncodeAsync(ZodRealError);\nexport const safeDecodeAsync = /* @__PURE__ */ core._safeDecodeAsync(ZodRealError);\n"],"names":["core._parse","core._parseAsync","core._safeParse","core._safeParseAsync","core._encode","core._decode","core._encodeAsync","core._decodeAsync","core._safeEncode","core._safeDecode","core._safeEncodeAsync","core._safeDecodeAsync"],"mappings":"
|
|
1
|
+
{"version":3,"file":"parse.js","sources":["../../../../../node_modules/zod/v4/classic/parse.js"],"sourcesContent":["import * as core from \"../core/index.js\";\nimport { ZodRealError } from \"./errors.js\";\nexport const parse = /* @__PURE__ */ core._parse(ZodRealError);\nexport const parseAsync = /* @__PURE__ */ core._parseAsync(ZodRealError);\nexport const safeParse = /* @__PURE__ */ core._safeParse(ZodRealError);\nexport const safeParseAsync = /* @__PURE__ */ core._safeParseAsync(ZodRealError);\n// Codec functions\nexport const encode = /* @__PURE__ */ core._encode(ZodRealError);\nexport const decode = /* @__PURE__ */ core._decode(ZodRealError);\nexport const encodeAsync = /* @__PURE__ */ core._encodeAsync(ZodRealError);\nexport const decodeAsync = /* @__PURE__ */ core._decodeAsync(ZodRealError);\nexport const safeEncode = /* @__PURE__ */ core._safeEncode(ZodRealError);\nexport const safeDecode = /* @__PURE__ */ core._safeDecode(ZodRealError);\nexport const safeEncodeAsync = /* @__PURE__ */ core._safeEncodeAsync(ZodRealError);\nexport const safeDecodeAsync = /* @__PURE__ */ core._safeDecodeAsync(ZodRealError);\n"],"names":["core._parse","core._parseAsync","core._safeParse","core._safeParseAsync","core._encode","core._decode","core._encodeAsync","core._decodeAsync","core._safeEncode","core._safeDecode","core._safeEncodeAsync","core._safeDecodeAsync"],"mappings":";;AAEY,MAAC,QAAwBA,uBAAY,YAAY;AACjD,MAAC,aAA6BC,4BAAiB,YAAY;AAC3D,MAAC,YAA4BC,2BAAgB,YAAY;AACzD,MAAC,iBAAiCC,gCAAqB,YAAY;AAEnE,MAAC,SAAyBC,wBAAa,YAAY;AACnD,MAAC,SAAyBC,wBAAa,YAAY;AACnD,MAAC,cAA8BC,6BAAkB,YAAY;AAC7D,MAAC,cAA8BC,6BAAkB,YAAY;AAC7D,MAAC,aAA6BC,4BAAiB,YAAY;AAC3D,MAAC,aAA6BC,4BAAiB,YAAY;AAC3D,MAAC,kBAAkCC,iCAAsB,YAAY;AACrE,MAAC,kBAAkCC,iCAAsB,YAAY;","x_google_ignoreList":[0]}
|