@kitionstage/sdk 0.0.0-stage → 0.5.2-stage.13

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 (259) hide show
  1. package/README.md +73 -2
  2. package/dist/LICENSE +177 -0
  3. package/dist/THIRD_PARTY_NOTICES +28 -0
  4. package/dist/lib/assets/kitEngine.worker-3iMvwtlI.js +12732 -0
  5. package/dist/lib/assets/loro_wasm_bg-Gulzks_0.wasm +0 -0
  6. package/dist/lib/chunks/batch-BWpAyHvP.js +789 -0
  7. package/dist/lib/chunks/canonical-BIWfVCL-.js +87 -0
  8. package/dist/lib/chunks/envelope-D6MGY-ZN.js +61 -0
  9. package/dist/lib/chunks/replica-D8w3I4sn.js +2472 -0
  10. package/dist/lib/chunks/runtime-BVJHE1Pg.js +997 -0
  11. package/dist/lib/chunks/session-BqXC9a1-.js +281 -0
  12. package/dist/lib/chunks/toolIds-BCeSGHpV.js +821 -0
  13. package/dist/lib/chunks/workspaceTree-Destqupf.js +23 -0
  14. package/dist/lib/convergence/index.js +1035 -0
  15. package/dist/lib/convergence/node.js +8 -0
  16. package/dist/lib/embed-server/callbacks.js +37 -0
  17. package/dist/lib/embed-server/cli.js +19 -0
  18. package/dist/lib/embed-server/index.js +272 -0
  19. package/dist/lib/extensions/index.js +439 -0
  20. package/dist/lib/extensions/panel.html +208 -0
  21. package/dist/lib/extensions/runtime.js +198 -0
  22. package/dist/lib/extensions/sandbox.html +35 -0
  23. package/dist/lib/kdm/index.js +437 -0
  24. package/dist/lib/kit-dev-host/checkUiIds.mjs +44 -0
  25. package/dist/lib/kit-dev-host/index.js +308 -0
  26. package/dist/lib/kit-dev-host/lineRow.mjs +47 -0
  27. package/dist/lib/kit-dev-host/modeSmoke.mjs +178 -0
  28. package/dist/lib/kit-editor/index.js +6481 -0
  29. package/dist/lib/kit-editor/styles.css +807 -0
  30. package/dist/lib/kit-editor/workspaceTree.js +1 -0
  31. package/dist/lib/kit-engine/index.js +7 -0
  32. package/dist/lib/kit-host/index.js +530 -0
  33. package/dist/lib/kit-ui-protocol/index.js +336 -0
  34. package/dist/lib/node-only/embed-server-callbacks.js +2 -0
  35. package/dist/lib/node-only/embed-server.js +2 -0
  36. package/dist/lib/sync/index.js +1008 -0
  37. package/dist/lib/sync/openToken.js +201 -0
  38. package/dist/lib/sync/replicaVersions.js +51 -0
  39. package/dist/standalone/chunks/batch-CAGYk6m4.js +789 -0
  40. package/dist/standalone/chunks/client-B9xkOcvf.js +772 -0
  41. package/dist/standalone/chunks/collab-CTQZ9h7J.js +1022 -0
  42. package/dist/standalone/chunks/comment-Ds9t8xSE.js +94 -0
  43. package/dist/standalone/chunks/comments-uVDS8Wxp.js +41 -0
  44. package/dist/standalone/chunks/document-B5MMuYyN.js +324 -0
  45. package/dist/standalone/chunks/envelope-GX4Cynkx.js +7612 -0
  46. package/dist/standalone/chunks/index-BEgEEnhU.js +287 -0
  47. package/dist/standalone/chunks/index-EEl8hGbP.js +1967 -0
  48. package/dist/standalone/chunks/kits-Cp51mDlw.js +9 -0
  49. package/dist/standalone/chunks/replica-Di2iCPiD.js +3281 -0
  50. package/dist/standalone/chunks/replicaVersions-C3rJxnk9.js +50 -0
  51. package/dist/standalone/chunks/touched-T9jKJjxn.js +78 -0
  52. package/dist/standalone/index.js +12 -0
  53. package/dist/standalone/script/index.js +339 -0
  54. package/dist/standalone/script/kits/board.js +5 -0
  55. package/dist/standalone/script/kits/cad.js +5 -0
  56. package/dist/standalone/script/kits/design.js +5 -0
  57. package/dist/standalone/script/kits/doc.js +5 -0
  58. package/dist/standalone/script/kits/film.js +5 -0
  59. package/dist/standalone/script/kits/html.js +5 -0
  60. package/dist/standalone/script/kits/index.js +38 -0
  61. package/dist/standalone/script/kits/layout.js +5 -0
  62. package/dist/standalone/script/kits/motion.js +5 -0
  63. package/dist/standalone/script/kits/note.js +5 -0
  64. package/dist/standalone/script/kits/pdf.js +5 -0
  65. package/dist/standalone/script/kits/photo.js +5 -0
  66. package/dist/standalone/script/kits/scene.js +5 -0
  67. package/dist/standalone/script/kits/sheet.js +5 -0
  68. package/dist/standalone/script/kits/slide.js +5 -0
  69. package/dist/standalone/script/kits/table.js +5 -0
  70. package/dist/standalone/script/kits/vector.js +5 -0
  71. package/dist/standalone/script/node.js +401 -0
  72. package/dist/standalone/script/proxy.js +254 -0
  73. package/dist/types/convergence/src/adapter.d.ts +131 -0
  74. package/dist/types/convergence/src/engine.d.ts +66 -0
  75. package/dist/types/convergence/src/index.d.ts +21 -0
  76. package/dist/types/convergence/src/net.d.ts +52 -0
  77. package/dist/types/convergence/src/node.d.ts +6 -0
  78. package/dist/types/convergence/src/report.d.ts +56 -0
  79. package/dist/types/convergence/src/rng.d.ts +12 -0
  80. package/dist/types/convergence/src/scenarios.d.ts +15 -0
  81. package/dist/types/convergence/src/state.d.ts +67 -0
  82. package/dist/types/embed/src/agent.d.ts +88 -0
  83. package/dist/types/embed/src/blobs.d.ts +2 -0
  84. package/dist/types/embed/src/collab.d.ts +250 -0
  85. package/dist/types/embed/src/comments.d.ts +30 -0
  86. package/dist/types/embed/src/errors.d.ts +24 -0
  87. package/dist/types/embed/src/handlers.d.ts +92 -0
  88. package/dist/types/embed/src/index.d.ts +20 -0
  89. package/dist/types/embed/src/mount.d.ts +39 -0
  90. package/dist/types/embed/src/replicaStore.d.ts +3 -0
  91. package/dist/types/embed/src/rooms.d.ts +40 -0
  92. package/dist/types/embed/src/schemas.d.ts +7 -0
  93. package/dist/types/embed/src/syncClients.d.ts +28 -0
  94. package/dist/types/embed/src/theme.d.ts +7 -0
  95. package/dist/types/embed/src/types.d.ts +596 -0
  96. package/dist/types/embed/src/ui.d.ts +33 -0
  97. package/dist/types/embed/src/version.d.ts +2 -0
  98. package/dist/types/embed-server/src/callbacks.d.ts +30 -0
  99. package/dist/types/embed-server/src/cli.d.ts +1 -0
  100. package/dist/types/embed-server/src/index.d.ts +19 -0
  101. package/dist/types/embed-server/src/page.d.ts +15 -0
  102. package/dist/types/embed-server/src/server.d.ts +39 -0
  103. package/dist/types/embed-server/src/session.d.ts +22 -0
  104. package/dist/types/extensions/src/gate.d.ts +17 -0
  105. package/dist/types/extensions/src/generated/runtime.d.ts +8 -0
  106. package/dist/types/extensions/src/host.d.ts +135 -0
  107. package/dist/types/extensions/src/index.d.ts +13 -0
  108. package/dist/types/extensions/src/manifest.d.ts +82 -0
  109. package/dist/types/extensions/src/protocol.d.ts +159 -0
  110. package/dist/types/extensions/src/rpc.d.ts +52 -0
  111. package/dist/types/extensions/src/runtime/document.d.ts +40 -0
  112. package/dist/types/extensions/src/runtime/index.d.ts +10 -0
  113. package/dist/types/extensions/src/runtime/panel.d.ts +19 -0
  114. package/dist/types/extensions/src/runtime/runtime.d.ts +54 -0
  115. package/dist/types/extensions/src/runtime/worker.d.ts +1 -0
  116. package/dist/types/extensions/src/sandbox.d.ts +41 -0
  117. package/dist/types/kdm/src/args.d.ts +12 -0
  118. package/dist/types/kdm/src/batch.d.ts +118 -0
  119. package/dist/types/kdm/src/canonical.d.ts +25 -0
  120. package/dist/types/kdm/src/comment.d.ts +114 -0
  121. package/dist/types/kdm/src/diff.d.ts +125 -0
  122. package/dist/types/kdm/src/envelope.d.ts +27 -0
  123. package/dist/types/kdm/src/errors.d.ts +28 -0
  124. package/dist/types/kdm/src/footprint.d.ts +21 -0
  125. package/dist/types/kdm/src/ids.d.ts +57 -0
  126. package/dist/types/kdm/src/index.d.ts +18 -0
  127. package/dist/types/kdm/src/marks.d.ts +32 -0
  128. package/dist/types/kdm/src/op.d.ts +124 -0
  129. package/dist/types/kdm/src/origin.d.ts +41 -0
  130. package/dist/types/kdm/src/overlay.d.ts +92 -0
  131. package/dist/types/kdm/src/projection.d.ts +29 -0
  132. package/dist/types/kdm/src/read.d.ts +90 -0
  133. package/dist/types/kdm/src/replica.d.ts +403 -0
  134. package/dist/types/kdm/src/schema.d.ts +185 -0
  135. package/dist/types/kdm/src/testing.d.ts +28 -0
  136. package/dist/types/kdm/src/toolIds.d.ts +61 -0
  137. package/dist/types/kdm/src/touched.d.ts +24 -0
  138. package/dist/types/kdm/src/tx.d.ts +215 -0
  139. package/dist/types/kdm/src/value.d.ts +23 -0
  140. package/dist/types/kit-dev-host/src/checkNoPaths.d.ts +19 -0
  141. package/dist/types/kit-dev-host/src/checkUiIds.d.mts +2 -0
  142. package/dist/types/kit-dev-host/src/index.d.ts +179 -0
  143. package/dist/types/kit-dev-host/src/lineRow.d.mts +14 -0
  144. package/dist/types/kit-dev-host/src/memoryFiles.d.ts +15 -0
  145. package/dist/types/kit-dev-host/src/modeSmoke.d.mts +8 -0
  146. package/dist/types/kit-editor/src/CommandDialog.d.ts +22 -0
  147. package/dist/types/kit-editor/src/CommentsPanel.d.ts +45 -0
  148. package/dist/types/kit-editor/src/CustomizeDialog.d.ts +32 -0
  149. package/dist/types/kit-editor/src/HostButtons.d.ts +11 -0
  150. package/dist/types/kit-editor/src/RenderFailure.d.ts +7 -0
  151. package/dist/types/kit-editor/src/TextSink.d.ts +6 -0
  152. package/dist/types/kit-editor/src/brand.d.ts +2 -0
  153. package/dist/types/kit-editor/src/catalogMenus.d.ts +27 -0
  154. package/dist/types/kit-editor/src/chart.d.ts +138 -0
  155. package/dist/types/kit-editor/src/conflicts.d.ts +12 -0
  156. package/dist/types/kit-editor/src/drawing.d.ts +83 -0
  157. package/dist/types/kit-editor/src/editor.d.ts +544 -0
  158. package/dist/types/kit-editor/src/engine/KitCanvas.d.ts +70 -0
  159. package/dist/types/kit-editor/src/engine/backdrop.d.ts +32 -0
  160. package/dist/types/kit-editor/src/engine/createKitFile.d.ts +12 -0
  161. package/dist/types/kit-editor/src/engine/decorations.d.ts +14 -0
  162. package/dist/types/kit-editor/src/engine/engineOverlays.d.ts +197 -0
  163. package/dist/types/kit-editor/src/engine/engineTools.d.ts +116 -0
  164. package/dist/types/kit-editor/src/engine/kitDraft.d.ts +70 -0
  165. package/dist/types/kit-editor/src/engine/kitEngine.d.ts +390 -0
  166. package/dist/types/kit-editor/src/engine/kitEngine.worker.d.ts +30 -0
  167. package/dist/types/kit-editor/src/engine/kitHost.d.ts +41 -0
  168. package/dist/types/kit-editor/src/engine/kitModel.d.ts +32 -0
  169. package/dist/types/kit-editor/src/engine/kitModelRunner.d.ts +99 -0
  170. package/dist/types/kit-editor/src/engine/kitModule.d.ts +185 -0
  171. package/dist/types/kit-editor/src/engine/kitShortcuts.d.ts +32 -0
  172. package/dist/types/kit-editor/src/engine/kitTools.d.ts +79 -0
  173. package/dist/types/kit-editor/src/engine/lazyFonts.d.ts +34 -0
  174. package/dist/types/kit-editor/src/engine/lentFiles.d.ts +29 -0
  175. package/dist/types/kit-editor/src/engine/rasterViewport.d.ts +178 -0
  176. package/dist/types/kit-editor/src/engine/readOnly.d.ts +78 -0
  177. package/dist/types/kit-editor/src/engine/refusal.d.ts +39 -0
  178. package/dist/types/kit-editor/src/engine/replica.d.ts +23 -0
  179. package/dist/types/kit-editor/src/engine/useKitDocument.d.ts +154 -0
  180. package/dist/types/kit-editor/src/engine/workerRelay.d.ts +62 -0
  181. package/dist/types/kit-editor/src/files.d.ts +74 -0
  182. package/dist/types/kit-editor/src/frame/EditorFrame.d.ts +74 -0
  183. package/dist/types/kit-editor/src/frame/FocusBar.d.ts +10 -0
  184. package/dist/types/kit-editor/src/frame/MenuNodes.d.ts +20 -0
  185. package/dist/types/kit-editor/src/frame/MenuRibbon.d.ts +8 -0
  186. package/dist/types/kit-editor/src/frame/ModeButton.d.ts +7 -0
  187. package/dist/types/kit-editor/src/frame/menus.d.ts +64 -0
  188. package/dist/types/kit-editor/src/frame/modes.d.ts +51 -0
  189. package/dist/types/kit-editor/src/frame/useFrameLayout.d.ts +34 -0
  190. package/dist/types/kit-editor/src/host.d.ts +127 -0
  191. package/dist/types/kit-editor/src/index.d.ts +85 -0
  192. package/dist/types/kit-editor/src/ink.d.ts +26 -0
  193. package/dist/types/kit-editor/src/lease.d.ts +53 -0
  194. package/dist/types/kit-editor/src/oneInFlight.d.ts +7 -0
  195. package/dist/types/kit-editor/src/phrases.d.ts +25 -0
  196. package/dist/types/kit-editor/src/presence.d.ts +79 -0
  197. package/dist/types/kit-editor/src/strings.d.ts +6 -0
  198. package/dist/types/kit-editor/src/toolIcons.d.ts +32 -0
  199. package/dist/types/kit-editor/src/uiCatalog.d.ts +59 -0
  200. package/dist/types/kit-editor/src/uiConfig.d.ts +53 -0
  201. package/dist/types/kit-editor/src/uiContext.d.ts +65 -0
  202. package/dist/types/kit-editor/src/uiStore.d.ts +20 -0
  203. package/dist/types/kit-editor/src/useCommentAnchors.d.ts +29 -0
  204. package/dist/types/kit-editor/src/useKitSession.d.ts +115 -0
  205. package/dist/types/kit-editor/src/workspaceTree.d.ts +5 -0
  206. package/dist/types/kit-engine/src/contract.d.ts +154 -0
  207. package/dist/types/kit-engine/src/index.d.ts +2 -0
  208. package/dist/types/kit-engine/src/session.d.ts +133 -0
  209. package/dist/types/kit-host/src/files.d.ts +163 -0
  210. package/dist/types/kit-host/src/index.d.ts +315 -0
  211. package/dist/types/kit-ui-protocol/src/index.d.ts +1145 -0
  212. package/dist/types/loro-crdt.d.ts +9 -0
  213. package/dist/types/script/kits/board.d.ts +534 -0
  214. package/dist/types/script/kits/cad.d.ts +2937 -0
  215. package/dist/types/script/kits/design.d.ts +3213 -0
  216. package/dist/types/script/kits/doc.d.ts +2575 -0
  217. package/dist/types/script/kits/film.d.ts +4067 -0
  218. package/dist/types/script/kits/html.d.ts +38 -0
  219. package/dist/types/script/kits/index.d.ts +20 -0
  220. package/dist/types/script/kits/layout.d.ts +3483 -0
  221. package/dist/types/script/kits/motion.d.ts +4826 -0
  222. package/dist/types/script/kits/note.d.ts +631 -0
  223. package/dist/types/script/kits/pdf.d.ts +829 -0
  224. package/dist/types/script/kits/photo.d.ts +7574 -0
  225. package/dist/types/script/kits/scene.d.ts +2962 -0
  226. package/dist/types/script/kits/sheet.d.ts +2419 -0
  227. package/dist/types/script/kits/slide.d.ts +1894 -0
  228. package/dist/types/script/kits/table.d.ts +654 -0
  229. package/dist/types/script/kits/vector.d.ts +5167 -0
  230. package/dist/types/script/src/agentRelay.d.ts +48 -0
  231. package/dist/types/script/src/capabilities.d.ts +21 -0
  232. package/dist/types/script/src/document.d.ts +87 -0
  233. package/dist/types/script/src/drafts.d.ts +141 -0
  234. package/dist/types/script/src/exchange.d.ts +30 -0
  235. package/dist/types/script/src/headless.d.ts +190 -0
  236. package/dist/types/script/src/index.d.ts +15 -0
  237. package/dist/types/script/src/kitModel.d.ts +17 -0
  238. package/dist/types/script/src/kits.d.ts +8 -0
  239. package/dist/types/script/src/node.d.ts +42 -0
  240. package/dist/types/script/src/port.d.ts +89 -0
  241. package/dist/types/script/src/proxy.d.ts +132 -0
  242. package/dist/types/script/src/room.d.ts +162 -0
  243. package/dist/types/script/src/sources.d.ts +73 -0
  244. package/dist/types/sync/src/backoff.d.ts +9 -0
  245. package/dist/types/sync/src/blobSection.d.ts +23 -0
  246. package/dist/types/sync/src/capabilities.d.ts +20 -0
  247. package/dist/types/sync/src/client.d.ts +253 -0
  248. package/dist/types/sync/src/framing.d.ts +35 -0
  249. package/dist/types/sync/src/hash.d.ts +2 -0
  250. package/dist/types/sync/src/index.d.ts +19 -0
  251. package/dist/types/sync/src/leases.d.ts +82 -0
  252. package/dist/types/sync/src/openToken.d.ts +104 -0
  253. package/dist/types/sync/src/protocol.d.ts +484 -0
  254. package/dist/types/sync/src/relay.d.ts +52 -0
  255. package/dist/types/sync/src/replicaVersions.d.ts +17 -0
  256. package/dist/types/sync/src/saveMachine.d.ts +83 -0
  257. package/dist/types/sync/src/saveRun.d.ts +52 -0
  258. package/dist/types/sync/src/transport.d.ts +19 -0
  259. package/package.json +229 -4
@@ -0,0 +1,2575 @@
1
+ import type { CommandMap, ModelDocument, ModelList, ModelMap, ModelObject, ModelText, RequestContext } from '../src/index.js';
2
+ import { type KitDescriptor } from '../src/kits.js';
3
+ type Json = null | boolean | number | string | Json[] | {
4
+ [key: string]: Json;
5
+ };
6
+ type BlobRef = {
7
+ hash: string;
8
+ mime: string;
9
+ size: number;
10
+ };
11
+ /** kit.doc: registered with @kition/sdk/script when this module loads. */
12
+ export declare const docKit: KitDescriptor;
13
+ /** The fields a new `Document` takes (`list.add(fields)`). */
14
+ export type DocumentFields = {
15
+ settings?: Json | null;
16
+ core?: Json | null;
17
+ sources?: Json | null;
18
+ customProps?: Json | null;
19
+ lastSection?: Json | null;
20
+ styles?: Json | null;
21
+ numbering?: Json | null;
22
+ };
23
+ /** A `Document` of kit.doc. */
24
+ export interface Document extends ModelObject {
25
+ settings: Json | null;
26
+ core: Json | null;
27
+ sources: Json | null;
28
+ customProps: Json | null;
29
+ lastSection: Json | null;
30
+ styles: Json | null;
31
+ numbering: Json | null;
32
+ readonly lists: ModelMap<Json>;
33
+ /** Read-only: the kit keeps it as it is. */
34
+ readonly passthrough: Json | null;
35
+ readonly body: ModelList<Block, BlockFields>;
36
+ readonly parts: ModelList<Part, PartFields>;
37
+ readonly comments: ModelList<Comment, CommentFields>;
38
+ readonly revisions: ModelList<Revision, RevisionFields>;
39
+ readonly media: ModelList<Media, MediaFields>;
40
+ }
41
+ /** The fields a new `Block` takes (`list.add(fields)`). */
42
+ export type BlockFields = {
43
+ kind: "para" | "table";
44
+ para?: Json | null;
45
+ table?: string | ModelObject | null;
46
+ };
47
+ /** A `Block` of kit.doc. */
48
+ export interface Block extends ModelObject {
49
+ kind: "para" | "table";
50
+ para: Json | null;
51
+ get text(): ModelText;
52
+ set text(value: string);
53
+ /** The id of a `Table`. */
54
+ get table(): string | null;
55
+ set table(value: Table | string | null);
56
+ }
57
+ /** The fields a new `Inline` takes (`list.add(fields)`). */
58
+ export type InlineFields = {
59
+ value?: Json | null;
60
+ frame?: Json | null;
61
+ chart?: string | ModelObject | null;
62
+ };
63
+ /** A `Inline` of kit.doc. */
64
+ export interface Inline extends ModelObject {
65
+ /** Read-only: the kit keeps it as it is. */
66
+ readonly uid: number | null;
67
+ value: Json | null;
68
+ frame: Json | null;
69
+ readonly look: ModelMap<Json>;
70
+ /** The id of a `Chart`. */
71
+ get chart(): string | null;
72
+ set chart(value: Chart | string | null);
73
+ }
74
+ /** The fields a new `Chart` takes (`list.add(fields)`). */
75
+ export type ChartFields = {};
76
+ /** A `Chart` of kit.doc. */
77
+ export interface Chart extends ModelObject {
78
+ readonly parts: ModelMap<Json>;
79
+ }
80
+ /** The fields a new `Table` takes (`list.add(fields)`). */
81
+ export type TableFields = {
82
+ props?: Json | null;
83
+ grid?: Json | null;
84
+ };
85
+ /** A `Table` of kit.doc. */
86
+ export interface Table extends ModelObject {
87
+ props: Json | null;
88
+ grid: Json | null;
89
+ readonly rows: ModelList<Row, RowFields>;
90
+ }
91
+ /** The fields a new `Row` takes (`list.add(fields)`). */
92
+ export type RowFields = {
93
+ props?: Json | null;
94
+ };
95
+ /** A `Row` of kit.doc. */
96
+ export interface Row extends ModelObject {
97
+ props: Json | null;
98
+ readonly cells: ModelList<Cell, CellFields>;
99
+ }
100
+ /** The fields a new `Cell` takes (`list.add(fields)`). */
101
+ export type CellFields = {
102
+ props?: Json | null;
103
+ };
104
+ /** A `Cell` of kit.doc. */
105
+ export interface Cell extends ModelObject {
106
+ props: Json | null;
107
+ readonly blocks: ModelList<Block, BlockFields>;
108
+ }
109
+ /** The fields a new `Part` takes (`list.add(fields)`). */
110
+ export type PartFields = {
111
+ kind: "header" | "footer" | "footnote" | "endnote" | "comment" | "textbox";
112
+ props?: Json | null;
113
+ };
114
+ /** A `Part` of kit.doc. */
115
+ export interface Part extends ModelObject {
116
+ kind: "header" | "footer" | "footnote" | "endnote" | "comment" | "textbox";
117
+ props: Json | null;
118
+ readonly blocks: ModelList<Block, BlockFields>;
119
+ }
120
+ /** The fields a new `CommentThread` takes (`list.add(fields)`). */
121
+ export type CommentThreadFields = {
122
+ anchor: Json;
123
+ resolved?: boolean | null;
124
+ };
125
+ /** A `CommentThread` of kit.doc. */
126
+ export interface CommentThread extends ModelObject {
127
+ anchor: Json;
128
+ resolved: boolean | null;
129
+ readonly comments: ModelList<Comment, CommentFields>;
130
+ }
131
+ /** The fields a new `Comment` takes (`list.add(fields)`). */
132
+ export type CommentFields = {
133
+ author: string;
134
+ name?: string | null;
135
+ created: string;
136
+ initials?: string | null;
137
+ props?: Json | null;
138
+ part?: string | ModelObject | null;
139
+ parent?: string | ModelObject | null;
140
+ };
141
+ /** A `Comment` of kit.doc. */
142
+ export interface Comment extends ModelObject {
143
+ author: string;
144
+ name: string | null;
145
+ get body(): ModelText;
146
+ set body(value: string);
147
+ created: string;
148
+ initials: string | null;
149
+ props: Json | null;
150
+ /** The id of a `Part`. */
151
+ get part(): string | null;
152
+ set part(value: Part | string | null);
153
+ /** The id of a `Comment`. */
154
+ get parent(): string | null;
155
+ set parent(value: Comment | string | null);
156
+ }
157
+ /** The fields a new `Revision` takes (`list.add(fields)`). */
158
+ export type RevisionFields = {
159
+ props?: Json | null;
160
+ };
161
+ /** A `Revision` of kit.doc. */
162
+ export interface Revision extends ModelObject {
163
+ props: Json | null;
164
+ }
165
+ /** The fields a new `Media` takes (`list.add(fields)`). */
166
+ export type MediaFields = {
167
+ key: string;
168
+ blob?: BlobRef | null;
169
+ };
170
+ /** A `Media` of kit.doc. */
171
+ export interface Media extends ModelObject {
172
+ key: string;
173
+ blob: BlobRef | null;
174
+ }
175
+ /** Every command of kit.doc, by id, with its parameters. */
176
+ export interface DocCommands extends CommandMap {
177
+ /** Type Text. Types text at the caret, replacing the selection, with the formatting at the caret; use para.insert or para.text to write whole paragraphs by index. Params: {"text": string}. Reads the selection, mode. Changes the document. */
178
+ "text.insert": {
179
+ raw?: boolean;
180
+ text?: string;
181
+ };
182
+ /** New Paragraph. Splits the paragraph at the caret into two (Enter); the new paragraph takes the style's next style. Params: {}. Reads the selection, mode. Changes the document. */
183
+ "text.newParagraph": Record<string, never>;
184
+ /** Line Break. Inserts a line break (Shift+Enter) at the caret, staying in the same paragraph. Params: {}. Reads the selection, mode. Changes the document. */
185
+ "text.lineBreak": Record<string, never>;
186
+ /** Page Break. Inserts a page break at the caret so the following text starts on a new page. Params: {}. Reads the selection, mode. Changes the document. */
187
+ "text.pageBreak": Record<string, never>;
188
+ /** Column Break. Inserts a column break at the caret so the following text starts in the next column. Params: {}. Reads the selection, mode. Changes the document. */
189
+ "text.columnBreak": Record<string, never>;
190
+ /** Tab. Inserts a tab at the caret; in a list item it demotes the item one level, in a table it moves to the next cell. Params: {}. Reads the selection, mode. Changes the document. */
191
+ "text.tab": Record<string, never>;
192
+ /** Shift+Tab. Shift+Tab at the caret: promotes a list item one level, or moves to the previous table cell. Params: {}. Reads the selection, mode. Changes the document. */
193
+ "text.backTab": Record<string, never>;
194
+ /** Backspace. Deletes the selection, or the character before the caret (Backspace). Params: {}. Reads the selection, mode. Changes the document. */
195
+ "text.backspace": Record<string, never>;
196
+ /** Delete. Deletes the selection, or the character after the caret (Delete). Params: {}. Reads the selection, mode. Changes the document. */
197
+ "text.delete": Record<string, never>;
198
+ /** Delete Previous Word. Deletes from the caret back to the start of the previous word. Params: {}. Reads the selection, mode. Changes the document. */
199
+ "text.deleteWordBack": Record<string, never>;
200
+ /** Delete Next Word. Deletes from the caret to the start of the next word. Params: {}. Reads the selection, mode. Changes the document. */
201
+ "text.deleteWordForward": Record<string, never>;
202
+ /** Nonbreaking Space. Inserts a nonbreaking space at the caret, which keeps the words on each side on one line. Params: {}. Reads the selection, mode. Changes the document. */
203
+ "text.nbsp": Record<string, never>;
204
+ /** Nonbreaking Hyphen. Inserts a nonbreaking hyphen at the caret, which a line never breaks at. Params: {}. Reads the selection, mode. Changes the document. */
205
+ "text.nbHyphen": Record<string, never>;
206
+ /** Optional Hyphen. Inserts an optional hyphen at the caret, shown only where the line breaks at it. Params: {}. Reads the selection, mode. Changes the document. */
207
+ "text.optionalHyphen": Record<string, never>;
208
+ /** Left. Moves the caret one character left (back in reading order); extend grows the selection; answers the new caret. Params: {"extend"?: bool}. Reads the selection. */
209
+ "caret.left": {
210
+ extend?: boolean;
211
+ };
212
+ /** Right. Moves the caret one character right; extend grows the selection; answers the new caret. Params: {"extend"?: bool}. Reads the selection. */
213
+ "caret.right": {
214
+ extend?: boolean;
215
+ };
216
+ /** Up. Moves the caret to the line above; extend grows the selection; answers the new caret. Params: {"extend"?: bool}. Reads the selection. */
217
+ "caret.up": {
218
+ extend?: boolean;
219
+ };
220
+ /** Down. Moves the caret to the line below; extend grows the selection; answers the new caret. Params: {"extend"?: bool}. Reads the selection. */
221
+ "caret.down": {
222
+ extend?: boolean;
223
+ };
224
+ /** Word Left. Moves the caret to the start of the previous word; extend grows the selection. Params: {"extend"?: bool}. Reads the selection. */
225
+ "caret.wordLeft": {
226
+ extend?: boolean;
227
+ };
228
+ /** Word Right. Moves the caret to the start of the next word; extend grows the selection. Params: {"extend"?: bool}. Reads the selection. */
229
+ "caret.wordRight": {
230
+ extend?: boolean;
231
+ };
232
+ /** Line Start. Moves the caret to the start of its line; extend grows the selection. Params: {"extend"?: bool}. Reads the selection. */
233
+ "caret.home": {
234
+ extend?: boolean;
235
+ };
236
+ /** Line End. Moves the caret to the end of its line; extend grows the selection. Params: {"extend"?: bool}. Reads the selection. */
237
+ "caret.end": {
238
+ extend?: boolean;
239
+ };
240
+ /** Paragraph Up. Moves the caret to the start of the previous paragraph; extend grows the selection. Params: {"extend"?: bool}. Reads the selection. */
241
+ "caret.paraUp": {
242
+ extend?: boolean;
243
+ };
244
+ /** Paragraph Down. Moves the caret to the start of the next paragraph; extend grows the selection. Params: {"extend"?: bool}. Reads the selection. */
245
+ "caret.paraDown": {
246
+ extend?: boolean;
247
+ };
248
+ /** Document Start. Moves the caret to the start of the document; extend selects up to there. Params: {"extend"?: bool}. Reads the selection. */
249
+ "caret.docStart": {
250
+ extend?: boolean;
251
+ };
252
+ /** Document End. Moves the caret to the end of the document; extend selects up to there. Params: {"extend"?: bool}. Reads the selection. */
253
+ "caret.docEnd": {
254
+ extend?: boolean;
255
+ };
256
+ /** Page Up. Moves the caret up by one screen; extend grows the selection. Params: {"extend"?: bool}. Reads the selection. */
257
+ "caret.pageUp": {
258
+ extend?: boolean;
259
+ };
260
+ /** Page Down. Moves the caret down by one screen; extend grows the selection. Params: {"extend"?: bool}. Reads the selection. */
261
+ "caret.pageDown": {
262
+ extend?: boolean;
263
+ };
264
+ /** Set Caret. Puts the caret at a position (a document position, as document.selection answers) or at a point on a page, optionally extending the selection. Params: {"pos": Pos, "extend"?: bool} | {"page": n, "x": pt, "y": pt}. */
265
+ "caret.set": {
266
+ extend?: boolean; /** in one of several forms of the parameters */
267
+ page?: number; /** a position as document.selection answers */
268
+ pos?: {
269
+ off?: number;
270
+ path?: Array<number>;
271
+ story?: Json;
272
+ }; /** read by the command beside its listed parameters */
273
+ story?: Json; /** points; in one of several forms of the parameters */
274
+ x?: number; /** points; in one of several forms of the parameters */
275
+ y?: number;
276
+ };
277
+ /** Select All. Selects the whole body of the document (Ctrl+A). Params: {}. Reads the selection. */
278
+ "select.all": Record<string, never>;
279
+ /** Select Range. Selects from an anchor position to a focus position (positions as document.selection answers). Params: {"anchor": Pos, "focus": Pos}. */
280
+ "select.range": {
281
+ anchor?: {
282
+ off?: number;
283
+ path?: Array<number>;
284
+ story?: string;
285
+ }; /** a position as document.selection answers */
286
+ focus?: {
287
+ off?: number;
288
+ path?: Array<number>;
289
+ story?: string;
290
+ };
291
+ };
292
+ /** Select Word. Selects the word at the caret. Params: {}. Reads the selection. */
293
+ "select.word": Record<string, never>;
294
+ /** Select Sentence. Selects the sentence at the caret. Params: {}. Reads the selection. */
295
+ "select.sentence": Record<string, never>;
296
+ /** Select Paragraph. Selects the paragraph at the caret. Params: {}. Reads the selection. */
297
+ "select.paragraph": Record<string, never>;
298
+ /** Select Line. Selects the line the caret is on. Params: {}. Reads the selection. */
299
+ "select.line": {
300
+ extend?: boolean;
301
+ };
302
+ /** Select Text. Finds a text in the document and selects its first (or nth) occurrence; the usual way to target words before formatting them. Params: {"text": string, "occurrence"?: n}. Reads the selection. */
303
+ "select.text": {
304
+ occurrence?: number; /** read by the command beside its listed parameters */
305
+ story?: Json;
306
+ text?: string;
307
+ };
308
+ /** Collapse Selection. Collapses the selection to the caret. Params: {}. Reads the selection. */
309
+ "select.collapse": {
310
+ end?: boolean;
311
+ };
312
+ /** Column Selection. Makes a rectangular (column) selection between two positions or two page points, as Alt+drag does. Params: {"anchor": Pos, "focus": Pos} | {"from": {"page": n, "x": pt, "y": pt}, "to": {"page": n, "x": pt, "y": pt}, "story"?: StoryRef} | {"on"?: bool} (no corners: toggle column selection mode, where the arrow keys extend the block). Reads the selection. */
313
+ "select.column": {
314
+ anchor?: {
315
+ off?: number;
316
+ path?: Array<number>;
317
+ story?: string;
318
+ }; /** a position as document.selection answers */
319
+ focus?: {
320
+ off?: number;
321
+ path?: Array<number>;
322
+ story?: string;
323
+ }; /** in one of several forms of the parameters */
324
+ from?: {
325
+ page?: number;
326
+ x?: number;
327
+ y?: number;
328
+ }; /** in one of several forms of the parameters */
329
+ on?: boolean; /** StoryRef; in one of several forms of the parameters */
330
+ story?: Json; /** in one of several forms of the parameters */
331
+ to?: {
332
+ page?: number;
333
+ x?: number;
334
+ y?: number;
335
+ };
336
+ };
337
+ /** Undo. Undoes the last step of the caller's own scope (an agent undoes its own edits, not the person's). Params: {"scope"?: "person"|"agent"}. Reads the selection. Changes the document. */
338
+ "edit.undo": {
339
+ scope?: "person" | "agent";
340
+ };
341
+ /** Redo. Redoes the last undone step of the caller's own scope. Params: {"scope"?: "person"|"agent"}. Reads the selection. Changes the document. */
342
+ "edit.redo": {
343
+ scope?: "person" | "agent";
344
+ };
345
+ /** Cut. Removes the selection and puts it on the clipboard. Params: {}. Reads the selection, mode. Changes the document. */
346
+ "edit.cut": Record<string, never>;
347
+ /** Copy. Copies the selection to the clipboard without changing the document. Params: {}. Reads the selection. */
348
+ "edit.copy": Record<string, never>;
349
+ /** Paste. Pastes the clipboard (or the given text) at the caret, keeping its formatting. Params: {"text"?: string}. Reads the selection, mode. Changes the document. */
350
+ "edit.paste": {
351
+ text?: string;
352
+ };
353
+ /** Paste: Keep Text Only. Pastes the clipboard (or the given text) at the caret as plain text, taking the formatting at the caret. Params: {"text"?: string}. Reads the selection. Changes the document. */
354
+ "edit.pasteText": {
355
+ text?: string;
356
+ };
357
+ /** Paste: Merge Formatting. Pastes the clipboard (or the given text) at the caret, merging its formatting with the surrounding text. Params: {"text"?: string}. Reads the selection. Changes the document. */
358
+ "edit.pasteMerge": {
359
+ text?: string;
360
+ };
361
+ /** Clipboard Pane. Shows or hides the Office clipboard pane in the editor. Params: {"value"?: bool}. Reads the selection. */
362
+ "edit.clipboardPane": {
363
+ value?: boolean;
364
+ };
365
+ /** Clipboard Items. Lists the items on the Office clipboard, newest first. Params: {}. Reads the selection. */
366
+ "edit.clipboardItems": Record<string, never>;
367
+ /** Paste Clipboard Item. Pastes one item of the Office clipboard (0 = newest) at the caret. Params: {"index": n (0 = newest)}. Reads the selection. Changes the document. */
368
+ "edit.pasteClipboardItem": {
369
+ index?: number;
370
+ };
371
+ /** Paste All. Pastes every item of the Office clipboard at the caret, oldest first. Params: {}. Reads the selection. Changes the document. */
372
+ "edit.pasteAllClipboard": Record<string, never>;
373
+ /** Delete Clipboard Item. Removes one item (0 = newest) from the Office clipboard. Params: {"index": n (0 = newest)}. Reads the selection. */
374
+ "edit.deleteClipboardItem": {
375
+ index?: number;
376
+ };
377
+ /** Clear All. Empties the Office clipboard. Params: {}. Reads the selection. */
378
+ "edit.clearClipboard": Record<string, never>;
379
+ /** Find. Finds the next occurrence of a text (with case, whole-word or regex options) after the caret and selects it; answers where it is. Params: {"text": string, "matchCase"?: bool, "wholeWord"?: bool, "regex"?: bool}. Reads the selection. */
380
+ "edit.find": {
381
+ matchCase?: boolean;
382
+ regex?: boolean;
383
+ text?: string;
384
+ wholeWord?: boolean; /** read by the command beside its listed parameters */
385
+ with?: string;
386
+ };
387
+ /** Advanced Find. Finds every occurrence of a text in the main text, the selection or the headers and footers, and answers them all. Params: {"text"?: string, "matchCase"?: bool, "wholeWord"?: bool, "regex"?: bool, "in"?: "main|selection", "highlight"?: bool}. Reads the selection. */
388
+ "edit.advancedFind": {
389
+ highlight?: boolean;
390
+ in?: "main" | "selection";
391
+ matchCase?: boolean;
392
+ regex?: boolean;
393
+ text?: string;
394
+ wholeWord?: boolean; /** read by the command beside its listed parameters */
395
+ with?: string;
396
+ };
397
+ /** Find Next. Selects the next occurrence of the last search. Params: {}. Reads the selection. */
398
+ "edit.findNext": Record<string, never>;
399
+ /** Find Previous. Selects the previous occurrence of the last search. Params: {}. Reads the selection. */
400
+ "edit.findPrevious": Record<string, never>;
401
+ /** Replace. Replaces the next occurrence of a text after the caret with another text. Params: {"text": string, "with": string}. Reads the selection. Changes the document. */
402
+ "edit.replace": {
403
+ matchCase?: boolean; /** read by the command beside its listed parameters */
404
+ regex?: boolean;
405
+ text?: string; /** read by the command beside its listed parameters */
406
+ wholeWord?: boolean;
407
+ with?: string;
408
+ };
409
+ /** Replace All. Replaces every occurrence of a text in the document (case, whole-word or regex options) and answers how many changed. Params: {"text": string, "with": string, "matchCase"?: bool, "wholeWord"?: bool, "regex"?: bool}. Reads the selection. Changes the document. */
410
+ "edit.replaceAll": {
411
+ matchCase?: boolean;
412
+ regex?: boolean;
413
+ text?: string;
414
+ wholeWord?: boolean;
415
+ with?: string;
416
+ };
417
+ /** Go To. Moves the caret to a page (numbered from 1), a bookmark, or a body paragraph or table by its document.inspect index (from 0). Params: {"page"?: n (from 1), "bookmark"?: string, "paragraph"?: n (document.inspect block index from 0)}. Reads the selection. */
418
+ "edit.goto": {
419
+ bookmark?: string; /** from 1 */
420
+ page?: number; /** document.inspect block index from 0 */
421
+ paragraph?: number;
422
+ };
423
+ /** Format Painter. Picks up the selection's formatting for pasting onto other text; sticky keeps it for several pastes. Params: {"sticky"?: bool}. Reads the selection. */
424
+ "edit.formatPainter": {
425
+ sticky?: boolean;
426
+ };
427
+ /** Copy Formatting. Copies the selection's character and paragraph formatting. Params: {}. Reads the selection. */
428
+ "edit.copyFormat": Record<string, never>;
429
+ /** Paste Formatting. Applies the formatting copied with edit.copyFormat to the selection. Params: {}. Reads the selection. Changes the document. */
430
+ "edit.pasteFormat": Record<string, never>;
431
+ /** Paste Special. Pastes given text, HTML or RTF (or the clipboard) at the caret in a chosen form: formatted, RTF, HTML or plain text. Params: {"as"?: "formatted"|"rtf"|"html"|"text", "text"?: string, "html"?: string, "rtf"?: string}. Reads the selection. Changes the document. */
432
+ "edit.pasteSpecial": {
433
+ as?: "formatted" | "rtf" | "html" | "text";
434
+ html?: string;
435
+ rtf?: string;
436
+ text?: string;
437
+ };
438
+ /** Bold. Sets bold on the selection (or the word at the caret); without value it toggles. Params: {"value"?: bool}. Reads the selection. Changes the document. */
439
+ "format.bold": {
440
+ value?: boolean;
441
+ };
442
+ /** Italic. Sets italic on the selection; without value it toggles. Params: {"value"?: bool}. Reads the selection. Changes the document. */
443
+ "format.italic": {
444
+ value?: boolean;
445
+ };
446
+ /** Underline. Sets underline on the selection with a style (single, double, thick, dotted, wave, words...); without value it toggles. Params: {"value"?: bool, "style"?: "single|double|thick|dotted|dash|dotDash|dotDotDash|wave|words"}. Reads the selection. Changes the document. */
447
+ "format.underline": {
448
+ style?: "single" | "double" | "thick" | "dotted" | "dash" | "dotDash" | "dotDotDash" | "wave" | "words";
449
+ value?: boolean;
450
+ };
451
+ /** Double Underline. Toggles double underline on the selection. Params: {}. Reads the selection. Changes the document. */
452
+ "format.doubleUnderline": {
453
+ style?: string; /** read by the command beside its listed parameters */
454
+ value?: boolean;
455
+ };
456
+ /** Underline Words Only. Toggles underlining of words only (not the spaces) on the selection. Params: {}. Reads the selection. Changes the document. */
457
+ "format.wordUnderline": {
458
+ style?: string; /** read by the command beside its listed parameters */
459
+ value?: boolean;
460
+ };
461
+ /** Strikethrough. Sets strikethrough on the selection; without value it toggles. Params: {"value"?: bool}. Reads the selection. Changes the document. */
462
+ "format.strikethrough": {
463
+ value?: boolean;
464
+ };
465
+ /** Character Border. Sets a border around the selected characters; without value it toggles. Params: {"value"?: bool}. Reads the selection. Changes the document. */
466
+ "format.border": {
467
+ value?: boolean;
468
+ };
469
+ /** Double Strikethrough. Toggles double strikethrough on the selection. Params: {}. Reads the selection. Changes the document. */
470
+ "format.doubleStrikethrough": {
471
+ value?: boolean;
472
+ };
473
+ /** Subscript. Toggles subscript on the selection. Params: {}. Reads the selection. Changes the document. */
474
+ "format.subscript": {
475
+ value?: boolean;
476
+ };
477
+ /** Superscript. Toggles superscript on the selection. Params: {}. Reads the selection. Changes the document. */
478
+ "format.superscript": {
479
+ value?: boolean;
480
+ };
481
+ /** All Caps. Toggles showing the selection in capital letters, without changing the letters stored. Params: {}. Reads the selection. Changes the document. */
482
+ "format.allCaps": {
483
+ value?: boolean;
484
+ };
485
+ /** Small Caps. Toggles small capitals on the selection. Params: {}. Reads the selection. Changes the document. */
486
+ "format.smallCaps": {
487
+ value?: boolean;
488
+ };
489
+ /** Hidden. Toggles hidden text on the selection; hidden text does not show or print unless marks are shown. Params: {}. Reads the selection. Changes the document. */
490
+ "format.hidden": {
491
+ value?: boolean;
492
+ };
493
+ /** Outline. Toggles the outline text effect on the selection. Params: {}. Reads the selection. Changes the document. */
494
+ "format.outline": {
495
+ value?: boolean;
496
+ };
497
+ /** Shadow. Toggles the shadow text effect on the selection. Params: {}. Reads the selection. Changes the document. */
498
+ "format.shadow": {
499
+ value?: boolean;
500
+ };
501
+ /** Emboss. Toggles the emboss text effect on the selection. Params: {}. Reads the selection. Changes the document. */
502
+ "format.emboss": {
503
+ value?: boolean;
504
+ };
505
+ /** Engrave. Toggles the engrave text effect on the selection. Params: {}. Reads the selection. Changes the document. */
506
+ "format.engrave": {
507
+ value?: boolean;
508
+ };
509
+ /** Font. Sets the font family of the selection. Params: {"name": string}. Reads the selection. Changes the document. */
510
+ "format.font": {
511
+ name?: string;
512
+ };
513
+ /** Font Size. Sets the font size in points of the selection. Params: {"size": number}. Reads the selection. Changes the document. */
514
+ "format.size": {
515
+ size?: number;
516
+ };
517
+ /** Increase Font Size. Steps the selection's font size up to the next size in the size list. Params: {}. Reads the selection, mode. Changes the document. */
518
+ "format.growFont": Record<string, never>;
519
+ /** Decrease Font Size. Steps the selection's font size down to the previous size in the size list. Params: {}. Reads the selection, mode. Changes the document. */
520
+ "format.shrinkFont": Record<string, never>;
521
+ /** Grow Font 1 Point. Makes the selection's font one point larger. Params: {}. Reads the selection, mode. Changes the document. */
522
+ "format.growFont1": Record<string, never>;
523
+ /** Shrink Font 1 Point. Makes the selection's font one point smaller. Params: {}. Reads the selection, mode. Changes the document. */
524
+ "format.shrinkFont1": Record<string, never>;
525
+ /** Font Color. Sets the text colour of the selection as RRGGBB hex, or auto. Params: {"color": "RRGGBB" | "auto"}. Reads the selection. Changes the document. */
526
+ "format.color": {
527
+ color?: "RRGGBB" | "auto";
528
+ };
529
+ /** Text Highlight Color. Highlights the selection with a highlighter colour (yellow, brightGreen, turquoise...), or removes it with none. Params: {"color": "yellow|brightGreen|turquoise|pink|blue|red|darkBlue|teal|green|violet|darkRed|darkYellow|gray50|gray25|black|none"}. Reads the selection. Changes the document. */
530
+ "format.highlight": {
531
+ color?: "yellow" | "brightGreen" | "turquoise" | "pink" | "blue" | "red" | "darkBlue" | "teal" | "green" | "violet" | "darkRed" | "darkYellow" | "gray50" | "gray25" | "black" | "none";
532
+ };
533
+ /** Character Shading. Sets the background shading of the selected characters as RRGGBB, or removes it with null. Params: {"color": "RRGGBB" | null}. Reads the selection. Changes the document. */
534
+ "format.shading": {
535
+ color?: Json;
536
+ };
537
+ /** Change Case. Changes the letters of the selection to sentence, lower, upper or title case, or toggles case. Params: {"mode"?: "sentence|lower|upper|title|toggle"}. Reads the selection, mode. Changes the document. */
538
+ "format.changeCase": {
539
+ mode?: "sentence" | "lower" | "upper" | "title" | "toggle";
540
+ };
541
+ /** Clear All Formatting. Clears all formatting from the selection, as Word's Clear All Formatting: its character formatting goes and its paragraphs become Normal (format.resetChar keeps the paragraph style). Params: {}. Reads the selection. Changes the document. */
542
+ "format.clear": Record<string, never>;
543
+ /** Reset Character Formatting. Removes the selection's own character formatting (or the formatting picked at the caret), keeping the paragraph's style and paragraph formatting, as Word's Ctrl+Space. Params: {}. Reads the selection. Changes the document. */
544
+ "format.resetChar": Record<string, never>;
545
+ /** Character Spacing. Expands or condenses the spacing between the selected characters by points. Params: {"points": number}. Reads the selection. Changes the document. */
546
+ "format.spacing": {
547
+ points?: number;
548
+ };
549
+ /** Character Scale. Stretches or squeezes the selected characters horizontally by a percentage. Params: {"percent": number}. Reads the selection. Changes the document. */
550
+ "format.scale": {
551
+ percent?: number;
552
+ };
553
+ /** Character Position. Raises or lowers the selected characters from the baseline by points. Params: {"points": number}. Reads the selection. Changes the document. */
554
+ "format.position": {
555
+ points?: number;
556
+ };
557
+ /** Apply Character Style. Applies a character style to the selection. Params: {"style": string}. Reads the selection, mode. Changes the document. */
558
+ "format.charStyle": {
559
+ style?: string;
560
+ };
561
+ /** Set Character Formatting. Sets several character properties of the selection in one call (font, size, colour, bold, italic, underline...); the general form of the format.* commands. Params: {"props": CharProps}. Reads the selection. Changes the document. */
562
+ "format.set": {
563
+ props?: {
564
+ [key: string]: Json;
565
+ };
566
+ };
567
+ /** Font Dialog. Answers the selection's character formatting as the Font dialog shows it. Params: {}. Reads the selection. */
568
+ "format.fontDialog": {
569
+ name?: string;
570
+ };
571
+ /** Formatting at Selection. Answers the character and paragraph formatting at the selection (font, size, bold, italic, style, alignment...), as the ribbon shows it. Params: {}. Reads the selection. */
572
+ "format.state": Record<string, never>;
573
+ /** Align Left. Aligns the selected paragraphs to the left. Params: {}. Reads the selection. Changes the document. */
574
+ "para.alignLeft": Record<string, never>;
575
+ /** Center. Centres the selected paragraphs. Params: {}. Reads the selection. Changes the document. */
576
+ "para.alignCenter": Record<string, never>;
577
+ /** Align Right. Aligns the selected paragraphs to the right. Params: {}. Reads the selection. Changes the document. */
578
+ "para.alignRight": Record<string, never>;
579
+ /** Justify. Justifies the selected paragraphs between the margins. Params: {}. Reads the selection. Changes the document. */
580
+ "para.justify": {
581
+ jc?: string;
582
+ };
583
+ /** Distributed. Distributes the characters of the selected paragraphs evenly across the line. Params: {}. Reads the selection. Changes the document. */
584
+ "para.distribute": Record<string, never>;
585
+ /** Alignment. Sets the alignment of the selected paragraphs by name, as seen on the page (left, center, right, justify, distribute) or in reading order (start, end). Params: {"value": "left|center|right|justify|distribute (as seen on the page) | start|end (reading direction)"}. Reads the selection. Changes the document. */
586
+ "para.align": {
587
+ jc?: string;
588
+ value?: "left" | "center" | "right" | "justify" | "distribute (as seen on the page)" | "start" | "end (reading direction)";
589
+ };
590
+ /** Right-to-Left Text Direction. Makes the selected paragraphs right to left (true) or left to right (false). Params: {"value"?: bool (false = left to right)}. Reads the selection. Changes the document. */
591
+ "para.rtl": {
592
+ value?: boolean;
593
+ };
594
+ /** Left-to-Right Text Direction. Makes the selected paragraphs left to right (true) or right to left (false). Params: {"value"?: bool (false = right to left)}. Reads the selection. Changes the document. */
595
+ "para.ltr": {
596
+ value?: boolean;
597
+ };
598
+ /** Increase Indent. Increases the left indent of the selected paragraphs by one step. Params: {}. Reads the selection. Changes the document. */
599
+ "para.indent": Record<string, never>;
600
+ /** Decrease Indent. Decreases the left indent of the selected paragraphs by one step. Params: {}. Reads the selection. Changes the document. */
601
+ "para.outdent": Record<string, never>;
602
+ /** Hanging Indent. Adds a hanging indent to the selected paragraphs, or increases it. Params: {}. Reads the selection. Changes the document. */
603
+ "para.hangingIndent": Record<string, never>;
604
+ /** Reduce Hanging Indent. Reduces the hanging indent of the selected paragraphs. Params: {}. Reads the selection. Changes the document. */
605
+ "para.removeHanging": Record<string, never>;
606
+ /** Indents. Sets the left, right and first-line indents of the selected paragraphs in points (a negative first line is hanging). Params: {"left"?: pt, "right"?: pt, "firstLine"?: pt (negative = hanging)}. Reads the selection. Changes the document. */
607
+ "para.indents": {
608
+ firstLine?: number; /** points */
609
+ left?: number; /** points */
610
+ right?: number;
611
+ };
612
+ /** Line and Paragraph Spacing. Sets the line spacing of the selected paragraphs as a multiple, as at least some points, or as exactly some points. Params: {"value": number (multiple) } | {"atLeast": pt} | {"exactly": pt}. Reads the selection. Changes the document. */
613
+ "para.lineSpacing": {
614
+ atLeast?: number; /** points; in one of several forms of the parameters */
615
+ exactly?: number; /** multiple; in one of several forms of the parameters */
616
+ value?: number;
617
+ };
618
+ /** Single Spacing. Sets single line spacing on the selected paragraphs. Params: {}. Reads the selection. Changes the document. */
619
+ "para.single": Record<string, never>;
620
+ /** Double Spacing. Sets double line spacing on the selected paragraphs. Params: {}. Reads the selection. Changes the document. */
621
+ "para.double": Record<string, never>;
622
+ /** 1.5 Line Spacing. Sets 1.5 line spacing on the selected paragraphs. Params: {}. Reads the selection. Changes the document. */
623
+ "para.oneAndHalf": Record<string, never>;
624
+ /** Paragraph Spacing. Sets the space before and after the selected paragraphs in points. Params: {"before"?: pt, "after"?: pt}. Reads the selection. Changes the document. */
625
+ "para.spacing": {
626
+ after?: number; /** points */
627
+ before?: number;
628
+ };
629
+ /** Add Space Before Paragraph. Adds 12 points of space before the selected paragraphs. Params: {}. Reads the selection. Changes the document. */
630
+ "para.addSpaceBefore": Record<string, never>;
631
+ /** Remove Space After Paragraph. Removes the space after the selected paragraphs. Params: {}. Reads the selection. Changes the document. */
632
+ "para.removeSpaceAfter": Record<string, never>;
633
+ /** Apply Style. Applies a paragraph style (by name or id, such as Heading 1 or Quote) to the selected paragraphs; styles.list names them. Params: {"style": string (name or id)}. Reads the selection, mode. Changes the document. */
634
+ "para.style": {
635
+ style?: string;
636
+ };
637
+ /** Normal Style. Applies the Normal style to the selected paragraphs. Params: {}. Reads the selection. Changes the document. */
638
+ "para.normal": {
639
+ style?: string;
640
+ };
641
+ /** Heading 1. Applies the Heading 1 style to the selected paragraphs. Params: {}. Reads the selection. Changes the document. */
642
+ "para.heading1": {
643
+ style?: string;
644
+ };
645
+ /** Heading 2. Applies the Heading 2 style to the selected paragraphs. Params: {}. Reads the selection. Changes the document. */
646
+ "para.heading2": {
647
+ style?: string;
648
+ };
649
+ /** Heading 3. Applies the Heading 3 style to the selected paragraphs. Params: {}. Reads the selection. Changes the document. */
650
+ "para.heading3": {
651
+ style?: string;
652
+ };
653
+ /** Bullets. Makes the selected paragraphs a bulleted list (with a bullet kind or character), or removes the bullets with off. Params: {"kind"?: "bullet" | single char, "off"?: bool}. Reads the selection. Changes the document. */
654
+ "para.bullets": {
655
+ kind?: string;
656
+ off?: boolean;
657
+ };
658
+ /** Numbering. Makes the selected paragraphs a numbered list in a format (1., 1), A., a., i., outline), or removes numbering with off. Params: {"kind"?: "numbered|numberedParen|upperLetter|lowerLetter|lowerRoman|outline", "off"?: bool}. Reads the selection. Changes the document. */
659
+ "para.numbering": {
660
+ kind?: "numbered" | "numberedParen" | "upperLetter" | "lowerLetter" | "lowerRoman" | "outline";
661
+ off?: boolean;
662
+ };
663
+ /** Multilevel List. Applies a multilevel list (legal or outline numbering) to the selected paragraphs. Params: {"kind"?: "legal|outline"}. Reads the selection. Changes the document. */
664
+ "para.multilevel": {
665
+ kind?: "legal" | "outline"; /** read by the command beside its listed parameters */
666
+ off?: boolean;
667
+ };
668
+ /** Change List Level. Sets the list level (0 to 8) of the selected list paragraphs. Params: {"level": 0-8}. Reads the selection. Changes the document. */
669
+ "para.listLevel": {
670
+ level?: number;
671
+ };
672
+ /** Restart at 1. Restarts the numbering of the list at the caret from 1. Params: {}. Reads the selection. Changes the document. */
673
+ "para.restartNumbering": Record<string, never>;
674
+ /** Shading. Sets the background shading of the selected paragraphs as RRGGBB, or removes it with null. Params: {"color": "RRGGBB" | null}. Reads the selection. Changes the document. */
675
+ "para.shading": {
676
+ color?: Json;
677
+ };
678
+ /** Borders. Applies a paragraph border (bottom, top, box, inside, none...) to the selected paragraphs, with width and colour. Params: {"kind": "bottom|top|left|right|none|all|outside|inside|horizontalLine", "width"?: pt, "color"?: "RRGGBB", "style"?: "single|double|dotted|dashed|thick|triple|dotDash|wave", "sides"?: Sides} where Sides = {"top"|"left"|"bottom"|"right"|"between": {"style"?, "width"?: pt, "color"?: "RRGGBB"} | null}: exactly these sides (others off), instead of `kind`. Reads the selection. Changes the document. */
679
+ "para.borders": {
680
+ color?: string;
681
+ kind?: "bottom" | "top" | "left" | "right" | "none" | "all" | "outside" | "inside" | "horizontalLine"; /** borders per side */
682
+ sides?: {
683
+ bottom?: {
684
+ color?: string;
685
+ style?: string;
686
+ width?: number;
687
+ };
688
+ left?: {
689
+ color?: string;
690
+ style?: string;
691
+ width?: number;
692
+ };
693
+ right?: {
694
+ color?: string;
695
+ style?: string;
696
+ width?: number;
697
+ };
698
+ top?: {
699
+ color?: string;
700
+ style?: string;
701
+ width?: number;
702
+ };
703
+ };
704
+ style?: "single" | "double" | "dotted" | "dashed" | "thick" | "triple" | "dotDash" | "wave"; /** points */
705
+ width?: number;
706
+ };
707
+ /** Sort. Sorts the selected paragraphs alphabetically, ascending or descending. Params: {"descending"?: bool}. Reads the selection. Changes the document. */
708
+ "para.sort": {
709
+ descending?: boolean;
710
+ };
711
+ /** Keep with Next. Toggles keep-with-next on the selected paragraphs so they stay on the page with the following one. Params: {}. Reads the selection. Changes the document. */
712
+ "para.keepNext": {
713
+ value?: boolean;
714
+ };
715
+ /** Keep Lines Together. Toggles keeping all lines of the selected paragraphs on one page. Params: {}. Reads the selection. Changes the document. */
716
+ "para.keepLines": {
717
+ value?: boolean;
718
+ };
719
+ /** Page Break Before. Toggles a page break before the selected paragraphs. Params: {}. Reads the selection. Changes the document. */
720
+ "para.pageBreakBefore": {
721
+ value?: boolean;
722
+ };
723
+ /** Widow/Orphan Control. Toggles widow and orphan control on the selected paragraphs. Params: {}. Reads the selection. Changes the document. */
724
+ "para.widowControl": {
725
+ value?: boolean;
726
+ };
727
+ /** Asian Typography. Sets East Asian typography options of the selected paragraphs: line-breaking rules, word wrap and punctuation compression. Params: {"kinsoku"?: bool (East Asian line-breaking rules), "wordWrap"?: bool (false: Latin words may break at any character), "overflowPunct"?: bool (hanging punctuation), "topLinePunct"?: bool (compress punctuation at the start of a line), "autoSpaceDE"?: bool (space between Asian and Latin text), "autoSpaceDN"?: bool (space between Asian text and numbers)} ? flags left out stay as they are; returns the flags at the caret. Reads the selection. Changes the document. */
728
+ "para.asianTypography": {
729
+ autoSpaceDE?: boolean; /** space between Asian text and numbers */
730
+ autoSpaceDN?: boolean; /** East Asian line-breaking rules */
731
+ kinsoku?: boolean; /** hanging punctuation */
732
+ overflowPunct?: boolean; /** compress punctuation at the start of a line */
733
+ topLinePunct?: boolean; /** false: Latin words may break at any character */
734
+ wordWrap?: boolean;
735
+ };
736
+ /** Tabs. Replaces, sets or clears tab stops (position, alignment, leader) of the selected paragraphs. Params: {"tabs"?: [TabStop] (replace the direct stops), "set"?: [TabStop], "clear"?: [pt], "clearAll"?: bool, "default"?: pt} where TabStop = {"pos": pt, "align"?: "left|center|right|decimal|bar", "leader"?: "none|dot|hyphen|underscore|middleDot"}. Reads the selection. Changes the document. */
737
+ "para.tabs": {
738
+ clear?: Array<number>;
739
+ clearAll?: boolean; /** points */
740
+ default?: number; /** [TabStop] */
741
+ set?: Array<Json>; /** [TabStop] (replace the direct stops); replace the direct stops */
742
+ tabs?: Array<Json>;
743
+ };
744
+ /** Outline Level. Steps the outline level of the selected paragraphs. Params: {}. Reads the selection. Changes the document. */
745
+ "para.outlineLevel": {
746
+ level?: number;
747
+ };
748
+ /** Set Paragraph Formatting. Sets several paragraph properties of the selected paragraphs in one call (alignment, indents, spacing, line spacing, keep options...). Params: {"props": ParaProps}. Reads the selection. Changes the document. */
749
+ "para.set": {
750
+ props?: {
751
+ [key: string]: Json;
752
+ };
753
+ };
754
+ /** Paragraph Settings. Answers a paragraph's formatting as the Paragraph dialog shows it: the caret's paragraph, or the one at path. props is in the form para.set takes; direct holds only the paragraph's own settings. Params: {"path"?: [n] (default: the caret's paragraph), "story"?: Story} ? {"props": the paragraph's formatting as para.set takes it, "direct": its own (not inherited) settings, "anchor", "focus"}. Reads the selection. */
755
+ "para.dialog": {
756
+ path?: Array<number>; /** Story */
757
+ story?: Json;
758
+ };
759
+ /** Create a Style. Creates a new paragraph style, based on another style or on the selection's formatting. Params: {"name": string, "basedOn"?: string, "fromSelection"?: bool}. Reads the selection. Changes the document. */
760
+ "styles.create": {
761
+ basedOn?: string;
762
+ fromSelection?: boolean;
763
+ name?: string;
764
+ };
765
+ /** Modify Style. Changes a style's character or paragraph properties, its name or its next style; every paragraph using it changes. Params: {"style": string, "chr"?: CharProps, "para"?: ParaProps, "name"?: string, "next"?: string}. Changes the document. */
766
+ "styles.modify": {
767
+ chr?: {
768
+ [key: string]: Json;
769
+ };
770
+ name?: string;
771
+ next?: string; /** paragraph properties as para.dialog answers them (alignment, indents, spacing...); colours (shading, border colors) are "RRGGBB" */
772
+ para?: {
773
+ [key: string]: Json;
774
+ };
775
+ style?: string;
776
+ };
777
+ /** Update Style to Match Selection. Updates a style (default: the selection's) to match the selection's formatting. Params: {"style"?: string}. Reads the selection. Changes the document. */
778
+ "styles.updateToMatch": {
779
+ style?: string;
780
+ };
781
+ /** Delete Style. Deletes a custom style; paragraphs that used it fall back to its base style. Params: {"style": string (name or id; custom styles only)}. Changes the document. */
782
+ "styles.delete": {
783
+ style?: string;
784
+ };
785
+ /** Manage Styles. Lists the document's styles with their id, name, type and whether they show in the gallery, sorted as recommended or alphabetically. Params: {"sort"?: "recommended|alphabetical"} ? [{id, name, type: "paragraph|character|linked|table", builtIn, inGallery, hidden, basedOn, priority, format}]. Reads the selection. */
786
+ "styles.manage": {
787
+ sort?: "recommended" | "alphabetical";
788
+ };
789
+ /** Show or Hide Style. Shows or hides a style in the Styles gallery and the style lists. Params: {"style": string, "gallery"?: bool (Styles gallery, w:qFormat), "hidden"?: bool (hidden from style lists, w:semiHidden)}. Changes the document. */
790
+ "styles.setVisibility": {
791
+ gallery?: boolean; /** hidden from style lists, w:semiHidden */
792
+ hidden?: boolean;
793
+ style?: string;
794
+ };
795
+ /** Styles. Lists the styles shown in the Styles gallery with their names and ids. Params: {}. Reads the selection. */
796
+ "styles.list": Record<string, never>;
797
+ /** Styles Pane. Shows or hides the Styles pane in the editor. Params: {}. Reads the selection. */
798
+ "styles.pane": Record<string, never>;
799
+ /** Apply Styles. Opens the Apply Styles box in the editor, or applies a style by name when given. Params: {"style"?: string (name or id)}. Reads the selection. */
800
+ "styles.apply": {
801
+ style?: string;
802
+ };
803
+ /** Add to Style Gallery. Adds the selection's style to the Styles gallery. Params: {}. Changes the document. */
804
+ "styles.addToGallery": {
805
+ style?: string; /** read by the command beside its listed parameters */
806
+ value?: boolean;
807
+ };
808
+ /** Define New Multilevel List. Defines a new multilevel list (number format, text, start, indents per level) and applies it to the selected paragraphs; a number format it can't draw is refused. Params: {"levels": [{"format"?: "decimal|upperRoman|lowerRoman|upperLetter|lowerLetter|ordinal|cardinalText|ordinalText|decimalZero|bullet|none|chineseCounting|chineseCountingThousand|chineseLegalSimplified|decimalEnclosedCircle|decimalEnclosedCircleChinese|ideographDigital" (other formats are refused), "text"?: "%1.%2." (%n = level n's number; the bullet character for bullet), "start"?: n, "restartAfter"?: 0-8 (0 = never; omit = the level above), "style"?: paragraph style linked to the level | null, "align"?: "left|center|right", "alignedAt"?: pt, "indentAt"?: pt, "follow"?: "tab|space|nothing", "tabAt"?: pt | null, "font"?: string | null, "bold"?: bool, "italic"?: bool, "color"?: "RRGGBB" | null, "legal"?: bool}, ...] (index = level, up to 9; fields left out keep the base list's), "num"?: list id to change in place (default: a new list), "apply"?: bool (default true: number the selected paragraphs), "name"?: string}. Reads the selection. Changes the document. */
809
+ "list.define": {
810
+ apply?: boolean; /** [{"format"?: "decimal|upperRoman|lowerRoman|upperLetter|lowerLetter|ordinal|cardinalText|ordinalText|decimalZero|bullet|none|chineseCounting|chineseCountingThousand|chineseLegalSimplified|decimalEnclosedCircle|decimalEnclosedCircleChinese|ideographDigital" (other formats are refused), "text"?: "%1.%2." (%n = level n's number; the bullet character for bullet), "start"?: n, "restartAfter"?: 0-8 (0 = never; omit = the level above), "style"?: paragraph style linked to the level | null, "align"?: "left|center|right", "alignedAt"?: pt, "indentAt"?: pt, "follow"?: "tab|space|nothing", "tabAt"?: pt | null, "font"?: string | null, "bold"?: bool, "italic"?: bool, "color"?: "RRGGBB" | null, "legal"?: bool}, ...] (index = level, up to 9; fields left out keep the base list's); other formats are refused; %n = level n's number; the bullet character for bullet; 0 = never; omit = the level above; index = level, up to 9; fields left out keep the base list's */
811
+ levels?: Array<Json>;
812
+ name?: string; /** list id to change in place (default: a new list) */
813
+ num?: number;
814
+ };
815
+ /** List Definition. Answers a list's definition (each level's format, text and indents); default: the list at the caret. Params: {"num"?: list id (default: the caret's list)} ? {"num", "levels": [as list.define]}. Reads the selection. */
816
+ "list.get": {
817
+ num?: number;
818
+ };
819
+ /** Style Inspector. Shows or hides the Style Inspector pane in the editor. Params: {"value"?: bool (show/hide the pane)}. Reads the selection. */
820
+ "styles.inspector": {
821
+ value?: boolean;
822
+ };
823
+ /** Inspect Styles at Selection. Answers the formatting layers at the selection: paragraph style, direct paragraph formatting, character style and direct character formatting. Params: {}. Reads the selection. */
824
+ "styles.inspect": Record<string, never>;
825
+ /** Clear Formatting Level. Clears one formatting layer at the selection (paragraph style, paragraph formatting, character style or character formatting). Params: {"level": "paragraphStyle|paragraphFormatting|characterStyle|characterFormatting"}. Reads the selection. Changes the document. */
826
+ "styles.inspectorClear": {
827
+ level?: "paragraphStyle" | "paragraphFormatting" | "characterStyle" | "characterFormatting";
828
+ };
829
+ /** Show/Hide ?. Shows or hides formatting marks (paragraph marks, spaces, tabs) in the editor. Params: {}. Reads the selection. */
830
+ "view.marks": {
831
+ value?: boolean;
832
+ };
833
+ /** Print Layout. Switches the editor to Print Layout, showing pages as they print. Params: {}. Reads the selection. */
834
+ "view.printLayout": Record<string, never>;
835
+ /** Web Layout. Switches the editor to Web Layout, without page breaks. Params: {}. Reads the selection. */
836
+ "view.webLayout": Record<string, never>;
837
+ /** Draft. Switches the editor to Draft view. Params: {}. Reads the selection. */
838
+ "view.draft": Record<string, never>;
839
+ /** Outline. Switches the editor to Outline view, showing headings by level. Params: {}. Reads the selection. */
840
+ "view.outline": Record<string, never>;
841
+ /** Read Mode. Switches the editor to Read Mode. Params: {}. Reads the selection. */
842
+ "view.readMode": Record<string, never>;
843
+ /** Focus. Switches the editor to Focus mode, hiding the ribbon. Params: {}. Reads the selection. */
844
+ "view.focus": {
845
+ value?: boolean;
846
+ };
847
+ /** Ruler. Shows or hides the ruler in the editor. Params: {}. Reads the selection. */
848
+ "view.ruler": {
849
+ value?: boolean;
850
+ };
851
+ /** Gridlines. Shows or hides the page gridlines in the editor. Params: {"value"?: bool}. Reads the selection. */
852
+ "view.gridlines": {
853
+ value?: boolean;
854
+ };
855
+ /** View Gridlines. Shows or hides gridlines for table cells without borders in the editor. Params: {"value"?: bool}. Reads the selection. */
856
+ "table.viewGridlines": {
857
+ value?: boolean;
858
+ };
859
+ /** Navigation Pane. Shows or hides the Navigation pane (headings) in the editor. Params: {}. Reads the selection. */
860
+ "view.navigationPane": {
861
+ value?: boolean;
862
+ };
863
+ /** Zoom. Sets the editor zoom to a percentage (10 to 500) or to page width, one page or multiple pages. Params: {"value": percent (10-500) | "pageWidth" | "onePage" | "multiplePages"}. Reads the selection. */
864
+ "view.zoom": {
865
+ value?: Json;
866
+ };
867
+ /** 100%. Sets the editor zoom to 100%. Params: {}. Reads the selection. */
868
+ "view.zoom100": {
869
+ value?: boolean;
870
+ };
871
+ /** Zoom In. Zooms the editor in one step. Params: {}. Reads the selection. */
872
+ "view.zoomIn": {
873
+ value?: boolean;
874
+ };
875
+ /** Zoom Out. Zooms the editor out one step. Params: {}. Reads the selection. */
876
+ "view.zoomOut": {
877
+ value?: boolean;
878
+ };
879
+ /** One Page. Zooms the editor to show one whole page. Params: {}. Reads the selection. */
880
+ "view.onePage": {
881
+ value?: boolean;
882
+ };
883
+ /** Multiple Pages. Zooms the editor to show several pages side by side. Params: {}. Reads the selection. */
884
+ "view.multiplePages": {
885
+ value?: boolean;
886
+ };
887
+ /** Page Width. Zooms the editor to the page width. Params: {}. Reads the selection. */
888
+ "view.pageWidth": {
889
+ value?: boolean;
890
+ };
891
+ /** Switch Modes. Switches the editor between dark and light page colours. Params: {}. Reads the selection. */
892
+ "view.darkMode": {
893
+ value?: boolean;
894
+ };
895
+ /** Styles Pane. Shows or hides the Styles pane in the editor. Params: {}. Reads the selection. */
896
+ "view.stylesPane": {
897
+ value?: boolean;
898
+ };
899
+ /** Comments Pane. Shows or hides the Comments pane in the editor. Params: {}. Reads the selection. */
900
+ "view.commentsPane": {
901
+ value?: boolean;
902
+ };
903
+ /** New Window. Opens a second editor window on the same document. Params: {}. Reads the selection. */
904
+ "view.newWindow": Record<string, never>;
905
+ /** Split. Splits the editor window into two panes on the same document, or removes the split. Params: {}. Reads the selection. */
906
+ "view.split": {
907
+ value?: boolean;
908
+ };
909
+ /** View State. Answers the editor's view settings: view mode, zoom, panes, marks, ruler and gridlines. Params: {}. Reads the selection. */
910
+ "view.state": Record<string, never>;
911
+ /** Page Break. Inserts a page break at the caret so the following text starts on a new page. Params: {}. Reads the selection. Changes the document. */
912
+ "insert.pageBreak": Record<string, never>;
913
+ /** Blank Page. Inserts an empty page at the caret. Params: {}. Reads the selection. Changes the document. */
914
+ "insert.blankPage": Record<string, never>;
915
+ /** Cover Page. Inserts a one-page cover at the start of the document with a title, subtitle, author and, when given, a date (no date otherwise); title, subtitle and author default to the document's Title, Subject and Author properties. The caret stays where it was. Params: {"title"?: string, "subtitle"?: string, "author"?: string, "date"?: string}. Reads the selection. Changes the document. */
916
+ "insert.coverPage": {
917
+ author?: string;
918
+ date?: string;
919
+ subtitle?: string;
920
+ title?: string;
921
+ };
922
+ /** Table. Inserts a table with the given rows and columns at the caret, optionally with a table style; the caret moves into its first cell. Params: {"rows": n, "cols": n, "style"?: string}. Reads the selection. Changes the document. */
923
+ "insert.table": {
924
+ cols?: number;
925
+ rows?: number;
926
+ style?: string;
927
+ };
928
+ /** Pictures. Inserts a picture from a path or base64 data at the caret, with a width in points and alternative text. Params: {"path"?: string, "data"?: base64, "width"?: pt, "alt"?: string}. Reads the selection. Changes the document. */
929
+ "insert.picture": {
930
+ alt?: string; /** the picture's bytes in base64 */
931
+ data?: string;
932
+ path?: Json; /** points */
933
+ width?: number;
934
+ };
935
+ /** Shapes. Inserts a floating shape (rectangle, ellipse, triangle, arrow, star...) at the caret with a size, fill and text. Params: {"kind": "rectangle|roundedRectangle|ellipse|triangle|diamond|line|arrow|star|heart", "width"?: pt, "height"?: pt, "fill"?: "RRGGBB", "stroke"?: "RRGGBB"}. Reads the selection. Changes the document. */
936
+ "insert.shape": {
937
+ fill?: string; /** points */
938
+ height?: number;
939
+ kind?: "rectangle" | "roundedRectangle" | "ellipse" | "triangle" | "diamond" | "line" | "arrow" | "star" | "heart"; /** like RRGGBB */
940
+ stroke?: string; /** points */
941
+ width?: number;
942
+ };
943
+ /** Text Box. Inserts a floating text box at the caret with text and a size. Params: {"text"?: string, "width"?: pt, "height"?: pt}. Reads the selection. Changes the document. */
944
+ "insert.textBox": {
945
+ height?: number;
946
+ text?: string; /** points */
947
+ width?: number;
948
+ };
949
+ /** Link. Turns the selection into a hyperlink to a URL, or inserts linked text at the caret. Params: {"url": string, "text"?: string}. Reads the selection. Changes the document. */
950
+ "insert.link": {
951
+ text?: string;
952
+ url?: string;
953
+ };
954
+ /** Remove Hyperlink. Removes the hyperlink at the caret or selection, keeping its text. Params: {}. Reads the selection. Changes the document. */
955
+ "insert.removeLink": {
956
+ text?: string; /** read by the command beside its listed parameters */
957
+ url?: string;
958
+ };
959
+ /** Bookmark. Adds a named bookmark at the selection, for edit.goto and cross-references. Params: {"name": string}. Reads the selection. Changes the document. */
960
+ "insert.bookmark": {
961
+ name?: string;
962
+ };
963
+ /** Header. Sets the header of the current section from text or a preset layout. Params: {"text"?: string, "preset"?: "blank|blankThree|title"}. Reads the selection. Changes the document. */
964
+ "insert.header": {
965
+ preset?: "blank" | "blankThree" | "title";
966
+ text?: string;
967
+ };
968
+ /** Footer. Sets the footer of the current section from text or a preset layout. Params: {"text"?: string, "preset"?: "blank|blankThree|pageNumber"}. Reads the selection. Changes the document. */
969
+ "insert.footer": {
970
+ preset?: "blank" | "blankThree" | "pageNumber";
971
+ text?: string;
972
+ };
973
+ /** Page Number. Inserts a page number field at the top or bottom of the page or at the caret, aligned left, centre or right (at the caret: the caret's paragraph, when align is given), optionally as Page x of y. Params: {"position"?: "top|bottom|current", "align"?: "left|center|right", "format"?: "x of y"}. Reads the selection. Changes the document. */
974
+ "insert.pageNumber": {
975
+ align?: "left" | "center" | "right"; /** like x of y */
976
+ format?: string;
977
+ position?: "top" | "bottom" | "current";
978
+ };
979
+ /** Edit Header. Moves the caret into the header of the current section for editing. Params: {}. Reads the selection. Changes the document. */
980
+ "insert.editHeader": Record<string, never>;
981
+ /** Edit Footer. Moves the caret into the footer of the current section for editing. Params: {}. Reads the selection. Changes the document. */
982
+ "insert.editFooter": Record<string, never>;
983
+ /** Close Header and Footer. Leaves the header, footer or note and returns the caret to where it was in the body (after a note's reference mark). Params: {}. Reads the selection. */
984
+ "insert.closeHeader": Record<string, never>;
985
+ /** Remove Header. Removes the header of the current section. Params: {}. Reads the selection. Changes the document. */
986
+ "insert.removeHeader": Record<string, never>;
987
+ /** Remove Footer. Removes the footer of the current section. Params: {}. Reads the selection. Changes the document. */
988
+ "insert.removeFooter": Record<string, never>;
989
+ /** Date & Time. Inserts the current date or time at the caret in a format, as fixed text or as a field that updates. Params: {"format"?: "M/d/yyyy", "update"?: bool}. Reads the selection. Changes the document. */
990
+ "insert.dateTime": {
991
+ format?: string;
992
+ update?: boolean;
993
+ };
994
+ /** Symbol. Inserts a character at the caret, optionally in its own symbol font. Params: {"char": string, "font"?: family (the symbol's own font)}. Reads the selection. Changes the document. */
995
+ "insert.symbol": {
996
+ char?: string; /** the symbol's own font */
997
+ font?: string;
998
+ };
999
+ /** Field. Inserts a field code (PAGE, DATE, REF...) at the caret with an optional result text. Params: {"instr": string, "result"?: string}. Reads the selection. Changes the document. */
1000
+ "insert.field": {
1001
+ instr?: string;
1002
+ result?: string;
1003
+ };
1004
+ /** Drop Cap. Makes the first letter of the paragraph at the caret a drop cap over a number of lines (0 removes it). Params: {"lines"?: n (0 = none)}. Reads the selection. Changes the document. */
1005
+ "insert.dropCap": {
1006
+ lines?: number;
1007
+ };
1008
+ /** Horizontal Line. Inserts a horizontal line paragraph at the caret. Params: {}. Reads the selection. Changes the document. */
1009
+ "insert.horizontalLine": Record<string, never>;
1010
+ /** Art text. Inserts decorative art text, optionally warped by a preset. Params: {"text"?: string, "warp"?: preset (textArchUp, textWave1, textInflate...)}. Reads the selection. Changes the document. */
1011
+ "insert.artText": {
1012
+ text?: string;
1013
+ warp?: Json;
1014
+ };
1015
+ /** Text from File. Inserts the text of a file at the caret. Params: {"path": string}. Reads the selection. Changes the document. */
1016
+ "insert.textFromFile": {
1017
+ path?: Json; /** read by the command beside its listed parameters */
1018
+ text?: string;
1019
+ };
1020
+ /** Equation. Inserts an equation at the caret from linear format, LaTeX or a built-in equation (Pythagoras, quadratic...), and puts the caret in it. Params: {"linear"?: string, "latex"?: string, "builtin"?: "pythagoras|area|quadratic|binomial|expansion|euler|derivative|taylor|gaussian|fourier|trig1|trig2|normal|bayes", "display"?: bool, "edit"?: bool (default true)}. Reads the selection. Changes the document. */
1021
+ "insert.equation": {
1022
+ builtin?: "pythagoras" | "area" | "quadratic" | "binomial" | "expansion" | "euler" | "derivative" | "taylor" | "gaussian" | "fourier" | "trig1" | "trig2" | "normal" | "bayes";
1023
+ display?: boolean; /** default true */
1024
+ edit?: boolean; /** read by the command beside its listed parameters */
1025
+ id?: string;
1026
+ latex?: string;
1027
+ linear?: string;
1028
+ };
1029
+ /** Edit Equation. Puts the caret into the equation at the selection, optionally at a position inside it. Params: {"pos"?: {"path": [[node, child]...], "off": n}}. Reads the selection. */
1030
+ "equation.edit": {
1031
+ pos?: {
1032
+ off?: number;
1033
+ path?: Array<Json>;
1034
+ };
1035
+ };
1036
+ /** Leave Equation. Leaves the equation, putting the caret after it (or before it). Params: {"before"?: bool}. Reads the selection. */
1037
+ "equation.exit": {
1038
+ before?: boolean;
1039
+ };
1040
+ /** Type in Equation. Types text into the equation at the caret; linear-format input builds structures. Params: {"text": string}. Reads the selection, mode. Changes the document. */
1041
+ "equation.type": {
1042
+ text?: string;
1043
+ };
1044
+ /** Insert Structure. Inserts a structure (fraction, script, radical...) into the equation by gallery id, linear format or LaTeX. Params: {"id"?: string (see equation.gallery), "linear"?: string, "latex"?: string}. Reads the selection, mode. Changes the document. */
1045
+ "equation.insertStructure": {
1046
+ builtin?: string; /** see equation.gallery */
1047
+ id?: string;
1048
+ latex?: string;
1049
+ linear?: string;
1050
+ };
1051
+ /** Insert Symbol. Inserts a math symbol into the equation at the caret. Params: {"char": string}. Reads the selection, mode. Changes the document. */
1052
+ "equation.insertSymbol": {
1053
+ char?: string;
1054
+ };
1055
+ /** Move in Equation. Moves the caret inside the equation (left, right, up, down, home, end, next or previous slot). Params: {"dir": "left|right|up|down|home|end|next|prev"}. Reads the selection. */
1056
+ "equation.move": {
1057
+ dir?: "left" | "right" | "up" | "down" | "home" | "end" | "next" | "prev";
1058
+ };
1059
+ /** Delete Back in Equation. Deletes backwards in the equation at the caret. Params: {}. Reads the selection, mode. Changes the document. */
1060
+ "equation.backspace": Record<string, never>;
1061
+ /** Delete in Equation. Deletes forwards in the equation at the caret. Params: {}. Reads the selection, mode. Changes the document. */
1062
+ "equation.delete": Record<string, never>;
1063
+ /** Enter in Equation. Adds a new line in the equation at the caret. Params: {}. Reads the selection, mode. Changes the document. */
1064
+ "equation.enter": Record<string, never>;
1065
+ /** Convert. Converts the equation (or every equation) between professional (built up) and linear form. Params: {"to": "professional|linear", "all"?: bool}. Reads the selection, mode. Changes the document. */
1066
+ "equation.convert": {
1067
+ all?: boolean;
1068
+ to?: "professional" | "linear";
1069
+ };
1070
+ /** Input Format. Sets how typed equation input is read: Unicode linear format or LaTeX. Params: {"format": "unicode|latex"}. Reads the selection. */
1071
+ "equation.inputFormat": {
1072
+ format?: "unicode" | "latex";
1073
+ };
1074
+ /** Normal Text. Turns normal (non-math) text entry on or off in the equation. Params: {"value"?: bool}. Reads the selection. */
1075
+ "equation.normalText": {
1076
+ value?: boolean;
1077
+ };
1078
+ /** Change to Display. Makes the equation a display equation on its own line, or inline. Params: {"value"?: bool}. Reads the selection, mode. Changes the document. */
1079
+ "equation.display": {
1080
+ value?: boolean;
1081
+ };
1082
+ /** Justification. Sets the justification of a display equation (centred as a group, centred, left or right). Params: {"jc": "centerGroup|center|left|right"}. Reads the selection, mode. Changes the document. */
1083
+ "equation.justify": {
1084
+ jc?: "centerGroup" | "center" | "left" | "right";
1085
+ };
1086
+ /** Equation Number. Adds or removes a number on the display equation. Params: {"value"?: bool}. Reads the selection, mode. Changes the document. */
1087
+ "equation.number": {
1088
+ value?: boolean;
1089
+ };
1090
+ /** Set Equation. Replaces the equation at the selection with linear-format or LaTeX input. Params: {"linear"?: string, "latex"?: string}. Reads the selection, mode. Changes the document. */
1091
+ "equation.set": {
1092
+ builtin?: string; /** read by the command beside its listed parameters */
1093
+ id?: string;
1094
+ latex?: string;
1095
+ linear?: string;
1096
+ };
1097
+ /** Equation Info. Answers the equation at the selection as linear format and LaTeX, with its structure. Params: {}. Reads the selection. */
1098
+ "equation.get": Record<string, never>;
1099
+ /** Equation Gallery. Lists the equation structures with their ids for equation.insertStructure. Params: {}. Reads the selection. */
1100
+ "equation.gallery": Record<string, never>;
1101
+ /** Structure Actions. Lists the actions available on the structure at the equation caret, for equation.structure. Params: {}. Reads the selection. */
1102
+ "equation.structureActions": Record<string, never>;
1103
+ /** Change Structure. Applies an action to the structure at the equation caret (add a row, change a delimiter...), as equation.structureActions lists. Params: {"action": string (see equation.structureActions), "level"?: n}. Reads the selection, mode. Changes the document. */
1104
+ "equation.structure": {
1105
+ action?: string;
1106
+ level?: number;
1107
+ };
1108
+ /** Margins. Sets the page margins of the current section from a preset or in points per side. Params: {"preset"?: "normal|narrow|moderate|wide|mirrored|office2003", "top"?: pt, "bottom"?: pt, "left"?: pt, "right"?: pt, "gutter"?: pt}. Reads the selection. Changes the document. */
1109
+ "layout.margins": {
1110
+ bottom?: number; /** points */
1111
+ gutter?: number; /** points */
1112
+ left?: number;
1113
+ preset?: "normal" | "narrow" | "moderate" | "wide" | "mirrored" | "office2003"; /** points */
1114
+ right?: number; /** points */
1115
+ top?: number;
1116
+ };
1117
+ /** Orientation. Sets the current section's page orientation to portrait or landscape. Params: {"value": "portrait|landscape"}. Reads the selection. Changes the document. */
1118
+ "layout.orientation": {
1119
+ value?: "portrait" | "landscape";
1120
+ };
1121
+ /** Size. Sets the current section's paper size: by name (Letter, A4...), keeping the orientation, or as a width and height in points, kept as given (wider than tall is landscape). Params: {"name"?: "Letter|Legal|A4|..." (keeps the orientation), "width"?: pt, "height"?: pt (as given: wider than tall is landscape)}. Reads the selection. Changes the document. */
1122
+ "layout.size": {
1123
+ height?: number; /** for example Letter, Legal, A4; keeps the orientation */
1124
+ name?: string; /** points */
1125
+ width?: number;
1126
+ };
1127
+ /** Columns. Sets the number of text columns (1 to 12) of the current section, with spacing, a separator line or set widths. Params: {"count": 1-12, "space"?: pt, "separator"?: bool, "preset"?: "left|right", "widths"?: [[width pt, space after pt], ...] (unequal columns; sets the count), "apply"?: "section|document|forward"}. Reads the selection. Changes the document. */
1128
+ "layout.columns": {
1129
+ apply?: "section" | "document" | "forward"; /** 1 to 12 */
1130
+ count?: number;
1131
+ preset?: "left" | "right";
1132
+ separator?: boolean; /** points */
1133
+ space?: number; /** [[width pt, space after pt], ...] (unequal columns; sets the count); unequal columns; sets the count */
1134
+ widths?: Array<Json>;
1135
+ };
1136
+ /** Breaks. Inserts a page, column or text-wrapping break, or a section break (next page, continuous, even or odd page), at the caret. Params: {"kind": "page|column|textWrapping|nextPage|continuous|evenPage|oddPage"}. Reads the selection. Changes the document. */
1137
+ "layout.break": {
1138
+ kind?: "page" | "column" | "textWrapping" | "nextPage" | "continuous" | "evenPage" | "oddPage";
1139
+ };
1140
+ /** Line Numbers. Turns line numbers in the margin off, continuous, or restarting each page or section. Params: {"value": "none|continuous|restartPage|restartSection"}. Reads the selection. Changes the document. */
1141
+ "layout.lineNumbers": {
1142
+ value?: "none" | "continuous" | "restartPage" | "restartSection";
1143
+ };
1144
+ /** Hyphenation. Toggles automatic hyphenation for the document. Params: {}. Changes the document. */
1145
+ "layout.hyphenation": {
1146
+ value?: boolean;
1147
+ };
1148
+ /** Page Setup. Changes the current section's page setup in one call: only the fields given (size, orientation, margins, columns, vertical alignment...) change, the others keep their values. Params: {"section"?: SectionProps (the fields to change, as layout.section answers them; the others are kept)}. Reads the selection. Changes the document. */
1149
+ "layout.pageSetup": {
1150
+ section?: {
1151
+ [key: string]: Json;
1152
+ };
1153
+ };
1154
+ /** Vertical Alignment. Sets the current section's vertical alignment of text on its pages: top, center or bottom. Params: {"value": "top|center|bottom"}. Reads the selection. Changes the document. */
1155
+ "layout.verticalAlign": {
1156
+ value?: "top" | "center" | "bottom";
1157
+ };
1158
+ /** Different First Page. Toggles a different header and footer on the first page of the current section. Params: {}. Reads the selection. Changes the document. */
1159
+ "layout.differentFirstPage": {
1160
+ value?: boolean;
1161
+ };
1162
+ /** Different Odd & Even Pages. Toggles different headers and footers on odd and even pages. Params: {}. Changes the document. */
1163
+ "layout.differentOddEven": {
1164
+ value?: boolean;
1165
+ };
1166
+ /** Format Page Numbers. Sets the page number format (1, i, I, a, A) and starting number of the current section. Params: {"format"?: "decimal|lowerRoman|upperRoman|lowerLetter|upperLetter", "start"?: n}. Reads the selection. Changes the document. */
1167
+ "layout.pageNumberFormat": {
1168
+ format?: "decimal" | "lowerRoman" | "upperRoman" | "lowerLetter" | "upperLetter";
1169
+ start?: number;
1170
+ };
1171
+ /** Section Properties. Answers the current section's page properties: size, orientation, margins, columns and header settings. Params: {}. Reads the selection. */
1172
+ "layout.section": Record<string, never>;
1173
+ /** Insert Above. Inserts a row above the row at the caret in its table. Params: {}. Reads the selection. Changes the document. */
1174
+ "table.insertRowAbove": Record<string, never>;
1175
+ /** Insert Below. Inserts a row below the row at the caret in its table. Params: {}. Reads the selection. Changes the document. */
1176
+ "table.insertRowBelow": Record<string, never>;
1177
+ /** Insert Left. Inserts a column to the left of the caret's column in its table. Params: {}. Reads the selection. Changes the document. */
1178
+ "table.insertColumnLeft": Record<string, never>;
1179
+ /** Insert Right. Inserts a column to the right of the caret's column in its table. Params: {}. Reads the selection. Changes the document. */
1180
+ "table.insertColumnRight": Record<string, never>;
1181
+ /** Delete Rows. Deletes the selected rows of the table at the caret. Params: {}. Reads the selection. Changes the document. */
1182
+ "table.deleteRow": Record<string, never>;
1183
+ /** Delete Columns. Deletes the selected columns of the table at the caret. Params: {}. Reads the selection. Changes the document. */
1184
+ "table.deleteColumn": Record<string, never>;
1185
+ /** Delete Table. Deletes the whole table at the caret. Params: {}. Reads the selection. Changes the document. */
1186
+ "table.deleteTable": Record<string, never>;
1187
+ /** Delete Cells. Deletes the selected cells of the table, shifting the others. Params: {}. Reads the selection. Changes the document. */
1188
+ "table.deleteCells": Record<string, never>;
1189
+ /** Merge Cells. Merges the selected table cells into one cell. Params: {}. Reads the selection. Changes the document. */
1190
+ "table.merge": Record<string, never>;
1191
+ /** Split Cells. Splits the table cell at the caret into a number of columns. Params: {"columns"?: n}. Reads the selection. Changes the document. */
1192
+ "table.split": {
1193
+ columns?: number;
1194
+ };
1195
+ /** Split Table. Splits the table into two tables above the caret's row. Params: {}. Reads the selection. Changes the document. */
1196
+ "table.splitTable": Record<string, never>;
1197
+ /** Table Styles. Applies a table style to the table at the caret. Params: {"style": string}. Reads the selection. Changes the document. */
1198
+ "table.style": {
1199
+ style?: string;
1200
+ };
1201
+ /** Table Style Options. Turns the table style options of the table at the caret on or off: header row, total row, banded rows and columns, first and last column. Params: {"headerRow"?: bool, "totalRow"?: bool, "bandedRows"?: bool, "firstColumn"?: bool, "lastColumn"?: bool, "bandedColumns"?: bool}. Reads the selection. Changes the document. */
1202
+ "table.look": {
1203
+ bandedColumns?: boolean;
1204
+ bandedRows?: boolean;
1205
+ firstColumn?: boolean;
1206
+ headerRow?: boolean;
1207
+ lastColumn?: boolean;
1208
+ totalRow?: boolean;
1209
+ };
1210
+ /** Shading. Sets the shading of the selected table cells as RRGGBB, or removes it. Params: {"color": "RRGGBB" | null}. Reads the selection. Changes the document. */
1211
+ "table.shading": {
1212
+ color?: Json;
1213
+ };
1214
+ /** Borders. Applies borders (all, outside, inside, none, a single side) to the selected cells' edges, with width and colour; with the whole table selected, or only a caret in it, to the table. Params: {"kind": "all|outside|inside|none|top|bottom|left|right", "width"?: pt, "color"?: "RRGGBB"} (the selected cells' edges; the table's with the whole table selected or a caret in it). Reads the selection. Changes the document. */
1215
+ "table.borders": {
1216
+ color?: string;
1217
+ kind?: "all" | "outside" | "inside" | "none" | "top" | "bottom" | "left" | "right"; /** points */
1218
+ width?: number;
1219
+ };
1220
+ /** Alignment. Sets the text alignment inside the selected table cells (top left to bottom right). Params: {"value": "topLeft|topCenter|...|bottomRight"}. Reads the selection. Changes the document. */
1221
+ "table.cellAlign": {
1222
+ value?: string;
1223
+ };
1224
+ /** Text Direction. Sets the text direction of the selected table cells (horizontal, rotated down or up). Params: {"value"?: "horizontal|down|up"} (default: the next direction after the caret cell's, like Word's button). Reads the selection. Changes the document. */
1225
+ "table.textDirection": {
1226
+ value?: "horizontal" | "down" | "up";
1227
+ };
1228
+ /** AutoFit. Autofits the table at the caret to its contents, to the window, or fixes its column widths. Params: {"mode": "contents|window|fixed"}. Reads the selection. Changes the document. */
1229
+ "table.autofit": {
1230
+ mode?: "contents" | "window" | "fixed";
1231
+ };
1232
+ /** Distribute Columns. Gives the selected table columns equal widths. Params: {}. Reads the selection. Changes the document. */
1233
+ "table.distributeColumns": Record<string, never>;
1234
+ /** Distribute Rows. Gives the selected table rows equal heights. Params: {}. Reads the selection. Changes the document. */
1235
+ "table.distributeRows": Record<string, never>;
1236
+ /** Table Column Width. Sets the width in points of the caret cell's column. Params: {"width": pt} (the caret cell's column; the table's preferred width is cleared so the column gets exactly this). Reads the selection. Changes the document. */
1237
+ "table.columnWidth": {
1238
+ width?: number;
1239
+ };
1240
+ /** Table Row Height. Sets the height in points of the selected rows (every row when the table is selected; else the caret's), as at least or exactly that height. Params: {"height": pt, "rule"?: "atLeast|exact"} (the selected rows, or the caret's). Reads the selection. Changes the document. */
1241
+ "table.rowHeight": {
1242
+ height?: number;
1243
+ rule?: "atLeast" | "exact";
1244
+ };
1245
+ /** Repeat Header Rows. Toggles repeating the selected header rows at the top of every page the table runs onto. Params: {}. Reads the selection. Changes the document. */
1246
+ "table.repeatHeader": {
1247
+ value?: boolean;
1248
+ };
1249
+ /** Sort. Sorts the rows of the table at the caret by a column (0-based), ascending or descending, optionally keeping a header row. Params: {"column"?: n, "descending"?: bool, "header"?: bool}. Reads the selection. Changes the document. */
1250
+ "table.sort": {
1251
+ column?: number;
1252
+ descending?: boolean;
1253
+ header?: boolean;
1254
+ };
1255
+ /** Convert to Text. Converts the table at the caret to text with tabs, commas or paragraphs between cells. Params: {"separator"?: "tab|comma|paragraph"}. Reads the selection. Changes the document. */
1256
+ "table.toText": {
1257
+ separator?: "tab" | "comma" | "paragraph";
1258
+ };
1259
+ /** Formula. Inserts a formula field into the table cell at the caret and answers its result: arithmetic (+ - * / ^ %, comparisons), cell references and ranges (B2, B2:C4, B:B, 3:3), ABOVE, BELOW, LEFT and RIGHT, the functions SUM, AVERAGE, COUNT, MAX, MIN, PRODUCT, ABS, INT, MOD, ROUND, SIGN, IF, AND, OR and NOT, and a \# number picture (=SUM(ABOVE) \# "?#,##0.00"). Cells read as numbers allow currency signs and thousands separators (?1,360.50). Update Field (F9) computes it again. Params: {"formula"?: string (=SUM(ABOVE) by default)}. Reads the selection. Changes the document. */
1260
+ "table.formula": {
1261
+ formula?: string;
1262
+ };
1263
+ /** Select Table. Selects the whole table at the caret. Params: {}. Reads the selection. */
1264
+ "table.selectTable": Record<string, never>;
1265
+ /** Select Row. Selects the row at the caret. Params: {}. Reads the selection. */
1266
+ "table.selectRow": Record<string, never>;
1267
+ /** Select Cell. Selects the cell at the caret. Params: {}. Reads the selection. */
1268
+ "table.selectCell": Record<string, never>;
1269
+ /** Properties. Sets the properties of the table at the caret: alignment, width, indent, row and cell options. Params: {"align"?: "left|center|right", "width"?: pt|null, "widthPct"?: percent, "indent"?: pt, "rowHeight"?: pt|null, "rowHeightRule"?: "atLeast|exact", "allowBreak"?: bool, "headerRow"?: bool, "columnWidth"?: pt, "cellWidth"?: pt|null, "valign"?: "top|center|bottom"} (row, column and cell settings apply to the caret's; without settings it returns the current ones). Reads the selection. Changes the document. */
1270
+ "table.properties": {
1271
+ align?: "left" | "center" | "right";
1272
+ allowBreak?: boolean; /** the caret cell's preferred width in points; null clears it (automatic) */
1273
+ cellWidth?: Json; /** points */
1274
+ columnWidth?: number;
1275
+ headerRow?: boolean; /** points */
1276
+ indent?: number; /** the row height in points; null clears it (automatic) */
1277
+ rowHeight?: Json;
1278
+ rowHeightRule?: "atLeast" | "exact";
1279
+ valign?: "top" | "center" | "bottom"; /** the table's preferred width in points; null clears it (automatic) */
1280
+ width?: Json; /** percent */
1281
+ widthPct?: number;
1282
+ };
1283
+ /** Convert Text to Table. Converts the selected text, separated by tabs or commas, into a table. Params: {"separator"?: "tab|comma"}. Reads the selection. Changes the document. */
1284
+ "table.fromText": {
1285
+ separator?: "tab" | "comma";
1286
+ };
1287
+ /** Quick Tables. Inserts a ready-made table (calendar, tabular list or matrix) at the caret. Params: {"kind"?: "calendar|tabular|matrix"}. Reads the selection. Changes the document. */
1288
+ "table.quick": {
1289
+ kind?: "calendar" | "tabular" | "matrix";
1290
+ };
1291
+ /** New Table Style. Creates a table style with formatting for the whole table and its regions (header row, last row, banded rows...). Params: {"name": string, "basedOn"?: string, "wholeTable"?: Region, "headerRow"?: Region, "lastRow"?: Region (total row), "firstColumn"?: Region, "lastColumn"?: Region, "bandedRows"?: Region, "bandedColumns"?: Region, "bandSize"?: n (rows per band), "para"?: ParaProps, "apply"?: bool} where Region = {"borders"?: bool | null (true: single lines, false: none, null: inherit), "borderColor"?: "RRGGBB", "borderWidth"?: pt, "fill"?: "RRGGBB" | null, "bold"?: bool, "italic"?: bool, "color"?: "RRGGBB" | null, "size"?: pt, "font"?: string}. Reads the selection. Changes the document. */
1292
+ "table.newStyle": {
1293
+ apply?: boolean; /** rows per band */
1294
+ bandSize?: number; /** a table style region's shortcuts */
1295
+ bandedColumns?: {
1296
+ bold?: boolean;
1297
+ borderColor?: Json;
1298
+ borderWidth?: number;
1299
+ borders?: Json;
1300
+ color?: Json;
1301
+ fill?: Json;
1302
+ font?: string;
1303
+ italic?: boolean;
1304
+ size?: number;
1305
+ }; /** a table style region's shortcuts */
1306
+ bandedRows?: {
1307
+ bold?: boolean;
1308
+ borderColor?: Json;
1309
+ borderWidth?: number;
1310
+ borders?: Json;
1311
+ color?: Json;
1312
+ fill?: Json;
1313
+ font?: string;
1314
+ italic?: boolean;
1315
+ size?: number;
1316
+ };
1317
+ basedOn?: string; /** a table style region's shortcuts */
1318
+ firstColumn?: {
1319
+ bold?: boolean;
1320
+ borderColor?: Json;
1321
+ borderWidth?: number;
1322
+ borders?: Json;
1323
+ color?: Json;
1324
+ fill?: Json;
1325
+ font?: string;
1326
+ italic?: boolean;
1327
+ size?: number;
1328
+ }; /** a table style region's shortcuts */
1329
+ headerRow?: {
1330
+ bold?: boolean;
1331
+ borderColor?: Json;
1332
+ borderWidth?: number;
1333
+ borders?: Json;
1334
+ color?: Json;
1335
+ fill?: Json;
1336
+ font?: string;
1337
+ italic?: boolean;
1338
+ size?: number;
1339
+ }; /** a table style region's shortcuts */
1340
+ lastColumn?: {
1341
+ bold?: boolean;
1342
+ borderColor?: Json;
1343
+ borderWidth?: number;
1344
+ borders?: Json;
1345
+ color?: Json;
1346
+ fill?: Json;
1347
+ font?: string;
1348
+ italic?: boolean;
1349
+ size?: number;
1350
+ }; /** a table style region's shortcuts */
1351
+ lastRow?: {
1352
+ bold?: boolean;
1353
+ borderColor?: Json;
1354
+ borderWidth?: number;
1355
+ borders?: Json;
1356
+ color?: Json;
1357
+ fill?: Json;
1358
+ font?: string;
1359
+ italic?: boolean;
1360
+ size?: number;
1361
+ };
1362
+ name?: string; /** paragraph properties as para.dialog answers them (alignment, indents, spacing...); colours (shading, border colors) are "RRGGBB"; as in Word, a paragraph style that sets a property itself (Normal included) wins over the table style's */
1363
+ para?: {
1364
+ [key: string]: Json;
1365
+ }; /** a table style region's shortcuts */
1366
+ wholeTable?: {
1367
+ bold?: boolean;
1368
+ borderColor?: Json;
1369
+ borderWidth?: number;
1370
+ borders?: Json;
1371
+ color?: Json;
1372
+ fill?: Json;
1373
+ font?: string;
1374
+ italic?: boolean;
1375
+ size?: number;
1376
+ };
1377
+ };
1378
+ /** Modify Table Style. Changes a table style's name, base style or region formatting; default: the current table's style. Params: {"style"?: string (default: the current table's), "name"?: string, "basedOn"?: string, "wholeTable"?: Region, "headerRow"?: Region, "lastRow"?: Region (total row), "firstColumn"?: Region, "lastColumn"?: Region, "bandedRows"?: Region, "bandedColumns"?: Region, "bandSize"?: n (rows per band), "para"?: ParaProps, "apply"?: bool} where Region = {"borders"?: bool | null (true: single lines, false: none, null: inherit), "borderColor"?: "RRGGBB", "borderWidth"?: pt, "fill"?: "RRGGBB" | null, "bold"?: bool, "italic"?: bool, "color"?: "RRGGBB" | null, "size"?: pt, "font"?: string}. Reads the selection. Changes the document. */
1379
+ "table.modifyStyle": {
1380
+ apply?: boolean; /** rows per band */
1381
+ bandSize?: number; /** a table style region's shortcuts */
1382
+ bandedColumns?: {
1383
+ bold?: boolean;
1384
+ borderColor?: Json;
1385
+ borderWidth?: number;
1386
+ borders?: Json;
1387
+ color?: Json;
1388
+ fill?: Json;
1389
+ font?: string;
1390
+ italic?: boolean;
1391
+ size?: number;
1392
+ }; /** a table style region's shortcuts */
1393
+ bandedRows?: {
1394
+ bold?: boolean;
1395
+ borderColor?: Json;
1396
+ borderWidth?: number;
1397
+ borders?: Json;
1398
+ color?: Json;
1399
+ fill?: Json;
1400
+ font?: string;
1401
+ italic?: boolean;
1402
+ size?: number;
1403
+ };
1404
+ basedOn?: string; /** a table style region's shortcuts */
1405
+ firstColumn?: {
1406
+ bold?: boolean;
1407
+ borderColor?: Json;
1408
+ borderWidth?: number;
1409
+ borders?: Json;
1410
+ color?: Json;
1411
+ fill?: Json;
1412
+ font?: string;
1413
+ italic?: boolean;
1414
+ size?: number;
1415
+ }; /** a table style region's shortcuts */
1416
+ headerRow?: {
1417
+ bold?: boolean;
1418
+ borderColor?: Json;
1419
+ borderWidth?: number;
1420
+ borders?: Json;
1421
+ color?: Json;
1422
+ fill?: Json;
1423
+ font?: string;
1424
+ italic?: boolean;
1425
+ size?: number;
1426
+ }; /** a table style region's shortcuts */
1427
+ lastColumn?: {
1428
+ bold?: boolean;
1429
+ borderColor?: Json;
1430
+ borderWidth?: number;
1431
+ borders?: Json;
1432
+ color?: Json;
1433
+ fill?: Json;
1434
+ font?: string;
1435
+ italic?: boolean;
1436
+ size?: number;
1437
+ }; /** a table style region's shortcuts */
1438
+ lastRow?: {
1439
+ bold?: boolean;
1440
+ borderColor?: Json;
1441
+ borderWidth?: number;
1442
+ borders?: Json;
1443
+ color?: Json;
1444
+ fill?: Json;
1445
+ font?: string;
1446
+ italic?: boolean;
1447
+ size?: number;
1448
+ };
1449
+ name?: string; /** paragraph properties as para.dialog answers them (alignment, indents, spacing...) */
1450
+ para?: {
1451
+ [key: string]: Json;
1452
+ }; /** default: the current table's */
1453
+ style?: string; /** a table style region's shortcuts */
1454
+ wholeTable?: {
1455
+ bold?: boolean;
1456
+ borderColor?: Json;
1457
+ borderWidth?: number;
1458
+ borders?: Json;
1459
+ color?: Json;
1460
+ fill?: Json;
1461
+ font?: string;
1462
+ italic?: boolean;
1463
+ size?: number;
1464
+ };
1465
+ };
1466
+ /** Delete Table Style. Deletes a custom table style; default: the current table's style. Params: {"style"?: string (default: the current table's)}. Reads the selection. Changes the document. */
1467
+ "table.deleteStyle": {
1468
+ style?: string;
1469
+ };
1470
+ /** Draw Table. Draws a table or a cell border as a pen stroke between two points on a page. Params: {"page": n, "x0": pt, "y0": pt, "x1": pt, "y1": pt, "story"?: StoryRef} (a pen stroke in page points, 0-based page: a rectangle at least 12 pt each way outside any table inserts a one-cell table of that size at the paragraph under its start; a straight vertical or horizontal line inside a table splits the cells it crosses there. In the app the button turns the pen on.). Reads the selection. Changes the document. */
1471
+ "table.draw": {
1472
+ page?: number; /** "body", or {"part": n} for a header, footer, note, comment or text box story */
1473
+ story?: Json; /** points */
1474
+ x0?: number; /** points */
1475
+ x1?: number; /** points */
1476
+ y0?: number; /** points */
1477
+ y1?: number;
1478
+ };
1479
+ /** Eraser. Removes the border between two cells within 4 points of a point on a page, merging them. Params: {"page": n, "x": pt, "y": pt} (removes the border between two cells within 4 pt of the point by merging them. In the app the button turns the eraser on.). Reads the selection. Changes the document. */
1480
+ "table.eraser": {
1481
+ page?: number; /** points */
1482
+ x?: number; /** points */
1483
+ y?: number;
1484
+ };
1485
+ /** New Comment. Adds a comment with text on the selection (or the word at the caret). Params: {"text": string}. Reads the selection. Changes the document. */
1486
+ "review.newComment": {
1487
+ text?: string;
1488
+ };
1489
+ /** Reply. Replies to a comment by its id. Params: {"id": n, "text": string}. Changes the document. */
1490
+ "review.reply": {
1491
+ id?: number;
1492
+ text?: string;
1493
+ };
1494
+ /** Edit Comment. Replaces the text of a comment by its id. Params: {"id": n, "text": string}. Changes the document. */
1495
+ "review.editComment": {
1496
+ id?: number;
1497
+ text?: string;
1498
+ };
1499
+ /** Delete. Deletes a comment by id, the comment at the caret, or all comments. Params: {"id"?: n, "all"?: bool}. Reads the selection. Changes the document. */
1500
+ "review.deleteComment": {
1501
+ all?: boolean;
1502
+ id?: number;
1503
+ };
1504
+ /** Resolve. Marks the comment at the caret as resolved. Params: {}. Reads the selection. Changes the document. */
1505
+ "review.resolveComment": {
1506
+ id?: number; /** read by the command beside its listed parameters */
1507
+ value?: boolean;
1508
+ };
1509
+ /** Next. Moves to the next comment and answers it. Params: {}. Reads the selection. */
1510
+ "review.nextComment": Record<string, never>;
1511
+ /** Previous. Moves to the previous comment and answers it. Params: {}. Reads the selection. */
1512
+ "review.previousComment": Record<string, never>;
1513
+ /** Show Comments. Lists the document's comments with their ids, authors, text and the text they are on. Params: {}. Reads the selection. */
1514
+ "review.comments": Record<string, never>;
1515
+ /** Comment Threads. Lists the comment threads with their ids, anchors (object, range, quote, page position), comments and resolved state. Params: {} ? [{id, anchor: {object, field?, range?, quote?, place?: {page, x, y, height}}, resolved, comments: [{id, author, name, body, created}]}]. Reads the selection. */
1516
+ "comment.threads": Record<string, never>;
1517
+ /** Add Comment. Starts a comment thread on the selection with text and an author. Params: {"text": string, "author"?: string (principal id), "name"?: string, "created"?: string (ISO 8601 UTC)} ? {thread, threadId} (on the selection, or the word at the caret). Reads the selection. Changes the document. */
1518
+ "comment.add": {
1519
+ author?: string; /** ISO 8601 UTC */
1520
+ created?: string;
1521
+ name?: string;
1522
+ text?: string;
1523
+ };
1524
+ /** Reply to Comment. Adds a reply to a comment thread by its thread id. Params: {"thread": string (`c<n>`, or a tool id `thread:<id>`/`comment:<id>`), "text": string, "author"?: string, "name"?: string, "created"?: string} ? {thread, comment, threadId, commentId}. Changes the document. */
1525
+ "comment.reply": {
1526
+ author?: string;
1527
+ created?: string; /** read by the command beside its listed parameters */
1528
+ id?: number;
1529
+ name?: string;
1530
+ text?: string; /** `c<n>`, or a tool id `thread:<id>`/`comment:<id>` */
1531
+ thread?: string;
1532
+ };
1533
+ /** Resolve Comment Thread. Marks a comment thread as resolved, or reopens it. Params: {"thread": string, "resolved"?: bool}. Changes the document. */
1534
+ "comment.resolve": {
1535
+ resolved?: boolean;
1536
+ thread?: string;
1537
+ };
1538
+ /** Delete Comment. Deletes a comment thread, or one reply in it. Params: {"thread": string, "comment"?: string (a reply; omitted or the first comment: the whole thread)}. Reads the selection. Changes the document. */
1539
+ "comment.delete": {
1540
+ comment?: string;
1541
+ thread?: string;
1542
+ };
1543
+ /** Go to Comment. Moves the caret to a comment thread's anchor. Params: {"thread": string}. Reads the selection. */
1544
+ "comment.goto": {
1545
+ bookmark?: string; /** read by the command beside its listed parameters */
1546
+ page?: number; /** read by the command beside its listed parameters */
1547
+ paragraph?: number;
1548
+ thread?: string;
1549
+ };
1550
+ /** Track Changes. Turns Track Changes on or off; without value it toggles. Tracked edits are kept as revisions to accept or reject. Params: {"value"?: bool (omit to toggle)}. Changes the document. */
1551
+ "review.trackChanges": {
1552
+ value?: boolean;
1553
+ };
1554
+ /** Accept All Changes. Accepts every tracked change in the document. Params: {}. Reads the selection. Changes the document. */
1555
+ "review.acceptAll": Record<string, never>;
1556
+ /** Reject All Changes. Rejects every tracked change in the document. Params: {}. Reads the selection. Changes the document. */
1557
+ "review.rejectAll": Record<string, never>;
1558
+ /** Accept. Accepts the tracked change at the caret or in the selection. Params: {}. Reads the selection. Changes the document. */
1559
+ "review.accept": Record<string, never>;
1560
+ /** Reject. Rejects the tracked change at the caret or in the selection. Params: {}. Reads the selection. Changes the document. */
1561
+ "review.reject": Record<string, never>;
1562
+ /** Next Change. Moves to the next tracked change and answers it. Params: {}. Reads the selection. */
1563
+ "review.nextChange": Record<string, never>;
1564
+ /** Previous Change. Moves to the previous tracked change and answers it. Params: {}. Reads the selection. */
1565
+ "review.previousChange": Record<string, never>;
1566
+ /** Display for Review. Steps how revisions display in the editor (simple, all markup, no markup, original). Params: {}. Reads the selection. */
1567
+ "review.markup": {
1568
+ value?: string;
1569
+ };
1570
+ /** Track Changes Options. Sets which revisions show in the editor (comments, ink, insertions and deletions, formatting, balloons). Params: {"comments"?: bool, "ink"?: bool, "insertionsDeletions"?: bool, "formatting"?: bool, "balloons"?: "revisions|inline|commentsAndFormatting", "insertMark"?: "underline|doubleUnderline|bold|italic|strikethrough|colorOnly|none", "insertColor"?: "byAuthor" | "RRGGBB", "deleteMark"?: "strikethrough|doubleStrikethrough|hidden|caret|hash|underline|colorOnly", "deleteColor"?: "byAuthor" | "RRGGBB", "changedLines"?: "outside|left|right|none", "changedLinesColor"?: "auto" | "RRGGBB", "trackFormatting"?: bool} ? the options (omit all to read them). Reads the selection. */
1571
+ "review.trackingOptions": {
1572
+ balloons?: "revisions" | "inline" | "commentsAndFormatting";
1573
+ changedLines?: "outside" | "left" | "right" | "none";
1574
+ changedLinesColor?: "auto" | "RRGGBB";
1575
+ comments?: boolean;
1576
+ deleteColor?: "byAuthor" | "RRGGBB";
1577
+ deleteMark?: "strikethrough" | "doubleStrikethrough" | "hidden" | "caret" | "hash" | "underline" | "colorOnly";
1578
+ formatting?: boolean;
1579
+ ink?: boolean;
1580
+ insertColor?: "byAuthor" | "RRGGBB";
1581
+ insertMark?: "underline" | "doubleUnderline" | "bold" | "italic" | "strikethrough" | "colorOnly" | "none";
1582
+ insertionsDeletions?: boolean;
1583
+ trackFormatting?: boolean;
1584
+ };
1585
+ /** Word Count. Answers the document's (or selection's) pages, words, characters, paragraphs and lines, optionally counting text boxes; each Chinese or Japanese character counts as a word, as in Word. Params: {"includeTextBoxes"?: bool}. Reads the selection. */
1586
+ "review.wordCount": {
1587
+ includeTextBoxes?: boolean;
1588
+ };
1589
+ /** Reviewing Pane. Lists the tracked changes with their kind, author, date and text. Params: {}. Reads the selection. */
1590
+ "review.changes": {
1591
+ description?: string; /** read by the command beside its listed parameters */
1592
+ props?: {
1593
+ [key: string]: Json;
1594
+ };
1595
+ };
1596
+ /** Spelling & Grammar. Answers the first spelling or grammar issue from the caret onward, with suggestions; changes nothing. Params: {}. Reads the selection. */
1597
+ "review.spelling": Record<string, never>;
1598
+ /** Proofing Issues. Lists every spelling and grammar issue in the document with its position and suggestions. Params: {}. Reads the selection. */
1599
+ "review.issues": Record<string, never>;
1600
+ /** Spelling Suggestions. Answers spelling suggestions for the word at the caret or at a position. Params: {"pos"?: Pos}. Reads the selection. */
1601
+ "review.suggestions": {
1602
+ pos?: {
1603
+ off?: number;
1604
+ path?: Array<number>;
1605
+ story?: Json;
1606
+ };
1607
+ };
1608
+ /** Add to Dictionary. Adds a word (default: the word at the caret) to the dictionary so it is no longer flagged. Params: {"word"?: string}. Reads the selection. */
1609
+ "review.addToDictionary": {
1610
+ word?: string;
1611
+ };
1612
+ /** Ignore All. Ignores every occurrence of the flagged word at the caret in this document. Params: {}. Reads the selection. */
1613
+ "review.ignoreAll": {
1614
+ word?: string;
1615
+ };
1616
+ /** Change. Replaces the flagged word at the caret with a suggestion text. Params: {"text": string}. Reads the selection. Changes the document. */
1617
+ "review.applySuggestion": {
1618
+ text?: string;
1619
+ };
1620
+ /** Check Spelling as You Type. Toggles checking spelling as you type in the editor. Params: {}. Reads the selection. */
1621
+ "review.proofing": {
1622
+ value?: boolean;
1623
+ };
1624
+ /** Thesaurus. Answers synonyms for the word at the caret. Params: {}. Reads the selection. */
1625
+ "review.thesaurus": {
1626
+ word?: string;
1627
+ };
1628
+ /** Caret for Presence. Answers the caret and selection as object-model positions (object, field, offset), for showing it to collaborators. Params: {} ? {caret: {object, field, offset} | null, anchor: {object, field, offset} | null, selection: [object], page: n} (the caret, the selection's other end when something is selected, and the paragraphs it covers, as replica positions and object ids; null and [] before the document has a replica). Reads the selection. */
1629
+ "presence.caret": Record<string, never>;
1630
+ /** Locate Carets. Answers page positions for given object-model caret positions, for drawing collaborators' carets. Params: {"places": [{"caret": {object, field, offset}, "anchor"?: {object, field, offset}}]} ? [{caret: {page, x, y, height} | null, rects: [{page, x, y, width, height}]}] (each person's caret and selection in this view, in page points; null and [] for what this view does not show). Reads the selection. */
1631
+ "presence.locate": {
1632
+ places?: Array<{
1633
+ anchor?: {
1634
+ field?: Json;
1635
+ object?: Json;
1636
+ offset?: number;
1637
+ };
1638
+ caret?: {
1639
+ field?: Json;
1640
+ object?: Json;
1641
+ offset?: number;
1642
+ };
1643
+ }>;
1644
+ };
1645
+ /** Selection as Comment Anchor. Answers the selection as a comment anchor for a host that keeps comment threads itself (Kit UI protocol section 7k): the paragraphs' object ids, the text range, the quoted text and the page; null for a caret. Params: {} ? {ids: [object], range: {start, end}, quote, page, at: {page, x, y, height}} | null (the selection as a host's comment anchor, Kit UI protocol section 7k; page counts from 1, at is where the selection starts in this view in page points; null for a caret). Reads the selection. */
1646
+ "comment.anchor": Record<string, never>;
1647
+ /** Locate Comment Anchors. Answers where each of a host's comment anchors is in the document now, after edits: whether it is found, the text it covers, its page, and the rectangles to highlight. Params: {"anchors": [{ids: [object], range?: {start, end}, quote?, page?}]} ? [{found, exact, text, page, at: {page, x, y, height} | null, rects: [{page, x, y, width, height}]}] (where each host comment anchor is in this view now, after edits: exact when its quote is still where its range says; page counts from 1). Reads the selection. */
1648
+ "comment.locate": {
1649
+ anchors?: Array<{
1650
+ ids?: Array<Json>;
1651
+ page?: number;
1652
+ quote?: Json;
1653
+ range?: {
1654
+ end?: number;
1655
+ start?: number;
1656
+ };
1657
+ }>;
1658
+ };
1659
+ /** New. Replaces the open document with a new one, blank or from a template (sample, letter, resume, report). Params: {"template"?: "blank|sample|letter|resume|report"}. Changes the document. */
1660
+ "file.new": {
1661
+ template?: "blank" | "sample" | "letter" | "resume" | "report";
1662
+ };
1663
+ /** Open. Opens a document from a path, or from base64 data named by path, with a password for encrypted files. Params: {"path": string, "data"?: base64 (the file's bytes; `path` then only names it), "password"?: string (for a password-protected Word document)}. Reads the selection. Changes the document. */
1664
+ "file.open": {
1665
+ data?: string; /** for a password-protected Word document */
1666
+ password?: string;
1667
+ path?: Json;
1668
+ };
1669
+ /** Save. Saves the document to its path or a new path (docx by default; the extension picks the format), optionally encrypting it with a password. Params: {"path"?: string, "password"?: string (encrypt this and later saves with it, as file.encrypt does)}. Reads the selection. Changes the document. */
1670
+ "file.save": {
1671
+ password?: string;
1672
+ path?: Json;
1673
+ };
1674
+ /** Save As. Saves the document under a new path, which becomes its path; optionally encrypted with a password. Params: {"path": string, "password"?: string}. Reads the selection. Changes the document. */
1675
+ "file.saveAs": {
1676
+ password?: string;
1677
+ path?: Json;
1678
+ };
1679
+ /** Encrypt with Password. Sets or removes the password that Word documents are saved encrypted with. Params: {"password": string (Word documents are saved encrypted with it) | null or "" (saved unencrypted)}. Changes the document. */
1680
+ "file.encrypt": {
1681
+ password?: Json;
1682
+ };
1683
+ /** Export PDF. Writes the document as a PDF to a path, without changing the document or its path. Params: {"path": string}. Reads the selection. */
1684
+ "file.exportPdf": {
1685
+ path?: Json;
1686
+ };
1687
+ /** Export Page as PNG. Writes one page (1-based) as a PNG image to a path, at a scale in pixels per point. Params: {"path": string, "page"?: n (1-based), "scale"?: px per pt}. Reads the selection. */
1688
+ "file.exportPng": {
1689
+ page?: number;
1690
+ path?: Json; /** pixels per point, 0.1 to 8 (default 2) */
1691
+ scale?: number;
1692
+ };
1693
+ /** Export. Answers the document as a PDF, or one page (1-based) as a PNG image at a scale in pixels per point, as base64 for the host to write as a new file; nothing is written and the document does not change. Params: {"format": "pdf|png", "page"?: n (1-based, PNG; 1 by default), "scale"?: px per pt (PNG, 0.1 to 8; 2 by default)}. Reads the selection. */
1694
+ "file.export": {
1695
+ format?: "pdf" | "png"; /** 1-based, PNG; 1 by default */
1696
+ page?: number; /** px per pt (PNG, 0.1 to 8; 2 by default); PNG, 0.1 to 8; 2 by default */
1697
+ scale?: Json;
1698
+ };
1699
+ /** Print. Answers the document as the PDF the editor hands to the system print dialog. Params: {}. Reads the selection. */
1700
+ "file.print": Record<string, never>;
1701
+ /** Close. Closes the document; unsaved changes are lost unless saved first. Params: {}. Reads the selection. Changes the document. */
1702
+ "file.close": Record<string, never>;
1703
+ /** Properties. Sets document properties (title, subject, author, keywords, comments, category, custom properties) saved with the file. Params: {"title"?, "subject"?, "author"?, "keywords"?, "comments"?, "category"?, "custom"?: {name: string | null (removes)}}. Changes the document. */
1704
+ "file.properties": {
1705
+ author?: string;
1706
+ category?: string;
1707
+ comments?: string; /** {name: string | null (removes)}; removes */
1708
+ custom?: {
1709
+ name?: Json;
1710
+ };
1711
+ keywords?: string;
1712
+ subject?: string;
1713
+ title?: string;
1714
+ };
1715
+ /** Info. Answers the document's file information: path, format, size, dates, properties, protection and page and word counts. Params: {}. Reads the selection. */
1716
+ "file.info": Record<string, never>;
1717
+ /** Options. Answers the editor's options (user name, proofing, autocorrect). Params: {}. Reads the selection. */
1718
+ "file.options": Record<string, never>;
1719
+ /** User Name. Sets the user name recorded as the author of new tracked changes and comments. Params: {"name": string (author of new tracked changes and comments)}. Reads the selection. */
1720
+ "file.setAuthor": {
1721
+ name?: string;
1722
+ };
1723
+ /** Inspect Document. Answers the document's structure: pages, sections, paragraphs by index with their styles and short text, the selection and counts; with text true it includes each paragraph's full text. Use document.text for all the text. Params: {"text"?: bool}. Reads the selection. */
1724
+ "document.inspect": {
1725
+ text?: boolean;
1726
+ };
1727
+ /** Document Text. Answers the document's whole body text as plain text, one paragraph per line; read this before editing, since inspect alone shows little content. Params: {}. */
1728
+ "document.text": {
1729
+ story?: Json;
1730
+ };
1731
+ /** Paragraph Details. Answers one paragraph's details by its path (index from document.inspect): text, runs with formatting, style and paragraph properties. Params: {"path": [n], "story"?: Story}. */
1732
+ "document.paragraph": {
1733
+ path?: Array<number>; /** "body", or {"part": n} for a header, footer, note, comment or text box story */
1734
+ story?: Json;
1735
+ };
1736
+ /** Selection. Answers the selection: its anchor and focus positions, the selected text and the formatting there. Params: {}. Reads the selection. */
1737
+ "document.selection": Record<string, never>;
1738
+ /** Layout Summary. Answers a summary of the laid-out pages: page count, size and which paragraphs fall on each page. Params: {}. Reads the selection. */
1739
+ "document.layout": Record<string, never>;
1740
+ /** Replace Document Text. Replaces the whole body with the given plain text, one paragraph per line, in the Normal style. Params: {"text": string}. Changes the document. */
1741
+ "document.setText": {
1742
+ text?: string;
1743
+ };
1744
+ /** Insert Paragraph. Inserts a new paragraph with text after or before the paragraph at an index (as document.inspect numbers them), keeping the neighbouring style. Params: {"after"?: n, "before"?: n, "text": string} (n: a paragraph's index, as document.inspect lists it). Changes the document. */
1745
+ "para.insert": {
1746
+ after?: number;
1747
+ before?: number;
1748
+ text?: string;
1749
+ };
1750
+ /** Set Paragraph Text. Replaces the text of the paragraph at an index, keeping its style and paragraph formatting. Params: {"index": n, "text": string} (the paragraph's text replaced, its style kept). Reads the selection. Changes the document. */
1751
+ "para.text": {
1752
+ index?: number;
1753
+ text?: string;
1754
+ };
1755
+ /** Themes. Applies a document theme by name, changing theme colours and fonts. Params: {"name": string}. Changes the document. */
1756
+ "design.theme": {
1757
+ name?: string;
1758
+ };
1759
+ /** Fonts. Sets the theme's heading and body fonts. Params: {"heading": string, "body"?: string}. Changes the document. */
1760
+ "design.themeFonts": {
1761
+ body?: string;
1762
+ heading?: string;
1763
+ };
1764
+ /** Colors. Steps the theme's colour palette to the next one. Params: {}. Changes the document. */
1765
+ "design.themeColors": {
1766
+ name?: string;
1767
+ };
1768
+ /** Style Set. Applies a style set (basic, lines, shaded, casual, centered, minimalist, title) that restyles headings and body text. Params: {"name": "default|basic|lines|shaded|casual|centered|minimalist|title"}. Changes the document. */
1769
+ "design.styleSet": {
1770
+ name?: "default" | "basic" | "lines" | "shaded" | "casual" | "centered" | "minimalist" | "title";
1771
+ };
1772
+ /** Paragraph Spacing. Applies a document-wide paragraph spacing preset (none, compact, tight, open, relaxed, double). Params: {"value": "default|none|compact|tight|open|relaxed|double"}. Changes the document. */
1773
+ "design.paragraphSpacing": {
1774
+ value?: "default" | "none" | "compact" | "tight" | "open" | "relaxed" | "double";
1775
+ };
1776
+ /** Watermark. Adds a text watermark (diagonal or horizontal, with colour) behind every page, or removes it. Params: {"text"?: string, "remove"?: bool, "diagonal"?: bool, "color"?: "RRGGBB"}. Changes the document. */
1777
+ "design.watermark": {
1778
+ color?: string;
1779
+ diagonal?: boolean;
1780
+ remove?: boolean;
1781
+ text?: string;
1782
+ };
1783
+ /** Page Color. Sets the page background colour as RRGGBB, or removes it with null. Params: {"color": "RRGGBB" | null}. Changes the document. */
1784
+ "design.pageColor": {
1785
+ color?: Json;
1786
+ };
1787
+ /** Page Borders. Puts a border around every page (box with width, colour and line style), or removes it. Params: {"kind"?: "box|none", "width"?: pt, "color"?: "RRGGBB", "style"?: "single|double|dotted|dashed|thick|triple|dotDash|wave", "sides"?: {"top"|"left"|"bottom"|"right": {"style"?, "width"?: pt, "color"?: "RRGGBB"} | null} (exactly these sides, instead of `kind`), "applyTo"?: "section|document"}. Reads the selection. Changes the document. */
1788
+ "design.pageBorders": {
1789
+ applyTo?: "section" | "document"; /** like RRGGBB */
1790
+ color?: string;
1791
+ kind?: "box" | "none"; /** exactly these sides, instead of `kind` */
1792
+ sides?: {
1793
+ [key: string]: Json;
1794
+ };
1795
+ style?: "single" | "double" | "dotted" | "dashed" | "thick" | "triple" | "dotDash" | "wave"; /** points */
1796
+ width?: number;
1797
+ };
1798
+ /** Set as Default. Makes the current theme and style set the default for new documents. Params: {}. Reads the selection. */
1799
+ "design.setDefault": Record<string, never>;
1800
+ /** Theme List. Lists the available document themes. Params: {}. Reads the selection. */
1801
+ "design.themes": Record<string, never>;
1802
+ /** Table of Contents. Inserts a table of contents at the caret built from headings down to a level, with a title. Params: {"levels"?: 1-9, "title"?: string}. Reads the selection. Changes the document. */
1803
+ "references.toc": {
1804
+ levels?: number;
1805
+ title?: string;
1806
+ };
1807
+ /** Update Table. Rebuilds the table of contents from the current headings and page numbers. Params: {}. Reads the selection. Changes the document. */
1808
+ "references.updateToc": Record<string, never>;
1809
+ /** Remove Table of Contents. Removes the table of contents. Params: {}. Reads the selection. Changes the document. */
1810
+ "references.removeToc": Record<string, never>;
1811
+ /** Add Text. Sets the table-of-contents level of the paragraphs at the selection (0 keeps them out). Params: {"level": 0 (do not show) | 1-9}. Reads the selection. Changes the document. */
1812
+ "references.addText": {
1813
+ level?: number;
1814
+ };
1815
+ /** Insert Footnote. Inserts a footnote reference at the caret with the note's text; with text the caret stays after the reference, without it goes into the note (insert.closeHeader returns to the reference). Params: {"text"?: string} (with text the caret stays in the body after the reference; without, it goes into the note, and insert.closeHeader brings it back). Reads the selection. Changes the document. */
1816
+ "references.footnote": {
1817
+ text?: string;
1818
+ };
1819
+ /** Insert Endnote. Inserts an endnote reference at the caret with the note's text; with text the caret stays after the reference, without it goes into the note (insert.closeHeader returns to the reference). Params: {"text"?: string} (with text the caret stays in the body after the reference; without, it goes into the note, and insert.closeHeader brings it back). Reads the selection. Changes the document. */
1820
+ "references.endnote": {
1821
+ text?: string;
1822
+ };
1823
+ /** Next Footnote. Moves to the next footnote reference and answers it. Params: {}. Reads the selection. */
1824
+ "references.nextFootnote": Record<string, never>;
1825
+ /** Show Notes. Lists the footnotes and endnotes with their numbers and text. Params: {}. Reads the selection. */
1826
+ "references.notes": Record<string, never>;
1827
+ /** Insert Caption. Inserts a numbered caption (Figure, Table, Equation) with text at the caret or below the selected object. Params: {"label"?: "Figure|Table|Equation", "text"?: string}. Reads the selection. Changes the document. */
1828
+ "references.caption": {
1829
+ label?: "Figure" | "Table" | "Equation";
1830
+ text?: string;
1831
+ };
1832
+ /** Update Field. Updates the fields in the selection (or the whole document): page numbers, dates, cross-references, tables of contents. Params: {}. Reads the selection. Changes the document. */
1833
+ "references.updateFields": Record<string, never>;
1834
+ /** Start Mail Merge. Starts a mail merge of a kind (letters, emails, envelopes, labels, directory) or turns it off with normal. Params: {"kind": "letters|emails|envelopes|labels|directory|normal"}. Reads the selection. */
1835
+ "mailings.start": {
1836
+ kind?: "letters" | "emails" | "envelopes" | "labels" | "directory" | "normal";
1837
+ };
1838
+ /** Select Recipients. Sets the mail merge recipients from CSV text, a file, or rows, with their field names. Params: {"csv"?: string, "path"?: string, "rows"?: [{field: value}] | [[value]], "fields"?: [string] (column order; required with array rows)}. Reads the selection. */
1839
+ "mailings.recipients": {
1840
+ csv?: string; /** column order; required with array rows */
1841
+ fields?: Array<string>;
1842
+ path?: Json; /** [{field: value}] or [[value]] */
1843
+ rows?: Array<Json>;
1844
+ };
1845
+ /** Edit Recipient List. Replaces the mail merge recipient rows or fields. Params: {"rows"?: [{field: value}] | [[value]], "fields"?: [string]}. Reads the selection. */
1846
+ "mailings.editRecipients": {
1847
+ csv?: string;
1848
+ fields?: Array<string>;
1849
+ path?: Json; /** [{field: value}] or [[value]] */
1850
+ rows?: Array<Json>;
1851
+ };
1852
+ /** Insert Merge Field. Inserts a merge field for a recipient field at the caret. Params: {"field": string}. Reads the selection. Changes the document. */
1853
+ "mailings.insertField": {
1854
+ field?: string; /** read by the command beside its listed parameters */
1855
+ instr?: string; /** read by the command beside its listed parameters */
1856
+ result?: string;
1857
+ };
1858
+ /** Address Block. Inserts an address block merge field at the caret. Params: {}. Reads the selection. Changes the document. */
1859
+ "mailings.addressBlock": Record<string, never>;
1860
+ /** Greeting Line. Inserts a greeting line merge field at the caret. Params: {}. Reads the selection. Changes the document. */
1861
+ "mailings.greetingLine": Record<string, never>;
1862
+ /** Rules. Inserts a merge rule field (IF, SKIPIF, NEXT, MERGEREC) at the caret. Params: {"rule": "IF|SKIPIF|NEXT|MERGEREC", "field"?, "value"?, "then"?, "else"?}. Reads the selection. Changes the document. */
1863
+ "mailings.rules": {
1864
+ else?: string; /** merge field name */
1865
+ field?: string;
1866
+ rule?: "IF" | "SKIPIF" | "NEXT" | "MERGEREC"; /** text when the comparison holds */
1867
+ then?: string; /** value to compare with */
1868
+ value?: string;
1869
+ };
1870
+ /** Match Fields. Answers how the document's merge fields match the recipient fields. Params: {}. Reads the selection. */
1871
+ "mailings.matchFields": Record<string, never>;
1872
+ /** Highlight Merge Fields. Toggles highlighting of merge fields in the editor. Params: {}. Reads the selection. */
1873
+ "mailings.highlightFields": {
1874
+ color?: string; /** read by the command beside its listed parameters */
1875
+ value?: boolean;
1876
+ };
1877
+ /** Preview Results. Toggles previewing the merge results with a recipient's data in place of the fields. Params: {}. Changes the document. */
1878
+ "mailings.preview": {
1879
+ value?: boolean;
1880
+ };
1881
+ /** Next Record. Shows the next recipient's data in the merge preview. Params: {}. Changes the document. */
1882
+ "mailings.next": Record<string, never>;
1883
+ /** Previous Record. Shows the previous recipient's data in the merge preview. Params: {}. Changes the document. */
1884
+ "mailings.previous": Record<string, never>;
1885
+ /** Find Recipient. Moves the merge preview to a recipient. Params: {}. Changes the document. */
1886
+ "mailings.findRecipient": {
1887
+ text?: string;
1888
+ };
1889
+ /** Check for Errors. Checks the merge for missing fields or recipients and answers the problems. Params: {}. Reads the selection. */
1890
+ "mailings.checkErrors": Record<string, never>;
1891
+ /** Finish & Merge. Merges the document with every recipient (or a range of records) into one merged document, optionally saved to a path. Params: {"path"?: string (save the merged document), "from"?: n, "to"?: n}. Changes the document. */
1892
+ "mailings.finish": {
1893
+ from?: number; /** save the merged document */
1894
+ path?: Json;
1895
+ to?: number;
1896
+ };
1897
+ /** Envelopes. Turns the document into an envelope with a delivery and a return address and a size. Params: {"delivery": string, "return"?: string, "size"?: "Envelope #10|Envelope DL"}. Changes the document. */
1898
+ "mailings.envelopes": {
1899
+ delivery?: string;
1900
+ return?: string;
1901
+ size?: "Envelope #10" | "Envelope DL";
1902
+ };
1903
+ /** Labels. Turns the document into a sheet of labels with text or the recipients, in rows and columns. Params: {"text"?: string, "rows"?: n, "cols"?: n, "fromRecipients"?: bool}. Changes the document. */
1904
+ "mailings.labels": {
1905
+ cols?: number;
1906
+ fromRecipients?: boolean;
1907
+ rows?: number;
1908
+ text?: string;
1909
+ };
1910
+ /** Manage Sources. Adds or removes a bibliography source and answers the source list. Params: {"add"?: Source, "remove"?: tag} ? list. Changes the document. */
1911
+ "references.sources": {
1912
+ add?: {
1913
+ author?: string;
1914
+ city?: string;
1915
+ journal?: string;
1916
+ kind?: string;
1917
+ publisher?: string;
1918
+ tag?: string;
1919
+ title?: string;
1920
+ url?: string;
1921
+ volume?: string;
1922
+ year?: string;
1923
+ }; /** tag of the source to remove */
1924
+ remove?: string;
1925
+ };
1926
+ /** Insert Citation. Inserts a citation of a source (by tag, adding the source when given) at the caret, with pages. Params: {"tag"?: string, "source"?: Source (added if new), "pages"?: string}. Reads the selection. Changes the document. */
1927
+ "references.citation": {
1928
+ pages?: string; /** a bibliography source */
1929
+ source?: {
1930
+ author?: string;
1931
+ city?: string;
1932
+ journal?: string;
1933
+ kind?: string;
1934
+ publisher?: string;
1935
+ tag?: string;
1936
+ title?: string;
1937
+ url?: string;
1938
+ volume?: string;
1939
+ year?: string;
1940
+ };
1941
+ tag?: string;
1942
+ };
1943
+ /** Style. Sets the citation and bibliography style (APA, MLA, Chicago, IEEE). Params: {"style": "APA|MLA|Chicago|IEEE"}. Reads the selection. Changes the document. */
1944
+ "references.citationStyle": {
1945
+ style?: "APA" | "MLA" | "Chicago" | "IEEE";
1946
+ };
1947
+ /** Bibliography. Inserts a bibliography of the cited sources at the caret with a title. Params: {"title"?: string}. Reads the selection. Changes the document. */
1948
+ "references.bibliography": {
1949
+ title?: string;
1950
+ };
1951
+ /** Insert Table of Figures. Inserts a table of figures (or tables, or equations) built from captions at the caret. Params: {"label"?: "Figure|Table|Equation"}. Reads the selection. Changes the document. */
1952
+ "references.tableOfFigures": {
1953
+ label?: "Figure" | "Table" | "Equation";
1954
+ };
1955
+ /** Update Table. Rebuilds the table of figures from the current captions. Params: {}. Reads the selection. Changes the document. */
1956
+ "references.updateFigures": Record<string, never>;
1957
+ /** Mark Entry. Marks the selection (or a given entry text) as an index entry. Params: {"entry"?: string}. Reads the selection. Changes the document. */
1958
+ "references.markEntry": {
1959
+ entry?: string;
1960
+ };
1961
+ /** Insert Index. Inserts an index of the marked entries at the caret. Params: {}. Reads the selection. Changes the document. */
1962
+ "references.index": Record<string, never>;
1963
+ /** Update Index. Rebuilds the index from the marked entries. Params: {}. Reads the selection. Changes the document. */
1964
+ "references.updateIndex": Record<string, never>;
1965
+ /** Mark Citation. Marks the selection (or a given text) as a citation for the table of authorities. Params: {"entry"?: string}. Reads the selection. Changes the document. */
1966
+ "references.markCitation": {
1967
+ entry?: string;
1968
+ };
1969
+ /** Insert Table of Authorities. Inserts a table of authorities from the marked citations at the caret. Params: {}. Reads the selection. Changes the document. */
1970
+ "references.tableOfAuthorities": Record<string, never>;
1971
+ /** Cross-reference. Inserts a cross-reference to a heading, bookmark, figure or table, showing its text, number or page. Params: {"to": "heading|bookmark|figure|table", "target": string (text / name / number), "show"?: "text|page|number|aboveBelow"} or {} to list targets. Reads the selection. Changes the document. */
1972
+ "insert.crossReference": {
1973
+ show?: "text" | "page" | "number" | "aboveBelow"; /** text / name / number */
1974
+ target?: string;
1975
+ to?: "heading" | "bookmark" | "figure" | "table";
1976
+ };
1977
+ /** Footnote and Endnote. Sets footnote and endnote number formats, starting numbers and placement. Params: {"footnoteFormat"?: "decimal|lowerRoman|upperRoman|lowerLetter|upperLetter", "endnoteFormat"?: ...}. Changes the document. */
1978
+ "references.noteOptions": {
1979
+ endnoteFormat?: "decimal" | "lowerRoman" | "upperRoman" | "lowerLetter" | "upperLetter";
1980
+ footnoteFormat?: "decimal" | "lowerRoman" | "upperRoman" | "lowerLetter" | "upperLetter";
1981
+ };
1982
+ /** Researcher. Opens the Researcher pane in the editor. Params: {}. Reads the selection. */
1983
+ "references.researcher": Record<string, never>;
1984
+ /** Size. Sets the selected picture's width and height in points or a scale percentage, keeping the aspect ratio when asked. Params: {"width"?: pt, "height"?: pt, "lockAspect"?: bool, "scale"?: percent}. Reads the selection. Changes the document. */
1985
+ "picture.size": {
1986
+ height?: number;
1987
+ lockAspect?: boolean; /** percent */
1988
+ scale?: number; /** points */
1989
+ width?: number;
1990
+ };
1991
+ /** Crop. Crops the selected picture by fractions (0 to 0.45) of its width and height from each side. Params: {"left"?, "top"?, "right"?, "bottom"? (fractions 0?0.45)}. Reads the selection. Changes the document. */
1992
+ "picture.crop": {
1993
+ bottom?: number;
1994
+ left?: number;
1995
+ right?: number;
1996
+ top?: number;
1997
+ };
1998
+ /** Alt Text. Sets the alternative text of the selected picture. Params: {"text": string} (the selected picture, chart or diagram). Reads the selection. Changes the document. */
1999
+ "picture.altText": {
2000
+ text?: string;
2001
+ };
2002
+ /** Corrections. Adjusts the selected picture's brightness, contrast and sharpness (-100 to 100). Params: {"brightness"?: -100..100, "contrast"?: -100..100, "sharpen"?: -100..100}. Reads the selection. Changes the document. */
2003
+ "picture.corrections": {
2004
+ brightness?: number; /** -100 to 100 */
2005
+ contrast?: number; /** -100 to 100 */
2006
+ sharpen?: number;
2007
+ };
2008
+ /** Color. Recolours the selected picture (grayscale, sepia, washout, black and white, saturation, tint). Params: {"mode": "grayscale|sepia|washout|blackAndWhite|saturation|tint", "saturation"?: 0..400}. Reads the selection. Changes the document. */
2009
+ "picture.color": {
2010
+ mode?: "grayscale" | "sepia" | "washout" | "blackAndWhite" | "saturation" | "tint"; /** 0 to 400 */
2011
+ saturation?: number;
2012
+ };
2013
+ /** Artistic Effects. Applies an artistic effect (blur, sharpen, invert, posterize, pixelate) to the selected picture. Params: {"effect": "blur|sharpen|invert|posterize|pixelate"}. Reads the selection. Changes the document. */
2014
+ "picture.effects": {
2015
+ effect?: "blur" | "sharpen" | "invert" | "posterize" | "pixelate";
2016
+ };
2017
+ /** Transparency. Sets the selected picture's transparency from 0 to 100 percent. Params: {"percent": 0..100}. Reads the selection. Changes the document. */
2018
+ "picture.transparency": {
2019
+ percent?: number;
2020
+ };
2021
+ /** Remove Background. Removes the selected picture's background colour within a tolerance. Params: {"tolerance"?: 0..255}. Reads the selection. Changes the document. */
2022
+ "picture.removeBackground": {
2023
+ tolerance?: number;
2024
+ };
2025
+ /** Compress Pictures. Downsamples the selected picture to at most a number of pixels to make the file smaller. Params: {"maxPixels"?: n}. Reads the selection. Changes the document. */
2026
+ "picture.compress": {
2027
+ maxPixels?: number;
2028
+ };
2029
+ /** Reset Picture. Removes every adjustment from the selected picture. Params: {}. Reads the selection. Changes the document. */
2030
+ "picture.reset": Record<string, never>;
2031
+ /** Change Picture. Replaces the selected picture's image from a path or base64 data, keeping its size and position. Params: {"path"?: string, "data"?: base64}. Reads the selection. Changes the document. */
2032
+ "picture.change": {
2033
+ data?: string;
2034
+ path?: Json;
2035
+ };
2036
+ /** Picture Styles. Applies a picture style (simple frame, thick frame, rounded, soft edge, shadow) to the selected picture. Params: {"style": "simpleFrame|thickFrame|rounded|softEdge|shadow"}. Reads the selection. Changes the document. */
2037
+ "picture.style": {
2038
+ style?: "simpleFrame" | "thickFrame" | "rounded" | "softEdge" | "shadow";
2039
+ };
2040
+ /** Picture Border. Sets the border colour and width of the selected picture. Params: {"color"?: "RRGGBB", "width"?: px}. Reads the selection. Changes the document. */
2041
+ "picture.border": {
2042
+ color?: string; /** pixels */
2043
+ width?: number;
2044
+ };
2045
+ /** Rotate. Rotates the selected object 90 degrees right or left, or flips it vertically or horizontally. Params: {"direction": "right|left|flipVertical|flipHorizontal"} (turns 90? or mirrors the selected picture, shape or text box; its pixels are kept). Reads the selection. Changes the document. */
2046
+ "arrange.rotate": {
2047
+ direction?: "right" | "left" | "flipVertical" | "flipHorizontal";
2048
+ };
2049
+ /** Rotation. Sets the exact clockwise rotation of the selected object in degrees, with optional flips. Params: {"degrees": number, "flipH"?: bool, "flipV"?: bool} (the exact angle, clockwise, of the selected picture, shape or text box; normalised to 0?360). Reads the selection. Changes the document. */
2050
+ "arrange.rotation": {
2051
+ degrees?: number;
2052
+ flipH?: boolean;
2053
+ flipV?: boolean;
2054
+ };
2055
+ /** Wrap Text. Sets how text wraps around the selected object: inline, square, tight, through, top and bottom, behind or in front of text. Params: {"wrap": "inline|square|tight|through|topAndBottom|behindText|inFrontOfText"}. Reads the selection. Changes the document. */
2056
+ "arrange.wrap": {
2057
+ wrap?: "inline" | "square" | "tight" | "through" | "topAndBottom" | "behindText" | "inFrontOfText";
2058
+ };
2059
+ /** Position. Positions the selected floating object at a preset place on the page (top left to bottom right) or at an offset. Params: {"preset"?: "topLeft|topCenter|topRight|middleLeft|middleCenter|middleRight|bottomLeft|bottomCenter|bottomRight", "x"?: pt, "y"?: pt}. Reads the selection. Changes the document. */
2060
+ "arrange.position": {
2061
+ preset?: "topLeft" | "topCenter" | "topRight" | "middleLeft" | "middleCenter" | "middleRight" | "bottomLeft" | "bottomCenter" | "bottomRight"; /** points */
2062
+ x?: number; /** points */
2063
+ y?: number;
2064
+ };
2065
+ /** Bring Forward. Brings the selected floating object one step forward. Params: {}. Reads the selection. Changes the document. */
2066
+ "arrange.bringForward": Record<string, never>;
2067
+ /** Send Backward. Sends the selected floating object one step backward. Params: {}. Reads the selection. Changes the document. */
2068
+ "arrange.sendBackward": Record<string, never>;
2069
+ /** Align. Aligns the selected floating object to the left, centre or right of the page margins. Params: {"value": "left|center|right"}. Reads the selection. Changes the document. */
2070
+ "arrange.align": {
2071
+ value?: "left" | "center" | "right";
2072
+ };
2073
+ /** Selection Pane. Lists the document's pictures, shapes and text boxes with their Selection Pane indexes. Params: {}. Reads the selection. */
2074
+ "arrange.selectionPane": Record<string, never>;
2075
+ /** Move or Resize. Moves or resizes the selected object to a width, height and top-left x, y on a page, in points. Params: {"width"?: pt, "height"?: pt, "x"?: pt, "y"?: pt, "page"?: n} (x/y: the top-left on page `page` (0-based, default its page); moving an inline object floats it). Reads the selection. Changes the document. */
2076
+ "arrange.bounds": {
2077
+ height?: number;
2078
+ page?: number; /** points */
2079
+ width?: number; /** points */
2080
+ x?: number; /** points */
2081
+ y?: number;
2082
+ };
2083
+ /** Nudge. Moves the selected object by dx and dy points. Params: {"dx"?: pt, "dy"?: pt}. Reads the selection. Changes the document. */
2084
+ "arrange.nudge": {
2085
+ dx?: number; /** points */
2086
+ dy?: number;
2087
+ };
2088
+ /** Group. Groups the selected pictures, shapes and text boxes into one object. Params: {} (groups the selected pictures, shapes and text boxes: the selected one plus those added with select.addObject). Reads the selection. Changes the document. */
2089
+ "arrange.group": Record<string, never>;
2090
+ /** Ungroup. Splits the selected group back into its objects. Params: {}. Reads the selection. Changes the document. */
2091
+ "arrange.ungroup": Record<string, never>;
2092
+ /** Add Object to Selection. Adds an object (by position or Selection Pane index) to the object selection. Params: {"pos"?: Pos, "index"?: n, "objects"?: [Pos | n]} (n: its Selection Pane index; with no object selected yet, the first one becomes the selection). Reads the selection. */
2093
+ "select.addObject": {
2094
+ index?: number; /** [Pos | n] */
2095
+ objects?: Array<Json>; /** a position as document.selection answers (or {"block", "off"?} in the body) */
2096
+ pos?: {
2097
+ off?: number;
2098
+ path?: Array<number>;
2099
+ story?: Json;
2100
+ };
2101
+ };
2102
+ /** Select Objects. Selects an object by its Selection Pane index, or every object. Params: {"index"?: n}. Reads the selection. */
2103
+ "select.objects": {
2104
+ index?: number;
2105
+ };
2106
+ /** Shape Fill. Sets the selected shape's fill colour as RRGGBB, or removes the fill with null. Params: {"color": "RRGGBB" | null}. Reads the selection. Changes the document. */
2107
+ "shape.fill": {
2108
+ color?: Json;
2109
+ };
2110
+ /** Shape Outline. Sets the selected shape's outline colour and width, or removes it with null. Params: {"color": "RRGGBB" | null, "width"?: pt, "dash"?: "solid"|"dot"|"dash"|"lgDash"|"dashDot"|"lgDashDot"|"lgDashDotDot"|"sysDash"|"sysDot"|"sysDashDot"|"sysDashDotDot"}. Reads the selection. Changes the document. */
2111
+ "shape.outline": {
2112
+ color?: Json;
2113
+ dash?: "solid" | "dot" | "dash" | "lgDash" | "dashDot" | "lgDashDot" | "lgDashDotDot" | "sysDash" | "sysDot" | "sysDashDot" | "sysDashDotDot"; /** points */
2114
+ width?: number;
2115
+ };
2116
+ /** Shape Effects. Sets shadow, glow, soft edge and reflection effects on the selected shape. Params: {"shadow"?: preset|{"preset"?, "color"?: "RRGGBB", "transparency"?: %, "blur"?: pt, "distance"?: pt, "angle"?: deg}|null, "glow"?: pt|{"color"?: "RRGGBB", "size"?: pt, "transparency"?: %}|null, "softEdge"?: pt|null} (shadow presets: offsetBottomRight, offsetBottom, offsetBottomLeft, offsetRight, offsetCenter, offsetLeft, offsetTopRight, offsetTop, offsetTopLeft; an omitted key is left as it is; applies to every shape in the selection). Reads the selection. Changes the document. */
2117
+ "shape.effects": {
2118
+ glow?: Json;
2119
+ shadow?: Json;
2120
+ softEdge?: Json;
2121
+ };
2122
+ /** Change Shape. Changes the selected shape to another preset kind, keeping its size and text. Params: {"kind": string}. Reads the selection. Changes the document. */
2123
+ "shape.change": {
2124
+ kind?: string;
2125
+ };
2126
+ /** Describe Drawing Objects. Answers drawing objects (shapes, pictures, text boxes, charts, ink, groups) with ids, geometry, frame, fill, stroke and text; default: the selected shapes, else all. Params: {"ids"?: [id]} (default: the selected objects, else (a caret, not a selection) every object in the document). Acts on `ids`. Reads the selection. */
2127
+ "drawing.describe": {
2128
+ id?: Json;
2129
+ ids?: Array<number>;
2130
+ };
2131
+ /** Insert Drawing Object. Inserts a floating drawing object (shape, text box or chart) with geometry, a frame in page points, placement, fill, stroke and text; answers its id. Params: {"kind"?: "shape"|"textBox"|"chart", "geometry"?: {"preset", "adjust"?}, "frame"?: {x,y,w,h,rot?,flipH?,flipV?} (points on page "placement.page"; without x/y the object goes in line at the caret), "placement"?: {"page"?, "wrap"?: "inline"|"square"|"tight"|"through"|"topAndBottom"|"behindText"|"inFrontOfText"}, "fill"?, "stroke"?, "text"?, "chart"?: {kind?, title?, categories?, series?: [{name, values, color?}], legend?, dataLabels?, gridlines?, xTitle?, yTitle?}}. Reads the selection. Changes the document. */
2132
+ "drawing.insert": {
2133
+ body?: {
2134
+ [key: string]: Json;
2135
+ }; /** {kind?, title?, categories?, series?: [{name, values, color?}], legend?, dataLabels?, gridlines?, xTitle?, yTitle?} */
2136
+ chart?: {
2137
+ categories?: Json;
2138
+ dataLabels?: Json;
2139
+ gridlines?: Json;
2140
+ kind?: Json;
2141
+ legend?: Json;
2142
+ series?: Array<{
2143
+ color?: string;
2144
+ name?: string;
2145
+ values?: Json;
2146
+ }>;
2147
+ title?: string;
2148
+ xTitle?: Json;
2149
+ yTitle?: Json;
2150
+ }; /** the shape's fill */
2151
+ fill?: Json; /** {x,y,w,h,rot?,flipH?,flipV?} (points on page "placement.page"; without x/y the object goes in line at the caret); points on page "placement.page"; without x/y the object goes in line at the caret */
2152
+ frame?: {
2153
+ flipH?: Json;
2154
+ flipV?: Json;
2155
+ h?: number;
2156
+ rot?: Json;
2157
+ w?: number;
2158
+ x?: number;
2159
+ y?: number;
2160
+ }; /** {"preset", "adjust"?} */
2161
+ geometry?: {
2162
+ adjust?: Json;
2163
+ preset?: string;
2164
+ };
2165
+ kind?: "shape" | "textBox" | "chart"; /** read by the command beside its listed parameters */
2166
+ page?: number; /** read by the command beside its listed parameters */
2167
+ paragraphs?: Array<Json>;
2168
+ placement?: {
2169
+ page?: number;
2170
+ wrap?: "inline" | "square" | "tight" | "through" | "topAndBottom" | "behindText" | "inFrontOfText";
2171
+ }; /** the outline: {color?, width? (pt), dash?} or {none: true} */
2172
+ stroke?: {
2173
+ [key: string]: Json;
2174
+ };
2175
+ text?: string; /** read by the command beside its listed parameters */
2176
+ warp?: {
2177
+ [key: string]: Json;
2178
+ };
2179
+ };
2180
+ /** Delete Drawing Objects. Deletes drawing objects by their ids from drawing.describe. Params: {"ids": [id]}. Acts on `ids`. Reads the selection. Changes the document. */
2181
+ "drawing.delete": {
2182
+ id?: Json;
2183
+ ids?: Array<number>;
2184
+ };
2185
+ /** Transform Drawing Objects. Moves, resizes, rotates or flips drawing objects by id, to a frame or by offsets. Params: {"ids": [id], "frame"? | "dx"?, "dy"?, "rotateBy"?, "flipH"?, "flipV"?}. Acts on `ids`. Reads the selection. Changes the document. */
2186
+ "drawing.transform": {
2187
+ dx?: number;
2188
+ dy?: number; /** flip horizontally */
2189
+ flipH?: boolean; /** flip vertically */
2190
+ flipV?: boolean; /** read by the command beside its listed parameters */
2191
+ frame?: {
2192
+ [key: string]: Json;
2193
+ }; /** read by the command beside its listed parameters */
2194
+ id?: Json;
2195
+ ids?: Array<number>;
2196
+ rotateBy?: Json;
2197
+ };
2198
+ /** Format Drawing Objects. Changes the fill, stroke or geometry of drawing objects by id. Params: {"ids": [id], "fill"?, "stroke"?, "geometry"?}. Acts on `ids`. Reads the selection. Changes the document. */
2199
+ "drawing.format": {
2200
+ effects?: {
2201
+ [key: string]: Json;
2202
+ }; /** the shape's fill */
2203
+ fill?: Json; /** {preset, adjust?: {adj...: value}} or {paths: [...]} */
2204
+ geometry?: {
2205
+ [key: string]: Json;
2206
+ }; /** read by the command beside its listed parameters */
2207
+ id?: Json;
2208
+ ids?: Array<number>; /** the outline: {color?, width? (pt), dash?} or {none: true} */
2209
+ stroke?: {
2210
+ [key: string]: Json;
2211
+ };
2212
+ };
2213
+ /** Set Drawing Object Text. Replaces the text of a drawing object, as plain text or as formatted paragraphs. Params: {"id", "text"? | "paragraphs"?}. Reads the selection. Changes the document. */
2214
+ "drawing.text": {
2215
+ body?: {
2216
+ [key: string]: Json;
2217
+ }; /** an id */
2218
+ id?: Json; /** read by the command beside its listed parameters */
2219
+ paragraphs?: Array<Json>; /** read by the command beside its listed parameters */
2220
+ text?: Json; /** read by the command beside its listed parameters */
2221
+ warp?: {
2222
+ [key: string]: Json;
2223
+ };
2224
+ };
2225
+ /** Reconnect Connector. Moves one end of a connector to another object's connection site or to a point. Params: {"id", "end": "start" | "end", "to"?: id, "site"?: n, "point"?: [x, y]}. Reads the selection. Changes the document. */
2226
+ "drawing.reconnect": {
2227
+ end?: "start" | "end"; /** an id */
2228
+ id?: Json;
2229
+ point?: Array<number>;
2230
+ site?: number; /** an id */
2231
+ to?: number;
2232
+ };
2233
+ /** Connect Drawing Objects. Draws a connector between two drawing objects, straight, bent or curved. Params: {"from": id, "to": id, "fromSite"?, "toSite"?, "geometry"?: {"preset": "straightConnector1"|"bentConnector3"|"curvedConnector3"}} (floating shapes). Reads the selection. Changes the document. */
2234
+ "drawing.connect": {
2235
+ from?: number;
2236
+ fromSite?: Json;
2237
+ geometry?: {
2238
+ preset?: "straightConnector1" | "bentConnector3" | "curvedConnector3";
2239
+ }; /** an id */
2240
+ to?: number;
2241
+ toSite?: Json;
2242
+ };
2243
+ /** Group Drawing Objects. Groups two or more floating shapes and pictures on one page into a group. Params: {"ids": [id]} (two or more floating shapes and pictures in the body, on one page). Acts on `ids`. Reads the selection. Changes the document. */
2244
+ "drawing.group": {
2245
+ ids?: Array<number>;
2246
+ };
2247
+ /** Ungroup Drawing Objects. Splits groups back into their objects. Params: {"ids": [id]} (groups). Acts on `ids`. Reads the selection. Changes the document. */
2248
+ "drawing.ungroup": {
2249
+ ids?: Array<number>;
2250
+ };
2251
+ /** Arrange Drawing Objects. Moves floating drawing objects to the front, back, or one step in the stacking order. Params: {"ids": [id], "order": "front"|"back"|"forward"|"backward"} (floating objects; an inline one has no place in the stack). Acts on `ids`. Changes the document. */
2252
+ "drawing.arrange": {
2253
+ ids?: Array<number>;
2254
+ order?: "front" | "back" | "forward" | "backward";
2255
+ };
2256
+ /** Chart. Inserts a chart (column, bar, line, pie...) with categories and series values at the caret. Params: {"type"?: "column"|"stackedColumn"|"percentColumn"|"bar"|"stackedBar"|"percentBar"|"line"|"lineMarkers"|"stackedLine"|"area"|"stackedArea"|"pie"|"doughnut"|"scatter"|"radar", "title"?: text|null, "categories"?, "series"?: [{name, values, color?}], "legend"?, "dataLabels"?, "gridlines"?, "xTitle"?, "yTitle"?, "width"?: pt, "height"?: pt} (in line at the caret, which stays after it; without data, Word's sample data). Reads the selection. Changes the document. */
2257
+ "insert.chart": {
2258
+ categories?: Json;
2259
+ dataLabels?: Json;
2260
+ gridlines?: Json; /** points */
2261
+ height?: number; /** read by the command beside its listed parameters */
2262
+ kind?: string;
2263
+ legend?: Json; /** [{name, values, color?}] */
2264
+ series?: Array<{
2265
+ color?: string;
2266
+ name?: string;
2267
+ values?: Json;
2268
+ }>; /** text|null */
2269
+ title?: Json;
2270
+ type?: "column" | "stackedColumn" | "percentColumn" | "bar" | "stackedBar" | "percentBar" | "line" | "lineMarkers" | "stackedLine" | "area" | "stackedArea" | "pie" | "doughnut" | "scatter" | "radar"; /** points */
2271
+ width?: number;
2272
+ xTitle?: Json;
2273
+ yTitle?: Json;
2274
+ };
2275
+ /** Change Chart. Changes a chart by id: kind, title, legend, data labels, gridlines, axis titles and series. Params: {"id", "kind"?, "title"?: text|null, "legend"?: "top"|"bottom"|"left"|"right"|"topRight"|null, "dataLabels"?, "gridlines"?, "xTitle"?, "yTitle"?, "categories"?, "series"?: [{name, values, color?}]}. Reads the selection. Changes the document. */
2276
+ "drawing.chart": {
2277
+ categories?: Array<Json>; /** read by the command beside its listed parameters */
2278
+ dataLabelPosition?: string;
2279
+ dataLabels?: boolean;
2280
+ gridlines?: boolean; /** an id */
2281
+ id?: Json; /** read by the command beside its listed parameters */
2282
+ ids?: Array<Json>; /** chart type */
2283
+ kind?: string;
2284
+ legend?: Json; /** [{name, values, color?}] */
2285
+ series?: Array<{
2286
+ color?: string;
2287
+ name?: string;
2288
+ values?: Json;
2289
+ }>; /** read by the command beside its listed parameters */
2290
+ seriesFormat?: {
2291
+ [key: string]: Json;
2292
+ };
2293
+ title?: Json; /** read by the command beside its listed parameters */
2294
+ xAxis?: {
2295
+ [key: string]: Json;
2296
+ };
2297
+ xTitle?: Json; /** read by the command beside its listed parameters */
2298
+ yAxis?: {
2299
+ [key: string]: Json;
2300
+ };
2301
+ yTitle?: Json;
2302
+ };
2303
+ /** Select. Switches the editor back to selecting objects from an ink tool. Params: {}. Reads the selection. */
2304
+ "draw.select": Record<string, never>;
2305
+ /** Draw Shape. Selects a shape preset to draw next in the editor, or none. Params: {"preset": DrawingML preset | null}. Reads the selection. */
2306
+ "draw.shape": {
2307
+ preset?: Json;
2308
+ };
2309
+ /** Eraser. Selects the ink eraser in the editor, or with a point deletes the ink stroke there. Params: {"page"?: n, "x"?: pt, "y"?: pt} (no point: use the eraser; a point: delete the ink stroke there). Reads the selection. */
2310
+ "draw.eraser": {
2311
+ page?: number; /** points */
2312
+ x?: number; /** points */
2313
+ y?: number;
2314
+ };
2315
+ /** Pen. Selects the pen ink tool in the editor with a colour and width. Params: {"color"?: "RRGGBB", "width"?: pt}. Reads the selection. */
2316
+ "draw.pen": {
2317
+ color?: string; /** points */
2318
+ width?: number;
2319
+ };
2320
+ /** Pencil. Selects the pencil ink tool in the editor with a colour and width. Params: {"color"?: "RRGGBB", "width"?: pt}. Reads the selection. */
2321
+ "draw.pencil": {
2322
+ color?: string; /** points */
2323
+ width?: number;
2324
+ };
2325
+ /** Highlighter. Selects the highlighter ink tool in the editor with a colour and width. Params: {"color"?: "RRGGBB", "width"?: pt}. Reads the selection. */
2326
+ "draw.highlighter": {
2327
+ color?: string; /** points */
2328
+ width?: number;
2329
+ };
2330
+ /** Draw State. Answers the editor's current ink tool, colour and width. Params: {}. Reads the selection. */
2331
+ "draw.state": {
2332
+ page?: number; /** read by the command beside its listed parameters */
2333
+ x?: number; /** read by the command beside its listed parameters */
2334
+ y?: number;
2335
+ };
2336
+ /** Draw Ink. Draws one ink stroke through points on a page (page points, at most 5000) with a tool, colour and width. Params: {"page": n, "points": [[x, y], ...] (page points, at most 5000), "tool"?: "pen|pencil|highlighter", "color"?: "RRGGBB", "width"?: pt}. Reads the selection. Changes the document. */
2337
+ "draw.stroke": {
2338
+ color?: string;
2339
+ page?: number; /** page points, at most 5000 */
2340
+ points?: Array<Array<number>>;
2341
+ tool?: "pen" | "pencil" | "highlighter"; /** points */
2342
+ width?: number;
2343
+ };
2344
+ /** Erase Ink. Deletes the ink stroke at a point on a page. Params: {"page": n, "x": pt, "y": pt}. Reads the selection. Changes the document. */
2345
+ "draw.erase": {
2346
+ page?: number; /** points */
2347
+ x?: number; /** points */
2348
+ y?: number;
2349
+ };
2350
+ /** Hide Ink. Hides or shows ink in the editor. Params: {"value"?: bool}. Reads the selection. */
2351
+ "review.hideInk": {
2352
+ value?: boolean;
2353
+ };
2354
+ /** Draw Ink Strokes. Adds ink strokes (pen, pencil or highlighter) through points in page points. Params: {"strokes": [{"tool"?: "pen"|"pencil"|"highlighter", "color"?, "width"?: pt, "points": [[x, y, pressure?], ...]}], "placement"?: {"page"}} (page points; members left out take the current pen). Reads the selection. Changes the document. */
2355
+ "drawing.ink": {
2356
+ page?: number;
2357
+ placement?: {
2358
+ page?: number;
2359
+ }; /** [{"tool"?: "pen"|"pencil"|"highlighter", "color"?, "width"?: pt, "points": [[x, y, pressure?], ...]}] */
2360
+ strokes?: Array<{
2361
+ color?: string;
2362
+ points?: Array<Json>;
2363
+ tool?: "pen" | "pencil" | "highlighter";
2364
+ width?: number;
2365
+ }>;
2366
+ };
2367
+ /** Erase Ink. Deletes the ink strokes a path or a circle touches. Params: {"path": [[x, y], ...] | "x", "y", "radius"?: pt, "placement"?: {"page"}} (deletes the strokes the path touches). Reads the selection. Changes the document. */
2368
+ "drawing.erase": {
2369
+ page?: number; /** [x, y] page points */
2370
+ path?: Array<Array<number>>;
2371
+ placement?: {
2372
+ page?: number;
2373
+ }; /** points */
2374
+ radius?: number;
2375
+ y?: number;
2376
+ };
2377
+ /** Repeat. Repeats the last editing action (F4) at the caret or selection. Params: {}. Reads the selection. */
2378
+ "edit.repeat": Record<string, never>;
2379
+ /** Record Macro. Starts recording commands into a named macro; calling it again stops and saves the recording. Params: {"name"?: string} (call again to stop). Reads the selection. */
2380
+ "tools.recordMacro": {
2381
+ name?: string;
2382
+ };
2383
+ /** Macros. Runs, defines or deletes a macro (a named list of command steps) and answers the macro list. Params: {"run"?: name, "define"?: {"name": string, "steps": [{"command", "params"}]}, "delete"?: name}. Reads the selection. */
2384
+ "tools.macros": {
2385
+ define?: {
2386
+ name?: string;
2387
+ steps?: Array<{
2388
+ command?: Json;
2389
+ params?: Json;
2390
+ }>;
2391
+ };
2392
+ delete?: string;
2393
+ run?: string;
2394
+ };
2395
+ /** AutoCorrect Options. Turns AutoCorrect on or off, or adds a replacement (from, to), and answers the AutoCorrect list. Params: {"enabled"?: bool, "add"?: {"from": string, "to": string}}. Reads the selection. */
2396
+ "tools.autocorrect": {
2397
+ add?: {
2398
+ from?: string;
2399
+ to?: string;
2400
+ };
2401
+ enabled?: boolean;
2402
+ };
2403
+ /** Compare. Compares the document with a revised version (a file or text) and marks the differences as tracked changes. Params: {"path"?: string, "text"?: string (revised version)}. Changes the document. */
2404
+ "review.compare": {
2405
+ path?: Json; /** revised version */
2406
+ text?: string;
2407
+ };
2408
+ /** Combine. Combines another document's tracked changes and comments into this one. Params: {"path"?: string}. Reads the selection. Changes the document. */
2409
+ "review.combine": {
2410
+ path?: Json;
2411
+ };
2412
+ /** Check Accessibility. Answers accessibility issues in the document (missing alt text, heading order, table headers...) with where they are. Params: {}. Reads the selection. */
2413
+ "file.accessibility": Record<string, never>;
2414
+ /** Inspect Document. Removes chosen kinds of hidden content (comments, revisions, properties, hidden text, headers) and answers what was found. Params: {"remove"?: ["comments", "revisions", "properties", "hidden", "headers"]}. Reads the selection. Changes the document. */
2415
+ "file.inspect": {
2416
+ remove?: Array<string>;
2417
+ };
2418
+ /** Restrict Editing. Restricts editing to read only, comments, tracked changes or forms, or removes the restriction. Params: {"mode": "none|readOnly|comments|trackedChanges|forms"}. Changes the document. */
2419
+ "review.restrict": {
2420
+ mode?: "none" | "readOnly" | "comments" | "trackedChanges" | "forms";
2421
+ };
2422
+ /** Protect Document. Marks the document as protected in a mode (read only, comments, tracked changes), or unprotects it. Params: {"mode": "none|readOnly|comments|trackedChanges"}. Changes the document. */
2423
+ "file.protect": {
2424
+ mode?: "none" | "readOnly" | "comments" | "trackedChanges";
2425
+ };
2426
+ /** Version History. Saves a labelled version of the document or restores an earlier one, and answers the version list. Params: {"save"?: label, "restore"?: index}. Reads the selection. Changes the document. */
2427
+ "file.versions": {
2428
+ restore?: number; /** label for the saved version */
2429
+ save?: string;
2430
+ };
2431
+ /** Recover Unsaved Documents. Answers the unsaved documents that can be recovered. Params: {}. Reads the selection. */
2432
+ "file.recover": Record<string, never>;
2433
+ /** New from Template. Creates a new document from a template file. Params: {"path": string}. Reads the selection. Changes the document. */
2434
+ "file.newFromTemplate": {
2435
+ path?: Json;
2436
+ };
2437
+ /** Save as Template. Saves the document as a template to a path. Params: {"path": string}. Reads the selection. */
2438
+ "file.saveTemplate": {
2439
+ path?: Json;
2440
+ };
2441
+ /** AutoSave. Toggles AutoSave for the document. Params: {}. Reads the selection. Changes the document. */
2442
+ "file.autosave": {
2443
+ value?: boolean;
2444
+ };
2445
+ /** Check Compatibility. Answers features that older Word versions cannot show. Params: {}. Reads the selection. */
2446
+ "file.compatibility": Record<string, never>;
2447
+ /** Share. Answers how to share the document. Params: {}. Reads the selection. */
2448
+ "file.share": Record<string, never>;
2449
+ /** Quick Parts. Saves the selection as a named building block, inserts one, or deletes one, and answers the list. Params: {"save"?: name (from the selection), "insert"?: name, "delete"?: name} ? list. Reads the selection. Changes the document. */
2450
+ "insert.quickParts": {
2451
+ delete?: string;
2452
+ insert?: string; /** from the selection */
2453
+ save?: string;
2454
+ };
2455
+ /** AutoText. Saves the selection as an AutoText entry or inserts one by name. Params: {"save"?: name, "insert"?: name}. Reads the selection. Changes the document. */
2456
+ "insert.autoText": {
2457
+ insert?: string;
2458
+ save?: string;
2459
+ };
2460
+ /** Document Property. Inserts a document property (Title, Author, Subject...) as a field at the caret. Params: {"name": "Title|Author|Subject|Keywords|Comments|Category"}. Reads the selection. Changes the document. */
2461
+ "insert.docProperty": {
2462
+ name?: "Title" | "Author" | "Subject" | "Keywords" | "Comments" | "Category";
2463
+ };
2464
+ /** Signature Line. Inserts a signature line with the signer's name and title at the caret. Params: {"signer"?: string, "title"?: string}. Reads the selection. Changes the document. */
2465
+ "insert.signatureLine": {
2466
+ signer?: string;
2467
+ title?: string;
2468
+ };
2469
+ /** Object. Inserts the contents of a file as an object at the caret. Params: {"path": string}. Reads the selection. Changes the document. */
2470
+ "insert.object": {
2471
+ path?: Json;
2472
+ };
2473
+ /** Spreadsheet Table. Inserts a table from CSV text at the caret. Params: {"csv"?: string}. Reads the selection. Changes the document. */
2474
+ "insert.spreadsheet": {
2475
+ csv?: string;
2476
+ };
2477
+ /** Link to Previous. Toggles linking the current section's header (or footer) to the previous section's. Params: {"footer"?: bool}. Reads the selection. Changes the document. */
2478
+ "layout.linkToPrevious": {
2479
+ footer?: boolean;
2480
+ };
2481
+ /** Next Section. Moves to the header or footer of the next section. Params: {}. Reads the selection. */
2482
+ "hf.next": Record<string, never>;
2483
+ /** Previous Section. Moves to the header or footer of the previous section. Params: {}. Reads the selection. */
2484
+ "hf.previous": Record<string, never>;
2485
+ /** Header/Footer Position. Sets the distance of the header and footer from the page edge in points. Params: {"header"?: pt, "footer"?: pt}. Reads the selection. Changes the document. */
2486
+ "hf.position": {
2487
+ footer?: number; /** points */
2488
+ header?: number;
2489
+ };
2490
+ /** Cell Margins. Sets the default cell margins of the table at the caret in points. Params: {"top"?, "left"?, "bottom"?, "right"? (pt)}. Reads the selection. Changes the document. */
2491
+ "table.cellMargins": {
2492
+ bottom?: number;
2493
+ left?: number; /** pt */
2494
+ right?: number;
2495
+ top?: number;
2496
+ };
2497
+ /** Border Painter. Toggles the border painter tool in the editor. Params: {}. Reads the selection. Changes the document. */
2498
+ "table.borderPainter": {
2499
+ color?: string; /** read by the command beside its listed parameters */
2500
+ kind?: string; /** read by the command beside its listed parameters */
2501
+ width?: number;
2502
+ };
2503
+ /** Set Numbering Value. Sets the number of the list item at the caret, renumbering the items after it. Params: {"value": n}. Reads the selection. Changes the document. */
2504
+ "para.setNumberingValue": {
2505
+ value?: number;
2506
+ };
2507
+ /** Define New Bullet. Defines a bullet character and applies it to the selected list paragraphs. Params: {"char": string}. Reads the selection. Changes the document. */
2508
+ "para.defineBullet": {
2509
+ char?: string;
2510
+ };
2511
+ /** Define New Number Format. Defines a number format (decimal, Roman, letters), number text and start, and applies it to the selected list. Params: {"format": "decimal|upperRoman|lowerLetter...", "text"?: "%1.", "start"?: n}. Reads the selection. Changes the document. */
2512
+ "para.defineNumber": {
2513
+ format?: string;
2514
+ start?: number; /** like %1. */
2515
+ text?: string;
2516
+ };
2517
+ /** Language. Sets the proofing language of the selection, or marks it not to be proofed. Params: {"lang": "en-US|en-GB|fr-FR|...", "noProof"?: bool}. Reads the selection, mode. Changes the document. */
2518
+ "review.language": {
2519
+ lang?: string;
2520
+ noProof?: boolean;
2521
+ };
2522
+ /** Show Markup. Toggles showing revision markup in the editor. Params: {}. Reads the selection. */
2523
+ "review.showMarkup": {
2524
+ value?: boolean;
2525
+ };
2526
+ /** Editor. Answers the Editor pane's summary of spelling, grammar and refinement issues. Params: {}. Reads the selection. */
2527
+ "review.editor": Record<string, never>;
2528
+ /** Select Text with Similar Formatting. Selects all text with the same formatting as the selection. Params: {}. Reads the selection. */
2529
+ "select.similar": Record<string, never>;
2530
+ /** Extend Selection. Turns on extend mode in the editor, so caret moves grow the selection. Params: {}. Reads the selection. */
2531
+ "select.extend": {
2532
+ extend?: boolean;
2533
+ };
2534
+ /** Effects. Steps the theme's effects to the next preset. Params: {}. Changes the document. */
2535
+ "design.effects": {
2536
+ name?: string;
2537
+ };
2538
+ /** Focused Reading. Switches the editor to focused reading: Read Mode with Focus. Params: {}. Reads the selection. */
2539
+ "view.immersive": Record<string, never>;
2540
+ /** Vertical. Sets page movement in the editor to vertical scrolling. Params: {}. Reads the selection. */
2541
+ "view.vertical": Record<string, never>;
2542
+ /** Side to Side. Sets page movement in the editor to side-to-side. Params: {}. Reads the selection. */
2543
+ "view.sideToSide": Record<string, never>;
2544
+ /** Read Aloud. Starts reading the document aloud from the caret, optionally skipping citations. Params: {"skipCitations"?: bool}. Reads the selection. */
2545
+ "review.readAloud": {
2546
+ skipCitations?: boolean;
2547
+ };
2548
+ /** Play/Pause. Pauses or resumes reading aloud. Params: {}. Reads the selection. */
2549
+ "readAloud.playPause": {
2550
+ skipCitations?: boolean;
2551
+ };
2552
+ /** Next Sentence. Moves reading aloud to the next sentence. Params: {}. Reads the selection. */
2553
+ "readAloud.next": Record<string, never>;
2554
+ /** Previous Sentence. Moves reading aloud to the previous sentence. Params: {}. Reads the selection. */
2555
+ "readAloud.previous": Record<string, never>;
2556
+ /** Stop Reading. Stops reading the document aloud. Params: {}. Reads the selection. */
2557
+ "readAloud.stop": Record<string, never>;
2558
+ /** Reading Speed. Sets the reading-aloud speed from 0.5 to 3 (1 is normal). Params: {"value": number (0.5...3, 1 = normal)}. Reads the selection. */
2559
+ "readAloud.speed": {
2560
+ rate?: number; /** 0.5...3, 1 = normal */
2561
+ value?: number;
2562
+ };
2563
+ /** Skip Citations and Bibliography. Sets whether reading aloud skips citations and the bibliography. Params: {"value"?: bool}. Reads the selection. */
2564
+ "readAloud.skipCitations": {
2565
+ value?: boolean;
2566
+ };
2567
+ /** Read Aloud Status. Answers whether reading aloud is running, its speed and the sentence it is on. Params: {}. Reads the selection. */
2568
+ "readAloud.status": Record<string, never>;
2569
+ /** Move Past Citation. Moves the caret past the citation it is in. Params: {}. Reads the selection. */
2570
+ "caret.pastCitation": Record<string, never>;
2571
+ }
2572
+ /** A Doc file opened with `openDocument<Document, DocCommands>`. */
2573
+ export type DocDocument = ModelDocument<Document, DocCommands>;
2574
+ export type DocContext = RequestContext<Document, DocCommands>;
2575
+ export {};