@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.
Files changed (468) hide show
  1. package/dist/node_modules/.pnpm/@date-fns_tz@1.4.1/node_modules/@date-fns/tz/date/index.cjs +85 -0
  2. package/dist/node_modules/.pnpm/@date-fns_tz@1.4.1/node_modules/@date-fns/tz/date/index.mjs +83 -0
  3. package/dist/node_modules/.pnpm/@date-fns_tz@1.4.1/node_modules/@date-fns/tz/date/mini.cjs +237 -0
  4. package/dist/node_modules/.pnpm/@date-fns_tz@1.4.1/node_modules/@date-fns/tz/date/mini.mjs +235 -0
  5. package/dist/node_modules/.pnpm/@date-fns_tz@1.4.1/node_modules/@date-fns/tz/tzName/index.cjs +41 -0
  6. package/dist/node_modules/.pnpm/@date-fns_tz@1.4.1/node_modules/@date-fns/tz/tzName/index.mjs +39 -0
  7. package/dist/node_modules/.pnpm/@date-fns_tz@1.4.1/node_modules/@date-fns/tz/tzOffset/index.cjs +46 -0
  8. package/dist/node_modules/.pnpm/@date-fns_tz@1.4.1/node_modules/@date-fns/tz/tzOffset/index.mjs +44 -0
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. 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
  16. 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
  17. 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
  18. 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
  19. 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
  20. 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
  21. 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
  22. 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
  23. 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
  24. 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
  25. 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
  26. 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
  27. 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
  28. 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
  29. 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
  30. 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
  31. 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
  32. 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
  33. 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
  34. 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
  35. 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
  36. 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
  37. 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
  38. 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
  39. 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
  40. 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
  41. 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
  42. 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
  43. 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
  44. 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
  45. 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
  46. 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
  47. 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
  48. 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
  49. 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
  50. 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
  51. 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
  52. 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
  53. 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
  54. 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
  55. 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
  56. 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
  57. 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
  58. 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
  59. 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
  60. 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
  61. 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
  62. 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
  63. 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
  64. 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
  65. 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
  66. 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
  67. 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
  68. 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
  69. 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
  70. 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
  71. 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
  72. 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
  73. 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
  74. 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
  75. 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
  76. 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
  77. 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
  78. 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
  79. 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
  80. 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
  81. 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
  82. 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
  83. 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
  84. 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
  85. 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
  86. 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
  87. 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
  88. 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
  89. 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
  90. 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
  91. 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
  92. 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
  93. 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
  94. 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
  95. 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
  96. 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
  97. 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
  98. 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
  99. 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
  100. 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
  101. 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
  102. 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
  103. 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
  104. 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
  105. 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
  106. 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
  107. 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
  108. 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
  109. 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
  110. 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
  111. 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
  112. 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
  113. 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
  114. 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
  115. 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
  116. 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
  117. 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
  118. 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
  119. 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
  120. 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
  121. 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
  122. 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
  123. 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
  124. 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
  125. 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
  126. 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
  127. 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
  128. 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
  129. 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
  130. 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
  131. 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
  132. 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
  133. 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
  134. 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
  135. 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
  136. 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
  137. 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
  138. 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
  139. 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
  140. 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
  141. 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
  142. 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
  143. 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
  144. 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
  145. 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
  146. 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
  147. 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
  148. 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
  149. 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
  150. 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
  151. 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
  152. 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
  153. 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
  154. 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
  155. 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
  156. 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
  157. 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
  158. 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
  159. 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
  160. 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
  161. 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
  162. 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
  163. 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
  164. 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
  165. 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
  166. 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
  167. 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
  168. 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
  169. 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
  170. 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
  171. 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
  172. 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
  173. 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
  174. 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
  175. 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
  176. 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
  177. 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
  178. 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
  179. 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
  180. 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
  181. 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
  182. 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
  183. 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
  184. 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
  185. 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
  186. 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
  187. 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
  188. 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
  189. 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
  190. 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
  191. 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
  192. 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
  193. 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
  194. 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
  195. 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
  196. 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
  197. 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
  198. 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
  199. 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
  200. 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
  201. 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
  202. 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
  203. 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
  204. 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
  205. 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
  206. 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
  207. 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
  208. 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
  209. 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
  210. 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
  211. 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
  212. 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
  213. 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
  214. 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
  215. 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
  216. 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
  217. 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
  218. 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
  219. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-interface.cjs +36 -3
  220. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-interface.mjs +36 -3
  221. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-layout.cjs +16 -3
  222. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-layout.mjs +16 -3
  223. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-message.cjs +35 -3
  224. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-message.mjs +35 -3
  225. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-sidebar.cjs +131 -124
  226. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-sidebar.mjs +131 -124
  227. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/tool-call-display.cjs +123 -0
  228. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/tool-call-display.mjs +121 -0
  229. package/dist/packages/better-stack/src/plugins/ai-chat/schemas.cjs +23 -23
  230. package/dist/packages/better-stack/src/plugins/blog/api/plugin.cjs +28 -12
  231. package/dist/packages/better-stack/src/plugins/blog/api/plugin.mjs +18 -2
  232. package/dist/packages/better-stack/src/plugins/blog/client/components/loading/form-page-skeleton.cjs +1 -1
  233. package/dist/packages/better-stack/src/plugins/blog/client/components/loading/form-page-skeleton.mjs +1 -1
  234. package/dist/packages/better-stack/src/plugins/blog/client/components/loading/list-page-skeleton.cjs +1 -1
  235. package/dist/packages/better-stack/src/plugins/blog/client/components/loading/list-page-skeleton.mjs +1 -1
  236. package/dist/packages/better-stack/src/plugins/blog/client/components/loading/post-page-skeleton.cjs +1 -1
  237. package/dist/packages/better-stack/src/plugins/blog/client/components/loading/post-page-skeleton.mjs +1 -1
  238. package/dist/packages/better-stack/src/plugins/blog/client/components/shared/page-wrapper.cjs +10 -6
  239. package/dist/packages/better-stack/src/plugins/blog/client/components/shared/page-wrapper.mjs +11 -7
  240. package/dist/packages/better-stack/src/plugins/blog/schemas.cjs +17 -17
  241. package/dist/packages/better-stack/src/plugins/cms/api/plugin.cjs +457 -0
  242. package/dist/packages/better-stack/src/plugins/cms/api/plugin.mjs +455 -0
  243. package/dist/packages/better-stack/src/plugins/cms/client/components/forms/content-form.cjs +299 -0
  244. package/dist/packages/better-stack/src/plugins/cms/client/components/forms/content-form.mjs +297 -0
  245. package/dist/packages/better-stack/src/plugins/cms/client/components/forms/file-upload.cjs +118 -0
  246. package/dist/packages/better-stack/src/plugins/cms/client/components/forms/file-upload.mjs +116 -0
  247. package/dist/packages/better-stack/src/plugins/cms/client/components/loading/dashboard-skeleton.cjs +18 -0
  248. package/dist/packages/better-stack/src/plugins/cms/client/components/loading/dashboard-skeleton.mjs +16 -0
  249. package/dist/packages/better-stack/src/plugins/cms/client/components/loading/editor-skeleton.cjs +32 -0
  250. package/dist/packages/better-stack/src/plugins/cms/client/components/loading/editor-skeleton.mjs +30 -0
  251. package/dist/packages/better-stack/src/plugins/cms/client/components/loading/list-skeleton.cjs +32 -0
  252. package/dist/packages/better-stack/src/plugins/cms/client/components/loading/list-skeleton.mjs +30 -0
  253. package/dist/packages/better-stack/src/plugins/cms/client/components/pages/404-page.cjs +20 -0
  254. package/dist/packages/better-stack/src/plugins/cms/client/components/pages/404-page.mjs +18 -0
  255. package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-editor-page.cjs +46 -0
  256. package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-editor-page.internal.cjs +83 -0
  257. package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-editor-page.internal.mjs +81 -0
  258. package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-editor-page.mjs +44 -0
  259. package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-list-page.cjs +43 -0
  260. package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-list-page.internal.cjs +152 -0
  261. package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-list-page.internal.mjs +150 -0
  262. package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-list-page.mjs +41 -0
  263. package/dist/packages/better-stack/src/plugins/cms/client/components/pages/dashboard-page.cjs +39 -0
  264. package/dist/packages/better-stack/src/plugins/cms/client/components/pages/dashboard-page.internal.cjs +68 -0
  265. package/dist/packages/better-stack/src/plugins/cms/client/components/pages/dashboard-page.internal.mjs +66 -0
  266. package/dist/packages/better-stack/src/plugins/cms/client/components/pages/dashboard-page.mjs +37 -0
  267. package/dist/packages/better-stack/src/plugins/cms/client/components/shared/default-error.cjs +17 -0
  268. package/dist/packages/better-stack/src/plugins/cms/client/components/shared/default-error.mjs +15 -0
  269. package/dist/packages/better-stack/src/plugins/cms/client/components/shared/empty-state.cjs +16 -0
  270. package/dist/packages/better-stack/src/plugins/cms/client/components/shared/empty-state.mjs +14 -0
  271. package/dist/packages/better-stack/src/plugins/cms/client/components/shared/page-wrapper.cjs +27 -0
  272. package/dist/packages/better-stack/src/plugins/cms/client/components/shared/page-wrapper.mjs +25 -0
  273. package/dist/packages/better-stack/src/plugins/cms/client/hooks/cms-hooks.cjs +402 -0
  274. package/dist/packages/better-stack/src/plugins/cms/client/hooks/cms-hooks.mjs +390 -0
  275. package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-common.cjs +29 -0
  276. package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-common.mjs +27 -0
  277. package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-dashboard.cjs +13 -0
  278. package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-dashboard.mjs +11 -0
  279. package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-editor.cjs +12 -0
  280. package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-editor.mjs +10 -0
  281. package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-list.cjs +18 -0
  282. package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-list.mjs +16 -0
  283. package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-toasts.cjs +12 -0
  284. package/dist/packages/better-stack/src/plugins/cms/client/localization/cms-toasts.mjs +10 -0
  285. package/dist/packages/better-stack/src/plugins/cms/client/localization/index.cjs +17 -0
  286. package/dist/packages/better-stack/src/plugins/cms/client/localization/index.mjs +15 -0
  287. package/dist/packages/better-stack/src/plugins/cms/client/plugin.cjs +185 -0
  288. package/dist/packages/better-stack/src/plugins/cms/client/plugin.mjs +183 -0
  289. package/dist/packages/better-stack/src/plugins/cms/db.cjs +76 -0
  290. package/dist/packages/better-stack/src/plugins/cms/db.mjs +74 -0
  291. package/dist/packages/better-stack/src/plugins/cms/schemas.cjs +54 -0
  292. package/dist/packages/better-stack/src/plugins/cms/schemas.mjs +49 -0
  293. package/dist/packages/better-stack/src/plugins/cms/utils.cjs +15 -0
  294. package/dist/packages/better-stack/src/plugins/cms/utils.mjs +9 -0
  295. package/dist/packages/ui/src/components/accordion.cjs +67 -0
  296. package/dist/packages/ui/src/components/accordion.mjs +62 -0
  297. package/dist/packages/ui/src/components/calendar.cjs +205 -0
  298. package/dist/packages/ui/src/components/calendar.mjs +188 -0
  299. package/dist/packages/ui/src/components/checkbox.cjs +34 -0
  300. package/dist/packages/ui/src/components/checkbox.mjs +32 -0
  301. package/dist/packages/ui/src/components/date-picker.cjs +41 -0
  302. package/dist/packages/ui/src/components/date-picker.mjs +39 -0
  303. package/dist/packages/ui/src/components/form.mjs +1 -1
  304. package/dist/packages/{better-stack/src/plugins/blog/client/components/shared → ui/src/components}/page-layout.cjs +2 -1
  305. package/dist/packages/{better-stack/src/plugins/blog/client/components/shared → ui/src/components}/page-layout.mjs +2 -1
  306. package/dist/packages/ui/src/components/page-wrapper.cjs +20 -0
  307. package/dist/packages/ui/src/components/page-wrapper.mjs +18 -0
  308. package/dist/packages/ui/src/components/popover.cjs +41 -0
  309. package/dist/packages/ui/src/components/popover.mjs +37 -0
  310. package/dist/packages/ui/src/components/radio-group.cjs +48 -0
  311. package/dist/packages/ui/src/components/radio-group.mjs +45 -0
  312. package/dist/packages/ui/src/components/separator.cjs +29 -0
  313. package/dist/packages/ui/src/components/separator.mjs +27 -0
  314. package/dist/packages/ui/src/components/table.cjs +89 -0
  315. package/dist/packages/ui/src/components/table.mjs +82 -0
  316. package/dist/packages/ui/src/components/ui/auto-form/common/label.cjs +18 -0
  317. package/dist/packages/ui/src/components/ui/auto-form/common/label.mjs +16 -0
  318. package/dist/packages/ui/src/components/ui/auto-form/common/tooltip.cjs +9 -0
  319. package/dist/packages/ui/src/components/ui/auto-form/common/tooltip.mjs +7 -0
  320. package/dist/packages/ui/src/components/ui/auto-form/config.cjs +42 -0
  321. package/dist/packages/ui/src/components/ui/auto-form/config.mjs +39 -0
  322. package/dist/packages/ui/src/components/ui/auto-form/dependencies.cjs +48 -0
  323. package/dist/packages/ui/src/components/ui/auto-form/dependencies.mjs +46 -0
  324. package/dist/packages/ui/src/components/ui/auto-form/fields/array.cjs +103 -0
  325. package/dist/packages/ui/src/components/ui/auto-form/fields/array.mjs +87 -0
  326. package/dist/packages/ui/src/components/ui/auto-form/fields/checkbox.cjs +38 -0
  327. package/dist/packages/ui/src/components/ui/auto-form/fields/checkbox.mjs +36 -0
  328. package/dist/packages/ui/src/components/ui/auto-form/fields/date.cjs +37 -0
  329. package/dist/packages/ui/src/components/ui/auto-form/fields/date.mjs +35 -0
  330. package/dist/packages/ui/src/components/ui/auto-form/fields/enum.cjs +73 -0
  331. package/dist/packages/ui/src/components/ui/auto-form/fields/enum.mjs +71 -0
  332. package/dist/packages/ui/src/components/ui/auto-form/fields/file.cjs +63 -0
  333. package/dist/packages/ui/src/components/ui/auto-form/fields/file.mjs +61 -0
  334. package/dist/packages/ui/src/components/ui/auto-form/fields/input.cjs +32 -0
  335. package/dist/packages/ui/src/components/ui/auto-form/fields/input.mjs +30 -0
  336. package/dist/packages/ui/src/components/ui/auto-form/fields/number.cjs +31 -0
  337. package/dist/packages/ui/src/components/ui/auto-form/fields/number.mjs +29 -0
  338. package/dist/packages/ui/src/components/ui/auto-form/fields/object.cjs +149 -0
  339. package/dist/packages/ui/src/components/ui/auto-form/fields/object.mjs +133 -0
  340. package/dist/packages/ui/src/components/ui/auto-form/fields/radio-group.cjs +67 -0
  341. package/dist/packages/ui/src/components/ui/auto-form/fields/radio-group.mjs +65 -0
  342. package/dist/packages/ui/src/components/ui/auto-form/fields/switch.cjs +38 -0
  343. package/dist/packages/ui/src/components/ui/auto-form/fields/switch.mjs +36 -0
  344. package/dist/packages/ui/src/components/ui/auto-form/fields/textarea.cjs +31 -0
  345. package/dist/packages/ui/src/components/ui/auto-form/fields/textarea.mjs +29 -0
  346. package/dist/packages/ui/src/components/ui/auto-form/index.cjs +87 -0
  347. package/dist/packages/ui/src/components/ui/auto-form/index.mjs +78 -0
  348. package/dist/packages/ui/src/components/ui/auto-form/types.cjs +11 -0
  349. package/dist/packages/ui/src/components/ui/auto-form/types.mjs +9 -0
  350. package/dist/packages/ui/src/components/ui/auto-form/utils.cjs +179 -0
  351. package/dist/packages/ui/src/components/ui/auto-form/utils.mjs +169 -0
  352. package/dist/plugins/ai-chat/api/index.d.cts +1 -1
  353. package/dist/plugins/ai-chat/api/index.d.mts +1 -1
  354. package/dist/plugins/ai-chat/api/index.d.ts +1 -1
  355. package/dist/plugins/ai-chat/client/components/index.cjs +2 -0
  356. package/dist/plugins/ai-chat/client/components/index.d.cts +1 -1
  357. package/dist/plugins/ai-chat/client/components/index.d.mts +1 -1
  358. package/dist/plugins/ai-chat/client/components/index.d.ts +1 -1
  359. package/dist/plugins/ai-chat/client/components/index.mjs +1 -0
  360. package/dist/plugins/ai-chat/client/hooks/index.d.cts +1 -1
  361. package/dist/plugins/ai-chat/client/hooks/index.d.mts +1 -1
  362. package/dist/plugins/ai-chat/client/hooks/index.d.ts +1 -1
  363. package/dist/plugins/ai-chat/client/index.cjs +2 -0
  364. package/dist/plugins/ai-chat/client/index.d.cts +5 -176
  365. package/dist/plugins/ai-chat/client/index.d.mts +5 -176
  366. package/dist/plugins/ai-chat/client/index.d.ts +5 -176
  367. package/dist/plugins/ai-chat/client/index.mjs +1 -0
  368. package/dist/plugins/ai-chat/query-keys.d.cts +56 -250
  369. package/dist/plugins/ai-chat/query-keys.d.mts +56 -250
  370. package/dist/plugins/ai-chat/query-keys.d.ts +56 -250
  371. package/dist/plugins/blog/client/components/shared/markdown-content-styles.css +6 -0
  372. package/dist/plugins/blog/query-keys.d.cts +102 -362
  373. package/dist/plugins/blog/query-keys.d.mts +102 -362
  374. package/dist/plugins/blog/query-keys.d.ts +102 -362
  375. package/dist/plugins/cms/api/index.cjs +7 -0
  376. package/dist/plugins/cms/api/index.d.cts +101 -0
  377. package/dist/plugins/cms/api/index.d.mts +101 -0
  378. package/dist/plugins/cms/api/index.d.ts +101 -0
  379. package/dist/plugins/cms/api/index.mjs +1 -0
  380. package/dist/plugins/cms/client/components/index.cjs +14 -0
  381. package/dist/plugins/cms/client/components/index.d.cts +20 -0
  382. package/dist/plugins/cms/client/components/index.d.mts +20 -0
  383. package/dist/plugins/cms/client/components/index.d.ts +20 -0
  384. package/dist/plugins/cms/client/components/index.mjs +10 -0
  385. package/dist/plugins/cms/client/hooks/index.cjs +17 -0
  386. package/dist/plugins/cms/client/hooks/index.d.cts +203 -0
  387. package/dist/plugins/cms/client/hooks/index.d.mts +203 -0
  388. package/dist/plugins/cms/client/hooks/index.d.ts +203 -0
  389. package/dist/plugins/cms/client/hooks/index.mjs +1 -0
  390. package/dist/plugins/cms/client/index.cjs +9 -0
  391. package/dist/plugins/cms/client/index.d.cts +344 -0
  392. package/dist/plugins/cms/client/index.d.mts +344 -0
  393. package/dist/plugins/cms/client/index.d.ts +344 -0
  394. package/dist/plugins/cms/client/index.mjs +2 -0
  395. package/dist/plugins/cms/client.css +2 -0
  396. package/dist/plugins/cms/query-keys.cjs +137 -0
  397. package/dist/plugins/cms/query-keys.d.cts +79 -0
  398. package/dist/plugins/cms/query-keys.d.mts +79 -0
  399. package/dist/plugins/cms/query-keys.d.ts +79 -0
  400. package/dist/plugins/cms/query-keys.mjs +135 -0
  401. package/dist/plugins/cms/style.css +19 -0
  402. package/dist/shared/stack.BwkyFwF8.d.cts +135 -0
  403. package/dist/shared/stack.DBqxCs0V.d.mts +135 -0
  404. package/dist/shared/stack.DaOcgmrM.d.cts +323 -0
  405. package/dist/shared/stack.DaOcgmrM.d.mts +323 -0
  406. package/dist/shared/stack.DaOcgmrM.d.ts +323 -0
  407. package/dist/shared/stack.DwnJA87a.d.ts +135 -0
  408. package/dist/shared/stack.NZJogTUn.d.cts +66 -0
  409. package/dist/shared/stack.NZJogTUn.d.mts +66 -0
  410. package/dist/shared/stack.NZJogTUn.d.ts +66 -0
  411. package/package.json +58 -5
  412. package/src/plugins/ai-chat/client/components/chat-interface.tsx +56 -2
  413. package/src/plugins/ai-chat/client/components/chat-layout.tsx +16 -1
  414. package/src/plugins/ai-chat/client/components/chat-message.tsx +59 -3
  415. package/src/plugins/ai-chat/client/components/chat-sidebar.tsx +4 -1
  416. package/src/plugins/ai-chat/client/components/index.ts +2 -0
  417. package/src/plugins/ai-chat/client/components/tool-call-display.tsx +197 -0
  418. package/src/plugins/ai-chat/client/index.ts +12 -1
  419. package/src/plugins/ai-chat/client/overrides.ts +71 -0
  420. package/src/plugins/blog/api/plugin.ts +29 -2
  421. package/src/plugins/blog/client/components/loading/form-page-skeleton.tsx +1 -1
  422. package/src/plugins/blog/client/components/loading/list-page-skeleton.tsx +1 -1
  423. package/src/plugins/blog/client/components/loading/post-page-skeleton.tsx +1 -1
  424. package/src/plugins/blog/client/components/shared/markdown-content-styles.css +6 -0
  425. package/src/plugins/blog/client/components/shared/page-wrapper.tsx +9 -9
  426. package/src/plugins/cms/__tests__/schema-roundtrip.test.ts +611 -0
  427. package/src/plugins/cms/api/index.ts +1 -0
  428. package/src/plugins/cms/api/plugin.ts +611 -0
  429. package/src/plugins/cms/client/components/forms/content-form.tsx +477 -0
  430. package/src/plugins/cms/client/components/forms/file-upload.tsx +164 -0
  431. package/src/plugins/cms/client/components/index.tsx +10 -0
  432. package/src/plugins/cms/client/components/loading/dashboard-skeleton.tsx +22 -0
  433. package/src/plugins/cms/client/components/loading/editor-skeleton.tsx +35 -0
  434. package/src/plugins/cms/client/components/loading/index.tsx +3 -0
  435. package/src/plugins/cms/client/components/loading/list-skeleton.tsx +38 -0
  436. package/src/plugins/cms/client/components/pages/404-page.tsx +27 -0
  437. package/src/plugins/cms/client/components/pages/content-editor-page.internal.tsx +121 -0
  438. package/src/plugins/cms/client/components/pages/content-editor-page.tsx +50 -0
  439. package/src/plugins/cms/client/components/pages/content-list-page.internal.tsx +198 -0
  440. package/src/plugins/cms/client/components/pages/content-list-page.tsx +45 -0
  441. package/src/plugins/cms/client/components/pages/dashboard-page.internal.tsx +94 -0
  442. package/src/plugins/cms/client/components/pages/dashboard-page.tsx +37 -0
  443. package/src/plugins/cms/client/components/shared/default-error.tsx +30 -0
  444. package/src/plugins/cms/client/components/shared/empty-state.tsx +26 -0
  445. package/src/plugins/cms/client/components/shared/page-wrapper.tsx +32 -0
  446. package/src/plugins/cms/client/components/shared/pagination.tsx +72 -0
  447. package/src/plugins/cms/client/hooks/cms-hooks.tsx +724 -0
  448. package/src/plugins/cms/client/hooks/index.tsx +1 -0
  449. package/src/plugins/cms/client/index.ts +13 -0
  450. package/src/plugins/cms/client/localization/cms-common.ts +29 -0
  451. package/src/plugins/cms/client/localization/cms-dashboard.ts +10 -0
  452. package/src/plugins/cms/client/localization/cms-editor.ts +8 -0
  453. package/src/plugins/cms/client/localization/cms-list.ts +14 -0
  454. package/src/plugins/cms/client/localization/cms-toasts.ts +8 -0
  455. package/src/plugins/cms/client/localization/index.ts +15 -0
  456. package/src/plugins/cms/client/overrides.ts +166 -0
  457. package/src/plugins/cms/client/plugin.tsx +283 -0
  458. package/src/plugins/cms/client.css +2 -0
  459. package/src/plugins/cms/db.ts +76 -0
  460. package/src/plugins/cms/query-keys.ts +186 -0
  461. package/src/plugins/cms/schemas.ts +81 -0
  462. package/src/plugins/cms/style.css +19 -0
  463. package/src/plugins/cms/types.ts +220 -0
  464. package/src/plugins/cms/utils.ts +11 -0
  465. package/dist/shared/stack.DorMi9CZ.d.cts +0 -80
  466. package/dist/shared/stack.DorMi9CZ.d.mts +0 -80
  467. package/dist/shared/stack.DorMi9CZ.d.ts +0 -80
  468. package/src/plugins/blog/client/components/shared/page-layout.tsx +0 -23
@@ -0,0 +1,299 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ const jsxRuntime = require('react/jsx-runtime');
5
+ const React = require('react');
6
+ const z = require('zod');
7
+ const sonner = require('sonner');
8
+ const index$1 = require('../../../../../../../ui/src/components/ui/auto-form/index.cjs');
9
+ const input = require('../../../../../../../ui/src/components/input.cjs');
10
+ const label = require('../../../../../../../ui/src/components/label.cjs');
11
+ const badge = require('../../../../../../../ui/src/components/badge.cjs');
12
+ const context = require('@btst/stack/context');
13
+ const utils = require('../../../utils.cjs');
14
+ const index = require('../../localization/index.cjs');
15
+ const fileUpload = require('./file-upload.cjs');
16
+
17
+ function jsonSchemaToZodWithCoercion(jsonSchema) {
18
+ const shape = {};
19
+ const properties = jsonSchema.properties || {};
20
+ const required = jsonSchema.required || [];
21
+ for (const [key, prop] of Object.entries(properties)) {
22
+ let fieldSchema;
23
+ const typeValue = Array.isArray(prop.type) ? prop.type[0] : prop.type;
24
+ if (prop.enum && Array.isArray(prop.enum) && prop.enum.length > 0) {
25
+ const stringValues = prop.enum.filter(
26
+ (v) => typeof v === "string"
27
+ );
28
+ if (stringValues.length > 0) {
29
+ fieldSchema = z.z.enum(stringValues);
30
+ } else {
31
+ fieldSchema = z.z.string();
32
+ }
33
+ } else {
34
+ switch (typeValue) {
35
+ case "number":
36
+ case "integer": {
37
+ let numSchema = z.z.coerce.number();
38
+ if (prop.minimum !== void 0) {
39
+ numSchema = numSchema.min(prop.minimum);
40
+ }
41
+ if (prop.maximum !== void 0) {
42
+ numSchema = numSchema.max(prop.maximum);
43
+ }
44
+ fieldSchema = numSchema;
45
+ break;
46
+ }
47
+ case "boolean": {
48
+ fieldSchema = z.z.boolean();
49
+ if (prop.default !== void 0) {
50
+ fieldSchema = fieldSchema.default(
51
+ prop.default
52
+ );
53
+ }
54
+ break;
55
+ }
56
+ case "string": {
57
+ if (prop.format === "date" || prop.format === "date-time") {
58
+ fieldSchema = z.z.coerce.date();
59
+ } else {
60
+ let strSchema = z.z.string();
61
+ if (prop.minLength !== void 0) {
62
+ strSchema = strSchema.min(prop.minLength);
63
+ }
64
+ if (prop.maxLength !== void 0) {
65
+ strSchema = strSchema.max(prop.maxLength);
66
+ }
67
+ fieldSchema = strSchema;
68
+ }
69
+ break;
70
+ }
71
+ default: {
72
+ fieldSchema = z.z.string();
73
+ }
74
+ }
75
+ }
76
+ if (prop.default !== void 0 && typeValue !== "boolean") {
77
+ fieldSchema = fieldSchema.default(prop.default);
78
+ }
79
+ if (!required.includes(key)) {
80
+ fieldSchema = fieldSchema.optional();
81
+ }
82
+ shape[key] = fieldSchema;
83
+ }
84
+ return z.z.object(shape);
85
+ }
86
+ const BUILTIN_FIELD_TYPES = [
87
+ "checkbox",
88
+ "date",
89
+ "select",
90
+ "radio",
91
+ "switch",
92
+ "textarea",
93
+ "number",
94
+ "file",
95
+ "fallback"
96
+ ];
97
+ function buildFieldConfigFromJsonSchema(jsonSchema, storedFieldConfig, uploadImage, fieldComponents) {
98
+ const fieldConfig = {};
99
+ const properties = jsonSchema.properties;
100
+ if (!properties) return fieldConfig;
101
+ for (const [key, value] of Object.entries(properties)) {
102
+ const config = {};
103
+ if (value.description) {
104
+ config.description = value.description;
105
+ }
106
+ if (value.placeholder) {
107
+ config.inputProps = {
108
+ placeholder: value.placeholder
109
+ };
110
+ }
111
+ if (storedFieldConfig?.[key]) {
112
+ const storedConfig = storedFieldConfig[key];
113
+ const fieldType = storedConfig.fieldType;
114
+ if (fieldType) {
115
+ if (fieldComponents?.[fieldType]) {
116
+ const CustomComponent = fieldComponents[fieldType];
117
+ config.fieldType = (props) => /* @__PURE__ */ jsxRuntime.jsx(CustomComponent, { ...props });
118
+ } else if (fieldType === "file") {
119
+ if (!uploadImage) {
120
+ config.fieldType = () => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-md border border-destructive bg-destructive/10 p-3 text-sm text-destructive", children: [
121
+ "File upload requires an ",
122
+ /* @__PURE__ */ jsxRuntime.jsx("code", { children: "uploadImage" }),
123
+ " function in CMS overrides."
124
+ ] });
125
+ } else {
126
+ config.fieldType = (props) => /* @__PURE__ */ jsxRuntime.jsx(fileUpload.CMSFileUpload, { ...props, uploadImage });
127
+ }
128
+ } else if (BUILTIN_FIELD_TYPES.includes(
129
+ fieldType
130
+ )) {
131
+ config.fieldType = fieldType;
132
+ } else {
133
+ console.warn(
134
+ `CMS: Unknown fieldType "${fieldType}" for field "${key}". Provide a component via fieldComponents override or use a built-in type.`
135
+ );
136
+ }
137
+ }
138
+ }
139
+ if (Object.keys(config).length > 0) {
140
+ fieldConfig[key] = config;
141
+ }
142
+ }
143
+ return fieldConfig;
144
+ }
145
+ function findSlugSourceField(jsonSchema) {
146
+ const properties = jsonSchema.properties;
147
+ if (!properties) return null;
148
+ const priorityFields = ["name", "title", "heading", "label"];
149
+ for (const field of priorityFields) {
150
+ if (properties[field]?.type === "string") {
151
+ return field;
152
+ }
153
+ }
154
+ for (const [key, value] of Object.entries(properties)) {
155
+ if (value.type === "string") {
156
+ return key;
157
+ }
158
+ }
159
+ return null;
160
+ }
161
+ function ContentForm({
162
+ contentType,
163
+ initialData = {},
164
+ initialSlug = "",
165
+ isEditing = false,
166
+ onSubmit,
167
+ onCancel
168
+ }) {
169
+ const {
170
+ localization: customLocalization,
171
+ uploadImage,
172
+ fieldComponents
173
+ } = context.usePluginOverrides("cms");
174
+ const localization = { ...index.CMS_LOCALIZATION, ...customLocalization };
175
+ const [slug, setSlug] = React.useState(initialSlug);
176
+ const [slugManuallyEdited, setSlugManuallyEdited] = React.useState(isEditing);
177
+ const [isSubmitting, setIsSubmitting] = React.useState(false);
178
+ const [formData, setFormData] = React.useState(initialData);
179
+ React.useEffect(() => {
180
+ if (isEditing && Object.keys(initialData).length > 0) {
181
+ setFormData(initialData);
182
+ }
183
+ }, [initialData, isEditing]);
184
+ React.useEffect(() => {
185
+ if (isEditing && initialSlug) {
186
+ setSlug(initialSlug);
187
+ }
188
+ }, [initialSlug, isEditing]);
189
+ const jsonSchema = React.useMemo(() => {
190
+ try {
191
+ return JSON.parse(contentType.jsonSchema);
192
+ } catch {
193
+ return {};
194
+ }
195
+ }, [contentType.jsonSchema]);
196
+ const storedFieldConfig = React.useMemo(() => {
197
+ if (!contentType.fieldConfig) return void 0;
198
+ try {
199
+ return JSON.parse(contentType.fieldConfig);
200
+ } catch {
201
+ return void 0;
202
+ }
203
+ }, [contentType.fieldConfig]);
204
+ const zodSchema = React.useMemo(() => {
205
+ try {
206
+ return jsonSchemaToZodWithCoercion(jsonSchema);
207
+ } catch {
208
+ return z.z.object({});
209
+ }
210
+ }, [jsonSchema]);
211
+ const fieldConfig = React.useMemo(
212
+ () => buildFieldConfigFromJsonSchema(
213
+ jsonSchema,
214
+ storedFieldConfig,
215
+ uploadImage,
216
+ fieldComponents
217
+ ),
218
+ [jsonSchema, storedFieldConfig, uploadImage, fieldComponents]
219
+ );
220
+ const slugSourceField = React.useMemo(
221
+ () => findSlugSourceField(jsonSchema),
222
+ [jsonSchema]
223
+ );
224
+ const handleValuesChange = (values) => {
225
+ setFormData(values);
226
+ if (!isEditing && !slugManuallyEdited && slugSourceField) {
227
+ const sourceValue = values[slugSourceField];
228
+ if (typeof sourceValue === "string" && sourceValue.trim()) {
229
+ setSlug(utils.slugify(sourceValue));
230
+ }
231
+ }
232
+ };
233
+ const handleSubmit = async (data) => {
234
+ if (!slug.trim()) {
235
+ sonner.toast.error("Slug is required");
236
+ return;
237
+ }
238
+ setIsSubmitting(true);
239
+ try {
240
+ await onSubmit({ slug, data });
241
+ sonner.toast.success(
242
+ isEditing ? localization.CMS_TOAST_UPDATE_SUCCESS : localization.CMS_TOAST_CREATE_SUCCESS
243
+ );
244
+ } catch (error) {
245
+ const message = error instanceof Error ? error.message : localization.CMS_TOAST_ERROR;
246
+ sonner.toast.error(message);
247
+ } finally {
248
+ setIsSubmitting(false);
249
+ }
250
+ };
251
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
252
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
253
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
254
+ /* @__PURE__ */ jsxRuntime.jsx(label.Label, { htmlFor: "slug", children: localization.CMS_LABEL_SLUG }),
255
+ !isEditing && /* @__PURE__ */ jsxRuntime.jsx(badge.Badge, { variant: "outline", className: "text-xs", children: slugManuallyEdited ? localization.CMS_EDITOR_SLUG_MANUAL : localization.CMS_EDITOR_SLUG_AUTO })
256
+ ] }),
257
+ /* @__PURE__ */ jsxRuntime.jsx(
258
+ input.Input,
259
+ {
260
+ id: "slug",
261
+ value: slug,
262
+ onChange: (e) => {
263
+ setSlug(e.target.value);
264
+ if (!isEditing) {
265
+ setSlugManuallyEdited(true);
266
+ }
267
+ },
268
+ disabled: isEditing,
269
+ placeholder: slugSourceField ? `Auto-generated from ${slugSourceField}` : "Enter slug..."
270
+ }
271
+ ),
272
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: localization.CMS_LABEL_SLUG_DESCRIPTION })
273
+ ] }),
274
+ /* @__PURE__ */ jsxRuntime.jsx(
275
+ index$1.default,
276
+ {
277
+ formSchema: zodSchema,
278
+ values: formData,
279
+ onValuesChange: handleValuesChange,
280
+ onSubmit: handleSubmit,
281
+ fieldConfig,
282
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 pt-4", children: [
283
+ /* @__PURE__ */ jsxRuntime.jsx(index$1.AutoFormSubmit, { disabled: isSubmitting, children: isSubmitting ? localization.CMS_STATUS_SAVING : localization.CMS_BUTTON_SAVE }),
284
+ onCancel && /* @__PURE__ */ jsxRuntime.jsx(
285
+ "button",
286
+ {
287
+ type: "button",
288
+ onClick: onCancel,
289
+ className: "px-4 py-2 text-sm text-muted-foreground hover:text-foreground",
290
+ children: localization.CMS_BUTTON_CANCEL
291
+ }
292
+ )
293
+ ] })
294
+ }
295
+ )
296
+ ] });
297
+ }
298
+
299
+ exports.ContentForm = ContentForm;
@@ -0,0 +1,297 @@
1
+ "use client";
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import { useState, useEffect, useMemo } from 'react';
4
+ import { z } from 'zod';
5
+ import { toast } from 'sonner';
6
+ import AutoForm, { AutoFormSubmit } from '../../../../../../../ui/src/components/ui/auto-form/index.mjs';
7
+ import { Input } from '../../../../../../../ui/src/components/input.mjs';
8
+ import { Label } from '../../../../../../../ui/src/components/label.mjs';
9
+ import { Badge } from '../../../../../../../ui/src/components/badge.mjs';
10
+ import { usePluginOverrides } from '@btst/stack/context';
11
+ import { slugify } from '../../../utils.mjs';
12
+ import { CMS_LOCALIZATION } from '../../localization/index.mjs';
13
+ import { CMSFileUpload } from './file-upload.mjs';
14
+
15
+ function jsonSchemaToZodWithCoercion(jsonSchema) {
16
+ const shape = {};
17
+ const properties = jsonSchema.properties || {};
18
+ const required = jsonSchema.required || [];
19
+ for (const [key, prop] of Object.entries(properties)) {
20
+ let fieldSchema;
21
+ const typeValue = Array.isArray(prop.type) ? prop.type[0] : prop.type;
22
+ if (prop.enum && Array.isArray(prop.enum) && prop.enum.length > 0) {
23
+ const stringValues = prop.enum.filter(
24
+ (v) => typeof v === "string"
25
+ );
26
+ if (stringValues.length > 0) {
27
+ fieldSchema = z.enum(stringValues);
28
+ } else {
29
+ fieldSchema = z.string();
30
+ }
31
+ } else {
32
+ switch (typeValue) {
33
+ case "number":
34
+ case "integer": {
35
+ let numSchema = z.coerce.number();
36
+ if (prop.minimum !== void 0) {
37
+ numSchema = numSchema.min(prop.minimum);
38
+ }
39
+ if (prop.maximum !== void 0) {
40
+ numSchema = numSchema.max(prop.maximum);
41
+ }
42
+ fieldSchema = numSchema;
43
+ break;
44
+ }
45
+ case "boolean": {
46
+ fieldSchema = z.boolean();
47
+ if (prop.default !== void 0) {
48
+ fieldSchema = fieldSchema.default(
49
+ prop.default
50
+ );
51
+ }
52
+ break;
53
+ }
54
+ case "string": {
55
+ if (prop.format === "date" || prop.format === "date-time") {
56
+ fieldSchema = z.coerce.date();
57
+ } else {
58
+ let strSchema = z.string();
59
+ if (prop.minLength !== void 0) {
60
+ strSchema = strSchema.min(prop.minLength);
61
+ }
62
+ if (prop.maxLength !== void 0) {
63
+ strSchema = strSchema.max(prop.maxLength);
64
+ }
65
+ fieldSchema = strSchema;
66
+ }
67
+ break;
68
+ }
69
+ default: {
70
+ fieldSchema = z.string();
71
+ }
72
+ }
73
+ }
74
+ if (prop.default !== void 0 && typeValue !== "boolean") {
75
+ fieldSchema = fieldSchema.default(prop.default);
76
+ }
77
+ if (!required.includes(key)) {
78
+ fieldSchema = fieldSchema.optional();
79
+ }
80
+ shape[key] = fieldSchema;
81
+ }
82
+ return z.object(shape);
83
+ }
84
+ const BUILTIN_FIELD_TYPES = [
85
+ "checkbox",
86
+ "date",
87
+ "select",
88
+ "radio",
89
+ "switch",
90
+ "textarea",
91
+ "number",
92
+ "file",
93
+ "fallback"
94
+ ];
95
+ function buildFieldConfigFromJsonSchema(jsonSchema, storedFieldConfig, uploadImage, fieldComponents) {
96
+ const fieldConfig = {};
97
+ const properties = jsonSchema.properties;
98
+ if (!properties) return fieldConfig;
99
+ for (const [key, value] of Object.entries(properties)) {
100
+ const config = {};
101
+ if (value.description) {
102
+ config.description = value.description;
103
+ }
104
+ if (value.placeholder) {
105
+ config.inputProps = {
106
+ placeholder: value.placeholder
107
+ };
108
+ }
109
+ if (storedFieldConfig?.[key]) {
110
+ const storedConfig = storedFieldConfig[key];
111
+ const fieldType = storedConfig.fieldType;
112
+ if (fieldType) {
113
+ if (fieldComponents?.[fieldType]) {
114
+ const CustomComponent = fieldComponents[fieldType];
115
+ config.fieldType = (props) => /* @__PURE__ */ jsx(CustomComponent, { ...props });
116
+ } else if (fieldType === "file") {
117
+ if (!uploadImage) {
118
+ config.fieldType = () => /* @__PURE__ */ jsxs("div", { className: "rounded-md border border-destructive bg-destructive/10 p-3 text-sm text-destructive", children: [
119
+ "File upload requires an ",
120
+ /* @__PURE__ */ jsx("code", { children: "uploadImage" }),
121
+ " function in CMS overrides."
122
+ ] });
123
+ } else {
124
+ config.fieldType = (props) => /* @__PURE__ */ jsx(CMSFileUpload, { ...props, uploadImage });
125
+ }
126
+ } else if (BUILTIN_FIELD_TYPES.includes(
127
+ fieldType
128
+ )) {
129
+ config.fieldType = fieldType;
130
+ } else {
131
+ console.warn(
132
+ `CMS: Unknown fieldType "${fieldType}" for field "${key}". Provide a component via fieldComponents override or use a built-in type.`
133
+ );
134
+ }
135
+ }
136
+ }
137
+ if (Object.keys(config).length > 0) {
138
+ fieldConfig[key] = config;
139
+ }
140
+ }
141
+ return fieldConfig;
142
+ }
143
+ function findSlugSourceField(jsonSchema) {
144
+ const properties = jsonSchema.properties;
145
+ if (!properties) return null;
146
+ const priorityFields = ["name", "title", "heading", "label"];
147
+ for (const field of priorityFields) {
148
+ if (properties[field]?.type === "string") {
149
+ return field;
150
+ }
151
+ }
152
+ for (const [key, value] of Object.entries(properties)) {
153
+ if (value.type === "string") {
154
+ return key;
155
+ }
156
+ }
157
+ return null;
158
+ }
159
+ function ContentForm({
160
+ contentType,
161
+ initialData = {},
162
+ initialSlug = "",
163
+ isEditing = false,
164
+ onSubmit,
165
+ onCancel
166
+ }) {
167
+ const {
168
+ localization: customLocalization,
169
+ uploadImage,
170
+ fieldComponents
171
+ } = usePluginOverrides("cms");
172
+ const localization = { ...CMS_LOCALIZATION, ...customLocalization };
173
+ const [slug, setSlug] = useState(initialSlug);
174
+ const [slugManuallyEdited, setSlugManuallyEdited] = useState(isEditing);
175
+ const [isSubmitting, setIsSubmitting] = useState(false);
176
+ const [formData, setFormData] = useState(initialData);
177
+ useEffect(() => {
178
+ if (isEditing && Object.keys(initialData).length > 0) {
179
+ setFormData(initialData);
180
+ }
181
+ }, [initialData, isEditing]);
182
+ useEffect(() => {
183
+ if (isEditing && initialSlug) {
184
+ setSlug(initialSlug);
185
+ }
186
+ }, [initialSlug, isEditing]);
187
+ const jsonSchema = useMemo(() => {
188
+ try {
189
+ return JSON.parse(contentType.jsonSchema);
190
+ } catch {
191
+ return {};
192
+ }
193
+ }, [contentType.jsonSchema]);
194
+ const storedFieldConfig = useMemo(() => {
195
+ if (!contentType.fieldConfig) return void 0;
196
+ try {
197
+ return JSON.parse(contentType.fieldConfig);
198
+ } catch {
199
+ return void 0;
200
+ }
201
+ }, [contentType.fieldConfig]);
202
+ const zodSchema = useMemo(() => {
203
+ try {
204
+ return jsonSchemaToZodWithCoercion(jsonSchema);
205
+ } catch {
206
+ return z.object({});
207
+ }
208
+ }, [jsonSchema]);
209
+ const fieldConfig = useMemo(
210
+ () => buildFieldConfigFromJsonSchema(
211
+ jsonSchema,
212
+ storedFieldConfig,
213
+ uploadImage,
214
+ fieldComponents
215
+ ),
216
+ [jsonSchema, storedFieldConfig, uploadImage, fieldComponents]
217
+ );
218
+ const slugSourceField = useMemo(
219
+ () => findSlugSourceField(jsonSchema),
220
+ [jsonSchema]
221
+ );
222
+ const handleValuesChange = (values) => {
223
+ setFormData(values);
224
+ if (!isEditing && !slugManuallyEdited && slugSourceField) {
225
+ const sourceValue = values[slugSourceField];
226
+ if (typeof sourceValue === "string" && sourceValue.trim()) {
227
+ setSlug(slugify(sourceValue));
228
+ }
229
+ }
230
+ };
231
+ const handleSubmit = async (data) => {
232
+ if (!slug.trim()) {
233
+ toast.error("Slug is required");
234
+ return;
235
+ }
236
+ setIsSubmitting(true);
237
+ try {
238
+ await onSubmit({ slug, data });
239
+ toast.success(
240
+ isEditing ? localization.CMS_TOAST_UPDATE_SUCCESS : localization.CMS_TOAST_CREATE_SUCCESS
241
+ );
242
+ } catch (error) {
243
+ const message = error instanceof Error ? error.message : localization.CMS_TOAST_ERROR;
244
+ toast.error(message);
245
+ } finally {
246
+ setIsSubmitting(false);
247
+ }
248
+ };
249
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
250
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
251
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
252
+ /* @__PURE__ */ jsx(Label, { htmlFor: "slug", children: localization.CMS_LABEL_SLUG }),
253
+ !isEditing && /* @__PURE__ */ jsx(Badge, { variant: "outline", className: "text-xs", children: slugManuallyEdited ? localization.CMS_EDITOR_SLUG_MANUAL : localization.CMS_EDITOR_SLUG_AUTO })
254
+ ] }),
255
+ /* @__PURE__ */ jsx(
256
+ Input,
257
+ {
258
+ id: "slug",
259
+ value: slug,
260
+ onChange: (e) => {
261
+ setSlug(e.target.value);
262
+ if (!isEditing) {
263
+ setSlugManuallyEdited(true);
264
+ }
265
+ },
266
+ disabled: isEditing,
267
+ placeholder: slugSourceField ? `Auto-generated from ${slugSourceField}` : "Enter slug..."
268
+ }
269
+ ),
270
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: localization.CMS_LABEL_SLUG_DESCRIPTION })
271
+ ] }),
272
+ /* @__PURE__ */ jsx(
273
+ AutoForm,
274
+ {
275
+ formSchema: zodSchema,
276
+ values: formData,
277
+ onValuesChange: handleValuesChange,
278
+ onSubmit: handleSubmit,
279
+ fieldConfig,
280
+ children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 pt-4", children: [
281
+ /* @__PURE__ */ jsx(AutoFormSubmit, { disabled: isSubmitting, children: isSubmitting ? localization.CMS_STATUS_SAVING : localization.CMS_BUTTON_SAVE }),
282
+ onCancel && /* @__PURE__ */ jsx(
283
+ "button",
284
+ {
285
+ type: "button",
286
+ onClick: onCancel,
287
+ className: "px-4 py-2 text-sm text-muted-foreground hover:text-foreground",
288
+ children: localization.CMS_BUTTON_CANCEL
289
+ }
290
+ )
291
+ ] })
292
+ }
293
+ )
294
+ ] });
295
+ }
296
+
297
+ export { ContentForm };