@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,73 @@
1
+ /** Convex deployment cloud URL (.convex.cloud) → HTTP actions / auth issuer (.convex.site). */
2
+ export declare function convexCloudToSiteUrl(convexUrl: string): string;
3
+ export declare function convexSiteToCloudUrl(siteUrl: string): string;
4
+ type ProcessEnvLike = Record<string, string | undefined>;
5
+ /** Docker runtime-base verify placeholder — must not be used for real BFF prepare. */
6
+ export declare function isPlaceholderManagementSiteUrl(url: string): boolean;
7
+ /**
8
+ * Management `.convex.site` origin for BFF `prepare`.
9
+ * Prefers explicit management site env vars, else derives from `VITE_MANAGEMENT_CONVEX_URL`.
10
+ * Does not read `VITE_CONVEX_SITE_URL` — on web that is the tenant site, not Manage.
11
+ */
12
+ export declare function resolveBffManagementSiteUrl(env?: ProcessEnvLike): string | undefined;
13
+ /**
14
+ * Runtime BFF management site: prefer the image-baked URL over runtime defaults.
15
+ * A stale runtime `MANAGEMENT_CONVEX_SITE_URL` must not shadow the
16
+ * ephemeral Manage preview bake and makes prepare return HTTP 404 (no routes on prod).
17
+ */
18
+ export declare function resolveRuntimeManagementSiteUrl(options: {
19
+ bakedSiteUrl?: string | null;
20
+ env?: ProcessEnvLike;
21
+ }): string | undefined;
22
+ /** Deployment name from a Convex cloud/site URL (`https://{name}.convex.cloud`). */
23
+ export declare function convexDeploymentSlugFromUrl(url: string): string | undefined;
24
+ /**
25
+ * Best-effort `CONVEX_DEPLOYMENT` when only the cloud URL is known (e.g. after `columnus-api pull`).
26
+ * Defaults to `dev:{slug}` — preview/prod deployments may need an explicit value in `.env.local`.
27
+ */
28
+ export declare function deriveConvexDeploymentFromCloudUrl(cloudUrl: string): string | undefined;
29
+ export type ConvexSiteUrlEnv = {
30
+ /** CONVEX_SITE_URL */
31
+ convexSiteUrl?: string;
32
+ /** VITE_CONVEX_SITE_URL */
33
+ viteConvexSiteUrl?: string;
34
+ /** CONVEX_URL */
35
+ convexUrl?: string;
36
+ /** VITE_CONVEX_URL */
37
+ viteConvexUrl?: string;
38
+ /** CONVEX_CLOUD_URL */
39
+ convexCloudUrl?: string;
40
+ };
41
+ /** @deprecated Use `ConvexSiteUrlEnv` */
42
+ export type ResolveConvexSiteUrlOptions = ConvexSiteUrlEnv;
43
+ export declare function readConvexSiteUrlEnv(env: ProcessEnvLike): ConvexSiteUrlEnv;
44
+ /**
45
+ * Resolve .convex.site URL from env: explicit site URLs first, then derive from Convex cloud/site URLs.
46
+ * Returns empty string when nothing is configured.
47
+ */
48
+ export declare function resolveConvexSiteUrlFromEnv(env: ConvexSiteUrlEnv): string;
49
+ /** Better Auth `baseURL` from standard Convex process env. */
50
+ export declare function convexSiteUrlFromProcessEnv(env?: ProcessEnvLike): string;
51
+ /** Resolve .convex.site URL for OTP sign-in and scripts (throws when unset). */
52
+ export declare function resolveConvexSiteUrl(env?: ConvexSiteUrlEnv): string;
53
+ export type AuthConfigIssuerEnv = ConvexSiteUrlEnv & {
54
+ /** BAKED_AUTH_ISSUER patched at deploy time */
55
+ bakedAuthIssuer?: string;
56
+ };
57
+ /**
58
+ * Auth issuer for deploy scripts: baked deploy patch → convex site URL env chain.
59
+ */
60
+ export declare function resolveAuthConfigIssuerFromEnv(env: AuthConfigIssuerEnv): string;
61
+ export type AuthConfigIssuerFromProcessEnvOptions = {
62
+ bakedAuthIssuer?: string;
63
+ /** Derive from CONVEX_URL / VITE_CONVEX_URL when issuer env vars are unset (deploy scripts). */
64
+ deriveFromCloudUrl?: boolean;
65
+ };
66
+ /** JWT issuer from process env (auth.config.ts bundle vs deploy scripts). */
67
+ export declare function authConfigIssuerFromProcessEnv(env?: ProcessEnvLike, options?: AuthConfigIssuerFromProcessEnvOptions): string;
68
+ /** Comma-separated browser origins (SITE_URL) for Better Auth trustedOrigins / crossDomain. */
69
+ export declare function parseTrustedSiteUrls(siteUrlRaw?: string): string[];
70
+ export declare function primaryTrustedSiteUrl(siteUrlRaw?: string): string;
71
+ /** Better Auth `trustedOrigins` from SITE_URL. */
72
+ export declare function betterAuthTrustedOrigins(siteUrlRaw?: string): string[];
73
+ export {};
@@ -0,0 +1,65 @@
1
+ import type { Table as TableT } from "./schemaTypes.ts";
2
+ export type CsvExport = {
3
+ headers: string[];
4
+ data: string[][];
5
+ };
6
+ export type DisplayIdLookup = Map<string, Map<string, string>>;
7
+ /** Display values per table and document id, as `getDisplayValues` returns them. */
8
+ export type DisplayValueLookup = Map<string, Map<string, {
9
+ id?: string;
10
+ preview?: string;
11
+ }>>;
12
+ /** Referenced ids plus exported row ids (for the table's own Id display template on `_id`). */
13
+ export declare function collectExportDisplayIdRefs(table: TableT, rows: Record<string, unknown>[]): Map<string, Set<string>>;
14
+ /** Which columns a reference field exports: its Display IDs, its preview labels, or both. */
15
+ export type CsvRefColumns = {
16
+ ids: boolean;
17
+ previews: boolean;
18
+ };
19
+ /**
20
+ * CSV for a table export. Reference fields export Display IDs (falling back to the raw id, which
21
+ * import reads back), preview labels (the preview, else the Display Id), or both — the label
22
+ * column then follows as `field (preview)`, which import ignores. `unresolved` counts references
23
+ * with no label: their label cells are left empty.
24
+ */
25
+ export declare function buildCsvRows(rows: Record<string, unknown>[], table: TableT, displayValues?: DisplayValueLookup, refColumns?: CsvRefColumns): CsvExport & {
26
+ unresolved: number;
27
+ };
28
+ /** Subset export for grid clipboard copy (no `_id` / `_creationTime`). */
29
+ export declare function buildCsvRowsForColumns(rows: Record<string, unknown>[], table: TableT, columnNames: readonly string[], displayIds?: DisplayIdLookup): CsvExport;
30
+ export declare function unparseCsv({ headers, data }: CsvExport): string;
31
+ /** A downloaded CSV file: a UTF-8 BOM so Excel reads umlauts (`File.text()` drops it on import). */
32
+ export declare function csvFileText(csv: CsvExport): string;
33
+ /** Resolve display ids to document ids at any depth; unknown ones become a field error. */
34
+ export declare function applyDisplayIdResolution(rows: ImportRow[], table: TableT, resolved: Map<string, Map<string, string | null>>): ImportRow[];
35
+ export declare function collectImportDisplayIds(rows: ImportRow[], table: TableT): Map<string, Set<string>>;
36
+ /** Display ids in the `_id` column for replace-mode rows (not raw Convex document ids). */
37
+ export declare function collectImportRowDisplayIds(rows: ImportRow[]): Set<string>;
38
+ export declare function applyImportRowIdResolution(rows: ImportRow[], tableName: string, resolved: Map<string, Map<string, string | null>>): ImportRow[];
39
+ export type ImportMode = "insert" | "replace";
40
+ export type ImportRow = {
41
+ /** Sequential row index from the CSV (1-based, excluding header). */
42
+ rowNum: number;
43
+ /** Document to send to Convex (system fields stripped). */
44
+ doc: Record<string, unknown>;
45
+ /** Insert vs. replace decision. "replace" iff `_id` was supplied. */
46
+ mode: ImportMode;
47
+ /** Defined when `mode === "replace"`. */
48
+ id?: string;
49
+ /** Per-field error map. */
50
+ errors: Record<string, string>;
51
+ };
52
+ export declare function validateImportRow(raw: Record<string, string>, table: TableT, rowNum: number): ImportRow;
53
+ export type ParseResult = {
54
+ /** Header row exactly as it appeared in the file. */
55
+ headers: string[];
56
+ /** Each row keyed by header name. */
57
+ rows: Record<string, string>[];
58
+ /** Headers that don't match a schema field or system column. */
59
+ unknownColumns: string[];
60
+ /** Required schema fields with no matching CSV column. */
61
+ missingRequired: string[];
62
+ /** papaparse parse errors. */
63
+ parseErrors: string[];
64
+ };
65
+ export declare function parseCsvText(text: string, table: TableT): ParseResult;
@@ -0,0 +1,21 @@
1
+ import type { Manifest } from "./schemaTypes.ts";
2
+ export declare const COLUMNUS_DATA_TRANSFER_VERSION: 1;
3
+ export declare const MAX_TRANSFER_BYTES: number;
4
+ export type ColumnusDataTransferManifest = {
5
+ version: typeof COLUMNUS_DATA_TRANSFER_VERSION;
6
+ tables: string[];
7
+ schemaHash: string;
8
+ includeFileStorage: boolean;
9
+ };
10
+ export type DataTransferManifestValidation = {
11
+ ok: true;
12
+ manifest: ColumnusDataTransferManifest;
13
+ } | {
14
+ ok: false;
15
+ error: string;
16
+ };
17
+ /** Internal/system tables must never enter a tenant-to-tenant data transfer. */
18
+ export declare function isProtectedTransferTable(table: string): boolean;
19
+ export declare function validateDataTransferManifest(value: unknown): DataTransferManifestValidation;
20
+ /** Whether the selected manifest slice contains a file/image field at any nesting depth. */
21
+ export declare function manifestTablesUseFileStorage(manifest: Manifest, tableNames: readonly string[]): boolean;
@@ -0,0 +1,21 @@
1
+ /** Format a date-only value (local midnight ms) for grid display. */
2
+ export declare function formatDateCell(ms: number): string;
3
+ /** Format a datetime value (epoch ms) for grid display. */
4
+ export declare function formatDateTimeCell(ms: number): string;
5
+ /** Value for `<input type="date">` from local-midnight ms. */
6
+ export declare function dateInputValue(ms: number): string;
7
+ /** Value for `<input type="datetime-local">` from epoch ms. */
8
+ export declare function dateTimeInputValue(ms: number): string;
9
+ /** Parse `YYYY-MM-DD` to local midnight ms. */
10
+ export declare function parseDateInput(s: string): number | null;
11
+ /** Parse `YYYY-MM-DDTHH:mm` (datetime-local) to epoch ms. */
12
+ export declare function parseDateTimeInput(s: string): number | null;
13
+ /** Serialize a date field for CSV export. */
14
+ export declare function serializeDateCsv(ms: number): string;
15
+ /** Serialize a datetime field for CSV export. */
16
+ export declare function serializeDateTimeCsv(ms: number): string;
17
+ /** Parse a CSV cell into ms for date or datetime kinds. */
18
+ export declare function parseDateCsv(s: string, kind: "date" | "datetime"): number | null;
19
+ export type StampDateFormatPreset = "date" | "datetime" | "time";
20
+ /** Numeric visitor/stamp dates (dd.mm.yyyy); used by stamps and record tables. */
21
+ export declare function formatNumericDate(ms: number, locale: string | undefined, preset?: StampDateFormatPreset): string;
@@ -0,0 +1,3 @@
1
+ export declare function stripAnsi(s: string): string;
2
+ export declare function extractError(out: string): string;
3
+ export declare function classifyPhase(out: string): "schema" | "deploy" | "unknown";
@@ -0,0 +1,17 @@
1
+ import type { Field } from "./schemaTypes.ts";
2
+ export declare function truncateDisplay(s: string, n: number): string;
3
+ /** One-line label for display-value cache and UI fallbacks; unwraps BlockNote JSON. */
4
+ export declare function formatDisplayPreviewText(value: string, maxLen?: number): string;
5
+ /**
6
+ * Heuristic Preview label when no Preview template is configured.
7
+ * Walks `fields` in schema order, takes up to two eligible values, truncates.
8
+ */
9
+ export declare function fallbackPreviewLabel(row: Record<string, unknown>, fields?: readonly Field[]): string;
10
+ export declare function fallbackIdLabel(documentId: string): string;
11
+ export declare function formatIdShort(id: string, n?: number): string;
12
+ export declare function looksLikeId(s: string): boolean;
13
+ export declare function toDocumentId(value: unknown): string | undefined;
14
+ export declare function safeStringify(v: unknown): string;
15
+ export declare function emptyToUndefined(v: string, optional?: boolean): string | undefined;
16
+ /** Compact one-line preview of an arbitrary value (used in cell previews). */
17
+ export declare function formatPrimitivePreview(v: unknown): string;
@@ -0,0 +1,11 @@
1
+ import type { Manifest } from "./schemaTypes.ts";
2
+ export type TemplateValidationError = {
3
+ table: string;
4
+ kind: "id" | "preview";
5
+ message: string;
6
+ };
7
+ export declare function validateDisplayTemplates(manifest: Manifest): TemplateValidationError[];
8
+ /** Wrap single-line `return expr;` in String() so generated fns satisfy Promise<string>. */
9
+ export declare function normalizeDisplayTemplateBody(body: string): string;
10
+ export declare function normalizeManifestDisplayTemplates(manifest: Manifest): Manifest;
11
+ export declare function generateDisplayValuesTs(manifest: Manifest): string;
@@ -0,0 +1,10 @@
1
+ export type DisplayLookupResult = {
2
+ id?: string;
3
+ preview?: string;
4
+ };
5
+ export type DisplayLookup = (table: string, id: string) => Promise<DisplayLookupResult | null>;
6
+ export type DisplayTemplateFn = (row: Record<string, unknown>, lookup: DisplayLookup) => Promise<string>;
7
+ export type DisplayTemplateRegistry = Record<string, {
8
+ id?: DisplayTemplateFn;
9
+ preview?: DisplayTemplateFn;
10
+ }>;
@@ -0,0 +1,27 @@
1
+ export type ErdLayoutDoc = Record<string, {
2
+ x: number;
3
+ y: number;
4
+ }>;
5
+ /** Alias used by the client layer — same shape as ErdLayoutDoc. */
6
+ export type ErdLayout = ErdLayoutDoc;
7
+ /** Strict parse for writes — throws on malformed JSON. */
8
+ export declare function parseErdLayoutOrThrow(layoutJson: string): ErdLayoutDoc;
9
+ /** Best-effort parse for reads/promotion — corrupt stored layout must not block saves. */
10
+ export declare function parseErdLayoutOrEmpty(json: string | undefined): ErdLayoutDoc;
11
+ export declare function serializeErdLayout(layout: ErdLayoutDoc): string;
12
+ export declare function mergeErdLayouts(canonical: ErdLayoutDoc, draft?: ErdLayoutDoc): ErdLayoutDoc;
13
+ export declare function pruneErdLayout(layout: ErdLayoutDoc, tableNames: Iterable<string>): ErdLayoutDoc;
14
+ export declare function mergeDraftErdLayoutIntoCanonical(row: {
15
+ erdLayoutJson?: string;
16
+ draftErdLayoutJson?: string;
17
+ }): {
18
+ erdLayoutJson?: string;
19
+ draftErdLayoutJson: undefined;
20
+ };
21
+ export declare function promoteErdLayoutOnSave(row: {
22
+ erdLayoutJson?: string;
23
+ draftErdLayoutJson?: string;
24
+ } | null, tableNames: Iterable<string>): {
25
+ erdLayoutJson?: string;
26
+ draftErdLayoutJson: undefined;
27
+ };
@@ -0,0 +1,109 @@
1
+ /**
2
+ * Facets (plan 101): a per-field value list with disjunctive counts. A facet's selection is not
3
+ * stored apart from the query: it is its field's condition (plan 103 D5), which the writers below
4
+ * replace in place and the read model drops to count the facet.
5
+ */
6
+ import { z } from "zod";
7
+ import { type GridQuery } from "./gridQuery.ts";
8
+ import { type Condition, type Predicate } from "./queryTypes.ts";
9
+ import type { Field, FieldType, Table } from "./schemaTypes.ts";
10
+ /** `count` descending, `label` A to Z, or `options` (choices: option order). */
11
+ export declare const FACET_SORTS: readonly ["count", "label", "options"];
12
+ export type FacetSort = (typeof FACET_SORTS)[number];
13
+ /** A date facet's bucket when its spec names none. */
14
+ export declare const FACET_DATE_BUCKET = "month";
15
+ /** One facet of a view: a field path, its date bucket and its value order. */
16
+ export declare const facetSpecSchema: z.ZodObject<{
17
+ field: z.ZodString;
18
+ bucket: z.ZodOptional<z.ZodEnum<{
19
+ day: "day";
20
+ week: "week";
21
+ month: "month";
22
+ quarter: "quarter";
23
+ year: "year";
24
+ }>>;
25
+ sort: z.ZodOptional<z.ZodEnum<{
26
+ options: "options";
27
+ label: "label";
28
+ count: "count";
29
+ }>>;
30
+ }, z.core.$strip>;
31
+ export type FacetSpec = z.infer<typeof facetSpecSchema>;
32
+ /** A saved view's facet list, as a bundle or the `facets=` URL param holds it. */
33
+ export declare const facetListSchema: z.ZodArray<z.ZodObject<{
34
+ field: z.ZodString;
35
+ bucket: z.ZodOptional<z.ZodEnum<{
36
+ day: "day";
37
+ week: "week";
38
+ month: "month";
39
+ quarter: "quarter";
40
+ year: "year";
41
+ }>>;
42
+ sort: z.ZodOptional<z.ZodEnum<{
43
+ options: "options";
44
+ label: "label";
45
+ count: "count";
46
+ }>>;
47
+ }, z.core.$strip>>;
48
+ /**
49
+ * The facets `table` can show, in order: a facet on a field it no longer has or can't facet is
50
+ * dropped, as is a repeated field, a date bucket off a field without them and option order off a
51
+ * field without options, so a view never sends the read model a facet it refuses.
52
+ */
53
+ export declare function facetsForTable(table: Pick<Table, "name" | "fields">, facets: readonly FacetSpec[]): FacetSpec[];
54
+ /**
55
+ * Whether the `q` box suggests a field's values when no view facet names it: choices, links,
56
+ * link lists and multi-selects. Other facetable fields are suggested only as a view's facets.
57
+ */
58
+ export declare function suggestedWithoutFacet(type: FieldType): boolean;
59
+ /** A value facet's order without a `sort`, as the read model applies it: a choice's options, else count. */
60
+ export declare function defaultFacetSort(type: FieldType): FacetSort;
61
+ /** A field's choices, or a multi-select's; null for anything else. */
62
+ export declare function choiceOptions(type: FieldType): readonly (string | number | boolean)[] | null;
63
+ /** The op a value list on `type` takes: `containsAny` for a list field, else `in`. */
64
+ export declare function listOp(type: FieldType): "containsAny" | "in";
65
+ /** The index of `field`'s condition among the top-level items; -1 without one. */
66
+ export declare function fieldConditionIndex(query: GridQuery | null, field: string): number;
67
+ /** Whether a top-level item references `field` alone: a predicate on it, or a group of them. */
68
+ export declare function conditionOnField(condition: Condition, field: string): boolean;
69
+ /**
70
+ * A field's condition (plan 103 D5): the top-level items that reference only `field`, as one
71
+ * item (several are ANDed), or undefined. A group over several fields belongs to none.
72
+ */
73
+ export declare function fieldCondition(query: GridQuery | null, field: string): Condition | {
74
+ and: Condition[];
75
+ } | undefined;
76
+ /** The values a facet has ticked: the field's `in` or `containsAny` list, alone or in an `or`. */
77
+ export declare function facetValues(query: GridQuery | null, field: string): readonly unknown[];
78
+ /** The query a facet counts under: everything but its field's condition. */
79
+ export declare function withoutField<Q extends GridQuery>(query: Q, field: string): Q;
80
+ /** `query` with `field`'s condition replaced by `next` at its first item's place (or appended). */
81
+ export declare function setFieldCondition<Q extends GridQuery>(query: Q | null, field: string, next: Condition | null): Q | null;
82
+ /**
83
+ * A field condition as one control shows it (plan 103 D10): a main predicate, (Empty), or the
84
+ * two ORed. Null for anything else (several items, a wider group), which no control edits.
85
+ */
86
+ export declare function splitEmpty(condition: Condition | undefined): {
87
+ main: Predicate | null;
88
+ empty: boolean;
89
+ } | null;
90
+ /** Inverse of `splitEmpty`: `main`, (Empty), both as a one-field `or`, or null for neither. */
91
+ export declare function joinEmpty(field: string, main: Predicate | null, empty: boolean): Condition | null;
92
+ /** `splitEmpty` when the main predicate is absent or a value list; null for anything else. */
93
+ export declare function splitList(condition: Condition | undefined): {
94
+ list: Extract<Predicate, {
95
+ value: unknown[];
96
+ }> | null;
97
+ empty: boolean;
98
+ } | null;
99
+ /**
100
+ * `condition` with one value ticked or unticked: `in` for a scalar, `containsAny` for a list
101
+ * (an existing list keeps its op). (Empty) stays; any other condition is returned unchanged.
102
+ */
103
+ export declare function withValue(condition: Condition | undefined, field: Pick<Field, "name" | "type">, value: unknown, selected: boolean): Condition | null;
104
+ /**
105
+ * Up to four fields a table without pinned filters shows in the Filters rail (plan 103 D9):
106
+ * choices, then links, booleans, dates and numbers, each in field order. Text (ids, names) is
107
+ * never picked; system fields aren't fields here.
108
+ */
109
+ export declare function defaultPins(table: Pick<Table, "name" | "fields">): FacetSpec[];
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Why an action failed, for a toast: a `ConvexError`'s string data or its `data.message`.
3
+ * Production backends pass nothing else to the client, so anything else gets a generic line.
4
+ */
5
+ export declare function failureMessage(error: unknown): string;
@@ -0,0 +1,110 @@
1
+ import type { FieldType } from "./schemaTypes.ts";
2
+ /** Manifest field type discriminator — every `FieldType["kind"]`. */
3
+ export type FieldTypeKind = FieldType["kind"];
4
+ /** One entry per field kind; a missing kind is a type error. Use for per-kind lookup tables and registries. */
5
+ export type KindTable<R> = {
6
+ readonly [K in FieldTypeKind]: R;
7
+ };
8
+ /** Whether each kind holds child field types; a new kind must choose here. */
9
+ declare const KIND_STRUCTURE: {
10
+ readonly string: "leaf";
11
+ readonly markdown: "leaf";
12
+ readonly number: "leaf";
13
+ readonly boolean: "leaf";
14
+ readonly bigint: "leaf";
15
+ readonly null: "leaf";
16
+ readonly any: "leaf";
17
+ readonly bytes: "leaf";
18
+ readonly file: "leaf";
19
+ readonly image: "leaf";
20
+ readonly date: "leaf";
21
+ readonly datetime: "leaf";
22
+ readonly id: "leaf";
23
+ readonly literal: "leaf";
24
+ readonly array: "composite";
25
+ readonly object: "composite";
26
+ readonly union: "composite";
27
+ };
28
+ /** Kinds that hold child field types; recursions switch on these and treat the rest as leaves. */
29
+ export type CompositeKind = {
30
+ [K in FieldTypeKind]: (typeof KIND_STRUCTURE)[K] extends "composite" ? K : never;
31
+ }[FieldTypeKind];
32
+ export type LeafFieldType = Exclude<FieldType, {
33
+ kind: CompositeKind;
34
+ }>;
35
+ /** Call in a recursion's fallthrough: a new composite kind reaching it is a compile error. */
36
+ export declare function leafOnly(_type: LeafFieldType): void;
37
+ /**
38
+ * A field kind, or a structural shape that behaves differently from its kind:
39
+ * `enum` is a union of literals, `idList` is `id[]`, `scalarList` is an array of chip items.
40
+ */
41
+ export type FieldShape = FieldTypeKind | "enum" | "idList" | "scalarList";
42
+ export declare function fieldShape(type: FieldType): FieldShape;
43
+ /** The table a link (`id`) or link list (`id[]`) points to; a union of links has no one target. */
44
+ export declare function linkTargetTable(type: FieldType): string | undefined;
45
+ export type KindTrait =
46
+ /** Edited in place in a grid cell or formula bar. */
47
+ "inline"
48
+ /** Users can change the value (literal and null are fixed). */
49
+ | "editable"
50
+ /** Free-text inline editor that may commit an invalid draft (flagged until fixed). */
51
+ | "textScalar"
52
+ /** Value is a Media asset id. */
53
+ | "storage"
54
+ /** Formula bar commits on change rather than on Enter / blur. */
55
+ | "commitsOnChange"
56
+ /** Formula bar needs the tall editor (objects and unions stay one line: summary + popover). */
57
+ | "tallEditor"
58
+ /** Formula bar edits the value as wrapping chips (lists of scalars / references). */
59
+ | "wrapsInline"
60
+ /** Short scalar that fits in a chip, so a list of it is a `scalarList`. */
61
+ | "chipItem"
62
+ /** Can label a row in the fallback Preview. */
63
+ | "previewLabel";
64
+ export declare function hasKindTrait(type: FieldType, trait: KindTrait): boolean;
65
+ /** Kinds offered in schema editors (stable picker order). */
66
+ export declare const FIELD_TYPE_SELECT_KINDS: readonly ["string", "markdown", "number", "boolean", "bigint", "null", "any", "bytes", "file", "image", "date", "datetime", "id", "literal", "array", "object", "union"];
67
+ /** Lucide icon component names for each field kind (resolved in UI). */
68
+ export declare const FIELD_TYPE_KIND_ICONS: {
69
+ readonly string: "Type";
70
+ readonly markdown: "FileText";
71
+ readonly number: "Hash";
72
+ readonly boolean: "ToggleLeft";
73
+ readonly bigint: "Binary";
74
+ readonly null: "CircleSlash";
75
+ readonly any: "Asterisk";
76
+ readonly bytes: "FileCode2";
77
+ readonly file: "File";
78
+ readonly image: "Image";
79
+ readonly date: "Calendar";
80
+ readonly datetime: "CalendarClock";
81
+ readonly id: "Link2";
82
+ readonly literal: "Quote";
83
+ readonly array: "List";
84
+ readonly object: "Braces";
85
+ readonly union: "GitBranch";
86
+ };
87
+ /** Human-readable labels for schema UI (kind ids stay in manifest JSON). */
88
+ export declare const FIELD_TYPE_KIND_LABELS: {
89
+ readonly string: "Text";
90
+ readonly markdown: "Rich text";
91
+ readonly number: "Number";
92
+ readonly boolean: "Boolean";
93
+ readonly bigint: "Big integer";
94
+ readonly null: "Null";
95
+ readonly any: "Any value";
96
+ readonly bytes: "Bytes";
97
+ readonly file: "File";
98
+ readonly image: "Image";
99
+ readonly date: "Date";
100
+ readonly datetime: "Date & time";
101
+ readonly id: "Reference";
102
+ readonly literal: "Literal";
103
+ readonly array: "List";
104
+ readonly object: "Object";
105
+ readonly union: "Union";
106
+ };
107
+ export type FieldTypeKindIconName = (typeof FIELD_TYPE_KIND_ICONS)[FieldTypeKind];
108
+ export declare function fieldTypeKindLabel(kind: FieldTypeKind): string;
109
+ export declare function fieldTypeKindIconName(kind: FieldTypeKind): FieldTypeKindIconName;
110
+ export {};
@@ -0,0 +1,34 @@
1
+ import { type LeafFieldType } from "./fieldTypeMeta.ts";
2
+ import type { Field, FieldType } from "./schemaTypes.ts";
3
+ /** How to write each part of a field type; `foldFieldType` owns the recursion. */
4
+ export type FieldTypeFold<R> = {
5
+ leaf: (type: LeafFieldType) => R;
6
+ array: (element: R, type: Extract<FieldType, {
7
+ kind: "array";
8
+ }>) => R;
9
+ object: (fields: {
10
+ field: Field;
11
+ value: R;
12
+ }[], type: Extract<FieldType, {
13
+ kind: "object";
14
+ }>) => R;
15
+ union: (options: R[], type: Extract<FieldType, {
16
+ kind: "union";
17
+ }>) => R;
18
+ };
19
+ /** Fold a field type bottom-up: composites receive their children's results. */
20
+ export declare function foldFieldType<R>(type: FieldType, fold: FieldTypeFold<R>): R;
21
+ /** Each field's kind (see `KIND_FOLD`) by path: `field`, and `field.sub` inside objects. */
22
+ export declare function fieldKinds(fields: Field[]): Map<string, string>;
23
+ /** Human, short type text: badges, ERD rows, CSV import match, autocomplete details. */
24
+ export declare function typeLabel(type: FieldType): string;
25
+ /** Precise type text: tooltips, schema summaries, the union variant picker. */
26
+ export declare function typeCode(type: FieldType): string;
27
+ export type TypeScriptOptions = {
28
+ /** `block` writes one object property per line (editor hovers). */
29
+ layout?: "inline" | "block";
30
+ /** Add `| undefined` to optional properties (exactOptionalPropertyTypes-style readers). */
31
+ optionalUndefined?: boolean;
32
+ };
33
+ /** TypeScript type of a field's Convex value: consumer `documents.ts`, template `.d.ts`. */
34
+ export declare function toTypeScript(type: FieldType, options?: TypeScriptOptions): string;
@@ -0,0 +1,10 @@
1
+ /** True when two stored field values are equivalent (missing ≡ undefined). */
2
+ export declare function fieldValuesEqual(a: unknown, b: unknown): boolean;
3
+ /** Drop patch keys whose values match the server row baseline. */
4
+ export declare function filterChangedPatchFields(patch: Record<string, unknown>, baseline: Record<string, unknown> | undefined): Record<string, unknown>;
5
+ /**
6
+ * Strict structural equality for stored Convex values (Media metadata drafts, defaults,
7
+ * automated writes). Unlike `fieldValuesEqual`, an explicit `null` differs from a missing
8
+ * value. bigint and bytes compare by value, and object key order is ignored.
9
+ */
10
+ export declare function convexValuesEqual(a: unknown, b: unknown): boolean;
@@ -0,0 +1,24 @@
1
+ import type { FieldType } from "./schemaTypes.ts";
2
+ export type EnumOption = Extract<FieldType, {
3
+ kind: "literal";
4
+ }>["value"];
5
+ /** Literal values of an enum (a union whose options are all literals), or null for any other type. */
6
+ export declare function enumOptions(type: FieldType): readonly EnumOption[] | null;
7
+ /**
8
+ * The enum option whose text form is `text`, keeping the literal's own type (`"2"` → `2`).
9
+ * Select inputs carry option values as strings; use this to map a selection back. Undefined when
10
+ * `type` is not an enum or no option matches.
11
+ */
12
+ export declare function enumOptionFromText(type: FieldType, text: string): EnumOption | undefined;
13
+ /** The first option of a union that `value` fits (see `valueMatchesShape`), or null. */
14
+ export declare function matchingOption(type: Extract<FieldType, {
15
+ kind: "union";
16
+ }>, value: unknown): {
17
+ option: FieldType;
18
+ index: number;
19
+ } | null;
20
+ /**
21
+ * Whether `value` has the runtime shape of `type` — shallow for arrays and objects, used to pick
22
+ * the active union option in editors. Lenient on emptiness (`""` is a string); strict on kind.
23
+ */
24
+ export declare function valueMatchesShape(value: unknown, type: FieldType): boolean;
@@ -0,0 +1,32 @@
1
+ import type { FieldType } from "./schemaTypes.ts";
2
+ /**
3
+ * Text that parses back to the same value via `fromLosslessText` — CSV cells and clipboard.
4
+ * Markdown is the exception by design: it exports plain text and re-imports as a rich document.
5
+ */
6
+ export declare function toLosslessText(type: FieldType, value: unknown): string;
7
+ export type LosslessParseResult = {
8
+ ok: true;
9
+ value: unknown;
10
+ } | {
11
+ ok: false;
12
+ error: string;
13
+ };
14
+ /** Inverse of `toLosslessText`. Empty text means missing: optional → undefined, required → error. */
15
+ export declare function fromLosslessText(type: FieldType, raw: string, { optional }: {
16
+ optional: boolean;
17
+ }): LosslessParseResult;
18
+ /** Sync label lookup for a referenced document; undefined/null falls back to a short id. */
19
+ export type ResolveId = (table: string, id: string) => string | null | undefined;
20
+ export type DisplayTextOptions = {
21
+ /** Numeric dates in this locale (public pages); omitted → studio date formats. */
22
+ locale?: string;
23
+ resolveId?: ResolveId;
24
+ maxLength?: number;
25
+ };
26
+ /**
27
+ * Text for people to read: grid chips, row preview, query chips, preview labels, record tables.
28
+ * Never throws. Without a `type` (or for `any`), the shape is inferred from the value.
29
+ */
30
+ export declare function toDisplayText(type: FieldType | undefined, value: unknown, options?: DisplayTextOptions): string;
31
+ /** A field type describing `value`'s runtime shape, for untyped values. */
32
+ export declare function inferFieldType(value: unknown): FieldType;