@middag-io/react 0.44.1 → 0.45.2

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 (362) hide show
  1. package/README.md +7 -0
  2. package/dist-lib/{FormField-Bj43PjHH.js → FormField-Csx8hGAW.js} +1956 -1936
  3. package/dist-lib/{FormPanelBlock-C6eDfGoI.js → FormPanelBlock-Bmd0DpiX.js} +337 -337
  4. package/dist-lib/base/blocks/DenseTableBlock.d.ts.map +1 -1
  5. package/dist-lib/base/blocks/LinkListBlock.d.ts +2 -1
  6. package/dist-lib/base/blocks/LinkListBlock.d.ts.map +1 -1
  7. package/dist-lib/base/form/FormField.d.ts.map +1 -1
  8. package/dist-lib/base/layout/DashboardLayout.d.ts.map +1 -1
  9. package/dist-lib/base/partials/ConfirmationDialog/index.d.ts.map +1 -1
  10. package/dist-lib/base/partials/DataTable/cell-renderers.d.ts +1 -1
  11. package/dist-lib/base/partials/DataTable/cell-renderers.d.ts.map +1 -1
  12. package/dist-lib/base/partials/DataTable/index.d.ts +1 -1
  13. package/dist-lib/base/partials/DataTable/index.d.ts.map +1 -1
  14. package/dist-lib/base/partials/DataTable/sanitize-html.d.ts +17 -0
  15. package/dist-lib/base/partials/DataTable/sanitize-html.d.ts.map +1 -0
  16. package/dist-lib/base/partials/DataTable/types.d.ts +15 -0
  17. package/dist-lib/base/partials/DataTable/types.d.ts.map +1 -1
  18. package/dist-lib/base/partials/FilterBar/index.d.ts.map +1 -1
  19. package/dist-lib/base/shell/BasicShell.js +1 -1
  20. package/dist-lib/base/shell/partials/InlineEditablePanel.js +38 -24
  21. package/dist-lib/base/shell/partials/PageActionButton.d.ts.map +1 -1
  22. package/dist-lib/base/shell/partials/PageActionButton.js +1 -1
  23. package/dist-lib/chunks/subpath-Bh1MAmBT.js +165 -0
  24. package/dist-lib/chunks/{subpath-AeMdleNB.js → subpath-fEhy6n_U.js} +10 -6
  25. package/dist-lib/contracts/block-data/data-display.d.ts +51 -2
  26. package/dist-lib/contracts/block-data/data-display.d.ts.map +1 -1
  27. package/dist-lib/contracts/generated/contract-schema.d.ts +1 -1
  28. package/dist-lib/contracts/generated/contract-types.d.ts +4 -2
  29. package/dist-lib/contracts/generated/contract-types.d.ts.map +1 -1
  30. package/dist-lib/contracts/generated/index.d.ts +1 -1
  31. package/dist-lib/i18n/I18nProvider.js +1 -1
  32. package/dist-lib/i18n/instance.js +1 -1
  33. package/dist-lib/i18n/locales/en/ui.json +5 -3
  34. package/dist-lib/i18n/locales/pt-BR/ui.json +5 -3
  35. package/dist-lib/i18n/register-strings.js +1 -1
  36. package/dist-lib/index.d.ts +1 -1
  37. package/dist-lib/index.d.ts.map +1 -1
  38. package/dist-lib/middag-react.css +1 -1
  39. package/dist-lib/middag-react.js +18641 -13317
  40. package/dist-lib/primitives/reui/chart.d.ts.map +1 -1
  41. package/dist-lib/primitives/reui/chart.js +35 -31
  42. package/docs/public/schemas/ai-contract-manifest.json +1820 -0
  43. package/docs/public/schemas/blocks.json +445 -0
  44. package/docs/public/schemas/components.json +166 -0
  45. package/docs/public/schemas/connectors.json +97 -0
  46. package/docs/public/schemas/fragment.json +2329 -0
  47. package/docs/public/schemas/manifest.json +119 -0
  48. package/docs/public/schemas/navigation.json +72 -0
  49. package/docs/public/schemas/page-contract.json +2329 -0
  50. package/docs/public/schemas/shared-props.json +118 -0
  51. package/docs/public/schemas/theme-defaults.json +253 -0
  52. package/docs/public/schemas/theme.json +401 -0
  53. package/package.json +109 -3
  54. package/src/assets/lottie/calendar/schedule-1.json +1 -0
  55. package/src/assets/lottie/calendar/schedule-2.json +1 -0
  56. package/src/assets/lottie/celebration/confetti-1.json +1 -0
  57. package/src/assets/lottie/celebration/confetti-2.json +1 -0
  58. package/src/assets/lottie/celebration/confetti-3.json +1 -0
  59. package/src/assets/lottie/cloud/cloud-1.json +1 -0
  60. package/src/assets/lottie/cloud/cloud-2.json +1 -0
  61. package/src/assets/lottie/connection/network-1.json +1 -0
  62. package/src/assets/lottie/connection/network-2.json +1 -0
  63. package/src/assets/lottie/connection/network-3.json +1 -0
  64. package/src/assets/lottie/dashboard/analytics-1.json +1 -0
  65. package/src/assets/lottie/dashboard/analytics-2.json +1 -0
  66. package/src/assets/lottie/dashboard/analytics-3.json +1 -0
  67. package/src/assets/lottie/email/mail-1.json +1 -0
  68. package/src/assets/lottie/email/mail-2.json +1 -0
  69. package/src/assets/lottie/email/mail-3.json +1 -0
  70. package/src/assets/lottie/empty-state/empty-1.json +1 -0
  71. package/src/assets/lottie/empty-state/empty-2.json +1 -0
  72. package/src/assets/lottie/empty-state/empty-3.json +1 -0
  73. package/src/assets/lottie/error/warning-1.json +1 -0
  74. package/src/assets/lottie/error/warning-2.json +1 -0
  75. package/src/assets/lottie/error/warning-3.json +1 -0
  76. package/src/assets/lottie/index.ts +49 -0
  77. package/src/assets/lottie/loading/spinner-1.json +1 -0
  78. package/src/assets/lottie/loading/spinner-2.json +1 -0
  79. package/src/assets/lottie/loading/spinner-3.json +1 -0
  80. package/src/assets/lottie/maintenance/construction-1.json +1 -0
  81. package/src/assets/lottie/maintenance/construction-2.json +1 -0
  82. package/src/assets/lottie/maintenance/construction-3.json +1 -0
  83. package/src/assets/lottie/not-found/404-1.json +1 -0
  84. package/src/assets/lottie/not-found/404-2.json +1 -0
  85. package/src/assets/lottie/not-found/404-3.json +1 -0
  86. package/src/assets/lottie/notification/bell-1.json +1 -0
  87. package/src/assets/lottie/notification/bell-2.json +1 -0
  88. package/src/assets/lottie/notification/bell-3.json +1 -0
  89. package/src/assets/lottie/onboarding/welcome-1.json +1 -0
  90. package/src/assets/lottie/onboarding/welcome-2.json +1 -0
  91. package/src/assets/lottie/onboarding/welcome-3.json +1 -0
  92. package/src/assets/lottie/payment/wallet-1.json +1 -0
  93. package/src/assets/lottie/payment/wallet-2.json +1 -0
  94. package/src/assets/lottie/payment/wallet-3.json +1 -0
  95. package/src/assets/lottie/search/search-1.json +1 -0
  96. package/src/assets/lottie/search/search-2.json +1 -0
  97. package/src/assets/lottie/search/search-3.json +1 -0
  98. package/src/assets/lottie/security/lock-1.json +1 -0
  99. package/src/assets/lottie/security/lock-2.json +1 -0
  100. package/src/assets/lottie/security/lock-3.json +1 -0
  101. package/src/assets/lottie/settings/gear-1.json +1 -0
  102. package/src/assets/lottie/settings/gear-2.json +1 -0
  103. package/src/assets/lottie/settings/gear-3.json +1 -0
  104. package/src/assets/lottie/success/check-1.json +1 -0
  105. package/src/assets/lottie/success/check-2.json +1 -0
  106. package/src/assets/lottie/success/check-3.json +1 -0
  107. package/src/assets/lottie/upload/upload-1.json +1 -0
  108. package/src/assets/lottie/upload/upload-2.json +1 -0
  109. package/src/assets/lottie/upload/upload-3.json +1 -0
  110. package/src/assets/lottie/user/profile-1.json +1 -0
  111. package/src/assets/lottie/user/profile-2.json +1 -0
  112. package/src/assets/lottie/user/profile-3.json +1 -0
  113. package/src/base/blocks/ActionGridBlock.tsx +151 -0
  114. package/src/base/blocks/ActivityTimelineBlock.tsx +180 -0
  115. package/src/base/blocks/CardGridBlock.tsx +384 -0
  116. package/src/base/blocks/ChartBlock.tsx +81 -0
  117. package/src/base/blocks/DenseTableBlock.tsx +403 -0
  118. package/src/base/blocks/DetailPanelBlock.tsx +189 -0
  119. package/src/base/blocks/EmptyStateBlock.tsx +46 -0
  120. package/src/base/blocks/FormPanelBlock.lazy.tsx +38 -0
  121. package/src/base/blocks/FormPanelBlock.tsx +480 -0
  122. package/src/base/blocks/LinkListBlock.tsx +94 -0
  123. package/src/base/blocks/MarkdownPanelBlock.tsx +60 -0
  124. package/src/base/blocks/MetricCardBlock.tsx +128 -0
  125. package/src/base/blocks/StatusStripBlock.tsx +43 -0
  126. package/src/base/blocks/TabsBlock.tsx +94 -0
  127. package/src/base/form/FormField.tsx +607 -0
  128. package/src/base/form/fields/CheckboxField.tsx +56 -0
  129. package/src/base/form/fields/ColorField.tsx +76 -0
  130. package/src/base/form/fields/CurrencyField.tsx +126 -0
  131. package/src/base/form/fields/DateField.tsx +168 -0
  132. package/src/base/form/fields/DateRangeField.tsx +66 -0
  133. package/src/base/form/fields/DocumentField.tsx +222 -0
  134. package/src/base/form/fields/EntityPickerField.tsx +244 -0
  135. package/src/base/form/fields/FileUploadField.tsx +253 -0
  136. package/src/base/form/fields/MultiSelectField.tsx +286 -0
  137. package/src/base/form/fields/NativeSelectField.tsx +67 -0
  138. package/src/base/form/fields/NumberField.tsx +67 -0
  139. package/src/base/form/fields/OtpField.tsx +88 -0
  140. package/src/base/form/fields/PasswordField.tsx +69 -0
  141. package/src/base/form/fields/PhoneField.tsx +64 -0
  142. package/src/base/form/fields/RadioField.tsx +66 -0
  143. package/src/base/form/fields/RatingField.tsx +52 -0
  144. package/src/base/form/fields/SelectField.tsx +76 -0
  145. package/src/base/form/fields/SliderField.tsx +77 -0
  146. package/src/base/form/fields/SlugField.tsx +114 -0
  147. package/src/base/form/fields/StaticField.tsx +25 -0
  148. package/src/base/form/fields/SwitchField.tsx +56 -0
  149. package/src/base/form/fields/TagsField.tsx +128 -0
  150. package/src/base/form/fields/TextField.tsx +55 -0
  151. package/src/base/form/fields/TextareaField.tsx +55 -0
  152. package/src/base/form/fields/document-validation.ts +126 -0
  153. package/src/base/form/fields/field-registry.ts +53 -0
  154. package/src/base/form/fields/register-default-fields.ts +86 -0
  155. package/src/base/form/form-schema-builder.ts +192 -0
  156. package/src/base/form/form-utils.ts +71 -0
  157. package/src/base/hooks/useIsDark.ts +50 -0
  158. package/src/base/hooks/useLazyTabs.ts +98 -0
  159. package/src/base/hooks/usePolling.ts +43 -0
  160. package/src/base/hooks/useRemember.ts +58 -0
  161. package/src/base/hooks/useToast.ts +27 -0
  162. package/src/base/layout/BlockRegion.tsx +39 -0
  163. package/src/base/layout/DashboardLayout.tsx +110 -0
  164. package/src/base/layout/SidebarLayout.tsx +38 -0
  165. package/src/base/layout/StackLayout.tsx +32 -0
  166. package/src/base/layout/WizardLayout.tsx +49 -0
  167. package/src/base/partials/ActionBar/index.tsx +115 -0
  168. package/src/base/partials/ConfirmationDialog/index.tsx +128 -0
  169. package/src/base/partials/DataTable/cell-registry.ts +50 -0
  170. package/src/base/partials/DataTable/cell-renderers.tsx +372 -0
  171. package/src/base/partials/DataTable/index.tsx +1282 -0
  172. package/src/base/partials/DataTable/register-default-cells.ts +37 -0
  173. package/src/base/partials/DataTable/sanitize-html.ts +45 -0
  174. package/src/base/partials/DataTable/types.ts +229 -0
  175. package/src/base/partials/DetailSection/index.tsx +316 -0
  176. package/src/base/partials/EmptyPlaceholder/index.tsx +162 -0
  177. package/src/base/partials/EntityItem/index.tsx +154 -0
  178. package/src/base/partials/FilterBar/index.tsx +256 -0
  179. package/src/base/partials/FormSection/index.tsx +87 -0
  180. package/src/base/partials/LogViewer/JsonBlock.tsx +39 -0
  181. package/src/base/partials/LogViewer/LogEntry.tsx +68 -0
  182. package/src/base/partials/LogViewer/LogViewerToolbar.tsx +71 -0
  183. package/src/base/partials/LogViewer/index.tsx +110 -0
  184. package/src/base/partials/LogViewer/types.ts +28 -0
  185. package/src/base/partials/MarkdownContent/index.tsx +307 -0
  186. package/src/base/partials/MenuBar/index.tsx +80 -0
  187. package/src/base/partials/QuickRecordSheet/index.tsx +59 -0
  188. package/src/base/partials/ResizableSidebar/index.tsx +70 -0
  189. package/src/base/partials/StatRow/index.tsx +28 -0
  190. package/src/base/partials/StatusBar/index.tsx +126 -0
  191. package/src/base/partials/StatusIndicator/index.tsx +61 -0
  192. package/src/base/partials/StepIndicator/index.tsx +63 -0
  193. package/src/base/partials/TableOfContents/index.tsx +78 -0
  194. package/src/base/partials/TimelineList/index.tsx +273 -0
  195. package/src/base/partials/ToggleGroupControl/index.tsx +100 -0
  196. package/src/base/partials/TreeView/index.tsx +75 -0
  197. package/src/base/partials/index.ts +23 -0
  198. package/src/base/shell/AuthShell.tsx +54 -0
  199. package/src/base/shell/BasicShell.tsx +286 -0
  200. package/src/base/shell/ImmersiveShell.tsx +85 -0
  201. package/src/base/shell/partials/EditablePanelContext.tsx +82 -0
  202. package/src/base/shell/partials/EditablePanelProvider.tsx +122 -0
  203. package/src/base/shell/partials/InlineEditablePanel.tsx +239 -0
  204. package/src/base/shell/partials/InspectorContext.tsx +173 -0
  205. package/src/base/shell/partials/InspectorPanel.tsx +65 -0
  206. package/src/base/shell/partials/NavErrorBoundary.tsx +82 -0
  207. package/src/base/shell/partials/OverlayScreen.tsx +67 -0
  208. package/src/base/shell/partials/PageActionButton.tsx +203 -0
  209. package/src/base/theme/appearance.ts +133 -0
  210. package/src/base/theme/host-layout-detector.ts +119 -0
  211. package/src/base/theme/host-theme-detector.ts +146 -0
  212. package/src/base/theme/sidebar-safelist.txt +20 -0
  213. package/src/base/theme/tailwind-theme.css +136 -0
  214. package/src/base/theme/theme-bridge.css +164 -0
  215. package/src/base/theme/theme-context.tsx +142 -0
  216. package/src/base/theme/themes/classic.css +174 -0
  217. package/src/base/theme/tokens.css +290 -0
  218. package/src/base/theme/useHostTheme.ts +95 -0
  219. package/src/base/utils/clipboard.ts +39 -0
  220. package/src/base/utils/conditions.ts +27 -0
  221. package/src/base/utils/icon-registry.ts +78 -0
  222. package/src/base/utils/icons.ts +31 -0
  223. package/src/base/utils/interpolate.ts +9 -0
  224. package/src/base/utils/register-default-icons.ts +163 -0
  225. package/src/base/utils/storage.ts +65 -0
  226. package/src/base/utils/time.ts +139 -0
  227. package/src/contracts/block-data/actions.ts +73 -0
  228. package/src/contracts/block-data/data-display.ts +343 -0
  229. package/src/contracts/block-data/form.ts +164 -0
  230. package/src/contracts/block-data/index.ts +15 -0
  231. package/src/contracts/block-data/interactive.ts +34 -0
  232. package/src/contracts/block-data/shared.ts +44 -0
  233. package/src/contracts/connectors.ts +60 -0
  234. package/src/contracts/generated/contract-schema.ts +1237 -0
  235. package/src/contracts/generated/contract-types.ts +675 -0
  236. package/src/contracts/generated/index.ts +15 -0
  237. package/src/contracts/navigation.ts +59 -0
  238. package/src/contracts/page-contract-schema.ts +40 -0
  239. package/src/contracts/page-contract.ts +79 -0
  240. package/src/contracts/shared-props.ts +92 -0
  241. package/src/engine/ContractPage.tsx +178 -0
  242. package/src/engine/EntityRoutes.tsx +72 -0
  243. package/src/engine/HostSlot.tsx +126 -0
  244. package/src/engine/LazyBlock.tsx +92 -0
  245. package/src/engine/bootstrap.tsx +20 -0
  246. package/src/engine/providers/auth.tsx +87 -0
  247. package/src/engine/providers/error-reporter.tsx +89 -0
  248. package/src/engine/providers/flash.tsx +44 -0
  249. package/src/engine/providers/index.ts +18 -0
  250. package/src/engine/providers/inertia-error-reporter.tsx +61 -0
  251. package/src/engine/providers/progress.tsx +56 -0
  252. package/src/engine/providers/scope.tsx +51 -0
  253. package/src/engine/register-defaults.ts +88 -0
  254. package/src/engine/registries.ts +96 -0
  255. package/src/i18n/I18nProvider.tsx +53 -0
  256. package/src/i18n/MANIFEST.md +101 -0
  257. package/src/i18n/host-resolver.ts +18 -0
  258. package/src/i18n/instance.ts +69 -0
  259. package/src/i18n/locales/en/ui.json +277 -0
  260. package/src/i18n/locales/en/validators.json +13 -0
  261. package/src/i18n/locales/pt-BR/ui.json +277 -0
  262. package/src/i18n/locales/pt-BR/validators.json +13 -0
  263. package/src/i18n/register-strings.ts +10 -0
  264. package/src/i18n/render-label.ts +33 -0
  265. package/src/i18n/resolve-field-error.ts +29 -0
  266. package/src/i18n/useHostString.ts +50 -0
  267. package/src/i18n/useTranslation.ts +83 -0
  268. package/src/lib/actions/resolve-action-target.ts +151 -0
  269. package/src/lib/hooks/use-copy-to-clipboard.ts +37 -0
  270. package/src/lib/hooks/use-file-upload.ts +406 -0
  271. package/src/lib/hooks/use-mobile.ts +21 -0
  272. package/src/lib/host-pending.ts +76 -0
  273. package/src/lib/portal-container.ts +16 -0
  274. package/src/lib/test-ids.ts +40 -0
  275. package/src/lib/utils.ts +6 -0
  276. package/src/primitives/reui/MANIFEST.md +97 -0
  277. package/src/primitives/reui/accordion.tsx +64 -0
  278. package/src/primitives/reui/alert-dialog.tsx +196 -0
  279. package/src/primitives/reui/alert.tsx +92 -0
  280. package/src/primitives/reui/aspect-ratio.tsx +9 -0
  281. package/src/primitives/reui/autocomplete.tsx +343 -0
  282. package/src/primitives/reui/avatar.tsx +109 -0
  283. package/src/primitives/reui/badge.tsx +94 -0
  284. package/src/primitives/reui/breadcrumb.tsx +109 -0
  285. package/src/primitives/reui/button-group.tsx +83 -0
  286. package/src/primitives/reui/button.tsx +64 -0
  287. package/src/primitives/reui/calendar.tsx +220 -0
  288. package/src/primitives/reui/card.tsx +92 -0
  289. package/src/primitives/reui/carousel.tsx +239 -0
  290. package/src/primitives/reui/chart.tsx +388 -0
  291. package/src/primitives/reui/checkbox.tsx +30 -0
  292. package/src/primitives/reui/collapsible.tsx +31 -0
  293. package/src/primitives/reui/combobox.tsx +308 -0
  294. package/src/primitives/reui/command.tsx +182 -0
  295. package/src/primitives/reui/context-menu.tsx +250 -0
  296. package/src/primitives/reui/data-grid/data-grid-column-filter.tsx +172 -0
  297. package/src/primitives/reui/data-grid/data-grid-column-header.tsx +420 -0
  298. package/src/primitives/reui/data-grid/data-grid-column-visibility.tsx +51 -0
  299. package/src/primitives/reui/data-grid/data-grid-pagination.tsx +235 -0
  300. package/src/primitives/reui/data-grid/data-grid-scroll-area.tsx +427 -0
  301. package/src/primitives/reui/data-grid/data-grid-table-dnd-rows.tsx +308 -0
  302. package/src/primitives/reui/data-grid/data-grid-table-dnd.tsx +318 -0
  303. package/src/primitives/reui/data-grid/data-grid-table-virtual.tsx +491 -0
  304. package/src/primitives/reui/data-grid/data-grid-table.tsx +1430 -0
  305. package/src/primitives/reui/data-grid/data-grid.tsx +269 -0
  306. package/src/primitives/reui/data-grid-pagination.tsx +235 -0
  307. package/src/primitives/reui/date-selector.tsx +1353 -0
  308. package/src/primitives/reui/dialog.tsx +158 -0
  309. package/src/primitives/reui/drawer.tsx +133 -0
  310. package/src/primitives/reui/dropdown-menu.tsx +257 -0
  311. package/src/primitives/reui/empty.tsx +104 -0
  312. package/src/primitives/reui/field.tsx +246 -0
  313. package/src/primitives/reui/filters.tsx +1891 -0
  314. package/src/primitives/reui/frame.tsx +170 -0
  315. package/src/primitives/reui/hover-card.tsx +42 -0
  316. package/src/primitives/reui/icon-placeholder.tsx +39 -0
  317. package/src/primitives/reui/index.ts +98 -0
  318. package/src/primitives/reui/input-group.tsx +170 -0
  319. package/src/primitives/reui/input-otp.tsx +75 -0
  320. package/src/primitives/reui/input.tsx +21 -0
  321. package/src/primitives/reui/item.tsx +193 -0
  322. package/src/primitives/reui/kanban.tsx +743 -0
  323. package/src/primitives/reui/kbd.tsx +28 -0
  324. package/src/primitives/reui/label.tsx +22 -0
  325. package/src/primitives/reui/menubar.tsx +274 -0
  326. package/src/primitives/reui/native-select.tsx +62 -0
  327. package/src/primitives/reui/navigation-menu.tsx +168 -0
  328. package/src/primitives/reui/number-field.tsx +250 -0
  329. package/src/primitives/reui/pagination.tsx +127 -0
  330. package/src/primitives/reui/phone-input.tsx +231 -0
  331. package/src/primitives/reui/popover.tsx +87 -0
  332. package/src/primitives/reui/progress.tsx +31 -0
  333. package/src/primitives/reui/radio-group.tsx +43 -0
  334. package/src/primitives/reui/rating.tsx +177 -0
  335. package/src/primitives/reui/resizable.tsx +51 -0
  336. package/src/primitives/reui/scroll-area.tsx +58 -0
  337. package/src/primitives/reui/scrollspy.tsx +240 -0
  338. package/src/primitives/reui/select.tsx +188 -0
  339. package/src/primitives/reui/separator.tsx +28 -0
  340. package/src/primitives/reui/sheet.tsx +141 -0
  341. package/src/primitives/reui/sidebar.tsx +732 -0
  342. package/src/primitives/reui/skeleton.tsx +13 -0
  343. package/src/primitives/reui/slider.tsx +61 -0
  344. package/src/primitives/reui/sonner.tsx +47 -0
  345. package/src/primitives/reui/sortable.tsx +414 -0
  346. package/src/primitives/reui/spinner.tsx +16 -0
  347. package/src/primitives/reui/stepper.tsx +484 -0
  348. package/src/primitives/reui/svgs/claudeAiIcon.tsx +12 -0
  349. package/src/primitives/reui/svgs/gemini.tsx +171 -0
  350. package/src/primitives/reui/svgs/openai.tsx +9 -0
  351. package/src/primitives/reui/svgs/openaiDark.tsx +12 -0
  352. package/src/primitives/reui/switch.tsx +33 -0
  353. package/src/primitives/reui/table.tsx +114 -0
  354. package/src/primitives/reui/tabs.tsx +91 -0
  355. package/src/primitives/reui/textarea.tsx +18 -0
  356. package/src/primitives/reui/timeline.tsx +219 -0
  357. package/src/primitives/reui/toggle-group.tsx +83 -0
  358. package/src/primitives/reui/toggle.tsx +45 -0
  359. package/src/primitives/reui/tooltip.tsx +55 -0
  360. package/src/primitives/reui/tree.tsx +247 -0
  361. package/src/theme.css +71 -0
  362. package/dist-lib/chunks/subpath-q4Q2zg_p.js +0 -153
@@ -0,0 +1,92 @@
1
+ /**
2
+ * LazyBlock — wrapper that loads a block's data from a separate Inertia prop
3
+ * instead of embedding it in the PageContract.
4
+ *
5
+ * The prop name lives in `block.meta.lazyProp`; that name is the wire token
6
+ * (the top-level page prop, i.e. the `<Deferred data>` / `only:[…]` key). The
7
+ * data is fetched with a native Inertia primitive:
8
+ *
9
+ * - `block.meta.whenVisible === true` → `<WhenVisible>`: fetched when the block
10
+ * scrolls into the viewport (optional `meta.buffer` in px). Best for
11
+ * below-the-fold blocks.
12
+ * - otherwise → `<Deferred>`: Inertia auto-fetches the deferred prop right after
13
+ * the page mounts (the backend marks it with `Inertia::defer()`, which the
14
+ * contract surfaces as `block.deferred`).
15
+ *
16
+ * Both strategies read the resolved data back from `usePage().props[lazyProp]`.
17
+ * If the prop is already present on first load, the primitive renders the block
18
+ * immediately without an extra request.
19
+ */
20
+
21
+ import type { ComponentType, ReactElement } from "react";
22
+ import { Deferred, usePage, WhenVisible } from "@inertiajs/react";
23
+
24
+ import type { BlockDescriptor } from "@/contracts/page-contract";
25
+ import type { BlockProps } from "@/engine/registries";
26
+
27
+ interface LazyBlockProps {
28
+ block: BlockDescriptor;
29
+ Component: ComponentType<BlockProps<Record<string, unknown>>>;
30
+ }
31
+
32
+ interface LazyStrategyProps extends LazyBlockProps {
33
+ lazyProp: string;
34
+ }
35
+
36
+ /** Skeleton shown while a lazy block's data is loading. */
37
+ function LazyFallback(): ReactElement {
38
+ return (
39
+ <div className="animate-pulse space-y-2">
40
+ <div className="bg-muted h-4 w-1/3 rounded" />
41
+ <div className="bg-muted h-32 rounded" />
42
+ </div>
43
+ );
44
+ }
45
+
46
+ /**
47
+ * Reads the resolved lazy prop from the page and renders the block with it.
48
+ * Only mounted by `<Deferred>`/`<WhenVisible>` once the prop has arrived.
49
+ */
50
+ function LazyBlockContent({ block, Component, lazyProp }: LazyStrategyProps): ReactElement {
51
+ const pageProps = usePage().props as Record<string, unknown>;
52
+ const lazyData = pageProps[lazyProp];
53
+
54
+ return <Component block={{ ...block, data: lazyData as Record<string, unknown> }} />;
55
+ }
56
+
57
+ export function LazyBlock({ block, Component }: LazyBlockProps): ReactElement {
58
+ const lazyProp = block.meta?.lazyProp as string | undefined;
59
+
60
+ // No prop name → render eagerly (defensive; isLazyBlock should gate this).
61
+ if (!lazyProp) {
62
+ return <Component block={block} />;
63
+ }
64
+
65
+ // Viewport-triggered: fetch the prop when the block scrolls into view.
66
+ if (block.meta?.whenVisible === true) {
67
+ const buffer = typeof block.meta?.buffer === "number" ? block.meta.buffer : undefined;
68
+ return (
69
+ <WhenVisible data={lazyProp} buffer={buffer} fallback={<LazyFallback />}>
70
+ <LazyBlockContent block={block} Component={Component} lazyProp={lazyProp} />
71
+ </WhenVisible>
72
+ );
73
+ }
74
+
75
+ // Default: deferred prop, auto-fetched by Inertia after mount.
76
+ return (
77
+ <Deferred data={lazyProp} fallback={<LazyFallback />}>
78
+ <LazyBlockContent block={block} Component={Component} lazyProp={lazyProp} />
79
+ </Deferred>
80
+ );
81
+ }
82
+
83
+ /**
84
+ * Check if a block descriptor uses lazy loading.
85
+ *
86
+ * Keyed on `meta.lazyProp` (the wire token / prop name) — `deferred` and
87
+ * `whenVisible` only select the loading strategy and are inert without it.
88
+ */
89
+ // eslint-disable-next-line react-refresh/only-export-components
90
+ export function isLazyBlock(block: BlockDescriptor): boolean {
91
+ return typeof block.meta?.lazyProp === "string";
92
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * bootstrap — mounts a PageContract-driven React app at a DOM target.
3
+ */
4
+
5
+ import { StrictMode } from "react";
6
+ import { createRoot } from "react-dom/client";
7
+
8
+ import type { PageContract } from "@/contracts/page-contract";
9
+ import { ContractPage } from "@/engine/ContractPage";
10
+ import { registerDefaults } from "@/engine/register-defaults";
11
+
12
+ export function mountContract(target: HTMLElement, contract: PageContract): void {
13
+ registerDefaults();
14
+ const root = createRoot(target);
15
+ root.render(
16
+ <StrictMode>
17
+ <ContractPage contract={contract} />
18
+ </StrictMode>,
19
+ );
20
+ }
@@ -0,0 +1,87 @@
1
+ /**
2
+ * AuthProvider — React context for authenticated user data and capability checks.
3
+ *
4
+ * Reads auth from Inertia shared props populated by inertia_shared_props.php.
5
+ *
6
+ * @see NV-05-ux-shell-sidebar.md §1.3
7
+ */
8
+
9
+ import { createContext, useContext, useMemo, type ReactNode } from "react";
10
+ import { usePage } from "@inertiajs/react";
11
+
12
+ import type { SharedProps } from "@/contracts/shared-props";
13
+
14
+ interface AuthContextValue {
15
+ /** Authenticated user, or null on guest pages (no `auth` shared prop). */
16
+ user: { id: number; name: string; email: string; avatarUrl?: string } | null;
17
+ capabilities: string[];
18
+ can: (capability: string) => boolean;
19
+ /** True when an authenticated user is present. False for guests. */
20
+ isAuthenticated: boolean;
21
+ }
22
+
23
+ const AuthContext = createContext<AuthContextValue | null>(null);
24
+
25
+ export function AuthProvider({ children }: { children: ReactNode }) {
26
+ const { props } = usePage<SharedProps>();
27
+ // `auth` is optional/null on guest-facing pages (login). Tolerate its absence
28
+ // instead of dereferencing it — a missing user is a valid state, not a crash.
29
+ const auth = props.auth ?? null;
30
+
31
+ const value = useMemo<AuthContextValue>(() => {
32
+ if (!auth) {
33
+ return {
34
+ user: null,
35
+ capabilities: [],
36
+ can: () => false,
37
+ isAuthenticated: false,
38
+ };
39
+ }
40
+ const capabilities = auth.capabilities ?? [];
41
+ return {
42
+ user: {
43
+ id: auth.id,
44
+ name: auth.name,
45
+ email: auth.email,
46
+ avatarUrl: auth.avatarUrl,
47
+ },
48
+ capabilities,
49
+ can: (cap: string) => capabilities.includes(cap),
50
+ isAuthenticated: true,
51
+ };
52
+ }, [auth]);
53
+
54
+ return <AuthContext.Provider value={value}>{children}</AuthContext.Provider>;
55
+ }
56
+
57
+ /**
58
+ * Access authenticated user and capability check function.
59
+ *
60
+ * @example
61
+ * const { user, can } = useAuth();
62
+ * if (can('local/middag:manage')) { ... }
63
+ */
64
+ // eslint-disable-next-line react-refresh/only-export-components
65
+ export function useAuth(): AuthContextValue {
66
+ const ctx = useContext(AuthContext);
67
+ if (!ctx) {
68
+ throw new Error(
69
+ "[@middag-io/react] useAuth must be used within <AuthProvider>. " +
70
+ "Wrap your app root with <AuthProvider>. " +
71
+ "Docs: https://ui-docs.middag.io/guides/providers",
72
+ );
73
+ }
74
+ return ctx;
75
+ }
76
+
77
+ /** Render children only if user has the capability. */
78
+ export function Can({ capability, children }: { capability: string; children: ReactNode }) {
79
+ const { can } = useAuth();
80
+ return can(capability) ? <>{children}</> : null;
81
+ }
82
+
83
+ /** Render children only if user does NOT have the capability. */
84
+ export function Cannot({ capability, children }: { capability: string; children: ReactNode }) {
85
+ const { can } = useAuth();
86
+ return can(capability) ? null : <>{children}</>;
87
+ }
@@ -0,0 +1,89 @@
1
+ /**
2
+ * ErrorReporter — pluggable error telemetry for lib components.
3
+ *
4
+ * The lib never depends on a specific error SDK. Consumers inject their
5
+ * preferred reporter (Sentry, New Relic, Datadog, or console).
6
+ *
7
+ * @example
8
+ * // Sentry integration
9
+ * import * as Sentry from '@sentry/react';
10
+ *
11
+ * const sentryReporter: ErrorReporter = {
12
+ * captureError: (error, context) => Sentry.captureException(error, { extra: context }),
13
+ * captureMessage: (message, context) => Sentry.captureMessage(message, { extra: context }),
14
+ * };
15
+ *
16
+ * <ErrorReporterProvider reporter={sentryReporter}>
17
+ * <App />
18
+ * </ErrorReporterProvider>
19
+ *
20
+ * @example
21
+ * // New Relic integration
22
+ * const newRelicReporter: ErrorReporter = {
23
+ * captureError: (error, context) => newrelic.noticeError(error, context),
24
+ * captureMessage: (message, context) => newrelic.noticeError(new Error(message), context),
25
+ * };
26
+ *
27
+ * @example
28
+ * // No reporter — falls back to console.error (default)
29
+ * <ErrorReporterProvider>
30
+ * <App />
31
+ * </ErrorReporterProvider>
32
+ */
33
+
34
+ import { createContext, useContext, type ReactNode } from "react";
35
+
36
+ export interface ErrorContext {
37
+ /** Component or module that originated the error */
38
+ component?: string;
39
+ /** Block type key (e.g. 'dense_table') */
40
+ block?: string;
41
+ /** User action that triggered the error (e.g. 'form_submit') */
42
+ action?: string;
43
+ /** Arbitrary extra data */
44
+ [key: string]: unknown;
45
+ }
46
+
47
+ export interface ErrorReporter {
48
+ /** Report a caught Error object with optional context */
49
+ captureError: (error: Error, context?: ErrorContext) => void;
50
+ /** Report a message-level event (non-fatal) */
51
+ captureMessage?: (message: string, context?: ErrorContext) => void;
52
+ }
53
+
54
+ const consoleReporter: ErrorReporter = {
55
+ captureError: (error, context) => {
56
+ console.error("[MIDDAG]", error, context);
57
+ },
58
+ captureMessage: (message, context) => {
59
+ console.warn("[MIDDAG]", message, context);
60
+ },
61
+ };
62
+
63
+ const ErrorReporterContext = createContext<ErrorReporter>(consoleReporter);
64
+
65
+ interface ErrorReporterProviderProps {
66
+ children: ReactNode;
67
+ reporter?: ErrorReporter;
68
+ }
69
+
70
+ export function ErrorReporterProvider({
71
+ children,
72
+ reporter = consoleReporter,
73
+ }: ErrorReporterProviderProps) {
74
+ return <ErrorReporterContext value={reporter}>{children}</ErrorReporterContext>;
75
+ }
76
+
77
+ /**
78
+ * Access the error reporter in any component.
79
+ *
80
+ * @example
81
+ * const reporter = useErrorReporter();
82
+ * try { ... } catch (err) {
83
+ * reporter.captureError(err as Error, { component: 'MyComponent' });
84
+ * }
85
+ */
86
+ // eslint-disable-next-line react-refresh/only-export-components
87
+ export function useErrorReporter(): ErrorReporter {
88
+ return useContext(ErrorReporterContext);
89
+ }
@@ -0,0 +1,44 @@
1
+ /**
2
+ * FlashProvider — consumes Inertia flash messages and displays Sonner toasts.
3
+ *
4
+ * Flash messages are server-sent one-shot notifications (success/error/info/warning).
5
+ * This provider listens to flash prop changes on each Inertia navigation and
6
+ * fires the appropriate toast. Does not re-fire if flash is unchanged.
7
+ *
8
+ * @see NV-05-ux-shell-sidebar.md §1.3
9
+ */
10
+
11
+ import { useEffect, useRef, type ReactNode } from "react";
12
+ import { usePage } from "@inertiajs/react";
13
+ import { toast } from "sonner";
14
+
15
+ import type { SharedProps } from "@/contracts/shared-props";
16
+
17
+ export function FlashProvider({ children }: { children: ReactNode }) {
18
+ const { props } = usePage<SharedProps>();
19
+ const flash = props.flash;
20
+
21
+ // Track last processed flash to avoid duplicate toasts on re-renders
22
+ // that are not caused by new navigation (e.g., state updates in parent).
23
+ const lastFlashRef = useRef<typeof flash>(null);
24
+
25
+ useEffect(() => {
26
+ if (!flash) return;
27
+
28
+ // Stringify comparison — only fire if flash content changed
29
+ if (JSON.stringify(flash) === JSON.stringify(lastFlashRef.current)) return;
30
+ lastFlashRef.current = flash;
31
+
32
+ if (flash.success) toast.success(flash.success);
33
+ if (flash.error) toast.error(flash.error);
34
+ if (flash.info) toast.info(flash.info);
35
+ if (flash.warning) toast.warning(flash.warning);
36
+ if (flash.toast) {
37
+ toast[flash.toast.severity](flash.toast.message, {
38
+ duration: flash.toast.duration ?? 5000,
39
+ });
40
+ }
41
+ }, [flash]);
42
+
43
+ return <>{children}</>;
44
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Provider barrel — re-exports all providers for convenient imports.
3
+ *
4
+ * Consumers can import from "@/engine/providers" instead of individual files.
5
+ * i18n moved to the i18next stack — import I18nProvider/useTranslation/etc.
6
+ * from the package root ("@middag-io/react") or "@/i18n/*".
7
+ */
8
+
9
+ export { AuthProvider, useAuth, Can, Cannot } from "./auth";
10
+ export { FlashProvider } from "./flash";
11
+ export { ScopeProvider, useScope, useScopeKey, type ScopeContextValue } from "./scope";
12
+ export { ProgressProvider } from "./progress";
13
+ export {
14
+ ErrorReporterProvider,
15
+ useErrorReporter,
16
+ type ErrorReporter,
17
+ type ErrorContext,
18
+ } from "./error-reporter";
@@ -0,0 +1,61 @@
1
+ /**
2
+ * InertiaErrorReporter — routes Inertia transport failures to telemetry + UX.
3
+ *
4
+ * Inertia v3 emits `httpException` (the server returned an error response) and
5
+ * `networkError` (the request never completed). With no handler wired, both
6
+ * vanish silently. This headless, pass-through component forwards them to the
7
+ * injected {@link ErrorReporter} (telemetry) and surfaces a toast so the user
8
+ * sees the failure.
9
+ *
10
+ * Mount it inside `ErrorReporterProvider` + `I18nProvider`, alongside the
11
+ * `Toaster`. It owns no context — it only subscribes to router events.
12
+ *
13
+ * @example
14
+ * <ErrorReporterProvider reporter={sentryReporter}>
15
+ * <I18nProvider>
16
+ * <InertiaErrorReporter>
17
+ * <App />
18
+ * </InertiaErrorReporter>
19
+ * </I18nProvider>
20
+ * </ErrorReporterProvider>
21
+ */
22
+
23
+ import { useEffect, type ReactNode } from "react";
24
+ import { router } from "@inertiajs/core";
25
+ import { toast } from "sonner";
26
+
27
+ import { useTranslation } from "@/i18n/useTranslation";
28
+
29
+ import { useErrorReporter } from "./error-reporter";
30
+
31
+ export function InertiaErrorReporter({ children }: { children: ReactNode }) {
32
+ const reporter = useErrorReporter();
33
+ const { t } = useTranslation();
34
+
35
+ useEffect(() => {
36
+ const offHttp = router.on("httpException", (event) => {
37
+ const { status } = event.detail.response;
38
+ reporter.captureError(new Error(`Inertia HTTP exception (${status})`), {
39
+ component: "inertia",
40
+ action: "httpException",
41
+ status,
42
+ });
43
+ toast.error(t("middag.ui.errors.http"));
44
+ });
45
+
46
+ const offNetwork = router.on("networkError", (event) => {
47
+ reporter.captureError(event.detail.error, {
48
+ component: "inertia",
49
+ action: "networkError",
50
+ });
51
+ toast.error(t("middag.ui.errors.network"));
52
+ });
53
+
54
+ return () => {
55
+ offHttp();
56
+ offNetwork();
57
+ };
58
+ }, [reporter, t]);
59
+
60
+ return <>{children}</>;
61
+ }
@@ -0,0 +1,56 @@
1
+ /**
2
+ * ProgressProvider — NProgress integration for Inertia SPA navigation.
3
+ *
4
+ * Hooks into Inertia router events to show a thin progress bar at the
5
+ * top of the viewport during page transitions.
6
+ *
7
+ * @see NV-05-ux-shell-sidebar.md §6.3
8
+ */
9
+
10
+ import { useEffect, type ReactNode } from "react";
11
+ import { router } from "@inertiajs/core";
12
+ import NProgress from "nprogress";
13
+
14
+ // Configure NProgress — disable spinner (we use Lucide), set minimum
15
+ NProgress.configure({
16
+ showSpinner: false,
17
+ minimum: 0.08,
18
+ speed: 200,
19
+ trickleSpeed: 200,
20
+ });
21
+
22
+ export function ProgressProvider({ children }: { children: ReactNode }) {
23
+ useEffect(() => {
24
+ // Start on navigation begin
25
+ const startProgress = router.on("start", () => {
26
+ NProgress.start();
27
+ });
28
+
29
+ // Complete on finish
30
+ const finishProgress = router.on("finish", (event) => {
31
+ if (event.detail.visit.completed) {
32
+ NProgress.done();
33
+ } else if (event.detail.visit.interrupted) {
34
+ NProgress.set(0);
35
+ } else {
36
+ // Visit was cancelled or failed
37
+ NProgress.done();
38
+ // Briefly flash bar in destructive color on error
39
+ const bar = document.querySelector("#nprogress .bar") as HTMLElement | null;
40
+ if (bar) {
41
+ bar.style.background = "var(--destructive)";
42
+ setTimeout(() => {
43
+ bar.style.background = "";
44
+ }, 600);
45
+ }
46
+ }
47
+ });
48
+
49
+ return () => {
50
+ startProgress();
51
+ finishProgress();
52
+ };
53
+ }, []);
54
+
55
+ return <>{children}</>;
56
+ }
@@ -0,0 +1,51 @@
1
+ /**
2
+ * ScopeProvider — React context for global scope data.
3
+ *
4
+ * Reads the `scope` Inertia shared prop serialized by http_kernel from
5
+ * global_scope_manager. Extensions add their scope data during boot().
6
+ *
7
+ * @see classes/framework/kernel/manager/global_scope_manager.php
8
+ * @see NV-05-ux-shell-sidebar.md §1.3
9
+ */
10
+
11
+ import { createContext, useContext, useMemo, type ReactNode } from "react";
12
+ import { usePage } from "@inertiajs/react";
13
+
14
+ import type { SharedProps } from "@/contracts/shared-props";
15
+
16
+ /** Scope context value — dynamic keys registered by PHP extensions via boot() */
17
+ export type ScopeContextValue = Record<string, unknown>;
18
+
19
+ const ScopeContext = createContext<ScopeContextValue>({});
20
+
21
+ export function ScopeProvider({ children }: { children: ReactNode }) {
22
+ const { props } = usePage<SharedProps>();
23
+ const scope = useMemo(() => props.scope ?? {}, [props.scope]);
24
+
25
+ return <ScopeContext.Provider value={scope}>{children}</ScopeContext.Provider>;
26
+ }
27
+
28
+ /**
29
+ * Access global scope data in any component.
30
+ * Returns the full scope object — components read specific keys.
31
+ *
32
+ * @example
33
+ * const scope = useScope();
34
+ * const orgId = scope.organization?.id;
35
+ */
36
+ // eslint-disable-next-line react-refresh/only-export-components
37
+ export function useScope(): ScopeContextValue {
38
+ return useContext(ScopeContext);
39
+ }
40
+
41
+ /**
42
+ * Type-safe scope accessor for known scope keys.
43
+ *
44
+ * @example
45
+ * const org = useScopeKey<{ id: number; name: string; slug: string }>('organization');
46
+ */
47
+ // eslint-disable-next-line react-refresh/only-export-components
48
+ export function useScopeKey<T>(key: string): T | undefined {
49
+ const scope = useScope();
50
+ return scope[key] as T | undefined;
51
+ }
@@ -0,0 +1,88 @@
1
+ /**
2
+ * register-defaults — populates the registries with core shells,
3
+ * layouts and the standard Community block types available out-of-the-box.
4
+ *
5
+ * The 6 heavy/interactive blocks (chart_panel, flow_editor, condition_tree,
6
+ * sentence_builder, form_builder, kanban_board) and the rich ProductShell +
7
+ * chrome are Pro: they register via @middag-io/react-pro's registerProDefaults()
8
+ * (which overrides the `product` shell fallback). The Community engine ships the
9
+ * ImmersiveShell + the standard Community blocks (form_panel included — heavy deps lazy).
10
+ *
11
+ * IIFE consumers (WordPress) should NOT call this function. Instead, import
12
+ * individual blocks from the barrel and call registerBlock() selectively to
13
+ * avoid bundling heavy deps via inlineDynamicImports.
14
+ */
15
+
16
+ import { ActionGridBlock } from "@/base/blocks/ActionGridBlock";
17
+ import { ActivityTimelineBlock } from "@/base/blocks/ActivityTimelineBlock";
18
+ import { CardGridBlock } from "@/base/blocks/CardGridBlock";
19
+ import { ChartBlock } from "@/base/blocks/ChartBlock";
20
+ import { DenseTableBlock } from "@/base/blocks/DenseTableBlock";
21
+ import { DetailPanelBlock } from "@/base/blocks/DetailPanelBlock";
22
+ import { EmptyStateBlock } from "@/base/blocks/EmptyStateBlock";
23
+ import { FormPanelBlockLazy } from "@/base/blocks/FormPanelBlock.lazy";
24
+ import { LinkListBlock } from "@/base/blocks/LinkListBlock";
25
+ import { MarkdownPanelBlock } from "@/base/blocks/MarkdownPanelBlock";
26
+ import { MetricCardBlock } from "@/base/blocks/MetricCardBlock";
27
+ import { StatusStripBlock } from "@/base/blocks/StatusStripBlock";
28
+ import { TabsBlock } from "@/base/blocks/TabsBlock";
29
+ import { registerDefaultFields } from "@/base/form/fields/register-default-fields";
30
+ import { DashboardLayout } from "@/base/layout/DashboardLayout";
31
+ import { SidebarLayout } from "@/base/layout/SidebarLayout";
32
+ import { StackLayout } from "@/base/layout/StackLayout";
33
+ import { WizardLayout } from "@/base/layout/WizardLayout";
34
+ import { registerDefaultCells } from "@/base/partials/DataTable/register-default-cells";
35
+ import { AuthShell } from "@/base/shell/AuthShell";
36
+ import { BasicShell } from "@/base/shell/BasicShell";
37
+ import { ImmersiveShell } from "@/base/shell/ImmersiveShell";
38
+ import { registerDefaultIcons } from "@/base/utils/register-default-icons";
39
+ import { registerBlock, registerLayout, registerShell } from "@/engine/registries";
40
+
41
+ let registered = false;
42
+
43
+ export function registerDefaults(): void {
44
+ if (registered) return;
45
+ registered = true;
46
+
47
+ // Shells — the Community engine ships BasicShell (simple sidebar + header) and
48
+ // ImmersiveShell (focused, no sidebar). The rich `product` shell registers
49
+ // via @middag-io/react-pro's registerProDefaults().
50
+ registerShell("basic", BasicShell);
51
+ registerShell("immersive", ImmersiveShell);
52
+ // `auth` — chromeless centered card for guest entry points (login).
53
+ registerShell("auth", AuthShell);
54
+
55
+ // Layouts
56
+ registerLayout("stack", StackLayout);
57
+ registerLayout("sidebar", SidebarLayout);
58
+ registerLayout("dashboard", DashboardLayout);
59
+ registerLayout("wizard", WizardLayout);
60
+
61
+ // Blocks (standard Community — the remaining Pro/interactive blocks register via @middag-io/react-pro)
62
+ registerBlock("dense_table", DenseTableBlock);
63
+ registerBlock("empty_state", EmptyStateBlock);
64
+ registerBlock("metric_card", MetricCardBlock);
65
+ registerBlock("status_strip", StatusStripBlock);
66
+ registerBlock("detail_panel", DetailPanelBlock);
67
+ registerBlock("activity_timeline", ActivityTimelineBlock);
68
+ registerBlock("markdown_panel", MarkdownPanelBlock);
69
+ registerBlock("card_grid", CardGridBlock);
70
+ registerBlock("action_grid", ActionGridBlock);
71
+ registerBlock("link_list", LinkListBlock);
72
+ registerBlock("tabs", TabsBlock);
73
+ // form_panel ships in the Community engine but its heavy deps (react-hook-form
74
+ // + zod) are code-split: FormPanelBlockLazy loads the real block on first render.
75
+ registerBlock("form_panel", FormPanelBlockLazy);
76
+ // chart — free-tier line/bar/area renderer. The richer `chart_panel` (pie,
77
+ // playground, config UI) is Pro.
78
+ registerBlock("chart", ChartBlock);
79
+
80
+ // Form field components
81
+ registerDefaultFields();
82
+
83
+ // Icons (block icons + navigation icons + entity icons)
84
+ registerDefaultIcons();
85
+
86
+ // Cell renderers (DataTable column types)
87
+ registerDefaultCells();
88
+ }