@mog-sdk/spreadsheet-contracts 0.1.12

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 (701) hide show
  1. package/dist/accessibility/index.d.ts +9 -0
  2. package/dist/accessibility/index.d.ts.map +1 -0
  3. package/dist/accessibility/types.d.ts +75 -0
  4. package/dist/accessibility/types.d.ts.map +1 -0
  5. package/dist/actions/comments.d.ts +31 -0
  6. package/dist/actions/comments.d.ts.map +1 -0
  7. package/dist/actions/index.d.ts +22 -0
  8. package/dist/actions/index.d.ts.map +1 -0
  9. package/dist/actions/types.d.ts +448 -0
  10. package/dist/actions/types.d.ts.map +1 -0
  11. package/dist/actors/chart.d.ts +88 -0
  12. package/dist/actors/chart.d.ts.map +1 -0
  13. package/dist/actors/clipboard.d.ts +243 -0
  14. package/dist/actors/clipboard.d.ts.map +1 -0
  15. package/dist/actors/commands.d.ts +1343 -0
  16. package/dist/actors/commands.d.ts.map +1 -0
  17. package/dist/actors/comment.d.ts +84 -0
  18. package/dist/actors/comment.d.ts.map +1 -0
  19. package/dist/actors/draw-border.d.ts +89 -0
  20. package/dist/actors/draw-border.d.ts.map +1 -0
  21. package/dist/actors/editor.d.ts +161 -0
  22. package/dist/actors/editor.d.ts.map +1 -0
  23. package/dist/actors/find-replace.d.ts +88 -0
  24. package/dist/actors/find-replace.d.ts.map +1 -0
  25. package/dist/actors/focus.d.ts +91 -0
  26. package/dist/actors/focus.d.ts.map +1 -0
  27. package/dist/actors/index.d.ts +88 -0
  28. package/dist/actors/index.d.ts.map +1 -0
  29. package/dist/actors/input.d.ts +98 -0
  30. package/dist/actors/input.d.ts.map +1 -0
  31. package/dist/actors/object-interaction.d.ts +163 -0
  32. package/dist/actors/object-interaction.d.ts.map +1 -0
  33. package/dist/actors/object.d.ts +124 -0
  34. package/dist/actors/object.d.ts.map +1 -0
  35. package/dist/actors/page-break.d.ts +64 -0
  36. package/dist/actors/page-break.d.ts.map +1 -0
  37. package/dist/actors/pane-focus.d.ts +56 -0
  38. package/dist/actors/pane-focus.d.ts.map +1 -0
  39. package/dist/actors/renderer.d.ts +197 -0
  40. package/dist/actors/renderer.d.ts.map +1 -0
  41. package/dist/actors/selection.d.ts +170 -0
  42. package/dist/actors/selection.d.ts.map +1 -0
  43. package/dist/actors/slicer.d.ts +175 -0
  44. package/dist/actors/slicer.d.ts.map +1 -0
  45. package/dist/actors/smartart.d.ts +48 -0
  46. package/dist/actors/smartart.d.ts.map +1 -0
  47. package/dist/api/index.d.ts +19 -0
  48. package/dist/api/index.d.ts.map +1 -0
  49. package/dist/api/mutation-receipt.d.ts +26 -0
  50. package/dist/api/mutation-receipt.d.ts.map +1 -0
  51. package/dist/api/types.d.ts +1542 -0
  52. package/dist/api/types.d.ts.map +1 -0
  53. package/dist/api/workbook/history.d.ts +43 -0
  54. package/dist/api/workbook/history.d.ts.map +1 -0
  55. package/dist/api/workbook/index.d.ts +17 -0
  56. package/dist/api/workbook/index.d.ts.map +1 -0
  57. package/dist/api/workbook/names.d.ts +104 -0
  58. package/dist/api/workbook/names.d.ts.map +1 -0
  59. package/dist/api/workbook/notifications.d.ts +35 -0
  60. package/dist/api/workbook/notifications.d.ts.map +1 -0
  61. package/dist/api/workbook/protection.d.ts +14 -0
  62. package/dist/api/workbook/protection.d.ts.map +1 -0
  63. package/dist/api/workbook/scenarios.d.ts +45 -0
  64. package/dist/api/workbook/scenarios.d.ts.map +1 -0
  65. package/dist/api/workbook/sheets.d.ts +74 -0
  66. package/dist/api/workbook/sheets.d.ts.map +1 -0
  67. package/dist/api/workbook/slicers.d.ts +63 -0
  68. package/dist/api/workbook/slicers.d.ts.map +1 -0
  69. package/dist/api/workbook/styles.d.ts +19 -0
  70. package/dist/api/workbook/styles.d.ts.map +1 -0
  71. package/dist/api/workbook/theme.d.ts +38 -0
  72. package/dist/api/workbook/theme.d.ts.map +1 -0
  73. package/dist/api/workbook/viewport.d.ts +85 -0
  74. package/dist/api/workbook/viewport.d.ts.map +1 -0
  75. package/dist/api/workbook.d.ts +279 -0
  76. package/dist/api/workbook.d.ts.map +1 -0
  77. package/dist/api/worksheet/bindings.d.ts +66 -0
  78. package/dist/api/worksheet/bindings.d.ts.map +1 -0
  79. package/dist/api/worksheet/changes.d.ts +60 -0
  80. package/dist/api/worksheet/changes.d.ts.map +1 -0
  81. package/dist/api/worksheet/charts.d.ts +83 -0
  82. package/dist/api/worksheet/charts.d.ts.map +1 -0
  83. package/dist/api/worksheet/collections/connector-collection.d.ts +7 -0
  84. package/dist/api/worksheet/collections/connector-collection.d.ts.map +1 -0
  85. package/dist/api/worksheet/collections/drawing-collection.d.ts +9 -0
  86. package/dist/api/worksheet/collections/drawing-collection.d.ts.map +1 -0
  87. package/dist/api/worksheet/collections/equation-collection.d.ts +8 -0
  88. package/dist/api/worksheet/collections/equation-collection.d.ts.map +1 -0
  89. package/dist/api/worksheet/collections/index.d.ts +12 -0
  90. package/dist/api/worksheet/collections/index.d.ts.map +1 -0
  91. package/dist/api/worksheet/collections/object-collection.d.ts +45 -0
  92. package/dist/api/worksheet/collections/object-collection.d.ts.map +1 -0
  93. package/dist/api/worksheet/collections/picture-collection.d.ts +8 -0
  94. package/dist/api/worksheet/collections/picture-collection.d.ts.map +1 -0
  95. package/dist/api/worksheet/collections/shape-collection.d.ts +8 -0
  96. package/dist/api/worksheet/collections/shape-collection.d.ts.map +1 -0
  97. package/dist/api/worksheet/collections/textbox-collection.d.ts +8 -0
  98. package/dist/api/worksheet/collections/textbox-collection.d.ts.map +1 -0
  99. package/dist/api/worksheet/collections/wordart-collection.d.ts +8 -0
  100. package/dist/api/worksheet/collections/wordart-collection.d.ts.map +1 -0
  101. package/dist/api/worksheet/comments.d.ts +143 -0
  102. package/dist/api/worksheet/comments.d.ts.map +1 -0
  103. package/dist/api/worksheet/conditional-formats.d.ts +101 -0
  104. package/dist/api/worksheet/conditional-formats.d.ts.map +1 -0
  105. package/dist/api/worksheet/filters.d.ts +141 -0
  106. package/dist/api/worksheet/filters.d.ts.map +1 -0
  107. package/dist/api/worksheet/form-controls.d.ts +22 -0
  108. package/dist/api/worksheet/form-controls.d.ts.map +1 -0
  109. package/dist/api/worksheet/format-mappings.d.ts +50 -0
  110. package/dist/api/worksheet/format-mappings.d.ts.map +1 -0
  111. package/dist/api/worksheet/formats.d.ts +136 -0
  112. package/dist/api/worksheet/formats.d.ts.map +1 -0
  113. package/dist/api/worksheet/handles/chart-handle.d.ts +11 -0
  114. package/dist/api/worksheet/handles/chart-handle.d.ts.map +1 -0
  115. package/dist/api/worksheet/handles/connector-handle.d.ts +9 -0
  116. package/dist/api/worksheet/handles/connector-handle.d.ts.map +1 -0
  117. package/dist/api/worksheet/handles/drawing-handle.d.ts +14 -0
  118. package/dist/api/worksheet/handles/drawing-handle.d.ts.map +1 -0
  119. package/dist/api/worksheet/handles/equation-handle.d.ts +9 -0
  120. package/dist/api/worksheet/handles/equation-handle.d.ts.map +1 -0
  121. package/dist/api/worksheet/handles/floating-object-handle.d.ts +75 -0
  122. package/dist/api/worksheet/handles/floating-object-handle.d.ts.map +1 -0
  123. package/dist/api/worksheet/handles/index.d.ts +16 -0
  124. package/dist/api/worksheet/handles/index.d.ts.map +1 -0
  125. package/dist/api/worksheet/handles/ole-object-handle.d.ts +10 -0
  126. package/dist/api/worksheet/handles/ole-object-handle.d.ts.map +1 -0
  127. package/dist/api/worksheet/handles/picture-handle.d.ts +9 -0
  128. package/dist/api/worksheet/handles/picture-handle.d.ts.map +1 -0
  129. package/dist/api/worksheet/handles/shape-handle.d.ts +11 -0
  130. package/dist/api/worksheet/handles/shape-handle.d.ts.map +1 -0
  131. package/dist/api/worksheet/handles/slicer-handle.d.ts +13 -0
  132. package/dist/api/worksheet/handles/slicer-handle.d.ts.map +1 -0
  133. package/dist/api/worksheet/handles/smartart-handle.d.ts +11 -0
  134. package/dist/api/worksheet/handles/smartart-handle.d.ts.map +1 -0
  135. package/dist/api/worksheet/handles/textbox-handle.d.ts +9 -0
  136. package/dist/api/worksheet/handles/textbox-handle.d.ts.map +1 -0
  137. package/dist/api/worksheet/handles/wordart-handle.d.ts +10 -0
  138. package/dist/api/worksheet/handles/wordart-handle.d.ts.map +1 -0
  139. package/dist/api/worksheet/hyperlinks.d.ts +52 -0
  140. package/dist/api/worksheet/hyperlinks.d.ts.map +1 -0
  141. package/dist/api/worksheet/index.d.ts +35 -0
  142. package/dist/api/worksheet/index.d.ts.map +1 -0
  143. package/dist/api/worksheet/internal.d.ts +105 -0
  144. package/dist/api/worksheet/internal.d.ts.map +1 -0
  145. package/dist/api/worksheet/layout.d.ts +150 -0
  146. package/dist/api/worksheet/layout.d.ts.map +1 -0
  147. package/dist/api/worksheet/names.d.ts +52 -0
  148. package/dist/api/worksheet/names.d.ts.map +1 -0
  149. package/dist/api/worksheet/objects.d.ts +124 -0
  150. package/dist/api/worksheet/objects.d.ts.map +1 -0
  151. package/dist/api/worksheet/outline.d.ts +101 -0
  152. package/dist/api/worksheet/outline.d.ts.map +1 -0
  153. package/dist/api/worksheet/pivots.d.ts +257 -0
  154. package/dist/api/worksheet/pivots.d.ts.map +1 -0
  155. package/dist/api/worksheet/print.d.ts +108 -0
  156. package/dist/api/worksheet/print.d.ts.map +1 -0
  157. package/dist/api/worksheet/protection.d.ts +73 -0
  158. package/dist/api/worksheet/protection.d.ts.map +1 -0
  159. package/dist/api/worksheet/settings.d.ts +54 -0
  160. package/dist/api/worksheet/settings.d.ts.map +1 -0
  161. package/dist/api/worksheet/slicers.d.ts +101 -0
  162. package/dist/api/worksheet/slicers.d.ts.map +1 -0
  163. package/dist/api/worksheet/smartart.d.ts +49 -0
  164. package/dist/api/worksheet/smartart.d.ts.map +1 -0
  165. package/dist/api/worksheet/sparklines.d.ts +143 -0
  166. package/dist/api/worksheet/sparklines.d.ts.map +1 -0
  167. package/dist/api/worksheet/structure.d.ts +44 -0
  168. package/dist/api/worksheet/structure.d.ts.map +1 -0
  169. package/dist/api/worksheet/tables.d.ts +313 -0
  170. package/dist/api/worksheet/tables.d.ts.map +1 -0
  171. package/dist/api/worksheet/validation.d.ts +101 -0
  172. package/dist/api/worksheet/validation.d.ts.map +1 -0
  173. package/dist/api/worksheet/view.d.ts +91 -0
  174. package/dist/api/worksheet/view.d.ts.map +1 -0
  175. package/dist/api/worksheet.d.ts +370 -0
  176. package/dist/api/worksheet.d.ts.map +1 -0
  177. package/dist/app/index.d.ts +17 -0
  178. package/dist/app/index.d.ts.map +1 -0
  179. package/dist/app/types.d.ts +349 -0
  180. package/dist/app/types.d.ts.map +1 -0
  181. package/dist/apps/api.d.ts +519 -0
  182. package/dist/apps/api.d.ts.map +1 -0
  183. package/dist/apps/bindings.d.ts +72 -0
  184. package/dist/apps/bindings.d.ts.map +1 -0
  185. package/dist/apps/index.d.ts +13 -0
  186. package/dist/apps/index.d.ts.map +1 -0
  187. package/dist/apps/types.d.ts +224 -0
  188. package/dist/apps/types.d.ts.map +1 -0
  189. package/dist/apps/views.d.ts +142 -0
  190. package/dist/apps/views.d.ts.map +1 -0
  191. package/dist/bridges/chart-bridge.d.ts +172 -0
  192. package/dist/bridges/chart-bridge.d.ts.map +1 -0
  193. package/dist/bridges/equation-bridge.d.ts +74 -0
  194. package/dist/bridges/equation-bridge.d.ts.map +1 -0
  195. package/dist/bridges/index.d.ts +25 -0
  196. package/dist/bridges/index.d.ts.map +1 -0
  197. package/dist/bridges/ink-recognition-bridge.d.ts +142 -0
  198. package/dist/bridges/ink-recognition-bridge.d.ts.map +1 -0
  199. package/dist/bridges/locale-bridge.d.ts +93 -0
  200. package/dist/bridges/locale-bridge.d.ts.map +1 -0
  201. package/dist/bridges/pivot-bridge.d.ts +201 -0
  202. package/dist/bridges/pivot-bridge.d.ts.map +1 -0
  203. package/dist/bridges/schema-bridge.d.ts +137 -0
  204. package/dist/bridges/schema-bridge.d.ts.map +1 -0
  205. package/dist/bridges/smartart-bridge.d.ts +217 -0
  206. package/dist/bridges/smartart-bridge.d.ts.map +1 -0
  207. package/dist/bridges/wordart-bridge.d.ts +86 -0
  208. package/dist/bridges/wordart-bridge.d.ts.map +1 -0
  209. package/dist/capabilities/errors.d.ts +16 -0
  210. package/dist/capabilities/errors.d.ts.map +1 -0
  211. package/dist/capabilities/gated-api.d.ts +355 -0
  212. package/dist/capabilities/gated-api.d.ts.map +1 -0
  213. package/dist/capabilities/grants.d.ts +239 -0
  214. package/dist/capabilities/grants.d.ts.map +1 -0
  215. package/dist/capabilities/index.d.ts +24 -0
  216. package/dist/capabilities/index.d.ts.map +1 -0
  217. package/dist/capabilities/manifest.d.ts +128 -0
  218. package/dist/capabilities/manifest.d.ts.map +1 -0
  219. package/dist/capabilities/requester.d.ts +209 -0
  220. package/dist/capabilities/requester.d.ts.map +1 -0
  221. package/dist/capabilities/scope.d.ts +55 -0
  222. package/dist/capabilities/scope.d.ts.map +1 -0
  223. package/dist/capabilities/sensitive.d.ts +279 -0
  224. package/dist/capabilities/sensitive.d.ts.map +1 -0
  225. package/dist/capabilities/taxonomy.d.ts +15 -0
  226. package/dist/capabilities/taxonomy.d.ts.map +1 -0
  227. package/dist/capabilities/types.d.ts +91 -0
  228. package/dist/capabilities/types.d.ts.map +1 -0
  229. package/dist/cells/cell-identity.d.ts +281 -0
  230. package/dist/cells/cell-identity.d.ts.map +1 -0
  231. package/dist/cells/cell-style.d.ts +67 -0
  232. package/dist/cells/cell-style.d.ts.map +1 -0
  233. package/dist/cells/formula-string.d.ts +37 -0
  234. package/dist/cells/formula-string.d.ts.map +1 -0
  235. package/dist/cells/index.d.ts +7 -0
  236. package/dist/cells/index.d.ts.map +1 -0
  237. package/dist/cells/range-ref.d.ts +77 -0
  238. package/dist/cells/range-ref.d.ts.map +1 -0
  239. package/dist/cells/rich-text.d.ts +66 -0
  240. package/dist/cells/rich-text.d.ts.map +1 -0
  241. package/dist/cells/spill.d.ts +121 -0
  242. package/dist/cells/spill.d.ts.map +1 -0
  243. package/dist/conditional-format/index.d.ts +11 -0
  244. package/dist/conditional-format/index.d.ts.map +1 -0
  245. package/dist/conditional-format/presets.d.ts +54 -0
  246. package/dist/conditional-format/presets.d.ts.map +1 -0
  247. package/dist/conditional-format/range-utils.d.ts +11 -0
  248. package/dist/conditional-format/range-utils.d.ts.map +1 -0
  249. package/dist/conditional-format/render-types.d.ts +80 -0
  250. package/dist/conditional-format/render-types.d.ts.map +1 -0
  251. package/dist/connections/api-errors.d.ts +29 -0
  252. package/dist/connections/api-errors.d.ts.map +1 -0
  253. package/dist/connections/api.d.ts +879 -0
  254. package/dist/connections/api.d.ts.map +1 -0
  255. package/dist/connections/database-bridge-types.d.ts +108 -0
  256. package/dist/connections/database-bridge-types.d.ts.map +1 -0
  257. package/dist/connections/index.d.ts +5 -0
  258. package/dist/connections/index.d.ts.map +1 -0
  259. package/dist/connections/power-query.d.ts +1 -0
  260. package/dist/connections/power-query.d.ts.map +1 -0
  261. package/dist/connections/query.d.ts +144 -0
  262. package/dist/connections/query.d.ts.map +1 -0
  263. package/dist/context-menu/index.d.ts +10 -0
  264. package/dist/context-menu/index.d.ts.map +1 -0
  265. package/dist/context-menu/types.d.ts +28 -0
  266. package/dist/context-menu/types.d.ts.map +1 -0
  267. package/dist/core/commands.d.ts +143 -0
  268. package/dist/core/commands.d.ts.map +1 -0
  269. package/dist/core/core.d.ts +943 -0
  270. package/dist/core/core.d.ts.map +1 -0
  271. package/dist/core/disposable.d.ts +30 -0
  272. package/dist/core/disposable.d.ts.map +1 -0
  273. package/dist/core/event-base.d.ts +31 -0
  274. package/dist/core/event-base.d.ts.map +1 -0
  275. package/dist/core/execution.d.ts +79 -0
  276. package/dist/core/execution.d.ts.map +1 -0
  277. package/dist/core/formatted-text.d.ts +8 -0
  278. package/dist/core/formatted-text.d.ts.map +1 -0
  279. package/dist/core/index.d.ts +10 -0
  280. package/dist/core/index.d.ts.map +1 -0
  281. package/dist/core/result.d.ts +23 -0
  282. package/dist/core/result.d.ts.map +1 -0
  283. package/dist/core/schema.d.ts +360 -0
  284. package/dist/core/schema.d.ts.map +1 -0
  285. package/dist/core/testing.d.ts +309 -0
  286. package/dist/core/testing.d.ts.map +1 -0
  287. package/dist/culture/index.d.ts +11 -0
  288. package/dist/culture/index.d.ts.map +1 -0
  289. package/dist/culture/types.d.ts +320 -0
  290. package/dist/culture/types.d.ts.map +1 -0
  291. package/dist/data/charts.d.ts +412 -0
  292. package/dist/data/charts.d.ts.map +1 -0
  293. package/dist/data/conditional-format.d.ts +188 -0
  294. package/dist/data/conditional-format.d.ts.map +1 -0
  295. package/dist/data/filter.d.ts +364 -0
  296. package/dist/data/filter.d.ts.map +1 -0
  297. package/dist/data/grouping.d.ts +170 -0
  298. package/dist/data/grouping.d.ts.map +1 -0
  299. package/dist/data/index.d.ts +12 -0
  300. package/dist/data/index.d.ts.map +1 -0
  301. package/dist/data/named-ranges.d.ts +104 -0
  302. package/dist/data/named-ranges.d.ts.map +1 -0
  303. package/dist/data/pivot.d.ts +68 -0
  304. package/dist/data/pivot.d.ts.map +1 -0
  305. package/dist/data/slicers.d.ts +417 -0
  306. package/dist/data/slicers.d.ts.map +1 -0
  307. package/dist/data/sorting.d.ts +172 -0
  308. package/dist/data/sorting.d.ts.map +1 -0
  309. package/dist/data/sparklines.d.ts +358 -0
  310. package/dist/data/sparklines.d.ts.map +1 -0
  311. package/dist/data/tables.d.ts +333 -0
  312. package/dist/data/tables.d.ts.map +1 -0
  313. package/dist/data/trace-arrows.d.ts +165 -0
  314. package/dist/data/trace-arrows.d.ts.map +1 -0
  315. package/dist/diagnostics/core.d.ts +219 -0
  316. package/dist/diagnostics/core.d.ts.map +1 -0
  317. package/dist/diagnostics/index.d.ts +9 -0
  318. package/dist/diagnostics/index.d.ts.map +1 -0
  319. package/dist/diagnostics/style.d.ts +196 -0
  320. package/dist/diagnostics/style.d.ts.map +1 -0
  321. package/dist/document/comments.d.ts +109 -0
  322. package/dist/document/comments.d.ts.map +1 -0
  323. package/dist/document/document.d.ts +182 -0
  324. package/dist/document/document.d.ts.map +1 -0
  325. package/dist/document/index.d.ts +5 -0
  326. package/dist/document/index.d.ts.map +1 -0
  327. package/dist/document/protection.d.ts +114 -0
  328. package/dist/document/protection.d.ts.map +1 -0
  329. package/dist/document/search.d.ts +202 -0
  330. package/dist/document/search.d.ts.map +1 -0
  331. package/dist/drawing/index.d.ts +8 -0
  332. package/dist/drawing/index.d.ts.map +1 -0
  333. package/dist/drawing/three-d.d.ts +171 -0
  334. package/dist/drawing/three-d.d.ts.map +1 -0
  335. package/dist/editor/drag.d.ts +178 -0
  336. package/dist/editor/drag.d.ts.map +1 -0
  337. package/dist/editor/editor.d.ts +59 -0
  338. package/dist/editor/editor.d.ts.map +1 -0
  339. package/dist/editor/form-controls.d.ts +428 -0
  340. package/dist/editor/form-controls.d.ts.map +1 -0
  341. package/dist/editor/index.d.ts +4 -0
  342. package/dist/editor/index.d.ts.map +1 -0
  343. package/dist/equation/errors.d.ts +19 -0
  344. package/dist/equation/errors.d.ts.map +1 -0
  345. package/dist/equation/index.d.ts +12 -0
  346. package/dist/equation/index.d.ts.map +1 -0
  347. package/dist/equation/omml-ast.d.ts +358 -0
  348. package/dist/equation/omml-ast.d.ts.map +1 -0
  349. package/dist/equation/templates.d.ts +26 -0
  350. package/dist/equation/templates.d.ts.map +1 -0
  351. package/dist/equation/types.d.ts +87 -0
  352. package/dist/equation/types.d.ts.map +1 -0
  353. package/dist/events/canvas-object-events.d.ts +31 -0
  354. package/dist/events/canvas-object-events.d.ts.map +1 -0
  355. package/dist/events/cell-events.d.ts +60 -0
  356. package/dist/events/cell-events.d.ts.map +1 -0
  357. package/dist/events/chart-events.d.ts +61 -0
  358. package/dist/events/chart-events.d.ts.map +1 -0
  359. package/dist/events/comment-events.d.ts +43 -0
  360. package/dist/events/comment-events.d.ts.map +1 -0
  361. package/dist/events/conditional-formatting-events.d.ts +40 -0
  362. package/dist/events/conditional-formatting-events.d.ts.map +1 -0
  363. package/dist/events/data-tools-events.d.ts +29 -0
  364. package/dist/events/data-tools-events.d.ts.map +1 -0
  365. package/dist/events/file-io-events.d.ts +39 -0
  366. package/dist/events/file-io-events.d.ts.map +1 -0
  367. package/dist/events/filter-events.d.ts +43 -0
  368. package/dist/events/filter-events.d.ts.map +1 -0
  369. package/dist/events/floating-object-events.d.ts +158 -0
  370. package/dist/events/floating-object-events.d.ts.map +1 -0
  371. package/dist/events/grouping-events.d.ts +75 -0
  372. package/dist/events/grouping-events.d.ts.map +1 -0
  373. package/dist/events/index.d.ts +129 -0
  374. package/dist/events/index.d.ts.map +1 -0
  375. package/dist/events/ink-collaboration-events.d.ts +57 -0
  376. package/dist/events/ink-collaboration-events.d.ts.map +1 -0
  377. package/dist/events/ink-events.d.ts +33 -0
  378. package/dist/events/ink-events.d.ts.map +1 -0
  379. package/dist/events/ink-recognition-events.d.ts +149 -0
  380. package/dist/events/ink-recognition-events.d.ts.map +1 -0
  381. package/dist/events/ink-stroke-events.d.ts +197 -0
  382. package/dist/events/ink-stroke-events.d.ts.map +1 -0
  383. package/dist/events/merge-events.d.ts +46 -0
  384. package/dist/events/merge-events.d.ts.map +1 -0
  385. package/dist/events/named-range-events.d.ts +24 -0
  386. package/dist/events/named-range-events.d.ts.map +1 -0
  387. package/dist/events/pivot-events.d.ts +47 -0
  388. package/dist/events/pivot-events.d.ts.map +1 -0
  389. package/dist/events/print-events.d.ts +75 -0
  390. package/dist/events/print-events.d.ts.map +1 -0
  391. package/dist/events/recalc-events.d.ts +20 -0
  392. package/dist/events/recalc-events.d.ts.map +1 -0
  393. package/dist/events/scenario-events.d.ts +37 -0
  394. package/dist/events/scenario-events.d.ts.map +1 -0
  395. package/dist/events/selection-events.d.ts +16 -0
  396. package/dist/events/selection-events.d.ts.map +1 -0
  397. package/dist/events/settings-events.d.ts +41 -0
  398. package/dist/events/settings-events.d.ts.map +1 -0
  399. package/dist/events/sheet-events.d.ts +68 -0
  400. package/dist/events/sheet-events.d.ts.map +1 -0
  401. package/dist/events/slicer-events.d.ts +47 -0
  402. package/dist/events/slicer-events.d.ts.map +1 -0
  403. package/dist/events/smartart-events.d.ts +222 -0
  404. package/dist/events/smartart-events.d.ts.map +1 -0
  405. package/dist/events/sparkline-events.d.ts +68 -0
  406. package/dist/events/sparkline-events.d.ts.map +1 -0
  407. package/dist/events/store-events.d.ts +18 -0
  408. package/dist/events/store-events.d.ts.map +1 -0
  409. package/dist/events/structure-events.d.ts +76 -0
  410. package/dist/events/structure-events.d.ts.map +1 -0
  411. package/dist/events/table-events.d.ts +99 -0
  412. package/dist/events/table-events.d.ts.map +1 -0
  413. package/dist/events/validation-events.d.ts +85 -0
  414. package/dist/events/validation-events.d.ts.map +1 -0
  415. package/dist/events/view-events.d.ts +72 -0
  416. package/dist/events/view-events.d.ts.map +1 -0
  417. package/dist/events/wordart-events.d.ts +169 -0
  418. package/dist/events/wordart-events.d.ts.map +1 -0
  419. package/dist/events.d.ts +41 -0
  420. package/dist/events.d.ts.map +1 -0
  421. package/dist/extensions/index.d.ts +9 -0
  422. package/dist/extensions/index.d.ts.map +1 -0
  423. package/dist/extensions/types.d.ts +64 -0
  424. package/dist/extensions/types.d.ts.map +1 -0
  425. package/dist/filesystem/index.d.ts +11 -0
  426. package/dist/filesystem/index.d.ts.map +1 -0
  427. package/dist/filesystem/paths.d.ts +38 -0
  428. package/dist/filesystem/paths.d.ts.map +1 -0
  429. package/dist/filesystem/permissions.d.ts +89 -0
  430. package/dist/filesystem/permissions.d.ts.map +1 -0
  431. package/dist/filesystem/types.d.ts +251 -0
  432. package/dist/filesystem/types.d.ts.map +1 -0
  433. package/dist/fill/custom-lists.d.ts +41 -0
  434. package/dist/fill/custom-lists.d.ts.map +1 -0
  435. package/dist/fill/index.d.ts +11 -0
  436. package/dist/fill/index.d.ts.map +1 -0
  437. package/dist/fill/types.d.ts +102 -0
  438. package/dist/fill/types.d.ts.map +1 -0
  439. package/dist/formatting/format-registry.d.ts +45 -0
  440. package/dist/formatting/format-registry.d.ts.map +1 -0
  441. package/dist/formatting/index.d.ts +9 -0
  442. package/dist/formatting/index.d.ts.map +1 -0
  443. package/dist/formatting/theme.d.ts +108 -0
  444. package/dist/formatting/theme.d.ts.map +1 -0
  445. package/dist/index.d.ts +49 -0
  446. package/dist/index.d.ts.map +1 -0
  447. package/dist/ink/index.d.ts +16 -0
  448. package/dist/ink/index.d.ts.map +1 -0
  449. package/dist/ink/spatial-index.d.ts +113 -0
  450. package/dist/ink/spatial-index.d.ts.map +1 -0
  451. package/dist/ink/types.d.ts +558 -0
  452. package/dist/ink/types.d.ts.map +1 -0
  453. package/dist/kernel/floating-object-manager.d.ts +68 -0
  454. package/dist/kernel/floating-object-manager.d.ts.map +1 -0
  455. package/dist/kernel/index.d.ts +12 -0
  456. package/dist/kernel/index.d.ts.map +1 -0
  457. package/dist/kernel/kernel-context.d.ts +129 -0
  458. package/dist/kernel/kernel-context.d.ts.map +1 -0
  459. package/dist/keyboard/actions.d.ts +328 -0
  460. package/dist/keyboard/actions.d.ts.map +1 -0
  461. package/dist/keyboard/binding-utils.d.ts +112 -0
  462. package/dist/keyboard/binding-utils.d.ts.map +1 -0
  463. package/dist/keyboard/customization.d.ts +121 -0
  464. package/dist/keyboard/customization.d.ts.map +1 -0
  465. package/dist/keyboard/display-utils.d.ts +9 -0
  466. package/dist/keyboard/display-utils.d.ts.map +1 -0
  467. package/dist/keyboard/excel-reference.d.ts +28 -0
  468. package/dist/keyboard/excel-reference.d.ts.map +1 -0
  469. package/dist/keyboard/index.d.ts +16 -0
  470. package/dist/keyboard/index.d.ts.map +1 -0
  471. package/dist/keyboard/input.d.ts +124 -0
  472. package/dist/keyboard/input.d.ts.map +1 -0
  473. package/dist/keyboard/physical-keys.d.ts +79 -0
  474. package/dist/keyboard/physical-keys.d.ts.map +1 -0
  475. package/dist/keyboard/shortcuts/definitions/index.d.ts +10 -0
  476. package/dist/keyboard/shortcuts/definitions/index.d.ts.map +1 -0
  477. package/dist/keyboard/shortcuts/types.d.ts +347 -0
  478. package/dist/keyboard/shortcuts/types.d.ts.map +1 -0
  479. package/dist/machines/index.d.ts +12 -0
  480. package/dist/machines/index.d.ts.map +1 -0
  481. package/dist/machines/snapshots.d.ts +160 -0
  482. package/dist/machines/snapshots.d.ts.map +1 -0
  483. package/dist/machines/types.d.ts +64 -0
  484. package/dist/machines/types.d.ts.map +1 -0
  485. package/dist/number-formats/constants.d.ts +39 -0
  486. package/dist/number-formats/constants.d.ts.map +1 -0
  487. package/dist/number-formats/index.d.ts +14 -0
  488. package/dist/number-formats/index.d.ts.map +1 -0
  489. package/dist/number-formats/locale/index.d.ts +5 -0
  490. package/dist/number-formats/locale/index.d.ts.map +1 -0
  491. package/dist/number-formats/locale/locale-defaults.d.ts +17 -0
  492. package/dist/number-formats/locale/locale-defaults.d.ts.map +1 -0
  493. package/dist/number-formats/registry.d.ts +52 -0
  494. package/dist/number-formats/registry.d.ts.map +1 -0
  495. package/dist/number-formats/types.d.ts +134 -0
  496. package/dist/number-formats/types.d.ts.map +1 -0
  497. package/dist/objects/canvas-object.d.ts +157 -0
  498. package/dist/objects/canvas-object.d.ts.map +1 -0
  499. package/dist/objects/drawing-object.d.ts +144 -0
  500. package/dist/objects/drawing-object.d.ts.map +1 -0
  501. package/dist/objects/floating-objects.d.ts +742 -0
  502. package/dist/objects/floating-objects.d.ts.map +1 -0
  503. package/dist/objects/index.d.ts +5 -0
  504. package/dist/objects/index.d.ts.map +1 -0
  505. package/dist/objects/object-bounds-reader.d.ts +25 -0
  506. package/dist/objects/object-bounds-reader.d.ts.map +1 -0
  507. package/dist/objects/object-mutator.d.ts +30 -0
  508. package/dist/objects/object-mutator.d.ts.map +1 -0
  509. package/dist/performance/index.d.ts +8 -0
  510. package/dist/performance/index.d.ts.map +1 -0
  511. package/dist/performance/profiler-types.d.ts +351 -0
  512. package/dist/performance/profiler-types.d.ts.map +1 -0
  513. package/dist/platform/identity.d.ts +24 -0
  514. package/dist/platform/identity.d.ts.map +1 -0
  515. package/dist/platform/index.d.ts +17 -0
  516. package/dist/platform/index.d.ts.map +1 -0
  517. package/dist/platform/types.d.ts +359 -0
  518. package/dist/platform/types.d.ts.map +1 -0
  519. package/dist/rendering/canvas-bridge-types.d.ts +68 -0
  520. package/dist/rendering/canvas-bridge-types.d.ts.map +1 -0
  521. package/dist/rendering/constants.d.ts +76 -0
  522. package/dist/rendering/constants.d.ts.map +1 -0
  523. package/dist/rendering/coordinates.d.ts +452 -0
  524. package/dist/rendering/coordinates.d.ts.map +1 -0
  525. package/dist/rendering/coordinator-interfaces.d.ts +163 -0
  526. package/dist/rendering/coordinator-interfaces.d.ts.map +1 -0
  527. package/dist/rendering/data-sources.d.ts +372 -0
  528. package/dist/rendering/data-sources.d.ts.map +1 -0
  529. package/dist/rendering/grid-region.d.ts +32 -0
  530. package/dist/rendering/grid-region.d.ts.map +1 -0
  531. package/dist/rendering/grid-renderer.d.ts +391 -0
  532. package/dist/rendering/grid-renderer.d.ts.map +1 -0
  533. package/dist/rendering/grouping.d.ts +21 -0
  534. package/dist/rendering/grouping.d.ts.map +1 -0
  535. package/dist/rendering/hit-test-service.d.ts +58 -0
  536. package/dist/rendering/hit-test-service.d.ts.map +1 -0
  537. package/dist/rendering/hit-test.d.ts +223 -0
  538. package/dist/rendering/hit-test.d.ts.map +1 -0
  539. package/dist/rendering/index.d.ts +25 -0
  540. package/dist/rendering/index.d.ts.map +1 -0
  541. package/dist/rendering/interactive-elements.d.ts +121 -0
  542. package/dist/rendering/interactive-elements.d.ts.map +1 -0
  543. package/dist/rendering/primitives.d.ts +17 -0
  544. package/dist/rendering/primitives.d.ts.map +1 -0
  545. package/dist/rendering/render-context.d.ts +457 -0
  546. package/dist/rendering/render-context.d.ts.map +1 -0
  547. package/dist/rendering/text-measurement-service.d.ts +197 -0
  548. package/dist/rendering/text-measurement-service.d.ts.map +1 -0
  549. package/dist/ribbon/collapse-configs.d.ts +298 -0
  550. package/dist/ribbon/collapse-configs.d.ts.map +1 -0
  551. package/dist/ribbon/collapse-types.d.ts +76 -0
  552. package/dist/ribbon/collapse-types.d.ts.map +1 -0
  553. package/dist/ribbon/index.d.ts +25 -0
  554. package/dist/ribbon/index.d.ts.map +1 -0
  555. package/dist/selection/index.d.ts +10 -0
  556. package/dist/selection/index.d.ts.map +1 -0
  557. package/dist/selection/registry.d.ts +17 -0
  558. package/dist/selection/registry.d.ts.map +1 -0
  559. package/dist/selection/types.d.ts +82 -0
  560. package/dist/selection/types.d.ts.map +1 -0
  561. package/dist/selectors/index.d.ts +8 -0
  562. package/dist/selectors/index.d.ts.map +1 -0
  563. package/dist/selectors/smart-art.d.ts +58 -0
  564. package/dist/selectors/smart-art.d.ts.map +1 -0
  565. package/dist/services/index.d.ts +273 -0
  566. package/dist/services/index.d.ts.map +1 -0
  567. package/dist/smartart/index.d.ts +26 -0
  568. package/dist/smartart/index.d.ts.map +1 -0
  569. package/dist/smartart/layouts.d.ts +193 -0
  570. package/dist/smartart/layouts.d.ts.map +1 -0
  571. package/dist/smartart/ooxml-algorithm-types.d.ts +939 -0
  572. package/dist/smartart/ooxml-algorithm-types.d.ts.map +1 -0
  573. package/dist/smartart/ooxml-data-model-types.d.ts +845 -0
  574. package/dist/smartart/ooxml-data-model-types.d.ts.map +1 -0
  575. package/dist/smartart/ooxml-drawing-types.d.ts +356 -0
  576. package/dist/smartart/ooxml-drawing-types.d.ts.map +1 -0
  577. package/dist/smartart/ooxml-engine-types.d.ts +873 -0
  578. package/dist/smartart/ooxml-engine-types.d.ts.map +1 -0
  579. package/dist/smartart/ooxml-layout-types.d.ts +405 -0
  580. package/dist/smartart/ooxml-layout-types.d.ts.map +1 -0
  581. package/dist/smartart/ooxml-style-types.d.ts +474 -0
  582. package/dist/smartart/ooxml-style-types.d.ts.map +1 -0
  583. package/dist/smartart/styles.d.ts +137 -0
  584. package/dist/smartart/styles.d.ts.map +1 -0
  585. package/dist/smartart/types.d.ts +323 -0
  586. package/dist/smartart/types.d.ts.map +1 -0
  587. package/dist/storage/capabilities.d.ts +33 -0
  588. package/dist/storage/capabilities.d.ts.map +1 -0
  589. package/dist/storage/connection.d.ts +183 -0
  590. package/dist/storage/connection.d.ts.map +1 -0
  591. package/dist/storage/index.d.ts +13 -0
  592. package/dist/storage/index.d.ts.map +1 -0
  593. package/dist/storage/query.d.ts +91 -0
  594. package/dist/storage/query.d.ts.map +1 -0
  595. package/dist/storage/table-driver.d.ts +249 -0
  596. package/dist/storage/table-driver.d.ts.map +1 -0
  597. package/dist/store/cell-schema.d.ts +235 -0
  598. package/dist/store/cell-schema.d.ts.map +1 -0
  599. package/dist/store/equation-schema.d.ts +22 -0
  600. package/dist/store/equation-schema.d.ts.map +1 -0
  601. package/dist/store/index.d.ts +33 -0
  602. package/dist/store/index.d.ts.map +1 -0
  603. package/dist/store/ink-schema.d.ts +26 -0
  604. package/dist/store/ink-schema.d.ts.map +1 -0
  605. package/dist/store/scenarios-schema.d.ts +105 -0
  606. package/dist/store/scenarios-schema.d.ts.map +1 -0
  607. package/dist/store/schema-types.d.ts +113 -0
  608. package/dist/store/schema-types.d.ts.map +1 -0
  609. package/dist/store/sheet-maps-schema.d.ts +222 -0
  610. package/dist/store/sheet-maps-schema.d.ts.map +1 -0
  611. package/dist/store/sheet-meta-schema.d.ts +16 -0
  612. package/dist/store/sheet-meta-schema.d.ts.map +1 -0
  613. package/dist/store/smartart-schema.d.ts +17 -0
  614. package/dist/store/smartart-schema.d.ts.map +1 -0
  615. package/dist/store/store-types.d.ts +381 -0
  616. package/dist/store/store-types.d.ts.map +1 -0
  617. package/dist/store/wordart-schema.d.ts +13 -0
  618. package/dist/store/wordart-schema.d.ts.map +1 -0
  619. package/dist/store/workbook-schema.d.ts +16 -0
  620. package/dist/store/workbook-schema.d.ts.map +1 -0
  621. package/dist/styles/built-in-styles.d.ts +10 -0
  622. package/dist/styles/built-in-styles.d.ts.map +1 -0
  623. package/dist/styles/index.d.ts +18 -0
  624. package/dist/styles/index.d.ts.map +1 -0
  625. package/dist/utils/a1.d.ts +12 -0
  626. package/dist/utils/a1.d.ts.map +1 -0
  627. package/dist/utils/datetime.d.ts +7 -0
  628. package/dist/utils/datetime.d.ts.map +1 -0
  629. package/dist/utils/function-registry.d.ts +40 -0
  630. package/dist/utils/function-registry.d.ts.map +1 -0
  631. package/dist/utils/index.d.ts +9 -0
  632. package/dist/utils/index.d.ts.map +1 -0
  633. package/dist/utils/protection.d.ts +9 -0
  634. package/dist/utils/protection.d.ts.map +1 -0
  635. package/dist/utils/range-navigation.d.ts +9 -0
  636. package/dist/utils/range-navigation.d.ts.map +1 -0
  637. package/dist/utils/range.d.ts +9 -0
  638. package/dist/utils/range.d.ts.map +1 -0
  639. package/dist/utils/rich-text.d.ts +9 -0
  640. package/dist/utils/rich-text.d.ts.map +1 -0
  641. package/dist/viewport/geometry.d.ts +90 -0
  642. package/dist/viewport/geometry.d.ts.map +1 -0
  643. package/dist/viewport/grid-canvas.d.ts +133 -0
  644. package/dist/viewport/grid-canvas.d.ts.map +1 -0
  645. package/dist/viewport/index.d.ts +5 -0
  646. package/dist/viewport/index.d.ts.map +1 -0
  647. package/dist/viewport/viewport-config.d.ts +95 -0
  648. package/dist/viewport/viewport-config.d.ts.map +1 -0
  649. package/dist/viewport/viewport.d.ts +191 -0
  650. package/dist/viewport/viewport.d.ts.map +1 -0
  651. package/dist/views/index.d.ts +9 -0
  652. package/dist/views/index.d.ts.map +1 -0
  653. package/dist/views/types.d.ts +161 -0
  654. package/dist/views/types.d.ts.map +1 -0
  655. package/dist/what-if/index.d.ts +2 -0
  656. package/dist/what-if/index.d.ts.map +1 -0
  657. package/dist/what-if/what-if.d.ts +152 -0
  658. package/dist/what-if/what-if.d.ts.map +1 -0
  659. package/dist/window-manager/index.d.ts +134 -0
  660. package/dist/window-manager/index.d.ts.map +1 -0
  661. package/dist/wordart/effects.d.ts +611 -0
  662. package/dist/wordart/effects.d.ts.map +1 -0
  663. package/dist/wordart/index.d.ts +17 -0
  664. package/dist/wordart/index.d.ts.map +1 -0
  665. package/dist/wordart/presets.d.ts +133 -0
  666. package/dist/wordart/presets.d.ts.map +1 -0
  667. package/dist/wordart/types.d.ts +444 -0
  668. package/dist/wordart/types.d.ts.map +1 -0
  669. package/dist/workflows/context.d.ts +777 -0
  670. package/dist/workflows/context.d.ts.map +1 -0
  671. package/dist/workflows/definition.d.ts +256 -0
  672. package/dist/workflows/definition.d.ts.map +1 -0
  673. package/dist/workflows/events.d.ts +397 -0
  674. package/dist/workflows/events.d.ts.map +1 -0
  675. package/dist/workflows/index.d.ts +19 -0
  676. package/dist/workflows/index.d.ts.map +1 -0
  677. package/dist/workflows/instance.d.ts +358 -0
  678. package/dist/workflows/instance.d.ts.map +1 -0
  679. package/dist/workflows/runtime.d.ts +287 -0
  680. package/dist/workflows/runtime.d.ts.map +1 -0
  681. package/dist/workflows/triggers.d.ts +335 -0
  682. package/dist/workflows/triggers.d.ts.map +1 -0
  683. package/dist/workflows/versioning.d.ts +245 -0
  684. package/dist/workflows/versioning.d.ts.map +1 -0
  685. package/dist/xlsx-parser/conditional-format.d.ts +137 -0
  686. package/dist/xlsx-parser/conditional-format.d.ts.map +1 -0
  687. package/dist/xlsx-parser/core.d.ts +622 -0
  688. package/dist/xlsx-parser/core.d.ts.map +1 -0
  689. package/dist/xlsx-parser/data-validation.d.ts +55 -0
  690. package/dist/xlsx-parser/data-validation.d.ts.map +1 -0
  691. package/dist/xlsx-parser/errors.d.ts +38 -0
  692. package/dist/xlsx-parser/errors.d.ts.map +1 -0
  693. package/dist/xlsx-parser/index.d.ts +17 -0
  694. package/dist/xlsx-parser/index.d.ts.map +1 -0
  695. package/dist/xlsx-parser/options.d.ts +89 -0
  696. package/dist/xlsx-parser/options.d.ts.map +1 -0
  697. package/dist/xlsx-parser/styles.d.ts +157 -0
  698. package/dist/xlsx-parser/styles.d.ts.map +1 -0
  699. package/dist/xlsx-parser/table.d.ts +170 -0
  700. package/dist/xlsx-parser/table.d.ts.map +1 -0
  701. package/package.json +410 -0
@@ -0,0 +1,217 @@
1
+ /**
2
+ * SmartArt Bridge Interface
3
+ *
4
+ * Defines the contract for SmartArt diagram management and layout computation.
5
+ * This interface bridges the SmartArt system to the engine's reactive system.
6
+ *
7
+ * Features:
8
+ * - Computed layout caching (invalidated on structure/style changes)
9
+ * - Event subscriptions for reactive updates
10
+ * - Node operations (add, remove, update, move)
11
+ * - Layout and style management
12
+ *
13
+ * Architecture Notes:
14
+ * - ComputedLayout is a runtime cache, NOT persisted to storage
15
+ * - The bridge listens to EventBus for automatic cache invalidation
16
+ * - Provides ctx.smartArt.* access pattern
17
+ * - Handles serialization/deserialization between TS interfaces and storage
18
+ *
19
+ * Layout Cache Invalidation Strategy:
20
+ * - All node events trigger invalidation: node-added, node-removed, node-updated, node-moved
21
+ * - Layout/style events trigger invalidation: layout-changed, style-changed
22
+ * - Batch events trigger invalidation: nodes-batch-added, nodes-batch-removed
23
+ *
24
+ * @see contracts/src/smartart/types.ts - Core SmartArt types
25
+ * @see engine/src/state/bridges/smartart-bridge.ts - Implementation
26
+ */
27
+ import type { ComputedLayout, NodeId, SmartArtDiagram, SmartArtNode } from '../smartart/types';
28
+ import type { NodeMoveDirection, NodePosition } from '../api/worksheet/smartart';
29
+ export type { NodeMoveDirection, NodePosition };
30
+ /**
31
+ * Cache entry for computed SmartArt layout.
32
+ *
33
+ * This is a runtime-only cache, NOT persisted to Yjs.
34
+ * Invalidated whenever diagram structure or styling changes.
35
+ */
36
+ export interface ComputedLayoutCache {
37
+ /** SmartArt object ID this cache entry belongs to */
38
+ objectId: string;
39
+ /** The computed layout result */
40
+ layout: ComputedLayout;
41
+ /** Timestamp when the layout was computed (ms since epoch) */
42
+ lastComputed: number;
43
+ /** Version number, incremented on each invalidation */
44
+ version: number;
45
+ }
46
+ /**
47
+ * Bridge interface for SmartArt diagram management.
48
+ *
49
+ * This interface provides methods for managing SmartArt diagrams,
50
+ * computing layouts, and handling node operations.
51
+ *
52
+ * LIFECYCLE:
53
+ * 1. Bridge is created during engine initialization
54
+ * 2. start() subscribes to ALL SmartArt events on EventBus
55
+ * 3. Event handlers filter by objectId and call invalidateLayout() automatically
56
+ * 4. stop()/destroy() unsubscribes all event listeners during shutdown
57
+ *
58
+ * CACHE MANAGEMENT:
59
+ * - Cache is per-objectId, stored in Map<objectId, ComputedLayoutCache>
60
+ * - getComputedLayout() returns cached result if valid, recomputes otherwise
61
+ * - invalidateLayout() marks a specific diagram for recomputation
62
+ * - invalidateAllLayouts() clears the entire cache (e.g., on style changes)
63
+ */
64
+ export interface ISmartArtBridge {
65
+ /**
66
+ * Start the SmartArt bridge - subscribe to events for reactive updates.
67
+ *
68
+ * Subscribes to the following events for automatic cache invalidation:
69
+ * - smartart:node-added, smartart:node-removed, smartart:node-updated
70
+ * - smartart:node-moved, smartart:nodes-batch-added, smartart:nodes-batch-removed
71
+ * - smartart:layout-changed, smartart:style-changed
72
+ *
73
+ * @returns Cleanup function to stop the bridge
74
+ */
75
+ start(): () => void;
76
+ /**
77
+ * Stop the SmartArt bridge and clean up subscriptions.
78
+ */
79
+ stop(): void;
80
+ /**
81
+ * Destroy the bridge - alias for stop().
82
+ */
83
+ destroy(): void;
84
+ /**
85
+ * Get a SmartArt diagram by object ID.
86
+ * Returns the deserialized TypeScript interface view.
87
+ *
88
+ * @param objectId - SmartArt floating object ID
89
+ * @returns The diagram or undefined if not found
90
+ */
91
+ getDiagram(objectId: string): SmartArtDiagram | undefined | Promise<SmartArtDiagram | undefined>;
92
+ /**
93
+ * Get all SmartArt diagrams on a sheet.
94
+ *
95
+ * @param sheetId - Sheet ID
96
+ * @returns Array of diagrams on the sheet
97
+ */
98
+ getDiagramsOnSheet(sheetId: string): SmartArtDiagram[] | Promise<SmartArtDiagram[]>;
99
+ /**
100
+ * Add a node to a diagram.
101
+ *
102
+ * The new node is positioned relative to the reference node:
103
+ * - 'before': Insert as sibling before reference node
104
+ * - 'after': Insert as sibling after reference node
105
+ * - 'above': Insert as parent of reference node (promote reference)
106
+ * - 'below': Insert as child of reference node
107
+ * - 'child': Same as 'below', insert as last child
108
+ *
109
+ * If referenceNodeId is null, the node is added as a new root.
110
+ *
111
+ * @param objectId - SmartArt object ID
112
+ * @param text - Initial text content for the node
113
+ * @param position - Position relative to reference node
114
+ * @param referenceNodeId - Reference node ID (null for root)
115
+ * @returns The ID of the newly created node
116
+ */
117
+ addNode(objectId: string, text: string, position: NodePosition, referenceNodeId: NodeId | null): NodeId | Promise<NodeId>;
118
+ /**
119
+ * Remove a node and optionally its children.
120
+ *
121
+ * By default, children are promoted to the removed node's parent.
122
+ * If the node is a root node with no parent, children become new roots.
123
+ *
124
+ * @param objectId - SmartArt object ID
125
+ * @param nodeId - Node ID to remove
126
+ */
127
+ removeNode(objectId: string, nodeId: NodeId): void | Promise<void>;
128
+ /**
129
+ * Update node properties.
130
+ *
131
+ * Only provided properties are updated; others remain unchanged.
132
+ * Passing undefined for an optional property removes it.
133
+ *
134
+ * @param objectId - SmartArt object ID
135
+ * @param nodeId - Node ID to update
136
+ * @param updates - Partial node properties to update
137
+ */
138
+ updateNode(objectId: string, nodeId: NodeId, updates: Partial<SmartArtNode>): void | Promise<void>;
139
+ /**
140
+ * Move a node in the hierarchy.
141
+ *
142
+ * Movement directions:
143
+ * - 'promote': Move up one level (become sibling of current parent)
144
+ * - 'demote': Move down one level (become child of previous sibling)
145
+ * - 'move-up': Move earlier in sibling order
146
+ * - 'move-down': Move later in sibling order
147
+ *
148
+ * @param objectId - SmartArt object ID
149
+ * @param nodeId - Node ID to move
150
+ * @param direction - Direction to move the node
151
+ */
152
+ moveNode(objectId: string, nodeId: NodeId, direction: NodeMoveDirection): void | Promise<void>;
153
+ /**
154
+ * Get a node by ID.
155
+ *
156
+ * @param objectId - SmartArt object ID
157
+ * @param nodeId - Node ID to retrieve
158
+ * @returns The node or undefined if not found
159
+ */
160
+ getNode(objectId: string, nodeId: NodeId): SmartArtNode | undefined | Promise<SmartArtNode | undefined>;
161
+ /**
162
+ * Change the diagram layout.
163
+ *
164
+ * Layout changes may affect node constraints (e.g., max levels, max nodes).
165
+ * The bridge validates the change and adjusts the diagram if needed.
166
+ *
167
+ * @param objectId - SmartArt object ID
168
+ * @param newLayoutId - New layout ID (e.g., 'hierarchy/org-chart')
169
+ */
170
+ changeLayout(objectId: string, newLayoutId: string): void | Promise<void>;
171
+ /**
172
+ * Change the quick style.
173
+ *
174
+ * Quick styles control shape fill, stroke, and effects.
175
+ *
176
+ * @param objectId - SmartArt object ID
177
+ * @param quickStyleId - Quick style ID (e.g., 'subtle-effect', 'intense-effect')
178
+ */
179
+ changeQuickStyle(objectId: string, quickStyleId: string): void | Promise<void>;
180
+ /**
181
+ * Change the color theme.
182
+ *
183
+ * Color themes control the color palette used for shapes.
184
+ *
185
+ * @param objectId - SmartArt object ID
186
+ * @param colorThemeId - Color theme ID (e.g., 'colorful-1', 'accent-1')
187
+ */
188
+ changeColorTheme(objectId: string, colorThemeId: string): void | Promise<void>;
189
+ /**
190
+ * Get the computed layout for a diagram.
191
+ * Returns cached result if valid, otherwise recomputes.
192
+ *
193
+ * This is the PRIMARY method for accessing layout - it manages the cache.
194
+ * Layout computation can be expensive, so caching is important for performance.
195
+ *
196
+ * @param objectId - SmartArt object ID
197
+ * @returns Computed layout or undefined if diagram not found
198
+ */
199
+ getComputedLayout(objectId: string): ComputedLayout | undefined | Promise<ComputedLayout | undefined>;
200
+ /**
201
+ * Invalidate the cached layout for a diagram.
202
+ * Called automatically when diagram structure or styling changes.
203
+ *
204
+ * After invalidation, the next call to getComputedLayout() will recompute.
205
+ *
206
+ * @param objectId - SmartArt object ID
207
+ */
208
+ invalidateLayout(objectId: string): void;
209
+ /**
210
+ * Invalidate all cached layouts.
211
+ * Called on sheet changes or global style changes.
212
+ *
213
+ * Use sparingly as it forces recomputation of all diagrams.
214
+ */
215
+ invalidateAllLayouts(): void;
216
+ }
217
+ //# sourceMappingURL=smartart-bridge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smartart-bridge.d.ts","sourceRoot":"","sources":["../../src/bridges/smartart-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC/F,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGjF,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,CAAC;AAMhD;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC,qDAAqD;IACrD,QAAQ,EAAE,MAAM,CAAC;IAEjB,iCAAiC;IACjC,MAAM,EAAE,cAAc,CAAC;IAEvB,8DAA8D;IAC9D,YAAY,EAAE,MAAM,CAAC;IAErB,uDAAuD;IACvD,OAAO,EAAE,MAAM,CAAC;CACjB;AAMD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,eAAe;IAK9B;;;;;;;;;OASG;IACH,KAAK,IAAI,MAAM,IAAI,CAAC;IAEpB;;OAEG;IACH,IAAI,IAAI,IAAI,CAAC;IAEb;;OAEG;IACH,OAAO,IAAI,IAAI,CAAC;IAMhB;;;;;;OAMG;IACH,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,GAAG,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC,CAAC;IAEjG;;;;;OAKG;IACH,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC;IAMpF;;;;;;;;;;;;;;;;;OAiBG;IACH,OAAO,CACL,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,YAAY,EACtB,eAAe,EAAE,MAAM,GAAG,IAAI,GAC7B,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAE5B;;;;;;;;OAQG;IACH,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnE;;;;;;;;;OASG;IACH,UAAU,CACR,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,CAAC,YAAY,CAAC,GAC7B,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAExB;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/F;;;;;;OAMG;IACH,OAAO,CACL,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,YAAY,GAAG,SAAS,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAAC;IAMhE;;;;;;;;OAQG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1E;;;;;;;OAOG;IACH,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/E;;;;;;;OAOG;IACH,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAM/E;;;;;;;;;OASG;IACH,iBAAiB,CACf,QAAQ,EAAE,MAAM,GACf,cAAc,GAAG,SAAS,GAAG,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC,CAAC;IAEpE;;;;;;;OAOG;IACH,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzC;;;;;OAKG;IACH,oBAAoB,IAAI,IAAI,CAAC;CAC9B"}
@@ -0,0 +1,86 @@
1
+ /**
2
+ * WordArt Rendering Bridge Interface
3
+ *
4
+ * Defines the contract for WordArt rendering via DrawingObject[].
5
+ * The bridge computes DrawingObjects from WordArt config; the scene graph renders them.
6
+ *
7
+ * Architecture Notes:
8
+ * - DrawingObject[] is a runtime cache, NOT persisted to Yjs
9
+ * - The bridge listens to EventBus for automatic cache invalidation
10
+ * - Provides ctx.wordArt.* access pattern in DocumentContext
11
+ *
12
+ * @see contracts/src/objects/drawing-object.ts - DrawingObject type
13
+ * @see engine/src/bridges/wordart-bridge.ts - Implementation
14
+ */
15
+ import type { DrawingObject } from '../objects/drawing-object';
16
+ /**
17
+ * Bridge interface for WordArt rendering.
18
+ *
19
+ * This interface provides a single computation method that produces
20
+ * DrawingObject[] from WordArt config, plus cache management.
21
+ *
22
+ * LIFECYCLE:
23
+ * 1. Bridge is created during engine initialization
24
+ * 2. start() subscribes to WordArt change events for cache invalidation
25
+ * 3. stop()/destroy() cleans up resources and event subscriptions
26
+ *
27
+ * CACHE MANAGEMENT:
28
+ * - Cache is per-objectId, storing computed DrawingObject[]
29
+ * - computeDrawingObjects() returns cached result if valid, recomputes otherwise
30
+ * - invalidateCache() marks a specific object for recomputation
31
+ * - clearCache() clears the entire cache
32
+ */
33
+ export interface IWordArtRenderingBridge {
34
+ /**
35
+ * Start the WordArt rendering bridge - subscribe to events for reactive updates.
36
+ *
37
+ * Call this after creating the bridge to begin listening for WordArt changes.
38
+ * The bridge will automatically invalidate the render cache when changes occur.
39
+ *
40
+ * @returns Cleanup function to stop the bridge
41
+ */
42
+ start(): () => void;
43
+ /**
44
+ * Stop the WordArt rendering bridge and clean up subscriptions.
45
+ *
46
+ * Call this to pause event listening. Can be restarted with start().
47
+ */
48
+ stop(): void;
49
+ /**
50
+ * Compute DrawingObjects for a WordArt object.
51
+ *
52
+ * Uses caching to avoid recomputation on every frame. Returns cached result
53
+ * if the config, text, and bounds haven't changed.
54
+ *
55
+ * @param objectId - Floating object ID of the WordArt
56
+ * @param bounds - Optional bounds override (uses object bounds if not provided)
57
+ * @returns Array of DrawingObjects or null if object not found/not WordArt
58
+ */
59
+ computeDrawingObjects(objectId: string, bounds?: {
60
+ width: number;
61
+ height: number;
62
+ }): Promise<DrawingObject[] | null>;
63
+ /**
64
+ * Invalidate render cache for an object.
65
+ *
66
+ * Called automatically when WordArt config, text, or bounds change.
67
+ * After invalidation, the next call to computeDrawingObjects() will recompute.
68
+ *
69
+ * @param objectId - Floating object ID to invalidate
70
+ */
71
+ invalidateCache(objectId: string): void;
72
+ /**
73
+ * Clear entire render cache.
74
+ *
75
+ * Forces recomputation of all WordArt objects on next render.
76
+ * Use sparingly as it impacts performance.
77
+ */
78
+ clearCache(): void;
79
+ /**
80
+ * Clean up resources and event subscriptions.
81
+ *
82
+ * Call during engine shutdown or when the bridge is no longer needed.
83
+ */
84
+ destroy(): void;
85
+ }
86
+ //# sourceMappingURL=wordart-bridge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wordart-bridge.d.ts","sourceRoot":"","sources":["../../src/bridges/wordart-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAM/D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;;;;OAOG;IACH,KAAK,IAAI,MAAM,IAAI,CAAC;IAEpB;;;;OAIG;IACH,IAAI,IAAI,IAAI,CAAC;IAEb;;;;;;;;;OASG;IACH,qBAAqB,CACnB,QAAQ,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GACzC,OAAO,CAAC,aAAa,EAAE,GAAG,IAAI,CAAC,CAAC;IAEnC;;;;;;;OAOG;IACH,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExC;;;;;OAKG;IACH,UAAU,IAAI,IAAI,CAAC;IAEnB;;;;OAIG;IACH,OAAO,IAAI,IAAI,CAAC;CACjB"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Capability Errors - Error types for capability-related failures
3
+ *
4
+ * This file defines:
5
+ * - CapabilityErrorCode type
6
+ *
7
+ * Runtime error classes, type guards, and factory functions moved to
8
+ * @mog/spreadsheet-utils/capabilities/errors.
9
+ *
10
+ * @see plans/active/permission/CAPABILITY-IMPLEMENTATION.md
11
+ */
12
+ /**
13
+ * Error codes for capability-related failures.
14
+ */
15
+ export type CapabilityErrorCode = 'CAPABILITY_DENIED' | 'CAPABILITY_SCOPE_MISMATCH' | 'CAPABILITY_EXPIRED' | 'CAPABILITY_NOT_GRANTED' | 'CAPABILITY_REQUIRES_AUTH' | 'INVALID_SCOPE' | 'UNBOUNDED_WILDCARD';
16
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/capabilities/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAC3B,mBAAmB,GACnB,2BAA2B,GAC3B,oBAAoB,GACpB,wBAAwB,GACxB,0BAA0B,GAC1B,eAAe,GACf,oBAAoB,CAAC"}
@@ -0,0 +1,355 @@
1
+ /**
2
+ * Gated API Interfaces - Capability-based API access (Types Only)
3
+ *
4
+ * This file defines ONLY type/interface definitions:
5
+ * - IGatedAppKernelAPI interface (optional interfaces per capability)
6
+ * - ICapabilityIntrospection interface
7
+ * - Gated sub-API interfaces
8
+ *
9
+ * Runtime code (type guard functions: hasTableReadAccess, hasTableFullAccess,
10
+ * hasFilesystemAccess, hasNetworkAccess) has been moved to
11
+ * @mog/kernel/services/capabilities (gated-api.ts).
12
+ *
13
+ * @see plans/active/permission/CAPABILITY-IMPLEMENTATION.md
14
+ */
15
+ import type { IAppClipboardAPI, IAppColumnsAPI, IAppEventsAPI, IAppRecordsAPI, IAppRelationsAPI, IAppTablesAPI } from '../apps/api';
16
+ import type { INotificationsService, IUndoService } from '../services';
17
+ import type { CapabilityScope } from './scope';
18
+ import type { CapabilityType } from './types';
19
+ /**
20
+ * Interface for apps to introspect their granted capabilities.
21
+ *
22
+ * Apps can use this to:
23
+ * - Check what capabilities they have before trying to use APIs
24
+ * - Adapt UI based on available capabilities
25
+ * - Determine if they have scoped or full access
26
+ */
27
+ export interface ICapabilityIntrospection {
28
+ /**
29
+ * Check if the app has a specific capability.
30
+ *
31
+ * This checks for both direct grants and implied capabilities.
32
+ * For example, if the app has 'cells:write', has('cells:read') returns true.
33
+ *
34
+ * @param capability - The capability to check
35
+ * @returns True if the app has this capability
36
+ */
37
+ has(capability: CapabilityType): boolean;
38
+ /**
39
+ * List all capabilities the app currently has.
40
+ *
41
+ * Includes both directly granted capabilities and implied capabilities.
42
+ *
43
+ * @returns Array of all effective capabilities
44
+ */
45
+ list(): CapabilityType[];
46
+ /**
47
+ * Check if a capability is scoped (limited to specific resources).
48
+ *
49
+ * @param capability - The capability to check
50
+ * @returns True if the capability is scoped
51
+ */
52
+ isScoped(capability: CapabilityType): boolean;
53
+ /**
54
+ * Get the scope for a capability.
55
+ *
56
+ * @param capability - The capability to get scope for
57
+ * @returns The scope, or null if unscoped or not granted
58
+ */
59
+ getScope(capability: CapabilityType): CapabilityScope | null;
60
+ /**
61
+ * Check if the app has access to a specific resource.
62
+ *
63
+ * This is a convenience method combining has() and scope checking.
64
+ *
65
+ * @param capability - The capability required
66
+ * @param resourceType - The type of resource (e.g., 'table')
67
+ * @param resourceId - The ID of the resource (e.g., 'contacts')
68
+ * @returns True if the app can access this resource
69
+ */
70
+ hasAccessTo(capability: CapabilityType, resourceType: string, resourceId: string): boolean;
71
+ /**
72
+ * Request a capability at runtime.
73
+ *
74
+ * This triggers the consent flow for the requested capability.
75
+ * Returns a promise that resolves to true if granted, false if denied.
76
+ *
77
+ * @param capability - The capability to request
78
+ * @param reason - User-facing reason for the request
79
+ * @returns Promise resolving to grant result
80
+ */
81
+ request(capability: CapabilityType, reason: string): Promise<boolean>;
82
+ /**
83
+ * Subscribe to capability changes.
84
+ *
85
+ * Called when capabilities are granted, revoked, or expire.
86
+ * Apps can use this to adapt their UI in real-time.
87
+ *
88
+ * @param callback - Called when capabilities change
89
+ * @returns Unsubscribe function
90
+ */
91
+ onChange(callback: (capabilities: CapabilityType[]) => void): () => void;
92
+ /**
93
+ * Subscribe to capability expiration warnings.
94
+ *
95
+ * Called when a session-only capability is about to expire.
96
+ * Default warning is 60 seconds before expiration.
97
+ *
98
+ * @param callback - Called with the expiring capability
99
+ * @returns Unsubscribe function
100
+ */
101
+ onExpiring(callback: (capability: CapabilityType, expiresInMs: number) => void): () => void;
102
+ }
103
+ /**
104
+ * Gated cells API - only methods allowed by granted capabilities.
105
+ */
106
+ export interface IGatedCellsAPI {
107
+ readonly get?: (sheetId: string, row: number, col: number) => unknown;
108
+ readonly getRange?: (sheetId: string, range: string) => unknown[][];
109
+ readonly set?: (sheetId: string, row: number, col: number, value: unknown) => void;
110
+ readonly setRange?: (sheetId: string, range: string, values: unknown[][]) => void;
111
+ }
112
+ /**
113
+ * Gated sheets API - only methods allowed by granted capabilities.
114
+ */
115
+ export interface IGatedSheetsAPI {
116
+ readonly list?: () => Array<{
117
+ id: string;
118
+ name: string;
119
+ }>;
120
+ readonly get?: (sheetId: string) => {
121
+ id: string;
122
+ name: string;
123
+ } | null;
124
+ readonly create?: (name: string) => {
125
+ id: string;
126
+ name: string;
127
+ };
128
+ readonly delete?: (sheetId: string) => void;
129
+ readonly rename?: (sheetId: string, newName: string) => void;
130
+ }
131
+ /**
132
+ * Gated formulas API - only methods allowed by granted capabilities.
133
+ */
134
+ export interface IGatedFormulasAPI {
135
+ readonly get?: (sheetId: string, row: number, col: number) => string | null;
136
+ readonly set?: (sheetId: string, row: number, col: number, formula: string) => void;
137
+ }
138
+ /**
139
+ * Gated formatting API - only methods allowed by granted capabilities.
140
+ */
141
+ export interface IGatedFormattingAPI {
142
+ readonly get?: (sheetId: string, row: number, col: number) => Record<string, unknown>;
143
+ readonly set?: (sheetId: string, row: number, col: number, format: Record<string, unknown>) => void;
144
+ }
145
+ /**
146
+ * Gated checkpoints API - only methods allowed by granted capabilities.
147
+ */
148
+ export interface IGatedCheckpointsAPI {
149
+ readonly list?: () => Array<{
150
+ id: string;
151
+ name: string;
152
+ createdAt: number;
153
+ }>;
154
+ readonly create?: (name: string) => {
155
+ id: string;
156
+ name: string;
157
+ createdAt: number;
158
+ };
159
+ readonly restore?: (checkpointId: string) => void;
160
+ }
161
+ /**
162
+ * Gated filesystem API - only methods allowed by granted capabilities.
163
+ */
164
+ export interface IGatedFilesystemAPI {
165
+ readonly read?: (path: string) => Promise<ArrayBuffer>;
166
+ readonly readText?: (path: string) => Promise<string>;
167
+ readonly exists?: (path: string) => Promise<boolean>;
168
+ readonly list?: (path: string) => Promise<string[]>;
169
+ readonly write?: (path: string, data: ArrayBuffer) => Promise<void>;
170
+ readonly writeText?: (path: string, text: string) => Promise<void>;
171
+ readonly delete?: (path: string) => Promise<void>;
172
+ }
173
+ /**
174
+ * Gated dialogs API - only methods allowed by granted capabilities.
175
+ */
176
+ export interface IGatedDialogsAPI {
177
+ readonly open?: (options?: {
178
+ filters?: Array<{
179
+ name: string;
180
+ extensions: string[];
181
+ }>;
182
+ multiple?: boolean;
183
+ }) => Promise<string[] | null>;
184
+ readonly save?: (options?: {
185
+ defaultPath?: string;
186
+ filters?: Array<{
187
+ name: string;
188
+ extensions: string[];
189
+ }>;
190
+ }) => Promise<string | null>;
191
+ }
192
+ /**
193
+ * Gated shell API - only methods allowed by granted capabilities.
194
+ */
195
+ export interface IGatedShellAPI {
196
+ readonly setWindowTitle?: (title: string) => void;
197
+ readonly openExternal?: (url: string) => Promise<void>;
198
+ }
199
+ /**
200
+ * Gated network API - only methods allowed by granted capabilities.
201
+ */
202
+ export interface IGatedNetworkAPI {
203
+ /**
204
+ * Make an HTTP request.
205
+ *
206
+ * The allowed URLs depend on the granted network capabilities:
207
+ * - network:sameorigin: Only same-origin URLs
208
+ * - network:allowlist: Only user-approved domains
209
+ * - network:localhost: localhost/127.0.0.1
210
+ * - network:any: Any remote URL (excludes localhost unless also granted)
211
+ *
212
+ * Throws CapabilityDeniedError if URL is not allowed.
213
+ */
214
+ readonly fetch?: (url: string, options?: RequestInit) => Promise<Response>;
215
+ /**
216
+ * Get the list of allowed domains (for network:allowlist).
217
+ */
218
+ readonly getAllowedDomains?: () => string[];
219
+ /**
220
+ * Request to add a domain to the allowlist (shows consent dialog).
221
+ */
222
+ readonly requestDomain?: (domain: string, reason: string) => Promise<boolean>;
223
+ }
224
+ /**
225
+ * Gated connections API - only methods allowed by granted capabilities.
226
+ */
227
+ export interface IGatedConnectionsAPI {
228
+ readonly list?: () => Array<{
229
+ id: string;
230
+ name: string;
231
+ type: string;
232
+ }>;
233
+ readonly query?: (connectionId: string, query: unknown) => Promise<unknown[]>;
234
+ readonly execute?: (connectionId: string, mutation: unknown) => Promise<unknown>;
235
+ readonly create?: (config: unknown) => Promise<{
236
+ id: string;
237
+ }>;
238
+ readonly delete?: (connectionId: string) => Promise<void>;
239
+ readonly executeNative?: (connectionId: string, rawQuery: string) => Promise<unknown>;
240
+ }
241
+ /**
242
+ * The Capability-Gated App Kernel API.
243
+ *
244
+ * Unlike IAppKernelAPI where all interfaces are always present,
245
+ * IGatedAppKernelAPI only exposes interfaces for granted capabilities.
246
+ *
247
+ * Apps check if interfaces exist before using them:
248
+ * ```typescript
249
+ * if (api.tables) {
250
+ * const tables = api.tables.list();
251
+ * }
252
+ * ```
253
+ *
254
+ * Or use capability introspection:
255
+ * ```typescript
256
+ * if (api.capabilities.has('tables:read')) {
257
+ * const tables = api.tables!.list();
258
+ * }
259
+ * ```
260
+ *
261
+ * Design:
262
+ * - All sub-APIs are optional (undefined if not granted)
263
+ * - Methods within sub-APIs may also be optional based on read/write capabilities
264
+ * - capabilities introspection is ALWAYS available
265
+ * - batch() is always available (validates capabilities per operation)
266
+ */
267
+ export interface IGatedAppKernelAPI {
268
+ /**
269
+ * Capability introspection - always available.
270
+ * Apps can check their capabilities and request new ones.
271
+ */
272
+ readonly capabilities: ICapabilityIntrospection;
273
+ /** Cell operations (requires cells:read and/or cells:write) */
274
+ readonly cells?: IGatedCellsAPI;
275
+ /** Sheet operations (requires sheets:* capabilities) */
276
+ readonly sheets?: IGatedSheetsAPI;
277
+ /** Formula operations (requires formulas:read and/or formulas:write) */
278
+ readonly formulas?: IGatedFormulasAPI;
279
+ /** Formatting operations (requires formatting:read and/or formatting:write) */
280
+ readonly formatting?: IGatedFormattingAPI;
281
+ /** Trigger recalculation (requires recalc:trigger) */
282
+ readonly recalc?: {
283
+ readonly trigger: () => void;
284
+ };
285
+ /**
286
+ * Table operations (requires tables:* capabilities).
287
+ * From base IAppTablesAPI, but methods may be undefined based on capabilities.
288
+ */
289
+ readonly tables?: Partial<IAppTablesAPI>;
290
+ /**
291
+ * Column operations (requires tables:* capabilities).
292
+ */
293
+ readonly columns?: Partial<IAppColumnsAPI>;
294
+ /**
295
+ * Record operations (requires tables:* capabilities).
296
+ */
297
+ readonly records?: Partial<IAppRecordsAPI>;
298
+ /**
299
+ * Relation operations (requires tables:read).
300
+ */
301
+ readonly relations?: Partial<IAppRelationsAPI>;
302
+ /**
303
+ * Event subscriptions (requires events:subscribe).
304
+ * Events are filtered by the app's read capabilities.
305
+ */
306
+ readonly events?: IAppEventsAPI;
307
+ /**
308
+ * Clipboard operations (requires clipboard:read and/or clipboard:write).
309
+ */
310
+ readonly clipboard?: Partial<IAppClipboardAPI>;
311
+ /**
312
+ * Undo/redo operations (requires undo:read and/or undo:write).
313
+ */
314
+ readonly undo?: Partial<IUndoService>;
315
+ /**
316
+ * Notifications (requires notifications:send).
317
+ */
318
+ readonly notifications?: Pick<INotificationsService, 'notify' | 'info' | 'success' | 'warning' | 'error'>;
319
+ /**
320
+ * Checkpoint operations (requires checkpoints:* capabilities).
321
+ */
322
+ readonly checkpoints?: IGatedCheckpointsAPI;
323
+ /**
324
+ * Filesystem operations (requires filesystem:* capabilities).
325
+ */
326
+ readonly filesystem?: IGatedFilesystemAPI;
327
+ /**
328
+ * File dialogs (requires dialogs:open and/or dialogs:save).
329
+ */
330
+ readonly dialogs?: IGatedDialogsAPI;
331
+ /**
332
+ * Shell operations (requires shell:* capabilities).
333
+ */
334
+ readonly shell?: IGatedShellAPI;
335
+ /**
336
+ * Network operations (requires network:* capabilities).
337
+ */
338
+ readonly network?: IGatedNetworkAPI;
339
+ /**
340
+ * Database connections (requires connections:* capabilities).
341
+ */
342
+ readonly connections?: IGatedConnectionsAPI;
343
+ /**
344
+ * Execute multiple operations in a single transaction.
345
+ *
346
+ * CRITICAL: Each operation is validated against the app's capabilities
347
+ * BEFORE any operation executes. If any operation is denied, the entire
348
+ * batch fails without executing anything.
349
+ *
350
+ * @param fn - Function containing operations to batch
351
+ * @param description - Description for undo history
352
+ */
353
+ batch<T>(fn: () => T, description?: string): T;
354
+ }
355
+ //# sourceMappingURL=gated-api.d.ts.map