@btst/stack 1.4.1 → 1.5.1
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-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-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 +7 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-interface.mjs +7 -0
- 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/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/pages/edit-post-page.internal.cjs +7 -6
- package/dist/packages/better-stack/src/plugins/blog/client/components/pages/edit-post-page.internal.mjs +7 -6
- package/dist/packages/better-stack/src/plugins/blog/client/components/pages/home-page.internal.cjs +9 -7
- package/dist/packages/better-stack/src/plugins/blog/client/components/pages/home-page.internal.mjs +9 -7
- package/dist/packages/better-stack/src/plugins/blog/client/components/pages/new-post-page.internal.cjs +7 -6
- package/dist/packages/better-stack/src/plugins/blog/client/components/pages/new-post-page.internal.mjs +7 -6
- package/dist/packages/better-stack/src/plugins/blog/client/components/pages/post-page.internal.cjs +7 -5
- package/dist/packages/better-stack/src/plugins/blog/client/components/pages/post-page.internal.mjs +7 -5
- package/dist/packages/better-stack/src/plugins/blog/client/components/pages/tag-page.internal.cjs +5 -3
- package/dist/packages/better-stack/src/plugins/blog/client/components/pages/tag-page.internal.mjs +5 -3
- 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/client/plugin.cjs +6 -6
- package/dist/packages/better-stack/src/plugins/blog/client/plugin.mjs +6 -6
- 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 +100 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-editor-page.internal.mjs +98 -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 +165 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-list-page.internal.mjs +163 -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 +84 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/dashboard-page.internal.mjs +82 -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 +275 -0
- package/dist/packages/better-stack/src/plugins/cms/client/plugin.mjs +273 -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/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/packages/{better-stack/src/plugins/blog/client/components/shared → ui/src/hooks}/use-route-lifecycle.cjs +8 -9
- package/dist/packages/{better-stack/src/plugins/blog/client/components/shared → ui/src/hooks}/use-route-lifecycle.mjs +1 -2
- 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/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/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/api/index.d.cts +1 -1
- package/dist/plugins/blog/api/index.d.mts +1 -1
- package/dist/plugins/blog/api/index.d.ts +1 -1
- package/dist/plugins/blog/client/hooks/index.d.cts +2 -2
- package/dist/plugins/blog/client/hooks/index.d.mts +2 -2
- package/dist/plugins/blog/client/hooks/index.d.ts +2 -2
- package/dist/plugins/blog/client/index.d.cts +1 -1
- package/dist/plugins/blog/client/index.d.mts +1 -1
- package/dist/plugins/blog/client/index.d.ts +1 -1
- package/dist/plugins/blog/query-keys.d.cts +103 -363
- package/dist/plugins/blog/query-keys.d.mts +103 -363
- package/dist/plugins/blog/query-keys.d.ts +103 -363
- 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 +409 -0
- package/dist/plugins/cms/client/index.d.mts +409 -0
- package/dist/plugins/cms/client/index.d.ts +409 -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.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 +15 -0
- package/src/plugins/ai-chat/client/components/chat-sidebar.tsx +4 -1
- 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/pages/edit-post-page.internal.tsx +4 -3
- package/src/plugins/blog/client/components/pages/home-page.internal.tsx +4 -2
- package/src/plugins/blog/client/components/pages/new-post-page.internal.tsx +4 -3
- package/src/plugins/blog/client/components/pages/post-page.internal.tsx +4 -2
- package/src/plugins/blog/client/components/pages/tag-page.internal.tsx +4 -2
- package/src/plugins/blog/client/components/shared/page-wrapper.tsx +9 -9
- package/src/plugins/blog/client/plugin.tsx +10 -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 +139 -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 +213 -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 +111 -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 +494 -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/src/plugins/blog/client/components/shared/page-layout.tsx +0 -23
- package/src/plugins/blog/client/components/shared/use-route-lifecycle.tsx +0 -68
- package/dist/shared/{stack.CcI4sYJP.d.cts → stack.DLhzx1-D.d.cts} +1 -1
- package/dist/shared/{stack.CcI4sYJP.d.mts → stack.DLhzx1-D.d.mts} +1 -1
- package/dist/shared/{stack.CcI4sYJP.d.ts → stack.DLhzx1-D.d.ts} +1 -1
|
@@ -0,0 +1,457 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const api = require('@btst/stack/plugins/api');
|
|
4
|
+
const z = require('zod');
|
|
5
|
+
const db = require('../db.cjs');
|
|
6
|
+
const schemas = require('../schemas.cjs');
|
|
7
|
+
const utils = require('../utils.cjs');
|
|
8
|
+
|
|
9
|
+
function serializeContentType(ct) {
|
|
10
|
+
return {
|
|
11
|
+
...ct,
|
|
12
|
+
createdAt: ct.createdAt.toISOString(),
|
|
13
|
+
updatedAt: ct.updatedAt.toISOString()
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function serializeContentItem(item) {
|
|
17
|
+
return {
|
|
18
|
+
...item,
|
|
19
|
+
createdAt: item.createdAt.toISOString(),
|
|
20
|
+
updatedAt: item.updatedAt.toISOString()
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function serializeContentItemWithType(item) {
|
|
24
|
+
return {
|
|
25
|
+
...serializeContentItem(item),
|
|
26
|
+
parsedData: JSON.parse(item.data),
|
|
27
|
+
contentType: item.contentType ? serializeContentType(item.contentType) : void 0
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
async function syncContentTypes(adapter, config) {
|
|
31
|
+
for (const ct of config.contentTypes) {
|
|
32
|
+
const jsonSchema = JSON.stringify(z.z.toJSONSchema(ct.schema));
|
|
33
|
+
const fieldConfig = ct.fieldConfig ? JSON.stringify(ct.fieldConfig) : null;
|
|
34
|
+
const existing = await adapter.findOne({
|
|
35
|
+
model: "contentType",
|
|
36
|
+
where: [{ field: "slug", value: ct.slug, operator: "eq" }]
|
|
37
|
+
});
|
|
38
|
+
if (existing) {
|
|
39
|
+
await adapter.update({
|
|
40
|
+
model: "contentType",
|
|
41
|
+
where: [{ field: "id", value: existing.id, operator: "eq" }],
|
|
42
|
+
update: {
|
|
43
|
+
name: ct.name,
|
|
44
|
+
description: ct.description ?? null,
|
|
45
|
+
jsonSchema,
|
|
46
|
+
fieldConfig,
|
|
47
|
+
updatedAt: /* @__PURE__ */ new Date()
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
} else {
|
|
51
|
+
try {
|
|
52
|
+
await adapter.create({
|
|
53
|
+
model: "contentType",
|
|
54
|
+
data: {
|
|
55
|
+
name: ct.name,
|
|
56
|
+
slug: ct.slug,
|
|
57
|
+
description: ct.description ?? null,
|
|
58
|
+
jsonSchema,
|
|
59
|
+
fieldConfig,
|
|
60
|
+
createdAt: /* @__PURE__ */ new Date(),
|
|
61
|
+
updatedAt: /* @__PURE__ */ new Date()
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
} catch (err) {
|
|
65
|
+
const nowExists = await adapter.findOne({
|
|
66
|
+
model: "contentType",
|
|
67
|
+
where: [{ field: "slug", value: ct.slug, operator: "eq" }]
|
|
68
|
+
});
|
|
69
|
+
if (nowExists) {
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
const message = err instanceof Error ? err.message : "Unknown database error";
|
|
73
|
+
throw new Error(
|
|
74
|
+
`Failed to create content type "${ct.slug}": ${message}`
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
function getContentTypeZodSchema(contentType) {
|
|
81
|
+
const jsonSchema = JSON.parse(contentType.jsonSchema);
|
|
82
|
+
return z.z.fromJSONSchema(jsonSchema);
|
|
83
|
+
}
|
|
84
|
+
const cmsBackendPlugin = (config) => api.defineBackendPlugin({
|
|
85
|
+
name: "cms",
|
|
86
|
+
dbPlugin: db.cmsSchema,
|
|
87
|
+
routes: (adapter) => {
|
|
88
|
+
let syncPromise = null;
|
|
89
|
+
const ensureSynced = async () => {
|
|
90
|
+
if (!syncPromise) {
|
|
91
|
+
syncPromise = syncContentTypes(adapter, config).catch((err) => {
|
|
92
|
+
syncPromise = null;
|
|
93
|
+
throw err;
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
await syncPromise;
|
|
97
|
+
};
|
|
98
|
+
const getContentType = async (slug) => {
|
|
99
|
+
await ensureSynced();
|
|
100
|
+
return adapter.findOne({
|
|
101
|
+
model: "contentType",
|
|
102
|
+
where: [{ field: "slug", value: slug, operator: "eq" }]
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
const createContext = (typeSlug, headers) => ({
|
|
106
|
+
typeSlug,
|
|
107
|
+
headers
|
|
108
|
+
});
|
|
109
|
+
const listContentTypes = api.createEndpoint(
|
|
110
|
+
"/content-types",
|
|
111
|
+
{ method: "GET" },
|
|
112
|
+
async (ctx) => {
|
|
113
|
+
await ensureSynced();
|
|
114
|
+
const contentTypes = await adapter.findMany({
|
|
115
|
+
model: "contentType",
|
|
116
|
+
sortBy: { field: "name", direction: "asc" }
|
|
117
|
+
});
|
|
118
|
+
const typesWithCounts = await Promise.all(
|
|
119
|
+
contentTypes.map(async (ct) => {
|
|
120
|
+
const items = await adapter.findMany({
|
|
121
|
+
model: "contentItem",
|
|
122
|
+
where: [
|
|
123
|
+
{
|
|
124
|
+
field: "contentTypeId",
|
|
125
|
+
value: ct.id,
|
|
126
|
+
operator: "eq"
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
});
|
|
130
|
+
return {
|
|
131
|
+
...serializeContentType(ct),
|
|
132
|
+
itemCount: items.length
|
|
133
|
+
};
|
|
134
|
+
})
|
|
135
|
+
);
|
|
136
|
+
return typesWithCounts;
|
|
137
|
+
}
|
|
138
|
+
);
|
|
139
|
+
const getContentTypeBySlug = api.createEndpoint(
|
|
140
|
+
"/content-types/:slug",
|
|
141
|
+
{
|
|
142
|
+
method: "GET",
|
|
143
|
+
params: z.z.object({ slug: z.z.string() })
|
|
144
|
+
},
|
|
145
|
+
async (ctx) => {
|
|
146
|
+
const { slug } = ctx.params;
|
|
147
|
+
const contentType = await getContentType(slug);
|
|
148
|
+
if (!contentType) {
|
|
149
|
+
throw ctx.error(404, { message: "Content type not found" });
|
|
150
|
+
}
|
|
151
|
+
return serializeContentType(contentType);
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
const listContentItems = api.createEndpoint(
|
|
155
|
+
"/content/:typeSlug",
|
|
156
|
+
{
|
|
157
|
+
method: "GET",
|
|
158
|
+
params: z.z.object({ typeSlug: z.z.string() }),
|
|
159
|
+
query: schemas.listContentQuerySchema
|
|
160
|
+
},
|
|
161
|
+
async (ctx) => {
|
|
162
|
+
const { typeSlug } = ctx.params;
|
|
163
|
+
const { slug, limit, offset } = ctx.query;
|
|
164
|
+
const contentType = await getContentType(typeSlug);
|
|
165
|
+
if (!contentType) {
|
|
166
|
+
throw ctx.error(404, { message: "Content type not found" });
|
|
167
|
+
}
|
|
168
|
+
const whereConditions = [
|
|
169
|
+
{
|
|
170
|
+
field: "contentTypeId",
|
|
171
|
+
value: contentType.id,
|
|
172
|
+
operator: "eq"
|
|
173
|
+
}
|
|
174
|
+
];
|
|
175
|
+
if (slug) {
|
|
176
|
+
whereConditions.push({
|
|
177
|
+
field: "slug",
|
|
178
|
+
value: slug,
|
|
179
|
+
operator: "eq"
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
const allItems = await adapter.findMany({
|
|
183
|
+
model: "contentItem",
|
|
184
|
+
where: whereConditions
|
|
185
|
+
});
|
|
186
|
+
const total = allItems.length;
|
|
187
|
+
const items = await adapter.findMany({
|
|
188
|
+
model: "contentItem",
|
|
189
|
+
where: whereConditions,
|
|
190
|
+
limit,
|
|
191
|
+
offset,
|
|
192
|
+
sortBy: { field: "createdAt", direction: "desc" },
|
|
193
|
+
join: { contentType: true }
|
|
194
|
+
});
|
|
195
|
+
return {
|
|
196
|
+
items: items.map(serializeContentItemWithType),
|
|
197
|
+
total,
|
|
198
|
+
limit,
|
|
199
|
+
offset
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
);
|
|
203
|
+
const getContentItem = api.createEndpoint(
|
|
204
|
+
"/content/:typeSlug/:id",
|
|
205
|
+
{
|
|
206
|
+
method: "GET",
|
|
207
|
+
params: z.z.object({ typeSlug: z.z.string(), id: z.z.string() })
|
|
208
|
+
},
|
|
209
|
+
async (ctx) => {
|
|
210
|
+
const { typeSlug, id } = ctx.params;
|
|
211
|
+
const contentType = await getContentType(typeSlug);
|
|
212
|
+
if (!contentType) {
|
|
213
|
+
throw ctx.error(404, { message: "Content type not found" });
|
|
214
|
+
}
|
|
215
|
+
const item = await adapter.findOne({
|
|
216
|
+
model: "contentItem",
|
|
217
|
+
where: [{ field: "id", value: id, operator: "eq" }],
|
|
218
|
+
join: { contentType: true }
|
|
219
|
+
});
|
|
220
|
+
if (!item || item.contentTypeId !== contentType.id) {
|
|
221
|
+
throw ctx.error(404, { message: "Content item not found" });
|
|
222
|
+
}
|
|
223
|
+
return serializeContentItemWithType(item);
|
|
224
|
+
}
|
|
225
|
+
);
|
|
226
|
+
const createContentItem = api.createEndpoint(
|
|
227
|
+
"/content/:typeSlug",
|
|
228
|
+
{
|
|
229
|
+
method: "POST",
|
|
230
|
+
params: z.z.object({ typeSlug: z.z.string() }),
|
|
231
|
+
body: z.z.object({
|
|
232
|
+
slug: z.z.string().min(1),
|
|
233
|
+
// Use passthrough object instead of z.record(z.unknown()) due to Zod v4 bug
|
|
234
|
+
data: z.z.object({}).passthrough()
|
|
235
|
+
})
|
|
236
|
+
},
|
|
237
|
+
async (ctx) => {
|
|
238
|
+
const { typeSlug } = ctx.params;
|
|
239
|
+
const { slug: rawSlug, data } = ctx.body;
|
|
240
|
+
const context = createContext(typeSlug, ctx.headers);
|
|
241
|
+
const slug = utils.slugify(rawSlug);
|
|
242
|
+
if (!slug) {
|
|
243
|
+
throw ctx.error(400, {
|
|
244
|
+
message: "Invalid slug: must contain at least one alphanumeric character"
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
const contentType = await getContentType(typeSlug);
|
|
248
|
+
if (!contentType) {
|
|
249
|
+
throw ctx.error(404, { message: "Content type not found" });
|
|
250
|
+
}
|
|
251
|
+
const zodSchema = getContentTypeZodSchema(contentType);
|
|
252
|
+
const validation = zodSchema.safeParse(data);
|
|
253
|
+
if (!validation.success) {
|
|
254
|
+
throw ctx.error(400, {
|
|
255
|
+
message: "Validation failed",
|
|
256
|
+
errors: validation.error.issues
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
const existing = await adapter.findOne({
|
|
260
|
+
model: "contentItem",
|
|
261
|
+
where: [
|
|
262
|
+
{
|
|
263
|
+
field: "contentTypeId",
|
|
264
|
+
value: contentType.id,
|
|
265
|
+
operator: "eq"
|
|
266
|
+
},
|
|
267
|
+
{ field: "slug", value: slug, operator: "eq" }
|
|
268
|
+
]
|
|
269
|
+
});
|
|
270
|
+
if (existing) {
|
|
271
|
+
throw ctx.error(409, {
|
|
272
|
+
message: "Content item with this slug already exists"
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
let finalData = validation.data;
|
|
276
|
+
if (config.hooks?.onBeforeCreate) {
|
|
277
|
+
const result = await config.hooks.onBeforeCreate(
|
|
278
|
+
validation.data,
|
|
279
|
+
context
|
|
280
|
+
);
|
|
281
|
+
if (result === false) {
|
|
282
|
+
throw ctx.error(403, { message: "Create operation denied" });
|
|
283
|
+
}
|
|
284
|
+
if (result && typeof result === "object") {
|
|
285
|
+
finalData = result;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
const item = await adapter.create({
|
|
289
|
+
model: "contentItem",
|
|
290
|
+
data: {
|
|
291
|
+
contentTypeId: contentType.id,
|
|
292
|
+
slug,
|
|
293
|
+
data: JSON.stringify(finalData),
|
|
294
|
+
createdAt: /* @__PURE__ */ new Date(),
|
|
295
|
+
updatedAt: /* @__PURE__ */ new Date()
|
|
296
|
+
}
|
|
297
|
+
});
|
|
298
|
+
const serialized = serializeContentItem(item);
|
|
299
|
+
if (config.hooks?.onAfterCreate) {
|
|
300
|
+
await config.hooks.onAfterCreate(serialized, context);
|
|
301
|
+
}
|
|
302
|
+
return {
|
|
303
|
+
...serialized,
|
|
304
|
+
parsedData: finalData
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
);
|
|
308
|
+
const updateContentItem = api.createEndpoint(
|
|
309
|
+
"/content/:typeSlug/:id",
|
|
310
|
+
{
|
|
311
|
+
method: "PUT",
|
|
312
|
+
params: z.z.object({ typeSlug: z.z.string(), id: z.z.string() }),
|
|
313
|
+
body: z.z.object({
|
|
314
|
+
slug: z.z.string().min(1).optional(),
|
|
315
|
+
// Use passthrough object instead of z.record(z.unknown()) due to Zod v4 bug
|
|
316
|
+
data: z.z.object({}).passthrough().optional()
|
|
317
|
+
})
|
|
318
|
+
},
|
|
319
|
+
async (ctx) => {
|
|
320
|
+
const { typeSlug, id } = ctx.params;
|
|
321
|
+
const { slug: rawSlug, data } = ctx.body;
|
|
322
|
+
const context = createContext(typeSlug, ctx.headers);
|
|
323
|
+
const slug = rawSlug ? utils.slugify(rawSlug) : void 0;
|
|
324
|
+
if (rawSlug && !slug) {
|
|
325
|
+
throw ctx.error(400, {
|
|
326
|
+
message: "Invalid slug: must contain at least one alphanumeric character"
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
const contentType = await getContentType(typeSlug);
|
|
330
|
+
if (!contentType) {
|
|
331
|
+
throw ctx.error(404, { message: "Content type not found" });
|
|
332
|
+
}
|
|
333
|
+
const existing = await adapter.findOne({
|
|
334
|
+
model: "contentItem",
|
|
335
|
+
where: [{ field: "id", value: id, operator: "eq" }]
|
|
336
|
+
});
|
|
337
|
+
if (!existing || existing.contentTypeId !== contentType.id) {
|
|
338
|
+
throw ctx.error(404, { message: "Content item not found" });
|
|
339
|
+
}
|
|
340
|
+
if (slug && slug !== existing.slug) {
|
|
341
|
+
const duplicate = await adapter.findOne({
|
|
342
|
+
model: "contentItem",
|
|
343
|
+
where: [
|
|
344
|
+
{
|
|
345
|
+
field: "contentTypeId",
|
|
346
|
+
value: contentType.id,
|
|
347
|
+
operator: "eq"
|
|
348
|
+
},
|
|
349
|
+
{ field: "slug", value: slug, operator: "eq" }
|
|
350
|
+
]
|
|
351
|
+
});
|
|
352
|
+
if (duplicate) {
|
|
353
|
+
throw ctx.error(409, {
|
|
354
|
+
message: "Content item with this slug already exists"
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
let validatedData = data;
|
|
359
|
+
if (data) {
|
|
360
|
+
const zodSchema = getContentTypeZodSchema(contentType);
|
|
361
|
+
const validation = zodSchema.safeParse(data);
|
|
362
|
+
if (!validation.success) {
|
|
363
|
+
throw ctx.error(400, {
|
|
364
|
+
message: "Validation failed",
|
|
365
|
+
errors: validation.error.issues
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
validatedData = validation.data;
|
|
369
|
+
}
|
|
370
|
+
let finalData = validatedData;
|
|
371
|
+
if (config.hooks?.onBeforeUpdate && validatedData) {
|
|
372
|
+
const result = await config.hooks.onBeforeUpdate(
|
|
373
|
+
id,
|
|
374
|
+
validatedData,
|
|
375
|
+
context
|
|
376
|
+
);
|
|
377
|
+
if (result === false) {
|
|
378
|
+
throw ctx.error(403, { message: "Update operation denied" });
|
|
379
|
+
}
|
|
380
|
+
if (result && typeof result === "object") {
|
|
381
|
+
finalData = result;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
const updateData = {
|
|
385
|
+
updatedAt: /* @__PURE__ */ new Date()
|
|
386
|
+
};
|
|
387
|
+
if (slug) updateData.slug = slug;
|
|
388
|
+
if (finalData) updateData.data = JSON.stringify(finalData);
|
|
389
|
+
await adapter.update({
|
|
390
|
+
model: "contentItem",
|
|
391
|
+
where: [{ field: "id", value: id, operator: "eq" }],
|
|
392
|
+
update: updateData
|
|
393
|
+
});
|
|
394
|
+
const updated = await adapter.findOne({
|
|
395
|
+
model: "contentItem",
|
|
396
|
+
where: [{ field: "id", value: id, operator: "eq" }],
|
|
397
|
+
join: { contentType: true }
|
|
398
|
+
});
|
|
399
|
+
if (!updated) {
|
|
400
|
+
throw ctx.error(500, { message: "Failed to fetch updated item" });
|
|
401
|
+
}
|
|
402
|
+
const serialized = serializeContentItem(updated);
|
|
403
|
+
if (config.hooks?.onAfterUpdate) {
|
|
404
|
+
await config.hooks.onAfterUpdate(serialized, context);
|
|
405
|
+
}
|
|
406
|
+
return serializeContentItemWithType(updated);
|
|
407
|
+
}
|
|
408
|
+
);
|
|
409
|
+
const deleteContentItem = api.createEndpoint(
|
|
410
|
+
"/content/:typeSlug/:id",
|
|
411
|
+
{
|
|
412
|
+
method: "DELETE",
|
|
413
|
+
params: z.z.object({ typeSlug: z.z.string(), id: z.z.string() })
|
|
414
|
+
},
|
|
415
|
+
async (ctx) => {
|
|
416
|
+
const { typeSlug, id } = ctx.params;
|
|
417
|
+
const context = createContext(typeSlug, ctx.headers);
|
|
418
|
+
const contentType = await getContentType(typeSlug);
|
|
419
|
+
if (!contentType) {
|
|
420
|
+
throw ctx.error(404, { message: "Content type not found" });
|
|
421
|
+
}
|
|
422
|
+
const existing = await adapter.findOne({
|
|
423
|
+
model: "contentItem",
|
|
424
|
+
where: [{ field: "id", value: id, operator: "eq" }]
|
|
425
|
+
});
|
|
426
|
+
if (!existing || existing.contentTypeId !== contentType.id) {
|
|
427
|
+
throw ctx.error(404, { message: "Content item not found" });
|
|
428
|
+
}
|
|
429
|
+
if (config.hooks?.onBeforeDelete) {
|
|
430
|
+
const canDelete = await config.hooks.onBeforeDelete(id, context);
|
|
431
|
+
if (!canDelete) {
|
|
432
|
+
throw ctx.error(403, { message: "Delete operation denied" });
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
await adapter.delete({
|
|
436
|
+
model: "contentItem",
|
|
437
|
+
where: [{ field: "id", value: id, operator: "eq" }]
|
|
438
|
+
});
|
|
439
|
+
if (config.hooks?.onAfterDelete) {
|
|
440
|
+
await config.hooks.onAfterDelete(id, context);
|
|
441
|
+
}
|
|
442
|
+
return { success: true };
|
|
443
|
+
}
|
|
444
|
+
);
|
|
445
|
+
return {
|
|
446
|
+
listContentTypes,
|
|
447
|
+
getContentTypeBySlug,
|
|
448
|
+
listContentItems,
|
|
449
|
+
getContentItem,
|
|
450
|
+
createContentItem,
|
|
451
|
+
updateContentItem,
|
|
452
|
+
deleteContentItem
|
|
453
|
+
};
|
|
454
|
+
}
|
|
455
|
+
});
|
|
456
|
+
|
|
457
|
+
exports.cmsBackendPlugin = cmsBackendPlugin;
|