@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,477 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useState, useMemo, useEffect } from "react";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { toast } from "sonner";
|
|
6
|
+
import AutoForm, {
|
|
7
|
+
AutoFormSubmit,
|
|
8
|
+
} from "@workspace/ui/components/ui/auto-form";
|
|
9
|
+
import type {
|
|
10
|
+
FieldConfig,
|
|
11
|
+
AutoFormInputComponentProps,
|
|
12
|
+
} from "@workspace/ui/components/ui/auto-form/types";
|
|
13
|
+
import { Input } from "@workspace/ui/components/input";
|
|
14
|
+
import { Label } from "@workspace/ui/components/label";
|
|
15
|
+
import { Badge } from "@workspace/ui/components/badge";
|
|
16
|
+
import { usePluginOverrides } from "@btst/stack/context";
|
|
17
|
+
import type { CMSPluginOverrides } from "../../overrides";
|
|
18
|
+
import type { SerializedContentType } from "../../../types";
|
|
19
|
+
import { slugify } from "../../../utils";
|
|
20
|
+
import { CMS_LOCALIZATION } from "../../localization";
|
|
21
|
+
import { CMSFileUpload } from "./file-upload";
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* JSON Schema property type definition
|
|
25
|
+
*/
|
|
26
|
+
interface JsonSchemaProperty {
|
|
27
|
+
type?: string | string[];
|
|
28
|
+
format?: string;
|
|
29
|
+
enum?: (string | number | boolean)[];
|
|
30
|
+
minimum?: number;
|
|
31
|
+
maximum?: number;
|
|
32
|
+
minLength?: number;
|
|
33
|
+
maxLength?: number;
|
|
34
|
+
default?: unknown;
|
|
35
|
+
description?: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
interface JsonSchema {
|
|
39
|
+
type?: string;
|
|
40
|
+
properties?: Record<string, JsonSchemaProperty>;
|
|
41
|
+
required?: string[];
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Convert JSON Schema to Zod schema with proper coercion for AutoForm
|
|
46
|
+
*
|
|
47
|
+
* Uses Zod v4's native z.fromJSONSchema() as a base and applies coercion
|
|
48
|
+
* where needed. AutoForm requires z.coerce.number() and z.coerce.date()
|
|
49
|
+
* for proper form handling because HTML inputs return strings.
|
|
50
|
+
*
|
|
51
|
+
* Note: We build the schema manually to ensure proper coercion support,
|
|
52
|
+
* as z.fromJSONSchema() doesn't add coercion automatically.
|
|
53
|
+
*/
|
|
54
|
+
function jsonSchemaToZodWithCoercion(
|
|
55
|
+
jsonSchema: JsonSchema,
|
|
56
|
+
): z.ZodObject<Record<string, z.ZodTypeAny>> {
|
|
57
|
+
const shape: Record<string, z.ZodTypeAny> = {};
|
|
58
|
+
const properties = jsonSchema.properties || {};
|
|
59
|
+
const required = jsonSchema.required || [];
|
|
60
|
+
|
|
61
|
+
for (const [key, prop] of Object.entries(properties)) {
|
|
62
|
+
let fieldSchema: z.ZodTypeAny;
|
|
63
|
+
|
|
64
|
+
// Determine the type (handle arrays like ["string", "null"] for nullable)
|
|
65
|
+
const typeValue = Array.isArray(prop.type) ? prop.type[0] : prop.type;
|
|
66
|
+
|
|
67
|
+
// Handle enum first - works for string enums
|
|
68
|
+
if (prop.enum && Array.isArray(prop.enum) && prop.enum.length > 0) {
|
|
69
|
+
// Filter to only string values for z.enum
|
|
70
|
+
const stringValues = prop.enum.filter(
|
|
71
|
+
(v): v is string => typeof v === "string",
|
|
72
|
+
);
|
|
73
|
+
if (stringValues.length > 0) {
|
|
74
|
+
fieldSchema = z.enum(stringValues as [string, ...string[]]);
|
|
75
|
+
} else {
|
|
76
|
+
// Fallback for non-string enums
|
|
77
|
+
fieldSchema = z.string();
|
|
78
|
+
}
|
|
79
|
+
} else {
|
|
80
|
+
switch (typeValue) {
|
|
81
|
+
case "number":
|
|
82
|
+
case "integer": {
|
|
83
|
+
// Use z.coerce.number() for proper form handling (HTML inputs return strings)
|
|
84
|
+
let numSchema = z.coerce.number();
|
|
85
|
+
if (prop.minimum !== undefined) {
|
|
86
|
+
numSchema = numSchema.min(prop.minimum);
|
|
87
|
+
}
|
|
88
|
+
if (prop.maximum !== undefined) {
|
|
89
|
+
numSchema = numSchema.max(prop.maximum);
|
|
90
|
+
}
|
|
91
|
+
fieldSchema = numSchema;
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
case "boolean": {
|
|
95
|
+
fieldSchema = z.boolean();
|
|
96
|
+
if (prop.default !== undefined) {
|
|
97
|
+
fieldSchema = (fieldSchema as z.ZodBoolean).default(
|
|
98
|
+
prop.default as boolean,
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
case "string": {
|
|
104
|
+
// Check for date format
|
|
105
|
+
if (prop.format === "date" || prop.format === "date-time") {
|
|
106
|
+
fieldSchema = z.coerce.date();
|
|
107
|
+
} else {
|
|
108
|
+
let strSchema = z.string();
|
|
109
|
+
if (prop.minLength !== undefined) {
|
|
110
|
+
strSchema = strSchema.min(prop.minLength);
|
|
111
|
+
}
|
|
112
|
+
if (prop.maxLength !== undefined) {
|
|
113
|
+
strSchema = strSchema.max(prop.maxLength);
|
|
114
|
+
}
|
|
115
|
+
fieldSchema = strSchema;
|
|
116
|
+
}
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
default: {
|
|
120
|
+
// Fallback to string for unknown types
|
|
121
|
+
fieldSchema = z.string();
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// Apply default if present and not already applied (skip for booleans which handle it above)
|
|
127
|
+
// Use typeValue to correctly handle nullable types where prop.type is an array like ["boolean", "null"]
|
|
128
|
+
if (prop.default !== undefined && typeValue !== "boolean") {
|
|
129
|
+
fieldSchema = fieldSchema.default(prop.default);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Make optional if not in required array
|
|
133
|
+
if (!required.includes(key)) {
|
|
134
|
+
fieldSchema = fieldSchema.optional();
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
shape[key] = fieldSchema;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
return z.object(shape);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
interface ContentFormProps {
|
|
144
|
+
contentType: SerializedContentType;
|
|
145
|
+
initialData?: Record<string, unknown>;
|
|
146
|
+
initialSlug?: string;
|
|
147
|
+
isEditing?: boolean;
|
|
148
|
+
onSubmit: (data: {
|
|
149
|
+
slug: string;
|
|
150
|
+
data: Record<string, unknown>;
|
|
151
|
+
}) => Promise<void>;
|
|
152
|
+
onCancel?: () => void;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Built-in AutoForm field types
|
|
157
|
+
*/
|
|
158
|
+
const BUILTIN_FIELD_TYPES = [
|
|
159
|
+
"checkbox",
|
|
160
|
+
"date",
|
|
161
|
+
"select",
|
|
162
|
+
"radio",
|
|
163
|
+
"switch",
|
|
164
|
+
"textarea",
|
|
165
|
+
"number",
|
|
166
|
+
"file",
|
|
167
|
+
"fallback",
|
|
168
|
+
] as const;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Extract field configuration from JSON Schema properties
|
|
172
|
+
* Maps description and placeholder to AutoForm's fieldConfig format
|
|
173
|
+
*
|
|
174
|
+
* @param jsonSchema - The JSON Schema from the content type
|
|
175
|
+
* @param storedFieldConfig - The stored field config from the content type
|
|
176
|
+
* @param uploadImage - The uploadImage function from overrides (for default file component)
|
|
177
|
+
* @param fieldComponents - Custom field components from overrides
|
|
178
|
+
*/
|
|
179
|
+
function buildFieldConfigFromJsonSchema(
|
|
180
|
+
jsonSchema: Record<string, unknown>,
|
|
181
|
+
storedFieldConfig?: Record<string, { fieldType?: string }>,
|
|
182
|
+
uploadImage?: (file: File) => Promise<string>,
|
|
183
|
+
fieldComponents?: Record<
|
|
184
|
+
string,
|
|
185
|
+
React.ComponentType<AutoFormInputComponentProps>
|
|
186
|
+
>,
|
|
187
|
+
): FieldConfig<Record<string, unknown>> {
|
|
188
|
+
const fieldConfig: FieldConfig<Record<string, unknown>> = {};
|
|
189
|
+
const properties = jsonSchema.properties as Record<
|
|
190
|
+
string,
|
|
191
|
+
{ description?: string; placeholder?: string }
|
|
192
|
+
>;
|
|
193
|
+
|
|
194
|
+
if (!properties) return fieldConfig;
|
|
195
|
+
|
|
196
|
+
for (const [key, value] of Object.entries(properties)) {
|
|
197
|
+
const config: Record<string, unknown> = {};
|
|
198
|
+
|
|
199
|
+
if (value.description) {
|
|
200
|
+
config.description = value.description;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
if (value.placeholder) {
|
|
204
|
+
config.inputProps = {
|
|
205
|
+
placeholder: value.placeholder,
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// Apply stored fieldConfig overrides (e.g., fieldType: "textarea", "file", or custom types)
|
|
210
|
+
if (storedFieldConfig?.[key]) {
|
|
211
|
+
const storedConfig = storedFieldConfig[key];
|
|
212
|
+
const fieldType = storedConfig.fieldType;
|
|
213
|
+
|
|
214
|
+
if (fieldType) {
|
|
215
|
+
// 1. Check if there's a custom component in fieldComponents
|
|
216
|
+
if (fieldComponents?.[fieldType]) {
|
|
217
|
+
const CustomComponent = fieldComponents[fieldType];
|
|
218
|
+
config.fieldType = (props: AutoFormInputComponentProps) => (
|
|
219
|
+
<CustomComponent {...props} />
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
// 2. Special handling for built-in "file" type - use CMSFileUpload with uploadImage
|
|
223
|
+
else if (fieldType === "file") {
|
|
224
|
+
if (!uploadImage) {
|
|
225
|
+
// Show a clear error message if uploadImage is not provided
|
|
226
|
+
config.fieldType = () => (
|
|
227
|
+
<div className="rounded-md border border-destructive bg-destructive/10 p-3 text-sm text-destructive">
|
|
228
|
+
File upload requires an <code>uploadImage</code> function in CMS
|
|
229
|
+
overrides.
|
|
230
|
+
</div>
|
|
231
|
+
);
|
|
232
|
+
} else {
|
|
233
|
+
config.fieldType = (props: AutoFormInputComponentProps) => (
|
|
234
|
+
<CMSFileUpload {...props} uploadImage={uploadImage} />
|
|
235
|
+
);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
// 3. For other built-in types, pass through to auto-form
|
|
239
|
+
else if (
|
|
240
|
+
BUILTIN_FIELD_TYPES.includes(
|
|
241
|
+
fieldType as (typeof BUILTIN_FIELD_TYPES)[number],
|
|
242
|
+
)
|
|
243
|
+
) {
|
|
244
|
+
config.fieldType = fieldType;
|
|
245
|
+
}
|
|
246
|
+
// 4. Unknown custom type without a component - log warning and skip
|
|
247
|
+
else {
|
|
248
|
+
console.warn(
|
|
249
|
+
`CMS: Unknown fieldType "${fieldType}" for field "${key}". ` +
|
|
250
|
+
`Provide a component via fieldComponents override or use a built-in type.`,
|
|
251
|
+
);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
if (Object.keys(config).length > 0) {
|
|
257
|
+
fieldConfig[key] = config;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
return fieldConfig;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Determine the first string field in the schema for slug auto-generation
|
|
266
|
+
*/
|
|
267
|
+
function findSlugSourceField(
|
|
268
|
+
jsonSchema: Record<string, unknown>,
|
|
269
|
+
): string | null {
|
|
270
|
+
const properties = jsonSchema.properties as Record<string, { type?: string }>;
|
|
271
|
+
if (!properties) return null;
|
|
272
|
+
|
|
273
|
+
// Look for common name fields first
|
|
274
|
+
const priorityFields = ["name", "title", "heading", "label"];
|
|
275
|
+
for (const field of priorityFields) {
|
|
276
|
+
if (properties[field]?.type === "string") {
|
|
277
|
+
return field;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
// Fall back to first string field
|
|
282
|
+
for (const [key, value] of Object.entries(properties)) {
|
|
283
|
+
if (value.type === "string") {
|
|
284
|
+
return key;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
return null;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
export function ContentForm({
|
|
292
|
+
contentType,
|
|
293
|
+
initialData = {},
|
|
294
|
+
initialSlug = "",
|
|
295
|
+
isEditing = false,
|
|
296
|
+
onSubmit,
|
|
297
|
+
onCancel,
|
|
298
|
+
}: ContentFormProps) {
|
|
299
|
+
const {
|
|
300
|
+
localization: customLocalization,
|
|
301
|
+
uploadImage,
|
|
302
|
+
fieldComponents,
|
|
303
|
+
} = usePluginOverrides<CMSPluginOverrides>("cms");
|
|
304
|
+
const localization = { ...CMS_LOCALIZATION, ...customLocalization };
|
|
305
|
+
|
|
306
|
+
const [slug, setSlug] = useState(initialSlug);
|
|
307
|
+
const [slugManuallyEdited, setSlugManuallyEdited] = useState(isEditing);
|
|
308
|
+
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
309
|
+
const [formData, setFormData] =
|
|
310
|
+
useState<Record<string, unknown>>(initialData);
|
|
311
|
+
|
|
312
|
+
// Sync formData with initialData when it changes (e.g., when editing an existing item)
|
|
313
|
+
// This is necessary because useState only uses the initial value once on mount
|
|
314
|
+
useEffect(() => {
|
|
315
|
+
// Only sync when we're in editing mode and initialData has content
|
|
316
|
+
// This ensures we properly load existing item data into the form
|
|
317
|
+
if (isEditing && Object.keys(initialData).length > 0) {
|
|
318
|
+
setFormData(initialData);
|
|
319
|
+
}
|
|
320
|
+
}, [initialData, isEditing]);
|
|
321
|
+
|
|
322
|
+
// Also sync slug when initialSlug changes
|
|
323
|
+
useEffect(() => {
|
|
324
|
+
if (isEditing && initialSlug) {
|
|
325
|
+
setSlug(initialSlug);
|
|
326
|
+
}
|
|
327
|
+
}, [initialSlug, isEditing]);
|
|
328
|
+
|
|
329
|
+
// Parse JSON Schema
|
|
330
|
+
const jsonSchema = useMemo(() => {
|
|
331
|
+
try {
|
|
332
|
+
return JSON.parse(contentType.jsonSchema) as Record<string, unknown>;
|
|
333
|
+
} catch {
|
|
334
|
+
return {};
|
|
335
|
+
}
|
|
336
|
+
}, [contentType.jsonSchema]);
|
|
337
|
+
|
|
338
|
+
// Parse stored field config
|
|
339
|
+
const storedFieldConfig = useMemo(() => {
|
|
340
|
+
if (!contentType.fieldConfig) return undefined;
|
|
341
|
+
try {
|
|
342
|
+
return JSON.parse(contentType.fieldConfig) as Record<
|
|
343
|
+
string,
|
|
344
|
+
{ fieldType?: string }
|
|
345
|
+
>;
|
|
346
|
+
} catch {
|
|
347
|
+
return undefined;
|
|
348
|
+
}
|
|
349
|
+
}, [contentType.fieldConfig]);
|
|
350
|
+
|
|
351
|
+
// Convert to Zod schema with coercion for proper AutoForm handling
|
|
352
|
+
const zodSchema = useMemo(() => {
|
|
353
|
+
try {
|
|
354
|
+
return jsonSchemaToZodWithCoercion(jsonSchema as JsonSchema);
|
|
355
|
+
} catch {
|
|
356
|
+
return z.object({});
|
|
357
|
+
}
|
|
358
|
+
}, [jsonSchema]);
|
|
359
|
+
|
|
360
|
+
// Build field config for AutoForm
|
|
361
|
+
const fieldConfig = useMemo(
|
|
362
|
+
() =>
|
|
363
|
+
buildFieldConfigFromJsonSchema(
|
|
364
|
+
jsonSchema,
|
|
365
|
+
storedFieldConfig,
|
|
366
|
+
uploadImage,
|
|
367
|
+
fieldComponents,
|
|
368
|
+
),
|
|
369
|
+
[jsonSchema, storedFieldConfig, uploadImage, fieldComponents],
|
|
370
|
+
);
|
|
371
|
+
|
|
372
|
+
// Find the field to use for slug auto-generation
|
|
373
|
+
const slugSourceField = useMemo(
|
|
374
|
+
() => findSlugSourceField(jsonSchema),
|
|
375
|
+
[jsonSchema],
|
|
376
|
+
);
|
|
377
|
+
|
|
378
|
+
// Handle form value changes for slug auto-generation
|
|
379
|
+
const handleValuesChange = (values: Record<string, unknown>) => {
|
|
380
|
+
setFormData(values);
|
|
381
|
+
|
|
382
|
+
// Auto-generate slug from source field if not manually edited
|
|
383
|
+
if (!isEditing && !slugManuallyEdited && slugSourceField) {
|
|
384
|
+
const sourceValue = values[slugSourceField];
|
|
385
|
+
if (typeof sourceValue === "string" && sourceValue.trim()) {
|
|
386
|
+
setSlug(slugify(sourceValue));
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
// Handle form submission
|
|
392
|
+
const handleSubmit = async (data: Record<string, unknown>) => {
|
|
393
|
+
if (!slug.trim()) {
|
|
394
|
+
toast.error("Slug is required");
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
setIsSubmitting(true);
|
|
399
|
+
try {
|
|
400
|
+
await onSubmit({ slug, data });
|
|
401
|
+
toast.success(
|
|
402
|
+
isEditing
|
|
403
|
+
? localization.CMS_TOAST_UPDATE_SUCCESS
|
|
404
|
+
: localization.CMS_TOAST_CREATE_SUCCESS,
|
|
405
|
+
);
|
|
406
|
+
} catch (error) {
|
|
407
|
+
const message =
|
|
408
|
+
error instanceof Error ? error.message : localization.CMS_TOAST_ERROR;
|
|
409
|
+
toast.error(message);
|
|
410
|
+
} finally {
|
|
411
|
+
setIsSubmitting(false);
|
|
412
|
+
}
|
|
413
|
+
};
|
|
414
|
+
|
|
415
|
+
return (
|
|
416
|
+
<div className="space-y-6">
|
|
417
|
+
{/* Slug field */}
|
|
418
|
+
<div className="space-y-2">
|
|
419
|
+
<div className="flex items-center gap-2">
|
|
420
|
+
<Label htmlFor="slug">{localization.CMS_LABEL_SLUG}</Label>
|
|
421
|
+
{!isEditing && (
|
|
422
|
+
<Badge variant="outline" className="text-xs">
|
|
423
|
+
{slugManuallyEdited
|
|
424
|
+
? localization.CMS_EDITOR_SLUG_MANUAL
|
|
425
|
+
: localization.CMS_EDITOR_SLUG_AUTO}
|
|
426
|
+
</Badge>
|
|
427
|
+
)}
|
|
428
|
+
</div>
|
|
429
|
+
<Input
|
|
430
|
+
id="slug"
|
|
431
|
+
value={slug}
|
|
432
|
+
onChange={(e) => {
|
|
433
|
+
setSlug(e.target.value);
|
|
434
|
+
if (!isEditing) {
|
|
435
|
+
setSlugManuallyEdited(true);
|
|
436
|
+
}
|
|
437
|
+
}}
|
|
438
|
+
disabled={isEditing}
|
|
439
|
+
placeholder={
|
|
440
|
+
slugSourceField
|
|
441
|
+
? `Auto-generated from ${slugSourceField}`
|
|
442
|
+
: "Enter slug..."
|
|
443
|
+
}
|
|
444
|
+
/>
|
|
445
|
+
<p className="text-sm text-muted-foreground">
|
|
446
|
+
{localization.CMS_LABEL_SLUG_DESCRIPTION}
|
|
447
|
+
</p>
|
|
448
|
+
</div>
|
|
449
|
+
|
|
450
|
+
{/* Dynamic form from Zod schema */}
|
|
451
|
+
<AutoForm
|
|
452
|
+
formSchema={zodSchema as z.ZodObject<any, any>}
|
|
453
|
+
values={formData as any}
|
|
454
|
+
onValuesChange={handleValuesChange as any}
|
|
455
|
+
onSubmit={handleSubmit as any}
|
|
456
|
+
fieldConfig={fieldConfig as any}
|
|
457
|
+
>
|
|
458
|
+
<div className="flex items-center gap-2 pt-4">
|
|
459
|
+
<AutoFormSubmit disabled={isSubmitting}>
|
|
460
|
+
{isSubmitting
|
|
461
|
+
? localization.CMS_STATUS_SAVING
|
|
462
|
+
: localization.CMS_BUTTON_SAVE}
|
|
463
|
+
</AutoFormSubmit>
|
|
464
|
+
{onCancel && (
|
|
465
|
+
<button
|
|
466
|
+
type="button"
|
|
467
|
+
onClick={onCancel}
|
|
468
|
+
className="px-4 py-2 text-sm text-muted-foreground hover:text-foreground"
|
|
469
|
+
>
|
|
470
|
+
{localization.CMS_BUTTON_CANCEL}
|
|
471
|
+
</button>
|
|
472
|
+
)}
|
|
473
|
+
</div>
|
|
474
|
+
</AutoForm>
|
|
475
|
+
</div>
|
|
476
|
+
);
|
|
477
|
+
}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useState, useCallback, useEffect, type ChangeEvent } from "react";
|
|
4
|
+
import { toast } from "sonner";
|
|
5
|
+
import type { AutoFormInputComponentProps } from "@workspace/ui/components/ui/auto-form/types";
|
|
6
|
+
import { Input } from "@workspace/ui/components/input";
|
|
7
|
+
import { Button } from "@workspace/ui/components/button";
|
|
8
|
+
import {
|
|
9
|
+
FormControl,
|
|
10
|
+
FormItem,
|
|
11
|
+
FormMessage,
|
|
12
|
+
} from "@workspace/ui/components/form";
|
|
13
|
+
import { Trash2, Loader2 } from "lucide-react";
|
|
14
|
+
import AutoFormLabel from "@workspace/ui/components/ui/auto-form/common/label";
|
|
15
|
+
import AutoFormTooltip from "@workspace/ui/components/ui/auto-form/common/tooltip";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Props for the CMSFileUpload component
|
|
19
|
+
*/
|
|
20
|
+
export interface CMSFileUploadProps extends AutoFormInputComponentProps {
|
|
21
|
+
/**
|
|
22
|
+
* Function to upload an image file and return the URL.
|
|
23
|
+
* This is required - consumers must provide an upload implementation.
|
|
24
|
+
*/
|
|
25
|
+
uploadImage: (file: File) => Promise<string>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Default file upload component for CMS image fields.
|
|
30
|
+
*
|
|
31
|
+
* This component:
|
|
32
|
+
* - Accepts image files via file input
|
|
33
|
+
* - Uses the required uploadImage prop to upload and get a URL
|
|
34
|
+
* - Shows a preview of the uploaded image
|
|
35
|
+
* - Allows removing the uploaded image
|
|
36
|
+
*
|
|
37
|
+
* You can use this component directly in your fieldComponents override,
|
|
38
|
+
* or create your own custom component using this as a reference.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```tsx
|
|
42
|
+
* // Use the default component with your upload function
|
|
43
|
+
* fieldComponents: {
|
|
44
|
+
* file: (props) => (
|
|
45
|
+
* <CMSFileUpload {...props} uploadImage={myUploadFn} />
|
|
46
|
+
* ),
|
|
47
|
+
* }
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
export function CMSFileUpload({
|
|
51
|
+
label,
|
|
52
|
+
isRequired,
|
|
53
|
+
fieldConfigItem,
|
|
54
|
+
fieldProps,
|
|
55
|
+
field,
|
|
56
|
+
uploadImage,
|
|
57
|
+
}: CMSFileUploadProps) {
|
|
58
|
+
// Exclude showLabel and value from props spread
|
|
59
|
+
// File inputs cannot have their value set programmatically (browser security)
|
|
60
|
+
const {
|
|
61
|
+
showLabel: _showLabel,
|
|
62
|
+
value: _value,
|
|
63
|
+
...safeFieldProps
|
|
64
|
+
} = fieldProps;
|
|
65
|
+
const showLabel = _showLabel === undefined ? true : _showLabel;
|
|
66
|
+
const [isUploading, setIsUploading] = useState(false);
|
|
67
|
+
const [previewUrl, setPreviewUrl] = useState<string | null>(
|
|
68
|
+
field.value || null,
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
useEffect(() => {
|
|
72
|
+
const normalizedValue = field.value || null;
|
|
73
|
+
if (normalizedValue !== previewUrl) {
|
|
74
|
+
setPreviewUrl(normalizedValue);
|
|
75
|
+
}
|
|
76
|
+
}, [field.value, previewUrl]);
|
|
77
|
+
|
|
78
|
+
const handleFileChange = useCallback(
|
|
79
|
+
async (e: ChangeEvent<HTMLInputElement>) => {
|
|
80
|
+
const file = e.target.files?.[0];
|
|
81
|
+
if (!file) return;
|
|
82
|
+
|
|
83
|
+
// Check if it's an image
|
|
84
|
+
if (!file.type.startsWith("image/")) {
|
|
85
|
+
toast.error("Please select an image file");
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
setIsUploading(true);
|
|
90
|
+
try {
|
|
91
|
+
const url = await uploadImage(file);
|
|
92
|
+
setPreviewUrl(url);
|
|
93
|
+
field.onChange(url);
|
|
94
|
+
} catch (error) {
|
|
95
|
+
console.error("Image upload failed:", error);
|
|
96
|
+
toast.error("Failed to upload image");
|
|
97
|
+
} finally {
|
|
98
|
+
setIsUploading(false);
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
[field, uploadImage],
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
const handleRemove = useCallback(() => {
|
|
105
|
+
setPreviewUrl(null);
|
|
106
|
+
field.onChange("");
|
|
107
|
+
}, [field]);
|
|
108
|
+
|
|
109
|
+
return (
|
|
110
|
+
<FormItem>
|
|
111
|
+
{showLabel && (
|
|
112
|
+
<AutoFormLabel
|
|
113
|
+
label={fieldConfigItem?.label || label}
|
|
114
|
+
isRequired={isRequired}
|
|
115
|
+
/>
|
|
116
|
+
)}
|
|
117
|
+
{!previewUrl && (
|
|
118
|
+
<FormControl>
|
|
119
|
+
<div className="relative">
|
|
120
|
+
<Input
|
|
121
|
+
type="file"
|
|
122
|
+
accept="image/*"
|
|
123
|
+
{...safeFieldProps}
|
|
124
|
+
onChange={handleFileChange}
|
|
125
|
+
disabled={isUploading}
|
|
126
|
+
className="cursor-pointer"
|
|
127
|
+
data-testid="image-upload-input"
|
|
128
|
+
/>
|
|
129
|
+
{isUploading && (
|
|
130
|
+
<div className="absolute inset-0 flex items-center justify-center bg-background/80">
|
|
131
|
+
<Loader2 className="h-4 w-4 animate-spin" />
|
|
132
|
+
</div>
|
|
133
|
+
)}
|
|
134
|
+
</div>
|
|
135
|
+
</FormControl>
|
|
136
|
+
)}
|
|
137
|
+
{previewUrl && (
|
|
138
|
+
<div className="flex items-center gap-2">
|
|
139
|
+
<div className="relative h-20 w-20 overflow-hidden rounded-md border">
|
|
140
|
+
<img
|
|
141
|
+
src={previewUrl}
|
|
142
|
+
alt="Preview"
|
|
143
|
+
className="h-full w-full object-cover"
|
|
144
|
+
data-testid="image-preview"
|
|
145
|
+
/>
|
|
146
|
+
</div>
|
|
147
|
+
<Button
|
|
148
|
+
type="button"
|
|
149
|
+
variant="outline"
|
|
150
|
+
size="sm"
|
|
151
|
+
onClick={handleRemove}
|
|
152
|
+
className="flex items-center gap-1"
|
|
153
|
+
data-testid="remove-image-button"
|
|
154
|
+
>
|
|
155
|
+
<Trash2 className="h-4 w-4" />
|
|
156
|
+
Remove
|
|
157
|
+
</Button>
|
|
158
|
+
</div>
|
|
159
|
+
)}
|
|
160
|
+
<AutoFormTooltip fieldConfigItem={fieldConfigItem} />
|
|
161
|
+
<FormMessage />
|
|
162
|
+
</FormItem>
|
|
163
|
+
);
|
|
164
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { DashboardPageComponent as DashboardPageImpl } from "./pages/dashboard-page";
|
|
4
|
+
import { ContentListPageComponent as ContentListPageImpl } from "./pages/content-list-page";
|
|
5
|
+
import { ContentEditorPageComponent as ContentEditorPageImpl } from "./pages/content-editor-page";
|
|
6
|
+
|
|
7
|
+
// Re-export to ensure the client boundary is preserved
|
|
8
|
+
export const DashboardPage = DashboardPageImpl;
|
|
9
|
+
export const ContentListPage = ContentListPageImpl;
|
|
10
|
+
export const ContentEditorPage = ContentEditorPageImpl;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { Skeleton } from "@workspace/ui/components/skeleton";
|
|
4
|
+
import { PageWrapper } from "../shared/page-wrapper";
|
|
5
|
+
|
|
6
|
+
export function DashboardSkeleton() {
|
|
7
|
+
return (
|
|
8
|
+
<PageWrapper testId="cms-dashboard-skeleton">
|
|
9
|
+
<div className="w-full max-w-5xl space-y-6">
|
|
10
|
+
<div className="space-y-2">
|
|
11
|
+
<Skeleton className="h-8 w-48" />
|
|
12
|
+
<Skeleton className="h-4 w-64" />
|
|
13
|
+
</div>
|
|
14
|
+
<div className="grid gap-4 md:grid-cols-2 lg:grid-cols-3">
|
|
15
|
+
{Array.from({ length: 6 }).map((_, i) => (
|
|
16
|
+
<Skeleton key={i} className="h-32 rounded-lg" />
|
|
17
|
+
))}
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</PageWrapper>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { Skeleton } from "@workspace/ui/components/skeleton";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Editor skeleton without wrapper - used when already inside a PageWrapper
|
|
7
|
+
*/
|
|
8
|
+
export function EditorSkeleton() {
|
|
9
|
+
return (
|
|
10
|
+
<div className="space-y-6">
|
|
11
|
+
<div className="space-y-2">
|
|
12
|
+
<Skeleton className="h-8 w-48" />
|
|
13
|
+
</div>
|
|
14
|
+
<div className="space-y-4">
|
|
15
|
+
<div className="space-y-2">
|
|
16
|
+
<Skeleton className="h-4 w-16" />
|
|
17
|
+
<Skeleton className="h-10 w-full" />
|
|
18
|
+
</div>
|
|
19
|
+
<div className="space-y-2">
|
|
20
|
+
<Skeleton className="h-4 w-24" />
|
|
21
|
+
<Skeleton className="h-10 w-full" />
|
|
22
|
+
</div>
|
|
23
|
+
<div className="space-y-2">
|
|
24
|
+
<Skeleton className="h-4 w-20" />
|
|
25
|
+
<Skeleton className="h-24 w-full" />
|
|
26
|
+
</div>
|
|
27
|
+
<div className="space-y-2">
|
|
28
|
+
<Skeleton className="h-4 w-16" />
|
|
29
|
+
<Skeleton className="h-10 w-full" />
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
<Skeleton className="h-10 w-24" />
|
|
33
|
+
</div>
|
|
34
|
+
);
|
|
35
|
+
}
|