@lssm/lib.ui-kit 0.0.0-canary-20251120192244 → 0.0.0-canary-20251206181705
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -0
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1 -2
- package/dist/node_modules/@hookform/resolvers/dist/resolvers.js +1 -2
- package/dist/node_modules/@hookform/resolvers/zod/dist/zod.js +1 -2
- package/dist/node_modules/react-hook-form/dist/index.esm.js +33 -21
- package/dist/node_modules/zod/v4/classic/errors.js +1 -2
- package/dist/node_modules/zod/v4/classic/iso.js +1 -2
- package/dist/node_modules/zod/v4/classic/parse.js +1 -2
- package/dist/node_modules/zod/v4/classic/schemas.js +7 -5
- package/dist/node_modules/zod/v4/core/api.js +30 -3
- package/dist/node_modules/zod/v4/core/checks.js +1 -2
- package/dist/node_modules/zod/v4/core/core.js +14 -10
- package/dist/node_modules/zod/v4/core/errors.js +1 -2
- package/dist/node_modules/zod/v4/core/parse.js +1 -2
- package/dist/node_modules/zod/v4/core/regexes.js +1 -3
- package/dist/node_modules/zod/v4/core/registries.js +4 -5
- package/dist/node_modules/zod/v4/core/schemas.js +9 -20
- package/dist/node_modules/zod/v4/core/util.js +5 -2
- package/dist/node_modules/zod/v4/core/versions.js +2 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/accordion.d.ts +1 -2
- package/dist/ui/accordion.js +5 -6
- package/dist/ui/alert-dialog.d.ts +1 -2
- package/dist/ui/alert-dialog.js +10 -11
- package/dist/ui/alert.d.ts +1 -2
- package/dist/ui/alert.js +4 -5
- package/dist/ui/aspect-ratio.d.ts +1 -2
- package/dist/ui/aspect-ratio.js +1 -2
- package/dist/ui/atoms/FilterSelect/FilterSelect.d.ts +1 -2
- package/dist/ui/atoms/FilterSelect/FilterSelect.js +1 -2
- package/dist/ui/atoms/FilterSelect/types.d.ts +1 -2
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.d.ts +1 -2
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.js +1 -2
- package/dist/ui/atoms/Pagination/Pagination.d.ts +1 -2
- package/dist/ui/atoms/Pagination/Pagination.js +1 -2
- package/dist/ui/atoms/Pagination/types.d.ts +1 -2
- package/dist/ui/atoms/SearchInput/SearchInput.d.ts +1 -2
- package/dist/ui/atoms/SearchInput/SearchInput.js +1 -2
- package/dist/ui/atoms/SearchInput/types.d.ts +1 -2
- package/dist/ui/avatar.d.ts +5 -6
- package/dist/ui/avatar.js +4 -5
- package/dist/ui/badge.d.ts +5 -6
- package/dist/ui/badge.js +2 -3
- package/dist/ui/breadcrumb.d.ts +9 -10
- package/dist/ui/breadcrumb.js +7 -8
- package/dist/ui/button.d.ts +6 -7
- package/dist/ui/button.js +2 -3
- package/dist/ui/card.d.ts +8 -9
- package/dist/ui/card.js +7 -8
- package/dist/ui/carousel.d.ts +1 -2
- package/dist/ui/carousel.js +1 -2
- package/dist/ui/checkbox.d.ts +4 -5
- package/dist/ui/checkbox.js +2 -3
- package/dist/ui/collapsible.d.ts +9 -10
- package/dist/ui/collapsible.js +1 -2
- package/dist/ui/command.d.ts +1 -2
- package/dist/ui/command.js +1 -2
- package/dist/ui/context-menu.d.ts +17 -18
- package/dist/ui/context-menu.js +10 -11
- package/dist/ui/date-picker.d.ts +3 -4
- package/dist/ui/date-picker.js +1 -2
- package/dist/ui/date-range-picker.d.ts +3 -4
- package/dist/ui/date-range-picker.js +1 -2
- package/dist/ui/datetime-picker.d.ts +3 -4
- package/dist/ui/datetime-picker.js +1 -2
- package/dist/ui/dialog.d.ts +11 -12
- package/dist/ui/dialog.js +8 -9
- package/dist/ui/dropdown-menu.d.ts +17 -18
- package/dist/ui/dropdown-menu.js +10 -11
- package/dist/ui/empty-state.d.ts +5 -6
- package/dist/ui/empty-state.js +1 -2
- package/dist/ui/empty.d.ts +10 -11
- package/dist/ui/empty.js +7 -8
- package/dist/ui/fab.d.ts +4 -5
- package/dist/ui/fab.js +1 -2
- package/dist/ui/field.d.ts +15 -16
- package/dist/ui/field.js +11 -13
- package/dist/ui/form.d.ts +8 -9
- package/dist/ui/form.js +6 -8
- package/dist/ui/hover-card.d.ts +7 -8
- package/dist/ui/hover-card.js +2 -3
- package/dist/ui/icons/Check.js +1 -2
- package/dist/ui/icons/ChevronDown.js +1 -2
- package/dist/ui/icons/ChevronRight.js +1 -2
- package/dist/ui/icons/ChevronUp.js +1 -2
- package/dist/ui/icons/CircleUser.js +1 -2
- package/dist/ui/icons/Info.js +1 -2
- package/dist/ui/icons/Key.js +1 -2
- package/dist/ui/icons/MoonStar.js +1 -2
- package/dist/ui/icons/Sun.js +1 -2
- package/dist/ui/icons/X.js +1 -2
- package/dist/ui/icons/iconWithClassName.d.ts +1 -2
- package/dist/ui/icons/iconWithClassName.js +1 -2
- package/dist/ui/input.d.ts +3 -4
- package/dist/ui/input.js +2 -3
- package/dist/ui/label.d.ts +3 -4
- package/dist/ui/label.js +2 -3
- package/dist/ui/link.d.ts +3 -4
- package/dist/ui/link.js +2 -3
- package/dist/ui/loading-button.d.ts +3 -4
- package/dist/ui/loading-button.js +2 -3
- package/dist/ui/loading-overlay.d.ts +3 -4
- package/dist/ui/loading-overlay.js +1 -2
- package/dist/ui/loading-screen.d.ts +3 -4
- package/dist/ui/loading-screen.js +1 -2
- package/dist/ui/marketing/FeatureGrid.d.ts +3 -4
- package/dist/ui/marketing/FeatureGrid.js +1 -2
- package/dist/ui/marketing/Hero.d.ts +3 -4
- package/dist/ui/marketing/Hero.js +1 -2
- package/dist/ui/marketing/PricingTable.d.ts +3 -4
- package/dist/ui/marketing/PricingTable.js +1 -2
- package/dist/ui/menubar.d.ts +18 -19
- package/dist/ui/menubar.js +12 -13
- package/dist/ui/molecules/Autocomplete/index.d.ts +1 -2
- package/dist/ui/molecules/Autocomplete/index.js +1 -2
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.d.ts +1 -2
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.js +1 -2
- package/dist/ui/molecules/SearchAndFilter/types.d.ts +1 -2
- package/dist/ui/molecules/SkeletonList.d.ts +3 -4
- package/dist/ui/molecules/SkeletonList.js +1 -2
- package/dist/ui/navigation-menu.d.ts +13 -14
- package/dist/ui/navigation-menu.js +7 -8
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.d.ts +3 -4
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.js +1 -3
- package/dist/ui/organisms/ListPage/ListPage.d.ts +3 -4
- package/dist/ui/organisms/ListPage/ListPage.js +1 -2
- package/dist/ui/organisms/ListPage/types.d.ts +1 -2
- package/dist/ui/page-header.d.ts +6 -7
- package/dist/ui/page-header.js +1 -2
- package/dist/ui/password-strength.d.ts +3 -4
- package/dist/ui/password-strength.js +1 -2
- package/dist/ui/popover.d.ts +7 -8
- package/dist/ui/popover.js +2 -3
- package/dist/ui/progress.d.ts +3 -4
- package/dist/ui/progress.js +2 -3
- package/dist/ui/radio-group.d.ts +4 -5
- package/dist/ui/radio-group.js +3 -4
- package/dist/ui/select.d.ts +14 -15
- package/dist/ui/select.js +8 -9
- package/dist/ui/separator.d.ts +3 -4
- package/dist/ui/separator.js +2 -3
- package/dist/ui/sheet.d.ts +1 -2
- package/dist/ui/sheet.js +1 -2
- package/dist/ui/sidebar.d.ts +1 -2
- package/dist/ui/sidebar.js +1 -2
- package/dist/ui/skeleton.d.ts +3 -4
- package/dist/ui/skeleton.js +2 -3
- package/dist/ui/stack.d.ts +18 -19
- package/dist/ui/stack.js +4 -5
- package/dist/ui/stepper.d.ts +5 -6
- package/dist/ui/stepper.js +1 -2
- package/dist/ui/switch.d.ts +3 -4
- package/dist/ui/switch.js +3 -4
- package/dist/ui/table.d.ts +9 -10
- package/dist/ui/table.js +8 -9
- package/dist/ui/tabs.d.ts +12 -13
- package/dist/ui/tabs.js +4 -5
- package/dist/ui/text.d.ts +3 -4
- package/dist/ui/text.js +2 -3
- package/dist/ui/textarea.d.ts +1 -2
- package/dist/ui/textarea.js +2 -3
- package/dist/ui/time-picker.d.ts +3 -4
- package/dist/ui/time-picker.js +1 -2
- package/dist/ui/toggle-group.d.ts +5 -6
- package/dist/ui/toggle-group.js +4 -5
- package/dist/ui/toggle.d.ts +7 -8
- package/dist/ui/toggle.js +3 -4
- package/dist/ui/tooltip.d.ts +7 -8
- package/dist/ui/tooltip.js +2 -3
- package/dist/ui/typography.d.ts +13 -14
- package/dist/ui/typography.js +12 -13
- package/dist/ui/useColorScheme.d.ts +3 -4
- package/dist/ui/useColorScheme.js +1 -2
- package/dist/ui/useListState.d.ts +1 -2
- package/dist/ui/useListState.js +1 -2
- package/dist/ui/usecases/UseCaseCard.d.ts +3 -4
- package/dist/ui/usecases/UseCaseCard.js +1 -2
- package/dist/ui/usecases/UserStoryCard.d.ts +3 -4
- package/dist/ui/usecases/UserStoryCard.js +1 -2
- package/dist/ui/utils.d.ts +1 -2
- package/dist/ui/utils.js +1 -2
- package/package.json +8 -6
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/node_modules/@hookform/resolvers/dist/resolvers.js.map +0 -1
- package/dist/node_modules/@hookform/resolvers/zod/dist/zod.js.map +0 -1
- package/dist/node_modules/react-hook-form/dist/index.esm.js.map +0 -1
- package/dist/node_modules/zod/v4/classic/errors.js.map +0 -1
- package/dist/node_modules/zod/v4/classic/iso.js.map +0 -1
- package/dist/node_modules/zod/v4/classic/parse.js.map +0 -1
- package/dist/node_modules/zod/v4/classic/schemas.js.map +0 -1
- package/dist/node_modules/zod/v4/core/api.js.map +0 -1
- package/dist/node_modules/zod/v4/core/checks.js.map +0 -1
- package/dist/node_modules/zod/v4/core/core.js.map +0 -1
- package/dist/node_modules/zod/v4/core/errors.js.map +0 -1
- package/dist/node_modules/zod/v4/core/parse.js.map +0 -1
- package/dist/node_modules/zod/v4/core/regexes.js.map +0 -1
- package/dist/node_modules/zod/v4/core/registries.js.map +0 -1
- package/dist/node_modules/zod/v4/core/schemas.js.map +0 -1
- package/dist/node_modules/zod/v4/core/util.js.map +0 -1
- package/dist/node_modules/zod/v4/core/versions.js.map +0 -1
- package/dist/ui/accordion.d.ts.map +0 -1
- package/dist/ui/accordion.js.map +0 -1
- package/dist/ui/alert-dialog.d.ts.map +0 -1
- package/dist/ui/alert-dialog.js.map +0 -1
- package/dist/ui/alert.d.ts.map +0 -1
- package/dist/ui/alert.js.map +0 -1
- package/dist/ui/aspect-ratio.d.ts.map +0 -1
- package/dist/ui/aspect-ratio.js.map +0 -1
- package/dist/ui/atoms/FilterSelect/FilterSelect.d.ts.map +0 -1
- package/dist/ui/atoms/FilterSelect/FilterSelect.js.map +0 -1
- package/dist/ui/atoms/FilterSelect/types.d.ts.map +0 -1
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.d.ts.map +0 -1
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.js.map +0 -1
- package/dist/ui/atoms/Pagination/Pagination.d.ts.map +0 -1
- package/dist/ui/atoms/Pagination/Pagination.js.map +0 -1
- package/dist/ui/atoms/Pagination/types.d.ts.map +0 -1
- package/dist/ui/atoms/SearchInput/SearchInput.d.ts.map +0 -1
- package/dist/ui/atoms/SearchInput/SearchInput.js.map +0 -1
- package/dist/ui/atoms/SearchInput/types.d.ts.map +0 -1
- package/dist/ui/avatar.d.ts.map +0 -1
- package/dist/ui/avatar.js.map +0 -1
- package/dist/ui/badge.d.ts.map +0 -1
- package/dist/ui/badge.js.map +0 -1
- package/dist/ui/breadcrumb.d.ts.map +0 -1
- package/dist/ui/breadcrumb.js.map +0 -1
- package/dist/ui/button.d.ts.map +0 -1
- package/dist/ui/button.js.map +0 -1
- package/dist/ui/card.d.ts.map +0 -1
- package/dist/ui/card.js.map +0 -1
- package/dist/ui/carousel.d.ts.map +0 -1
- package/dist/ui/carousel.js.map +0 -1
- package/dist/ui/checkbox.d.ts.map +0 -1
- package/dist/ui/checkbox.js.map +0 -1
- package/dist/ui/collapsible.d.ts.map +0 -1
- package/dist/ui/collapsible.js.map +0 -1
- package/dist/ui/command.d.ts.map +0 -1
- package/dist/ui/command.js.map +0 -1
- package/dist/ui/context-menu.d.ts.map +0 -1
- package/dist/ui/context-menu.js.map +0 -1
- package/dist/ui/date-picker.d.ts.map +0 -1
- package/dist/ui/date-picker.js.map +0 -1
- package/dist/ui/date-range-picker.d.ts.map +0 -1
- package/dist/ui/date-range-picker.js.map +0 -1
- package/dist/ui/datetime-picker.d.ts.map +0 -1
- package/dist/ui/datetime-picker.js.map +0 -1
- package/dist/ui/dialog.d.ts.map +0 -1
- package/dist/ui/dialog.js.map +0 -1
- package/dist/ui/dropdown-menu.d.ts.map +0 -1
- package/dist/ui/dropdown-menu.js.map +0 -1
- package/dist/ui/empty-state.d.ts.map +0 -1
- package/dist/ui/empty-state.js.map +0 -1
- package/dist/ui/empty.d.ts.map +0 -1
- package/dist/ui/empty.js.map +0 -1
- package/dist/ui/fab.d.ts.map +0 -1
- package/dist/ui/fab.js.map +0 -1
- package/dist/ui/field.d.ts.map +0 -1
- package/dist/ui/field.js.map +0 -1
- package/dist/ui/form.d.ts.map +0 -1
- package/dist/ui/form.js.map +0 -1
- package/dist/ui/hover-card.d.ts.map +0 -1
- package/dist/ui/hover-card.js.map +0 -1
- package/dist/ui/icons/Check.js.map +0 -1
- package/dist/ui/icons/ChevronDown.js.map +0 -1
- package/dist/ui/icons/ChevronRight.js.map +0 -1
- package/dist/ui/icons/ChevronUp.js.map +0 -1
- package/dist/ui/icons/CircleUser.js.map +0 -1
- package/dist/ui/icons/Info.js.map +0 -1
- package/dist/ui/icons/Key.js.map +0 -1
- package/dist/ui/icons/MoonStar.js.map +0 -1
- package/dist/ui/icons/Sun.js.map +0 -1
- package/dist/ui/icons/X.js.map +0 -1
- package/dist/ui/icons/iconWithClassName.d.ts.map +0 -1
- package/dist/ui/icons/iconWithClassName.js.map +0 -1
- package/dist/ui/input.d.ts.map +0 -1
- package/dist/ui/input.js.map +0 -1
- package/dist/ui/label.d.ts.map +0 -1
- package/dist/ui/label.js.map +0 -1
- package/dist/ui/link.d.ts.map +0 -1
- package/dist/ui/link.js.map +0 -1
- package/dist/ui/loading-button.d.ts.map +0 -1
- package/dist/ui/loading-button.js.map +0 -1
- package/dist/ui/loading-overlay.d.ts.map +0 -1
- package/dist/ui/loading-overlay.js.map +0 -1
- package/dist/ui/loading-screen.d.ts.map +0 -1
- package/dist/ui/loading-screen.js.map +0 -1
- package/dist/ui/marketing/FeatureGrid.d.ts.map +0 -1
- package/dist/ui/marketing/FeatureGrid.js.map +0 -1
- package/dist/ui/marketing/Hero.d.ts.map +0 -1
- package/dist/ui/marketing/Hero.js.map +0 -1
- package/dist/ui/marketing/PricingTable.d.ts.map +0 -1
- package/dist/ui/marketing/PricingTable.js.map +0 -1
- package/dist/ui/menubar.d.ts.map +0 -1
- package/dist/ui/menubar.js.map +0 -1
- package/dist/ui/molecules/Autocomplete/index.d.ts.map +0 -1
- package/dist/ui/molecules/Autocomplete/index.js.map +0 -1
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.d.ts.map +0 -1
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.js.map +0 -1
- package/dist/ui/molecules/SearchAndFilter/types.d.ts.map +0 -1
- package/dist/ui/molecules/SkeletonList.d.ts.map +0 -1
- package/dist/ui/molecules/SkeletonList.js.map +0 -1
- package/dist/ui/navigation-menu.d.ts.map +0 -1
- package/dist/ui/navigation-menu.js.map +0 -1
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.d.ts.map +0 -1
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.js.map +0 -1
- package/dist/ui/organisms/ListPage/ListPage.d.ts.map +0 -1
- package/dist/ui/organisms/ListPage/ListPage.js.map +0 -1
- package/dist/ui/organisms/ListPage/types.d.ts.map +0 -1
- package/dist/ui/page-header.d.ts.map +0 -1
- package/dist/ui/page-header.js.map +0 -1
- package/dist/ui/password-strength.d.ts.map +0 -1
- package/dist/ui/password-strength.js.map +0 -1
- package/dist/ui/popover.d.ts.map +0 -1
- package/dist/ui/popover.js.map +0 -1
- package/dist/ui/progress.d.ts.map +0 -1
- package/dist/ui/progress.js.map +0 -1
- package/dist/ui/radio-group.d.ts.map +0 -1
- package/dist/ui/radio-group.js.map +0 -1
- package/dist/ui/select.d.ts.map +0 -1
- package/dist/ui/select.js.map +0 -1
- package/dist/ui/separator.d.ts.map +0 -1
- package/dist/ui/separator.js.map +0 -1
- package/dist/ui/sheet.d.ts.map +0 -1
- package/dist/ui/sheet.js.map +0 -1
- package/dist/ui/sidebar.d.ts.map +0 -1
- package/dist/ui/sidebar.js.map +0 -1
- package/dist/ui/skeleton.d.ts.map +0 -1
- package/dist/ui/skeleton.js.map +0 -1
- package/dist/ui/stack.d.ts.map +0 -1
- package/dist/ui/stack.js.map +0 -1
- package/dist/ui/stepper.d.ts.map +0 -1
- package/dist/ui/stepper.js.map +0 -1
- package/dist/ui/switch.d.ts.map +0 -1
- package/dist/ui/switch.js.map +0 -1
- package/dist/ui/table.d.ts.map +0 -1
- package/dist/ui/table.js.map +0 -1
- package/dist/ui/tabs.d.ts.map +0 -1
- package/dist/ui/tabs.js.map +0 -1
- package/dist/ui/text.d.ts.map +0 -1
- package/dist/ui/text.js.map +0 -1
- package/dist/ui/textarea.d.ts.map +0 -1
- package/dist/ui/textarea.js.map +0 -1
- package/dist/ui/time-picker.d.ts.map +0 -1
- package/dist/ui/time-picker.js.map +0 -1
- package/dist/ui/toggle-group.d.ts.map +0 -1
- package/dist/ui/toggle-group.js.map +0 -1
- package/dist/ui/toggle.d.ts.map +0 -1
- package/dist/ui/toggle.js.map +0 -1
- package/dist/ui/tooltip.d.ts.map +0 -1
- package/dist/ui/tooltip.js.map +0 -1
- package/dist/ui/typography.d.ts.map +0 -1
- package/dist/ui/typography.js.map +0 -1
- package/dist/ui/useColorScheme.d.ts.map +0 -1
- package/dist/ui/useColorScheme.js.map +0 -1
- package/dist/ui/useListState.d.ts.map +0 -1
- package/dist/ui/useListState.js.map +0 -1
- package/dist/ui/usecases/UseCaseCard.d.ts.map +0 -1
- package/dist/ui/usecases/UseCaseCard.js.map +0 -1
- package/dist/ui/usecases/UserStoryCard.d.ts.map +0 -1
- package/dist/ui/usecases/UserStoryCard.js.map +0 -1
- package/dist/ui/utils.d.ts.map +0 -1
- package/dist/ui/utils.js.map +0 -1
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -138,7 +138,7 @@ const useFormContext = () => React.useContext(HookFormContext);
|
|
|
138
138
|
* ```
|
|
139
139
|
*/
|
|
140
140
|
const FormProvider = (props) => {
|
|
141
|
-
const { children
|
|
141
|
+
const { children, ...data } = props;
|
|
142
142
|
return React.createElement(HookFormContext.Provider, { value: data }, children);
|
|
143
143
|
};
|
|
144
144
|
var getProxyFormState = (formState, control, localProxyFormState, isRoot = true) => {
|
|
@@ -228,7 +228,7 @@ var generateWatchOutput = (names, _names, formValues, isGlobal, defaultValue) =>
|
|
|
228
228
|
};
|
|
229
229
|
var isPrimitive = (value) => isNullOrUndefined(value) || !isObjectType(value);
|
|
230
230
|
function deepEqual(object1, object2, _internal_visited = /* @__PURE__ */ new WeakSet()) {
|
|
231
|
-
if (isPrimitive(object1) || isPrimitive(object2)) return object1
|
|
231
|
+
if (isPrimitive(object1) || isPrimitive(object2)) return Object.is(object1, object2);
|
|
232
232
|
if (isDateObject(object1) && isDateObject(object2)) return object1.getTime() === object2.getTime();
|
|
233
233
|
const keys1 = Object.keys(object1);
|
|
234
234
|
const keys2 = Object.keys(object2);
|
|
@@ -241,7 +241,7 @@ function deepEqual(object1, object2, _internal_visited = /* @__PURE__ */ new Wea
|
|
|
241
241
|
if (!keys2.includes(key)) return false;
|
|
242
242
|
if (key !== "ref") {
|
|
243
243
|
const val2 = object2[key];
|
|
244
|
-
if (isDateObject(val1) && isDateObject(val2) || isObject(val1) && isObject(val2) || Array.isArray(val1) && Array.isArray(val2) ? !deepEqual(val1, val2, _internal_visited) : val1
|
|
244
|
+
if (isDateObject(val1) && isDateObject(val2) || isObject(val1) && isObject(val2) || Array.isArray(val1) && Array.isArray(val2) ? !deepEqual(val1, val2, _internal_visited) : !Object.is(val1, val2)) return false;
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
247
|
return true;
|
|
@@ -362,7 +362,7 @@ function useWatch(props) {
|
|
|
362
362
|
*/
|
|
363
363
|
function useController(props) {
|
|
364
364
|
const methods = useFormContext();
|
|
365
|
-
const { name, disabled, control = methods.control, shouldUnregister, defaultValue } = props;
|
|
365
|
+
const { name, disabled, control = methods.control, shouldUnregister, defaultValue, exact = true } = props;
|
|
366
366
|
const isArrayField = isNameInFieldArray(control._names.array, name);
|
|
367
367
|
const value = useWatch({
|
|
368
368
|
control,
|
|
@@ -372,12 +372,12 @@ function useController(props) {
|
|
|
372
372
|
name,
|
|
373
373
|
defaultValue
|
|
374
374
|
]),
|
|
375
|
-
exact
|
|
375
|
+
exact
|
|
376
376
|
});
|
|
377
377
|
const formState = useFormState({
|
|
378
378
|
control,
|
|
379
379
|
name,
|
|
380
|
-
exact
|
|
380
|
+
exact
|
|
381
381
|
});
|
|
382
382
|
const _props = React.useRef(props);
|
|
383
383
|
const _previousNameRef = React.useRef(void 0);
|
|
@@ -622,17 +622,26 @@ function isTraversable(value) {
|
|
|
622
622
|
return Array.isArray(value) || isObject(value) && !objectHasFunction(value);
|
|
623
623
|
}
|
|
624
624
|
function markFieldsDirty(data, fields = {}) {
|
|
625
|
-
for (const key in data)
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
625
|
+
for (const key in data) {
|
|
626
|
+
const value = data[key];
|
|
627
|
+
if (isTraversable(value)) {
|
|
628
|
+
fields[key] = Array.isArray(value) ? [] : {};
|
|
629
|
+
markFieldsDirty(value, fields[key]);
|
|
630
|
+
} else if (!isUndefined(value)) fields[key] = true;
|
|
631
|
+
}
|
|
629
632
|
return fields;
|
|
630
633
|
}
|
|
631
634
|
function getDirtyFields(data, formValues, dirtyFieldsFromValues) {
|
|
632
635
|
if (!dirtyFieldsFromValues) dirtyFieldsFromValues = markFieldsDirty(formValues);
|
|
633
|
-
for (const key in data)
|
|
634
|
-
|
|
635
|
-
|
|
636
|
+
for (const key in data) {
|
|
637
|
+
const value = data[key];
|
|
638
|
+
if (isTraversable(value)) if (isUndefined(formValues) || isPrimitive(dirtyFieldsFromValues[key])) dirtyFieldsFromValues[key] = markFieldsDirty(value, Array.isArray(value) ? [] : {});
|
|
639
|
+
else getDirtyFields(value, isNullOrUndefined(formValues) ? {} : formValues[key], dirtyFieldsFromValues[key]);
|
|
640
|
+
else {
|
|
641
|
+
const formValue = formValues[key];
|
|
642
|
+
dirtyFieldsFromValues[key] = !deepEqual(value, formValue);
|
|
643
|
+
}
|
|
644
|
+
}
|
|
636
645
|
return dirtyFieldsFromValues;
|
|
637
646
|
}
|
|
638
647
|
const defaultResult = {
|
|
@@ -706,7 +715,7 @@ const iterateFieldsByAction = (fields, action, fieldsNames, abortEarly) => {
|
|
|
706
715
|
for (const key of fieldsNames || Object.keys(fields)) {
|
|
707
716
|
const field = get(fields, key);
|
|
708
717
|
if (field) {
|
|
709
|
-
const { _f
|
|
718
|
+
const { _f, ...currentField } = field;
|
|
710
719
|
if (_f) {
|
|
711
720
|
if (_f.refs && _f.refs[0] && action(_f.refs[0], key) && !abortEarly) return true;
|
|
712
721
|
else if (_f.ref && action(_f.ref, _f.name) && !abortEarly) return true;
|
|
@@ -743,7 +752,7 @@ function schemaErrorLookup(errors, _fields, name) {
|
|
|
743
752
|
}
|
|
744
753
|
var shouldRenderFormState = (formStateData, _proxyFormState, updateFormState, isRoot) => {
|
|
745
754
|
updateFormState(formStateData);
|
|
746
|
-
const { name
|
|
755
|
+
const { name, ...formState } = formStateData;
|
|
747
756
|
return isEmptyObject(formState) || Object.keys(formState).length >= Object.keys(_proxyFormState).length || Object.keys(formState).find((key) => _proxyFormState[key] === (!isRoot || VALIDATION_MODE.all));
|
|
748
757
|
};
|
|
749
758
|
var shouldSubscribeByName = (name, signalName, exact) => !name || !signalName || name === signalName || convertToArrayPayload(name).some((currentName) => currentName && (exact ? currentName === signalName : currentName.startsWith(signalName) || signalName.startsWith(currentName)));
|
|
@@ -1029,7 +1038,7 @@ function createFormControl(props = {}) {
|
|
|
1029
1038
|
if (field) {
|
|
1030
1039
|
const defaultValue = get(_formValues, name, isUndefined(value) ? get(_defaultValues, name) : value);
|
|
1031
1040
|
isUndefined(defaultValue) || ref && ref.defaultChecked || shouldSkipSetValueAs ? set(_formValues, name, shouldSkipSetValueAs ? defaultValue : getFieldValue(field._f)) : setFieldValue(name, defaultValue);
|
|
1032
|
-
_state.mount && _setValid();
|
|
1041
|
+
_state.mount && !_state.action && _setValid();
|
|
1033
1042
|
}
|
|
1034
1043
|
};
|
|
1035
1044
|
const updateTouchAndDirty = (name, fieldValue, isBlurEvent, shouldDirty, shouldRender) => {
|
|
@@ -1105,7 +1114,7 @@ function createFormControl(props = {}) {
|
|
|
1105
1114
|
for (const name in fields) {
|
|
1106
1115
|
const field = fields[name];
|
|
1107
1116
|
if (field) {
|
|
1108
|
-
const { _f
|
|
1117
|
+
const { _f, ...fieldValue } = field;
|
|
1109
1118
|
if (_f) {
|
|
1110
1119
|
const isFieldArrayRoot = _names.array.has(_f.name);
|
|
1111
1120
|
const isPromiseFunction = field._f && hasPromiseValidation(field._f);
|
|
@@ -1311,7 +1320,7 @@ function createFormControl(props = {}) {
|
|
|
1311
1320
|
};
|
|
1312
1321
|
const setError = (name, error, options) => {
|
|
1313
1322
|
const ref = (get(_fields, name, { _f: {} })._f || {}).ref;
|
|
1314
|
-
const { ref: currentRef, message, type
|
|
1323
|
+
const { ref: currentRef, message, type, ...restOfErrorTree } = get(_formState.errors, name) || {};
|
|
1315
1324
|
set(_formState.errors, name, {
|
|
1316
1325
|
...restOfErrorTree,
|
|
1317
1326
|
...error,
|
|
@@ -1542,6 +1551,8 @@ function createFormControl(props = {}) {
|
|
|
1542
1551
|
};
|
|
1543
1552
|
_state.mount = !_proxyFormState.isValid || !!keepStateOptions.keepIsValid || !!keepStateOptions.keepDirtyValues || !_options.shouldUnregister && !isEmptyObject(values);
|
|
1544
1553
|
_state.watch = !!_options.shouldUnregister;
|
|
1554
|
+
_state.action = false;
|
|
1555
|
+
if (!keepStateOptions.keepErrors) _formState.errors = {};
|
|
1545
1556
|
_subjects.state.next({
|
|
1546
1557
|
submitCount: keepStateOptions.keepSubmitCount ? _formState.submitCount : 0,
|
|
1547
1558
|
isDirty: isEmptyResetValues ? false : keepStateOptions.keepDirty ? _formState.isDirty : !!(keepStateOptions.keepDefaultValues && !deepEqual(formValues, _defaultValues)),
|
|
@@ -1987,7 +1998,7 @@ function useForm(props = {}) {
|
|
|
1987
1998
|
};
|
|
1988
1999
|
if (props.defaultValues && !isFunction(props.defaultValues)) props.formControl.reset(props.defaultValues, props.resetOptions);
|
|
1989
2000
|
} else {
|
|
1990
|
-
const { formControl
|
|
2001
|
+
const { formControl, ...rest } = createFormControl(props);
|
|
1991
2002
|
_formControl.current = {
|
|
1992
2003
|
...rest,
|
|
1993
2004
|
formState
|
|
@@ -2033,11 +2044,13 @@ function useForm(props = {}) {
|
|
|
2033
2044
|
}
|
|
2034
2045
|
}, [control, formState.isDirty]);
|
|
2035
2046
|
React.useEffect(() => {
|
|
2047
|
+
var _a;
|
|
2036
2048
|
if (props.values && !deepEqual(props.values, _values.current)) {
|
|
2037
2049
|
control._reset(props.values, {
|
|
2038
2050
|
keepFieldsRef: true,
|
|
2039
2051
|
...control._options.resetOptions
|
|
2040
2052
|
});
|
|
2053
|
+
if (!((_a = control._options.resetOptions) === null || _a === void 0 ? void 0 : _a.keepIsValid)) control._setValid();
|
|
2041
2054
|
_values.current = props.values;
|
|
2042
2055
|
updateFormState((state) => ({ ...state }));
|
|
2043
2056
|
} else control._resetDefaultValues();
|
|
@@ -2058,5 +2071,4 @@ function useForm(props = {}) {
|
|
|
2058
2071
|
}
|
|
2059
2072
|
|
|
2060
2073
|
//#endregion
|
|
2061
|
-
export { Controller, FormProvider, appendErrors, get, set, useFieldArray, useForm, useFormContext, useFormState };
|
|
2062
|
-
//# sourceMappingURL=index.esm.js.map
|
|
2074
|
+
export { Controller, FormProvider, appendErrors, get, set, useFieldArray, useForm, useFormContext, useFormState };
|
|
@@ -16,5 +16,4 @@ const safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
|
16
16
|
const safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
17
17
|
|
|
18
18
|
//#endregion
|
|
19
|
-
export { decode, decodeAsync, encode, encodeAsync, parse, parseAsync, safeDecode, safeDecodeAsync, safeEncode, safeEncodeAsync, safeParse, safeParseAsync };
|
|
20
|
-
//# sourceMappingURL=parse.js.map
|
|
19
|
+
export { decode, decodeAsync, encode, encodeAsync, parse, parseAsync, safeDecode, safeDecodeAsync, safeEncode, safeEncodeAsync, safeParse, safeParseAsync };
|
|
@@ -2,7 +2,7 @@ import { $ZodEncodeError, $constructor } from "../core/core.js";
|
|
|
2
2
|
import { clone, issue, mergeDefs, normalizeParams, shallowClone } from "../core/util.js";
|
|
3
3
|
import { $ZodArray, $ZodBase64, $ZodBase64URL, $ZodCIDRv4, $ZodCIDRv6, $ZodCUID, $ZodCUID2, $ZodCatch, $ZodCustom, $ZodDefault, $ZodE164, $ZodEmail, $ZodEmoji, $ZodGUID, $ZodIPv4, $ZodIPv6, $ZodIntersection, $ZodJWT, $ZodKSUID, $ZodNanoID, $ZodNonOptional, $ZodNullable, $ZodOptional, $ZodPipe, $ZodPrefault, $ZodReadonly, $ZodString, $ZodStringFormat, $ZodTransform, $ZodType, $ZodULID, $ZodURL, $ZodUUID, $ZodUnion, $ZodXID } from "../core/schemas.js";
|
|
4
4
|
import { globalRegistry } from "../core/registries.js";
|
|
5
|
-
import { _array, _base64, _base64url, _cidrv4, _cidrv6, _cuid, _cuid2, _e164, _email, _emoji, _endsWith, _guid, _includes, _ipv4, _ipv6, _jwt, _ksuid, _length, _lowercase, _maxLength, _minLength, _nanoid, _normalize, _overwrite, _refine, _regex, _startsWith, _string, _superRefine, _toLowerCase, _toUpperCase, _trim, _ulid, _uppercase, _url, _uuid, _uuidv4, _uuidv6, _uuidv7, _xid } from "../core/api.js";
|
|
5
|
+
import { _array, _base64, _base64url, _cidrv4, _cidrv6, _cuid, _cuid2, _e164, _email, _emoji, _endsWith, _guid, _includes, _ipv4, _ipv6, _jwt, _ksuid, _length, _lowercase, _maxLength, _minLength, _nanoid, _normalize, _overwrite, _refine, _regex, _slugify, _startsWith, _string, _superRefine, _toLowerCase, _toUpperCase, _trim, _ulid, _uppercase, _url, _uuid, _uuidv4, _uuidv6, _uuidv7, _xid, describe as describe$1, meta as meta$1 } from "../core/api.js";
|
|
6
6
|
import { date, datetime, duration, time } from "./iso.js";
|
|
7
7
|
import { decode, decodeAsync, encode, encodeAsync, parse, parseAsync, safeDecode, safeDecodeAsync, safeEncode, safeEncodeAsync, safeParse, safeParseAsync } from "./parse.js";
|
|
8
8
|
|
|
@@ -21,8 +21,8 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
21
21
|
};
|
|
22
22
|
inst.clone = (def$1, params) => clone(inst, def$1, params);
|
|
23
23
|
inst.brand = () => inst;
|
|
24
|
-
inst.register = ((reg, meta) => {
|
|
25
|
-
reg.add(inst, meta);
|
|
24
|
+
inst.register = ((reg, meta$2) => {
|
|
25
|
+
reg.add(inst, meta$2);
|
|
26
26
|
return inst;
|
|
27
27
|
});
|
|
28
28
|
inst.parse = (data, params) => parse(inst, data, params, { callee: inst.parse });
|
|
@@ -97,6 +97,7 @@ const _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
|
97
97
|
inst.normalize = (...args) => inst.check(_normalize(...args));
|
|
98
98
|
inst.toLowerCase = () => inst.check(_toLowerCase());
|
|
99
99
|
inst.toUpperCase = () => inst.check(_toUpperCase());
|
|
100
|
+
inst.slugify = () => inst.check(_slugify());
|
|
100
101
|
});
|
|
101
102
|
const ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
|
|
102
103
|
$ZodString.init(inst, def);
|
|
@@ -389,7 +390,8 @@ function refine(fn, _params = {}) {
|
|
|
389
390
|
function superRefine(fn) {
|
|
390
391
|
return _superRefine(fn);
|
|
391
392
|
}
|
|
393
|
+
const describe = describe$1;
|
|
394
|
+
const meta = meta$1;
|
|
392
395
|
|
|
393
396
|
//#endregion
|
|
394
|
-
export { ZodStringFormat, string };
|
|
395
|
-
//# sourceMappingURL=schemas.js.map
|
|
397
|
+
export { ZodStringFormat, string };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { issue, normalizeParams } from "./util.js";
|
|
1
|
+
import { issue, normalizeParams, slugify } from "./util.js";
|
|
2
2
|
import { $ZodCheck, $ZodCheckEndsWith, $ZodCheckIncludes, $ZodCheckLengthEquals, $ZodCheckLowerCase, $ZodCheckMaxLength, $ZodCheckMinLength, $ZodCheckOverwrite, $ZodCheckRegex, $ZodCheckStartsWith, $ZodCheckUpperCase } from "./checks.js";
|
|
3
|
+
import { globalRegistry } from "./registries.js";
|
|
3
4
|
|
|
4
5
|
//#region ../../../node_modules/zod/v4/core/api.js
|
|
5
6
|
function _string(Class, params) {
|
|
@@ -330,6 +331,9 @@ function _toLowerCase() {
|
|
|
330
331
|
function _toUpperCase() {
|
|
331
332
|
return _overwrite((input) => input.toUpperCase());
|
|
332
333
|
}
|
|
334
|
+
function _slugify() {
|
|
335
|
+
return _overwrite((input) => slugify(input));
|
|
336
|
+
}
|
|
333
337
|
function _array(Class, element, params) {
|
|
334
338
|
return new Class({
|
|
335
339
|
type: "array",
|
|
@@ -371,7 +375,30 @@ function _check(fn, params) {
|
|
|
371
375
|
ch._zod.check = fn;
|
|
372
376
|
return ch;
|
|
373
377
|
}
|
|
378
|
+
function describe(description) {
|
|
379
|
+
const ch = new $ZodCheck({ check: "describe" });
|
|
380
|
+
ch._zod.onattach = [(inst) => {
|
|
381
|
+
const existing = globalRegistry.get(inst) ?? {};
|
|
382
|
+
globalRegistry.add(inst, {
|
|
383
|
+
...existing,
|
|
384
|
+
description
|
|
385
|
+
});
|
|
386
|
+
}];
|
|
387
|
+
ch._zod.check = () => {};
|
|
388
|
+
return ch;
|
|
389
|
+
}
|
|
390
|
+
function meta(metadata) {
|
|
391
|
+
const ch = new $ZodCheck({ check: "meta" });
|
|
392
|
+
ch._zod.onattach = [(inst) => {
|
|
393
|
+
const existing = globalRegistry.get(inst) ?? {};
|
|
394
|
+
globalRegistry.add(inst, {
|
|
395
|
+
...existing,
|
|
396
|
+
...metadata
|
|
397
|
+
});
|
|
398
|
+
}];
|
|
399
|
+
ch._zod.check = () => {};
|
|
400
|
+
return ch;
|
|
401
|
+
}
|
|
374
402
|
|
|
375
403
|
//#endregion
|
|
376
|
-
export { _array, _base64, _base64url, _cidrv4, _cidrv6, _cuid, _cuid2, _e164, _email, _emoji, _endsWith, _guid, _includes, _ipv4, _ipv6, _isoDate, _isoDateTime, _isoDuration, _isoTime, _jwt, _ksuid, _length, _lowercase, _maxLength, _minLength, _nanoid, _normalize, _overwrite, _refine, _regex, _startsWith, _string, _superRefine, _toLowerCase, _toUpperCase, _trim, _ulid, _uppercase, _url, _uuid, _uuidv4, _uuidv6, _uuidv7, _xid };
|
|
377
|
-
//# sourceMappingURL=api.js.map
|
|
404
|
+
export { _array, _base64, _base64url, _cidrv4, _cidrv6, _cuid, _cuid2, _e164, _email, _emoji, _endsWith, _guid, _includes, _ipv4, _ipv6, _isoDate, _isoDateTime, _isoDuration, _isoTime, _jwt, _ksuid, _length, _lowercase, _maxLength, _minLength, _nanoid, _normalize, _overwrite, _refine, _regex, _slugify, _startsWith, _string, _superRefine, _toLowerCase, _toUpperCase, _trim, _ulid, _uppercase, _url, _uuid, _uuidv4, _uuidv6, _uuidv7, _xid, describe, meta };
|
|
@@ -222,5 +222,4 @@ const $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (i
|
|
|
222
222
|
});
|
|
223
223
|
|
|
224
224
|
//#endregion
|
|
225
|
-
export { $ZodCheck, $ZodCheckEndsWith, $ZodCheckIncludes, $ZodCheckLengthEquals, $ZodCheckLowerCase, $ZodCheckMaxLength, $ZodCheckMinLength, $ZodCheckOverwrite, $ZodCheckRegex, $ZodCheckStartsWith, $ZodCheckStringFormat, $ZodCheckUpperCase };
|
|
226
|
-
//# sourceMappingURL=checks.js.map
|
|
225
|
+
export { $ZodCheck, $ZodCheckEndsWith, $ZodCheckIncludes, $ZodCheckLengthEquals, $ZodCheckLowerCase, $ZodCheckMaxLength, $ZodCheckMinLength, $ZodCheckOverwrite, $ZodCheckRegex, $ZodCheckStartsWith, $ZodCheckStringFormat, $ZodCheckUpperCase };
|
|
@@ -3,17 +3,23 @@
|
|
|
3
3
|
const NEVER = Object.freeze({ status: "aborted" });
|
|
4
4
|
function $constructor(name, initializer, params) {
|
|
5
5
|
function init(inst, def) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
if (!inst._zod) Object.defineProperty(inst, "_zod", {
|
|
7
|
+
value: {
|
|
8
|
+
def,
|
|
9
|
+
constr: _,
|
|
10
|
+
traits: /* @__PURE__ */ new Set()
|
|
11
|
+
},
|
|
9
12
|
enumerable: false
|
|
10
13
|
});
|
|
11
|
-
(
|
|
14
|
+
if (inst._zod.traits.has(name)) return;
|
|
12
15
|
inst._zod.traits.add(name);
|
|
13
16
|
initializer(inst, def);
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
const proto = _.prototype;
|
|
18
|
+
const keys = Object.keys(proto);
|
|
19
|
+
for (let i = 0; i < keys.length; i++) {
|
|
20
|
+
const k = keys[i];
|
|
21
|
+
if (!(k in inst)) inst[k] = proto[k].bind(inst);
|
|
22
|
+
}
|
|
17
23
|
}
|
|
18
24
|
const Parent = params?.Parent ?? Object;
|
|
19
25
|
class Definition extends Parent {}
|
|
@@ -34,7 +40,6 @@ function $constructor(name, initializer, params) {
|
|
|
34
40
|
Object.defineProperty(_, "name", { value: name });
|
|
35
41
|
return _;
|
|
36
42
|
}
|
|
37
|
-
const $brand = Symbol("zod_brand");
|
|
38
43
|
var $ZodAsyncError = class extends Error {
|
|
39
44
|
constructor() {
|
|
40
45
|
super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
|
|
@@ -53,5 +58,4 @@ function config(newConfig) {
|
|
|
53
58
|
}
|
|
54
59
|
|
|
55
60
|
//#endregion
|
|
56
|
-
export { $ZodAsyncError, $ZodEncodeError, $constructor, config };
|
|
57
|
-
//# sourceMappingURL=core.js.map
|
|
61
|
+
export { $ZodAsyncError, $ZodEncodeError, $constructor, config };
|
|
@@ -106,5 +106,4 @@ const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
106
106
|
const safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
|
|
107
107
|
|
|
108
108
|
//#endregion
|
|
109
|
-
export { _decode, _decodeAsync, _encode, _encodeAsync, _parse, _parseAsync, _safeDecode, _safeDecodeAsync, _safeEncode, _safeEncodeAsync, _safeParse, _safeParseAsync, parse, parseAsync, safeParse, safeParseAsync };
|
|
110
|
-
//# sourceMappingURL=parse.js.map
|
|
109
|
+
export { _decode, _decodeAsync, _encode, _encodeAsync, _parse, _parseAsync, _safeDecode, _safeDecodeAsync, _safeEncode, _safeEncodeAsync, _safeParse, _safeParseAsync, parse, parseAsync, safeParse, safeParseAsync };
|
|
@@ -28,7 +28,6 @@ const cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-
|
|
|
28
28
|
const cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
|
|
29
29
|
const base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;
|
|
30
30
|
const base64url = /^[A-Za-z0-9_-]*$/;
|
|
31
|
-
const hostname = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/;
|
|
32
31
|
const e164 = /^\+(?:[0-9]){6,14}[0-9]$/;
|
|
33
32
|
const dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;
|
|
34
33
|
const date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
|
|
@@ -55,5 +54,4 @@ const lowercase = /^[^A-Z]*$/;
|
|
|
55
54
|
const uppercase = /^[^a-z]*$/;
|
|
56
55
|
|
|
57
56
|
//#endregion
|
|
58
|
-
export { base64, base64url, cidrv4, cidrv6, cuid, cuid2, date, datetime, duration, e164, email, emoji, guid,
|
|
59
|
-
//# sourceMappingURL=regexes.js.map
|
|
57
|
+
export { base64, base64url, cidrv4, cidrv6, cuid, cuid2, date, datetime, duration, e164, email, emoji, guid, ipv4, ipv6, ksuid, lowercase, nanoid, string, time, ulid, uppercase, uuid, xid };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
//#region ../../../node_modules/zod/v4/core/registries.js
|
|
2
|
-
|
|
3
|
-
const $input = Symbol("ZodInput");
|
|
2
|
+
var _a;
|
|
4
3
|
var $ZodRegistry = class {
|
|
5
4
|
constructor() {
|
|
6
5
|
this._map = /* @__PURE__ */ new WeakMap();
|
|
@@ -46,8 +45,8 @@ var $ZodRegistry = class {
|
|
|
46
45
|
function registry() {
|
|
47
46
|
return new $ZodRegistry();
|
|
48
47
|
}
|
|
49
|
-
|
|
48
|
+
(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
|
|
49
|
+
const globalRegistry = globalThis.__zod_globalRegistry;
|
|
50
50
|
|
|
51
51
|
//#endregion
|
|
52
|
-
export { globalRegistry };
|
|
53
|
-
//# sourceMappingURL=registries.js.map
|
|
52
|
+
export { globalRegistry };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { $ZodAsyncError, $ZodEncodeError, $constructor, config } from "./core.js";
|
|
2
2
|
import { aborted, cleanRegex, clone, defineLazy, finalizeIssue, isPlainObject, issue, prefixIssues } from "./util.js";
|
|
3
3
|
import { safeParse, safeParseAsync } from "./parse.js";
|
|
4
|
-
import { base64, base64url, cidrv4, cidrv6, cuid, cuid2, date, datetime, duration, e164, email, emoji, guid,
|
|
4
|
+
import { base64, base64url, cidrv4, cidrv6, cuid, cuid2, date, datetime, duration, e164, email, emoji, guid, ipv4, ipv6, ksuid, nanoid, string, time, ulid, uuid, xid } from "./regexes.js";
|
|
5
5
|
import { $ZodCheck, $ZodCheckStringFormat } from "./checks.js";
|
|
6
6
|
import { version } from "./versions.js";
|
|
7
7
|
|
|
@@ -152,7 +152,7 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
152
152
|
code: "invalid_format",
|
|
153
153
|
format: "url",
|
|
154
154
|
note: "Invalid hostname",
|
|
155
|
-
pattern: hostname.source,
|
|
155
|
+
pattern: def.hostname.source,
|
|
156
156
|
input: payload.value,
|
|
157
157
|
inst,
|
|
158
158
|
continue: !def.abort
|
|
@@ -231,18 +231,12 @@ const $ZodISODuration = /* @__PURE__ */ $constructor("$ZodISODuration", (inst, d
|
|
|
231
231
|
const $ZodIPv4 = /* @__PURE__ */ $constructor("$ZodIPv4", (inst, def) => {
|
|
232
232
|
def.pattern ?? (def.pattern = ipv4);
|
|
233
233
|
$ZodStringFormat.init(inst, def);
|
|
234
|
-
inst._zod.
|
|
235
|
-
const bag = inst$1._zod.bag;
|
|
236
|
-
bag.format = `ipv4`;
|
|
237
|
-
});
|
|
234
|
+
inst._zod.bag.format = `ipv4`;
|
|
238
235
|
});
|
|
239
236
|
const $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => {
|
|
240
237
|
def.pattern ?? (def.pattern = ipv6);
|
|
241
238
|
$ZodStringFormat.init(inst, def);
|
|
242
|
-
inst._zod.
|
|
243
|
-
const bag = inst$1._zod.bag;
|
|
244
|
-
bag.format = `ipv6`;
|
|
245
|
-
});
|
|
239
|
+
inst._zod.bag.format = `ipv6`;
|
|
246
240
|
inst._zod.check = (payload) => {
|
|
247
241
|
try {
|
|
248
242
|
new URL(`http://[${payload.value}]`);
|
|
@@ -298,9 +292,7 @@ function isValidBase64(data) {
|
|
|
298
292
|
const $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => {
|
|
299
293
|
def.pattern ?? (def.pattern = base64);
|
|
300
294
|
$ZodStringFormat.init(inst, def);
|
|
301
|
-
inst._zod.
|
|
302
|
-
inst$1._zod.bag.contentEncoding = "base64";
|
|
303
|
-
});
|
|
295
|
+
inst._zod.bag.contentEncoding = "base64";
|
|
304
296
|
inst._zod.check = (payload) => {
|
|
305
297
|
if (isValidBase64(payload.value)) return;
|
|
306
298
|
payload.issues.push({
|
|
@@ -320,9 +312,7 @@ function isValidBase64URL(data) {
|
|
|
320
312
|
const $ZodBase64URL = /* @__PURE__ */ $constructor("$ZodBase64URL", (inst, def) => {
|
|
321
313
|
def.pattern ?? (def.pattern = base64url);
|
|
322
314
|
$ZodStringFormat.init(inst, def);
|
|
323
|
-
inst._zod.
|
|
324
|
-
inst$1._zod.bag.contentEncoding = "base64url";
|
|
325
|
-
});
|
|
315
|
+
inst._zod.bag.contentEncoding = "base64url";
|
|
326
316
|
inst._zod.check = (payload) => {
|
|
327
317
|
if (isValidBase64URL(payload.value)) return;
|
|
328
318
|
payload.issues.push({
|
|
@@ -710,8 +700,8 @@ const $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) =>
|
|
|
710
700
|
$ZodType.init(inst, def);
|
|
711
701
|
defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
|
|
712
702
|
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
713
|
-
defineLazy(inst._zod, "optin", () => def.innerType
|
|
714
|
-
defineLazy(inst._zod, "optout", () => def.innerType
|
|
703
|
+
defineLazy(inst._zod, "optin", () => def.innerType?._zod?.optin);
|
|
704
|
+
defineLazy(inst._zod, "optout", () => def.innerType?._zod?.optout);
|
|
715
705
|
inst._zod.parse = (payload, ctx) => {
|
|
716
706
|
if (ctx.direction === "backward") return def.innerType._zod.run(payload, ctx);
|
|
717
707
|
const result = def.innerType._zod.run(payload, ctx);
|
|
@@ -751,5 +741,4 @@ function handleRefineResult(result, payload, input, inst) {
|
|
|
751
741
|
}
|
|
752
742
|
|
|
753
743
|
//#endregion
|
|
754
|
-
export { $ZodArray, $ZodBase64, $ZodBase64URL, $ZodCIDRv4, $ZodCIDRv6, $ZodCUID, $ZodCUID2, $ZodCatch, $ZodCustom, $ZodDefault, $ZodE164, $ZodEmail, $ZodEmoji, $ZodGUID, $ZodIPv4, $ZodIPv6, $ZodISODate, $ZodISODateTime, $ZodISODuration, $ZodISOTime, $ZodIntersection, $ZodJWT, $ZodKSUID, $ZodNanoID, $ZodNonOptional, $ZodNullable, $ZodOptional, $ZodPipe, $ZodPrefault, $ZodReadonly, $ZodString, $ZodStringFormat, $ZodTransform, $ZodType, $ZodULID, $ZodURL, $ZodUUID, $ZodUnion, $ZodXID };
|
|
755
|
-
//# sourceMappingURL=schemas.js.map
|
|
744
|
+
export { $ZodArray, $ZodBase64, $ZodBase64URL, $ZodCIDRv4, $ZodCIDRv6, $ZodCUID, $ZodCUID2, $ZodCatch, $ZodCustom, $ZodDefault, $ZodE164, $ZodEmail, $ZodEmoji, $ZodGUID, $ZodIPv4, $ZodIPv6, $ZodISODate, $ZodISODateTime, $ZodISODuration, $ZodISOTime, $ZodIntersection, $ZodJWT, $ZodKSUID, $ZodNanoID, $ZodNonOptional, $ZodNullable, $ZodOptional, $ZodPipe, $ZodPrefault, $ZodReadonly, $ZodString, $ZodStringFormat, $ZodTransform, $ZodType, $ZodULID, $ZodURL, $ZodUUID, $ZodUnion, $ZodXID };
|
|
@@ -47,6 +47,9 @@ function mergeDefs(...defs) {
|
|
|
47
47
|
}
|
|
48
48
|
return Object.defineProperties({}, mergedDescriptors);
|
|
49
49
|
}
|
|
50
|
+
function slugify(input) {
|
|
51
|
+
return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
52
|
+
}
|
|
50
53
|
const captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {};
|
|
51
54
|
function isObject(data) {
|
|
52
55
|
return typeof data === "object" && data !== null && !Array.isArray(data);
|
|
@@ -64,6 +67,7 @@ function isPlainObject(o) {
|
|
|
64
67
|
if (isObject(o) === false) return false;
|
|
65
68
|
const ctor = o.constructor;
|
|
66
69
|
if (ctor === void 0) return true;
|
|
70
|
+
if (typeof ctor !== "function") return true;
|
|
67
71
|
const prot = ctor.prototype;
|
|
68
72
|
if (isObject(prot) === false) return false;
|
|
69
73
|
if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) return false;
|
|
@@ -148,5 +152,4 @@ function issue(...args) {
|
|
|
148
152
|
}
|
|
149
153
|
|
|
150
154
|
//#endregion
|
|
151
|
-
export { aborted, captureStackTrace, cleanRegex, clone, defineLazy, escapeRegex, finalizeIssue, getLengthableOrigin, isPlainObject, issue, jsonStringifyReplacer, mergeDefs, normalizeParams, nullish, prefixIssues, shallowClone };
|
|
152
|
-
//# sourceMappingURL=util.js.map
|
|
155
|
+
export { aborted, captureStackTrace, cleanRegex, clone, defineLazy, escapeRegex, finalizeIssue, getLengthableOrigin, isPlainObject, issue, jsonStringifyReplacer, mergeDefs, normalizeParams, nullish, prefixIssues, shallowClone, slugify };
|