@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,141 @@
1
+ import { type Manifest } from "./schemaTypes.ts";
2
+ import type { ShareScope } from "./shareTypes.ts";
3
+ /** Most active proposals (or patches of one) a share list returns. */
4
+ export declare const SHARE_LIST_LIMIT = 200;
5
+ export type ProposalPatchForPlanning = {
6
+ id: string;
7
+ table: string;
8
+ rowId: string;
9
+ op: "insert" | "update" | "delete";
10
+ fields: Record<string, unknown>;
11
+ seq: number;
12
+ _creationTime: number;
13
+ };
14
+ /**
15
+ * Mint a provisional row id. The `new:` prefix is what every guard in this
16
+ * module keys off, so producers must go through here rather than inlining it.
17
+ */
18
+ export declare function newProvisionalRowId(): string;
19
+ /** Table-qualified key for a provisional row, avoiding cross-table `new:*` collisions. */
20
+ export declare function provisionalRowKey(table: string, rowId: string): string;
21
+ /**
22
+ * Validate and order proposal patches so every provisional producer is applied
23
+ * before patches that reference it. Stored sequence remains a stable tie-breaker.
24
+ */
25
+ export declare function planProposalPatches<P extends ProposalPatchForPlanning>(manifest: Manifest, patches: readonly P[]): {
26
+ orderedPatches: P[];
27
+ hasDependencies: boolean;
28
+ };
29
+ /** Strip stale fields, skip empty updates, fail closed on type/requiredness errors. */
30
+ export declare function prepareProposalPatchesForAccept<P extends ProposalPatchForPlanning>(manifest: Manifest, scopes: readonly ShareScope[], patches: readonly P[]): P[];
31
+ export type ProposalPatchTarget = {
32
+ table: string;
33
+ rowId: string;
34
+ op: "insert" | "update" | "delete";
35
+ /** Present for updates; key set used for field-aware overlap. */
36
+ fields?: Record<string, unknown>;
37
+ /** Plan 082: optional fields the update removes; they count as touched. */
38
+ clearFields?: readonly string[];
39
+ };
40
+ /** Fields an update changes: those it sets and those it clears. */
41
+ export declare function patchTouchedFields(patch: Pick<ProposalPatchTarget, "fields" | "clearFields">): string[];
42
+ export type ProposalStaleCheckPatch = ProposalPatchTarget & {
43
+ baseFields?: Record<string, unknown> | null;
44
+ /** Plan 072: Media metadata patches apply only while the asset keeps this original. */
45
+ sourceVersionId?: string;
46
+ };
47
+ export type ProposalPatchTargets = {
48
+ id: string;
49
+ patches: ProposalPatchTarget[];
50
+ };
51
+ /**
52
+ * Base snapshot captured server-side at propose time (plan 051 PR 2); accept
53
+ * compares it against the live row. Proposals without base data (share links,
54
+ * `col_` API tokens) are exempt so existing flows keep today's behavior.
55
+ */
56
+ export declare function snapshotBaseFields(op: "insert" | "update" | "delete", proposedFields: Record<string, unknown>, liveRow: Record<string, unknown> | null): Record<string, unknown> | undefined;
57
+ /**
58
+ * The fields of `patch` whose live value moved off the baseline it was drafted
59
+ * against, or "row-missing" when the row is gone. Patches without a baseline
60
+ * (inserts, share links, `col_` tokens) are never stale.
61
+ */
62
+ export declare function staleFieldNames(patch: ProposalStaleCheckPatch, liveRow: Record<string, unknown> | null): string[] | "row-missing";
63
+ export declare function patchIsStale(patch: ProposalStaleCheckPatch, liveRow: Record<string, unknown> | null): {
64
+ stale: boolean;
65
+ reason?: string;
66
+ };
67
+ /**
68
+ * Ids of proposals with a true field-level conflict against another listed
69
+ * proposal: intersecting update fields, or delete vs any op, on the same live
70
+ * row. Disjoint updates and provisional `new:` rows do not conflict.
71
+ */
72
+ export declare function findOverlappingProposalIds(proposals: ProposalPatchTargets[]): Set<string>;
73
+ /**
74
+ * Ids among `candidates` that field-conflict with `target` (excludes target itself).
75
+ * Prefer this over all-pairs when answering a single-proposal question (e.g. publish mine).
76
+ */
77
+ export declare function findProposalIdsOverlappingTarget(target: ProposalPatchTargets, candidates: ProposalPatchTargets[]): Set<string>;
78
+ /** True when `target` field-conflicts with any other candidate (short-circuits). */
79
+ export declare function proposalOverlapsAny(target: ProposalPatchTargets, candidates: ProposalPatchTargets[]): boolean;
80
+ /** Replace provisional IDs only in manifest-declared top-level `id` and `id[]` fields. */
81
+ export declare function replaceProvisionalReferences(manifest: Manifest, tableName: string, fields: Record<string, unknown>, createdIds: ReadonlyMap<string, string>): Record<string, unknown>;
82
+ export type ProposalPatchOp = "insert" | "update" | "delete";
83
+ /** Editor/CMS draft patch — rowId is always known (including `new:…`). */
84
+ export type ProposalDraftPatch = {
85
+ table: string;
86
+ rowId: string;
87
+ op: ProposalPatchOp;
88
+ fields: Record<string, unknown>;
89
+ /** Plan 082: optional fields an update removes (JSON cannot carry undefined). */
90
+ clearFields?: string[];
91
+ };
92
+ export type ProposalClientPatch = ProposalDraftPatch & {
93
+ id?: string;
94
+ baseFields?: Record<string, unknown> | null;
95
+ baseline?: Record<string, unknown> | null;
96
+ seq?: number;
97
+ };
98
+ /** Client-facing proposal summary (CMS + profile proposal list). */
99
+ export type ProposalClientSummary = {
100
+ id: string;
101
+ source: "share" | "api" | "editor";
102
+ status: string;
103
+ apiProfileId?: string;
104
+ createdByUserId?: string;
105
+ createdAt: number;
106
+ /** Plan 082: revision of a protected shared draft; absent on legacy drafts. */
107
+ draftRevision?: number;
108
+ /** Plan 112: the editor draft's key (absent: the default draft), label and author name. */
109
+ draftKey?: string;
110
+ draftLabel?: string;
111
+ createdByName?: string;
112
+ patches: ProposalClientPatch[];
113
+ };
114
+ /** Plan 112: `userId`'s active editor draft for `draftKey` (undefined: the default draft). */
115
+ export declare function myDraft<P extends Pick<ProposalClientSummary, "status" | "createdByUserId" | "draftKey">>(proposals: readonly P[], userId: string | null | undefined, draftKey?: string): P | undefined;
116
+ export type ProposalBatchOutcome = {
117
+ id: string;
118
+ outcome: "accepted" | "rejected" | "skipped_stale" | "skipped_overlap";
119
+ message?: string;
120
+ };
121
+ export declare const OVERLAP_MESSAGE = "Another pending proposal touches the same rows";
122
+ /**
123
+ * Accept-batch orchestration shared by host profile accept and the CMS fixture
124
+ * mock store. Overlap only gates multi-accept; stale always skips. `onAccept`
125
+ * runs only for proposals that clear those gates.
126
+ */
127
+ export declare function runAcceptProposalBatch(args: {
128
+ proposalIds: string[];
129
+ activeProposals: Array<{
130
+ id: string;
131
+ patches: ProposalStaleCheckPatch[];
132
+ }>;
133
+ getLiveRow: (table: string, rowId: string) => Record<string, unknown> | null | Promise<Record<string, unknown> | null>;
134
+ onAccept: (id: string) => void | Promise<void>;
135
+ /** How to treat ids absent from `activeProposals`. Default: throw. */
136
+ onMissing?: "reject" | "throw";
137
+ /** Extra per-patch staleness beyond base fields (plan 072 source guards); reason or null. */
138
+ patchSupersededReason?: (patch: ProposalStaleCheckPatch, proposalId: string) => string | null | Promise<string | null>;
139
+ /** Whole-proposal staleness after the per-patch checks (plan 082 atomic bundles). */
140
+ proposalSupersededReason?: (proposalId: string) => string | null | Promise<string | null>;
141
+ }): Promise<ProposalBatchOutcome[]>;
@@ -0,0 +1,13 @@
1
+ import type { ProposalFieldDiff, ProposalRecordFieldDiff } from "./shareTypes.ts";
2
+ export declare function computeProposalFieldDiff(baseline: Record<string, unknown> | null | undefined, fields: Record<string, unknown>): ProposalFieldDiff[];
3
+ /** Merge baseline + patch into the record a reviewer would see after accept. */
4
+ export declare function mergeProposedRecord(baseline: Record<string, unknown> | null | undefined, fields: Record<string, unknown>, op: "insert" | "update" | "delete"): Record<string, unknown>;
5
+ /** Field names for full-record review: schema order when available, else baseline ∪ patch. */
6
+ export declare function proposalDiffFieldNames(tableFields: readonly {
7
+ name: string;
8
+ }[] | undefined, baseline: Record<string, unknown> | null | undefined, fields: Record<string, unknown>): string[];
9
+ /**
10
+ * Full-record field diffs in schema (or key) order, including unchanged fields.
11
+ * `changed` mirrors patch membership / equality — same rules as computeProposalFieldDiff.
12
+ */
13
+ export declare function computeProposalRecordDiff(fieldNames: readonly string[], baseline: Record<string, unknown> | null | undefined, fields: Record<string, unknown>, op: "insert" | "update" | "delete"): ProposalRecordFieldDiff[];
@@ -0,0 +1,19 @@
1
+ import type { Manifest } from "./schemaTypes.ts";
2
+ import type { ShareInviteKind, ShareLinkType, ShareOperation, ShareScope, ShareScopeConflictPatch, ShareWizardReferenceInput } from "./shareTypes.ts";
3
+ export declare function normalizeShareScopes(scopes: ShareScope[]): ShareScope[];
4
+ /**
5
+ * A row filter with pinned rows or a referenced scope (plan 095 decision 6):
6
+ * share link writes refuse it and guests see no rows through a stored one.
7
+ */
8
+ export declare function scopeCombinesClamp(scope: ShareScope): boolean;
9
+ export declare function isReferenceOnlyScope(scope: ShareScope): boolean;
10
+ export declare function mergeReferenceScopes(scopes: ShareScope[], references: ShareWizardReferenceInput[]): ShareScope[];
11
+ export declare function isFormSubmissionScope(scope: ShareScope): boolean;
12
+ export declare function canSearchFormReferences(scope: ShareScope): boolean;
13
+ export declare function canCreateFormReferences(scope: ShareScope | undefined): boolean;
14
+ export declare function assertShareLinkTypeConsistency(type: ShareLinkType, scopes: ShareScope[], inviteKind?: ShareInviteKind): void;
15
+ export declare function canProposeOperation(scope: ShareScope | undefined, operation: ShareOperation): boolean;
16
+ export declare function canProposeInsert(scope: ShareScope | undefined): boolean;
17
+ export declare function eligibleReferencedParents(manifest: Manifest, scopes: ShareScope[], targetTable: string): ShareScope[];
18
+ export declare function assertShareOperation(scopes: ShareScope[], table: string, operation: ShareOperation, rowId?: string, fields?: string[]): ShareScope;
19
+ export declare function findShareScopeConflicts(scopes: ShareScope[], patches: ShareScopeConflictPatch[]): ShareScopeConflictPatch[];
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Encryption for creator-only guest-share tokens. Ciphertexts use AES-256-GCM
3
+ * with a random 12-byte IV and are safe to store with the invite record.
4
+ */
5
+ export declare const SHARE_TOKEN_ENCRYPTION_KEY_ENV = "SHARE_TOKEN_ENCRYPTION_KEY";
6
+ /** Parse a 32-byte AES key encoded as standard or URL-safe base64. */
7
+ export declare function parseShareTokenEncryptionKey(raw: string): Uint8Array;
8
+ export declare function encryptShareToken(plaintext: string, keyBytes: Uint8Array): Promise<string>;
9
+ export declare function decryptShareToken(ciphertext: string, keyBytes: Uint8Array): Promise<string>;
@@ -0,0 +1,6 @@
1
+ import type { ShareGuestViewMode, ShareScope } from "./shareTypes.ts";
2
+ export declare const SHARE_TOKEN_PREFIX = "shr_";
3
+ export declare function inferDefaultGuestView(scopes: ShareScope[]): ShareGuestViewMode | undefined;
4
+ export declare function generateShareToken(): string;
5
+ export declare function hashShareToken(token: string): Promise<string>;
6
+ export declare function shareTokenPrefix(token: string): string;
@@ -0,0 +1,113 @@
1
+ import type { ClampQuery } from "./queryTypes.ts";
2
+ export type SharePermission = "view" | "propose";
3
+ export type ShareAccess = "full" | "referenced";
4
+ export type ShareOperation = "insert" | "update" | "delete";
5
+ export type ShareOps = {
6
+ insert: boolean;
7
+ update: boolean;
8
+ delete: boolean;
9
+ };
10
+ export type ShareFormAccess = {
11
+ submit: boolean;
12
+ searchReferences: boolean;
13
+ createReferences: boolean;
14
+ };
15
+ export type ShareScope = {
16
+ table: string;
17
+ /** Explicit guest-navigation membership. Normalization fills legacy omissions. */
18
+ primary?: boolean;
19
+ access: ShareAccess;
20
+ recordIds?: string[];
21
+ permission: SharePermission;
22
+ ops: ShareOps;
23
+ allowCreate?: boolean;
24
+ /** Optional form allowlist. Omitted means every non-system manifest field. */
25
+ allowedFields?: string[];
26
+ /** Submit and reference-picker capabilities for form and propose links. */
27
+ formAccess?: ShareFormAccess;
28
+ /** Opaque row clamp AND-merged with optional guest Query on full-table lists. */
29
+ rowQuery?: ClampQuery;
30
+ /** Scan ceiling for this scope; guest maxScan may only lower. */
31
+ maxScanLimit?: number;
32
+ };
33
+ export type ShareInviteKind = "recipient" | "public";
34
+ export type ShareInviteAuth = "token" | "email";
35
+ export type ShareScopeAccessMode = "full" | "selected" | "referenced";
36
+ export type ShareLinkType = "form" | "view" | "propose";
37
+ export type ShareGuestViewMode = "grid" | "detail";
38
+ export type ShareWizardTableInput = {
39
+ table: string;
40
+ recordIds?: string[];
41
+ allowedFields?: string[];
42
+ /** Replaces the table's row filter and scan ceiling; absent keeps the stored ones. */
43
+ clamp?: ShareClamp;
44
+ };
45
+ /** A table's row filter and scan ceiling. */
46
+ export type ShareClamp = Pick<ShareScope, "rowQuery" | "maxScanLimit">;
47
+ export type ShareWizardReferenceInput = {
48
+ table: string;
49
+ searchReferences: boolean;
50
+ createReferences: boolean;
51
+ };
52
+ export type ShareWizardInput = {
53
+ tables: ShareWizardTableInput[];
54
+ ops?: Partial<ShareOps>;
55
+ references?: ShareWizardReferenceInput[];
56
+ };
57
+ export type ShareRefChoice = "pick" | "create" | "hide";
58
+ export type ShareConfiguratorState = {
59
+ tables: string[];
60
+ allowedFields: Record<string, string[]>;
61
+ recordIds: Record<string, string>;
62
+ refChoices: Record<string, ShareRefChoice>;
63
+ ops: ShareOps;
64
+ /** Each stored table's row filter; null where pins the draft can't show, or a referenced scope, exclude one. */
65
+ clamps: Record<string, ShareClamp | null>;
66
+ };
67
+ export type GuestCapabilityInput = {
68
+ link: {
69
+ type: ShareLinkType;
70
+ };
71
+ invite: {
72
+ kind: ShareInviteKind;
73
+ };
74
+ };
75
+ export type GuestLinkCapabilities = {
76
+ formMode: boolean;
77
+ canBrowseRows: boolean;
78
+ canListProposals: boolean;
79
+ canUpsertPatches: boolean;
80
+ canToggleViewMode: boolean;
81
+ };
82
+ export type GuestScopeCapabilities = {
83
+ visibleInNav: boolean;
84
+ canReadDisplay: boolean;
85
+ canSearchReferences: boolean;
86
+ canCreateReferences: boolean;
87
+ canProposeInsert: boolean;
88
+ canProposeUpdate: boolean;
89
+ canProposeDelete: boolean;
90
+ };
91
+ export type GuestCapabilities = {
92
+ link: GuestLinkCapabilities;
93
+ scope?: GuestScopeCapabilities;
94
+ };
95
+ export type ShareScopeConflictPatch = {
96
+ table: string;
97
+ rowId: string;
98
+ op: ShareOperation;
99
+ fields: Record<string, unknown>;
100
+ };
101
+ export type ProposalFieldDiff = {
102
+ field: string;
103
+ before: unknown;
104
+ after: unknown;
105
+ };
106
+ /** Full-record proposal review row (schema field order, including unchanged). */
107
+ export type ProposalRecordFieldDiff = {
108
+ field: string;
109
+ before: unknown;
110
+ after: unknown;
111
+ changed: boolean;
112
+ };
113
+ export type ProposalDiffViewMode = "diff" | "table";
@@ -0,0 +1,23 @@
1
+ import type { Manifest } from "./schemaTypes.ts";
2
+ import type { ShareClamp, ShareConfiguratorState, ShareLinkType, ShareOps, ShareRefChoice, ShareScope, ShareWizardInput } from "./shareTypes.ts";
3
+ export declare function shareTypeDefaultScopes(type: ShareLinkType, input: ShareWizardInput): ShareScope[];
4
+ /**
5
+ * Scopes for saving `wizard` over a link's `stored` scopes. A table that stays
6
+ * on the link keeps the limits the wizard can't express (plan 095 decision 24);
7
+ * a change they can't support fails the link's checks rather than dropping them.
8
+ */
9
+ export declare function compileShareUpdate(type: ShareLinkType, wizard: ShareWizardInput, stored: ShareScope[]): ShareScope[];
10
+ export declare function isPrimaryShareScope(_type: ShareLinkType, scope: ShareScope): boolean;
11
+ export declare function scopesToWizardInput(type: ShareLinkType, rawScopes: ShareScope[], manifest: Manifest): ShareConfiguratorState;
12
+ export declare function buildShareWizardInput(args: {
13
+ type: ShareLinkType;
14
+ manifest: Manifest;
15
+ tables: string[];
16
+ allowedFields: Record<string, string[]>;
17
+ recordIds: Record<string, string>;
18
+ refChoices: Record<string, ShareRefChoice>;
19
+ ops?: ShareOps;
20
+ /** Draft row filters; each is sent only when it differs from `loadedClamps`, since older kernels refuse the field. */
21
+ clamps?: Record<string, ShareClamp | null>;
22
+ loadedClamps?: Record<string, ShareClamp | null>;
23
+ }): ShareWizardInput;
@@ -0,0 +1,89 @@
1
+ import { type Manifest, type Table } from "./schemaTypes.ts";
2
+ import { type ColumnusDataTransferManifest } from "./dataTransfer.ts";
3
+ import { type FacetSpec } from "./facets.ts";
4
+ import { type GridQuery } from "./gridQuery.ts";
5
+ import { type StagedApiAccess } from "./stagedApiAccess.ts";
6
+ export declare const COLUMNUS_BUNDLE_VERSION: 1;
7
+ export type SpaceBundleSpace = {
8
+ name: string;
9
+ slug: string;
10
+ description?: string;
11
+ icon?: string;
12
+ order?: number;
13
+ tables: string[];
14
+ views?: SpaceBundleView[];
15
+ };
16
+ export type SpaceBundleView = {
17
+ name: string;
18
+ slug: string;
19
+ description?: string;
20
+ table: string;
21
+ /** Older bundles hold a `Query` (one `order` object), which parses as a `GridQuery`. */
22
+ query: GridQuery;
23
+ visibleColumns?: string[];
24
+ facets?: FacetSpec[];
25
+ /** The search box's text (plan 106 D6). */
26
+ q?: string;
27
+ /** The search box's ✨ Meaning toggle (plan 106 D27; `meaningOn`). */
28
+ qm?: boolean;
29
+ };
30
+ export type ColumnusSpaceBundle = {
31
+ columnusBundle: typeof COLUMNUS_BUNDLE_VERSION;
32
+ manifest: {
33
+ tables: Table[];
34
+ };
35
+ spaces: [SpaceBundleSpace];
36
+ dataTransfer?: ColumnusDataTransferManifest;
37
+ };
38
+ export type ParsedImportPaste = {
39
+ tables: Table[];
40
+ /** Plan 082 S9: access to stage on existing API profiles. */
41
+ apiAccess?: StagedApiAccess;
42
+ spaces?: [SpaceBundleSpace];
43
+ columnusBundle?: number;
44
+ dataTransfer?: ColumnusDataTransferManifest;
45
+ };
46
+ export type ImportPreviewError = {
47
+ kind: "validation" | "type_change";
48
+ message: string;
49
+ table?: string;
50
+ field?: string;
51
+ };
52
+ export type ImportPreviewWarning = {
53
+ kind: "removed_field" | "index_change" | "display_template_change" | "api_access" | "space_view";
54
+ message: string;
55
+ table?: string;
56
+ };
57
+ export type ImportPreview = {
58
+ errors: ImportPreviewError[];
59
+ warnings: ImportPreviewWarning[];
60
+ nextDraft: Manifest | null;
61
+ importedTableNames: string[];
62
+ };
63
+ export type ParseImportResult = {
64
+ ok: true;
65
+ parsed: ParsedImportPaste;
66
+ } | {
67
+ ok: false;
68
+ error: string;
69
+ };
70
+ export type SpaceExportResult = {
71
+ bundle: ColumnusSpaceBundle;
72
+ listedTables: string[];
73
+ closureExtra: string[];
74
+ };
75
+ /** Transitive closure of `id(Table)` reference targets from `seedTableNames`. */
76
+ export declare function collectIdReferenceClosure(manifest: Manifest, seedTableNames: string[]): string[];
77
+ export declare function buildSpaceExport(savedManifest: Manifest, space: {
78
+ name: string;
79
+ slug: string;
80
+ description?: string;
81
+ icon?: string;
82
+ order: number;
83
+ tables: string[];
84
+ }, views?: SpaceBundleView[]): SpaceExportResult;
85
+ export declare function parseImportPaste(text: string): ParseImportResult;
86
+ export declare function previewImportMerge(savedManifest: Manifest, currentDraft: Manifest, parsed: ParsedImportPaste,
87
+ /** Whether the importer may apply the bundle's views (plan 097 P2); else they are all skipped. */
88
+ canManageViews?: boolean): ImportPreview;
89
+ export declare function unionTableNames(existing: string[], imported: string[]): string[];
@@ -0,0 +1,104 @@
1
+ /**
2
+ * Plan 082 S9: API profile access staged by a schema import. A paste may add
3
+ * or replace table access on existing profiles; it waits with the schema draft
4
+ * and is committed when the Studio deploy succeeds. Every rule about combining
5
+ * and checking staged access lives here, for the import preview, the deploy
6
+ * begin/complete steps, and the profiles the deploy compiles.
7
+ */
8
+ import { z } from "zod";
9
+ import { type ApiProfileSnapshot, type ApiTableAccess } from "./apiProfile.ts";
10
+ import type { Manifest } from "./schemaTypes.ts";
11
+ export declare const stagedApiAccessSchema: z.ZodArray<z.ZodObject<{
12
+ profile: z.ZodString;
13
+ tableAccess: z.ZodArray<z.ZodObject<{
14
+ table: z.ZodString;
15
+ read: z.ZodBoolean;
16
+ sync: z.ZodOptional<z.ZodBoolean>;
17
+ editorAccess: z.ZodOptional<z.ZodBoolean>;
18
+ propose: z.ZodOptional<z.ZodObject<{
19
+ ops: z.ZodObject<{
20
+ insert: z.ZodBoolean;
21
+ update: z.ZodBoolean;
22
+ delete: z.ZodBoolean;
23
+ }, z.core.$strip>;
24
+ allowedFields: z.ZodOptional<z.ZodArray<z.ZodString>>;
25
+ recordIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
26
+ }, z.core.$strip>>;
27
+ autoAccept: z.ZodOptional<z.ZodBoolean>;
28
+ maxScanLimit: z.ZodOptional<z.ZodNumber>;
29
+ assetProfiles: z.ZodOptional<z.ZodArray<z.ZodString>>;
30
+ assignProfiles: z.ZodOptional<z.ZodArray<z.ZodString>>;
31
+ write: z.ZodOptional<z.ZodBoolean>;
32
+ rowQuery: z.ZodOptional<z.ZodObject<{
33
+ predicates: z.ZodOptional<z.ZodArray<z.ZodType<import("./queryTypes.ts").Condition, unknown, z.core.$ZodTypeInternals<import("./queryTypes.ts").Condition, unknown>>>>;
34
+ order: z.ZodOptional<z.ZodObject<{
35
+ field: z.ZodString;
36
+ direction: z.ZodEnum<{
37
+ asc: "asc";
38
+ desc: "desc";
39
+ }>;
40
+ }, z.core.$strip>>;
41
+ }, z.core.$strict>>;
42
+ }, z.core.$strip>>;
43
+ }, z.core.$strict>>;
44
+ /** Per profile slug, the table access entries to add or replace. */
45
+ export type StagedApiAccess = z.infer<typeof stagedApiAccessSchema>;
46
+ /**
47
+ * Staged access a deploy carries: each entry bound to the profile it was
48
+ * checked against (a profile recreated under the same slug is not it), with
49
+ * carried-over settings already resolved.
50
+ */
51
+ export type PendingApiAccess = Array<StagedApiAccess[number] & {
52
+ profileId: string;
53
+ }>;
54
+ type StagedEntry = StagedApiAccess[number] & {
55
+ profileId?: string;
56
+ };
57
+ export type StagedProfile = Pick<ApiProfileSnapshot, "slug" | "tables" | "tableAccess"> & {
58
+ id?: string;
59
+ };
60
+ /** One entry per profile; a later stage wins per (profile, table). */
61
+ export declare function mergeStagedApiAccess(...stages: StagedApiAccess[]): StagedApiAccess;
62
+ /** Profiles as they will be once `staged` is committed; others unchanged. */
63
+ export declare function applyStagedApiAccess<Profile extends StagedProfile>(profiles: readonly Profile[], staged: readonly StagedEntry[]): Profile[];
64
+ export type StagedAccessChange = {
65
+ profile: string;
66
+ table: string;
67
+ /** Live access now; null when the table has none on the profile. */
68
+ before: ApiTableAccess | null;
69
+ after: ApiTableAccess;
70
+ };
71
+ /** What committing `staged` changes, per (profile, table); unknown profiles are skipped. */
72
+ export declare function stagedApiAccessChanges(profiles: readonly StagedProfile[], staged: readonly StagedEntry[]): StagedAccessChange[];
73
+ /**
74
+ * Committing `staged`: the profile updates, and the entries whose profile is
75
+ * gone (deleted, or recreated under the same slug) to stage again for review.
76
+ */
77
+ export declare function commitStagedApiAccess<Profile extends StagedProfile & {
78
+ id: string;
79
+ }>(profiles: readonly Profile[], staged: PendingApiAccess): {
80
+ updates: Array<Pick<Profile, "id" | "tableAccess">>;
81
+ unbound: PendingApiAccess;
82
+ };
83
+ /** Staged entries whose profile no longer exists (they block every deploy until removed). */
84
+ export declare function stagedApiAccessOrphans(profiles: readonly StagedProfile[], staged: readonly StagedEntry[]): string[];
85
+ /** Bind staged access to the profiles it was checked against, for one deploy. */
86
+ export declare function resolveStagedApiAccess(profiles: readonly (StagedProfile & {
87
+ id: string;
88
+ })[], staged: readonly StagedEntry[]): PendingApiAccess;
89
+ /**
90
+ * Why `staged` cannot be committed with `manifest` deployed: unknown profiles,
91
+ * and staged entries the profile editor would refuse on that schema.
92
+ */
93
+ export declare function stagedApiAccessProblems(manifest: Manifest, profiles: readonly StagedProfile[], staged: readonly StagedEntry[]): string[];
94
+ /** Staged settings that widen what callers may do without review. */
95
+ export declare function stagedApiAccessWarnings(staged: StagedApiAccess): Array<{
96
+ table: string;
97
+ message: string;
98
+ }>;
99
+ /**
100
+ * Label for one access entry that names every restriction, so a review shows
101
+ * widening, e.g. `read, propose update (fields: title; 1 record), row filter`.
102
+ */
103
+ export declare function tableAccessLabel(access: ApiTableAccess): string;
104
+ export {};
@@ -0,0 +1,63 @@
1
+ /** Plan 108 D2: how far API callers may search the tenant's read model. */
2
+ export declare const API_SEARCH_LEVELS: readonly ["off", "words", "meaning"];
3
+ export type ApiSearch = (typeof API_SEARCH_LEVELS)[number];
4
+ /** A tenant without a level searches at full level; the operator opts it out in Manage. */
5
+ export declare const DEFAULT_API_SEARCH: ApiSearch;
6
+ /** Public tenant record from Management's `tenants:resolveTenantByHost` (never secrets). */
7
+ export type PublicTenant = {
8
+ slug: string;
9
+ displayName: string;
10
+ convexUrl: string;
11
+ convexSiteUrl: string;
12
+ status: "active" | "disabled";
13
+ /** Missing means {@link DEFAULT_API_SEARCH}. */
14
+ apiSearch?: ApiSearch;
15
+ };
16
+ /**
17
+ * Management's public host → tenant query. It lives on the separately
18
+ * configured Management deployment, so tenant apps cannot use their own
19
+ * generated `api`; keep the cross-deployment name explicit here.
20
+ */
21
+ export declare const resolveTenantByHostRef: import("convex/server").FunctionReference<"query", "public", {
22
+ host: string;
23
+ }, PublicTenant | null, string | undefined>;
24
+ export type StudioBootEnv = {
25
+ host: string;
26
+ managementConvexUrl?: string;
27
+ };
28
+ export type StudioBootPlan = {
29
+ mode: "management";
30
+ host: string;
31
+ slug: string;
32
+ managementConvexUrl: string;
33
+ } | {
34
+ mode: "error";
35
+ code: "missing_config" | "not_a_tenant_host";
36
+ message: string;
37
+ };
38
+ /**
39
+ * Studio always resolves its tenant through Management (plan 044 P20).
40
+ * Does not call the network — the caller still needs resolveTenantByHost.
41
+ */
42
+ export declare function planStudioBoot(env: StudioBootEnv): StudioBootPlan;
43
+ export type StudioHardGateReason = "unknown" | "disabled" | "resolve_failed" | "config";
44
+ export type StudioBootResult = {
45
+ ok: true;
46
+ convexUrl: string;
47
+ convexSiteUrl: string;
48
+ source: "management";
49
+ slug?: string;
50
+ displayName?: string;
51
+ } | {
52
+ ok: false;
53
+ reason: StudioHardGateReason;
54
+ message: string;
55
+ slug?: string;
56
+ displayName?: string;
57
+ };
58
+ /**
59
+ * Guest share URLs (`/s/{token}`) must open the Convex WebSocket without a JWT.
60
+ * `expectAuth: true` pauses the socket until `setAuth`, which never runs for
61
+ * anonymous recipients — they stay stuck on "Opening secure link…".
62
+ */
63
+ export declare function shouldExpectConvexAuth(pathname: string): boolean;
@@ -0,0 +1,25 @@
1
+ import { type ApiTableAccess } from "./apiProfile.ts";
2
+ import { type SyncMembershipOp, type SyncRowSnapshot } from "./syncClampMembership.ts";
3
+ export type SyncChannel = "record" | "asset";
4
+ /** One row change as the host reports it to Sync; snapshots drive clamp membership. */
5
+ export type RecordChange = {
6
+ table: string;
7
+ documentId: string;
8
+ op: SyncMembershipOp;
9
+ before?: SyncRowSnapshot;
10
+ after?: SyncRowSnapshot;
11
+ };
12
+ /** Two changes to one row in one transaction: the first `before`, the last `after` and `op`. */
13
+ export declare function mergeRecordChange(prev: RecordChange | undefined, next: RecordChange): RecordChange;
14
+ /** The Sync drain channel for a table. Media is not a special case at each call site. */
15
+ export declare function syncChannelForTable(table: string): SyncChannel;
16
+ /** Outbox op for one profile after a host mutation. */
17
+ export declare function resolveChannelMembershipOp(args: {
18
+ table: string;
19
+ tableAccess: ApiTableAccess[] | undefined;
20
+ requestedOp: SyncMembershipOp;
21
+ before: SyncRowSnapshot;
22
+ after: SyncRowSnapshot;
23
+ }): SyncMembershipOp | null;
24
+ /** Whether a live row belongs on a resync page for this table's channel. */
25
+ export declare function documentMatchesSyncChannel(doc: Record<string, unknown>, table: string, tableAccess: ApiTableAccess[] | undefined): boolean;
@@ -0,0 +1,22 @@
1
+ import type { ApiTableAccess } from "./apiProfile.ts";
2
+ import type { Condition } from "./queryTypes.ts";
3
+ /** Sync change after host membership resolution (null = suppress for this profile). */
4
+ export type SyncMembershipOp = "upsert" | "delete";
5
+ export type SyncRowSnapshot = Record<string, unknown> | null | undefined;
6
+ /**
7
+ * Clamp predicates that gate webhook Sync membership for a table.
8
+ * Empty / missing → unrestricted (all rows in the syncing table).
9
+ * Sync ignores clamp `order` (Read/list defaults only).
10
+ */
11
+ export declare function syncClampPredicates(tableAccess: ApiTableAccess[] | undefined, table: string): Condition[];
12
+ export declare function documentMatchesSyncClamp(doc: Record<string, unknown> | null | undefined, predicates: Condition[]): boolean;
13
+ /**
14
+ * Resolve the outbox op for one profile after a host row mutation.
15
+ * See plan 046 grill lock (leave → delete; hard-delete outside clamp → suppress).
16
+ */
17
+ export declare function resolveSyncMembershipOp(args: {
18
+ predicates: Condition[];
19
+ before: SyncRowSnapshot;
20
+ after: SyncRowSnapshot;
21
+ requestedOp: SyncMembershipOp;
22
+ }): SyncMembershipOp | null;