@pilotiq/pilotiq 0.7.2 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (371) hide show
  1. package/.turbo/turbo-build.log +2 -2
  2. package/CHANGELOG.md +208 -0
  3. package/CLAUDE.md +59 -3
  4. package/dist/Pilotiq.d.ts +83 -0
  5. package/dist/Pilotiq.d.ts.map +1 -1
  6. package/dist/Pilotiq.js +39 -0
  7. package/dist/Pilotiq.js.map +1 -1
  8. package/dist/actions/Action.d.ts +27 -99
  9. package/dist/actions/Action.d.ts.map +1 -1
  10. package/dist/actions/Action.js +52 -754
  11. package/dist/actions/Action.js.map +1 -1
  12. package/dist/actions/bulkFactories.d.ts +46 -0
  13. package/dist/actions/bulkFactories.d.ts.map +1 -0
  14. package/dist/actions/bulkFactories.js +144 -0
  15. package/dist/actions/bulkFactories.js.map +1 -0
  16. package/dist/actions/crudFactories.d.ts +94 -0
  17. package/dist/actions/crudFactories.d.ts.map +1 -0
  18. package/dist/actions/crudFactories.js +209 -0
  19. package/dist/actions/crudFactories.js.map +1 -0
  20. package/dist/actions/factoryHelpers.d.ts +108 -0
  21. package/dist/actions/factoryHelpers.d.ts.map +1 -0
  22. package/dist/actions/factoryHelpers.js +138 -0
  23. package/dist/actions/factoryHelpers.js.map +1 -0
  24. package/dist/actions/m2mFactories.d.ts +47 -0
  25. package/dist/actions/m2mFactories.d.ts.map +1 -0
  26. package/dist/actions/m2mFactories.js +173 -0
  27. package/dist/actions/m2mFactories.js.map +1 -0
  28. package/dist/actions/relationFactories.d.ts +93 -0
  29. package/dist/actions/relationFactories.d.ts.map +1 -0
  30. package/dist/actions/relationFactories.js +321 -0
  31. package/dist/actions/relationFactories.js.map +1 -0
  32. package/dist/elements/dispatchForm.js +1 -1
  33. package/dist/elements/dispatchForm.js.map +1 -1
  34. package/dist/elements/dispatchTable.js +1 -1
  35. package/dist/elements/dispatchTable.js.map +1 -1
  36. package/dist/fields/Field.d.ts +31 -0
  37. package/dist/fields/Field.d.ts.map +1 -1
  38. package/dist/fields/Field.js +25 -0
  39. package/dist/fields/Field.js.map +1 -1
  40. package/dist/pageData/breadcrumbs.d.ts +42 -0
  41. package/dist/pageData/breadcrumbs.d.ts.map +1 -0
  42. package/dist/pageData/breadcrumbs.js +172 -0
  43. package/dist/pageData/breadcrumbs.js.map +1 -0
  44. package/dist/pageData/forms.d.ts +137 -0
  45. package/dist/pageData/forms.d.ts.map +1 -0
  46. package/dist/pageData/forms.js +427 -0
  47. package/dist/pageData/forms.js.map +1 -0
  48. package/dist/pageData/helpers.d.ts +239 -0
  49. package/dist/pageData/helpers.d.ts.map +1 -0
  50. package/dist/pageData/helpers.js +703 -0
  51. package/dist/pageData/helpers.js.map +1 -0
  52. package/dist/pageData/misc.d.ts +76 -0
  53. package/dist/pageData/misc.d.ts.map +1 -0
  54. package/dist/pageData/misc.js +263 -0
  55. package/dist/pageData/misc.js.map +1 -0
  56. package/dist/pageData/navigation.d.ts +292 -0
  57. package/dist/pageData/navigation.d.ts.map +1 -0
  58. package/dist/pageData/navigation.js +591 -0
  59. package/dist/pageData/navigation.js.map +1 -0
  60. package/dist/pageData/relationPages.d.ts +172 -0
  61. package/dist/pageData/relationPages.d.ts.map +1 -0
  62. package/dist/pageData/relationPages.js +867 -0
  63. package/dist/pageData/relationPages.js.map +1 -0
  64. package/dist/pageData/relationTabs.d.ts +65 -0
  65. package/dist/pageData/relationTabs.d.ts.map +1 -0
  66. package/dist/pageData/relationTabs.js +258 -0
  67. package/dist/pageData/relationTabs.js.map +1 -0
  68. package/dist/pageData/resourcePages.d.ts +48 -0
  69. package/dist/pageData/resourcePages.d.ts.map +1 -0
  70. package/dist/pageData/resourcePages.js +504 -0
  71. package/dist/pageData/resourcePages.js.map +1 -0
  72. package/dist/pageData.d.ts +12 -792
  73. package/dist/pageData.d.ts.map +1 -1
  74. package/dist/pageData.js +24 -3797
  75. package/dist/pageData.js.map +1 -1
  76. package/dist/react/AppShell.d.ts +8 -0
  77. package/dist/react/AppShell.d.ts.map +1 -1
  78. package/dist/react/AppShell.js +11 -1
  79. package/dist/react/AppShell.js.map +1 -1
  80. package/dist/react/CollabExtensionFactoryRegistry.d.ts +47 -0
  81. package/dist/react/CollabExtensionFactoryRegistry.d.ts.map +1 -0
  82. package/dist/react/CollabExtensionFactoryRegistry.js +14 -0
  83. package/dist/react/CollabExtensionFactoryRegistry.js.map +1 -0
  84. package/dist/react/CollabRoomContext.d.ts +37 -0
  85. package/dist/react/CollabRoomContext.d.ts.map +1 -0
  86. package/dist/react/CollabRoomContext.js +12 -0
  87. package/dist/react/CollabRoomContext.js.map +1 -0
  88. package/dist/react/FormCollabBindingRegistry.d.ts +62 -0
  89. package/dist/react/FormCollabBindingRegistry.d.ts.map +1 -0
  90. package/dist/react/FormCollabBindingRegistry.js +14 -0
  91. package/dist/react/FormCollabBindingRegistry.js.map +1 -0
  92. package/dist/react/FormStateContext.d.ts.map +1 -1
  93. package/dist/react/FormStateContext.js +87 -0
  94. package/dist/react/FormStateContext.js.map +1 -1
  95. package/dist/react/RecordWrapperGate.d.ts +25 -0
  96. package/dist/react/RecordWrapperGate.d.ts.map +1 -0
  97. package/dist/react/RecordWrapperGate.js +30 -0
  98. package/dist/react/RecordWrapperGate.js.map +1 -0
  99. package/dist/react/RecordWrapperRegistry.d.ts +31 -0
  100. package/dist/react/RecordWrapperRegistry.d.ts.map +1 -0
  101. package/dist/react/RecordWrapperRegistry.js +15 -0
  102. package/dist/react/RecordWrapperRegistry.js.map +1 -0
  103. package/dist/react/SchemaRenderer.d.ts +17 -23
  104. package/dist/react/SchemaRenderer.d.ts.map +1 -1
  105. package/dist/react/SchemaRenderer.js +71 -3647
  106. package/dist/react/SchemaRenderer.js.map +1 -1
  107. package/dist/react/component-slots.d.ts +103 -0
  108. package/dist/react/component-slots.d.ts.map +1 -0
  109. package/dist/react/component-slots.js +18 -0
  110. package/dist/react/component-slots.js.map +1 -0
  111. package/dist/react/fields/BuilderInput.d.ts.map +1 -1
  112. package/dist/react/fields/BuilderInput.js +21 -117
  113. package/dist/react/fields/BuilderInput.js.map +1 -1
  114. package/dist/react/fields/MarkdownInput.d.ts.map +1 -1
  115. package/dist/react/fields/MarkdownInput.js +1 -3
  116. package/dist/react/fields/MarkdownInput.js.map +1 -1
  117. package/dist/react/fields/RepeaterInput.d.ts.map +1 -1
  118. package/dist/react/fields/RepeaterInput.js +22 -127
  119. package/dist/react/fields/RepeaterInput.js.map +1 -1
  120. package/dist/react/fields/rowState.d.ts +40 -0
  121. package/dist/react/fields/rowState.d.ts.map +1 -0
  122. package/dist/react/fields/rowState.js +60 -0
  123. package/dist/react/fields/rowState.js.map +1 -0
  124. package/dist/react/fields/useRowReorderDnd.d.ts +28 -0
  125. package/dist/react/fields/useRowReorderDnd.d.ts.map +1 -0
  126. package/dist/react/fields/useRowReorderDnd.js +51 -0
  127. package/dist/react/fields/useRowReorderDnd.js.map +1 -0
  128. package/dist/react/index.d.ts +9 -0
  129. package/dist/react/index.d.ts.map +1 -1
  130. package/dist/react/index.js +8 -0
  131. package/dist/react/index.js.map +1 -1
  132. package/dist/react/layouts/SidebarLayout.d.ts +1 -1
  133. package/dist/react/layouts/SidebarLayout.d.ts.map +1 -1
  134. package/dist/react/layouts/SidebarLayout.js +10 -2
  135. package/dist/react/layouts/SidebarLayout.js.map +1 -1
  136. package/dist/react/layouts/TopbarLayout.d.ts +1 -1
  137. package/dist/react/layouts/TopbarLayout.d.ts.map +1 -1
  138. package/dist/react/layouts/TopbarLayout.js +19 -11
  139. package/dist/react/layouts/TopbarLayout.js.map +1 -1
  140. package/dist/react/parseRecordEditUrl.d.ts +29 -0
  141. package/dist/react/parseRecordEditUrl.d.ts.map +1 -0
  142. package/dist/react/parseRecordEditUrl.js +25 -0
  143. package/dist/react/parseRecordEditUrl.js.map +1 -0
  144. package/dist/react/persistedState.d.ts +19 -0
  145. package/dist/react/persistedState.d.ts.map +1 -0
  146. package/dist/react/persistedState.js +51 -0
  147. package/dist/react/persistedState.js.map +1 -0
  148. package/dist/react/schemaRenderer/AlertRenderer.d.ts +12 -0
  149. package/dist/react/schemaRenderer/AlertRenderer.d.ts.map +1 -0
  150. package/dist/react/schemaRenderer/AlertRenderer.js +61 -0
  151. package/dist/react/schemaRenderer/AlertRenderer.js.map +1 -0
  152. package/dist/react/schemaRenderer/EntryRenderer.d.ts +13 -0
  153. package/dist/react/schemaRenderer/EntryRenderer.d.ts.map +1 -0
  154. package/dist/react/schemaRenderer/EntryRenderer.js +277 -0
  155. package/dist/react/schemaRenderer/EntryRenderer.js.map +1 -0
  156. package/dist/react/schemaRenderer/SectionRenderer.d.ts +16 -0
  157. package/dist/react/schemaRenderer/SectionRenderer.d.ts.map +1 -0
  158. package/dist/react/schemaRenderer/SectionRenderer.js +62 -0
  159. package/dist/react/schemaRenderer/SectionRenderer.js.map +1 -0
  160. package/dist/react/schemaRenderer/SimpleElements.d.ts +25 -0
  161. package/dist/react/schemaRenderer/SimpleElements.d.ts.map +1 -0
  162. package/dist/react/schemaRenderer/SimpleElements.js +147 -0
  163. package/dist/react/schemaRenderer/SimpleElements.js.map +1 -0
  164. package/dist/react/schemaRenderer/TabsRenderer.d.ts +17 -0
  165. package/dist/react/schemaRenderer/TabsRenderer.d.ts.map +1 -0
  166. package/dist/react/schemaRenderer/TabsRenderer.js +31 -0
  167. package/dist/react/schemaRenderer/TabsRenderer.js.map +1 -0
  168. package/dist/react/schemaRenderer/WizardRenderer.d.ts +34 -0
  169. package/dist/react/schemaRenderer/WizardRenderer.d.ts.map +1 -0
  170. package/dist/react/schemaRenderer/WizardRenderer.js +208 -0
  171. package/dist/react/schemaRenderer/WizardRenderer.js.map +1 -0
  172. package/dist/react/schemaRenderer/action/ActionGroupTrigger.d.ts +21 -0
  173. package/dist/react/schemaRenderer/action/ActionGroupTrigger.d.ts.map +1 -0
  174. package/dist/react/schemaRenderer/action/ActionGroupTrigger.js +82 -0
  175. package/dist/react/schemaRenderer/action/ActionGroupTrigger.js.map +1 -0
  176. package/dist/react/schemaRenderer/action/ActionModalDialog.d.ts +30 -0
  177. package/dist/react/schemaRenderer/action/ActionModalDialog.d.ts.map +1 -0
  178. package/dist/react/schemaRenderer/action/ActionModalDialog.js +182 -0
  179. package/dist/react/schemaRenderer/action/ActionModalDialog.js.map +1 -0
  180. package/dist/react/schemaRenderer/action/ConfirmActionDialog.d.ts +17 -0
  181. package/dist/react/schemaRenderer/action/ConfirmActionDialog.d.ts.map +1 -0
  182. package/dist/react/schemaRenderer/action/ConfirmActionDialog.js +19 -0
  183. package/dist/react/schemaRenderer/action/ConfirmActionDialog.js.map +1 -0
  184. package/dist/react/schemaRenderer/action/HandlerActionButton.d.ts +16 -0
  185. package/dist/react/schemaRenderer/action/HandlerActionButton.d.ts.map +1 -0
  186. package/dist/react/schemaRenderer/action/HandlerActionButton.js +16 -0
  187. package/dist/react/schemaRenderer/action/HandlerActionButton.js.map +1 -0
  188. package/dist/react/schemaRenderer/action/MethodActionButton.d.ts +22 -0
  189. package/dist/react/schemaRenderer/action/MethodActionButton.d.ts.map +1 -0
  190. package/dist/react/schemaRenderer/action/MethodActionButton.js +26 -0
  191. package/dist/react/schemaRenderer/action/MethodActionButton.js.map +1 -0
  192. package/dist/react/schemaRenderer/action/buttons.d.ts +18 -0
  193. package/dist/react/schemaRenderer/action/buttons.d.ts.map +1 -0
  194. package/dist/react/schemaRenderer/action/buttons.js +74 -0
  195. package/dist/react/schemaRenderer/action/buttons.js.map +1 -0
  196. package/dist/react/schemaRenderer/action/helpers.d.ts +26 -0
  197. package/dist/react/schemaRenderer/action/helpers.d.ts.map +1 -0
  198. package/dist/react/schemaRenderer/action/helpers.js +126 -0
  199. package/dist/react/schemaRenderer/action/helpers.js.map +1 -0
  200. package/dist/react/schemaRenderer/action/renderAction.d.ts +21 -0
  201. package/dist/react/schemaRenderer/action/renderAction.d.ts.map +1 -0
  202. package/dist/react/schemaRenderer/action/renderAction.js +102 -0
  203. package/dist/react/schemaRenderer/action/renderAction.js.map +1 -0
  204. package/dist/react/schemaRenderer/columnFormat.d.ts +10 -0
  205. package/dist/react/schemaRenderer/columnFormat.d.ts.map +1 -0
  206. package/dist/react/schemaRenderer/columnFormat.js +76 -0
  207. package/dist/react/schemaRenderer/columnFormat.js.map +1 -0
  208. package/dist/react/schemaRenderer/constants.d.ts +8 -0
  209. package/dist/react/schemaRenderer/constants.d.ts.map +1 -0
  210. package/dist/react/schemaRenderer/constants.js +45 -0
  211. package/dist/react/schemaRenderer/constants.js.map +1 -0
  212. package/dist/react/schemaRenderer/form/FormRenderer.d.ts +29 -0
  213. package/dist/react/schemaRenderer/form/FormRenderer.d.ts.map +1 -0
  214. package/dist/react/schemaRenderer/form/FormRenderer.js +163 -0
  215. package/dist/react/schemaRenderer/form/FormRenderer.js.map +1 -0
  216. package/dist/react/schemaRenderer/form/renderField.d.ts +6 -0
  217. package/dist/react/schemaRenderer/form/renderField.d.ts.map +1 -0
  218. package/dist/react/schemaRenderer/form/renderField.js +239 -0
  219. package/dist/react/schemaRenderer/form/renderField.js.map +1 -0
  220. package/dist/react/schemaRenderer/helpers.d.ts +32 -0
  221. package/dist/react/schemaRenderer/helpers.d.ts.map +1 -0
  222. package/dist/react/schemaRenderer/helpers.js +52 -0
  223. package/dist/react/schemaRenderer/helpers.js.map +1 -0
  224. package/dist/react/schemaRenderer/table/CardsLayoutBody.d.ts +60 -0
  225. package/dist/react/schemaRenderer/table/CardsLayoutBody.d.ts.map +1 -0
  226. package/dist/react/schemaRenderer/table/CardsLayoutBody.js +189 -0
  227. package/dist/react/schemaRenderer/table/CardsLayoutBody.js.map +1 -0
  228. package/dist/react/schemaRenderer/table/TableRenderer.d.ts +29 -0
  229. package/dist/react/schemaRenderer/table/TableRenderer.d.ts.map +1 -0
  230. package/dist/react/schemaRenderer/table/TableRenderer.js +85 -0
  231. package/dist/react/schemaRenderer/table/TableRenderer.js.map +1 -0
  232. package/dist/react/schemaRenderer/table/TableRendererBody.d.ts +18 -0
  233. package/dist/react/schemaRenderer/table/TableRendererBody.d.ts.map +1 -0
  234. package/dist/react/schemaRenderer/table/TableRendererBody.js +555 -0
  235. package/dist/react/schemaRenderer/table/TableRendererBody.js.map +1 -0
  236. package/dist/react/schemaRenderer/table/filters.d.ts +263 -0
  237. package/dist/react/schemaRenderer/table/filters.d.ts.map +1 -0
  238. package/dist/react/schemaRenderer/table/filters.js +497 -0
  239. package/dist/react/schemaRenderer/table/filters.js.map +1 -0
  240. package/dist/react/schemaRenderer/table/formatCell.d.ts +11 -0
  241. package/dist/react/schemaRenderer/table/formatCell.d.ts.map +1 -0
  242. package/dist/react/schemaRenderer/table/formatCell.js +172 -0
  243. package/dist/react/schemaRenderer/table/formatCell.js.map +1 -0
  244. package/dist/react/schemaRenderer/table/links.d.ts +42 -0
  245. package/dist/react/schemaRenderer/table/links.d.ts.map +1 -0
  246. package/dist/react/schemaRenderer/table/links.js +55 -0
  247. package/dist/react/schemaRenderer/table/links.js.map +1 -0
  248. package/dist/react/schemaRenderer/table/renderRowActions.d.ts +13 -0
  249. package/dist/react/schemaRenderer/table/renderRowActions.d.ts.map +1 -0
  250. package/dist/react/schemaRenderer/table/renderRowActions.js +25 -0
  251. package/dist/react/schemaRenderer/table/renderRowActions.js.map +1 -0
  252. package/dist/react/schemaRenderer/table/url.d.ts +41 -0
  253. package/dist/react/schemaRenderer/table/url.d.ts.map +1 -0
  254. package/dist/react/schemaRenderer/table/url.js +114 -0
  255. package/dist/react/schemaRenderer/table/url.js.map +1 -0
  256. package/dist/routes/globals.d.ts +13 -0
  257. package/dist/routes/globals.d.ts.map +1 -0
  258. package/dist/routes/globals.js +131 -0
  259. package/dist/routes/globals.js.map +1 -0
  260. package/dist/routes/helpers.d.ts +217 -0
  261. package/dist/routes/helpers.d.ts.map +1 -0
  262. package/dist/routes/helpers.js +498 -0
  263. package/dist/routes/helpers.js.map +1 -0
  264. package/dist/routes/pages.d.ts +15 -0
  265. package/dist/routes/pages.d.ts.map +1 -0
  266. package/dist/routes/pages.js +145 -0
  267. package/dist/routes/pages.js.map +1 -0
  268. package/dist/routes/panel.d.ts +19 -0
  269. package/dist/routes/panel.d.ts.map +1 -0
  270. package/dist/routes/panel.js +191 -0
  271. package/dist/routes/panel.js.map +1 -0
  272. package/dist/routes/relations.d.ts +21 -0
  273. package/dist/routes/relations.d.ts.map +1 -0
  274. package/dist/routes/relations.js +1239 -0
  275. package/dist/routes/relations.js.map +1 -0
  276. package/dist/routes/resources.d.ts +28 -0
  277. package/dist/routes/resources.d.ts.map +1 -0
  278. package/dist/routes/resources.js +741 -0
  279. package/dist/routes/resources.js.map +1 -0
  280. package/dist/routes/theme.d.ts +12 -0
  281. package/dist/routes/theme.d.ts.map +1 -0
  282. package/dist/routes/theme.js +82 -0
  283. package/dist/routes/theme.js.map +1 -0
  284. package/dist/routes.d.ts.map +1 -1
  285. package/dist/routes.js +64 -3078
  286. package/dist/routes.js.map +1 -1
  287. package/dist/vite.d.ts +1 -0
  288. package/dist/vite.d.ts.map +1 -1
  289. package/dist/vite.js +26 -5
  290. package/dist/vite.js.map +1 -1
  291. package/package.json +2 -1
  292. package/src/Pilotiq.ts +95 -0
  293. package/src/actions/Action.ts +79 -723
  294. package/src/actions/bulkFactories.ts +168 -0
  295. package/src/actions/crudFactories.ts +220 -0
  296. package/src/actions/factoryHelpers.ts +177 -0
  297. package/src/actions/m2mFactories.ts +193 -0
  298. package/src/actions/relationFactories.ts +372 -0
  299. package/src/elements/dispatchForm.ts +1 -1
  300. package/src/elements/dispatchTable.ts +1 -1
  301. package/src/fields/Field.ts +39 -0
  302. package/src/pageData/breadcrumbs.ts +288 -0
  303. package/src/pageData/forms.ts +578 -0
  304. package/src/pageData/helpers.ts +764 -0
  305. package/src/pageData/misc.ts +347 -0
  306. package/src/pageData/navigation.ts +779 -0
  307. package/src/pageData/relationPages.ts +1246 -0
  308. package/src/pageData/relationTabs.ts +286 -0
  309. package/src/pageData/resourcePages.ts +593 -0
  310. package/src/pageData.ts +122 -4731
  311. package/src/react/AppShell.tsx +27 -1
  312. package/src/react/CollabExtensionFactoryRegistry.ts +55 -0
  313. package/src/react/CollabRoomContext.ts +42 -0
  314. package/src/react/FormCollabBindingRegistry.ts +72 -0
  315. package/src/react/FormStateContext.tsx +91 -0
  316. package/src/react/RecordWrapperGate.tsx +40 -0
  317. package/src/react/RecordWrapperRegistry.ts +39 -0
  318. package/src/react/SchemaRenderer.tsx +230 -6479
  319. package/src/react/component-slots.test.ts +103 -0
  320. package/src/react/component-slots.ts +116 -0
  321. package/src/react/fields/BuilderInput.tsx +29 -117
  322. package/src/react/fields/MarkdownInput.tsx +0 -1
  323. package/src/react/fields/RepeaterInput.tsx +29 -130
  324. package/src/react/fields/rowState.ts +106 -0
  325. package/src/react/fields/useRowReorderDnd.ts +78 -0
  326. package/src/react/index.ts +38 -0
  327. package/src/react/layouts/SidebarLayout.tsx +39 -28
  328. package/src/react/layouts/TopbarLayout.tsx +70 -57
  329. package/src/react/parseRecordEditUrl.test.ts +75 -0
  330. package/src/react/parseRecordEditUrl.ts +55 -0
  331. package/src/react/persistedState.ts +40 -0
  332. package/src/react/schemaRenderer/AlertRenderer.tsx +112 -0
  333. package/src/react/schemaRenderer/EntryRenderer.tsx +501 -0
  334. package/src/react/schemaRenderer/SectionRenderer.tsx +120 -0
  335. package/src/react/schemaRenderer/SimpleElements.tsx +306 -0
  336. package/src/react/schemaRenderer/TabsRenderer.tsx +62 -0
  337. package/src/react/schemaRenderer/WizardRenderer.tsx +338 -0
  338. package/src/react/schemaRenderer/action/ActionGroupTrigger.tsx +177 -0
  339. package/src/react/schemaRenderer/action/ActionModalDialog.tsx +273 -0
  340. package/src/react/schemaRenderer/action/ConfirmActionDialog.tsx +61 -0
  341. package/src/react/schemaRenderer/action/HandlerActionButton.tsx +43 -0
  342. package/src/react/schemaRenderer/action/MethodActionButton.tsx +64 -0
  343. package/src/react/schemaRenderer/action/buttons.tsx +99 -0
  344. package/src/react/schemaRenderer/action/helpers.ts +140 -0
  345. package/src/react/schemaRenderer/action/renderAction.tsx +245 -0
  346. package/src/react/schemaRenderer/columnFormat.ts +65 -0
  347. package/src/react/schemaRenderer/constants.ts +50 -0
  348. package/src/react/schemaRenderer/form/FormRenderer.tsx +245 -0
  349. package/src/react/schemaRenderer/form/renderField.tsx +511 -0
  350. package/src/react/schemaRenderer/helpers.tsx +81 -0
  351. package/src/react/schemaRenderer/table/CardsLayoutBody.tsx +308 -0
  352. package/src/react/schemaRenderer/table/TableRenderer.tsx +123 -0
  353. package/src/react/schemaRenderer/table/TableRendererBody.tsx +974 -0
  354. package/src/react/schemaRenderer/table/filters.tsx +1233 -0
  355. package/src/react/schemaRenderer/table/formatCell.tsx +264 -0
  356. package/src/react/schemaRenderer/table/links.tsx +112 -0
  357. package/src/react/schemaRenderer/table/renderRowActions.tsx +52 -0
  358. package/src/react/schemaRenderer/table/url.tsx +143 -0
  359. package/src/routes/globals.ts +154 -0
  360. package/src/routes/helpers.ts +668 -0
  361. package/src/routes/pages.ts +173 -0
  362. package/src/routes/panel.ts +204 -0
  363. package/src/routes/relations.ts +1219 -0
  364. package/src/routes/resources.ts +786 -0
  365. package/src/routes/theme.ts +109 -0
  366. package/src/routes.test.ts +1 -1
  367. package/src/routes.ts +64 -3176
  368. package/src/schema/TableWidget.test.ts +2 -2
  369. package/src/theme/migrate.test.ts +178 -0
  370. package/src/vite.test.ts +184 -0
  371. package/src/vite.ts +26 -4
@@ -1,8 +1,8 @@
1
1
 
2
- > @pilotiq/pilotiq@0.7.2 build /home/runner/work/pilotiq/pilotiq/packages/pilotiq
2
+ > @pilotiq/pilotiq@0.8.1 build /home/runner/work/pilotiq/pilotiq/packages/pilotiq
3
3
  > tsc -p tsconfig.build.json && pnpm run copy-assets
4
4
 
5
5
 
6
- > @pilotiq/pilotiq@0.7.2 copy-assets /home/runner/work/pilotiq/pilotiq/packages/pilotiq
6
+ > @pilotiq/pilotiq@0.8.1 copy-assets /home/runner/work/pilotiq/pilotiq/packages/pilotiq
7
7
  > mkdir -p dist/styles && cp -R src/styles/*.css dist/styles/
8
8
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,213 @@
1
1
  # @pilotiq/pilotiq
2
2
 
3
+ ## 0.8.1
4
+
5
+ ### Patch Changes
6
+
7
+ - cc7a292: fix(pilotiq): wire `FormStateProvider` through `FormCollabBinding` (Phase F2)
8
+
9
+ The F1 registry slot from 0.8.0 was inert — nothing in pilotiq core
10
+ consumed `FormCollabBinding`. This patch makes the wiring actually
11
+ fire: when a `<RecordCollabRoom>` is mounted up-tree AND a plugin
12
+ (e.g. `@pilotiq-pro/collab@0.1`) registered a binding factory,
13
+ `FormStateProvider` now:
14
+
15
+ 1. **Mounts on collab activity, not just `stateUrl`.** `FormRenderer`'s
16
+ `useControlled` gate widens from `!!stateUrl` to
17
+ `!!stateUrl || collabActive`. Forms with zero `.live()` fields but
18
+ a record-edit collab room get the controlled path so every
19
+ `useFieldState(name)` consumer (TextInput / Select / Toggle /
20
+ Date / Slider / …) becomes synchronizable.
21
+
22
+ 2. **Constructs a binding on mount.** Calls the registered factory
23
+ with `{ room, formId, initial }`. The binding owns the CRDT
24
+ storage (typically a `Y.Map` on the room's shared ydoc) — pilotiq
25
+ stays Yjs-free.
26
+
27
+ 3. **Lifts already-synced state.** On mount, `binding.get()`'s
28
+ snapshot is shallow-merged on top of the SSR-rendered defaults,
29
+ so subsequent joiners see the room's authoritative state.
30
+
31
+ 4. **Subscribes to remote changes.** `binding.subscribe(snapshot)`
32
+ fires on every Yjs transaction (local + remote). Per-key
33
+ `Object.is` short-circuit collapses local-write echoes into
34
+ no-op renders; remote changes flow through `setValuesState` into
35
+ the controlled inputs.
36
+
37
+ 5. **Proxies `setValue` through the binding.** Every controlled
38
+ write fires `binding.set(name, value)` after the local React
39
+ state update — UNLESS the field opted out via `Field.collab(false)`
40
+ OR the name is a dotted path (Repeater / Builder row leaves stay
41
+ local-only in v1; Phase F.5 tackles `Y.Array<Y.Map>` row identity).
42
+
43
+ 6. **Forwards server-derived values through the binding.** When a
44
+ `.live()` POST response carries `values`, the derived fields
45
+ (e.g. auto-`slug` from `title`) also write through the binding so
46
+ every peer sees the derivation without each peer roundtripping the
47
+ server (Q2 from the F-phase plan).
48
+
49
+ ### Plan + decisions
50
+
51
+ `pilotiq-pro/docs/plans/collab-form-fields.md` captures the full
52
+ phase breakdown; the three open Q's resolved before this patch:
53
+
54
+ - **Q1** — Idempotent client-side seed (`!ymap.has(k)` per key).
55
+ - **Q2** — Server response writes to Y.Map (above).
56
+ - **Q3** — `.collab(false)` suppresses both value sync AND presence
57
+ (presence chips land in F4).
58
+
59
+ ### Tested
60
+
61
+ - All 2938 pilotiq tests pass.
62
+ - Two-window smoke test (playground): typing in `title` / changing
63
+ `status` in one window propagates to the other ~instantly.
64
+ Tiptap fields (`body` / `content`) continue to sync via their own
65
+ `Y.XmlFragment` selectors — non-Tiptap fields now share the same
66
+ `Y.Doc` via the `form-data` Y.Map managed by `@pilotiq-pro/collab`'s
67
+ `formCollabBinding` factory.
68
+
69
+ ## 0.8.0
70
+
71
+ ### Minor Changes
72
+
73
+ - 92b99a1: feat(pilotiq): collab open-core wiring + `Field.collab()` opt-out
74
+
75
+ Three new module-singleton registries + a URL gate + a `.collab()` setter
76
+ on the `Field` base — the open-core scaffolding pro collab plugins (e.g.
77
+ `@pilotiq-pro/collab`) plug into. Pilotiq core stays Yjs-free; the
78
+ registries hand opaque values back and forth.
79
+
80
+ ### Registries (all exported from `@pilotiq/pilotiq/react`)
81
+
82
+ - **`CollabRoomContext`** — React context exposing the active record's
83
+ `{ ydoc, provider, user? }` triplet. `useCollabRoom()` returns `null`
84
+ when no `<RecordCollabRoom>` is mounted up-tree.
85
+ - **`registerCollabExtensions(factory)`** / **`getCollabExtensions()`** —
86
+ module slot for a `CollabExtensionFactory` that returns Tiptap-style
87
+ collab extensions for a given `{ ydoc, provider, fieldName, user }`.
88
+ Pilotiq treats the returned values as opaque `unknown[]`; the consumer
89
+ (typically `@pilotiq/tiptap`) spreads them into its editor.
90
+ - **`registerRecordWrapper(C)`** / **`getRecordWrapper()`** — module
91
+ slot for a record-scoped React wrapper. `AppShell` wraps every
92
+ record-edit page's children with the registered wrapper, scoped to
93
+ `{ resourceSlug, recordId }`.
94
+ - **`registerFormCollabBinding(factory)`** / **`getFormCollabBinding()`** —
95
+ module slot for a form-level CRDT binding (form-data `Y.Map` proxy);
96
+ consumed by `FormStateProvider` in Phase F2.
97
+
98
+ ### URL gate
99
+
100
+ - **`RecordWrapperGate`** — internal component AppShell mounts around
101
+ `props.children`. Parses the current path against `basePath`; when it
102
+ matches a `/.../:id/edit` URL AND a wrapper is registered, wraps with
103
+ `<Wrapper resourceSlug={slug} recordId={id}>{children}</Wrapper>`.
104
+ Pass-through otherwise.
105
+ - **`parseRecordEditUrl(currentPath, basePath)`** — pure helper exported
106
+ alongside. Handles bare resource edit, cluster-prefixed edits, and
107
+ nested-relation edits (slash-joined slug-path picks up the parent +
108
+ relation chain so two URLs that target different records always
109
+ produce different rooms downstream).
110
+
111
+ ### `Field.collab(enabled = true)`
112
+
113
+ New setter on the base class — every subclass (Text, Toggle, Select,
114
+ Date, Slider, …, RichText) inherits. `.collab(false)` stamps
115
+ `meta.collab === false`; the renderer is expected to skip the collab
116
+ layer entirely (no value sync, no presence chip). Absent = inherit the
117
+ panel default.
118
+
119
+ ### Acceptance
120
+
121
+ - Pilotiq builds + 2938 tests pass (12 new for `parseRecordEditUrl`).
122
+ - Consumers (e.g. `@pilotiq-pro/collab`) wire collab through these
123
+ registries; pilotiq core carries no Yjs / Tiptap dep.
124
+
125
+ - fd06c0d: feat(pilotiq): `Pilotiq.components({ nav, header, footer })` chrome slots
126
+
127
+ Three new chrome-slot overrides let a panel swap an entire region of
128
+ the default layout for a custom React component, alongside the
129
+ existing render-hook splicing surface. Use slots when render hooks
130
+ can't reach far enough — slots _replace_ a whole region; hooks
131
+ _splice_ at named positions.
132
+
133
+ ```ts
134
+ import { Pilotiq } from "@pilotiq/pilotiq";
135
+ import { MyCustomSidebar } from "./MyCustomSidebar.tsx";
136
+ import { MyTopBar } from "./MyTopBar.tsx";
137
+ import { MyFooter } from "./MyFooter.tsx";
138
+
139
+ Pilotiq.make("admin").components({
140
+ nav: MyCustomSidebar,
141
+ header: MyTopBar,
142
+ footer: MyFooter,
143
+ });
144
+ ```
145
+
146
+ ### Slots
147
+
148
+ - **`nav`** — replaces the default nav tree. In `SidebarLayout`
149
+ that's the `<SidebarContent>` body (`<SidebarMenu>` tree); in
150
+ `TopbarLayout` it's the `<nav>` cluster between the brand and
151
+ the right-side controls. Surrounding chrome (branding header,
152
+ render-hook splices, footer, sign-out menu) stays.
153
+ - **`header`** — replaces the whole `<header>` chrome bar. In
154
+ `SidebarLayout` that's the top bar with search / theme / bell /
155
+ user menu; in `TopbarLayout` it's the whole top region including
156
+ the brand cluster AND the nav (setting `header` makes the `nav`
157
+ slot irrelevant there).
158
+ - **`footer`** — mounts a `<footer>` element below the main content
159
+ area in both layouts. Separate from the `panels::footer` render
160
+ hook, which keeps firing INSIDE the content area for per-page
161
+ trailing chrome.
162
+
163
+ ### Prop contracts
164
+
165
+ `nav` and `header` both receive `{ navigation, basePath, currentPath? }`
166
+ (matching `NavComponentProps` / `HeaderComponentProps`) — same
167
+ pre-grouped, pre-sorted nav tree the default renderers consume, so a
168
+ custom topbar can render its own nav inline without juggling two
169
+ slots. `footer` receives the minimal `{ basePath, currentPath? }`.
170
+
171
+ ### Render-hook caveat for `header`
172
+
173
+ Hooks rooted _inside_ the default header — `panels::topbar.start`,
174
+ `panels::topbar.end`, `panels::user-menu.before`,
175
+ `panels::user-menu.after` — do NOT fire when the header is replaced
176
+ (the surrounding container is gone). Hooks rooted outside
177
+ (`panels::sidebar.*`, `panels::footer`, `panels::sidebar.nav.*`) keep
178
+ firing. Consumers rebuilding the header can mount
179
+ `<RenderHookSlot name="…" hooks={panel.renderHooks} />` themselves
180
+ from inside the custom component to preserve the splice contract for
181
+ plugins.
182
+
183
+ ### Chrome components exported for rebuilding headers
184
+
185
+ `SearchTrigger`, `ThemeToggle`, `NotificationBell`,
186
+ `RightSidebarTrigger`, and `UserMenu` are all re-exported from
187
+ `@pilotiq/pilotiq/react` so a `header` slot consumer can drop the
188
+ default controls back in à la carte rather than reimplementing every
189
+ one. `HeaderComponentProps`, `FooterComponentProps`, and
190
+ `isNavItemActive` are also re-exported alongside the existing
191
+ `NavComponentProps` and `ComponentSlotRegistry`.
192
+
193
+ ### Authoring `.tsx` inside the panel module
194
+
195
+ The Vite plugin loads `app/Pilotiq/AdminPanel.ts` through `jiti` at
196
+ boot to harvest `cfg.components` into the build-time
197
+ `_components.ts` manifest. To make this play nicely with `.tsx`
198
+ component files alongside the panel module, the jiti loader now
199
+ enables JSX support (`jsx: { runtime: 'automatic' }`). Two gotchas to
200
+ know:
201
+
202
+ 1. JSX support is enabled by default — no per-file `import React from 'react'`
203
+ needed when authoring `.tsx` panel-adjacent files.
204
+ 2. jiti's resolver falls through `.js` → `.ts` but NOT `.js` → `.tsx`.
205
+ The import in the panel module must use the literal `.tsx`
206
+ extension: `import { MyCustomSidebar } from './MyCustomSidebar.tsx'`.
207
+ `allowImportingTsExtensions: true` in your tsconfig keeps TS happy.
208
+
209
+ See `docs/guide/component-slots.md` for the full guide.
210
+
3
211
  ## 0.7.2
4
212
 
5
213
  ### Patch Changes
package/CLAUDE.md CHANGED
@@ -41,7 +41,16 @@ Deep notes for many of these also live in `~/.claude/projects/-Users-sleman-Proj
41
41
  - `src/sessionFilters.ts` — Tier-3 filter persistence helpers. `Resource.persistFiltersInSession = true` opts in; the GET list handler in `routes.ts` writes the active query slice (filters / `group` / `search` / `sort` / `perPage`; `page` + `tab` excluded) to `req.session` under `pilotiq:filters:<basePath>:<slug>` on every non-bare visit, and 302-redirects bare visits (zero query params) to the persisted slice. Duck-typed `req.session.get / put` (mirrors `notifications/flash.ts`) so it no-ops when `@rudderjs/session` isn't installed. Idempotent — short-circuits the `put()` when the slice deep-equals the stored value to avoid `Set-Cookie` churn on revisits. v1 = one slot per resource (all tabs share one filter slot); guide: `docs/guide/filter-persistence.md`.
42
42
  - `src/PilotiqServiceProvider.ts` — Provider + `pilotiq()` factory.
43
43
  - `src/search.ts` — Plan #12 `searchAllResources(pilotiq, query, user, opts?) → GlobalSearchResult[]`. Walks `cfg.resources` filtered by `globalSearch=true`, runs `canAccess + canViewAny` in parallel, builds a per-resource `ModelQuery` (override-or-default LIKE chain on `globallySearchableAttributes()`), `paginate(1, limitPerResource)`. Returns `[]` for queries shorter than 2 chars. Throws on a single resource silently drop its results; others still resolve. No new ORM contract — reuses the existing `paginate` from Plan #2/#6.
44
- - `src/pageData.ts` — Per-page-role data builders (`dashboardData, resourceIndexData, resourceCreateData, resourceEditData, resourceViewData, globalEditData, globalViewData, customPageData, formStateData, formWizardData, searchData`) + `dispatchPageData(pageContext)` switchboard. **Plan #5 `formStateData(pilotiq, scope, body, req?)`** drives partial-resolve — runs `applyStateUpdate`, re-resolves form with bound read-only `$get` (resolve-time `$set` is a no-op closure; only `afterStateUpdated` writes survive), returns `{ ok, form: FormMeta, dirty }` or 404/422. **`tagFormStateUrls(elements, urlBuilder)`** stamps `Form.withStateUrl()` only on forms with at least one `live()` descendant. **Plan #8 `formWizardData(pilotiq, scope, body, req?)`** runs `validateSchema` over the requested step's children only — returns `{ ok }` (200) or `{ ok:false, status:422, errors }`. **`tagFormWizardUrls(elements, urlBuilder)`** stamps `Form.withWizardUrl()` only on forms with a `Wizard` descendant. **Navigation tree:** `panelInfo(pilotiq, req?)` is async — flattens resources/globals/pages, resolves `navigationParentItem` refs, sorts by `navigationSort`, parallel-resolves `navigationBadge()` via `Promise.all` (errors swallow). `buildNavigation` pre-evaluates `canAccess(user)` in parallel; failed items dropped. Both rudder GET handlers AND the auto-gen Vike `+data` hook call these so SSR + SPA-nav serve identical data; renderers read from `(ctx.data ?? ctx.viewProps)`. `resolveActiveTab(elements, query, currentPath)` stamps active tab + per-tab URL + parallel-resolved badge counts before `loadTableRecords`.
44
+ - `src/pageData.ts` — Barrel module (~480 lines) + `dispatchPageData(pageContext)` Vike `+data` switchboard. Re-exports the per-page-role builders (`dashboardData`, `resourceIndexData`, `resourceCreateData`, `resourceEditData`, `resourceViewData`, `resourceRecordPageData`, `globalEditData`, `globalViewData`, `customPageData`, `formStateData`, `formWizardData`, `formCreateOptionData`, `mentionResolveData`, `widgetData`, `searchData`, `relationManagerData`, `panelInfo`, `applyRoleHooks`, `resolvePageHooks`) + the URL-tag helpers + the fill pipeline through the `./pageData.js` import path so external callers (`routes.ts`, tests, custom dispatchers) stay stable. **Plan #5 `formStateData(pilotiq, scope, body, req?)`** drives partial-resolve — runs `applyStateUpdate`, re-resolves form with bound read-only `$get` (resolve-time `$set` is a no-op closure; only `afterStateUpdated` writes survive), returns `{ ok, form: FormMeta, dirty }` or 404/422. **`tagFormStateUrls(elements, urlBuilder)`** stamps `Form.withStateUrl()` only on forms with at least one `live()` descendant. **Plan #8 `formWizardData(pilotiq, scope, body, req?)`** runs `validateSchema` over the requested step's children only — returns `{ ok }` (200) or `{ ok:false, status:422, errors }`. **`tagFormWizardUrls(elements, urlBuilder)`** stamps `Form.withWizardUrl()` only on forms with a `Wizard` descendant. **Navigation tree:** `panelInfo(pilotiq, req?)` is async — flattens resources/globals/pages, resolves `navigationParentItem` refs, sorts by `navigationSort`, parallel-resolves `navigationBadge()` via `Promise.all` (errors swallow). `buildNavigation` pre-evaluates `canAccess(user)` in parallel; failed items dropped. Both rudder GET handlers AND the auto-gen Vike `+data` hook call these so SSR + SPA-nav serve identical data; renderers read from `(ctx.data ?? ctx.viewProps)`. `resolveActiveTab(elements, query, currentPath)` stamps active tab + per-tab URL + parallel-resolved badge counts before `loadTableRecords`.
45
+ - `src/pageData/` — Modular page-data subtree. Split out of `pageData.ts` in 6 phases (PR #34–#39, 4,948 → 481 lines):
46
+ - `breadcrumbs.ts` — 16 builder helpers (home / cluster / resource×4 / global / customPage / relation×4 + prefix / nestedRelation×4 + prefix) + `RelationChainStep` type.
47
+ - `helpers.ts` — `userCtx` / `uploadCtx` (`SchemaContext` builders), `callPageSchema`, 12 URL-tag helpers (`tagFormActions` / `tagFormStateUrls` / `tagTableReorderUrls` / `tagTableDeferred` / `tagCellEditUrls` / `tagFormWizardUrls` / `tagFieldAiUrls` / `tagSelectCreateOptionUrls` / `tagRichTextMentionUrls` / `tagWidgetUrls` / `tagActionDispatch`), the fill pipeline (`applyFillPipeline` + `applyRelationshipRepeaterFill` + `applyRelationshipBuilderFill` + `pickChildPrimaryKey` / `pickChildForeignKey` / `findRelationshipRepeaters` / `findRelationshipBuilders` / `parseBuilderDataPayload`), `resolveServerDataElements` + `collectServerDataElements` + `ServerDataMap`, and field-walker helpers (`walkSelectFields` / `isAsyncMentionField` / `formHasLiveField` / `formHasWizard`).
48
+ - `navigation.ts` — `panelInfo` (entry point for chrome envelopes), the meta interfaces (`UserMenuMeta` / `DatabaseNotificationsMeta` / `RightPanelMeta` / `RightSidebarMeta` / `NavItem` / `PanelInfoRoute`), `buildNavigation` + `nestAndSort` + `RawNavItem`, the render-hook resolvers (`resolveChromeHooks` / `applyRoleHooks` / `resolvePageHooks`), and the user-menu / sidebar / notification-meta builders.
49
+ - `resourcePages.ts` — `dashboardData`, `resourceIndexData`, `resourceTableData`, `collectTableMetas`, `resolveActiveTab` + `findListTabs` + `buildTabUrl`, `resourceCreateData`, `resourceEditData`, `resourceViewData`, `resourceRecordPageData`.
50
+ - `relationPages.ts` — Plan #11 relation manager builders. Types (`RelationManagerScope` / `RelationManagerResult` / `ResolvedChain`), lookup helpers (`findRelatedResource` / `findManager` / `childBelongsToParent` for IDOR), auto-wiring (`autoWireManagerTable` / `injectManagerTrashedFilter` / `autoWireManagerForm` / `safePolicy` / `safeManagerPolicy`), depth-1 builders (`relationManagerData` + `buildRelation*Data`), depth-2 chain resolution + builders (`resolveRelationChain` + `nestedRelationManagerData` + `nestedManagerCtx` + `nestedResponseEnvelope` + `buildNestedRelation*Data`).
51
+ - `relationTabs.ts` — `buildRelationTabs` (depth 1) + `buildNestedRelationTabs` (depth 2) + `deriveParentTitle` + `safeBool`. Lives in its own module because both `resourcePages.ts` (parent record view/edit strip) AND `relationPages.ts` (nested-tab strip on record manager pages) consume them — keeps the resource ↔ relation sibling import graph acyclic.
52
+ - `forms.ts` — Plan #5 `formStateData`, Plan #8 `formWizardData`, `formCreateOptionData` (SelectField inline-create), `mentionResolveData` (async-mention typeahead), plus per-builder helpers (`stepHookErrorMessage` / `findSelectFieldByName` / `isMentionResolverField` / `findRichTextFieldByName` / `stripRepeaterRowPrefix` / `stripBuilderRowPrefix`) and 9 wire-shape types.
53
+ - `misc.ts` — `globalEditData`, `globalViewData`, `customPageData`, `widgetData` (Plan #15 widget polling) + `findWidgetById`, `searchData` (Plan #12 global search), plus the `WidgetScope` / `WidgetRequest` / `WidgetSuccess` / `WidgetFailure` wire-shape types.
45
54
  - `src/routes.ts` — `registerPilotiqRoutes()` using `view()`. Each GET handler delegates to `pageData.ts`; POST handlers stay here. **Plan #10 wiring:** every handler runs `checkPolicy(() => R.canX(user, …))`; failure → `forbidden(res, json)` (403 JSON or HTML). Record-aware predicates load via `R.model.find(id)` when set. 403 ≠ 401 — `Pilotiq.guard()` is the 401 layer. Routes:
46
55
  - `GET ${base}` → dashboard
47
56
  - `GET ${base}/${slug}` → resource list
@@ -91,8 +100,15 @@ Deep notes for many of these also live in `~/.claude/projects/-Users-sleman-Proj
91
100
 
92
101
  **Conditional visibility**: `.visible / .hidden / .disabled / .authorize` — rule is `boolean | (ctx) => boolean | Promise<boolean>` with `ActionVisibilityContext { record?, records?, user? }`. `Action.evaluate(ctx)` async; throws → `visible: false`. Non-row placements eval at schema-resolve. Row-placement actions defer to per-row eval in `loadTableRecords`, stamping `_visibleActions` / `_disabledActions`.
93
102
 
103
+ - `src/actions/Action.ts` — `Action` class itself (~1,515 lines): types (`ActionContext / ActionResult / ActionHandler / ActionVisibilityContext / VisibilityRule / ResourceLike / ReplicateOptions` etc), instance fields + setters, modal chrome, link / form / submit mode wiring, `evaluate()` and `toMeta()`. Static factory methods stay on the class as thin delegators (`Action.create / .edit / .view / .delete / .replicate / .restore / .forceDelete / .markAsRead / .bulkDelete / .bulkRestore / .bulkForceDelete / .bulkReplicate / .relationCreate / .relationEdit / .relationDelete / .relationRestore / .relationForceDelete / .relationReplicate / .relationBulkReplicate / .relationAttach / .relationDetach / .relationBulkDetach`) — call sites stay stable; bodies live in the factory sub-modules. `Action.import / .export / .bulkExport` are the exceptions — their bodies stay in Action.ts since they already delegate their internals to the older `*Factory.ts` files via static + dynamic imports. Split via 4 phases (`docs/plans/action-split.md`, 2,159 → 1,515 lines).
104
+ - `src/actions/factoryHelpers.ts` — Shared helpers consumed by every factory sub-module: `resourceBase(basePath, R)` (cluster-aware URL builder), `callPredicate(fn, user, record?)` (Plan #10 fail-open predicate caller), `isTrashed(record, R)` (soft-delete state probe), `isM2MMode(mode)` (true for `belongsToMany / morphToMany / morphedByMany`), `relationUrlPrefix(ctx)` (depth-1 + depth-2 relation URL prefix).
105
+ - `src/actions/crudFactories.ts` — Single-row resource factories: `createAction / editAction / viewAction / deleteAction / replicateAction / restoreAction / forceDeleteAction / markAsReadAction`. Each builds an `Action` shaped by `ResourceLike`'s policy predicates + soft-delete flags.
106
+ - `src/actions/bulkFactories.ts` — Bulk-placement factories: `bulkDeleteAction / bulkRestoreAction / bulkForceDeleteAction / bulkReplicateAction`. Handler-style — iterate `ctx.records`, run per-row policy, call matching model method, return notification with the count succeeded. Owns the phase-local `labelForCount(R, n)` helper for "1 post" / "5 posts" pluralization.
107
+ - `src/actions/relationFactories.ts` — Relation hasMany / morph factories: `relationCreateAction / relationEditAction / relationDeleteAction / relationRestoreAction / relationForceDeleteAction` plus the replicate pair `relationReplicateAction / relationBulkReplicateAction`. Replicate helpers (`computeRelationPin / persistRelationReplica / runRelationReplicateRow`) are private to this file — they force-pin the parent attachment columns (`<foreignKey>` for hasMany; `<morphName>Id` + `<morphName>Type` for morphMany via `computeMorphPayload`) AFTER the strip + BEFORE `beforeReplicaSaved`, so a tampered source row can't slip a different parent in. All factories auto-hide under M2M (factories deferred to `m2mFactories.ts`) and under `morphTo` (child-side polymorphic — no single owner to pin to).
108
+ - `src/actions/m2mFactories.ts` — Pivot factories: `relationAttachAction / relationDetachAction / relationBulkDetachAction`. All three auto-hide outside any M2M mode. `relationAttach` builds a modal-form `SelectField` picker via `attachFactory.buildAttachModalSchema` and POSTs the selected id to the manager's `_action/relationAttach` endpoint; `relationDetach` is a direct row-POST to `_detach/:childId`; `relationBulkDetach` runs the per-row `canDetach` gate inside the handler before calling `parent.related(rel).detach(ids)` once.
94
109
  - `src/actions/exportFactory.ts` — `Action.export / Action.bulkExport` internals (resolveExportColumns / collectExportRows / buildExportRow / encodeExport / defaultExportFilename). Lives in its own module so the Action ↔ Table cycle stays clean — `Action.export`'s handler dynamic-imports it at request time. Drives the table's existing `records()` handler in pages so filters / search / sort flow through unchanged. CSV body via `src/io/csv.ts` (RFC 4180 encoder + parser, in-memory only). Handler return shape extended with `{ download: { filename, contentType, body } }` on `ActionResult` + `DispatchActionSuccess`; route layer detects, sets `Content-Type` + `Content-Disposition: attachment` + `res.send(body)` (mutually exclusive with `redirect`); client `dispatchHandlerAction` content-sniffs `Content-Disposition` and triggers a synthetic `<a download>` blob download. Plan: `docs/plans/import-export-actions.md`.
95
110
  - `src/actions/importFactory.ts` — `Action.import` internals (parseImportText / runImport / buildImportSchema / buildImportNotification). Auto-builds the modal-form schema (FileUpload + a Mode select when `upsertBy` is set); handler reads `ctx.values.file`, fetches the URL the FileUpload stamped, parses CSV/JSON, walks rows through `R.model.create` (or `R.model.update` for matched upserts). Per-row `validate / beforeCreate / beforeUpdate` hooks; partial-failure-soft (rows that throw / fail validate accumulate in `summary.errors` and the import keeps going). Format auto-detected from filename when not set; `maxRows` cap (default 10_000). Visibility delegates to `R.canCreate`. No transaction wrapper in v1 (rudder ORM doesn't expose one to pilotiq yet).
111
+ - `src/actions/attachFactory.ts` — `Action.relationAttach` modal-form internals: `buildAttachModalSchema({ Related, relationship, recordTitleAttr, labelSingular })` returns a `[SelectField]` populated by `loadAttachableCandidates(parent, rel, relatedModel, recordTitleAttr, limit?)` which fetches up to 50 candidate rows and filters out already-attached ids server-side. Mirrors the `importFactory.ts` / `exportFactory.ts` split — lives outside the Action class so M2M-specific imports (SelectField + ORM helpers) stay out of the main file.
96
112
  - `src/io/csv.ts` — `encodeCsv(rows, columns) / parseCsv(input)`. RFC 4180: CRLF emit, LF/CRLF accept, double-quote escaping for embedded quotes, BOM stripped on input. Every cell parsed as a string — type coercion is the importer's job. No third-party dep.
97
113
  - `src/actions/ActionGroup.ts` — `ActionGroup.make(name).label().icon().tooltip().actions([Action, ...])`. Renders as DropdownMenu. Same trigger styling + visibility rules as Action. Nested groups flatten. Bulk placement unsupported.
98
114
  - `src/schema/Heading.ts` — `Heading.actions([Action…])` — title left + actions right. Used by `CreatePage / EditPage` to put Save in header.
@@ -108,7 +124,39 @@ Deep notes for many of these also live in `~/.claude/projects/-Users-sleman-Proj
108
124
  - `src/react/layouts/SidebarLayout.tsx` — shadcn Sidebar. `<SidebarGroup>` per nav group, `<SidebarMenuSub>` for children, `<SidebarMenuBadge>` for badges. Active = longest URL prefix.
109
125
  - `src/react/layouts/TopbarLayout.tsx` — horizontal nav variant. Group label → dropdown trigger.
110
126
  - `src/react/ThemeSettingsPage.tsx` — Theme editor: controls + live iframe preview.
111
- - `src/react/SchemaRenderer.tsx` — Renders resolved schema. `TableRenderer` segregates actions by placement (header/inline top bar; bulk toolbar shown when rows selected; row inline). Heading/description/striped/emptyState chrome via Table builders. **Row click navigation:** `Table.recordUrl(r => …)` stamps `_recordUrl`; each *data cell* wraps content in a real `<a href>` (`RecordCellLink`). Plain left-clicks SPA-nav via `useNavigate()`; modified clicks fall through. Action and bulk-select cells stay unwrapped. Per-column overrides: `Column.recordUrl(fn|false)`. `formatCell` switches on `col.columnType`, applies built-in `format` spec, reads `row._formatted[colName]` first. **Per-row classes:** `Table.recordClasses(r => '…')` stamps `_recordClasses` and the renderer concatenates onto the `<tr>` className (after striped + cursor-pointer). **Auto-refresh:** `Table.poll(seconds)` emits `pollInterval` on the meta; `TableRenderer`'s `useEffect` runs `setInterval(navigate(pathname+search), n*1000)` and pauses while `document.visibilityState !== 'visible'`. **Group banding:** `Table.defaultGroup(col)` stable-sorts rows via `sortRowsByGroupValue` in `dispatchTable` (empty/null group values bubble to the bottom), stamps `_groupValue` per row; the renderer inserts a heading `<TableRow>` whenever the value changes between adjacent rows. **Footer summaries:** `Column.summarize([…])` makes `loadTableRecords` compute aggregates over the rendered rows; renderer mounts a `<TableFooter>` row aligned to the columns when `meta.summaries` is non-empty.
127
+ - `src/react/SchemaRenderer.tsx` — Thin top-level dispatcher (~550 lines) for resolved schema. Walks elements via `renderElement` and delegates each type to a sibling renderer under `src/react/schemaRenderer/`. Public surface: `<SchemaRenderer elements={...} widgetData={...} />` + the `FormFields` helper. Re-exports `dispatchHandlerAction` + `renderFormChild` for consumers (`RepeaterInput.tsx`, `SelectFieldInput.tsx`). Page-chrome renderers that don't fit a sub-namespace (`ListTabsRenderer`, `BreadcrumbsRenderer`, `RelationTabsRenderer`, `RelationTabIcon`) still live here.
128
+ - `src/react/schemaRenderer/` — Modular renderer subtree. Split out of `SchemaRenderer.tsx` in 5 phases (PR #29–#33, 6,798 → 549 lines):
129
+ - `constants.ts` — `TEXT_*` / `COLUMN_*` / `BADGE_COLOR_CLASSES` lookup tables + `alertStyles`.
130
+ - `columnFormat.ts` — `applyColumnFormat` (dateTime / since / money / numeric / limit / words). Used by both table cells and entries.
131
+ - `helpers.tsx` — `resolveIcon`, `layoutClasses`, `renderChildren`, `withTooltip`, `IconCmp` type.
132
+ - `SimpleElements.tsx` — 13 stateless leaf + layout primitives (text/image/icon/markdown/html/heading/emptyState/divider/unorderedList/card/grid/group/split/fieldset). Exports `renderSimpleElement(el, index, deps)`; deps inject `renderElement` + `renderActionLike` for cases that recurse or mount action children.
133
+ - `AlertRenderer.tsx` — dismissible alert + localStorage persist.
134
+ - `SectionRenderer.tsx` — collapsible / persistable Section; takes `renderElement` prop for child recursion.
135
+ - `TabsRenderer.tsx` — pills + underline variants.
136
+ - `WizardRenderer.tsx` — multi-step form, URL/localStorage step persist, `WizardNavButton` chrome customizers.
137
+ - `EntryRenderer.tsx` — `renderEntry` (8 entry types: text/badge/icon/image/keyValue/color/code/component/repeatable) + `EntryShell` chrome + tooltip/copy helpers.
138
+ - `action/` — Phase 3 action layer:
139
+ - `renderAction.tsx` — main switch (submit / href / method / handler / disabled placeholder) + `renderActionLike` (action / actionGroup / slotComponent).
140
+ - `ActionModalDialog.tsx` / `ConfirmActionDialog.tsx` — modal + confirm dialogs.
141
+ - `MethodActionButton.tsx` / `HandlerActionButton.tsx` — POST-style and JSON-dispatch buttons.
142
+ - `ActionGroupTrigger.tsx` — dropdown trigger + pending-dialog state.
143
+ - `buttons.tsx` — `actionButtonClass` / `renderActionIcon` / `renderActionBadge` + `COLOR_VARIANTS` / `OUTLINED_VARIANTS` / `SIZE_CLASSES` / `ICON_SIZE_CLASSES` + `RenderActionOptions` interface.
144
+ - `helpers.ts` — `dispatchNotifications`, `dispatchMethodAction`, `dispatchHandlerAction`, attachment-download helpers + `Notify` / `Navigate` types.
145
+ - `form/` — Phase 4 form layer:
146
+ - `FormRenderer.tsx` — HTML form chrome + fetch+JSON submit + error stamping + `FormStateProvider` mount + `FormBody` / `renderFormChild` / `renderFieldWithValue`.
147
+ - `renderField.tsx` — 13-way field-type switch + `TextFieldShell` (handles password reveal / mask / datalist via `useTextInputControls`).
148
+ - `table/` — Phase 5 table layer:
149
+ - `TableRenderer.tsx` — deferred-load wrapper + `TableSkeleton`.
150
+ - `TableRendererBody.tsx` — the body itself. Column rendering / sort+pagination+search URL state / group banding+drill-in / per-row inline edit+delete / bulk-action toolbar / cards-layout dispatch / empty+loading states. Accepts a `TableBodyDeps` bag (`renderElement` + `renderActionLike` + `renderFormChild`).
151
+ - `CardsLayoutBody.tsx` — `contentLayout('cards')` body + responsive `CARDS_GRID_COLS_*` lookup tables + `pickCardCols` / `cardsPerRowClasses`.
152
+ - `filters.tsx` — every filter widget (`FilterSelect` / `FilterMultiSelect` / `FilterDateRange` / `FilterForm` / `FilterQueryBuilder` + query-builder sub-components) plus chrome (`FilterPopover` / `FilterStrip` / `FilterStripToggle` / `ActiveFiltersBar`) plus toolbar siblings (`TableGroupPicker` / `SortByPicker` / `ColumnsToggleDropdown` / `GroupHeaderText` / `renderFilterControl` / `resolveColumnUrl`).
153
+ - `formatCell.tsx` — `formatCell` (8 column-type dispatch) + `wrapCell` / `wrapCellList` + `CellCopyButton` + `rowId`.
154
+ - `url.tsx` — `TableUrlState` + `prefixK` / `buildTableQuery` / `nextSortDir` / `SearchFormHiddenInputs` / `getCurrentSearchParams`.
155
+ - `links.tsx` — `RecordCellLink` (cell-level SPA link wrapper) + `ActiveGroupKeyChip` + `GroupHeadingLink`.
156
+ - `renderRowActions.tsx` — per-row action strip; takes `renderActionLike` as a parameter so it stays free of the action import cycle.
157
+ - **Dependency injection convention.** Renderers that need to recurse take `renderElement` (and sometimes `renderActionLike` / `renderFormChild`) as props or function arguments. `SchemaRenderer.tsx` binds them via closure with thin wrappers (`renderActionLike`, `renderField`, `renderFormChild`, `FormRenderer`, `TableRenderer`) so the rest of the file passes the closure-bound versions into the switch.
158
+
159
+ **Row click navigation (table layer):** `Table.recordUrl(r => …)` stamps `_recordUrl`; each *data cell* wraps content in a real `<a href>` (`RecordCellLink`). Plain left-clicks SPA-nav via `useNavigate()`; modified clicks fall through. Action and bulk-select cells stay unwrapped. Per-column overrides: `Column.recordUrl(fn|false)`. `formatCell` switches on `col.columnType`, applies built-in `format` spec, reads `row._formatted[colName]` first. **Per-row classes:** `Table.recordClasses(r => '…')` stamps `_recordClasses` and the renderer concatenates onto the `<tr>` className (after striped + cursor-pointer). **Auto-refresh:** `Table.poll(seconds)` emits `pollInterval` on the meta; `TableRendererBody`'s `useEffect` runs `setInterval(navigate(pathname+search), n*1000)` and pauses while `document.visibilityState !== 'visible'`. **Group banding:** `Table.defaultGroup(col)` stable-sorts rows via `sortRowsByGroupValue` in `dispatchTable` (empty/null group values bubble to the bottom), stamps `_groupValue` per row; the renderer inserts a heading `<TableRow>` whenever the value changes between adjacent rows. **Footer summaries:** `Column.summarize([…])` makes `loadTableRecords` compute aggregates over the rendered rows; renderer mounts a `<TableFooter>` row aligned to the columns when `meta.summaries` is non-empty.
112
160
 
113
161
  **All non-modal action triggers SPA-update:** `dispatchHandlerAction / dispatchMethodAction` fetch with `Accept: application/json`, drain notifications via `useToast()`, then `useNavigate()` to redirect. Handler actions WITH confirm/modal → `ActionModalDialog` (controlled or uncontrolled). Confirm-only modals reuse same dialog.
114
162
 
@@ -120,7 +168,7 @@ Deep notes for many of these also live in `~/.claude/projects/-Users-sleman-Proj
120
168
 
121
169
  **Plan #5 reactive fields (client).** `react/FormStateContext.tsx` ships `FormStateProvider` + `useFieldState(name)` + `useFormState()`. `FormRenderer` is dual-path: with `stateUrl` set it wraps children in the provider (controlled inputs); without it, falls back to today's uncontrolled `defaultValue` path. Each field renderer (`TextLikeInput` for text/email/number/textarea/slug; specialized inputs for toggle/select/date) consults `useFieldState` first, falls back to `defaultValue` when outside the provider — so non-live forms cost nothing. `triggerLive(name)` reads each field's `live` config and POSTs `{ changed, values }` to `stateUrl` (immediate / debounced via `setTimeout` / on blur). In-flight race handling via `requestSeqRef + latestSeenRef` (refs, not state — StrictMode trap). 422 → inline errors; other failures → toast. **Live forms must pin `Form.make().formId('stable-id')`** — see `feedback_pilotiq_live_forms_pin_formid.md`. Public exports: `FormStateProvider`, `useFieldState`, `useFormState` from `@pilotiq/pilotiq/react`.
122
170
  - `src/react/ui/` — shadcn primitives (sidebar, button, sheet, separator, tooltip, skeleton, input, checkbox, calendar, dialog, dropdown-menu, popover, select, switch, table, tabs, textarea, **slider** added in Plan #6).
123
- - `src/react/fields/` — extracted per-fieldtype renderers (`FieldShell`, `TextLikeInput`, `SelectFieldInput`, `ToggleFieldInput`, `DateFieldInput`, `HiddenInput`, `CheckboxInput`, `RadioInput`, `ToggleButtonsInput`, `CheckboxListInput`, `SliderInput`, `ColorInput`, `DateTimeInput`, `KeyValueInput`, `TagsInput`, `FileUploadInput`, `MarkdownInput`). `FieldShell` wraps every input with the label / required asterisk / prefix / suffix / helperText chrome — `SchemaRenderer` is now a thin dispatcher.
171
+ - `src/react/fields/` — extracted per-fieldtype renderers (`FieldShell`, `TextLikeInput`, `SelectFieldInput`, `ToggleFieldInput`, `DateFieldInput`, `HiddenInput`, `CheckboxInput`, `RadioInput`, `ToggleButtonsInput`, `CheckboxListInput`, `SliderInput`, `ColorInput`, `DateTimeInput`, `KeyValueInput`, `TagsInput`, `FileUploadInput`, `MarkdownInput`). `FieldShell` wraps every input with the label / required asterisk / prefix / suffix / helperText chrome — consumed by `schemaRenderer/form/renderField.tsx`'s 13-way field-type switch.
124
172
  - `src/uploads/` — `UploadAdapter` interface + `localUpload({ root, urlPrefix })` adapter for FileUpload. Apps register via `Pilotiq.uploads({ adapter })`; route `POST {base}/_uploads` (multipart) hands the file off to the adapter and returns `{ ok, url }`. `_uploads` route validates `accept` + `maxSize` server-side from the field meta (re-checked even though the client also enforces, so a tampered client can't bypass). Adapter contract is storage-agnostic — disk / S3 / R2 / `@pilotiq/media` all implement the same shape. **`RenderContext.uploadUrl` vs `hasUploadAdapter` (2026-05-04 cont'd):** `uploadUrl` is *always* stamped by `pageData.uploadCtx` (so `FileUpload` can show a clear "no upload route configured" error when missed); the companion `hasUploadAdapter: true` is only set when `cfg.uploads` is present, and tells fields with *optional* upload affordances (e.g. `MarkdownField`'s `attachFiles` toolbar button) to hide themselves rather than render a broken control. `uploadCtx(ctx, cfg)` takes the full PilotiqConfig now (was: `basePath`).
125
173
  - `src/plugins/themeEditor.ts` — `themeEditor()` plugin.
126
174
 
@@ -166,6 +214,14 @@ Deep notes for many of these also live in `~/.claude/projects/-Users-sleman-Proj
166
214
  - Plugin authors expose factories: `panel.rightPanel(...)` from inside their `register(panel)` so consumers wire via `.plugins([…])`.
167
215
  - Plan: `docs/plans/right-sidebar.md`. Guide: `docs/guide/right-sidebar.md`.
168
216
 
217
+ ### Component slots
218
+
219
+ - `Pilotiq.components({ nav, header, footer })` registers build-time chrome-slot overrides. Three slots ship: `nav` (replaces default nav tree — `<SidebarMenu>` body in `SidebarLayout`, `<nav>` cluster in `TopbarLayout`), `header` (replaces the whole `<header>` chrome bar in both layouts — in `TopbarLayout` this subsumes the nav region, so setting `header` makes `nav` irrelevant for that layout), `footer` (mounts a `<footer>` element below the main content area in both layouts — separate from the `panels::footer` render hook, which keeps firing INSIDE the content area). The shape is open-ended so additions don't break this surface. `.components()` is order-independent and merges across calls (later call wins per slot; unset keys preserved).
220
+ - Build-time wiring mirrors `rightPanels` — the Vite plugin's `_components.ts` emitter walks `cfg.components` and stamps `componentSlotRegistry: { [slot]: Component }` parallel to `componentRegistry` + `rightPanelRegistry`. The component ref never travels over the wire; the auto-gen `+Layout.tsx` imports the registry and forwards it to `<AppShell componentSlotRegistry=…>`, which threads it through to the layout via `AppShellProps`.
221
+ - Render-hooks vs slots: render-hooks (`panels::sidebar.nav.start` / `panels::sidebar.nav.end`) *splice* around the nav region — they still fire whether the nav is the framework default OR a custom slot component, so plugins that just want to inject a header banner above the nav don't fight with consumers that swap the whole nav. **`header` is the exception** — render hooks rooted INSIDE the default header (`panels::topbar.start`, `panels::topbar.end`, `panels::user-menu.before`, `panels::user-menu.after`) do NOT fire when the header is replaced, since the container they splice into is gone. Plugin authors who care about preserving those splices inside a custom header can mount `<RenderHookSlot name="…" hooks={panel.renderHooks} />` themselves from within the custom header.
222
+ - Public surface: `NavComponentProps`, `HeaderComponentProps`, `FooterComponentProps`, `isNavItemActive` re-exported from `@pilotiq/pilotiq/react`. `NavItem` is also re-exported there for convenience (it already exists on the main barrel). Prop contracts: `nav` + `header` both receive `{ navigation: NavItem[]; basePath: string; currentPath?: string }` (header mirrors nav so a topbar-replacement header can render the nav inline without juggling a second slot); `footer` receives `{ basePath: string; currentPath?: string }` (minimal — footers rarely need the nav tree). For `header` replacements, the existing pilotiq chrome components (`SearchTrigger`, `ThemeToggle`, `NotificationBell`, `RightSidebarTrigger`, `UserMenu`) are exported from `@pilotiq/pilotiq/react` so consumers can drop them back in à la carte rather than reimplementing every control. Authoring example: a user-defined `MyCustomSidebar` lives in `app/Pilotiq/` next to the panel module, gets registered via `Pilotiq.make('Admin').components({ nav: MyCustomSidebar })`.
223
+ - **Authoring `.tsx` inside the panel module dir:** the Vite plugin jiti-loads the panel module at boot so it can harvest `cfg.components` into `_components.ts`. Two gotchas surfaced when this happens: (1) jiti needs JSX support enabled to parse `.tsx` — the plugin passes `jsx: { runtime: 'automatic' }` to `createJiti`, matching the playground tsconfig's `"jsx": "react-jsx"` (no per-file React import needed); (2) jiti's resolver falls through `.js` → `.ts` but NOT `.js` → `.tsx`, so the import statement in the panel module must use the literal `.tsx` extension (e.g. `import { MyCustomSidebar } from './MyCustomSidebar.tsx'`). `allowImportingTsExtensions: true` in the playground tsconfig keeps TS happy with this. The non-panel-module sibling pattern (a `.tsx` registered via `registerWidgetComponents` / `registerEntryComponents` from `+Layout.tsx`) sidesteps both — it's read by Vite, not jiti — but that pattern doesn't apply to component slots because the slot needs a real component ref at panel-build time, not a registry name.
224
+
169
225
  ---
170
226
 
171
227
  ## Theme system
package/dist/Pilotiq.d.ts CHANGED
@@ -12,6 +12,7 @@ import type { NavigationBadgeColor } from './Resource.js';
12
12
  import type { RenderHookEntry, RenderHookFn, RenderHookName, RenderHookScope } from './RenderHook.js';
13
13
  import type { NotificationActionHandler } from './notifications/types.js';
14
14
  import { type RightPanelContribution } from './RightPanel.js';
15
+ import type { NavComponentProps, HeaderComponentProps, FooterComponentProps } from './react/component-slots.js';
15
16
  export type PilotiqLayout = 'sidebar' | 'topbar';
16
17
  /** Plugin interface for extending Pilotiq panels. */
17
18
  export interface PilotiqPlugin {
@@ -234,6 +235,19 @@ export interface PilotiqConfig {
234
235
  * closest to the page tree (innermost wrap).
235
236
  */
236
237
  layoutProviders?: LayoutProviderComponent[];
238
+ /**
239
+ * Build-time component overrides for panel chrome slots. Registered
240
+ * via `Pilotiq.components({ nav })`. The Vite plugin harvests the
241
+ * actual React refs into `pages/(pilotiq)/_components.ts`; component
242
+ * refs never travel over the wire.
243
+ *
244
+ * v1 ships only the `nav` slot — full replacement of the sidebar's
245
+ * `<SidebarContent>` body and the topbar's `<nav>` element. Other
246
+ * slots (`header`, `footer`, …) will land when a concrete consumer
247
+ * asks; the shape is open-ended so additions don't break this
248
+ * surface.
249
+ */
250
+ components?: ComponentSlots;
237
251
  /**
238
252
  * AI suggestion mode — controls what happens when an AI agent calls a
239
253
  * write tool against a form field.
@@ -261,6 +275,41 @@ export type LayoutProviderComponent = React.ComponentType<{
261
275
  children: React.ReactNode;
262
276
  basePath?: string;
263
277
  }>;
278
+ /**
279
+ * Chrome-slot overrides registered through `Pilotiq.components({ … })`.
280
+ *
281
+ * Three slots ship today:
282
+ *
283
+ * - `nav` — replaces the default nav tree (`<SidebarMenu>` body in
284
+ * `SidebarLayout`, the `<nav>` cluster in `TopbarLayout`). Surrounding
285
+ * chrome (branding header, render-hook splices, footer, sign-out
286
+ * menu) stays.
287
+ * - `header` — replaces the whole `<header>` chrome bar. In
288
+ * `SidebarLayout` that's the top bar with search / theme / bell /
289
+ * user menu; in `TopbarLayout` that's the whole top region including
290
+ * the brand cluster AND the nav (setting `header` makes `nav`
291
+ * irrelevant in `TopbarLayout`). Render hooks that splice INSIDE the
292
+ * default header (`panels::topbar.*`, `panels::user-menu.*`) don't
293
+ * fire when the header is replaced — the surrounding container is
294
+ * gone. The consumer reimplements the chrome controls they want
295
+ * (import `<SearchTrigger>`, `<ThemeToggle>`, `<NotificationBell>`,
296
+ * `<RightSidebarTrigger>`, `<UserMenu>` from `@pilotiq/pilotiq/react`).
297
+ * - `footer` — mounts a `<footer>` element BELOW the main content area
298
+ * in both layouts (outside the scroll region). Separate from the
299
+ * `panels::footer` render hook, which keeps firing inside the content
300
+ * area for per-page trailing chrome.
301
+ *
302
+ * The shape is open-ended so additional slots can land without a
303
+ * breaking change when a concrete consumer asks for them.
304
+ */
305
+ export interface ComponentSlots {
306
+ /** Component rendered in place of the default nav tree. */
307
+ nav?: React.ComponentType<NavComponentProps>;
308
+ /** Component rendered in place of the default `<header>` chrome. */
309
+ header?: React.ComponentType<HeaderComponentProps>;
310
+ /** Component rendered as the panel footer, below the main content. */
311
+ footer?: React.ComponentType<FooterComponentProps>;
312
+ }
264
313
  export declare class Pilotiq {
265
314
  private config;
266
315
  private installedPlugins;
@@ -578,6 +627,40 @@ export declare class Pilotiq {
578
627
  layoutProviders(list: LayoutProviderComponent[]): this;
579
628
  /** @internal — read by the Vite plugin's `_components.ts` emitter. */
580
629
  getLayoutProviders(): readonly LayoutProviderComponent[];
630
+ /**
631
+ * Override one of pilotiq's built-in chrome slots with a custom React
632
+ * component. Calling twice merges — the latest registration wins per
633
+ * slot; unset keys preserve the prior value (so a plugin can override
634
+ * `nav` without clearing a host app's `footer`).
635
+ *
636
+ * Three slots ship today: `nav` (replaces the default nav tree),
637
+ * `header` (replaces the whole `<header>` chrome bar in both
638
+ * layouts — in `TopbarLayout` this subsumes the nav), and `footer`
639
+ * (mounts a `<footer>` below the main content area in both layouts).
640
+ * See {@link ComponentSlots} for the per-slot semantics and which
641
+ * render hooks compose vs. stop firing under each replacement.
642
+ *
643
+ * Component refs are harvested by the Vite plugin into
644
+ * `pages/(pilotiq)/_components.ts` — they never travel over the wire,
645
+ * so authoring inside the panel module (which is import-safe on both
646
+ * server and client) is the supported entry point.
647
+ *
648
+ * @example
649
+ * ```ts
650
+ * import { MyCustomSidebar } from './MyCustomSidebar.js'
651
+ *
652
+ * Pilotiq.make('Admin').components({ nav: MyCustomSidebar })
653
+ * ```
654
+ *
655
+ * The supplied component receives `{ navigation, basePath, currentPath }`
656
+ * — the same shape `panelInfo()` produces for the default renderers.
657
+ * Import `NavComponentProps` and `isNavItemActive` from
658
+ * `@pilotiq/pilotiq/react` to author a typed component that reuses
659
+ * the framework's longest-prefix active-link semantics.
660
+ */
661
+ components(slots: ComponentSlots): this;
662
+ /** @internal — read by the Vite plugin's `_components.ts` emitter. */
663
+ getComponentSlots(): Readonly<ComponentSlots>;
581
664
  /**
582
665
  * Set the panel-wide AI suggestion mode.
583
666
  *
@@ -1 +1 @@
1
- {"version":3,"file":"Pilotiq.d.ts","sourceRoot":"","sources":["../src/Pilotiq.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AACnC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAChD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA;AACzD,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACZ,cAAc,EACd,eAAe,EAChB,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AACzE,OAAO,EAGL,KAAK,sBAAsB,EAC5B,MAAM,iBAAiB,CAAA;AAExB,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,QAAQ,CAAA;AAEhD,qDAAqD;AACrD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MA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
package/dist/Pilotiq.js CHANGED
@@ -475,6 +475,45 @@ export class Pilotiq {
475
475
  getLayoutProviders() {
476
476
  return this.config.layoutProviders ?? [];
477
477
  }
478
+ /**
479
+ * Override one of pilotiq's built-in chrome slots with a custom React
480
+ * component. Calling twice merges — the latest registration wins per
481
+ * slot; unset keys preserve the prior value (so a plugin can override
482
+ * `nav` without clearing a host app's `footer`).
483
+ *
484
+ * Three slots ship today: `nav` (replaces the default nav tree),
485
+ * `header` (replaces the whole `<header>` chrome bar in both
486
+ * layouts — in `TopbarLayout` this subsumes the nav), and `footer`
487
+ * (mounts a `<footer>` below the main content area in both layouts).
488
+ * See {@link ComponentSlots} for the per-slot semantics and which
489
+ * render hooks compose vs. stop firing under each replacement.
490
+ *
491
+ * Component refs are harvested by the Vite plugin into
492
+ * `pages/(pilotiq)/_components.ts` — they never travel over the wire,
493
+ * so authoring inside the panel module (which is import-safe on both
494
+ * server and client) is the supported entry point.
495
+ *
496
+ * @example
497
+ * ```ts
498
+ * import { MyCustomSidebar } from './MyCustomSidebar.js'
499
+ *
500
+ * Pilotiq.make('Admin').components({ nav: MyCustomSidebar })
501
+ * ```
502
+ *
503
+ * The supplied component receives `{ navigation, basePath, currentPath }`
504
+ * — the same shape `panelInfo()` produces for the default renderers.
505
+ * Import `NavComponentProps` and `isNavItemActive` from
506
+ * `@pilotiq/pilotiq/react` to author a typed component that reuses
507
+ * the framework's longest-prefix active-link semantics.
508
+ */
509
+ components(slots) {
510
+ this.config.components = { ...(this.config.components ?? {}), ...slots };
511
+ return this;
512
+ }
513
+ /** @internal — read by the Vite plugin's `_components.ts` emitter. */
514
+ getComponentSlots() {
515
+ return this.config.components ?? {};
516
+ }
478
517
  /**
479
518
  * Set the panel-wide AI suggestion mode.
480
519
  *
@@ -1 +1 @@
1
- {"version":3,"file":"Pilotiq.js","sourceRoot":"","sources":["../src/Pilotiq.ts"],"names":[],"mappings":"AAkBA,OAAO,EACL,kBAAkB,EAClB,yBAAyB,GAE1B,MAA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