@columnus/sdk 0.0.0-stage → 0.3.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 (386) hide show
  1. package/dist/blocknote-editor-FP33A6RJ.js +7 -0
  2. package/dist/blocknote-editor-FP33A6RJ.js.map +1 -0
  3. package/dist/blocknote-editor-YZEFMXLC.css +47 -0
  4. package/dist/blocknote-editor-YZEFMXLC.css.map +1 -0
  5. package/dist/blocknote-preview-6WRENQZD.css +47 -0
  6. package/dist/blocknote-preview-6WRENQZD.css.map +1 -0
  7. package/dist/blocknote-preview-QZ5SC2GJ.js +7 -0
  8. package/dist/blocknote-preview-QZ5SC2GJ.js.map +1 -0
  9. package/dist/chunk-5IPH2A64.js +23337 -0
  10. package/dist/chunk-5IPH2A64.js.map +1 -0
  11. package/dist/chunk-6LKVKI5O.js +494 -0
  12. package/dist/chunk-6LKVKI5O.js.map +1 -0
  13. package/dist/chunk-BXTTCBIK.js +11 -0
  14. package/dist/chunk-BXTTCBIK.js.map +1 -0
  15. package/dist/chunk-CKNRITN3.js +225 -0
  16. package/dist/chunk-CKNRITN3.js.map +1 -0
  17. package/dist/chunk-FKHOREJP.js +58 -0
  18. package/dist/chunk-FKHOREJP.js.map +1 -0
  19. package/dist/chunk-ICKWVUW7.js +134 -0
  20. package/dist/chunk-ICKWVUW7.js.map +1 -0
  21. package/dist/chunk-LTPU2AL3.js +18774 -0
  22. package/dist/chunk-LTPU2AL3.js.map +1 -0
  23. package/dist/chunk-PX6F3LHL.js +37 -0
  24. package/dist/chunk-PX6F3LHL.js.map +1 -0
  25. package/dist/chunk-QPQRNIKG.js +142 -0
  26. package/dist/chunk-QPQRNIKG.js.map +1 -0
  27. package/dist/chunk-UXUDOFKZ.js +4169 -0
  28. package/dist/chunk-UXUDOFKZ.js.map +1 -0
  29. package/dist/chunk-ZTWPGA37.js +68 -0
  30. package/dist/chunk-ZTWPGA37.js.map +1 -0
  31. package/dist/cms/builder/diff-view.js +70 -0
  32. package/dist/cms/builder/diff-view.js.map +1 -0
  33. package/dist/cms/builder/panel.js +1316 -0
  34. package/dist/cms/builder/panel.js.map +1 -0
  35. package/dist/cms/convex/index.css +47 -0
  36. package/dist/cms/convex/index.css.map +1 -0
  37. package/dist/cms/convex/index.js +370 -0
  38. package/dist/cms/convex/index.js.map +1 -0
  39. package/dist/cms/index.css +47 -0
  40. package/dist/cms/index.css.map +1 -0
  41. package/dist/cms/index.js +9 -0
  42. package/dist/cms/index.js.map +1 -0
  43. package/dist/cms/server/index.js +5 -0
  44. package/dist/cms/server/index.js.map +1 -0
  45. package/dist/cms/tables/tables-dialog.css +47 -0
  46. package/dist/cms/tables/tables-dialog.css.map +1 -0
  47. package/dist/cms/tables/tables-dialog.js +590 -0
  48. package/dist/cms/tables/tables-dialog.js.map +1 -0
  49. package/dist/cms/tailwind.css +4 -0
  50. package/dist/editor-54UG7BSP.css +47 -0
  51. package/dist/editor-54UG7BSP.css.map +1 -0
  52. package/dist/editor-HJ3UNV3Q.js +427 -0
  53. package/dist/editor-HJ3UNV3Q.js.map +1 -0
  54. package/dist/mcp-cli.js +61218 -0
  55. package/dist/primitives.css +143 -0
  56. package/dist/rich-text-editor/blocknote-preview-studio.css +54 -0
  57. package/dist/richtext.css +4 -0
  58. package/dist/types/cms/src/adapters/default-richtext.d.ts +24 -0
  59. package/dist/types/cms/src/adapters/projected-fields-adapter.d.ts +22 -0
  60. package/dist/types/cms/src/adapters/table-rows-context.d.ts +4 -0
  61. package/dist/types/cms/src/adapters/table-rows-richtext.d.ts +8 -0
  62. package/dist/types/cms/src/builder/annotate.d.ts +13 -0
  63. package/dist/types/cms/src/builder/diff-view.d.ts +10 -0
  64. package/dist/types/cms/src/builder/inspect.d.ts +32 -0
  65. package/dist/types/cms/src/builder/panel.d.ts +11 -0
  66. package/dist/types/cms/src/builder/sessions-menu.d.ts +37 -0
  67. package/dist/types/cms/src/builder/sidecar-json.d.ts +2 -0
  68. package/dist/types/cms/src/cache/html-cache.d.ts +12 -0
  69. package/dist/types/cms/src/chrome/changes-view.d.ts +15 -0
  70. package/dist/types/cms/src/chrome/confirm-panel.d.ts +10 -0
  71. package/dist/types/cms/src/chrome/floating-toolbar.d.ts +25 -0
  72. package/dist/types/cms/src/chrome/icons.d.ts +13 -0
  73. package/dist/types/cms/src/chrome/overlay-styles.d.ts +38 -0
  74. package/dist/types/cms/src/chrome/resolve-dialog.d.ts +26 -0
  75. package/dist/types/cms/src/chrome/session-storage.d.ts +3 -0
  76. package/dist/types/cms/src/convex/cms-convex-proposals.d.ts +19 -0
  77. package/dist/types/cms/src/convex/cms-convex-shell.d.ts +8 -0
  78. package/dist/types/cms/src/convex/cms-host-refs.d.ts +15 -0
  79. package/dist/types/cms/src/convex/index.d.ts +7 -0
  80. package/dist/types/cms/src/convex/proposal-refs.d.ts +20 -0
  81. package/dist/types/cms/src/convex/use-cms-display-fields-adapter.d.ts +17 -0
  82. package/dist/types/cms/src/convex/use-cms-display-values.d.ts +12 -0
  83. package/dist/types/cms/src/convex/use-cms-editor-auth.d.ts +12 -0
  84. package/dist/types/cms/src/convex/use-cms-storage-display.d.ts +19 -0
  85. package/dist/types/cms/src/convex/use-cms-storage-fields-adapter.d.ts +63 -0
  86. package/dist/types/cms/src/convex/use-fields-adapter-host.d.ts +4 -0
  87. package/dist/types/cms/src/create/compound-create.d.ts +56 -0
  88. package/dist/types/cms/src/draft/merge-draft.d.ts +31 -0
  89. package/dist/types/cms/src/edit/cms-compound-create.d.ts +12 -0
  90. package/dist/types/cms/src/edit/cms-create-button.d.ts +9 -0
  91. package/dist/types/cms/src/edit/edit-surface.d.ts +16 -0
  92. package/dist/types/cms/src/edit/field-editor-dialog.d.ts +22 -0
  93. package/dist/types/cms/src/edit/inplace-field-editor.d.ts +21 -0
  94. package/dist/types/cms/src/edit/inplace-switch-modal.d.ts +5 -0
  95. package/dist/types/cms/src/edit/insert-row-dialog.d.ts +20 -0
  96. package/dist/types/cms/src/index.d.ts +35 -0
  97. package/dist/types/cms/src/list/build-insert-draft.d.ts +13 -0
  98. package/dist/types/cms/src/manifest-index.d.ts +5 -0
  99. package/dist/types/cms/src/nav/content-ref-integrity.d.ts +18 -0
  100. package/dist/types/cms/src/nav/content-ref.d.ts +6 -0
  101. package/dist/types/cms/src/nav/infer-navigation-table.d.ts +20 -0
  102. package/dist/types/cms/src/nav/slugify-de.d.ts +4 -0
  103. package/dist/types/cms/src/pages/login-page.d.ts +5 -0
  104. package/dist/types/cms/src/profile/propose-gates.d.ts +12 -0
  105. package/dist/types/cms/src/profile/readable-tables.d.ts +13 -0
  106. package/dist/types/cms/src/projection/cms-projection.d.ts +63 -0
  107. package/dist/types/cms/src/proposals/types.d.ts +59 -0
  108. package/dist/types/cms/src/provider/builder-draft.d.ts +14 -0
  109. package/dist/types/cms/src/provider/cms-provider.d.ts +240 -0
  110. package/dist/types/cms/src/rich-doc/cms-rich-doc-view.d.ts +4 -0
  111. package/dist/types/cms/src/server/cookie.d.ts +11 -0
  112. package/dist/types/cms/src/server/index.d.ts +2 -0
  113. package/dist/types/cms/src/server/session.d.ts +53 -0
  114. package/dist/types/cms/src/stamps/attrs.d.ts +17 -0
  115. package/dist/types/cms/src/stamps/related.d.ts +11 -0
  116. package/dist/types/cms/src/stamps/resolve-display.d.ts +41 -0
  117. package/dist/types/cms/src/stamps/row.d.ts +41 -0
  118. package/dist/types/cms/src/stamps/stamp-media-drop.d.ts +23 -0
  119. package/dist/types/cms/src/stamps/stamp.d.ts +44 -0
  120. package/dist/types/cms/src/stamps/storage-display.d.ts +4 -0
  121. package/dist/types/cms/src/stamps/use-cms-projected-field.d.ts +6 -0
  122. package/dist/types/cms/src/stamps/use-cms-projected-table.d.ts +7 -0
  123. package/dist/types/cms/src/stamps/use-cms-related-row.d.ts +2 -0
  124. package/dist/types/cms/src/tables/tables-dialog.d.ts +6 -0
  125. package/dist/types/cms/src/tables/use-cms-grid.d.ts +78 -0
  126. package/dist/types/cms/src/tables/use-draft-commands.d.ts +35 -0
  127. package/dist/types/data-grid/src/components/balanced-preview-columns.d.ts +7 -0
  128. package/dist/types/data-grid/src/components/cell-formula-bar.d.ts +40 -0
  129. package/dist/types/data-grid/src/components/cell-renderer.d.ts +10 -0
  130. package/dist/types/data-grid/src/components/cell-selection.d.ts +72 -0
  131. package/dist/types/data-grid/src/components/column-filter-popover.d.ts +29 -0
  132. package/dist/types/data-grid/src/components/context-menu-selection.d.ts +24 -0
  133. package/dist/types/data-grid/src/components/data-grid-table.d.ts +49 -0
  134. package/dist/types/data-grid/src/components/delete-confirm-copy.d.ts +6 -0
  135. package/dist/types/data-grid/src/components/display-search-scope-notice.d.ts +4 -0
  136. package/dist/types/data-grid/src/components/draft-rows.d.ts +14 -0
  137. package/dist/types/data-grid/src/components/field-condition-editor.d.ts +71 -0
  138. package/dist/types/data-grid/src/components/fill-handle.d.ts +22 -0
  139. package/dist/types/data-grid/src/components/grid-action-bar.d.ts +8 -0
  140. package/dist/types/data-grid/src/components/grid-body-layout.d.ts +27 -0
  141. package/dist/types/data-grid/src/components/grid-body-row.d.ts +83 -0
  142. package/dist/types/data-grid/src/components/grid-editing.d.ts +158 -0
  143. package/dist/types/data-grid/src/components/grid-event-utils.d.ts +10 -0
  144. package/dist/types/data-grid/src/components/grid-filter-search-chips.d.ts +7 -0
  145. package/dist/types/data-grid/src/components/grid-filter-search-context.d.ts +135 -0
  146. package/dist/types/data-grid/src/components/grid-filter-search.d.ts +6 -0
  147. package/dist/types/data-grid/src/components/grid-row-menu.d.ts +23 -0
  148. package/dist/types/data-grid/src/components/grid-seam-island.d.ts +23 -0
  149. package/dist/types/data-grid/src/components/grid-sort-group.d.ts +25 -0
  150. package/dist/types/data-grid/src/components/grid-toolbar.d.ts +54 -0
  151. package/dist/types/data-grid/src/components/index-suggestion-banner.d.ts +11 -0
  152. package/dist/types/data-grid/src/components/inline-edit-draft.d.ts +18 -0
  153. package/dist/types/data-grid/src/components/keyboard-shortcuts-overlay.d.ts +7 -0
  154. package/dist/types/data-grid/src/components/measure-column-auto-width.d.ts +6 -0
  155. package/dist/types/data-grid/src/components/pending-edits.d.ts +25 -0
  156. package/dist/types/data-grid/src/components/perform-grid-row-delete.d.ts +27 -0
  157. package/dist/types/data-grid/src/components/query-plan-banner.d.ts +13 -0
  158. package/dist/types/data-grid/src/components/query-predicate-builder.d.ts +53 -0
  159. package/dist/types/data-grid/src/components/row-detail-dialog.d.ts +17 -0
  160. package/dist/types/data-grid/src/components/row-preview-content.d.ts +21 -0
  161. package/dist/types/data-grid/src/components/row-preview-drawer.d.ts +24 -0
  162. package/dist/types/data-grid/src/components/selection-value-chips.d.ts +12 -0
  163. package/dist/types/data-grid/src/components/selection.d.ts +46 -0
  164. package/dist/types/data-grid/src/components/table-cell-overlays.d.ts +33 -0
  165. package/dist/types/data-grid/src/components/table-color-marker.d.ts +10 -0
  166. package/dist/types/data-grid/src/components/use-column-visibility.d.ts +5 -0
  167. package/dist/types/data-grid/src/components/use-column-widths.d.ts +6 -0
  168. package/dist/types/data-grid/src/components/use-undo-redo.d.ts +46 -0
  169. package/dist/types/data-grid/src/hooks/plan-pending-edits.d.ts +41 -0
  170. package/dist/types/data-grid/src/hooks/use-grid-interactions.d.ts +100 -0
  171. package/dist/types/data-grid/src/hooks/use-grid-pending-state.d.ts +41 -0
  172. package/dist/types/data-grid/src/hooks/use-grid-selection-model.d.ts +28 -0
  173. package/dist/types/data-grid/src/hooks/use-grid-table-layout.d.ts +39 -0
  174. package/dist/types/data-grid/src/hooks/use-true-after-delay.d.ts +10 -0
  175. package/dist/types/data-grid/src/index.d.ts +47 -0
  176. package/dist/types/data-grid/src/lib/column-filter.d.ts +43 -0
  177. package/dist/types/data-grid/src/lib/display-search-scope.d.ts +2 -0
  178. package/dist/types/data-grid/src/lib/format-query-chips.d.ts +28 -0
  179. package/dist/types/data-grid/src/lib/grid-items.d.ts +63 -0
  180. package/dist/types/data-grid/src/lib/persistent-state.d.ts +6 -0
  181. package/dist/types/data-grid/src/lib/query-editor-draft.d.ts +15 -0
  182. package/dist/types/data-grid/src/lib/use-row-preview-collapsed.d.ts +9 -0
  183. package/dist/types/data-grid/src/lib/use-row-preview-title.d.ts +1 -0
  184. package/dist/types/fields/src/components/batch-edit-sheet.d.ts +10 -0
  185. package/dist/types/fields/src/components/cell-editor.d.ts +29 -0
  186. package/dist/types/fields/src/components/date-time-input.d.ts +21 -0
  187. package/dist/types/fields/src/components/date-time-picker-logic.d.ts +13 -0
  188. package/dist/types/fields/src/components/field-input-chrome.d.ts +11 -0
  189. package/dist/types/fields/src/components/field-input-inline.d.ts +30 -0
  190. package/dist/types/fields/src/components/field-input.d.ts +36 -0
  191. package/dist/types/fields/src/components/field-value-view.d.ts +10 -0
  192. package/dist/types/fields/src/components/file-array-cell.d.ts +5 -0
  193. package/dist/types/fields/src/components/file-array-upload-dialog.d.ts +19 -0
  194. package/dist/types/fields/src/components/file-cell.d.ts +5 -0
  195. package/dist/types/fields/src/components/file-input.d.ts +21 -0
  196. package/dist/types/fields/src/components/file-upload-dialog.d.ts +19 -0
  197. package/dist/types/fields/src/components/focus-text-input.d.ts +5 -0
  198. package/dist/types/fields/src/components/id-array-cell.d.ts +9 -0
  199. package/dist/types/fields/src/components/id-array-values.d.ts +1 -0
  200. package/dist/types/fields/src/components/id-cell.d.ts +4 -0
  201. package/dist/types/fields/src/components/id-picker.d.ts +28 -0
  202. package/dist/types/fields/src/components/image-array-cell.d.ts +7 -0
  203. package/dist/types/fields/src/components/image-cell.d.ts +7 -0
  204. package/dist/types/fields/src/components/image-preview-dialog.d.ts +8 -0
  205. package/dist/types/fields/src/components/media-compact-preview.d.ts +17 -0
  206. package/dist/types/fields/src/components/media-library-picker-dialog.d.ts +16 -0
  207. package/dist/types/fields/src/components/multi-id-picker.d.ts +24 -0
  208. package/dist/types/fields/src/components/picker-chrome.d.ts +28 -0
  209. package/dist/types/fields/src/components/picker-density.d.ts +5 -0
  210. package/dist/types/fields/src/components/picker-list-placeholder.d.ts +13 -0
  211. package/dist/types/fields/src/components/picker-menu-keyboard.d.ts +16 -0
  212. package/dist/types/fields/src/components/picker-menu-layout.d.ts +12 -0
  213. package/dist/types/fields/src/components/picker-menu-portal.d.ts +19 -0
  214. package/dist/types/fields/src/components/picker-option-row.d.ts +10 -0
  215. package/dist/types/fields/src/components/picker-overlay.d.ts +35 -0
  216. package/dist/types/fields/src/components/record-link-chip.d.ts +21 -0
  217. package/dist/types/fields/src/components/row-edit-panel.d.ts +38 -0
  218. package/dist/types/fields/src/components/row-editor.d.ts +21 -0
  219. package/dist/types/fields/src/components/row-popover.d.ts +11 -0
  220. package/dist/types/fields/src/components/use-flush-ref.d.ts +3 -0
  221. package/dist/types/fields/src/components/use-picker-combobox.d.ts +88 -0
  222. package/dist/types/fields/src/components/use-picker-highlight-scroll.d.ts +4 -0
  223. package/dist/types/fields/src/components/use-picker-menu-overlay.d.ts +7 -0
  224. package/dist/types/fields/src/fields-data-adapter.d.ts +111 -0
  225. package/dist/types/fields/src/fields-data-provider.d.ts +45 -0
  226. package/dist/types/fields/src/hooks/use-debounced-value.d.ts +1 -0
  227. package/dist/types/fields/src/hooks/use-row-edit-shortcuts.d.ts +15 -0
  228. package/dist/types/fields/src/index.d.ts +38 -0
  229. package/dist/types/fields/src/lib/is-row-doc-dirty.d.ts +2 -0
  230. package/dist/types/fields/src/lib/scroll-to-form-field.d.ts +6 -0
  231. package/dist/types/fields/src/media-library-query.d.ts +34 -0
  232. package/dist/types/fields/src/media-upload-limits.d.ts +18 -0
  233. package/dist/types/fields/src/record-actions-context.d.ts +17 -0
  234. package/dist/types/fields/src/storage-upload.d.ts +21 -0
  235. package/dist/types/primitives/src/components/ui/accordion.d.ts +6 -0
  236. package/dist/types/primitives/src/components/ui/alert-dialog.d.ts +12 -0
  237. package/dist/types/primitives/src/components/ui/badge.d.ts +9 -0
  238. package/dist/types/primitives/src/components/ui/button.d.ts +11 -0
  239. package/dist/types/primitives/src/components/ui/calendar.d.ts +8 -0
  240. package/dist/types/primitives/src/components/ui/card.d.ts +7 -0
  241. package/dist/types/primitives/src/components/ui/checkbox.d.ts +3 -0
  242. package/dist/types/primitives/src/components/ui/dialog.d.ts +15 -0
  243. package/dist/types/primitives/src/components/ui/dropdown-menu.d.ts +10 -0
  244. package/dist/types/primitives/src/components/ui/info-hint.d.ts +37 -0
  245. package/dist/types/primitives/src/components/ui/input.d.ts +2 -0
  246. package/dist/types/primitives/src/components/ui/label.d.ts +3 -0
  247. package/dist/types/primitives/src/components/ui/popover.d.ts +6 -0
  248. package/dist/types/primitives/src/components/ui/save-bar.d.ts +43 -0
  249. package/dist/types/primitives/src/components/ui/select.d.ts +8 -0
  250. package/dist/types/primitives/src/components/ui/separator.d.ts +3 -0
  251. package/dist/types/primitives/src/components/ui/sheet.d.ts +18 -0
  252. package/dist/types/primitives/src/components/ui/sonner.d.ts +1 -0
  253. package/dist/types/primitives/src/components/ui/switch.d.ts +3 -0
  254. package/dist/types/primitives/src/components/ui/table.d.ts +7 -0
  255. package/dist/types/primitives/src/components/ui/tabs.d.ts +6 -0
  256. package/dist/types/primitives/src/components/ui/tooltip.d.ts +6 -0
  257. package/dist/types/primitives/src/index.d.ts +28 -0
  258. package/dist/types/primitives/src/lib/animation-frame-batcher.d.ts +11 -0
  259. package/dist/types/primitives/src/lib/locale-week-start.d.ts +5 -0
  260. package/dist/types/primitives/src/lib/save-bar-logic.d.ts +52 -0
  261. package/dist/types/primitives/src/lib/use-raf-batched-pointer-drag.d.ts +31 -0
  262. package/dist/types/primitives/src/lib/use-save-bar.d.ts +36 -0
  263. package/dist/types/primitives/src/lib/use-unsaved-changes-guard.d.ts +15 -0
  264. package/dist/types/primitives/src/lib/utils.d.ts +6 -0
  265. package/dist/types/richtext/src/editor.d.ts +16 -0
  266. package/dist/types/richtext/src/host-adapter.d.ts +66 -0
  267. package/dist/types/richtext/src/index.d.ts +11 -0
  268. package/dist/types/richtext/src/markdown-editor/editor-styles.d.ts +7 -0
  269. package/dist/types/richtext/src/markdown-editor/markdown-editor-dialog.d.ts +16 -0
  270. package/dist/types/richtext/src/markdown-editor/markdown-editor.d.ts +2 -0
  271. package/dist/types/richtext/src/markdown-editor/markdown-field-input.d.ts +11 -0
  272. package/dist/types/richtext/src/markdown-editor/markdown-field-trigger.d.ts +8 -0
  273. package/dist/types/richtext/src/markdown-editor/markdown-insert-pickers-session.d.ts +5 -0
  274. package/dist/types/richtext/src/markdown-editor/markdown-insert-pickers.d.ts +9 -0
  275. package/dist/types/richtext/src/markdown-editor/markdown-preview.d.ts +7 -0
  276. package/dist/types/richtext/src/markdown-editor/markdown-rich-preview.d.ts +5 -0
  277. package/dist/types/richtext/src/markdown-editor/record-link-picker-session.d.ts +7 -0
  278. package/dist/types/richtext/src/markdown-editor/record-link-picker.d.ts +9 -0
  279. package/dist/types/richtext/src/markdown-editor/record-table-picker.d.ts +21 -0
  280. package/dist/types/richtext/src/markdown-editor/use-markdown-insert-pickers.d.ts +33 -0
  281. package/dist/types/richtext/src/record-table-view.d.ts +17 -0
  282. package/dist/types/richtext/src/rich-doc-view.d.ts +30 -0
  283. package/dist/types/richtext/src/rich-text-editor/blocknote-editor.d.ts +25 -0
  284. package/dist/types/richtext/src/rich-text-editor/blocknote-portaled-dropdown.d.ts +2 -0
  285. package/dist/types/richtext/src/rich-text-editor/blocknote-preview.d.ts +12 -0
  286. package/dist/types/richtext/src/rich-text-editor/record-link-inline.d.ts +15 -0
  287. package/dist/types/richtext/src/rich-text-editor/record-link-rows-context.d.ts +9 -0
  288. package/dist/types/richtext/src/rich-text-editor/record-table-block.d.ts +18 -0
  289. package/dist/types/richtext/src/rich-text-editor/studio-schema.d.ts +283 -0
  290. package/dist/types/richtext/src/rich-text-editor/studio-slash-menu.d.ts +8 -0
  291. package/dist/types/richtext/src/rich-text-editor/use-sync-blocknote-value.d.ts +2 -0
  292. package/dist/types/shared/src/apiProfile.d.ts +164 -0
  293. package/dist/types/shared/src/apiProfileDiscovery.d.ts +88 -0
  294. package/dist/types/shared/src/apiProfileSlug.d.ts +11 -0
  295. package/dist/types/shared/src/apiProfileSources.d.ts +112 -0
  296. package/dist/types/shared/src/apiProfileValidators.d.ts +310 -0
  297. package/dist/types/shared/src/apiToken.d.ts +6 -0
  298. package/dist/types/shared/src/assetFamily.d.ts +38 -0
  299. package/dist/types/shared/src/assetFieldValues.d.ts +21 -0
  300. package/dist/types/shared/src/assetGraph.d.ts +221 -0
  301. package/dist/types/shared/src/assetJobs.d.ts +99 -0
  302. package/dist/types/shared/src/assetSettings.d.ts +147 -0
  303. package/dist/types/shared/src/auditRedact.d.ts +36 -0
  304. package/dist/types/shared/src/betterAuthSession.d.ts +12 -0
  305. package/dist/types/shared/src/bffHost.d.ts +36 -0
  306. package/dist/types/shared/src/bffProtocol.d.ts +563 -0
  307. package/dist/types/shared/src/bffRedact.d.ts +30 -0
  308. package/dist/types/shared/src/ciPreviewEnv.d.ts +21 -0
  309. package/dist/types/shared/src/clipboardTransfer.d.ts +25 -0
  310. package/dist/types/shared/src/convexFacade.d.ts +44 -0
  311. package/dist/types/shared/src/convexSiteUrl.d.ts +73 -0
  312. package/dist/types/shared/src/csv.d.ts +65 -0
  313. package/dist/types/shared/src/dataTransfer.d.ts +21 -0
  314. package/dist/types/shared/src/dateValues.d.ts +21 -0
  315. package/dist/types/shared/src/deployOutput.d.ts +3 -0
  316. package/dist/types/shared/src/displayLabel.d.ts +17 -0
  317. package/dist/types/shared/src/displayTemplateGenerator.d.ts +11 -0
  318. package/dist/types/shared/src/displayTypes.d.ts +10 -0
  319. package/dist/types/shared/src/erdLayout.d.ts +27 -0
  320. package/dist/types/shared/src/facets.d.ts +109 -0
  321. package/dist/types/shared/src/failureMessage.d.ts +5 -0
  322. package/dist/types/shared/src/fieldTypeMeta.d.ts +110 -0
  323. package/dist/types/shared/src/fieldTypeText.d.ts +34 -0
  324. package/dist/types/shared/src/fieldValueEqual.d.ts +10 -0
  325. package/dist/types/shared/src/fieldValueShape.d.ts +24 -0
  326. package/dist/types/shared/src/fieldValueText.d.ts +32 -0
  327. package/dist/types/shared/src/gridQuery.d.ts +103 -0
  328. package/dist/types/shared/src/importMatch.d.ts +80 -0
  329. package/dist/types/shared/src/index.d.ts +78 -0
  330. package/dist/types/shared/src/inferIdentifier.d.ts +18 -0
  331. package/dist/types/shared/src/keyboard.d.ts +16 -0
  332. package/dist/types/shared/src/manifestDeploy.d.ts +31 -0
  333. package/dist/types/shared/src/manifestHash.d.ts +12 -0
  334. package/dist/types/shared/src/mcpOAuth.d.ts +182 -0
  335. package/dist/types/shared/src/postLoginPath.d.ts +21 -0
  336. package/dist/types/shared/src/previewDeployName.d.ts +27 -0
  337. package/dist/types/shared/src/proposalDraftMerge.d.ts +35 -0
  338. package/dist/types/shared/src/proposePolicy.d.ts +17 -0
  339. package/dist/types/shared/src/proposeRateLimit.d.ts +27 -0
  340. package/dist/types/shared/src/queryBetween.d.ts +21 -0
  341. package/dist/types/shared/src/queryConditions.d.ts +46 -0
  342. package/dist/types/shared/src/queryExecution.d.ts +12 -0
  343. package/dist/types/shared/src/queryFieldOps.d.ts +123 -0
  344. package/dist/types/shared/src/queryMerge.d.ts +30 -0
  345. package/dist/types/shared/src/queryPlan.d.ts +86 -0
  346. package/dist/types/shared/src/queryStudio.d.ts +28 -0
  347. package/dist/types/shared/src/queryTypes.d.ts +184 -0
  348. package/dist/types/shared/src/queryValidators.d.ts +233 -0
  349. package/dist/types/shared/src/readApiQuery.d.ts +10 -0
  350. package/dist/types/shared/src/readModelLimits.d.ts +23 -0
  351. package/dist/types/shared/src/recordTableColumns.d.ts +24 -0
  352. package/dist/types/shared/src/recordTablePreload.d.ts +19 -0
  353. package/dist/types/shared/src/refDisplayRequests.d.ts +17 -0
  354. package/dist/types/shared/src/refGraph.d.ts +97 -0
  355. package/dist/types/shared/src/refsRecompute.d.ts +16 -0
  356. package/dist/types/shared/src/richDoc.d.ts +80 -0
  357. package/dist/types/shared/src/rowPatchWire.d.ts +12 -0
  358. package/dist/types/shared/src/rowTrash.d.ts +26 -0
  359. package/dist/types/shared/src/savedView.d.ts +37 -0
  360. package/dist/types/shared/src/schemaGenerator.d.ts +36 -0
  361. package/dist/types/shared/src/schemaShrink.d.ts +82 -0
  362. package/dist/types/shared/src/schemaShrinkValidators.d.ts +72 -0
  363. package/dist/types/shared/src/schemaTypes.d.ts +311 -0
  364. package/dist/types/shared/src/share.d.ts +8 -0
  365. package/dist/types/shared/src/shareApiBridge.d.ts +13 -0
  366. package/dist/types/shared/src/shareGuestPolicy.d.ts +14 -0
  367. package/dist/types/shared/src/shareProposal.d.ts +141 -0
  368. package/dist/types/shared/src/shareProposalDiff.d.ts +13 -0
  369. package/dist/types/shared/src/shareScopes.d.ts +19 -0
  370. package/dist/types/shared/src/shareTokenCrypto.d.ts +9 -0
  371. package/dist/types/shared/src/shareTokens.d.ts +6 -0
  372. package/dist/types/shared/src/shareTypes.d.ts +113 -0
  373. package/dist/types/shared/src/shareWizard.d.ts +23 -0
  374. package/dist/types/shared/src/spaceBundle.d.ts +89 -0
  375. package/dist/types/shared/src/stagedApiAccess.d.ts +104 -0
  376. package/dist/types/shared/src/studioBoot.d.ts +63 -0
  377. package/dist/types/shared/src/syncChannel.d.ts +25 -0
  378. package/dist/types/shared/src/syncClampMembership.d.ts +22 -0
  379. package/dist/types/shared/src/tableSearch.d.ts +52 -0
  380. package/dist/types/shared/src/tenantHosts.d.ts +34 -0
  381. package/dist/types/shared/src/tenantSecretsCrypto.d.ts +31 -0
  382. package/dist/types/shared/src/useDebouncedCommit.d.ts +15 -0
  383. package/dist/types/shared/src/useDebouncedValue.d.ts +1 -0
  384. package/dist/types/shared/src/useModifierHeld.d.ts +2 -0
  385. package/package.json +85 -3
  386. package/README.md +0 -3
@@ -0,0 +1,240 @@
1
+ import { type ReactNode } from "react";
2
+ import { type FieldsDataAdapter } from "../../../fields/src/index.js";
3
+ import { type ApiTableAccess, type FieldType, type Manifest } from "../../../shared/src/index.js";
4
+ import type { RichtextHostAdapter } from "../../../richtext/src/index.js";
5
+ import { type InferNavigationTableResult } from "../nav/infer-navigation-table.js";
6
+ import { type CmsProjection, type CmsTableRow } from "../projection/cms-projection.js";
7
+ import type { CmsDraftDiscard, CmsDraftPatch, CmsPatchOp, CmsProposalActions, CmsProposalOutcome, CmsProposalSummary, CmsResolveChoice } from "../proposals/types.js";
8
+ import type { EditorUser } from "../server/session.js";
9
+ import { type CmsDraftChoice } from "./builder-draft.js";
10
+ import { type CmsCompoundCreateRecipe, type CmsResolvedCompoundCreateRecipe } from "../create/compound-create.js";
11
+ export type CmsEditorBootstrap = {
12
+ user: EditorUser;
13
+ } | null;
14
+ export type CmsAuthActions = {
15
+ sendLoginCode: (email: string) => Promise<void>;
16
+ verifyLoginCode: (email: string, otp: string) => Promise<void>;
17
+ signOut: () => Promise<void>;
18
+ };
19
+ export type { CmsTableRow } from "../projection/cms-projection.js";
20
+ export type CmsInPlaceHandlers = {
21
+ isDirty: () => boolean;
22
+ apply: () => void;
23
+ discard: () => void;
24
+ };
25
+ export type CmsActionPhase = "idle" | "saving-draft" | "publishing" | "withdrawing";
26
+ /** A change the Changes view points at; without `field`, the whole row. */
27
+ export type CmsChangeTarget = {
28
+ table: string;
29
+ rowId: string;
30
+ field?: string;
31
+ };
32
+ /**
33
+ * Single host extension seam for CMS editors + grid cells.
34
+ * Wire one object on `CmsProvider` instead of parallel adapter props.
35
+ */
36
+ export type CmsHostAdapters = {
37
+ /** Custom field editor widget for `FieldEditorDialog` (E9). Return `null`/`undefined` to fall back. */
38
+ renderFieldEditor?: (args: {
39
+ table: string;
40
+ field: string;
41
+ type: FieldType | undefined;
42
+ value: unknown;
43
+ onChange: (value: unknown) => void;
44
+ }) => ReactNode | null | undefined;
45
+ /**
46
+ * Rich markdown editor (e.g. `@columnus/richtext`'s `MarkdownEditorDialog`).
47
+ * When provided, `FieldEditorDialog` renders this as the **sole** modal.
48
+ */
49
+ renderMarkdownEditor?: (args: {
50
+ table: string;
51
+ field: string;
52
+ value: string;
53
+ /** Complete once with a value to apply, or `undefined` to dismiss. */
54
+ onComplete: (value?: string) => void;
55
+ }) => ReactNode | null | undefined;
56
+ /** `@columnus/fields` adapter for schema-driven field editors and table-grid cells. */
57
+ fieldsDataAdapter?: FieldsDataAdapter;
58
+ /**
59
+ * Optional className for in-place editors (plan 051 PR 10e R8).
60
+ * Combined with `--columnus-cms-editor-*` CSS variables on the host.
61
+ */
62
+ inplaceEditorClassName?: string;
63
+ /**
64
+ * Public asset display lookup (no editor JWT). Folded into
65
+ * `fieldsDataAdapter.useAssetDisplay` for logged-out sessions.
66
+ * Prefer display-shaped rows (url + focal + pending/failed). A urls-only
67
+ * `Map` remains a compat shim (center focal, never pending).
68
+ */
69
+ resolveAssetUrls?: (assetIds: string[]) => Map<string, string | null> | Map<string, {
70
+ url: string | null;
71
+ focalPoint?: {
72
+ x: number;
73
+ y: number;
74
+ };
75
+ pending?: boolean;
76
+ failed?: boolean;
77
+ contentType?: string;
78
+ size?: number;
79
+ }>;
80
+ /**
81
+ * Locale for stamp date defaults and record-table cells (optional).
82
+ * Omit → runtime `Intl` default.
83
+ */
84
+ locale?: string;
85
+ };
86
+ type CmsAdapters = CmsHostAdapters & {
87
+ fieldsDataAdapter: FieldsDataAdapter;
88
+ };
89
+ export type CmsProviderProps = {
90
+ children: ReactNode;
91
+ /** Server-bootstrapped editor (null when logged out / not an editor). */
92
+ editor: CmsEditorBootstrap;
93
+ readableTables: string[];
94
+ manifest: Manifest;
95
+ navigationTable?: string | null;
96
+ /** Host-owned, explicit multi-record creation recipes. */
97
+ createRecipes?: Readonly<Record<string, CmsCompoundCreateRecipe>>;
98
+ /** Required for login / logout pages and the floating toolbar. */
99
+ authActions?: CmsAuthActions;
100
+ /** Access profile slug this CMS session proposes/accepts against. */
101
+ profileSlug: string;
102
+ tableAccess?: ApiTableAccess[];
103
+ /** Enables Save / Publish mine / Withdraw mine; without it the CMS is read-only + stamp-only. */
104
+ proposalActions?: CmsProposalActions;
105
+ /** Controlled live proposals, showing a write by the time `saveDraft` resolves. Defaults to an empty feed. */
106
+ proposals?: CmsProposalSummary[];
107
+ /** True while the proposal feed is still loading. */
108
+ proposalsLoading?: boolean;
109
+ /** Soft error for a controlled proposals feed (keep toolbar; show in outcomes). */
110
+ proposalFeedError?: string | null;
111
+ /** Called after a successful Save / Publish / Withdraw so hosts can refresh live reads. */
112
+ onProposalsChanged?: () => void;
113
+ /**
114
+ * Canonical live rows for overlay + table grid, keyed by table name.
115
+ * Field lookup is derived from these rows (no parallel liveFieldValues map).
116
+ */
117
+ tableRows?: Record<string, CmsTableRow[]>;
118
+ /** Host editors + grid data adapter (one seam). */
119
+ adapters?: CmsHostAdapters;
120
+ /**
121
+ * Optional `@columnus/richtext` host adapter (storage / row pickers).
122
+ * Defaults to a manifest-aware inert adapter when omitted.
123
+ */
124
+ richtextHostAdapter?: RichtextHostAdapter;
125
+ };
126
+ export type CmsContextValue = {
127
+ editor: CmsEditorBootstrap;
128
+ editMode: boolean;
129
+ setEditMode: (next: boolean) => void;
130
+ toggleEditMode: () => void;
131
+ readableTables: string[];
132
+ manifest: Manifest;
133
+ navigation: InferNavigationTableResult;
134
+ /** Validated compound-create recipes, keyed by host-defined id. */
135
+ createRecipes: ReadonlyMap<string, CmsResolvedCompoundCreateRecipe>;
136
+ authActions: CmsAuthActions | null;
137
+ profileSlug: string;
138
+ tableAccess: ApiTableAccess[] | undefined;
139
+ proposalActions: CmsProposalActions | null;
140
+ tableRows: Record<string, CmsTableRow[]>;
141
+ /** Effective CMS presentation across live rows, active proposals, and the local draft. */
142
+ projection: CmsProjection;
143
+ adapters: CmsAdapters;
144
+ /** Local unsaved edits (E3: draft over overlay over live). */
145
+ draft: CmsDraftPatch[];
146
+ /** All active profile proposals (E2: overlay scope). */
147
+ proposals: CmsProposalSummary[];
148
+ /** The current editor's active draft for the current draft key, if any. */
149
+ myProposalId: string | null;
150
+ /** The builder session's draft; null until the builder first answers (plan 112 Q4). */
151
+ currentDraft: CmsDraftChoice | null;
152
+ /** The toolbar's builder sidecar URL; the current draft follows its `GET /session`. */
153
+ connectBuilder: (builderUrl: string | undefined) => void;
154
+ /** Re-read the builder session's draft (after New session and Resume). */
155
+ refreshBuilderSession: () => Promise<void>;
156
+ /** Changes view actions on my draft for an explicit key (undefined: the default draft). */
157
+ publishDraft: (key: string | undefined) => Promise<boolean>;
158
+ withdrawDraft: (key: string | undefined) => Promise<boolean>;
159
+ discard: (key: string | undefined, items: CmsDraftDiscard[], patches?: CmsDraftPatch[]) => Promise<boolean>;
160
+ /** Resolve at the revision the dialog showed (a newer one is refused). */
161
+ resolve: (key: string | undefined, expectedRevision: number, choices: CmsResolveChoice[]) => Promise<boolean>;
162
+ /** The Changes view is open: stamps outline proposal changes (Q27). */
163
+ changesOpen: boolean;
164
+ setChangesOpen: (open: boolean) => void;
165
+ /** The change hovered in the Changes view, outlined on the page. */
166
+ highlight: CmsChangeTarget | null;
167
+ setHighlight: (target: CmsChangeTarget | null) => void;
168
+ actionPhase: CmsActionPhase;
169
+ loadingProposals: boolean;
170
+ /** Outcomes from the most recent Save / Publish / Withdraw, cleared automatically. */
171
+ outcomes: CmsProposalOutcome[] | null;
172
+ applyFieldEdit: (input: {
173
+ table: string;
174
+ rowId: string;
175
+ field: string;
176
+ value: unknown;
177
+ }) => void;
178
+ discardDraft: () => void;
179
+ /** Save the local draft; resolves false when the action fails or cannot run. */
180
+ saveDraft: () => Promise<boolean>;
181
+ /** Publish the current draft. */
182
+ publishMine: () => Promise<void>;
183
+ /** Withdraw the current draft. */
184
+ withdrawMine: () => Promise<void>;
185
+ /** Hover-`+` insert (E7); returns the built plain insert patch. */
186
+ addInsert: (input: {
187
+ table: string;
188
+ title?: string;
189
+ fields?: Record<string, unknown>;
190
+ }) => CmsDraftPatch[];
191
+ /** Validate and add a complete configured record batch to the local draft. */
192
+ createCompound: (input: {
193
+ recipeId: string;
194
+ context?: Record<string, unknown>;
195
+ values: Record<string, Record<string, unknown>>;
196
+ }) => CmsDraftPatch[];
197
+ /** Full-row dialog edit into local draft (insert-merge or update); `clearFields` clears. */
198
+ applyRowEdit: (input: {
199
+ table: string;
200
+ rowId: string;
201
+ fields: Record<string, unknown>;
202
+ clearFields?: string[];
203
+ }) => void;
204
+ /** Draft a delete (or drop an unsaved insert). */
205
+ addDelete: (input: {
206
+ table: string;
207
+ rowId: string;
208
+ }) => void;
209
+ canProposeOp: (table: string, op: CmsPatchOp) => boolean;
210
+ canProposeField: (table: string, field: string) => boolean;
211
+ /** Active in-place stamp key (`stampEditKey`), or null (PR 10e). */
212
+ activeInPlaceKey: string | null;
213
+ requestInPlaceEdit: (table: string, rowId: string, field: string) => void;
214
+ closeInPlaceEdit: () => void;
215
+ registerInPlaceHandlers: (handlers: CmsInPlaceHandlers | null) => void;
216
+ /**
217
+ * Reactive dirty flag for the active in-place editor (toolbar Save vs Cancel).
218
+ * `InPlaceFieldEditor` keeps this in sync via `setInPlaceDirty`; handlers'
219
+ * `isDirty()` remains the flush-aware source for apply / field-switch.
220
+ */
221
+ inPlaceDirty: boolean;
222
+ setInPlaceDirty: (dirty: boolean) => void;
223
+ /** True when the dirty-switch modal is open. */
224
+ inPlaceSwitchPending: boolean;
225
+ /**
226
+ * Stage a Media version replace for Publish (FieldEditorDialog Replace).
227
+ * Does not change the field value — same asset id, new bytes on publish.
228
+ */
229
+ registerPendingReplace: (input: {
230
+ assetId: string;
231
+ file: File;
232
+ kind?: "image" | "file";
233
+ }) => void;
234
+ /** Media replacements staged for Publish, of any draft. */
235
+ stagedReplaceCount: number;
236
+ };
237
+ export declare function CmsProvider(props: CmsProviderProps): import("react").JSX.Element;
238
+ export declare function useCms(): CmsContextValue;
239
+ /** Safe for stamps that may render outside the provider (attrs still emit). */
240
+ export declare function useCmsOptional(): CmsContextValue | null;
@@ -0,0 +1,4 @@
1
+ import type { ReactNode } from "react";
2
+ import { type RichDocViewProps } from "../../../richtext/src/index.js";
3
+ /** Stamp-aware `RichDocView`: related-row labels + editor/public asset URLs. */
4
+ export declare function CmsRichDocView(props: RichDocViewProps): ReactNode;
@@ -0,0 +1,11 @@
1
+ /** HttpOnly session cookie contract for consumer Start apps (plan 051 PR 1). */
2
+ export declare const CMS_SESSION_COOKIE = "columnus_cms_session";
3
+ export type SessionCookieOptions = {
4
+ /** Omit `Secure` only for local http development. Defaults to true. */
5
+ secure?: boolean;
6
+ /** Cookie lifetime in seconds. Defaults to session cookie (no Max-Age). */
7
+ maxAge?: number;
8
+ };
9
+ export declare function serializeSessionCookie(token: string, options?: SessionCookieOptions): string;
10
+ export declare function clearSessionCookie(options?: SessionCookieOptions): string;
11
+ export declare function readSessionCookie(cookieHeader: string | null | undefined): string | null;
@@ -0,0 +1,2 @@
1
+ export { CMS_SESSION_COOKIE, clearSessionCookie, readSessionCookie, serializeSessionCookie, type SessionCookieOptions, } from "./cookie.js";
2
+ export { CmsAuthError, createCmsAuth, isEditor, type CmsAuth, type CmsAuthConfig, type EditorSession, type EditorUser, } from "./session.js";
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Server-side editor session for consumer TanStack Start apps (plan 051 PR 1).
3
+ *
4
+ * Editors are the tenant deployment's existing Better Auth users (email OTP,
5
+ * approved, role editor/admin) — see `columnus/authGuards.requireEditor` in the
6
+ * deployed Convex source. This module proxies the Better Auth HTTP endpoints on
7
+ * the tenant `.convex.site` origin so the session token only ever lives in an
8
+ * httpOnly cookie on the consumer domain, never in browser JS.
9
+ */
10
+ export type EditorUser = {
11
+ id: string;
12
+ email: string;
13
+ name: string | null;
14
+ role: string | null;
15
+ approvalStatus: string | null;
16
+ };
17
+ export type EditorSession = {
18
+ user: EditorUser;
19
+ expiresAt: number | null;
20
+ };
21
+ export declare class CmsAuthError extends Error {
22
+ readonly status: number;
23
+ constructor(message: string, status: number);
24
+ }
25
+ export type CmsAuthConfig = {
26
+ /** Tenant Convex URL — `.convex.cloud` or `.convex.site`; cloud is normalized to site. */
27
+ convexUrl: string;
28
+ fetch?: typeof globalThis.fetch;
29
+ /**
30
+ * Origin Better Auth CSRF/CORS expects on POSTs. Node `fetch` does not send one.
31
+ * Defaults to the `.convex.site` auth base URL, which Better Auth always trusts
32
+ * via `baseURL`. Pass the consumer site origin when it must match `SITE_URL`.
33
+ */
34
+ origin?: string;
35
+ };
36
+ export type CmsAuth = {
37
+ /** Better Auth base URL this client talks to (always the `.convex.site` origin). */
38
+ readonly siteUrl: string;
39
+ /** Email an OTP sign-in code to an existing editor. */
40
+ sendLoginCode(email: string): Promise<void>;
41
+ /** Exchange email + OTP for a Better Auth session token. */
42
+ verifyLoginCode(email: string, otp: string): Promise<{
43
+ token: string;
44
+ }>;
45
+ /** Resolve the session behind a token; null when missing/expired. */
46
+ getSession(token: string): Promise<EditorSession | null>;
47
+ /** Convex-compatible JWT for `client.setAuth`; null when the session is gone. */
48
+ getConvexToken(token: string): Promise<string | null>;
49
+ signOut(token: string): Promise<void>;
50
+ };
51
+ /** Approved editor/admin — mirrors `requireEditor` on the tenant deployment. */
52
+ export declare function isEditor(user: EditorUser): boolean;
53
+ export declare function createCmsAuth(config: CmsAuthConfig): CmsAuth;
@@ -0,0 +1,17 @@
1
+ /** Provenance stamp DOM attribute names (plan 051 PR 6). */
2
+ export declare const CMS_STAMP_ATTR: {
3
+ readonly table: "data-columnus-table";
4
+ readonly row: "data-columnus-row";
5
+ readonly field: "data-columnus-field";
6
+ readonly block: "data-columnus-block";
7
+ readonly column: "data-columnus-column";
8
+ };
9
+ export type CmsStampProps = {
10
+ table: string;
11
+ rowId: string;
12
+ field: string;
13
+ block?: string;
14
+ column?: string;
15
+ };
16
+ /** Build data-columnus-* attrs; optional block/column omitted when unset. */
17
+ export declare function buildStampAttrs({ table, rowId, field, block, column, }: CmsStampProps): Record<string, string>;
@@ -0,0 +1,11 @@
1
+ import { type Field, type FieldType } from "../../../shared/src/index.js";
2
+ import type { CmsTableRow } from "../projection/cms-projection.js";
3
+ export declare function idFieldRelatedTable(fieldType: FieldType | undefined): string | undefined;
4
+ export declare function stampRelatedId(value: unknown): string | null;
5
+ /** Projection row, else displayValues preview, else truncated id. */
6
+ export declare function relatedRowPreview(args: {
7
+ relatedRow: CmsTableRow | null;
8
+ relatedFields: readonly Field[];
9
+ displayPreview: string | undefined;
10
+ id: string;
11
+ }): string;
@@ -0,0 +1,41 @@
1
+ import type { ReactNode } from "react";
2
+ import { type StampDateFormatPreset } from "../../../shared/src/index.js";
3
+ import type { CmsTableRow } from "../projection/cms-projection.js";
4
+ export type CmsStampRenderFn = (value: unknown, related?: CmsTableRow | null) => ReactNode;
5
+ export type CmsStampFormatPreset = StampDateFormatPreset | "plain";
6
+ export type CmsStampFormat = CmsStampFormatPreset | ((value: unknown) => ReactNode);
7
+ export type CmsStampDisplayInput = {
8
+ children: ReactNode | CmsStampRenderFn | undefined;
9
+ format?: CmsStampFormat;
10
+ /** Live/baseline field value (value-first API). */
11
+ value?: unknown;
12
+ /**
13
+ * Shown when the effective value is null/undefined/"" and display would
14
+ * otherwise be empty (e.g. `\u00a0` so edit chrome stays clickable).
15
+ */
16
+ empty?: ReactNode;
17
+ /** `projection.field(...).value` when an editor session exists; else null. */
18
+ projectedValue: unknown | null;
19
+ hasEditor: boolean;
20
+ /** True when origin is local draft or active proposal. */
21
+ overlayIsActive: boolean;
22
+ /** Full projected related row for id fields; null when missing. */
23
+ relatedRow?: CmsTableRow | null;
24
+ /** Default id-stamp label (projection preview / displayValues / truncated id). */
25
+ relatedPreview?: string;
26
+ /** Manifest field kind — drives date/datetime auto-format. */
27
+ fieldKind?: string;
28
+ /** From `adapters.locale` (optional). */
29
+ locale?: string;
30
+ };
31
+ export declare function effectiveStampValue(hasEditor: boolean, projectedValue: unknown | null, live: unknown,
32
+ /** True when origin is set (local draft / proposal, including deletes). */
33
+ overlayIsActive?: boolean): unknown;
34
+ export declare function isEmptyStampValue(value: unknown): boolean;
35
+ /** Render primitives; objects/arrays need format or render children. */
36
+ export declare function displayStampValue(value: unknown): ReactNode;
37
+ /**
38
+ * Resolve stamp display.
39
+ * Priority: render-fn children → format → JSX passthrough → value (kind date/datetime auto).
40
+ */
41
+ export declare function resolveStampDisplay({ children, format, value, empty, projectedValue, hasEditor, overlayIsActive, relatedRow, relatedPreview, fieldKind, locale, }: CmsStampDisplayInput): ReactNode;
@@ -0,0 +1,41 @@
1
+ import { type ReactNode } from "react";
2
+ import { type CmsStampWrapperProps } from "./stamp.js";
3
+ export type CmsRowValue = {
4
+ _id?: string | number;
5
+ } & Record<string, unknown>;
6
+ export type CmsRowContextValue = {
7
+ table: string;
8
+ rowId: string;
9
+ row: CmsRowValue;
10
+ };
11
+ export declare function useCmsRowOptional(): CmsRowContextValue | null;
12
+ export declare function useCmsRow(): CmsRowContextValue;
13
+ export type CmsRowProps = {
14
+ table: string;
15
+ /** Live row document; `row[name]` supplies CmsField values. */
16
+ row: CmsRowValue;
17
+ /** Defaults to `String(row._id)`. */
18
+ rowId?: string;
19
+ children: ReactNode;
20
+ };
21
+ /** Provides table/rowId/row for nested `CmsField` stamps. */
22
+ export declare function CmsRow({ table, row, rowId, children }: CmsRowProps): import("react").JSX.Element;
23
+ export type CmsFieldProps = Omit<CmsStampWrapperProps, "table" | "rowId" | "field" | "value"> & {
24
+ /** Field name on the row (and stamp `field`). */
25
+ name: string;
26
+ /**
27
+ * When set, wrap the stamp in `<a>` for visitors; in edit mode render a
28
+ * non-link wrapper so stamp click still opens the editor.
29
+ */
30
+ href?: string | ((value: unknown) => string | undefined);
31
+ /**
32
+ * Hide when the effective value is empty and edit mode is off.
33
+ * Defaults to true when `href` is set.
34
+ */
35
+ hideWhenEmpty?: boolean;
36
+ };
37
+ /**
38
+ * Stamp a field from the nearest `CmsRow`. Prefer this over repeating
39
+ * `table` / `rowId` / `value` on every `CmsFieldStamp`.
40
+ */
41
+ export declare function CmsField({ name, href, hideWhenEmpty, className, style, empty, ...stampRest }: CmsFieldProps): import("react").JSX.Element | null;
@@ -0,0 +1,23 @@
1
+ import { type DragEvent } from "react";
2
+ import { type FieldsDataAdapter } from "../../../fields/src/index.js";
3
+ type StampMediaDropHandlers = {
4
+ onDragEnter: (event: DragEvent<HTMLElement>) => void;
5
+ onDragOver: (event: DragEvent<HTMLElement>) => void;
6
+ onDragLeave: (event: DragEvent<HTMLElement>) => void;
7
+ onDrop: (event: DragEvent<HTMLElement>) => void;
8
+ };
9
+ /** Image-stamp drag-and-drop → upload → `apply(assetId)`. File stamps are out of scope. */
10
+ export declare function useStampMediaDrop(args: {
11
+ enabled: boolean;
12
+ uploadFile: FieldsDataAdapter["uploadFile"];
13
+ apply: (assetId: string) => void;
14
+ table: string;
15
+ field: string;
16
+ profile?: string;
17
+ }): {
18
+ uploading: boolean;
19
+ error: string | null;
20
+ dragOver: boolean;
21
+ dropHandlers: StampMediaDropHandlers;
22
+ };
23
+ export {};
@@ -0,0 +1,44 @@
1
+ import { type CSSProperties, type ReactNode } from "react";
2
+ import { type CmsStampProps } from "./attrs.js";
3
+ import { type CmsStampFormat, type CmsStampRenderFn } from "./resolve-display.js";
4
+ import { type CmsEditSurface } from "../edit/edit-surface.js";
5
+ export type CmsStampWrapperProps = CmsStampProps & {
6
+ /**
7
+ * Optional custom display. Prefer `value` + optional `format` / render children.
8
+ * Function children receive the effective (projected|live) value.
9
+ * Id fields also pass the related projected row (or null).
10
+ */
11
+ children?: ReactNode | CmsStampRenderFn;
12
+ /** Preset (`date`/`datetime`/`time`/`plain`) or thin formatter when children is not a render function. */
13
+ format?: CmsStampFormat;
14
+ /**
15
+ * Live/baseline field value (value-first). When set without render children,
16
+ * the stamp displays the effective projected/live value automatically.
17
+ */
18
+ value?: unknown;
19
+ /** Placeholder when the effective value is empty (e.g. `\u00a0` for click targets). */
20
+ empty?: ReactNode;
21
+ className?: string;
22
+ style?: CSSProperties;
23
+ /** Element tag for the wrapper. Defaults to `span` for inline fields. */
24
+ as?: "span" | "div" | "section" | "li" | "h1" | "h2" | "h3" | "p";
25
+ /**
26
+ * Editor chrome (plan 051 PR 10e). Unset → markdown defaults to inplace;
27
+ * other kinds to dialog. Image/file always dialog.
28
+ */
29
+ editSurface?: CmsEditSurface;
30
+ };
31
+ /**
32
+ * Generic provenance stamp. Always emits data-columnus-* attrs (inert when
33
+ * logged out). When CmsProvider editMode is on: draws outline chrome, shows
34
+ * a Draft/Pending badge for local drafts / active proposals touching this
35
+ * field (C7: overlay only for the editor session), and clicking the stamp
36
+ * opens in-place edit (markdown default) or FieldEditorDialog (E4 / PR 10e).
37
+ *
38
+ * Badges are informational only (PR 10f X22): author label + conflict hint —
39
+ * no Accept/Reject. Publish/Withdraw live on the floating toolbar (mine only).
40
+ *
41
+ * Value-first: pass `value` (and optional `format` / render children). Nested
42
+ * `CmsField` inside `CmsRow` fills table/rowId/value from the row document.
43
+ */
44
+ export declare function CmsFieldStamp({ children, format, value, empty, className, style, as: Tag, editSurface, ...stamp }: CmsStampWrapperProps): import("react").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { isHttpUrl } from "../../../shared/src/index.js";
2
+ export { isHttpUrl };
3
+ /** Browser URL for a stamp value: http(s) as-is, else a resolved storage URL. */
4
+ export declare function stampMediaUrl(value: unknown, resolved: string | null | undefined): string | null;
@@ -0,0 +1,6 @@
1
+ import type { CmsStampProps } from "./attrs.js";
2
+ export type CmsFieldRef = Pick<CmsStampProps, "table" | "rowId" | "field">;
3
+ /** Effective projected|live field value outside a stamp (hrefs, conditionals). */
4
+ export declare function useCmsProjectedField(stamp: CmsFieldRef | null | undefined, live: unknown): unknown;
5
+ /** Like `useCmsProjectedField`, but keeps a string (falls back to `live`). */
6
+ export declare function useCmsProjectedString(stamp: CmsFieldRef | null | undefined, live: string): string;
@@ -0,0 +1,7 @@
1
+ import type { CmsTableRow } from "../projection/cms-projection.js";
2
+ /**
3
+ * List rows for feeds/boards: SSR/live until the editor shell has loaded the
4
+ * table, then `projection.table` only (inserts, deletes, overlays).
5
+ * No-op when logged out or outside CmsProvider — the host keeps `live`.
6
+ */
7
+ export declare function useCmsProjectedTable(table: string, live?: readonly CmsTableRow[]): readonly CmsTableRow[];
@@ -0,0 +1,2 @@
1
+ import type { CmsTableRow } from "../projection/cms-projection.js";
2
+ export declare function useCmsRelatedRow(table: string | undefined, id: unknown): CmsTableRow | null;
@@ -0,0 +1,6 @@
1
+ export default function CmsTablesDialog({ open, onClose, siteName, }: {
2
+ open: boolean;
3
+ onClose(): void;
4
+ /** Shown before the table name in the header. */
5
+ siteName?: string;
6
+ }): import("react").JSX.Element | null;
@@ -0,0 +1,78 @@
1
+ import { type ReactNode } from "react";
2
+ import { type CellCoord, type DataGridTableRowController } from "../../../data-grid/src/index.js";
3
+ import { type Field, type Table } from "../../../shared/src/index.js";
4
+ import type { DraftCommand } from "./use-draft-commands.js";
5
+ /**
6
+ * The Tables dialog's grid over the projection: search and sort in the browser, one cell
7
+ * selected at a time, edits in the formula bar, a double-click opens the row. Draft colours mark
8
+ * changed cells.
9
+ */
10
+ export declare function useCmsGrid({ table, search, dialogOpen, openRow, renderRowActions, commands, }: {
11
+ table: Table;
12
+ search: string;
13
+ /** A dialog above the grid has the keyboard. */
14
+ dialogOpen: boolean;
15
+ openRow: (rowId: string) => void;
16
+ renderRowActions?: (row: Record<string, unknown>) => ReactNode;
17
+ commands: {
18
+ run: (command: DraftCommand) => void;
19
+ undo: () => void;
20
+ redo: () => void;
21
+ };
22
+ }): {
23
+ gridRef: import("react").RefObject<HTMLDivElement | null>;
24
+ bar: {
25
+ focus: CellCoord | null;
26
+ field: Field | null;
27
+ value: unknown;
28
+ orderedIds: string[];
29
+ editing: import("../../../data-grid/src/index.js").GridEditing;
30
+ focusRequest: {
31
+ openPicker?: boolean;
32
+ key: number;
33
+ initialChar?: string;
34
+ } | null;
35
+ onNavigateAfterCommit: () => boolean;
36
+ onOpenMarkdownEditor: (() => void) | undefined;
37
+ manifest: import("../../../shared/src/index.js").Manifest;
38
+ readOnly: boolean;
39
+ };
40
+ /** Opens the focus row when the row dialog, not the bar, edits its field. */
41
+ openFocusRow: (() => void) | undefined;
42
+ focusCell: () => void | null;
43
+ table: {
44
+ table: Table;
45
+ assetIdsForGrid: string[];
46
+ showIdColumn: boolean;
47
+ visibleFields: Field[];
48
+ colWidths: Record<string, number>;
49
+ columnMenuItems: {
50
+ name: string;
51
+ label: string;
52
+ hidden: boolean;
53
+ }[];
54
+ dataRows: Record<string, unknown>[];
55
+ entryRow: {
56
+ _id: string;
57
+ };
58
+ showEntryRow: boolean;
59
+ selectionDisplayRows: Record<string, unknown>[];
60
+ virtualItems: import("@tanstack/virtual-core").VirtualItem[];
61
+ totalSize: number;
62
+ loadingFirstPage: boolean;
63
+ startResize: (field: string, e: React.PointerEvent<HTMLElement>, fieldMeta?: Field) => void;
64
+ autoSizeColumn: (field: string, fieldMeta: Field | undefined, table: HTMLElement | null) => void;
65
+ toggleColumn: (column: string) => void;
66
+ onRowContextMenu: (e: React.MouseEvent, row: Record<string, unknown>, fieldName?: string) => import("../../../data-grid/src/index.js").Selection;
67
+ rowController: DataGridTableRowController;
68
+ sortOrders: {
69
+ field: string;
70
+ direction: "asc" | "desc";
71
+ }[];
72
+ onCycleSort: (field: string) => void;
73
+ isCellEditable: (rowId: string, field: Field) => boolean;
74
+ isDraftRow: (rowId: string) => boolean;
75
+ cellClassName: (rowId: string, field: Field) => string | undefined;
76
+ renderRowActions: ((row: Record<string, unknown>) => ReactNode) | undefined;
77
+ };
78
+ };
@@ -0,0 +1,35 @@
1
+ import { type CmsContextValue, type CmsDraftPatch } from "../index.js";
2
+ export type DraftRowRef = {
3
+ table: string;
4
+ rowId: string;
5
+ };
6
+ /**
7
+ * One change in the Tables dialog: a local draft edit, made with the provider rendered when the
8
+ * command runs, then a save of the whole local draft. An insert's row exists once it applies.
9
+ */
10
+ export type DraftCommand = {
11
+ row: DraftRowRef;
12
+ apply: (cms: CmsContextValue) => void;
13
+ } | {
14
+ row?: undefined;
15
+ apply: (cms: CmsContextValue) => DraftRowRef;
16
+ };
17
+ /** A saved command: the row's patch in my draft before and after it (null: none). */
18
+ export type DraftStep = {
19
+ row: DraftRowRef;
20
+ from: CmsDraftPatch | null;
21
+ to: CmsDraftPatch | null;
22
+ };
23
+ /**
24
+ * Runs the dialog's commands one at a time, each saving the draft at once, and undoes and redoes
25
+ * them through the same queue. A command starts only after the previous save settled and its
26
+ * result rendered, so it reads the draft it saved.
27
+ */
28
+ export declare function useDraftCommands(): {
29
+ run: (command: DraftCommand) => void;
30
+ undo: () => void;
31
+ redo: () => void;
32
+ canUndo: boolean;
33
+ canRedo: boolean;
34
+ error: string | null;
35
+ };
@@ -0,0 +1,7 @@
1
+ import { type ReactNode } from "react";
2
+ /** Balance plain fields around the rendered reference list, preserving order within each column. */
3
+ export declare function BalancedPreviewColumns({ fields, references, className, }: {
4
+ fields: ReactNode[];
5
+ references?: ReactNode;
6
+ className?: string;
7
+ }): import("react").JSX.Element;