@btst/stack 1.4.0 → 1.5.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/node_modules/.pnpm/@date-fns_tz@1.4.1/node_modules/@date-fns/tz/date/index.cjs +85 -0
- package/dist/node_modules/.pnpm/@date-fns_tz@1.4.1/node_modules/@date-fns/tz/date/index.mjs +83 -0
- package/dist/node_modules/.pnpm/@date-fns_tz@1.4.1/node_modules/@date-fns/tz/date/mini.cjs +237 -0
- package/dist/node_modules/.pnpm/@date-fns_tz@1.4.1/node_modules/@date-fns/tz/date/mini.mjs +235 -0
- package/dist/node_modules/.pnpm/@date-fns_tz@1.4.1/node_modules/@date-fns/tz/tzName/index.cjs +41 -0
- package/dist/node_modules/.pnpm/@date-fns_tz@1.4.1/node_modules/@date-fns/tz/tzName/index.mjs +39 -0
- package/dist/node_modules/.pnpm/@date-fns_tz@1.4.1/node_modules/@date-fns/tz/tzOffset/index.cjs +46 -0
- package/dist/node_modules/.pnpm/@date-fns_tz@1.4.1/node_modules/@date-fns/tz/tzOffset/index.mjs +44 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-accordion@1.2.12_@types_react-dom@19.2.3_@types_react@19.2.6__@types_re_947719a27ff11ec6f09710dd9e85efc5/node_modules/@radix-ui/react-accordion/dist/index.cjs +321 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-accordion@1.2.12_@types_react-dom@19.2.3_@types_react@19.2.6__@types_re_947719a27ff11ec6f09710dd9e85efc5/node_modules/@radix-ui/react-accordion/dist/index.mjs +306 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-checkbox@1.3.3_@types_react-dom@19.2.3_@types_react@19.2.6__@types_reac_c1e3fbdebd5ee34a254141dc5a2dcd28/node_modules/@radix-ui/react-checkbox/dist/index.cjs +296 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-checkbox@1.3.3_@types_react-dom@19.2.3_@types_react@19.2.6__@types_reac_c1e3fbdebd5ee34a254141dc5a2dcd28/node_modules/@radix-ui/react-checkbox/dist/index.mjs +271 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-collapsible@1.1.12_@types_react-dom@19.2.3_@types_react@19.2.6__@types__d025a77f62ee83ca6bd8b0ea1f9de738/node_modules/@radix-ui/react-collapsible/dist/index.cjs +168 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-collapsible@1.1.12_@types_react-dom@19.2.3_@types_react@19.2.6__@types__d025a77f62ee83ca6bd8b0ea1f9de738/node_modules/@radix-ui/react-collapsible/dist/index.mjs +146 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-popover@1.1.15_@types_react-dom@19.2.3_@types_react@19.2.6__@types_reac_5c5a3ca63b34dfe7d9d23f1e8cee675c/node_modules/@radix-ui/react-popover/dist/index.cjs +325 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-popover@1.1.15_@types_react-dom@19.2.3_@types_react@19.2.6__@types_reac_5c5a3ca63b34dfe7d9d23f1e8cee675c/node_modules/@radix-ui/react-popover/dist/index.mjs +299 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.1.4_@types_react-dom@19.2.3_@types_react@19.2.6__@types_rea_43b950ce9f6b8d55739cce33fe173a1c/node_modules/@radix-ui/react-primitive/dist/index.cjs +56 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.1.4_@types_react-dom@19.2.3_@types_react@19.2.6__@types_rea_43b950ce9f6b8d55739cce33fe173a1c/node_modules/@radix-ui/react-primitive/dist/index.mjs +40 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-radio-group@1.3.8_@types_react-dom@19.2.3_@types_react@19.2.6__@types_r_e0d4db654009398ea41c8e459eeae4ee/node_modules/@radix-ui/react-radio-group/dist/index.cjs +304 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-radio-group@1.3.8_@types_react-dom@19.2.3_@types_react@19.2.6__@types_r_e0d4db654009398ea41c8e459eeae4ee/node_modules/@radix-ui/react-radio-group/dist/index.mjs +283 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-separator@1.1.8_@types_react-dom@19.2.3_@types_react@19.2.6__@types_rea_8aae318b88145540882c32de0262377a/node_modules/@radix-ui/react-separator/dist/index.cjs +47 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-separator@1.1.8_@types_react-dom@19.2.3_@types_react@19.2.6__@types_rea_8aae318b88145540882c32de0262377a/node_modules/@radix-ui/react-separator/dist/index.mjs +30 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/DayPicker.cjs +326 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/DayPicker.mjs +320 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/UI.cjs +122 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/UI.mjs +122 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/classes/CalendarDay.cjs +35 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/classes/CalendarDay.mjs +33 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.cjs +16 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.mjs +14 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.cjs +15 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/classes/DateLib.cjs +577 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/classes/DateLib.mjs +573 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Button.cjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Button.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/CaptionLabel.cjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/CaptionLabel.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Chevron.cjs +26 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Chevron.mjs +20 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Day.cjs +24 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Day.mjs +18 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/DayButton.cjs +25 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/DayButton.mjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Dropdown.cjs +27 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Dropdown.mjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/DropdownNav.cjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/DropdownNav.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Footer.cjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Footer.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Month.cjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Month.mjs +15 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/MonthCaption.cjs +20 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/MonthCaption.mjs +14 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/MonthGrid.cjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/MonthGrid.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Months.cjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Months.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/MonthsDropdown.cjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/MonthsDropdown.mjs +15 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Nav.cjs +37 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Nav.mjs +31 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/NextMonthButton.cjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/NextMonthButton.mjs +15 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Option.cjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Option.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.cjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.mjs +15 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Root.cjs +20 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Root.mjs +14 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Select.cjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Select.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Week.cjs +20 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Week.mjs +14 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/WeekNumber.cjs +20 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/WeekNumber.mjs +14 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.cjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Weekday.cjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Weekday.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Weekdays.cjs +20 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Weekdays.mjs +14 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Weeks.cjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/Weeks.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/YearsDropdown.cjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/YearsDropdown.mjs +15 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/custom-components.cjs +57 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/components/custom-components.mjs +26 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatCaption.cjs +29 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatCaption.mjs +26 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatDay.cjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatDay.mjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.cjs +20 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.mjs +18 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.cjs +23 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.mjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.cjs +15 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.cjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.mjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.cjs +26 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.mjs +23 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/index.cjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/formatters/index.mjs +7 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.cjs +75 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.mjs +73 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.cjs +97 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.mjs +95 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.cjs +24 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.mjs +22 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.cjs +30 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.mjs +28 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.cjs +35 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.mjs +33 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getComponents.cjs +22 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getComponents.mjs +20 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.cjs +29 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.mjs +27 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getDates.cjs +61 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getDates.mjs +59 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getDays.cjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getDays.mjs +19 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.cjs +35 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.mjs +33 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.cjs +26 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.mjs +24 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.cjs +48 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.mjs +46 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getFormatters.cjs +26 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getFormatters.mjs +24 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.cjs +29 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.mjs +27 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getLabels.cjs +55 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getLabels.mjs +53 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.cjs +35 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.mjs +33 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getMonths.cjs +71 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getMonths.mjs +69 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getNavMonth.cjs +53 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getNavMonth.mjs +51 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getNextFocus.cjs +42 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getNextFocus.mjs +40 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getNextMonth.cjs +38 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getNextMonth.mjs +36 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.cjs +39 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.mjs +37 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.cjs +29 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.mjs +27 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.cjs +28 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.mjs +26 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getWeeks.cjs +16 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getWeeks.mjs +14 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.cjs +38 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.mjs +36 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.cjs +29 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.mjs +27 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/useControlledValue.cjs +33 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/helpers/useControlledValue.mjs +31 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/index.cjs +29 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/index.mjs +11 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelDayButton.cjs +35 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelDayButton.mjs +32 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelGrid.cjs +28 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelGrid.mjs +25 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelGridcell.cjs +24 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelGridcell.mjs +22 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.cjs +16 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.mjs +14 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelNav.cjs +15 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelNav.mjs +13 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelNext.cjs +18 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelNext.mjs +16 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelPrevious.cjs +17 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelPrevious.mjs +15 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.cjs +17 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.mjs +15 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.cjs +16 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.mjs +14 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelWeekday.cjs +20 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelWeekday.mjs +18 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.cjs +16 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.mjs +14 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/locale/en-US.cjs +69 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/locale/en-US.mjs +67 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/selection/useMulti.cjs +59 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/selection/useMulti.mjs +57 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/selection/useRange.cjs +47 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/selection/useRange.mjs +45 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/selection/useSingle.cjs +46 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/selection/useSingle.mjs +44 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/useAnimation.cjs +176 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/useAnimation.mjs +174 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/useCalendar.cjs +115 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/useCalendar.mjs +113 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/useDayPicker.cjs +28 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/useDayPicker.mjs +25 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/useFocus.cjs +58 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/useFocus.mjs +56 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/useSelection.cjs +33 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/useSelection.mjs +31 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/addToRange.cjs +97 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/addToRange.mjs +95 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/convertMatchersToTimeZone.cjs +59 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/convertMatchersToTimeZone.mjs +57 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.cjs +64 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.mjs +62 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.cjs +32 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.mjs +30 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.cjs +76 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.mjs +74 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.cjs +37 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.mjs +35 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.cjs +23 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.mjs +21 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/toTimeZone.cjs +18 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/toTimeZone.mjs +16 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/typeguards.cjs +73 -0
- package/dist/node_modules/.pnpm/react-day-picker@9.12.0_react@19.2.0/node_modules/react-day-picker/dist/esm/utils/typeguards.mjs +66 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-interface.cjs +36 -3
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-interface.mjs +36 -3
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-layout.cjs +16 -3
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-layout.mjs +16 -3
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-message.cjs +35 -3
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-message.mjs +35 -3
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-sidebar.cjs +131 -124
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-sidebar.mjs +131 -124
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/tool-call-display.cjs +123 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/tool-call-display.mjs +121 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/schemas.cjs +23 -23
- package/dist/packages/better-stack/src/plugins/blog/api/plugin.cjs +28 -12
- package/dist/packages/better-stack/src/plugins/blog/api/plugin.mjs +18 -2
- package/dist/packages/better-stack/src/plugins/blog/client/components/loading/form-page-skeleton.cjs +1 -1
- package/dist/packages/better-stack/src/plugins/blog/client/components/loading/form-page-skeleton.mjs +1 -1
- package/dist/packages/better-stack/src/plugins/blog/client/components/loading/list-page-skeleton.cjs +1 -1
- package/dist/packages/better-stack/src/plugins/blog/client/components/loading/list-page-skeleton.mjs +1 -1
- package/dist/packages/better-stack/src/plugins/blog/client/components/loading/post-page-skeleton.cjs +1 -1
- package/dist/packages/better-stack/src/plugins/blog/client/components/loading/post-page-skeleton.mjs +1 -1
- package/dist/packages/better-stack/src/plugins/blog/client/components/shared/page-wrapper.cjs +10 -6
- package/dist/packages/better-stack/src/plugins/blog/client/components/shared/page-wrapper.mjs +11 -7
- package/dist/packages/better-stack/src/plugins/blog/schemas.cjs +17 -17
- package/dist/packages/better-stack/src/plugins/cms/api/plugin.cjs +457 -0
- package/dist/packages/better-stack/src/plugins/cms/api/plugin.mjs +455 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/forms/content-form.cjs +299 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/forms/content-form.mjs +297 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/forms/file-upload.cjs +118 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/forms/file-upload.mjs +116 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/loading/dashboard-skeleton.cjs +18 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/loading/dashboard-skeleton.mjs +16 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/loading/editor-skeleton.cjs +32 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/loading/editor-skeleton.mjs +30 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/loading/list-skeleton.cjs +32 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/loading/list-skeleton.mjs +30 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/404-page.cjs +20 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/404-page.mjs +18 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-editor-page.cjs +46 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-editor-page.internal.cjs +83 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-editor-page.internal.mjs +81 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-editor-page.mjs +44 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-list-page.cjs +43 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-list-page.internal.cjs +152 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-list-page.internal.mjs +150 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-list-page.mjs +41 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/dashboard-page.cjs +39 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/dashboard-page.internal.cjs +68 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/dashboard-page.internal.mjs +66 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/dashboard-page.mjs +37 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/shared/default-error.cjs +17 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/shared/default-error.mjs +15 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/shared/empty-state.cjs +16 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/shared/empty-state.mjs +14 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/shared/page-wrapper.cjs +27 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/shared/page-wrapper.mjs +25 -0
- package/dist/packages/better-stack/src/plugins/cms/client/hooks/cms-hooks.cjs +402 -0
- package/dist/packages/better-stack/src/plugins/cms/client/hooks/cms-hooks.mjs +390 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-common.cjs +29 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-common.mjs +27 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-dashboard.cjs +13 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-dashboard.mjs +11 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-editor.cjs +12 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-editor.mjs +10 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-list.cjs +18 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-list.mjs +16 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-toasts.cjs +12 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-toasts.mjs +10 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/index.cjs +17 -0
- package/dist/packages/better-stack/src/plugins/cms/client/localization/index.mjs +15 -0
- package/dist/packages/better-stack/src/plugins/cms/client/plugin.cjs +185 -0
- package/dist/packages/better-stack/src/plugins/cms/client/plugin.mjs +183 -0
- package/dist/packages/better-stack/src/plugins/cms/db.cjs +76 -0
- package/dist/packages/better-stack/src/plugins/cms/db.mjs +74 -0
- package/dist/packages/better-stack/src/plugins/cms/schemas.cjs +54 -0
- package/dist/packages/better-stack/src/plugins/cms/schemas.mjs +49 -0
- package/dist/packages/better-stack/src/plugins/cms/utils.cjs +15 -0
- package/dist/packages/better-stack/src/plugins/cms/utils.mjs +9 -0
- package/dist/packages/ui/src/components/accordion.cjs +67 -0
- package/dist/packages/ui/src/components/accordion.mjs +62 -0
- package/dist/packages/ui/src/components/calendar.cjs +205 -0
- package/dist/packages/ui/src/components/calendar.mjs +188 -0
- package/dist/packages/ui/src/components/checkbox.cjs +34 -0
- package/dist/packages/ui/src/components/checkbox.mjs +32 -0
- package/dist/packages/ui/src/components/date-picker.cjs +41 -0
- package/dist/packages/ui/src/components/date-picker.mjs +39 -0
- package/dist/packages/ui/src/components/form.mjs +1 -1
- package/dist/packages/{better-stack/src/plugins/blog/client/components/shared → ui/src/components}/page-layout.cjs +2 -1
- package/dist/packages/{better-stack/src/plugins/blog/client/components/shared → ui/src/components}/page-layout.mjs +2 -1
- package/dist/packages/ui/src/components/page-wrapper.cjs +20 -0
- package/dist/packages/ui/src/components/page-wrapper.mjs +18 -0
- package/dist/packages/ui/src/components/popover.cjs +41 -0
- package/dist/packages/ui/src/components/popover.mjs +37 -0
- package/dist/packages/ui/src/components/radio-group.cjs +48 -0
- package/dist/packages/ui/src/components/radio-group.mjs +45 -0
- package/dist/packages/ui/src/components/separator.cjs +29 -0
- package/dist/packages/ui/src/components/separator.mjs +27 -0
- package/dist/packages/ui/src/components/table.cjs +89 -0
- package/dist/packages/ui/src/components/table.mjs +82 -0
- package/dist/packages/ui/src/components/ui/auto-form/common/label.cjs +18 -0
- package/dist/packages/ui/src/components/ui/auto-form/common/label.mjs +16 -0
- package/dist/packages/ui/src/components/ui/auto-form/common/tooltip.cjs +9 -0
- package/dist/packages/ui/src/components/ui/auto-form/common/tooltip.mjs +7 -0
- package/dist/packages/ui/src/components/ui/auto-form/config.cjs +42 -0
- package/dist/packages/ui/src/components/ui/auto-form/config.mjs +39 -0
- package/dist/packages/ui/src/components/ui/auto-form/dependencies.cjs +48 -0
- package/dist/packages/ui/src/components/ui/auto-form/dependencies.mjs +46 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/array.cjs +103 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/array.mjs +87 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/checkbox.cjs +38 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/checkbox.mjs +36 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/date.cjs +37 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/date.mjs +35 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/enum.cjs +73 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/enum.mjs +71 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/file.cjs +63 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/file.mjs +61 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/input.cjs +32 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/input.mjs +30 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/number.cjs +31 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/number.mjs +29 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/object.cjs +149 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/object.mjs +133 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/radio-group.cjs +67 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/radio-group.mjs +65 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/switch.cjs +38 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/switch.mjs +36 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/textarea.cjs +31 -0
- package/dist/packages/ui/src/components/ui/auto-form/fields/textarea.mjs +29 -0
- package/dist/packages/ui/src/components/ui/auto-form/index.cjs +87 -0
- package/dist/packages/ui/src/components/ui/auto-form/index.mjs +78 -0
- package/dist/packages/ui/src/components/ui/auto-form/types.cjs +11 -0
- package/dist/packages/ui/src/components/ui/auto-form/types.mjs +9 -0
- package/dist/packages/ui/src/components/ui/auto-form/utils.cjs +179 -0
- package/dist/packages/ui/src/components/ui/auto-form/utils.mjs +169 -0
- package/dist/plugins/ai-chat/api/index.d.cts +1 -1
- package/dist/plugins/ai-chat/api/index.d.mts +1 -1
- package/dist/plugins/ai-chat/api/index.d.ts +1 -1
- package/dist/plugins/ai-chat/client/components/index.cjs +2 -0
- package/dist/plugins/ai-chat/client/components/index.d.cts +1 -1
- package/dist/plugins/ai-chat/client/components/index.d.mts +1 -1
- package/dist/plugins/ai-chat/client/components/index.d.ts +1 -1
- package/dist/plugins/ai-chat/client/components/index.mjs +1 -0
- package/dist/plugins/ai-chat/client/hooks/index.d.cts +1 -1
- package/dist/plugins/ai-chat/client/hooks/index.d.mts +1 -1
- package/dist/plugins/ai-chat/client/hooks/index.d.ts +1 -1
- package/dist/plugins/ai-chat/client/index.cjs +2 -0
- package/dist/plugins/ai-chat/client/index.d.cts +5 -176
- package/dist/plugins/ai-chat/client/index.d.mts +5 -176
- package/dist/plugins/ai-chat/client/index.d.ts +5 -176
- package/dist/plugins/ai-chat/client/index.mjs +1 -0
- package/dist/plugins/ai-chat/query-keys.d.cts +56 -250
- package/dist/plugins/ai-chat/query-keys.d.mts +56 -250
- package/dist/plugins/ai-chat/query-keys.d.ts +56 -250
- package/dist/plugins/blog/client/components/shared/markdown-content-styles.css +6 -0
- package/dist/plugins/blog/query-keys.d.cts +102 -362
- package/dist/plugins/blog/query-keys.d.mts +102 -362
- package/dist/plugins/blog/query-keys.d.ts +102 -362
- package/dist/plugins/cms/api/index.cjs +7 -0
- package/dist/plugins/cms/api/index.d.cts +101 -0
- package/dist/plugins/cms/api/index.d.mts +101 -0
- package/dist/plugins/cms/api/index.d.ts +101 -0
- package/dist/plugins/cms/api/index.mjs +1 -0
- package/dist/plugins/cms/client/components/index.cjs +14 -0
- package/dist/plugins/cms/client/components/index.d.cts +20 -0
- package/dist/plugins/cms/client/components/index.d.mts +20 -0
- package/dist/plugins/cms/client/components/index.d.ts +20 -0
- package/dist/plugins/cms/client/components/index.mjs +10 -0
- package/dist/plugins/cms/client/hooks/index.cjs +17 -0
- package/dist/plugins/cms/client/hooks/index.d.cts +203 -0
- package/dist/plugins/cms/client/hooks/index.d.mts +203 -0
- package/dist/plugins/cms/client/hooks/index.d.ts +203 -0
- package/dist/plugins/cms/client/hooks/index.mjs +1 -0
- package/dist/plugins/cms/client/index.cjs +9 -0
- package/dist/plugins/cms/client/index.d.cts +344 -0
- package/dist/plugins/cms/client/index.d.mts +344 -0
- package/dist/plugins/cms/client/index.d.ts +344 -0
- package/dist/plugins/cms/client/index.mjs +2 -0
- package/dist/plugins/cms/client.css +2 -0
- package/dist/plugins/cms/query-keys.cjs +137 -0
- package/dist/plugins/cms/query-keys.d.cts +79 -0
- package/dist/plugins/cms/query-keys.d.mts +79 -0
- package/dist/plugins/cms/query-keys.d.ts +79 -0
- package/dist/plugins/cms/query-keys.mjs +135 -0
- package/dist/plugins/cms/style.css +19 -0
- package/dist/shared/stack.BwkyFwF8.d.cts +135 -0
- package/dist/shared/stack.DBqxCs0V.d.mts +135 -0
- package/dist/shared/stack.DaOcgmrM.d.cts +323 -0
- package/dist/shared/stack.DaOcgmrM.d.mts +323 -0
- package/dist/shared/stack.DaOcgmrM.d.ts +323 -0
- package/dist/shared/stack.DwnJA87a.d.ts +135 -0
- package/dist/shared/stack.NZJogTUn.d.cts +66 -0
- package/dist/shared/stack.NZJogTUn.d.mts +66 -0
- package/dist/shared/stack.NZJogTUn.d.ts +66 -0
- package/package.json +58 -5
- package/src/plugins/ai-chat/client/components/chat-interface.tsx +56 -2
- package/src/plugins/ai-chat/client/components/chat-layout.tsx +16 -1
- package/src/plugins/ai-chat/client/components/chat-message.tsx +59 -3
- package/src/plugins/ai-chat/client/components/chat-sidebar.tsx +4 -1
- package/src/plugins/ai-chat/client/components/index.ts +2 -0
- package/src/plugins/ai-chat/client/components/tool-call-display.tsx +197 -0
- package/src/plugins/ai-chat/client/index.ts +12 -1
- package/src/plugins/ai-chat/client/overrides.ts +71 -0
- package/src/plugins/blog/api/plugin.ts +29 -2
- package/src/plugins/blog/client/components/loading/form-page-skeleton.tsx +1 -1
- package/src/plugins/blog/client/components/loading/list-page-skeleton.tsx +1 -1
- package/src/plugins/blog/client/components/loading/post-page-skeleton.tsx +1 -1
- package/src/plugins/blog/client/components/shared/markdown-content-styles.css +6 -0
- package/src/plugins/blog/client/components/shared/page-wrapper.tsx +9 -9
- package/src/plugins/cms/__tests__/schema-roundtrip.test.ts +611 -0
- package/src/plugins/cms/api/index.ts +1 -0
- package/src/plugins/cms/api/plugin.ts +611 -0
- package/src/plugins/cms/client/components/forms/content-form.tsx +477 -0
- package/src/plugins/cms/client/components/forms/file-upload.tsx +164 -0
- package/src/plugins/cms/client/components/index.tsx +10 -0
- package/src/plugins/cms/client/components/loading/dashboard-skeleton.tsx +22 -0
- package/src/plugins/cms/client/components/loading/editor-skeleton.tsx +35 -0
- package/src/plugins/cms/client/components/loading/index.tsx +3 -0
- package/src/plugins/cms/client/components/loading/list-skeleton.tsx +38 -0
- package/src/plugins/cms/client/components/pages/404-page.tsx +27 -0
- package/src/plugins/cms/client/components/pages/content-editor-page.internal.tsx +121 -0
- package/src/plugins/cms/client/components/pages/content-editor-page.tsx +50 -0
- package/src/plugins/cms/client/components/pages/content-list-page.internal.tsx +198 -0
- package/src/plugins/cms/client/components/pages/content-list-page.tsx +45 -0
- package/src/plugins/cms/client/components/pages/dashboard-page.internal.tsx +94 -0
- package/src/plugins/cms/client/components/pages/dashboard-page.tsx +37 -0
- package/src/plugins/cms/client/components/shared/default-error.tsx +30 -0
- package/src/plugins/cms/client/components/shared/empty-state.tsx +26 -0
- package/src/plugins/cms/client/components/shared/page-wrapper.tsx +32 -0
- package/src/plugins/cms/client/components/shared/pagination.tsx +72 -0
- package/src/plugins/cms/client/hooks/cms-hooks.tsx +724 -0
- package/src/plugins/cms/client/hooks/index.tsx +1 -0
- package/src/plugins/cms/client/index.ts +13 -0
- package/src/plugins/cms/client/localization/cms-common.ts +29 -0
- package/src/plugins/cms/client/localization/cms-dashboard.ts +10 -0
- package/src/plugins/cms/client/localization/cms-editor.ts +8 -0
- package/src/plugins/cms/client/localization/cms-list.ts +14 -0
- package/src/plugins/cms/client/localization/cms-toasts.ts +8 -0
- package/src/plugins/cms/client/localization/index.ts +15 -0
- package/src/plugins/cms/client/overrides.ts +166 -0
- package/src/plugins/cms/client/plugin.tsx +283 -0
- package/src/plugins/cms/client.css +2 -0
- package/src/plugins/cms/db.ts +76 -0
- package/src/plugins/cms/query-keys.ts +186 -0
- package/src/plugins/cms/schemas.ts +81 -0
- package/src/plugins/cms/style.css +19 -0
- package/src/plugins/cms/types.ts +220 -0
- package/src/plugins/cms/utils.ts +11 -0
- package/dist/shared/stack.DorMi9CZ.d.cts +0 -80
- package/dist/shared/stack.DorMi9CZ.d.mts +0 -80
- package/dist/shared/stack.DorMi9CZ.d.ts +0 -80
- package/src/plugins/blog/client/components/shared/page-layout.tsx +0 -23
|
@@ -0,0 +1,611 @@
|
|
|
1
|
+
import { describe, it, expect } from "vitest";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* These tests verify that Zod schemas can be converted to JSON Schema,
|
|
6
|
+
* stored as strings, and reconstructed back to Zod schemas.
|
|
7
|
+
*
|
|
8
|
+
* With Zod v4, we use native methods:
|
|
9
|
+
* - z.toJSONSchema() to convert Zod -> JSON Schema
|
|
10
|
+
* - z.fromJSONSchema() to convert JSON Schema -> Zod (experimental but stable)
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
describe("Zod to JSON Schema roundtrip", () => {
|
|
14
|
+
it("preserves string fields", () => {
|
|
15
|
+
const original = z.object({ name: z.string().min(1) });
|
|
16
|
+
const jsonSchema = z.toJSONSchema(original);
|
|
17
|
+
const reconstructed = z.fromJSONSchema(jsonSchema);
|
|
18
|
+
|
|
19
|
+
expect(reconstructed.safeParse({ name: "test" }).success).toBe(true);
|
|
20
|
+
expect(reconstructed.safeParse({ name: "" }).success).toBe(false); // min(1)
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it("preserves number fields with min", () => {
|
|
24
|
+
const original = z.object({ price: z.number().min(0) });
|
|
25
|
+
const jsonSchema = z.toJSONSchema(original);
|
|
26
|
+
const reconstructed = z.fromJSONSchema(jsonSchema);
|
|
27
|
+
|
|
28
|
+
expect(reconstructed.safeParse({ price: 10 }).success).toBe(true);
|
|
29
|
+
expect(reconstructed.safeParse({ price: -1 }).success).toBe(false);
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
it("preserves coerce.number fields (loses coerce behavior)", () => {
|
|
33
|
+
const original = z.object({ price: z.coerce.number().min(0) });
|
|
34
|
+
const jsonSchema = z.toJSONSchema(original);
|
|
35
|
+
const reconstructed = z.fromJSONSchema(jsonSchema);
|
|
36
|
+
|
|
37
|
+
// After roundtrip, coerce behavior is NOT preserved
|
|
38
|
+
// but numeric validation should work
|
|
39
|
+
expect(reconstructed.safeParse({ price: 10 }).success).toBe(true);
|
|
40
|
+
expect(reconstructed.safeParse({ price: -1 }).success).toBe(false);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
it("preserves boolean fields with defaults", () => {
|
|
44
|
+
const original = z.object({ featured: z.boolean().default(false) });
|
|
45
|
+
const jsonSchema = z.toJSONSchema(original);
|
|
46
|
+
const reconstructed = z.fromJSONSchema(jsonSchema);
|
|
47
|
+
|
|
48
|
+
// Defaults may or may not be preserved depending on the implementation
|
|
49
|
+
// Let's check what we get
|
|
50
|
+
const result = reconstructed.safeParse({});
|
|
51
|
+
// If the field is optional with default in JSON Schema, parsing {} should work
|
|
52
|
+
if (result.success) {
|
|
53
|
+
const data = result.data as { featured?: boolean };
|
|
54
|
+
expect(data.featured).toBe(false);
|
|
55
|
+
} else {
|
|
56
|
+
// If defaults aren't preserved, the field is required
|
|
57
|
+
expect(result.success).toBe(false);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
it("preserves enum fields", () => {
|
|
62
|
+
const original = z.object({
|
|
63
|
+
category: z.enum(["Electronics", "Clothing", "Home"]),
|
|
64
|
+
});
|
|
65
|
+
const jsonSchema = z.toJSONSchema(original);
|
|
66
|
+
const reconstructed = z.fromJSONSchema(jsonSchema);
|
|
67
|
+
|
|
68
|
+
expect(reconstructed.safeParse({ category: "Electronics" }).success).toBe(
|
|
69
|
+
true,
|
|
70
|
+
);
|
|
71
|
+
expect(reconstructed.safeParse({ category: "Invalid" }).success).toBe(
|
|
72
|
+
false,
|
|
73
|
+
);
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
it("preserves optional fields", () => {
|
|
77
|
+
const original = z.object({ company: z.string().optional() });
|
|
78
|
+
const jsonSchema = z.toJSONSchema(original);
|
|
79
|
+
const reconstructed = z.fromJSONSchema(jsonSchema);
|
|
80
|
+
|
|
81
|
+
expect(reconstructed.safeParse({}).success).toBe(true);
|
|
82
|
+
expect(reconstructed.safeParse({ company: "Acme" }).success).toBe(true);
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
it("preserves max length validation", () => {
|
|
86
|
+
const original = z.object({ title: z.string().max(100) });
|
|
87
|
+
const jsonSchema = z.toJSONSchema(original);
|
|
88
|
+
const reconstructed = z.fromJSONSchema(jsonSchema);
|
|
89
|
+
|
|
90
|
+
expect(reconstructed.safeParse({ title: "short" }).success).toBe(true);
|
|
91
|
+
expect(reconstructed.safeParse({ title: "a".repeat(101) }).success).toBe(
|
|
92
|
+
false,
|
|
93
|
+
);
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
it("preserves number range validation", () => {
|
|
97
|
+
const original = z.object({ rating: z.number().min(1).max(5) });
|
|
98
|
+
const jsonSchema = z.toJSONSchema(original);
|
|
99
|
+
const reconstructed = z.fromJSONSchema(jsonSchema);
|
|
100
|
+
|
|
101
|
+
expect(reconstructed.safeParse({ rating: 3 }).success).toBe(true);
|
|
102
|
+
expect(reconstructed.safeParse({ rating: 0 }).success).toBe(false);
|
|
103
|
+
expect(reconstructed.safeParse({ rating: 6 }).success).toBe(false);
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
it("preserves required vs optional fields correctly", () => {
|
|
107
|
+
const original = z.object({
|
|
108
|
+
required: z.string(),
|
|
109
|
+
optional: z.string().optional(),
|
|
110
|
+
});
|
|
111
|
+
const jsonSchema = z.toJSONSchema(original);
|
|
112
|
+
const reconstructed = z.fromJSONSchema(jsonSchema);
|
|
113
|
+
|
|
114
|
+
expect(reconstructed.safeParse({ required: "test" }).success).toBe(true);
|
|
115
|
+
expect(reconstructed.safeParse({}).success).toBe(false); // missing required
|
|
116
|
+
expect(
|
|
117
|
+
reconstructed.safeParse({ required: "test", optional: "also" }).success,
|
|
118
|
+
).toBe(true);
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
describe(".meta() and description handling", () => {
|
|
122
|
+
it("preserves description in JSON Schema", () => {
|
|
123
|
+
const original = z.object({
|
|
124
|
+
name: z.string().meta({
|
|
125
|
+
description: "Product name",
|
|
126
|
+
}),
|
|
127
|
+
});
|
|
128
|
+
const jsonSchema = z.toJSONSchema(original);
|
|
129
|
+
|
|
130
|
+
// JSON Schema should have description
|
|
131
|
+
const props = (
|
|
132
|
+
jsonSchema as { properties?: { name?: { description?: string } } }
|
|
133
|
+
).properties;
|
|
134
|
+
expect(props?.name?.description).toBe("Product name");
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
it("description survives roundtrip but not as Zod meta", () => {
|
|
138
|
+
const original = z.object({
|
|
139
|
+
name: z.string().meta({
|
|
140
|
+
description: "Product name",
|
|
141
|
+
}),
|
|
142
|
+
});
|
|
143
|
+
const jsonSchema = z.toJSONSchema(original);
|
|
144
|
+
|
|
145
|
+
// Description is in JSON Schema
|
|
146
|
+
const props = (
|
|
147
|
+
jsonSchema as { properties?: { name?: { description?: string } } }
|
|
148
|
+
).properties;
|
|
149
|
+
expect(props?.name?.description).toBe("Product name");
|
|
150
|
+
|
|
151
|
+
// After reconstruction, we can still access the JSON Schema to get descriptions
|
|
152
|
+
// This is fine - we can pass the JSON Schema alongside the Zod schema
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
it("custom meta properties like placeholder need separate storage", () => {
|
|
156
|
+
const original = z.object({
|
|
157
|
+
name: z.string().meta({
|
|
158
|
+
description: "Product name",
|
|
159
|
+
placeholder: "Enter name...",
|
|
160
|
+
}),
|
|
161
|
+
});
|
|
162
|
+
const jsonSchema = z.toJSONSchema(original);
|
|
163
|
+
|
|
164
|
+
// Standard JSON Schema doesn't have placeholder
|
|
165
|
+
// Check if Zod puts it somewhere
|
|
166
|
+
const props = (
|
|
167
|
+
jsonSchema as {
|
|
168
|
+
properties?: {
|
|
169
|
+
name?: { description?: string; placeholder?: string };
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
).properties;
|
|
173
|
+
|
|
174
|
+
// Description should be there (standard JSON Schema property)
|
|
175
|
+
expect(props?.name?.description).toBe("Product name");
|
|
176
|
+
|
|
177
|
+
// Placeholder is NOT a standard JSON Schema property
|
|
178
|
+
// We need to store it separately or use a custom property
|
|
179
|
+
console.log("JSON Schema name property:", JSON.stringify(props?.name));
|
|
180
|
+
|
|
181
|
+
// Document the behavior - placeholder is likely lost
|
|
182
|
+
// Solution: Store fieldConfig separately in our CMS
|
|
183
|
+
});
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
describe("Complex schema types", () => {
|
|
187
|
+
it("handles a realistic Product schema", () => {
|
|
188
|
+
const Product = z.object({
|
|
189
|
+
name: z.string().min(1),
|
|
190
|
+
description: z.string(),
|
|
191
|
+
price: z.number().min(0),
|
|
192
|
+
featured: z.boolean(),
|
|
193
|
+
category: z.enum(["Electronics", "Clothing", "Home"]),
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
const jsonSchema = z.toJSONSchema(Product);
|
|
197
|
+
const reconstructed = z.fromJSONSchema(jsonSchema);
|
|
198
|
+
|
|
199
|
+
const validProduct = {
|
|
200
|
+
name: "Test Product",
|
|
201
|
+
description: "A great product",
|
|
202
|
+
price: 29.99,
|
|
203
|
+
featured: true,
|
|
204
|
+
category: "Electronics",
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
expect(reconstructed.safeParse(validProduct).success).toBe(true);
|
|
208
|
+
|
|
209
|
+
// Test validation still works
|
|
210
|
+
expect(
|
|
211
|
+
reconstructed.safeParse({ ...validProduct, name: "" }).success,
|
|
212
|
+
).toBe(false);
|
|
213
|
+
expect(
|
|
214
|
+
reconstructed.safeParse({ ...validProduct, price: -1 }).success,
|
|
215
|
+
).toBe(false);
|
|
216
|
+
expect(
|
|
217
|
+
reconstructed.safeParse({ ...validProduct, category: "Invalid" })
|
|
218
|
+
.success,
|
|
219
|
+
).toBe(false);
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
it("handles a realistic Testimonial schema", () => {
|
|
223
|
+
const Testimonial = z.object({
|
|
224
|
+
author: z.string().min(1),
|
|
225
|
+
company: z.string().optional(),
|
|
226
|
+
quote: z.string(),
|
|
227
|
+
rating: z.number().min(1).max(5),
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
const jsonSchema = z.toJSONSchema(Testimonial);
|
|
231
|
+
const reconstructed = z.fromJSONSchema(jsonSchema);
|
|
232
|
+
|
|
233
|
+
const validTestimonial = {
|
|
234
|
+
author: "John Doe",
|
|
235
|
+
quote: "Great service!",
|
|
236
|
+
rating: 5,
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
expect(reconstructed.safeParse(validTestimonial).success).toBe(true);
|
|
240
|
+
expect(
|
|
241
|
+
reconstructed.safeParse({ ...validTestimonial, company: "Acme Inc" })
|
|
242
|
+
.success,
|
|
243
|
+
).toBe(true);
|
|
244
|
+
expect(
|
|
245
|
+
reconstructed.safeParse({ ...validTestimonial, rating: 6 }).success,
|
|
246
|
+
).toBe(false);
|
|
247
|
+
});
|
|
248
|
+
});
|
|
249
|
+
|
|
250
|
+
describe("JSON serialization and storage", () => {
|
|
251
|
+
it("schema can be stringified and parsed back", () => {
|
|
252
|
+
const original = z.object({
|
|
253
|
+
name: z.string().min(1),
|
|
254
|
+
count: z.number().min(0),
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
const jsonSchema = z.toJSONSchema(original);
|
|
258
|
+
const stringified = JSON.stringify(jsonSchema);
|
|
259
|
+
const parsed = JSON.parse(stringified);
|
|
260
|
+
const reconstructed = z.fromJSONSchema(parsed);
|
|
261
|
+
|
|
262
|
+
expect(reconstructed.safeParse({ name: "test", count: 5 }).success).toBe(
|
|
263
|
+
true,
|
|
264
|
+
);
|
|
265
|
+
expect(reconstructed.safeParse({ name: "", count: 5 }).success).toBe(
|
|
266
|
+
false,
|
|
267
|
+
);
|
|
268
|
+
});
|
|
269
|
+
|
|
270
|
+
it("simulates database storage flow", () => {
|
|
271
|
+
// This test simulates the full CMS flow:
|
|
272
|
+
// 1. Developer defines Zod schema
|
|
273
|
+
// 2. Backend converts to JSON Schema and stores in DB
|
|
274
|
+
// 3. Client fetches JSON Schema and reconstructs Zod for validation
|
|
275
|
+
|
|
276
|
+
// Step 1: Developer defines schema
|
|
277
|
+
const ProductSchema = z.object({
|
|
278
|
+
name: z.string().min(1).meta({ description: "Product name" }),
|
|
279
|
+
price: z.number().min(0),
|
|
280
|
+
category: z.enum(["Electronics", "Clothing"]),
|
|
281
|
+
});
|
|
282
|
+
|
|
283
|
+
// Step 2: Convert to JSON Schema and stringify for DB storage
|
|
284
|
+
const jsonSchema = z.toJSONSchema(ProductSchema);
|
|
285
|
+
const dbStoredString = JSON.stringify(jsonSchema);
|
|
286
|
+
|
|
287
|
+
// Step 3: Client fetches and reconstructs using native Zod v4
|
|
288
|
+
const fetchedJsonSchema = JSON.parse(dbStoredString);
|
|
289
|
+
const clientSchema = z.fromJSONSchema(fetchedJsonSchema);
|
|
290
|
+
|
|
291
|
+
// Validate data
|
|
292
|
+
const validData = { name: "Laptop", price: 999, category: "Electronics" };
|
|
293
|
+
const invalidData = { name: "", price: -1, category: "Invalid" };
|
|
294
|
+
|
|
295
|
+
expect(clientSchema.safeParse(validData).success).toBe(true);
|
|
296
|
+
expect(clientSchema.safeParse(invalidData).success).toBe(false);
|
|
297
|
+
|
|
298
|
+
// Description is still accessible from the JSON Schema for UI
|
|
299
|
+
const props = (
|
|
300
|
+
fetchedJsonSchema as {
|
|
301
|
+
properties?: { name?: { description?: string } };
|
|
302
|
+
}
|
|
303
|
+
).properties;
|
|
304
|
+
expect(props?.name?.description).toBe("Product name");
|
|
305
|
+
});
|
|
306
|
+
});
|
|
307
|
+
|
|
308
|
+
describe("Field config extraction for AutoForm", () => {
|
|
309
|
+
it("can extract descriptions from JSON Schema for fieldConfig", () => {
|
|
310
|
+
const schema = z.object({
|
|
311
|
+
name: z.string().meta({ description: "Enter the product name" }),
|
|
312
|
+
price: z.number().meta({ description: "Price in USD" }),
|
|
313
|
+
});
|
|
314
|
+
|
|
315
|
+
const jsonSchema = z.toJSONSchema(schema) as {
|
|
316
|
+
properties?: Record<string, { description?: string }>;
|
|
317
|
+
};
|
|
318
|
+
|
|
319
|
+
// Function to extract fieldConfig from JSON Schema
|
|
320
|
+
function extractFieldConfig(
|
|
321
|
+
js: typeof jsonSchema,
|
|
322
|
+
): Record<string, { description?: string }> {
|
|
323
|
+
const config: Record<string, { description?: string }> = {};
|
|
324
|
+
if (js.properties) {
|
|
325
|
+
for (const [key, value] of Object.entries(js.properties)) {
|
|
326
|
+
if (value.description) {
|
|
327
|
+
config[key] = { description: value.description };
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
return config;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
const fieldConfig = extractFieldConfig(jsonSchema);
|
|
335
|
+
|
|
336
|
+
expect(fieldConfig.name?.description).toBe("Enter the product name");
|
|
337
|
+
expect(fieldConfig.price?.description).toBe("Price in USD");
|
|
338
|
+
});
|
|
339
|
+
});
|
|
340
|
+
|
|
341
|
+
describe("AutoForm schema generation and data shape", () => {
|
|
342
|
+
/**
|
|
343
|
+
* Helper function to convert JSON Schema to Zod with coercion for AutoForm
|
|
344
|
+
* This mimics the client-side conversion used in content-form.tsx
|
|
345
|
+
*/
|
|
346
|
+
interface JsonSchemaProperty {
|
|
347
|
+
type?: string | string[];
|
|
348
|
+
format?: string;
|
|
349
|
+
enum?: (string | number | boolean)[];
|
|
350
|
+
minimum?: number;
|
|
351
|
+
maximum?: number;
|
|
352
|
+
minLength?: number;
|
|
353
|
+
maxLength?: number;
|
|
354
|
+
default?: unknown;
|
|
355
|
+
description?: string;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
interface JsonSchema {
|
|
359
|
+
type?: string;
|
|
360
|
+
properties?: Record<string, JsonSchemaProperty>;
|
|
361
|
+
required?: string[];
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
function jsonSchemaToZodWithCoercion(
|
|
365
|
+
jsonSchema: JsonSchema,
|
|
366
|
+
): z.ZodObject<Record<string, z.ZodTypeAny>> {
|
|
367
|
+
const shape: Record<string, z.ZodTypeAny> = {};
|
|
368
|
+
const properties = jsonSchema.properties || {};
|
|
369
|
+
const required = jsonSchema.required || [];
|
|
370
|
+
|
|
371
|
+
for (const [key, prop] of Object.entries(properties)) {
|
|
372
|
+
let fieldSchema: z.ZodTypeAny;
|
|
373
|
+
|
|
374
|
+
if (prop.enum && Array.isArray(prop.enum) && prop.enum.length > 0) {
|
|
375
|
+
const stringValues = prop.enum.filter(
|
|
376
|
+
(v): v is string => typeof v === "string",
|
|
377
|
+
);
|
|
378
|
+
if (stringValues.length > 0) {
|
|
379
|
+
fieldSchema = z.enum(stringValues as [string, ...string[]]);
|
|
380
|
+
} else {
|
|
381
|
+
fieldSchema = z.string();
|
|
382
|
+
}
|
|
383
|
+
} else {
|
|
384
|
+
const typeValue = Array.isArray(prop.type) ? prop.type[0] : prop.type;
|
|
385
|
+
|
|
386
|
+
switch (typeValue) {
|
|
387
|
+
case "number":
|
|
388
|
+
case "integer": {
|
|
389
|
+
let numSchema = z.coerce.number();
|
|
390
|
+
if (prop.minimum !== undefined) {
|
|
391
|
+
numSchema = numSchema.min(prop.minimum);
|
|
392
|
+
}
|
|
393
|
+
if (prop.maximum !== undefined) {
|
|
394
|
+
numSchema = numSchema.max(prop.maximum);
|
|
395
|
+
}
|
|
396
|
+
fieldSchema = numSchema;
|
|
397
|
+
break;
|
|
398
|
+
}
|
|
399
|
+
case "boolean": {
|
|
400
|
+
fieldSchema = z.boolean();
|
|
401
|
+
if (prop.default !== undefined) {
|
|
402
|
+
fieldSchema = (fieldSchema as z.ZodBoolean).default(
|
|
403
|
+
prop.default as boolean,
|
|
404
|
+
);
|
|
405
|
+
}
|
|
406
|
+
break;
|
|
407
|
+
}
|
|
408
|
+
case "string": {
|
|
409
|
+
if (prop.format === "date" || prop.format === "date-time") {
|
|
410
|
+
fieldSchema = z.coerce.date();
|
|
411
|
+
} else {
|
|
412
|
+
let strSchema = z.string();
|
|
413
|
+
if (prop.minLength !== undefined) {
|
|
414
|
+
strSchema = strSchema.min(prop.minLength);
|
|
415
|
+
}
|
|
416
|
+
if (prop.maxLength !== undefined) {
|
|
417
|
+
strSchema = strSchema.max(prop.maxLength);
|
|
418
|
+
}
|
|
419
|
+
fieldSchema = strSchema;
|
|
420
|
+
}
|
|
421
|
+
break;
|
|
422
|
+
}
|
|
423
|
+
default: {
|
|
424
|
+
fieldSchema = z.string();
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
if (prop.default !== undefined && prop.type !== "boolean") {
|
|
430
|
+
fieldSchema = fieldSchema.default(prop.default);
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
if (!required.includes(key)) {
|
|
434
|
+
fieldSchema = fieldSchema.optional();
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
shape[key] = fieldSchema;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
return z.object(shape);
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
it("generates correct Zod schema for AutoForm from JSON Schema", () => {
|
|
444
|
+
// Original Zod schema defined by developer
|
|
445
|
+
const ProductSchema = z.object({
|
|
446
|
+
name: z.string().min(1),
|
|
447
|
+
price: z.number().min(0),
|
|
448
|
+
category: z.enum(["Electronics", "Clothing", "Home"]),
|
|
449
|
+
});
|
|
450
|
+
|
|
451
|
+
// Convert to JSON Schema (stored in DB)
|
|
452
|
+
const jsonSchema = z.toJSONSchema(ProductSchema);
|
|
453
|
+
|
|
454
|
+
// Convert back to Zod with coercion for AutoForm
|
|
455
|
+
const autoFormSchema = jsonSchemaToZodWithCoercion(
|
|
456
|
+
jsonSchema as JsonSchema,
|
|
457
|
+
);
|
|
458
|
+
|
|
459
|
+
// Test that schema validates correct data
|
|
460
|
+
const validData = {
|
|
461
|
+
name: "Test Product",
|
|
462
|
+
price: 29.99,
|
|
463
|
+
category: "Electronics",
|
|
464
|
+
};
|
|
465
|
+
expect(autoFormSchema.safeParse(validData).success).toBe(true);
|
|
466
|
+
|
|
467
|
+
// Test that coercion works (HTML form sends strings)
|
|
468
|
+
const formDataWithStrings = {
|
|
469
|
+
name: "Test Product",
|
|
470
|
+
price: "29.99", // String from HTML input
|
|
471
|
+
category: "Electronics",
|
|
472
|
+
};
|
|
473
|
+
const coercedResult = autoFormSchema.safeParse(formDataWithStrings);
|
|
474
|
+
expect(coercedResult.success).toBe(true);
|
|
475
|
+
if (coercedResult.success) {
|
|
476
|
+
expect(coercedResult.data.price).toBe(29.99); // Coerced to number
|
|
477
|
+
expect(typeof coercedResult.data.price).toBe("number");
|
|
478
|
+
}
|
|
479
|
+
});
|
|
480
|
+
|
|
481
|
+
it("validates data shape returned from AutoForm submission", () => {
|
|
482
|
+
const TestimonialSchema = z.object({
|
|
483
|
+
author: z.string().min(1),
|
|
484
|
+
company: z.string().optional(),
|
|
485
|
+
quote: z.string(),
|
|
486
|
+
rating: z.number().min(1).max(5),
|
|
487
|
+
});
|
|
488
|
+
|
|
489
|
+
const jsonSchema = z.toJSONSchema(TestimonialSchema);
|
|
490
|
+
const autoFormSchema = jsonSchemaToZodWithCoercion(
|
|
491
|
+
jsonSchema as JsonSchema,
|
|
492
|
+
);
|
|
493
|
+
|
|
494
|
+
// Simulate form submission data (all strings from HTML form)
|
|
495
|
+
const formSubmission = {
|
|
496
|
+
author: "John Doe",
|
|
497
|
+
quote: "Great product!",
|
|
498
|
+
rating: "5", // String from HTML input
|
|
499
|
+
};
|
|
500
|
+
|
|
501
|
+
const result = autoFormSchema.safeParse(formSubmission);
|
|
502
|
+
expect(result.success).toBe(true);
|
|
503
|
+
|
|
504
|
+
if (result.success) {
|
|
505
|
+
// Verify data shape
|
|
506
|
+
expect(result.data).toEqual({
|
|
507
|
+
author: "John Doe",
|
|
508
|
+
quote: "Great product!",
|
|
509
|
+
rating: 5, // Coerced to number
|
|
510
|
+
});
|
|
511
|
+
}
|
|
512
|
+
});
|
|
513
|
+
|
|
514
|
+
it("preserves validation rules through roundtrip", () => {
|
|
515
|
+
const schema = z.object({
|
|
516
|
+
name: z.string().min(1).max(100),
|
|
517
|
+
price: z.number().min(0).max(10000),
|
|
518
|
+
rating: z.number().min(1).max(5),
|
|
519
|
+
});
|
|
520
|
+
|
|
521
|
+
const jsonSchema = z.toJSONSchema(schema);
|
|
522
|
+
const autoFormSchema = jsonSchemaToZodWithCoercion(
|
|
523
|
+
jsonSchema as JsonSchema,
|
|
524
|
+
);
|
|
525
|
+
|
|
526
|
+
// Test min validation
|
|
527
|
+
expect(
|
|
528
|
+
autoFormSchema.safeParse({ name: "", price: "10", rating: "3" })
|
|
529
|
+
.success,
|
|
530
|
+
).toBe(false);
|
|
531
|
+
|
|
532
|
+
// Test max validation
|
|
533
|
+
expect(
|
|
534
|
+
autoFormSchema.safeParse({
|
|
535
|
+
name: "a".repeat(101),
|
|
536
|
+
price: "10",
|
|
537
|
+
rating: "3",
|
|
538
|
+
}).success,
|
|
539
|
+
).toBe(false);
|
|
540
|
+
|
|
541
|
+
// Test number min validation
|
|
542
|
+
expect(
|
|
543
|
+
autoFormSchema.safeParse({ name: "Test", price: "-1", rating: "3" })
|
|
544
|
+
.success,
|
|
545
|
+
).toBe(false);
|
|
546
|
+
|
|
547
|
+
// Test number max validation
|
|
548
|
+
expect(
|
|
549
|
+
autoFormSchema.safeParse({ name: "Test", price: "10", rating: "6" })
|
|
550
|
+
.success,
|
|
551
|
+
).toBe(false);
|
|
552
|
+
|
|
553
|
+
// Test valid data
|
|
554
|
+
expect(
|
|
555
|
+
autoFormSchema.safeParse({ name: "Test", price: "50", rating: "4" })
|
|
556
|
+
.success,
|
|
557
|
+
).toBe(true);
|
|
558
|
+
});
|
|
559
|
+
|
|
560
|
+
it("handles enum validation correctly", () => {
|
|
561
|
+
const schema = z.object({
|
|
562
|
+
status: z.enum(["draft", "published", "archived"]),
|
|
563
|
+
});
|
|
564
|
+
|
|
565
|
+
const jsonSchema = z.toJSONSchema(schema);
|
|
566
|
+
const autoFormSchema = jsonSchemaToZodWithCoercion(
|
|
567
|
+
jsonSchema as JsonSchema,
|
|
568
|
+
);
|
|
569
|
+
|
|
570
|
+
// Valid enum values
|
|
571
|
+
expect(autoFormSchema.safeParse({ status: "draft" }).success).toBe(true);
|
|
572
|
+
expect(autoFormSchema.safeParse({ status: "published" }).success).toBe(
|
|
573
|
+
true,
|
|
574
|
+
);
|
|
575
|
+
expect(autoFormSchema.safeParse({ status: "archived" }).success).toBe(
|
|
576
|
+
true,
|
|
577
|
+
);
|
|
578
|
+
|
|
579
|
+
// Invalid enum value
|
|
580
|
+
expect(autoFormSchema.safeParse({ status: "invalid" }).success).toBe(
|
|
581
|
+
false,
|
|
582
|
+
);
|
|
583
|
+
});
|
|
584
|
+
|
|
585
|
+
it("handles optional fields correctly", () => {
|
|
586
|
+
const schema = z.object({
|
|
587
|
+
required: z.string().min(1),
|
|
588
|
+
optional: z.string().optional(),
|
|
589
|
+
});
|
|
590
|
+
|
|
591
|
+
const jsonSchema = z.toJSONSchema(schema);
|
|
592
|
+
const autoFormSchema = jsonSchemaToZodWithCoercion(
|
|
593
|
+
jsonSchema as JsonSchema,
|
|
594
|
+
);
|
|
595
|
+
|
|
596
|
+
// Without optional field
|
|
597
|
+
expect(autoFormSchema.safeParse({ required: "test" }).success).toBe(true);
|
|
598
|
+
|
|
599
|
+
// With optional field
|
|
600
|
+
expect(
|
|
601
|
+
autoFormSchema.safeParse({ required: "test", optional: "value" })
|
|
602
|
+
.success,
|
|
603
|
+
).toBe(true);
|
|
604
|
+
|
|
605
|
+
// Missing required field
|
|
606
|
+
expect(autoFormSchema.safeParse({ optional: "value" }).success).toBe(
|
|
607
|
+
false,
|
|
608
|
+
);
|
|
609
|
+
});
|
|
610
|
+
});
|
|
611
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { cmsBackendPlugin, type CMSApiRouter } from "./plugin";
|