@intlayer/design-system 5.7.8 → 5.8.1-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +127 -91
- package/dist/{better-auth.8zoxzg-F-D8e0X4ys.js → better-auth.CMQ3rA-I-7umXOENE.js} +1 -7
- package/dist/better-auth.CMQ3rA-I-7umXOENE.js.map +1 -0
- package/dist/{better-auth.8zoxzg-F-BEBqzpjz.cjs → better-auth.CMQ3rA-I-C2nBKRMa.cjs} +1 -7
- package/dist/better-auth.CMQ3rA-I-C2nBKRMa.cjs.map +1 -0
- package/dist/components/Accordion/Accordion.cjs +2 -2
- package/dist/components/Accordion/Accordion.cjs.map +1 -1
- package/dist/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/components/Accordion/Accordion.mjs +3 -3
- package/dist/components/Accordion/Accordion.mjs.map +1 -1
- package/dist/components/Badge/index.cjs +69 -12
- package/dist/components/Badge/index.cjs.map +1 -1
- package/dist/components/Badge/index.d.ts +18 -2
- package/dist/components/Badge/index.d.ts.map +1 -1
- package/dist/components/Badge/index.mjs +69 -12
- package/dist/components/Badge/index.mjs.map +1 -1
- package/dist/components/Breadcrumb/index.cjs +4 -5
- package/dist/components/Breadcrumb/index.cjs.map +1 -1
- package/dist/components/Breadcrumb/index.d.ts +2 -1
- package/dist/components/Breadcrumb/index.d.ts.map +1 -1
- package/dist/components/Breadcrumb/index.mjs +7 -8
- package/dist/components/Breadcrumb/index.mjs.map +1 -1
- package/dist/components/Button/Button.cjs +95 -40
- package/dist/components/Button/Button.cjs.map +1 -1
- package/dist/components/Button/Button.d.ts +42 -1
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.mjs +96 -41
- package/dist/components/Button/Button.mjs.map +1 -1
- package/dist/components/Button/index.cjs +5 -0
- package/dist/components/Button/index.cjs.map +1 -1
- package/dist/components/Button/index.mjs +7 -2
- package/dist/components/Container/index.cjs +67 -0
- package/dist/components/Container/index.cjs.map +1 -1
- package/dist/components/Container/index.d.ts +53 -0
- package/dist/components/Container/index.d.ts.map +1 -1
- package/dist/components/Container/index.mjs +67 -0
- package/dist/components/Container/index.mjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditor.cjs +3 -1
- package/dist/components/ContentEditor/ContentEditor.cjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditor.d.ts.map +1 -1
- package/dist/components/ContentEditor/ContentEditor.mjs +3 -1
- package/dist/components/ContentEditor/ContentEditor.mjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditorInput.cjs +7 -7
- package/dist/components/ContentEditor/ContentEditorInput.cjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditorInput.d.ts +1 -1
- package/dist/components/ContentEditor/ContentEditorInput.d.ts.map +1 -1
- package/dist/components/ContentEditor/ContentEditorInput.mjs +9 -9
- package/dist/components/ContentEditor/ContentEditorInput.mjs.map +1 -1
- package/dist/components/CopyButton/CopyButton.content.cjs.map +1 -0
- package/dist/components/CopyButton/CopyButton.content.d.ts.map +1 -0
- package/dist/components/CopyButton/CopyButton.content.mjs.map +1 -0
- package/dist/components/CopyButton/index.cjs +4 -5
- package/dist/components/CopyButton/index.cjs.map +1 -1
- package/dist/components/CopyButton/index.d.ts.map +1 -1
- package/dist/components/CopyButton/index.mjs +6 -7
- package/dist/components/CopyButton/index.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs +29 -33
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs +32 -36
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs +4 -6
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +5 -7
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.cjs +2 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.d.ts +1 -0
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.mjs +1 -0
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.cjs +2 -3
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.mjs +3 -4
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +5 -5
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +6 -6
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs +2 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts +3 -24
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs +1 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.cjs +2 -3
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.cjs +2 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.d.ts +1 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs +1 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs +3 -4
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +6 -10
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +9 -13
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs +8 -9
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.d.ts +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +10 -11
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.cjs +2 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.d.ts +1 -0
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs +1 -0
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs +1 -2
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs +2 -3
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +14 -14
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +16 -16
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs +2 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts +3 -24
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs +1 -0
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.cjs +11 -12
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.mjs +13 -14
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.cjs +3 -2
- package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.d.ts +1 -0
- package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.mjs +2 -1
- package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.cjs +5 -8
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.mjs +7 -10
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.cjs +2 -1
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.d.ts +1 -0
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.mjs +1 -0
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.cjs +2 -1
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.d.ts +1 -0
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs +1 -0
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs.map +1 -1
- package/dist/components/DropDown/index.cjs +11 -2
- package/dist/components/DropDown/index.cjs.map +1 -1
- package/dist/components/DropDown/index.d.ts +7 -2
- package/dist/components/DropDown/index.d.ts.map +1 -1
- package/dist/components/DropDown/index.mjs +12 -3
- package/dist/components/DropDown/index.mjs.map +1 -1
- package/dist/components/EditableField/EditableFieldLayout.cjs +9 -9
- package/dist/components/EditableField/EditableFieldLayout.cjs.map +1 -1
- package/dist/components/EditableField/EditableFieldLayout.d.ts +1 -1
- package/dist/components/EditableField/EditableFieldLayout.d.ts.map +1 -1
- package/dist/components/EditableField/EditableFieldLayout.mjs +10 -10
- package/dist/components/EditableField/EditableFieldLayout.mjs.map +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.cjs +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.mjs +1 -1
- package/dist/components/ExpandCollapse/ExpandCollapse.cjs +56 -0
- package/dist/components/ExpandCollapse/ExpandCollapse.cjs.map +1 -0
- package/dist/components/ExpandCollapse/ExpandCollapse.d.ts +9 -0
- package/dist/components/ExpandCollapse/ExpandCollapse.d.ts.map +1 -0
- package/dist/components/ExpandCollapse/ExpandCollapse.mjs +56 -0
- package/dist/components/ExpandCollapse/ExpandCollapse.mjs.map +1 -0
- package/dist/components/ExpandCollapse/expandCollapse.content.cjs +41 -0
- package/dist/components/ExpandCollapse/expandCollapse.content.cjs.map +1 -0
- package/dist/components/ExpandCollapse/expandCollapse.content.d.ts +40 -0
- package/dist/components/ExpandCollapse/expandCollapse.content.d.ts.map +1 -0
- package/dist/components/ExpandCollapse/expandCollapse.content.mjs +42 -0
- package/dist/components/ExpandCollapse/expandCollapse.content.mjs.map +1 -0
- package/dist/components/ExpandCollapse/index.cjs +5 -0
- package/dist/components/ExpandCollapse/index.cjs.map +1 -0
- package/dist/components/ExpandCollapse/index.d.ts +2 -0
- package/dist/components/ExpandCollapse/index.d.ts.map +1 -0
- package/dist/components/ExpandCollapse/index.mjs +5 -0
- package/dist/components/ExpandCollapse/index.mjs.map +1 -0
- package/dist/components/Form/FormBase.cjs +1 -1
- package/dist/components/Form/FormBase.mjs +1 -1
- package/dist/components/Form/elements/FormElementWrapper.cjs +2 -2
- package/dist/components/Form/elements/FormElementWrapper.mjs +2 -2
- package/dist/components/IDE/Code.cjs +12 -1
- package/dist/components/IDE/Code.cjs.map +1 -1
- package/dist/components/IDE/Code.d.ts +1 -0
- package/dist/components/IDE/Code.d.ts.map +1 -1
- package/dist/components/IDE/Code.mjs +12 -1
- package/dist/components/IDE/Code.mjs.map +1 -1
- package/dist/components/IDE/CodeBlockClient.cjs +2 -2
- package/dist/components/IDE/CodeBlockClient.cjs.map +1 -1
- package/dist/components/IDE/CodeBlockClient.mjs +2 -2
- package/dist/components/IDE/CodeBlockClient.mjs.map +1 -1
- package/dist/components/IDE/CodeBlockServer.cjs +2 -2
- package/dist/components/IDE/CodeBlockServer.cjs.map +1 -1
- package/dist/components/IDE/CodeBlockServer.mjs +2 -2
- package/dist/components/IDE/CodeBlockServer.mjs.map +1 -1
- package/dist/components/IDE/CodeContext.cjs +1 -1
- package/dist/components/IDE/CodeContext.mjs +1 -1
- package/dist/components/IDE/CopyCode.cjs +2 -3
- package/dist/components/IDE/CopyCode.cjs.map +1 -1
- package/dist/components/IDE/CopyCode.d.ts.map +1 -1
- package/dist/components/IDE/CopyCode.mjs +4 -5
- package/dist/components/IDE/CopyCode.mjs.map +1 -1
- package/dist/components/Input/Checkbox.cjs +21 -0
- package/dist/components/Input/Checkbox.cjs.map +1 -1
- package/dist/components/Input/Checkbox.d.ts +21 -1
- package/dist/components/Input/Checkbox.d.ts.map +1 -1
- package/dist/components/Input/Checkbox.mjs +21 -0
- package/dist/components/Input/Checkbox.mjs.map +1 -1
- package/dist/components/Input/Input.cjs +12 -0
- package/dist/components/Input/Input.cjs.map +1 -1
- package/dist/components/Input/Input.d.ts +13 -2
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/Input/Input.mjs +12 -0
- package/dist/components/Input/Input.mjs.map +1 -1
- package/dist/components/Input/index.cjs +4 -0
- package/dist/components/Input/index.cjs.map +1 -1
- package/dist/components/Input/index.mjs +6 -2
- package/dist/components/Link/Link.cjs +60 -19
- package/dist/components/Link/Link.cjs.map +1 -1
- package/dist/components/Link/Link.d.ts +27 -2
- package/dist/components/Link/Link.d.ts.map +1 -1
- package/dist/components/Link/Link.mjs +60 -19
- package/dist/components/Link/Link.mjs.map +1 -1
- package/dist/components/Link/index.cjs +3 -0
- package/dist/components/Link/index.cjs.map +1 -1
- package/dist/components/Link/index.mjs +4 -1
- package/dist/components/Loader/index.content.d.ts +2 -24
- package/dist/components/Loader/index.content.d.ts.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs +8 -9
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.d.ts.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs +11 -12
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs +1 -1
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs +4 -5
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.d.ts.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs +6 -7
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs.map +1 -1
- package/dist/components/MarkDownRender/index.cjs +17 -23
- package/dist/components/MarkDownRender/index.cjs.map +1 -1
- package/dist/components/MarkDownRender/index.d.ts.map +1 -1
- package/dist/components/MarkDownRender/index.mjs +18 -24
- package/dist/components/MarkDownRender/index.mjs.map +1 -1
- package/dist/components/Modal/Modal.cjs +14 -5
- package/dist/components/Modal/Modal.cjs.map +1 -1
- package/dist/components/Modal/Modal.d.ts +10 -4
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Modal/Modal.mjs +16 -7
- package/dist/components/Modal/Modal.mjs.map +1 -1
- package/dist/components/Modal/index.cjs +1 -0
- package/dist/components/Modal/index.cjs.map +1 -1
- package/dist/components/Modal/index.mjs +3 -2
- package/dist/components/Navbar/DesktopNavbar.cjs +2 -2
- package/dist/components/Navbar/DesktopNavbar.cjs.map +1 -1
- package/dist/components/Navbar/DesktopNavbar.d.ts.map +1 -1
- package/dist/components/Navbar/DesktopNavbar.mjs +3 -3
- package/dist/components/Navbar/DesktopNavbar.mjs.map +1 -1
- package/dist/components/Navbar/MobileNavbar.cjs +1 -1
- package/dist/components/Navbar/MobileNavbar.mjs +1 -1
- package/dist/components/Navbar/index.cjs +2 -2
- package/dist/components/Navbar/index.cjs.map +1 -1
- package/dist/components/Navbar/index.mjs +2 -2
- package/dist/components/Navbar/index.mjs.map +1 -1
- package/dist/components/Popover/index.cjs +12 -0
- package/dist/components/Popover/index.cjs.map +1 -1
- package/dist/components/Popover/index.d.ts +10 -2
- package/dist/components/Popover/index.d.ts.map +1 -1
- package/dist/components/Popover/index.mjs +13 -1
- package/dist/components/Popover/index.mjs.map +1 -1
- package/dist/components/RightDrawer/RightDrawer.cjs +5 -5
- package/dist/components/RightDrawer/RightDrawer.cjs.map +1 -1
- package/dist/components/RightDrawer/RightDrawer.mjs +6 -6
- package/dist/components/RightDrawer/RightDrawer.mjs.map +1 -1
- package/dist/components/Select/Multiselect.cjs +1 -1
- package/dist/components/Select/Multiselect.cjs.map +1 -1
- package/dist/components/Select/Multiselect.mjs +2 -2
- package/dist/components/Select/Multiselect.mjs.map +1 -1
- package/dist/components/Select/Select.cjs +12 -1
- package/dist/components/Select/Select.cjs.map +1 -1
- package/dist/components/Select/Select.d.ts +5 -1
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/Select.mjs +12 -1
- package/dist/components/Select/Select.mjs.map +1 -1
- package/dist/components/Select/index.cjs +1 -0
- package/dist/components/Select/index.cjs.map +1 -1
- package/dist/components/Select/index.mjs +2 -1
- package/dist/components/SocialNetworks/index.cjs +1 -1
- package/dist/components/SocialNetworks/index.cjs.map +1 -1
- package/dist/components/SocialNetworks/index.mjs +1 -1
- package/dist/components/SocialNetworks/index.mjs.map +1 -1
- package/dist/components/SwitchSelector/index.cjs +89 -18
- package/dist/components/SwitchSelector/index.cjs.map +1 -1
- package/dist/components/SwitchSelector/index.d.ts +16 -2
- package/dist/components/SwitchSelector/index.d.ts.map +1 -1
- package/dist/components/SwitchSelector/index.mjs +90 -19
- package/dist/components/SwitchSelector/index.mjs.map +1 -1
- package/dist/components/TabSelector/TabSelector.cjs +12 -1
- package/dist/components/TabSelector/TabSelector.cjs.map +1 -1
- package/dist/components/TabSelector/TabSelector.d.ts +12 -1
- package/dist/components/TabSelector/TabSelector.d.ts.map +1 -1
- package/dist/components/TabSelector/TabSelector.mjs +13 -2
- package/dist/components/TabSelector/TabSelector.mjs.map +1 -1
- package/dist/components/TabSelector/index.cjs +1 -0
- package/dist/components/TabSelector/index.cjs.map +1 -1
- package/dist/components/TabSelector/index.d.ts +1 -0
- package/dist/components/TabSelector/index.d.ts.map +1 -1
- package/dist/components/TabSelector/index.mjs +3 -2
- package/dist/components/Table/Table.cjs +58 -0
- package/dist/components/Table/Table.cjs.map +1 -0
- package/dist/components/Table/Table.d.ts +7 -0
- package/dist/components/Table/Table.d.ts.map +1 -0
- package/dist/components/Table/Table.mjs +58 -0
- package/dist/components/Table/Table.mjs.map +1 -0
- package/dist/components/Table/index.cjs +5 -0
- package/dist/components/Table/index.cjs.map +1 -0
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/Table/index.d.ts.map +1 -0
- package/dist/components/Table/index.mjs +5 -0
- package/dist/components/Table/index.mjs.map +1 -0
- package/dist/components/Table/table.content.cjs +24 -0
- package/dist/components/Table/table.content.cjs.map +1 -0
- package/dist/components/Table/table.content.d.ts +40 -0
- package/dist/components/Table/table.content.d.ts.map +1 -0
- package/dist/components/Table/table.content.mjs +25 -0
- package/dist/components/Table/table.content.mjs.map +1 -0
- package/dist/components/Tag/index.cjs +131 -22
- package/dist/components/Tag/index.cjs.map +1 -1
- package/dist/components/Tag/index.d.ts +37 -5
- package/dist/components/Tag/index.d.ts.map +1 -1
- package/dist/components/Tag/index.mjs +132 -23
- package/dist/components/Tag/index.mjs.map +1 -1
- package/dist/components/TextArea/AutocompleteTextArea.cjs +1 -1
- package/dist/components/TextArea/AutocompleteTextArea.mjs +1 -1
- package/dist/components/TextArea/TextArea.cjs.map +1 -1
- package/dist/components/TextArea/TextArea.d.ts +5 -3
- package/dist/components/TextArea/TextArea.d.ts.map +1 -1
- package/dist/components/TextArea/TextArea.mjs.map +1 -1
- package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.cjs +1 -1
- package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.cjs.map +1 -1
- package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.mjs +2 -2
- package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.mjs.map +1 -1
- package/dist/components/index.cjs +36 -0
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.mjs +49 -13
- package/dist/components/index.mjs.map +1 -1
- package/dist/hooks/auth.cjs +2 -2
- package/dist/hooks/auth.cjs.map +1 -1
- package/dist/hooks/auth.mjs +1 -1
- package/dist/hooks/auth.mjs.map +1 -1
- package/dist/hooks/intlayerAPIHooks.cjs +1 -1
- package/dist/hooks/intlayerAPIHooks.d.ts +1 -1
- package/dist/hooks/intlayerAPIHooks.d.ts.map +1 -1
- package/dist/hooks/intlayerAPIHooks.mjs +1 -1
- package/dist/hooks/useAsync/useAsync.cjs +6 -6
- package/dist/hooks/useAsync/useAsync.cjs.map +1 -1
- package/dist/hooks/useAsync/useAsync.mjs +6 -6
- package/dist/hooks/useAsync/useAsync.mjs.map +1 -1
- package/dist/hooks/useUser/index.cjs +1 -1
- package/dist/hooks/useUser/index.mjs +1 -1
- package/dist/index-BCuMWKyy.js.map +1 -1
- package/dist/index-BYzBot7l.cjs.map +1 -1
- package/dist/{parse-BJVwmz92.cjs → parse-Ltyyb1op.cjs} +9 -11
- package/dist/parse-Ltyyb1op.cjs.map +1 -0
- package/dist/{parse-pnJgclyf.js → parse-Vrm0h1r9.js} +30 -32
- package/dist/parse-Vrm0h1r9.js.map +1 -0
- package/dist/{schemas-BIuxHDyZ.js → schemas-DEXdAbCK.js} +75 -46
- package/dist/schemas-DEXdAbCK.js.map +1 -0
- package/dist/{schemas-Q6C7ZNs3.cjs → schemas-lh5OFOvX.cjs} +75 -46
- package/dist/schemas-lh5OFOvX.cjs.map +1 -0
- package/dist/{zod-K7y5gPX4.cjs → zod-BvUVjPTw.cjs} +11 -11
- package/dist/zod-BvUVjPTw.cjs.map +1 -0
- package/dist/{zod-D4WapgbL.js → zod-CJrbzxwg.js} +11 -11
- package/dist/zod-CJrbzxwg.js.map +1 -0
- package/package.json +42 -35
- package/dist/better-auth.8zoxzg-F-BEBqzpjz.cjs.map +0 -1
- package/dist/better-auth.8zoxzg-F-D8e0X4ys.js.map +0 -1
- package/dist/components/Headers/SectionScroller.cjs +0 -29
- package/dist/components/Headers/SectionScroller.cjs.map +0 -1
- package/dist/components/Headers/SectionScroller.d.ts +0 -2
- package/dist/components/Headers/SectionScroller.d.ts.map +0 -1
- package/dist/components/Headers/SectionScroller.mjs +0 -29
- package/dist/components/Headers/SectionScroller.mjs.map +0 -1
- package/dist/components/IDE/CopyButton.content.cjs.map +0 -1
- package/dist/components/IDE/CopyButton.content.d.ts.map +0 -1
- package/dist/components/IDE/CopyButton.content.mjs.map +0 -1
- package/dist/parse-BJVwmz92.cjs.map +0 -1
- package/dist/parse-pnJgclyf.js.map +0 -1
- package/dist/schemas-BIuxHDyZ.js.map +0 -1
- package/dist/schemas-Q6C7ZNs3.cjs.map +0 -1
- package/dist/zod-D4WapgbL.js.map +0 -1
- package/dist/zod-K7y5gPX4.cjs.map +0 -1
- /package/dist/components/{IDE → CopyButton}/CopyButton.content.cjs +0 -0
- /package/dist/components/{IDE → CopyButton}/CopyButton.content.d.ts +0 -0
- /package/dist/components/{IDE → CopyButton}/CopyButton.content.mjs +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-Vrm0h1r9.js","sources":["../../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/core.js","../../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/util.js","../../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/errors.js","../../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/parse.js"],"sourcesContent":["/** A special constant with type `never` */\nexport const NEVER = Object.freeze({\n status: \"aborted\",\n});\nexport /*@__NO_SIDE_EFFECTS__*/ function $constructor(name, initializer, params) {\n function init(inst, def) {\n var _a;\n Object.defineProperty(inst, \"_zod\", {\n value: inst._zod ?? {},\n enumerable: false,\n });\n (_a = inst._zod).traits ?? (_a.traits = new Set());\n inst._zod.traits.add(name);\n initializer(inst, def);\n // support prototype modifications\n for (const k in _.prototype) {\n if (!(k in inst))\n Object.defineProperty(inst, k, { value: _.prototype[k].bind(inst) });\n }\n inst._zod.constr = _;\n inst._zod.def = def;\n }\n // doesn't work if Parent has a constructor with arguments\n const Parent = params?.Parent ?? Object;\n class Definition extends Parent {\n }\n Object.defineProperty(Definition, \"name\", { value: name });\n function _(def) {\n var _a;\n const inst = params?.Parent ? new Definition() : this;\n init(inst, def);\n (_a = inst._zod).deferred ?? (_a.deferred = []);\n for (const fn of inst._zod.deferred) {\n fn();\n }\n return inst;\n }\n Object.defineProperty(_, \"init\", { value: init });\n Object.defineProperty(_, Symbol.hasInstance, {\n value: (inst) => {\n if (params?.Parent && inst instanceof params.Parent)\n return true;\n return inst?._zod?.traits?.has(name);\n },\n });\n Object.defineProperty(_, \"name\", { value: name });\n return _;\n}\n////////////////////////////// UTILITIES ///////////////////////////////////////\nexport const $brand = Symbol(\"zod_brand\");\nexport class $ZodAsyncError extends Error {\n constructor() {\n super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);\n }\n}\nexport const globalConfig = {};\nexport function config(newConfig) {\n if (newConfig)\n Object.assign(globalConfig, newConfig);\n return globalConfig;\n}\n","// functions\nexport function assertEqual(val) {\n return val;\n}\nexport function assertNotEqual(val) {\n return val;\n}\nexport function assertIs(_arg) { }\nexport function assertNever(_x) {\n throw new Error();\n}\nexport function assert(_) { }\nexport function getEnumValues(entries) {\n const numericValues = Object.values(entries).filter((v) => typeof v === \"number\");\n const values = Object.entries(entries)\n .filter(([k, _]) => numericValues.indexOf(+k) === -1)\n .map(([_, v]) => v);\n return values;\n}\nexport function joinValues(array, separator = \"|\") {\n return array.map((val) => stringifyPrimitive(val)).join(separator);\n}\nexport function jsonStringifyReplacer(_, value) {\n if (typeof value === \"bigint\")\n return value.toString();\n return value;\n}\nexport function cached(getter) {\n const set = false;\n return {\n get value() {\n if (!set) {\n const value = getter();\n Object.defineProperty(this, \"value\", { value });\n return value;\n }\n throw new Error(\"cached value already set\");\n },\n };\n}\nexport function nullish(input) {\n return input === null || input === undefined;\n}\nexport function cleanRegex(source) {\n const start = source.startsWith(\"^\") ? 1 : 0;\n const end = source.endsWith(\"$\") ? source.length - 1 : source.length;\n return source.slice(start, end);\n}\nexport function floatSafeRemainder(val, step) {\n const valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n const stepDecCount = (step.toString().split(\".\")[1] || \"\").length;\n const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n const valInt = Number.parseInt(val.toFixed(decCount).replace(\".\", \"\"));\n const stepInt = Number.parseInt(step.toFixed(decCount).replace(\".\", \"\"));\n return (valInt % stepInt) / 10 ** decCount;\n}\nexport function defineLazy(object, key, getter) {\n const set = false;\n Object.defineProperty(object, key, {\n get() {\n if (!set) {\n const value = getter();\n object[key] = value;\n return value;\n }\n throw new Error(\"cached value already set\");\n },\n set(v) {\n Object.defineProperty(object, key, {\n value: v,\n // configurable: true,\n });\n // object[key] = v;\n },\n configurable: true,\n });\n}\nexport function assignProp(target, prop, value) {\n Object.defineProperty(target, prop, {\n value,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n}\nexport function getElementAtPath(obj, path) {\n if (!path)\n return obj;\n return path.reduce((acc, key) => acc?.[key], obj);\n}\nexport function promiseAllObject(promisesObj) {\n const keys = Object.keys(promisesObj);\n const promises = keys.map((key) => promisesObj[key]);\n return Promise.all(promises).then((results) => {\n const resolvedObj = {};\n for (let i = 0; i < keys.length; i++) {\n resolvedObj[keys[i]] = results[i];\n }\n return resolvedObj;\n });\n}\nexport function randomString(length = 10) {\n const chars = \"abcdefghijklmnopqrstuvwxyz\";\n let str = \"\";\n for (let i = 0; i < length; i++) {\n str += chars[Math.floor(Math.random() * chars.length)];\n }\n return str;\n}\nexport function esc(str) {\n return JSON.stringify(str);\n}\nexport const captureStackTrace = Error.captureStackTrace\n ? Error.captureStackTrace\n : (..._args) => { };\nexport function isObject(data) {\n return typeof data === \"object\" && data !== null && !Array.isArray(data);\n}\nexport const allowsEval = cached(() => {\n if (typeof navigator !== \"undefined\" && navigator?.userAgent?.includes(\"Cloudflare\")) {\n return false;\n }\n try {\n const F = Function;\n new F(\"\");\n return true;\n }\n catch (_) {\n return false;\n }\n});\nexport function isPlainObject(o) {\n if (isObject(o) === false)\n return false;\n // modified constructor\n const ctor = o.constructor;\n if (ctor === undefined)\n return true;\n // modified prototype\n const prot = ctor.prototype;\n if (isObject(prot) === false)\n return false;\n // ctor doesn't have static `isPrototypeOf`\n if (Object.prototype.hasOwnProperty.call(prot, \"isPrototypeOf\") === false) {\n return false;\n }\n return true;\n}\nexport function numKeys(data) {\n let keyCount = 0;\n for (const key in data) {\n if (Object.prototype.hasOwnProperty.call(data, key)) {\n keyCount++;\n }\n }\n return keyCount;\n}\nexport const getParsedType = (data) => {\n const t = typeof data;\n switch (t) {\n case \"undefined\":\n return \"undefined\";\n case \"string\":\n return \"string\";\n case \"number\":\n return Number.isNaN(data) ? \"nan\" : \"number\";\n case \"boolean\":\n return \"boolean\";\n case \"function\":\n return \"function\";\n case \"bigint\":\n return \"bigint\";\n case \"symbol\":\n return \"symbol\";\n case \"object\":\n if (Array.isArray(data)) {\n return \"array\";\n }\n if (data === null) {\n return \"null\";\n }\n if (data.then && typeof data.then === \"function\" && data.catch && typeof data.catch === \"function\") {\n return \"promise\";\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return \"map\";\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return \"set\";\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return \"date\";\n }\n if (typeof File !== \"undefined\" && data instanceof File) {\n return \"file\";\n }\n return \"object\";\n default:\n throw new Error(`Unknown data type: ${t}`);\n }\n};\nexport const propertyKeyTypes = new Set([\"string\", \"number\", \"symbol\"]);\nexport const primitiveTypes = new Set([\"string\", \"number\", \"bigint\", \"boolean\", \"symbol\", \"undefined\"]);\nexport function escapeRegex(str) {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\n// zod-specific utils\nexport function clone(inst, def, params) {\n const cl = new inst._zod.constr(def ?? inst._zod.def);\n if (!def || params?.parent)\n cl._zod.parent = inst;\n return cl;\n}\nexport function normalizeParams(_params) {\n const params = _params;\n if (!params)\n return {};\n if (typeof params === \"string\")\n return { error: () => params };\n if (params?.message !== undefined) {\n if (params?.error !== undefined)\n throw new Error(\"Cannot specify both `message` and `error` params\");\n params.error = params.message;\n }\n delete params.message;\n if (typeof params.error === \"string\")\n return { ...params, error: () => params.error };\n return params;\n}\nexport function createTransparentProxy(getter) {\n let target;\n return new Proxy({}, {\n get(_, prop, receiver) {\n target ?? (target = getter());\n return Reflect.get(target, prop, receiver);\n },\n set(_, prop, value, receiver) {\n target ?? (target = getter());\n return Reflect.set(target, prop, value, receiver);\n },\n has(_, prop) {\n target ?? (target = getter());\n return Reflect.has(target, prop);\n },\n deleteProperty(_, prop) {\n target ?? (target = getter());\n return Reflect.deleteProperty(target, prop);\n },\n ownKeys(_) {\n target ?? (target = getter());\n return Reflect.ownKeys(target);\n },\n getOwnPropertyDescriptor(_, prop) {\n target ?? (target = getter());\n return Reflect.getOwnPropertyDescriptor(target, prop);\n },\n defineProperty(_, prop, descriptor) {\n target ?? (target = getter());\n return Reflect.defineProperty(target, prop, descriptor);\n },\n });\n}\nexport function stringifyPrimitive(value) {\n if (typeof value === \"bigint\")\n return value.toString() + \"n\";\n if (typeof value === \"string\")\n return `\"${value}\"`;\n return `${value}`;\n}\nexport function optionalKeys(shape) {\n return Object.keys(shape).filter((k) => {\n return shape[k]._zod.optin === \"optional\" && shape[k]._zod.optout === \"optional\";\n });\n}\nexport const NUMBER_FORMAT_RANGES = {\n safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],\n int32: [-2147483648, 2147483647],\n uint32: [0, 4294967295],\n float32: [-3.4028234663852886e38, 3.4028234663852886e38],\n float64: [-Number.MAX_VALUE, Number.MAX_VALUE],\n};\nexport const BIGINT_FORMAT_RANGES = {\n int64: [/* @__PURE__*/ BigInt(\"-9223372036854775808\"), /* @__PURE__*/ BigInt(\"9223372036854775807\")],\n uint64: [/* @__PURE__*/ BigInt(0), /* @__PURE__*/ BigInt(\"18446744073709551615\")],\n};\nexport function pick(schema, mask) {\n const newShape = {};\n const currDef = schema._zod.def; //.shape;\n for (const key in mask) {\n if (!(key in currDef.shape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n // pick key\n newShape[key] = currDef.shape[key];\n }\n return clone(schema, {\n ...schema._zod.def,\n shape: newShape,\n checks: [],\n });\n}\nexport function omit(schema, mask) {\n const newShape = { ...schema._zod.def.shape };\n const currDef = schema._zod.def; //.shape;\n for (const key in mask) {\n if (!(key in currDef.shape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n delete newShape[key];\n }\n return clone(schema, {\n ...schema._zod.def,\n shape: newShape,\n checks: [],\n });\n}\nexport function extend(schema, shape) {\n if (!isPlainObject(shape)) {\n throw new Error(\"Invalid input to extend: expected a plain object\");\n }\n const def = {\n ...schema._zod.def,\n get shape() {\n const _shape = { ...schema._zod.def.shape, ...shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n checks: [], // delete existing checks\n };\n return clone(schema, def);\n}\nexport function merge(a, b) {\n return clone(a, {\n ...a._zod.def,\n get shape() {\n const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n catchall: b._zod.def.catchall,\n checks: [], // delete existing checks\n });\n}\nexport function partial(Class, schema, mask) {\n const oldShape = schema._zod.def.shape;\n const shape = { ...oldShape };\n if (mask) {\n for (const key in mask) {\n if (!(key in oldShape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n // if (oldShape[key]!._zod.optin === \"optional\") continue;\n shape[key] = Class\n ? new Class({\n type: \"optional\",\n innerType: oldShape[key],\n })\n : oldShape[key];\n }\n }\n else {\n for (const key in oldShape) {\n // if (oldShape[key]!._zod.optin === \"optional\") continue;\n shape[key] = Class\n ? new Class({\n type: \"optional\",\n innerType: oldShape[key],\n })\n : oldShape[key];\n }\n }\n return clone(schema, {\n ...schema._zod.def,\n shape,\n checks: [],\n });\n}\nexport function required(Class, schema, mask) {\n const oldShape = schema._zod.def.shape;\n const shape = { ...oldShape };\n if (mask) {\n for (const key in mask) {\n if (!(key in shape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n // overwrite with non-optional\n shape[key] = new Class({\n type: \"nonoptional\",\n innerType: oldShape[key],\n });\n }\n }\n else {\n for (const key in oldShape) {\n // overwrite with non-optional\n shape[key] = new Class({\n type: \"nonoptional\",\n innerType: oldShape[key],\n });\n }\n }\n return clone(schema, {\n ...schema._zod.def,\n shape,\n // optional: [],\n checks: [],\n });\n}\nexport function aborted(x, startIndex = 0) {\n for (let i = startIndex; i < x.issues.length; i++) {\n if (x.issues[i]?.continue !== true)\n return true;\n }\n return false;\n}\nexport function prefixIssues(path, issues) {\n return issues.map((iss) => {\n var _a;\n (_a = iss).path ?? (_a.path = []);\n iss.path.unshift(path);\n return iss;\n });\n}\nexport function unwrapMessage(message) {\n return typeof message === \"string\" ? message : message?.message;\n}\nexport function finalizeIssue(iss, ctx, config) {\n const full = { ...iss, path: iss.path ?? [] };\n // for backwards compatibility\n if (!iss.message) {\n const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ??\n unwrapMessage(ctx?.error?.(iss)) ??\n unwrapMessage(config.customError?.(iss)) ??\n unwrapMessage(config.localeError?.(iss)) ??\n \"Invalid input\";\n full.message = message;\n }\n // delete (full as any).def;\n delete full.inst;\n delete full.continue;\n if (!ctx?.reportInput) {\n delete full.input;\n }\n return full;\n}\nexport function getSizableOrigin(input) {\n if (input instanceof Set)\n return \"set\";\n if (input instanceof Map)\n return \"map\";\n if (input instanceof File)\n return \"file\";\n return \"unknown\";\n}\nexport function getLengthableOrigin(input) {\n if (Array.isArray(input))\n return \"array\";\n if (typeof input === \"string\")\n return \"string\";\n return \"unknown\";\n}\nexport function issue(...args) {\n const [iss, input, inst] = args;\n if (typeof iss === \"string\") {\n return {\n message: iss,\n code: \"custom\",\n input,\n inst,\n };\n }\n return { ...iss };\n}\nexport function cleanEnum(obj) {\n return Object.entries(obj)\n .filter(([k, _]) => {\n // return true if NaN, meaning it's not a number, thus a string key\n return Number.isNaN(Number.parseInt(k, 10));\n })\n .map((el) => el[1]);\n}\n// instanceof\nexport class Class {\n constructor(..._args) { }\n}\n","import { $constructor } from \"./core.js\";\nimport * as util from \"./util.js\";\nconst initializer = (inst, def) => {\n inst.name = \"$ZodError\";\n Object.defineProperty(inst, \"_zod\", {\n value: inst._zod,\n enumerable: false,\n });\n Object.defineProperty(inst, \"issues\", {\n value: def,\n enumerable: false,\n });\n Object.defineProperty(inst, \"message\", {\n get() {\n return JSON.stringify(def, util.jsonStringifyReplacer, 2);\n },\n enumerable: true,\n // configurable: false,\n });\n Object.defineProperty(inst, \"toString\", {\n value: () => inst.message,\n enumerable: false,\n });\n};\nexport const $ZodError = $constructor(\"$ZodError\", initializer);\nexport const $ZodRealError = $constructor(\"$ZodError\", initializer, { Parent: Error });\nexport function flattenError(error, mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of error.issues) {\n if (sub.path.length > 0) {\n fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n fieldErrors[sub.path[0]].push(mapper(sub));\n }\n else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n}\nexport function formatError(error, _mapper) {\n const mapper = _mapper ||\n function (issue) {\n return issue.message;\n };\n const fieldErrors = { _errors: [] };\n const processError = (error) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\" && issue.errors.length) {\n issue.errors.map((issues) => processError({ issues }));\n }\n else if (issue.code === \"invalid_key\") {\n processError({ issues: issue.issues });\n }\n else if (issue.code === \"invalid_element\") {\n processError({ issues: issue.issues });\n }\n else if (issue.path.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n }\n else {\n let curr = fieldErrors;\n let i = 0;\n while (i < issue.path.length) {\n const el = issue.path[i];\n const terminal = i === issue.path.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n }\n else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i++;\n }\n }\n }\n };\n processError(error);\n return fieldErrors;\n}\nexport function treeifyError(error, _mapper) {\n const mapper = _mapper ||\n function (issue) {\n return issue.message;\n };\n const result = { errors: [] };\n const processError = (error, path = []) => {\n var _a, _b;\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\" && issue.errors.length) {\n // regular union error\n issue.errors.map((issues) => processError({ issues }, issue.path));\n }\n else if (issue.code === \"invalid_key\") {\n processError({ issues: issue.issues }, issue.path);\n }\n else if (issue.code === \"invalid_element\") {\n processError({ issues: issue.issues }, issue.path);\n }\n else {\n const fullpath = [...path, ...issue.path];\n if (fullpath.length === 0) {\n result.errors.push(mapper(issue));\n continue;\n }\n let curr = result;\n let i = 0;\n while (i < fullpath.length) {\n const el = fullpath[i];\n const terminal = i === fullpath.length - 1;\n if (typeof el === \"string\") {\n curr.properties ?? (curr.properties = {});\n (_a = curr.properties)[el] ?? (_a[el] = { errors: [] });\n curr = curr.properties[el];\n }\n else {\n curr.items ?? (curr.items = []);\n (_b = curr.items)[el] ?? (_b[el] = { errors: [] });\n curr = curr.items[el];\n }\n if (terminal) {\n curr.errors.push(mapper(issue));\n }\n i++;\n }\n }\n }\n };\n processError(error);\n return result;\n}\n/** Format a ZodError as a human-readable string in the following form.\n *\n * From\n *\n * ```ts\n * ZodError {\n * issues: [\n * {\n * expected: 'string',\n * code: 'invalid_type',\n * path: [ 'username' ],\n * message: 'Invalid input: expected string'\n * },\n * {\n * expected: 'number',\n * code: 'invalid_type',\n * path: [ 'favoriteNumbers', 1 ],\n * message: 'Invalid input: expected number'\n * }\n * ];\n * }\n * ```\n *\n * to\n *\n * ```\n * username\n * ✖ Expected number, received string at \"username\n * favoriteNumbers[0]\n * ✖ Invalid input: expected number\n * ```\n */\nexport function toDotPath(path) {\n const segs = [];\n for (const seg of path) {\n if (typeof seg === \"number\")\n segs.push(`[${seg}]`);\n else if (typeof seg === \"symbol\")\n segs.push(`[${JSON.stringify(String(seg))}]`);\n else if (/[^\\w$]/.test(seg))\n segs.push(`[${JSON.stringify(seg)}]`);\n else {\n if (segs.length)\n segs.push(\".\");\n segs.push(seg);\n }\n }\n return segs.join(\"\");\n}\nexport function prettifyError(error) {\n const lines = [];\n // sort by path length\n const issues = [...error.issues].sort((a, b) => a.path.length - b.path.length);\n // Process each issue\n for (const issue of issues) {\n lines.push(`✖ ${issue.message}`);\n if (issue.path?.length)\n lines.push(` → at ${toDotPath(issue.path)}`);\n }\n // Convert Map to formatted string\n return lines.join(\"\\n\");\n}\n","import * as core from \"./core.js\";\nimport * as errors from \"./errors.js\";\nimport * as util from \"./util.js\";\nexport const _parse = (_Err) => (schema, value, _ctx, _params) => {\n const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };\n const result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n if (result.issues.length) {\n const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())));\n util.captureStackTrace(e, _params?.callee);\n throw e;\n }\n return result.value;\n};\nexport const parse = /* @__PURE__*/ _parse(errors.$ZodRealError);\nexport const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {\n const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };\n let result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise)\n result = await result;\n if (result.issues.length) {\n const e = new (params?.Err ?? _Err)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())));\n util.captureStackTrace(e, params?.callee);\n throw e;\n }\n return result.value;\n};\nexport const parseAsync = /* @__PURE__*/ _parseAsync(errors.$ZodRealError);\nexport const _safeParse = (_Err) => (schema, value, _ctx) => {\n const ctx = _ctx ? { ..._ctx, async: false } : { async: false };\n const result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n return result.issues.length\n ? {\n success: false,\n error: new (_Err ?? errors.$ZodError)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n }\n : { success: true, data: result.value };\n};\nexport const safeParse = /* @__PURE__*/ _safeParse(errors.$ZodRealError);\nexport const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };\n let result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise)\n result = await result;\n return result.issues.length\n ? {\n success: false,\n error: new _Err(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n }\n : { success: true, data: result.value };\n};\nexport const safeParseAsync = /* @__PURE__*/ _safeParseAsync(errors.$ZodRealError);\n"],"names":["initializer","config","util.jsonStringifyReplacer","issue","error","core.$ZodAsyncError","util.finalizeIssue","core.config","util.captureStackTrace","errors.$ZodRealError","errors.$ZodError"],"mappings":"AAIgC,SAAS,aAAa,MAAMA,cAAa,QAAQ;AAC7E,WAAS,KAAK,MAAM,KAAK;AACrB,QAAI;AACJ,WAAO,eAAe,MAAM,QAAQ;AAAA,MAChC,OAAO,KAAK,QAAQ,CAAA;AAAA,MACpB,YAAY;AAAA,IACxB,CAAS;AACD,KAAC,KAAK,KAAK,MAAM,WAAW,GAAG,SAAS,oBAAI;AAC5C,SAAK,KAAK,OAAO,IAAI,IAAI;AACzB,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,OAAO,MAAK;AAC7C;AACY,MAAC,iBAAgC,gCAAgBE,aAAoB;","x_google_ignoreList":[0,1,2,3]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as $constructor, n as nullish, g as getLengthableOrigin, e as escapeRegex, d as defineLazy, c as globalConfig, f as allowsEval, h as cached, i as isObject,
|
|
1
|
+
import { b as $constructor, n as nullish, g as getLengthableOrigin, e as escapeRegex, d as defineLazy, c as globalConfig, f as allowsEval, h as cached, i as isObject, j as esc, k as cleanRegex, l as $ZodAsyncError, s as safeParse$1, m as safeParseAsync$1, o as aborted, q as optionalKeys, r as prefixIssues, t as getEnumValues, u as propertyKeyTypes, v as finalizeIssue, w as config, x as isPlainObject, y as issue, z as normalizeParams, $ as $ZodError, A as flattenError, B as formatError, _ as _parse, C as _safeParse, D as _parseAsync, E as _safeParseAsync, F as assignProp, G as extend, H as merge, I as pick, J as omit, K as partial, L as required, M as clone } from "./parse-Vrm0h1r9.js";
|
|
2
2
|
const cuid = /^[cC][^\s-]{8,}$/;
|
|
3
3
|
const cuid2 = /^[0-9a-z]+$/;
|
|
4
4
|
const ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
|
|
@@ -58,11 +58,12 @@ const $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
|
58
58
|
(_a = inst._zod).onattach ?? (_a.onattach = []);
|
|
59
59
|
});
|
|
60
60
|
const $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
61
|
+
var _a;
|
|
61
62
|
$ZodCheck.init(inst, def);
|
|
62
|
-
inst._zod.when = (payload) => {
|
|
63
|
+
(_a = inst._zod.def).when ?? (_a.when = (payload) => {
|
|
63
64
|
const val = payload.value;
|
|
64
65
|
return !nullish(val) && val.length !== void 0;
|
|
65
|
-
};
|
|
66
|
+
});
|
|
66
67
|
inst._zod.onattach.push((inst2) => {
|
|
67
68
|
const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
|
|
68
69
|
if (def.maximum < curr)
|
|
@@ -86,11 +87,12 @@ const $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (i
|
|
|
86
87
|
};
|
|
87
88
|
});
|
|
88
89
|
const $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
90
|
+
var _a;
|
|
89
91
|
$ZodCheck.init(inst, def);
|
|
90
|
-
inst._zod.when = (payload) => {
|
|
92
|
+
(_a = inst._zod.def).when ?? (_a.when = (payload) => {
|
|
91
93
|
const val = payload.value;
|
|
92
94
|
return !nullish(val) && val.length !== void 0;
|
|
93
|
-
};
|
|
95
|
+
});
|
|
94
96
|
inst._zod.onattach.push((inst2) => {
|
|
95
97
|
const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
|
|
96
98
|
if (def.minimum > curr)
|
|
@@ -114,11 +116,12 @@ const $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (i
|
|
|
114
116
|
};
|
|
115
117
|
});
|
|
116
118
|
const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
119
|
+
var _a;
|
|
117
120
|
$ZodCheck.init(inst, def);
|
|
118
|
-
inst._zod.when = (payload) => {
|
|
121
|
+
(_a = inst._zod.def).when ?? (_a.when = (payload) => {
|
|
119
122
|
const val = payload.value;
|
|
120
123
|
return !nullish(val) && val.length !== void 0;
|
|
121
|
-
};
|
|
124
|
+
});
|
|
122
125
|
inst._zod.onattach.push((inst2) => {
|
|
123
126
|
const bag = inst2._zod.bag;
|
|
124
127
|
bag.minimum = def.length;
|
|
@@ -135,6 +138,8 @@ const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEqual
|
|
|
135
138
|
payload.issues.push({
|
|
136
139
|
origin,
|
|
137
140
|
...tooBig ? { code: "too_big", maximum: def.length } : { code: "too_small", minimum: def.length },
|
|
141
|
+
inclusive: true,
|
|
142
|
+
exact: true,
|
|
138
143
|
input: payload.value,
|
|
139
144
|
inst,
|
|
140
145
|
continue: !def.abort
|
|
@@ -142,7 +147,7 @@ const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEqual
|
|
|
142
147
|
};
|
|
143
148
|
});
|
|
144
149
|
const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
145
|
-
var _a;
|
|
150
|
+
var _a, _b;
|
|
146
151
|
$ZodCheck.init(inst, def);
|
|
147
152
|
inst._zod.onattach.push((inst2) => {
|
|
148
153
|
const bag = inst2._zod.bag;
|
|
@@ -152,22 +157,24 @@ const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringForma
|
|
|
152
157
|
bag.patterns.add(def.pattern);
|
|
153
158
|
}
|
|
154
159
|
});
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
160
|
+
if (def.pattern)
|
|
161
|
+
(_a = inst._zod).check ?? (_a.check = (payload) => {
|
|
162
|
+
def.pattern.lastIndex = 0;
|
|
163
|
+
if (def.pattern.test(payload.value))
|
|
164
|
+
return;
|
|
165
|
+
payload.issues.push({
|
|
166
|
+
origin: "string",
|
|
167
|
+
code: "invalid_format",
|
|
168
|
+
format: def.format,
|
|
169
|
+
input: payload.value,
|
|
170
|
+
...def.pattern ? { pattern: def.pattern.toString() } : {},
|
|
171
|
+
inst,
|
|
172
|
+
continue: !def.abort
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
else
|
|
176
|
+
(_b = inst._zod).check ?? (_b.check = () => {
|
|
169
177
|
});
|
|
170
|
-
});
|
|
171
178
|
});
|
|
172
179
|
const $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def) => {
|
|
173
180
|
$ZodCheckStringFormat.init(inst, def);
|
|
@@ -312,7 +319,6 @@ const version = {
|
|
|
312
319
|
const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
313
320
|
var _a;
|
|
314
321
|
inst ?? (inst = {});
|
|
315
|
-
defineLazy(inst._zod, "id", () => def.type + "_" + randomString(10));
|
|
316
322
|
inst._zod.def = def;
|
|
317
323
|
inst._zod.bag = inst._zod.bag || {};
|
|
318
324
|
inst._zod.version = version;
|
|
@@ -335,8 +341,8 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
335
341
|
let isAborted = aborted(payload);
|
|
336
342
|
let asyncResult;
|
|
337
343
|
for (const ch of checks2) {
|
|
338
|
-
if (ch._zod.when) {
|
|
339
|
-
const shouldRun = ch._zod.when(payload);
|
|
344
|
+
if (ch._zod.def.when) {
|
|
345
|
+
const shouldRun = ch._zod.def.when(payload);
|
|
340
346
|
if (!shouldRun)
|
|
341
347
|
continue;
|
|
342
348
|
} else if (isAborted) {
|
|
@@ -450,7 +456,9 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
450
456
|
$ZodStringFormat.init(inst, def);
|
|
451
457
|
inst._zod.check = (payload) => {
|
|
452
458
|
try {
|
|
453
|
-
const
|
|
459
|
+
const orig = payload.value;
|
|
460
|
+
const url = new URL(orig);
|
|
461
|
+
const href = url.href;
|
|
454
462
|
if (def.hostname) {
|
|
455
463
|
def.hostname.lastIndex = 0;
|
|
456
464
|
if (!def.hostname.test(url.hostname)) {
|
|
@@ -479,6 +487,11 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
479
487
|
});
|
|
480
488
|
}
|
|
481
489
|
}
|
|
490
|
+
if (!orig.endsWith("/") && href.endsWith("/")) {
|
|
491
|
+
payload.value = href.slice(0, -1);
|
|
492
|
+
} else {
|
|
493
|
+
payload.value = href;
|
|
494
|
+
}
|
|
482
495
|
return;
|
|
483
496
|
} catch (_) {
|
|
484
497
|
payload.issues.push({
|
|
@@ -522,7 +535,6 @@ const $ZodKSUID = /* @__PURE__ */ $constructor("$ZodKSUID", (inst, def) => {
|
|
|
522
535
|
const $ZodISODateTime = /* @__PURE__ */ $constructor("$ZodISODateTime", (inst, def) => {
|
|
523
536
|
def.pattern ?? (def.pattern = datetime$1(def));
|
|
524
537
|
$ZodStringFormat.init(inst, def);
|
|
525
|
-
inst._zod.check;
|
|
526
538
|
});
|
|
527
539
|
const $ZodISODate = /* @__PURE__ */ $constructor("$ZodISODate", (inst, def) => {
|
|
528
540
|
def.pattern ?? (def.pattern = date$1);
|
|
@@ -531,7 +543,6 @@ const $ZodISODate = /* @__PURE__ */ $constructor("$ZodISODate", (inst, def) => {
|
|
|
531
543
|
const $ZodISOTime = /* @__PURE__ */ $constructor("$ZodISOTime", (inst, def) => {
|
|
532
544
|
def.pattern ?? (def.pattern = time$1(def));
|
|
533
545
|
$ZodStringFormat.init(inst, def);
|
|
534
|
-
inst._zod.check;
|
|
535
546
|
});
|
|
536
547
|
const $ZodISODuration = /* @__PURE__ */ $constructor("$ZodISODuration", (inst, def) => {
|
|
537
548
|
def.pattern ?? (def.pattern = duration$1);
|
|
@@ -660,6 +671,8 @@ function isValidJWT(token, algorithm = null) {
|
|
|
660
671
|
if (tokensParts.length !== 3)
|
|
661
672
|
return false;
|
|
662
673
|
const [header] = tokensParts;
|
|
674
|
+
if (!header)
|
|
675
|
+
return false;
|
|
663
676
|
const parsedHeader = JSON.parse(atob(header));
|
|
664
677
|
if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT")
|
|
665
678
|
return false;
|
|
@@ -798,19 +811,20 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
798
811
|
});
|
|
799
812
|
const generateFastpass = (shape) => {
|
|
800
813
|
const doc = new Doc(["shape", "payload", "ctx"]);
|
|
801
|
-
const
|
|
814
|
+
const normalized = _normalized.value;
|
|
802
815
|
const parseStr = (key) => {
|
|
803
816
|
const k = esc(key);
|
|
804
817
|
return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
|
|
805
818
|
};
|
|
806
819
|
doc.write(`const input = payload.value;`);
|
|
807
820
|
const ids = /* @__PURE__ */ Object.create(null);
|
|
808
|
-
|
|
809
|
-
|
|
821
|
+
let counter = 0;
|
|
822
|
+
for (const key of normalized.keys) {
|
|
823
|
+
ids[key] = `key_${counter++}`;
|
|
810
824
|
}
|
|
811
825
|
doc.write(`const newResult = {}`);
|
|
812
|
-
for (const key of keys) {
|
|
813
|
-
if (
|
|
826
|
+
for (const key of normalized.keys) {
|
|
827
|
+
if (normalized.optionalKeys.has(key)) {
|
|
814
828
|
const id = ids[key];
|
|
815
829
|
doc.write(`const ${id} = ${parseStr(key)};`);
|
|
816
830
|
const k = esc(key);
|
|
@@ -855,7 +869,7 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
855
869
|
const jit = !globalConfig.jitless;
|
|
856
870
|
const allowsEval$1 = allowsEval;
|
|
857
871
|
const fastEnabled = jit && allowsEval$1.value;
|
|
858
|
-
const
|
|
872
|
+
const catchall = def.catchall;
|
|
859
873
|
let value;
|
|
860
874
|
inst._zod.parse = (payload, ctx) => {
|
|
861
875
|
value ?? (value = _normalized.value);
|
|
@@ -943,6 +957,8 @@ function handleUnionResults(results, final, inst, ctx) {
|
|
|
943
957
|
}
|
|
944
958
|
const $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
|
|
945
959
|
$ZodType.init(inst, def);
|
|
960
|
+
defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0);
|
|
961
|
+
defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0);
|
|
946
962
|
defineLazy(inst._zod, "values", () => {
|
|
947
963
|
if (def.options.every((o) => o._zod.values)) {
|
|
948
964
|
return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));
|
|
@@ -983,7 +999,7 @@ const $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
|
|
|
983
999
|
const $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
|
|
984
1000
|
$ZodType.init(inst, def);
|
|
985
1001
|
inst._zod.parse = (payload, ctx) => {
|
|
986
|
-
const
|
|
1002
|
+
const input = payload.value;
|
|
987
1003
|
const left = def.left._zod.run({ value: input, issues: [] }, ctx);
|
|
988
1004
|
const right = def.right._zod.run({ value: input, issues: [] }, ctx);
|
|
989
1005
|
const async = left instanceof Promise || right instanceof Promise;
|
|
@@ -1104,6 +1120,9 @@ const $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) =>
|
|
|
1104
1120
|
return pattern ? new RegExp(`^(${cleanRegex(pattern.source)})?$`) : void 0;
|
|
1105
1121
|
});
|
|
1106
1122
|
inst._zod.parse = (payload, ctx) => {
|
|
1123
|
+
if (def.innerType._zod.optin === "optional") {
|
|
1124
|
+
return def.innerType._zod.run(payload, ctx);
|
|
1125
|
+
}
|
|
1107
1126
|
if (payload.value === void 0) {
|
|
1108
1127
|
return payload;
|
|
1109
1128
|
}
|
|
@@ -1187,7 +1206,7 @@ function handleNonOptionalResult(payload, inst) {
|
|
|
1187
1206
|
}
|
|
1188
1207
|
const $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
1189
1208
|
$ZodType.init(inst, def);
|
|
1190
|
-
|
|
1209
|
+
inst._zod.optin = "optional";
|
|
1191
1210
|
defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
1192
1211
|
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
1193
1212
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -1244,6 +1263,7 @@ function handlePipeResult(left, def, ctx) {
|
|
|
1244
1263
|
const $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
|
|
1245
1264
|
$ZodType.init(inst, def);
|
|
1246
1265
|
defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
|
|
1266
|
+
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
1247
1267
|
defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
|
|
1248
1268
|
defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
1249
1269
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -1293,7 +1313,7 @@ function handleRefineResult(result, payload, input, inst) {
|
|
|
1293
1313
|
}
|
|
1294
1314
|
class $ZodRegistry {
|
|
1295
1315
|
constructor() {
|
|
1296
|
-
this._map = /* @__PURE__ */ new
|
|
1316
|
+
this._map = /* @__PURE__ */ new Map();
|
|
1297
1317
|
this._idmap = /* @__PURE__ */ new Map();
|
|
1298
1318
|
}
|
|
1299
1319
|
add(schema, ..._meta) {
|
|
@@ -1307,7 +1327,16 @@ class $ZodRegistry {
|
|
|
1307
1327
|
}
|
|
1308
1328
|
return this;
|
|
1309
1329
|
}
|
|
1330
|
+
clear() {
|
|
1331
|
+
this._map = /* @__PURE__ */ new Map();
|
|
1332
|
+
this._idmap = /* @__PURE__ */ new Map();
|
|
1333
|
+
return this;
|
|
1334
|
+
}
|
|
1310
1335
|
remove(schema) {
|
|
1336
|
+
const meta = this._map.get(schema);
|
|
1337
|
+
if (meta && typeof meta === "object" && "id" in meta) {
|
|
1338
|
+
this._idmap.delete(meta.id);
|
|
1339
|
+
}
|
|
1311
1340
|
this._map.delete(schema);
|
|
1312
1341
|
return this;
|
|
1313
1342
|
}
|
|
@@ -1768,10 +1797,10 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
1768
1797
|
};
|
|
1769
1798
|
inst.clone = (def2, params) => clone(inst, def2, params);
|
|
1770
1799
|
inst.brand = () => inst;
|
|
1771
|
-
inst.register = (reg, meta) => {
|
|
1800
|
+
inst.register = ((reg, meta) => {
|
|
1772
1801
|
reg.add(inst, meta);
|
|
1773
1802
|
return inst;
|
|
1774
|
-
};
|
|
1803
|
+
});
|
|
1775
1804
|
inst.parse = (data, params) => parse(inst, data, params, { callee: inst.parse });
|
|
1776
1805
|
inst.safeParse = (data, params) => safeParse(inst, data, params);
|
|
1777
1806
|
inst.parseAsync = async (data, params) => parseAsync(inst, data, params, { callee: inst.parseAsync });
|
|
@@ -2216,10 +2245,10 @@ const ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
|
|
|
2216
2245
|
$ZodCustom.init(inst, def);
|
|
2217
2246
|
ZodType.init(inst, def);
|
|
2218
2247
|
});
|
|
2219
|
-
function check(fn
|
|
2248
|
+
function check(fn) {
|
|
2220
2249
|
const ch = new $ZodCheck({
|
|
2221
|
-
check: "custom"
|
|
2222
|
-
...normalizeParams(params)
|
|
2250
|
+
check: "custom"
|
|
2251
|
+
// ...util.normalizeParams(params),
|
|
2223
2252
|
});
|
|
2224
2253
|
ch._zod.check = fn;
|
|
2225
2254
|
return ch;
|
|
@@ -2227,7 +2256,7 @@ function check(fn, params) {
|
|
|
2227
2256
|
function refine(fn, _params = {}) {
|
|
2228
2257
|
return _refine(ZodCustom, fn, _params);
|
|
2229
2258
|
}
|
|
2230
|
-
function superRefine(fn
|
|
2259
|
+
function superRefine(fn) {
|
|
2231
2260
|
const ch = check((payload) => {
|
|
2232
2261
|
payload.addIssue = (issue$1) => {
|
|
2233
2262
|
if (typeof issue$1 === "string") {
|
|
@@ -2244,7 +2273,7 @@ function superRefine(fn, params) {
|
|
|
2244
2273
|
}
|
|
2245
2274
|
};
|
|
2246
2275
|
return fn(payload.value, payload);
|
|
2247
|
-
}
|
|
2276
|
+
});
|
|
2248
2277
|
return ch;
|
|
2249
2278
|
}
|
|
2250
2279
|
export {
|
|
@@ -2252,4 +2281,4 @@ export {
|
|
|
2252
2281
|
object as o,
|
|
2253
2282
|
string as s
|
|
2254
2283
|
};
|
|
2255
|
-
//# sourceMappingURL=schemas-
|
|
2284
|
+
//# sourceMappingURL=schemas-DEXdAbCK.js.map
|