@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,3483 @@
1
+ import type { CommandMap, ModelDocument, ModelList, ModelMap, ModelObject, ModelText, ModelTree, 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.layout: registered with @kition/sdk/script when this module loads. */
12
+ export declare const layoutKit: KitDescriptor;
13
+ /** The fields a new `Layout` takes (`list.add(fields)`). */
14
+ export type LayoutFields = {
15
+ title: string;
16
+ setup?: Json | null;
17
+ };
18
+ /** A `Layout` of kit.layout. */
19
+ export interface Layout extends ModelObject {
20
+ title: string;
21
+ setup: Json | null;
22
+ readonly settings: ModelMap<Json>;
23
+ readonly spreads: ModelList<Spread, SpreadFields>;
24
+ readonly parents: ModelList<Spread, SpreadFields>;
25
+ readonly layers: ModelList<Layer, LayerFields>;
26
+ readonly items: ModelTree<Item, ItemFields>;
27
+ readonly stories: ModelList<Story, StoryFields>;
28
+ readonly paragraphStyles: ModelList<Style, StyleFields>;
29
+ readonly characterStyles: ModelList<Style, StyleFields>;
30
+ readonly objectStyles: ModelList<Style, StyleFields>;
31
+ readonly tableStyles: ModelList<Style, StyleFields>;
32
+ readonly cellStyles: ModelList<Style, StyleFields>;
33
+ readonly swatches: ModelList<Swatch, SwatchFields>;
34
+ readonly assets: ModelList<Asset, AssetFields>;
35
+ readonly sections: ModelList<Section, SectionFields>;
36
+ readonly opaque: ModelList<Opaque, OpaqueFields>;
37
+ }
38
+ /** The fields a new `Spread` takes (`list.add(fields)`). */
39
+ export type SpreadFields = {
40
+ name?: string | null;
41
+ prefix?: string | null;
42
+ basedOn?: string | ModelObject | null;
43
+ allowShuffle?: boolean | null;
44
+ };
45
+ /** A `Spread` of kit.layout. */
46
+ export interface Spread extends ModelObject {
47
+ /** Read-only: the kit keeps it as it is. */
48
+ readonly number: number | null;
49
+ readonly pages: ModelList<Page, PageFields>;
50
+ readonly guides: ModelList<Guide, GuideFields>;
51
+ name: string | null;
52
+ prefix: string | null;
53
+ /** Read-only: the kit keeps it as it is. */
54
+ readonly parentLabel: string | null;
55
+ /** The id of a `Spread`. */
56
+ get basedOn(): string | null;
57
+ set basedOn(value: Spread | string | null);
58
+ allowShuffle: boolean | null;
59
+ }
60
+ /** The fields a new `Page` takes (`list.add(fields)`). */
61
+ export type PageFields = {
62
+ size: Json;
63
+ margins?: Json | null;
64
+ columns?: Json | null;
65
+ parent?: string | ModelObject | null;
66
+ showParentItems?: boolean | null;
67
+ x?: number | null;
68
+ side?: string | null;
69
+ props?: Json | null;
70
+ };
71
+ /** A `Page` of kit.layout. */
72
+ export interface Page extends ModelObject {
73
+ /** Read-only: the kit keeps it as it is. */
74
+ readonly number: number | null;
75
+ size: Json;
76
+ margins: Json | null;
77
+ columns: Json | null;
78
+ /** The id of a `Spread`. */
79
+ get parent(): string | null;
80
+ set parent(value: Spread | string | null);
81
+ showParentItems: boolean | null;
82
+ x: number | null;
83
+ side: string | null;
84
+ readonly overridden: ModelList<Item, ItemFields>;
85
+ props: Json | null;
86
+ }
87
+ /** The fields a new `Guide` takes (`list.add(fields)`). */
88
+ export type GuideFields = {
89
+ line: Json;
90
+ layer?: string | ModelObject | null;
91
+ };
92
+ /** A `Guide` of kit.layout. */
93
+ export interface Guide extends ModelObject {
94
+ /** Read-only: the kit keeps it as it is. */
95
+ readonly address: string | null;
96
+ line: Json;
97
+ /** The id of a `Layer`. */
98
+ get layer(): string | null;
99
+ set layer(value: Layer | string | null);
100
+ }
101
+ /** The fields a new `Layer` takes (`list.add(fields)`). */
102
+ export type LayerFields = {
103
+ name: string;
104
+ color?: Json | null;
105
+ visible?: boolean | null;
106
+ locked?: boolean | null;
107
+ printable?: boolean | null;
108
+ props?: Json | null;
109
+ };
110
+ /** A `Layer` of kit.layout. */
111
+ export interface Layer extends ModelObject {
112
+ /** Read-only: the kit keeps it as it is. */
113
+ readonly number: number | null;
114
+ name: string;
115
+ color: Json | null;
116
+ visible: boolean | null;
117
+ locked: boolean | null;
118
+ printable: boolean | null;
119
+ props: Json | null;
120
+ }
121
+ /** The fields a new `Section` takes (`list.add(fields)`). */
122
+ export type SectionFields = {
123
+ start: string | ModelObject;
124
+ numbering?: Json | null;
125
+ };
126
+ /** A `Section` of kit.layout. */
127
+ export interface Section extends ModelObject {
128
+ /** Read-only: the kit keeps it as it is. */
129
+ readonly address: string | null;
130
+ /** The id of a `Page`. */
131
+ get start(): string;
132
+ set start(value: Page | string);
133
+ numbering: Json | null;
134
+ }
135
+ /** The fields a new `Item` takes (`list.add(fields)`). */
136
+ export type ItemFields = {
137
+ shape: "rectangle" | "oval" | "polygon" | "graphicLine" | "path" | "group";
138
+ content: "unassigned" | "text" | "graphic" | "group";
139
+ spread?: string | ModelObject | null;
140
+ layer?: string | ModelObject | null;
141
+ name?: string | null;
142
+ key?: string | null;
143
+ xf: Json;
144
+ path?: Json | null;
145
+ fill?: Json | null;
146
+ stroke?: Json | null;
147
+ corners?: Json | null;
148
+ opacity?: number | null;
149
+ blend?: string | null;
150
+ effects?: Json | null;
151
+ wrap?: Json | null;
152
+ locked?: boolean | null;
153
+ hidden?: boolean | null;
154
+ nonprinting?: boolean | null;
155
+ objectStyle?: string | ModelObject | null;
156
+ textOptions?: Json | null;
157
+ graphic?: Json | null;
158
+ overrides?: string | ModelObject | null;
159
+ altText?: string | null;
160
+ props?: Json | null;
161
+ };
162
+ /** A `Item` of kit.layout. */
163
+ export interface Item extends ModelObject {
164
+ /** Read-only: the kit keeps it as it is. */
165
+ readonly number: number | null;
166
+ shape: "rectangle" | "oval" | "polygon" | "graphicLine" | "path" | "group";
167
+ content: "unassigned" | "text" | "graphic" | "group";
168
+ /** The id of a `Spread`. */
169
+ get spread(): string | null;
170
+ set spread(value: Spread | string | null);
171
+ /** The id of a `Layer`. */
172
+ get layer(): string | null;
173
+ set layer(value: Layer | string | null);
174
+ name: string | null;
175
+ key: string | null;
176
+ xf: Json;
177
+ path: Json | null;
178
+ fill: Json | null;
179
+ stroke: Json | null;
180
+ corners: Json | null;
181
+ opacity: number | null;
182
+ blend: string | null;
183
+ effects: Json | null;
184
+ wrap: Json | null;
185
+ locked: boolean | null;
186
+ hidden: boolean | null;
187
+ nonprinting: boolean | null;
188
+ /** The id of a `Style`. */
189
+ get objectStyle(): string | null;
190
+ set objectStyle(value: Style | string | null);
191
+ textOptions: Json | null;
192
+ graphic: Json | null;
193
+ /** The id of a `Item`. */
194
+ get overrides(): string | null;
195
+ set overrides(value: Item | string | null);
196
+ altText: string | null;
197
+ props: Json | null;
198
+ }
199
+ /** The fields a new `Story` takes (`list.add(fields)`). */
200
+ export type StoryFields = {
201
+ options?: Json | null;
202
+ };
203
+ /** A `Story` of kit.layout. */
204
+ export interface Story extends ModelObject {
205
+ /** Read-only: the kit keeps it as it is. */
206
+ readonly number: number | null;
207
+ get text(): ModelText;
208
+ set text(value: string);
209
+ readonly frames: ModelList<Item, ItemFields>;
210
+ readonly inlines: ModelList<Inline, InlineFields>;
211
+ readonly tables: ModelList<Table, TableFields>;
212
+ options: Json | null;
213
+ }
214
+ /** The fields a new `Inline` takes (`list.add(fields)`). */
215
+ export type InlineFields = {
216
+ kind: "anchoredObject" | "footnote" | "endnote" | "crossReference" | "textAnchor" | "indexEntry" | "editorialNote" | "hyperlinkSource";
217
+ item?: string | ModelObject | null;
218
+ data?: Json | null;
219
+ };
220
+ /** A `Inline` of kit.layout. */
221
+ export interface Inline extends ModelObject {
222
+ /** Read-only: the kit keeps it as it is. */
223
+ readonly address: string | null;
224
+ /** Read-only: the kit keeps it as it is. */
225
+ readonly number: number | null;
226
+ kind: "anchoredObject" | "footnote" | "endnote" | "crossReference" | "textAnchor" | "indexEntry" | "editorialNote" | "hyperlinkSource";
227
+ /** The id of a `Item`. */
228
+ get item(): string | null;
229
+ set item(value: Item | string | null);
230
+ data: Json | null;
231
+ get text(): ModelText;
232
+ set text(value: string);
233
+ }
234
+ /** The fields a new `Table` takes (`list.add(fields)`). */
235
+ export type TableFields = {
236
+ style?: string | ModelObject | null;
237
+ options?: Json | null;
238
+ };
239
+ /** A `Table` of kit.layout. */
240
+ export interface Table extends ModelObject {
241
+ /** Read-only: the kit keeps it as it is. */
242
+ readonly address: string | null;
243
+ /** Read-only: the kit keeps it as it is. */
244
+ readonly number: number | null;
245
+ /** The id of a `Style`. */
246
+ get style(): string | null;
247
+ set style(value: Style | string | null);
248
+ options: Json | null;
249
+ readonly rows: ModelList<TableRow, TableRowFields>;
250
+ readonly columns: ModelList<TableColumn, TableColumnFields>;
251
+ readonly cells: ModelMap<Json>;
252
+ }
253
+ /** The fields a new `TableRow` takes (`list.add(fields)`). */
254
+ export type TableRowFields = {
255
+ props?: Json | null;
256
+ };
257
+ /** A `TableRow` of kit.layout. */
258
+ export interface TableRow extends ModelObject {
259
+ /** Read-only: the kit keeps it as it is. */
260
+ readonly address: string | null;
261
+ props: Json | null;
262
+ }
263
+ /** The fields a new `TableColumn` takes (`list.add(fields)`). */
264
+ export type TableColumnFields = {
265
+ props?: Json | null;
266
+ };
267
+ /** A `TableColumn` of kit.layout. */
268
+ export interface TableColumn extends ModelObject {
269
+ /** Read-only: the kit keeps it as it is. */
270
+ readonly address: string | null;
271
+ props: Json | null;
272
+ }
273
+ /** The fields a new `Cell` takes (`list.add(fields)`). */
274
+ export type CellFields = {
275
+ span?: Json | null;
276
+ style?: string | ModelObject | null;
277
+ props?: Json | null;
278
+ };
279
+ /** A `Cell` of kit.layout. */
280
+ export interface Cell extends ModelObject {
281
+ /** Read-only: the kit keeps it as it is. */
282
+ readonly address: string | null;
283
+ span: Json | null;
284
+ /** The id of a `Style`. */
285
+ get style(): string | null;
286
+ set style(value: Style | string | null);
287
+ props: Json | null;
288
+ get text(): ModelText;
289
+ set text(value: string);
290
+ }
291
+ /** The fields a new `Style` takes (`list.add(fields)`). */
292
+ export type StyleFields = {
293
+ name: string;
294
+ basedOn?: string | ModelObject | null;
295
+ next?: string | ModelObject | null;
296
+ group?: string | null;
297
+ };
298
+ /** A `Style` of kit.layout. */
299
+ export interface Style extends ModelObject {
300
+ /** Read-only: the kit keeps it as it is. */
301
+ readonly address: string | null;
302
+ name: string;
303
+ /** Read-only: the kit keeps it as it is. */
304
+ readonly paragraphName: string | null;
305
+ /** Read-only: the kit keeps it as it is. */
306
+ readonly characterName: string | null;
307
+ /** Read-only: the kit keeps it as it is. */
308
+ readonly objectName: string | null;
309
+ /** Read-only: the kit keeps it as it is. */
310
+ readonly tableName: string | null;
311
+ /** Read-only: the kit keeps it as it is. */
312
+ readonly cellName: string | null;
313
+ /** The id of a `Style`. */
314
+ get basedOn(): string | null;
315
+ set basedOn(value: Style | string | null);
316
+ /** The id of a `Style`. */
317
+ get next(): string | null;
318
+ set next(value: Style | string | null);
319
+ group: string | null;
320
+ readonly attrs: ModelMap<Json>;
321
+ }
322
+ /** The fields a new `Swatch` takes (`list.add(fields)`). */
323
+ export type SwatchFields = {
324
+ name: string;
325
+ value: Json;
326
+ group?: string | null;
327
+ locked?: boolean | null;
328
+ hidden?: boolean | null;
329
+ named?: boolean | null;
330
+ };
331
+ /** A `Swatch` of kit.layout. */
332
+ export interface Swatch extends ModelObject {
333
+ /** Read-only: the kit keeps it as it is. */
334
+ readonly address: string | null;
335
+ name: string;
336
+ value: Json;
337
+ group: string | null;
338
+ locked: boolean | null;
339
+ hidden: boolean | null;
340
+ named: boolean | null;
341
+ }
342
+ /** The fields a new `Asset` takes (`list.add(fields)`). */
343
+ export type AssetFields = {
344
+ blob: BlobRef;
345
+ name?: string | null;
346
+ pixels?: Json | null;
347
+ page?: number | null;
348
+ link?: string | null;
349
+ };
350
+ /** A `Asset` of kit.layout. */
351
+ export interface Asset extends ModelObject {
352
+ /** Read-only: the kit keeps it as it is. */
353
+ readonly number: number | null;
354
+ blob: BlobRef;
355
+ name: string | null;
356
+ pixels: Json | null;
357
+ page: number | null;
358
+ link: string | null;
359
+ }
360
+ /** The fields a new `Opaque` takes (`list.add(fields)`). */
361
+ export type OpaqueFields = {
362
+ source: "idml";
363
+ place: Json;
364
+ depends?: Json | null;
365
+ body: BlobRef;
366
+ };
367
+ /** A `Opaque` of kit.layout. */
368
+ export interface Opaque extends ModelObject {
369
+ /** Read-only: the kit keeps it as it is. */
370
+ readonly address: string | null;
371
+ source: "idml";
372
+ place: Json;
373
+ depends: Json | null;
374
+ body: BlobRef;
375
+ }
376
+ /** The fields a new `CommentThread` takes (`list.add(fields)`). */
377
+ export type CommentThreadFields = {
378
+ anchor: Json;
379
+ resolved?: boolean | null;
380
+ };
381
+ /** A `CommentThread` of kit.layout. */
382
+ export interface CommentThread extends ModelObject {
383
+ /** Read-only: the kit keeps it as it is. */
384
+ readonly address: string | null;
385
+ anchor: Json;
386
+ resolved: boolean | null;
387
+ readonly comments: ModelList<Comment, CommentFields>;
388
+ }
389
+ /** The fields a new `Comment` takes (`list.add(fields)`). */
390
+ export type CommentFields = {
391
+ author: string;
392
+ name?: string | null;
393
+ created: string;
394
+ };
395
+ /** A `Comment` of kit.layout. */
396
+ export interface Comment extends ModelObject {
397
+ /** Read-only: the kit keeps it as it is. */
398
+ readonly address: string | null;
399
+ author: string;
400
+ name: string | null;
401
+ get body(): ModelText;
402
+ set body(value: string);
403
+ created: string;
404
+ }
405
+ /** Every command of kit.layout, by id, with its parameters. */
406
+ export interface LayoutCommands extends CommandMap {
407
+ /** Document. Replaces the open document with a new one from a page preset or size, with page count, facing pages, columns, gutter, margins and bleed. Params: {preset?: "Letter"|"A4"|..., width?, height?, pages?, facingPages?, columns?, gutter?, margins?: number|{top,bottom,inside,outside}, bleed?, title?}. Reads the mode. Changes the document. */
408
+ "file.new": {
409
+ bleed?: number;
410
+ columns?: number;
411
+ facingPages?: boolean; /** points */
412
+ gutter?: number;
413
+ height?: number;
414
+ margins?: Json;
415
+ pages?: Array<number>; /** "Letter"|"A4"|... */
416
+ preset?: string;
417
+ title?: string;
418
+ width?: number;
419
+ };
420
+ /** Sample Document. Replaces the open document with a multi-page magazine sample, useful for trying commands. Params: {} ? a multi-page magazine sample. Reads the mode. Changes the document. */
421
+ "file.newSample": Record<string, never>;
422
+ /** Document Presets. Lists the document presets (page sizes and settings) that file.new accepts. Params: {}. */
423
+ "file.presets": Record<string, never>;
424
+ /** Open. Opens a .klayout or .idml file from a path; fonts in a Document Fonts folder beside it load too. Params: {path} ? .klayout or .idml; the fonts in a `Document Fonts` folder beside it load first ? {index, documentFonts: faces loaded, warnings: font files skipped}. Reads the mode. Changes the document. */
425
+ "file.open": {
426
+ base64?: string; /** read by the command beside its listed parameters */
427
+ name?: string;
428
+ path?: Json;
429
+ };
430
+ /** Open Bytes. Opens a document from base64 bytes (Kition Layout JSON or an IDML package) under a name. Params: {name, base64} ? Kition Layout JSON or an IDML package. Reads the mode. Changes the document. */
431
+ "file.openBytes": {
432
+ base64?: string;
433
+ name?: string;
434
+ };
435
+ /** Save. Saves the document to its path, or to the given path, as .klayout. Params: {path?}. Reads the mode. Changes the document. */
436
+ "file.save": {
437
+ path?: Json;
438
+ };
439
+ /** Save As. Saves the document under a new path, which becomes its path. Params: {path}. Reads the mode. Changes the document. */
440
+ "file.saveAs": {
441
+ path?: Json;
442
+ };
443
+ /** Save a Copy. Writes a copy of the document to a path without changing which file it is or its unsaved state. Params: {path} ? writes the document without changing which file it is or its unsaved state. Reads the mode. Changes the document. */
444
+ "file.saveACopy": {
445
+ path?: Json;
446
+ };
447
+ /** Revert. Throws away unsaved changes and reloads the last saved version; this cannot be undone. Params: {} ? back to the last saved version (not undoable). Reads the mode. Changes the document. */
448
+ "file.revert": Record<string, never>;
449
+ /** Recovery Data. Lists unsaved documents a crash left in the recovery folder, with their paths and titles. Params: {dir?} ? [{uid, path, title, saved}] unsaved documents left by a crash (default: the session's recovery folder). */
450
+ "file.recovery.list": {
451
+ dir?: Json;
452
+ };
453
+ /** Save Recovery Data. Writes every unsaved document to the recovery folder. Params: {dir?} ? write every unsaved document to the recovery folder (the app does this on a timer). Reads the mode. Changes the document. */
454
+ "file.recovery.save": {
455
+ dir?: Json;
456
+ };
457
+ /** Recover Documents. Reopens the documents left in the recovery folder, unsaved. Params: {dir?} ? reopen documents left in the recovery folder (unsaved). Reads the mode. Changes the document. */
458
+ "file.recovery.open": {
459
+ dir?: Json;
460
+ };
461
+ /** Serialize. Answers the whole document as .klayout bytes in base64, without writing a file. Params: {} ? {base64, bytes} the .klayout file. */
462
+ "file.serialize": Record<string, never>;
463
+ /** Close. Closes the open document (or the one at an index). Params: {index?}. Reads the mode. Changes the document. */
464
+ "file.close": {
465
+ index?: number;
466
+ };
467
+ /** Activate Document. Makes the open document at an index the active one. Params: {index}. Reads the mode. Changes the document. */
468
+ "file.activate": {
469
+ index?: number;
470
+ };
471
+ /** Export Selection as Snippet. Exports the selected items with their stories, styles and images as a .klayout snippet, to a path or as base64. Params: {path?} ? the selected items (with their stories, styles and images) as a .klayout snippet; no path: {base64}. */
472
+ "snippet.export": {
473
+ path?: Json;
474
+ };
475
+ /** Import Options: Styles. Reads a document's paragraph and character styles before importing them, listing the names and conflicts; changes nothing. Params: {path | base64, name} ? {paragraph: [name], character: [name], conflicts: [name]} ? the styles a Word/RTF file brings (for styleMap / styleConflicts). */
476
+ "place.styles": {
477
+ base64?: Json;
478
+ name?: string; /** one of several alternative parameters */
479
+ path?: Json;
480
+ };
481
+ /** Place Snippet. Places a snippet's items on a spread, at their own positions unless x and y are given. Params: {path | base64, spread?, x?, y?} ? items keep their positions unless x/y given (top-left). Reads the mode. Changes the document. */
482
+ "snippet.place": {
483
+ base64?: Json; /** read by the command beside its listed parameters */
484
+ name?: string; /** one of several alternative parameters */
485
+ path?: Json; /** the spread (default spread 0); one that names no spread is refused */
486
+ spread?: Json;
487
+ x?: number;
488
+ y?: number;
489
+ };
490
+ /** Load Place Cursor. Loads a graphic into the place cursor so place.drop puts it on the page. Params: {path | base64, name?} ? load a graphic into the place cursor (then click/drag with the placeGun tool). Reads the mode. Changes the document. */
491
+ "place.load": {
492
+ base64?: Json;
493
+ name?: string; /** one of several alternative parameters */
494
+ path?: Json;
495
+ };
496
+ /** Place Loaded Graphic. Places the loaded graphic at a point, into a rectangle, or into a frame. Params: {spread?, x, y, rect?: [x0,y0,x1,y1], frame?: id}. Reads the active, mode. Changes the document. */
497
+ "place.drop": {
498
+ frame?: number; /** [x0, y0, x1, y1] */
499
+ rect?: Array<number>; /** the spread (default spread 0); one that names no spread is refused */
500
+ spread?: Json;
501
+ x?: number;
502
+ y?: number;
503
+ };
504
+ /** Place. Places a graphic or text file (by path or base64) on a spread or into a frame, at a position and size, with the page of a PDF. Params: {path?|base64?, name?, frame?: id (place into), spread?, x?, y?, width?, pdfPage?: n (1-based, Image Import Options), pdfCrop?: crop|trim|bleed|art|media, layoutPage?: n (IDML / .klayout: that page's objects as a group)} ? places an image (into the selected empty frame if any); text files (.txt, .docx, .rtf, .md) and Excel workbooks (.xlsx, as a table) go into the insertion point, the selected frame or a new frame on `page`/`rect` ? {autoflow?: adds pages with threaded frames until the text fits, removeStyles?, styleMap?: {imported name: document style}, styleConflicts?: useExisting|redefine|autoRename}. Reads the selection, active, mode. Changes the document. */
505
+ "file.place": {
506
+ autoflow?: boolean; /** one of several alternative parameters */
507
+ base64?: Json; /** an id; place into */
508
+ frame?: number; /** read by the command beside its listed parameters */
509
+ height?: number; /** IDML / .klayout: that page's objects as a group */
510
+ layoutPage?: number;
511
+ name?: string; /** read by the command beside its listed parameters */
512
+ page?: number; /** one of several alternative parameters */
513
+ path?: Json;
514
+ pdfCrop?: "crop" | "trim" | "bleed" | "art" | "media"; /** 1-based, Image Import Options */
515
+ pdfPage?: number; /** read by the command beside its listed parameters */
516
+ rect?: Array<Json>; /** the spread (default spread 0); one that names no spread is refused */
517
+ spread?: Json;
518
+ width?: number;
519
+ x?: number;
520
+ y?: number;
521
+ };
522
+ /** Export IDML. Writes the document as an IDML package to a path, or answers it as base64. Params: {path?, embedImages?: true} ? writes an IDML package to `path`, or returns {base64} without a path. */
523
+ "file.exportIdml": {
524
+ dir?: Json;
525
+ embedImages?: boolean; /** read by the command beside its listed parameters */
526
+ idml?: boolean; /** read by the command beside its listed parameters */
527
+ instructions?: string;
528
+ path?: Json; /** read by the command beside its listed parameters */
529
+ pdf?: boolean;
530
+ };
531
+ /** Open IDML. Opens an IDML package (path or base64) as a new document. Params: {path | base64, name?} ? opens an IDML package as a new document (linked images are read next to the file or from its Links/ folder; the fonts in a `Document Fonts` folder beside it load first) ? {index, documentFonts, warnings}. Reads the mode. Changes the document. */
532
+ "file.openIdml": {
533
+ base64?: Json;
534
+ dir?: Json; /** read by the command beside its listed parameters */
535
+ idml?: boolean; /** read by the command beside its listed parameters */
536
+ instructions?: string;
537
+ name?: string; /** one of several alternative parameters */
538
+ path?: Json; /** read by the command beside its listed parameters */
539
+ pdf?: boolean;
540
+ };
541
+ /** Export PDF. Exports pages (default all) to PDF with a preset, marks and bleed, to a path or as base64. Params: {path?, pages?: "1-3,5" | [1,3] (1-based positions; default all), flatten?: high|medium|low|ppi (Transparency Flattener: spreads with transparency are rasterised), spreads?: bool, fullScreen?: bool, bookmarksPanel?: bool, pageLayout?: single|continuous|twoUp|twoUpCover|twoUpContinuous, view?: fitPage|fitWidth|actual, advanceSeconds?: number (interactive PDF), bleed?: bool (document bleed), marks?: bool | {crop?, bleed?, pageInfo?, weight?, offset?}, standard?: "none"|"x4"|"a2b", compressImages?: bool, tagged?: bool (structure tree: stories as paragraphs, figures with alt text), media?: bool (interactive: embed placed video and sound), title?, author?} ? {path, bytes, pages, warnings} (no path: {base64, ...}). Reads the mode. Changes the document. */
542
+ "file.exportPdf": {
543
+ advanceSeconds?: number;
544
+ author?: string; /** document bleed */
545
+ bleed?: boolean;
546
+ bookmarksPanel?: boolean;
547
+ compressImages?: boolean; /** Transparency Flattener: spreads with transparency are rasterised */
548
+ flatten?: "high" | "medium" | "low" | "ppi";
549
+ fullScreen?: boolean;
550
+ marks?: Json; /** interactive: embed placed video and sound */
551
+ media?: boolean;
552
+ pageLayout?: "single" | "continuous" | "twoUp" | "twoUpCover" | "twoUpContinuous";
553
+ pages?: Json;
554
+ path?: Json;
555
+ spreads?: boolean;
556
+ standard?: "none" | "x4" | "a2b"; /** read by the command beside its listed parameters */
557
+ story?: number; /** structure tree: stories as paragraphs, figures with alt text */
558
+ tagged?: boolean;
559
+ title?: string;
560
+ view?: "fitPage" | "fitWidth" | "actual";
561
+ };
562
+ /** Export EPUB (Reflowable). Exports a reflowable EPUB with title, author, language and cover, to a path or as base64. Params: {path?, title?, author?, language?: "en", cover?: bool (the first page as the cover image), fixedLayout?: bool (pre-paginated: each page as an image with its text)} ? {path, bytes} (no path: {base64, bytes}). Reads the mode. Changes the document. */
563
+ "file.exportEpub": {
564
+ author?: string; /** the first page as the cover image */
565
+ cover?: boolean; /** pre-paginated: each page as an image with its text */
566
+ fixedLayout?: boolean; /** like en */
567
+ language?: string;
568
+ path?: Json;
569
+ title?: string;
570
+ };
571
+ /** Export EPUB (Fixed Layout). Exports a fixed-layout (pre-paginated) EPUB, to a path or as base64. Params: {path?, title?, author?, language?} ? pre-paginated EPUB ? {path, bytes} (no path: {base64, bytes}). Reads the mode. Changes the document. */
572
+ "file.exportFixedEpub": {
573
+ author?: string; /** read by the command beside its listed parameters */
574
+ cover?: boolean; /** read by the command beside its listed parameters */
575
+ fixedLayout?: boolean;
576
+ language?: string;
577
+ path?: Json;
578
+ title?: string;
579
+ };
580
+ /** Print Booklet. Exports printer spreads for a booklet (saddle stitch or two-up) as PDF. Params: {path?, type?: saddleStitch|twoUpConsecutive, spaceBetween? (pt)} ? printer spreads as PDF (pages imposed in booklet order) ? {path, bytes, sheets} (no path: {base64, ...}). Reads the mode. Changes the document. */
581
+ "file.printBooklet": {
582
+ path?: Json; /** points */
583
+ spaceBetween?: number;
584
+ type?: "saddleStitch" | "twoUpConsecutive";
585
+ };
586
+ /** Export HTML. Exports one self-contained HTML page with inline styles and embedded images. Params: {path?, title?, language?} ? one self-contained page (styles inline, images embedded), stories and graphics in reading order ? {path, bytes} (no path: {text, bytes}). Reads the mode. Changes the document. */
587
+ "file.exportHtml": {
588
+ language?: string;
589
+ path?: Json;
590
+ title?: string;
591
+ };
592
+ /** Export Text. Exports a story's text as plain text, RTF or Tagged Text. Params: {path?, format?: "txt"|"rtf"|"tagged" (Tagged Text; default from the path, else txt), story?, frame?} ? the story being edited or of the selected frame ? {path, bytes} (no path: {text, bytes}). Reads the selection, mode. Changes the document. */
593
+ "file.exportText": {
594
+ format?: "txt" | "rtf" | "tagged";
595
+ frame?: number;
596
+ path?: Json; /** a story id from document.inspect */
597
+ story?: number;
598
+ };
599
+ /** Export Image. Exports pages (default all) as PNG or JPEG images at a resolution, to a folder or as base64. Params: {format?: png|jpeg (default png), pages?: "1-3,5" | [1,3] (1-based; default all), ppi?: 72 (pixels per inch: 72 = one pixel per point), background?: paper|transparent (PNG only; default paper), quality?: 1..100 (JPEG, default 90), bleed?: bool, sizes?: bool (every size: the first page of the original and of each alternate layout, instead of `pages`)} ? {format, files: [{page, layout (its alternate layout's name, null in the original), base64, width, height}]}. Reads the mode. Changes the document. */
600
+ "file.exportImage": {
601
+ background?: "paper" | "transparent";
602
+ bleed?: boolean; /** default png */
603
+ format?: "png" | "jpeg";
604
+ pages?: Json; /** pixels per inch: 72 = one pixel per point */
605
+ ppi?: number; /** 1 to 100; JPEG, default 90 */
606
+ quality?: number; /** every size: the first page of the original and of each alternate layout, instead of `pages` */
607
+ sizes?: boolean; /** read by the command beside its listed parameters */
608
+ story?: number;
609
+ };
610
+ /** Export as Bytes. Answers the document as a PDF, PNG, JPEG, HTML, IDML or EPUB file in base64 without writing it; the host writes it as a new file. Params: {format: pdf|png|jpg|html|idml|epub, pages?: "1-3,5" | [1,3] (PDF, PNG, JPEG: 1-based; pictures default to the first page), bleed?: bool, ppi?: 72 (PNG, JPEG), background?: paper|transparent (PNG), quality?: 1..100 (JPEG), title?, author?, language?, cover?: bool (EPUB), fixedLayout?: bool (EPUB), embedImages?: bool (IDML), tagged?: bool (PDF)} ? the file as base64, without writing it ? {format, data, bytes, files?: [{page, data}] (pictures of several pages)}. */
611
+ "file.exportBytes": {
612
+ author?: Json; /** PNG */
613
+ background?: "paper" | "transparent";
614
+ bleed?: boolean; /** EPUB */
615
+ cover?: boolean; /** IDML */
616
+ embedImages?: boolean; /** EPUB */
617
+ fixedLayout?: boolean;
618
+ format?: "pdf" | "png" | "jpg" | "html" | "idml" | "epub";
619
+ language?: Json; /** "1-3,5" | [1,3] (PDF, PNG, JPEG: 1-based; pictures default to the first page); PDF, PNG, JPEG: 1-based; pictures default to the first page */
620
+ pages?: Json; /** PNG, JPEG */
621
+ ppi?: number; /** 1 to 100; JPEG */
622
+ quality?: number; /** PDF */
623
+ tagged?: boolean;
624
+ title?: string;
625
+ };
626
+ /** 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, mode. Changes the document. */
627
+ "edit.undo": {
628
+ scope?: "person" | "agent"; /** read by the command beside its listed parameters */
629
+ story?: number;
630
+ };
631
+ /** Redo. Redoes the last undone step of the caller's own scope. Params: {"scope":"person|agent"?}. Reads the selection, mode. Changes the document. */
632
+ "edit.redo": {
633
+ scope?: "person" | "agent"; /** read by the command beside its listed parameters */
634
+ story?: number;
635
+ };
636
+ /** Select. Selects objects by id, adding to the selection or selecting their content when asked. Params: {ids: [id], add?: bool, content?: bool}. Acts on `ids`. Reads the selection, mode. Changes the document. */
637
+ "selection.set": {
638
+ add?: boolean;
639
+ content?: boolean;
640
+ ids?: Array<number>;
641
+ };
642
+ /** Toggle Selection. Adds an object to the selection, or removes it if it is selected. Params: {id}. Acts on `id`. Reads the selection, mode. Changes the document. */
643
+ "selection.toggle": {
644
+ id?: Json;
645
+ };
646
+ /** Select All. Selects all items on the active spreads, or all text when editing a story. Params: {} ? all items on the active spreads, or all text in the story. Reads the selection, mode. Changes the document. */
647
+ "edit.selectAll": {
648
+ story?: number;
649
+ };
650
+ /** Deselect All. Clears the selection; no object stays selected. Params: {}. Reads the selection, mode. Changes the document. */
651
+ "edit.deselectAll": Record<string, never>;
652
+ /** Clear. Deletes the selected items (or the given ids), or the selected text. Params: {ids?} ? delete selected items (or the selected text). Acts on `ids`. Reads the selection, mode. Changes the document. */
653
+ "edit.clear": {
654
+ ids?: Array<Json>;
655
+ };
656
+ /** Copy. Copies the selection; for selected text it answers the text with its formatting. Params: {} ? {text} when text is selected (with formatting, footnotes, markers). Reads the selection, mode. Changes the document. */
657
+ "edit.copy": Record<string, never>;
658
+ /** Cut. Cuts the selection to the clipboard. Params: {}. Reads the selection, mode. Changes the document. */
659
+ "edit.cut": Record<string, never>;
660
+ /** Paste without Formatting. Pastes plain text at the insertion point in the formatting there. Params: {text?} ? plain text at the insertion point, in the format there. Reads the selection, mode. Changes the document. */
661
+ "edit.pasteWithoutFormatting": {
662
+ text?: string;
663
+ };
664
+ /** Paste. Pastes the clipboard (or given text), optionally in place at the copied position. Params: {inPlace?: bool, text?: the system clipboard's text (pastes it unless it is what was copied here)}. Reads the selection, mode. Changes the document. */
665
+ "edit.paste": {
666
+ inPlace?: boolean; /** text to paste instead of the clipboard */
667
+ text?: string;
668
+ };
669
+ /** Paste Into. Pastes the copied objects into the selected frame as its content, clipped by it. Params: {id?} ? the copied objects become the content of the selected frame (or `id`), clipped by it. Acts on `id`. Reads the selection, mode. Changes the document. */
670
+ "edit.pasteInto": {
671
+ id?: Json;
672
+ };
673
+ /** Paste in Place. Pastes the copied objects at their original positions. Params: {}. Reads the selection, mode. Changes the document. */
674
+ "edit.pasteInPlace": Record<string, never>;
675
+ /** Duplicate. Duplicates the selected objects, offset from the originals. Params: {}. Reads the selection, mode. Changes the document. */
676
+ "edit.duplicate": Record<string, never>;
677
+ /** Insert Endnote. Inserts an endnote reference at the insertion point with its text; the first one creates the endnote frame. Params: {text?} ? a reference at the insertion point; the first one makes the endnote frame on a new last page ? {story, id, frame}. Reads the selection, mode. Changes the document. */
678
+ "endnote.insert": {
679
+ text?: string;
680
+ };
681
+ /** Edit Endnote. Replaces an endnote's text, by its story and id. Params: {story, id, text}. Reads the mode. Changes the document. */
682
+ "endnote.edit": {
683
+ id?: Json; /** a story id from document.inspect */
684
+ story?: number;
685
+ text?: string;
686
+ };
687
+ /** Delete Endnote. Deletes an endnote's reference and text, by its story and id. Params: {story, id} ? removes the reference and its text. Reads the mode. Changes the document. */
688
+ "endnote.delete": {
689
+ id?: Json; /** a story id from document.inspect */
690
+ story?: number;
691
+ };
692
+ /** Endnotes. Lists the endnotes in numbering order with their story, id, number and text. Params: {} ? [{story, id, number, text}] in numbering order. */
693
+ "endnote.list": {
694
+ number?: string;
695
+ };
696
+ /** Document Endnote Options. Sets endnote numbering style, start, prefix and suffix, heading and styles. Params: {style?: arabic|upperRoman|lowerRoman|upperLetters|lowerLetters, startAt?, prefix?, suffix?, heading?, headingStyle?, paraStyle?, separator?} ? the options. Reads the mode. Changes the document. */
697
+ "endnote.options": {
698
+ heading?: string; /** a paragraph style name */
699
+ headingStyle?: string; /** a paragraph style name */
700
+ paraStyle?: string;
701
+ prefix?: string;
702
+ separator?: string;
703
+ startAt?: number;
704
+ style?: "arabic" | "upperRoman" | "lowerRoman" | "upperLetters" | "lowerLetters";
705
+ suffix?: string; /** read by the command beside its listed parameters */
706
+ text?: string;
707
+ };
708
+ /** New Note. Adds an editorial note (not printed) with text and author at the insertion point; answers its story and id. Params: {text, author?} ? at the insertion point ? {story, id}. Reads the selection, mode. Changes the document. */
709
+ "note.new": {
710
+ author?: string;
711
+ text?: string;
712
+ };
713
+ /** Edit Note. Changes a note's text or author. Params: {story, id, text?, author?}. Reads the mode. Changes the document. */
714
+ "note.edit": {
715
+ author?: string; /** an id */
716
+ id?: Json; /** a story id from document.inspect */
717
+ story?: number;
718
+ text?: string;
719
+ };
720
+ /** Delete Note. Deletes an editorial note by its story and id. Params: {story, id}. Reads the mode. Changes the document. */
721
+ "note.delete": {
722
+ id?: Json; /** a story id from document.inspect */
723
+ story?: number;
724
+ };
725
+ /** Convert Note to Text. Turns a note into ordinary story text in place of its anchor. Params: {story, id} ? the note's text replaces its anchor. Reads the mode. Changes the document. */
726
+ "note.convertToText": {
727
+ id?: Json; /** a story id from document.inspect */
728
+ story?: number;
729
+ };
730
+ /** Notes. Lists the notes in story order with their position, author and text. Params: {} ? [{story, id, at, author, text}] in story order. */
731
+ "note.list": Record<string, never>;
732
+ /** Create Frame. Creates a frame on a spread from a rectangle [x0, y0, x1, y1] in spread coordinates, with a shape and content type (graphic, text, unassigned); answers its id. Params: {spread?, rect: [x0,y0,x1,y1] (spread coords), shape?: rectangle|ellipse|polygon, content?: graphic|text|unassigned (default: text when text is given, else graphic), sides?: 6, text?: string, caret?: bool, vertical?: bool (text: a new vertical story)}. Reads the active, mode. Changes the document. */
733
+ "frame.create": {
734
+ caret?: boolean;
735
+ content?: "graphic" | "text" | "unassigned"; /** [x0, y0, x1, y1]; spread coords */
736
+ rect?: Array<number>;
737
+ shape?: "rectangle" | "ellipse" | "polygon";
738
+ sides?: number; /** the spread (default spread 0); one that names no spread is refused */
739
+ spread?: Json; /** read by the command beside its listed parameters */
740
+ starInset?: number;
741
+ text?: string; /** text: a new vertical story */
742
+ vertical?: boolean;
743
+ };
744
+ /** Create Line. Creates a straight line between two points on a spread; answers its id. Params: {spread?, a: [x,y], b: [x,y]}. Reads the active, mode. Changes the document. */
745
+ "line.create": {
746
+ a?: Array<number>;
747
+ b?: Array<number>; /** the spread (default spread 0); one that names no spread is refused */
748
+ spread?: Json;
749
+ };
750
+ /** Move. Moves objects (default: the selection) by dx and dy points, optionally as a copy or to another spread. Params: {dx, dy, copy?: bool, ids?, toSpread?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
751
+ "transform.move": {
752
+ copy?: boolean;
753
+ dx?: number;
754
+ dy?: number;
755
+ ids?: Array<Json>;
756
+ toSpread?: Json;
757
+ };
758
+ /** Resize. Resizes objects from one rectangle to another, scaling content when asked. Params: {from: rect, to: rect, content?: bool (scale content), distribute?: bool (Live Distribute: objects keep their size, their centres spread with the bounds), ids?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
759
+ "transform.resize": {
760
+ axis?: string; /** read by the command beside its listed parameters */
761
+ by?: string; /** scale content */
762
+ content?: boolean; /** Live Distribute: objects keep their size, their centres spread with the bounds */
763
+ distribute?: boolean; /** [x0, y0, x1, y1] in points */
764
+ from?: Array<number>;
765
+ ids?: Array<Json>; /** read by the command beside its listed parameters */
766
+ spacing?: number; /** [x0, y0, x1, y1] in points */
767
+ to?: Array<number>;
768
+ };
769
+ /** Rotate. Rotates objects by an angle in degrees, counter-clockwise, about their centre. Params: {angle (degrees, CCW), ids?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
770
+ "transform.rotate": {
771
+ angle?: number;
772
+ ids?: Array<Json>;
773
+ };
774
+ /** Scale. Scales objects by sx and sy about the selection centre. Params: {sx, sy, ids?} (about the selection centre). Acts on `ids`. Reads the selection, mode. Changes the document. */
775
+ "transform.scale": {
776
+ ids?: Array<Json>; /** horizontal scale factor */
777
+ sx?: number; /** vertical scale factor */
778
+ sy?: number;
779
+ };
780
+ /** Transform Again. Repeats the last transform (or sequence of transforms) on the selection. Params: {individually?: bool, sequence?: bool, ids?} ? repeat the last transform (or the whole sequence applied to this selection), on the selection as a whole or on each object about its own centre. Acts on `ids`. Reads the selection, mode. Changes the document. */
781
+ "transform.again": {
782
+ copy?: boolean;
783
+ ids?: Array<Json>;
784
+ individually?: boolean;
785
+ sequence?: boolean;
786
+ };
787
+ /** Clear Transformations. Removes rotation, shear and scaling from objects, keeping their centre. Params: {ids?} ? remove rotation, shear and scaling (the object keeps its centre). Acts on `ids`. Reads the selection, mode. Changes the document. */
788
+ "transform.clear": {
789
+ ids?: Array<Json>;
790
+ };
791
+ /** Shear. Shears objects by an angle in degrees. Params: {angle (degrees), ids?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
792
+ "transform.shear": {
793
+ angle?: number;
794
+ ids?: Array<Json>;
795
+ };
796
+ /** Apply Attributes (Eyedropper). Copies fill, stroke, corners, opacity, effects and wrap from one object to others, like the eyedropper. Params: {from: id, ids?} ? copy fill, stroke, corners, opacity, effects, wrap. Acts on `ids`. Reads the selection, mode. Changes the document. */
797
+ "object.matchAttributes": {
798
+ from?: number;
799
+ ids?: Array<Json>;
800
+ };
801
+ /** Flip. Flips objects horizontally or vertically. Params: {axis: horizontal|vertical, ids?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
802
+ "transform.flip": {
803
+ axis?: "horizontal" | "vertical";
804
+ ids?: Array<Json>;
805
+ };
806
+ /** Transform Panel. Sets objects' position, size, scale, rotation and shear exactly, as the Transform panel does. Params: {x?, y?, width?, height?, scaleX? (%), scaleY? (%), rotation? (?), shear? (?), ref?: 0..8, ids?} ? reference-point based geometry; rotation and shear are absolute (Transformations are Totals decides whether nested objects measure them on the pasteboard). Acts on `ids`. Reads the selection, mode. Changes the document. */
807
+ "transform.set": {
808
+ height?: number;
809
+ ids?: Array<Json>; /** 0 to 8 */
810
+ ref?: number; /** ? */
811
+ rotation?: number; /** percent */
812
+ scaleX?: number; /** percent */
813
+ scaleY?: number; /** degrees */
814
+ shear?: number;
815
+ width?: number;
816
+ x?: number;
817
+ y?: number;
818
+ };
819
+ /** Transform Values. Answers objects' scale, rotation and shear (and those of placed content). Params: {ids?} ? {scaleX, scaleY (%), rotation, shear (?), content?: the same for a placed graphic} of the first target; {x, y, width, height}: the box transform.set measures (top-left, page-relative). Acts on `ids`. Reads the selection, mode. */
820
+ "transform.info": {
821
+ ids?: Array<Json>;
822
+ };
823
+ /** Arrange. Moves objects to the front, forward, backward or to the back of the stacking order. Params: {to: front|forward|backward|back, ids?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
824
+ "object.arrange": {
825
+ ids?: Array<Json>;
826
+ to?: "front" | "forward" | "backward" | "back";
827
+ };
828
+ /** Bring to Front. Brings the selection to the front. Params: {}. Reads the selection, mode. Changes the document. */
829
+ "object.bringToFront": {
830
+ to?: string;
831
+ };
832
+ /** Bring Forward. Brings the selection one step forward. Params: {}. Reads the selection, mode. Changes the document. */
833
+ "object.bringForward": {
834
+ to?: string;
835
+ };
836
+ /** Send Backward. Sends the selection one step backward. Params: {}. Reads the selection, mode. Changes the document. */
837
+ "object.sendBackward": {
838
+ to?: string;
839
+ };
840
+ /** Send to Back. Sends the selection to the back. Params: {}. Reads the selection, mode. Changes the document. */
841
+ "object.sendToBack": {
842
+ to?: string;
843
+ };
844
+ /** Group. Groups objects (default: the selection) into one group. Params: {ids?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
845
+ "object.group": {
846
+ ids?: Array<Json>;
847
+ };
848
+ /** Ungroup. Splits groups back into their objects. Params: {ids?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
849
+ "object.ungroup": {
850
+ ids?: Array<Json>;
851
+ };
852
+ /** Lock. Locks objects so they cannot be selected or changed on the canvas. Params: {ids?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
853
+ "object.lock": {
854
+ ids?: Array<Json>;
855
+ };
856
+ /** Unlock All on Spread. Unlocks every locked object on the spread. Params: {}. Reads the mode. Changes the document. */
857
+ "object.unlockAll": Record<string, never>;
858
+ /** Hide. Hides objects; they stay in the document. Params: {ids?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
859
+ "object.hide": {
860
+ ids?: Array<Json>;
861
+ };
862
+ /** Show All on Spread. Shows every hidden object on the spread. Params: {}. Reads the mode. Changes the document. */
863
+ "object.showAll": Record<string, never>;
864
+ /** Set Visibility / Lock. Sets objects' hidden and locked flags, as the Layers panel's eye and lock do. Params: {ids: [id], hidden?: bool, locked?: bool} ? Layers panel eye/lock per object. Acts on `ids`. Reads the selection, mode. Changes the document. */
865
+ "object.setFlags": {
866
+ hidden?: boolean;
867
+ ids?: Array<number>;
868
+ locked?: boolean;
869
+ };
870
+ /** Fill. Sets objects' fill to a swatch with a tint from 0 to 1. Params: {swatch, tint?: 0..1, ids?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
871
+ "object.fill": {
872
+ ids?: Array<Json>; /** a swatch name */
873
+ swatch?: string; /** 0 to 1 */
874
+ tint?: number;
875
+ };
876
+ /** Stroke. Sets objects' stroke: swatch, tint, weight, alignment, stroke type, caps and joins, gap colour. Params: {swatch?, tint?, weight?, align?: center|inside|outside, type?: {kind:...}, cap?: butt|round|projecting, join?: miter|round|bevel, miterLimit?, start?, end?: none|simple|simpleWide|triangle|triangleWide|barbed|curved|circle|circleSolid|square|squareSolid|bar, gapSwatch?, gapTint?, gapOverprint?: bool, ids?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
877
+ "object.stroke": {
878
+ align?: "center" | "inside" | "outside";
879
+ cap?: "butt" | "round" | "projecting"; /** read by the command beside its listed parameters */
880
+ edge?: string;
881
+ end?: "none" | "simple" | "simpleWide" | "triangle" | "triangleWide" | "barbed" | "curved" | "circle" | "circleSolid" | "square" | "squareSolid" | "bar";
882
+ gapOverprint?: boolean; /** a swatch name */
883
+ gapSwatch?: string; /** percent */
884
+ gapTint?: number;
885
+ ids?: Array<Json>;
886
+ join?: "miter" | "round" | "bevel";
887
+ miterLimit?: number;
888
+ start?: number; /** a swatch name */
889
+ swatch?: string; /** percent from 0 to 100 */
890
+ tint?: number; /** read by the command beside its listed parameters */
891
+ to?: string; /** {kind:...} */
892
+ type?: {
893
+ kind?: Json;
894
+ };
895
+ weight?: number;
896
+ };
897
+ /** Opacity. Sets objects' opacity from 0 to 1 and blend mode. Params: {opacity: 0..1, blend?: normal|multiply|..., ids?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
898
+ "object.opacity": {
899
+ blend?: string;
900
+ ids?: Array<Json>; /** 0 to 1 */
901
+ opacity?: number;
902
+ };
903
+ /** Drop Shadow. Turns a drop shadow on or off and sets its distance, angle, opacity, size, spread and colour. Params: {on?: bool, distance?, angle?, globalLight?: bool, opacity?, size?, spread? (%), color? (swatch), ids?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
904
+ "object.dropShadow": {
905
+ angle?: number; /** swatch */
906
+ color?: string; /** points */
907
+ distance?: number;
908
+ globalLight?: boolean;
909
+ ids?: Array<Json>;
910
+ on?: boolean;
911
+ opacity?: number;
912
+ size?: number;
913
+ spread?: Json;
914
+ };
915
+ /** Inner Shadow. Turns an inner shadow on or off and sets its distance, angle, opacity, size, choke and colour. Params: {on?: bool, distance?, angle?, globalLight?: bool, opacity?, size?, choke? (%), color?, ids?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
916
+ "object.innerShadow": {
917
+ angle?: number; /** percent */
918
+ choke?: number;
919
+ color?: string; /** points */
920
+ distance?: number;
921
+ globalLight?: boolean;
922
+ ids?: Array<Json>;
923
+ on?: boolean;
924
+ opacity?: number;
925
+ size?: number;
926
+ };
927
+ /** Outer Glow. Turns an outer glow on or off and sets its opacity, size, spread and colour. Params: {on?: bool, opacity?, size?, spread? (%), color?, ids?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
928
+ "object.outerGlow": {
929
+ color?: string;
930
+ ids?: Array<Json>;
931
+ on?: boolean;
932
+ opacity?: number;
933
+ size?: number;
934
+ spread?: Json;
935
+ };
936
+ /** Object Export Options. Sets objects' export options: tagged-PDF artifact, rasterising for EPUB and HTML, alignment. Params: {ids?, artifact?: bool (tagged PDF decoration), rasterize?: bool (EPUB/HTML image), align?: left|center|right|"", pageBreakBefore?: bool, altText?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
937
+ "object.exportOptions": {
938
+ align?: "left" | "center" | "right" | "";
939
+ altText?: string; /** tagged PDF decoration */
940
+ artifact?: boolean; /** read by the command beside its listed parameters */
941
+ edge?: string;
942
+ ids?: Array<Json>;
943
+ pageBreakBefore?: boolean; /** EPUB/HTML image */
944
+ rasterize?: boolean; /** read by the command beside its listed parameters */
945
+ to?: string;
946
+ };
947
+ /** Inner Glow. Turns an inner glow on or off and sets its opacity, size, choke, source and colour. Params: {on?: bool, opacity?, size?, choke? (%), center?: bool (glow from the centre), color?, ids?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
948
+ "object.innerGlow": {
949
+ center?: boolean; /** percent */
950
+ choke?: number;
951
+ color?: string;
952
+ ids?: Array<Json>;
953
+ on?: boolean;
954
+ opacity?: number;
955
+ size?: number;
956
+ };
957
+ /** Bevel and Emboss. Turns bevel and emboss on or off with size, depth, angle, highlight and shadow. Params: {on?: bool, size?, depth? (%), angle?, globalLight?: bool, highlight?, highlightOpacity?, shadow?, shadowOpacity?, ids?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
958
+ "object.bevel": {
959
+ angle?: number; /** percent */
960
+ depth?: number;
961
+ globalLight?: boolean; /** a colour or swatch name */
962
+ highlight?: string; /** percent */
963
+ highlightOpacity?: number;
964
+ ids?: Array<Json>;
965
+ on?: boolean; /** a colour or swatch name */
966
+ shadow?: string; /** percent */
967
+ shadowOpacity?: number;
968
+ size?: number;
969
+ };
970
+ /** Satin. Turns a satin effect on or off with opacity, angle, distance, size and colour. Params: {on?: bool, opacity?, angle?, distance?, size?, invert?: bool, color?, ids?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
971
+ "object.satin": {
972
+ angle?: number;
973
+ color?: string; /** points */
974
+ distance?: number;
975
+ ids?: Array<Json>;
976
+ invert?: boolean;
977
+ on?: boolean;
978
+ opacity?: number;
979
+ size?: number;
980
+ };
981
+ /** Directional Feather. Turns a directional feather on or off with widths per side. Params: {on?: bool, widths?: [top, left, bottom, right] | number, ids?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
982
+ "object.directionalFeather": {
983
+ ids?: Array<Json>;
984
+ on?: boolean; /** read by the command beside its listed parameters */
985
+ story?: number;
986
+ widths?: Json;
987
+ };
988
+ /** Basic Feather. Sets a basic feather width on objects (0 turns it off). Params: {width (0 = off), ids?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
989
+ "object.feather": {
990
+ ids?: Array<Json>; /** 0 = off */
991
+ width?: number;
992
+ };
993
+ /** Content. Sets what a frame holds: graphic, text or unassigned. Params: {type: graphic|text|unassigned, ids?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
994
+ "object.content": {
995
+ ids?: Array<Json>;
996
+ type?: "graphic" | "text" | "unassigned";
997
+ };
998
+ /** Text Frame Options. Sets text frames' columns, gutter, insets, vertical justification, first baseline, auto-size and column rules. Params: {columns?, gutter?, inset?: number|[t,l,b,r] (null keeps that side), verticalJustification?: top|center|bottom|justify, firstBaseline?, autoSize?, ignoreWrap?, balanceColumns?, columnRule?: bool, columnRuleWeight? (pt), columnRuleColor? (swatch name), columnRuleTint? (0..1), columnRuleOffset? (pt, horizontal), columnRuleTopInset? (pt), columnRuleBottomInset? (pt), vertical?: bool (sets the story direction of the frames' stories, as Type ? Story Direction), ids?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
999
+ "object.textFrameOptions": {
1000
+ autoSize?: boolean;
1001
+ balanceColumns?: boolean;
1002
+ columnRule?: boolean; /** points */
1003
+ columnRuleBottomInset?: number; /** #rrggbb or a swatch name */
1004
+ columnRuleColor?: string; /** points */
1005
+ columnRuleOffset?: number; /** 0..1 */
1006
+ columnRuleTint?: number; /** points */
1007
+ columnRuleTopInset?: number; /** points */
1008
+ columnRuleWeight?: number;
1009
+ columns?: number;
1010
+ firstBaseline?: string; /** points */
1011
+ gutter?: number;
1012
+ ids?: Array<Json>;
1013
+ ignoreWrap?: boolean;
1014
+ inset?: Json; /** sets the story direction of the frames' stories, as Type ? Story Direction */
1015
+ vertical?: boolean;
1016
+ verticalJustification?: "top" | "center" | "bottom" | "justify";
1017
+ };
1018
+ /** Corner Options. Sets objects' corner shape (rounded, inverse rounded, inset, bevel, fancy) and size. Params: {shape: none|rounded|inverseRounded|inset|bevel|fancy, size, ids?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
1019
+ "object.cornerOptions": {
1020
+ ids?: Array<Json>;
1021
+ shape?: "none" | "rounded" | "inverseRounded" | "inset" | "bevel" | "fancy";
1022
+ size?: number;
1023
+ };
1024
+ /** Text Wrap. Sets how text wraps around objects (bounding box, contour, jump object, jump to next column) and the offset. Params: {mode: none|boundingBox|contour|jumpObject|jumpToNextColumn, offset?: number|[t,l,b,r], invert?: bool, ids?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
1025
+ "object.textWrap": {
1026
+ ids?: Array<Json>;
1027
+ invert?: boolean;
1028
+ mode?: "none" | "boundingBox" | "contour" | "jumpObject" | "jumpToNextColumn";
1029
+ offset?: Json;
1030
+ };
1031
+ /** Fitting. Fits a frame's graphic: fill or fit proportionally, fit content to frame, centre, or frame to content. Params: {mode: fillProportionally|fitProportionally|fitContentToFrame|centerContent|fitFrameToContent, ids?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
1032
+ "object.fit": {
1033
+ ids?: Array<Json>;
1034
+ mode?: "fillProportionally" | "fitProportionally" | "fitContentToFrame" | "centerContent" | "fitFrameToContent";
1035
+ };
1036
+ /** Frame Fitting Options. Sets a frame's fitting options: auto-fit, fitting, alignment reference and crop amounts. Params: {autoFit?: bool, fitting?: none|fillProportionally|fitProportionally|fitContentToFrame|centerContent, align?: 0..8 (reference point, 4 = centre), crop?: n | [t, l, b, r] (negative adds space), ids?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
1037
+ "object.fittingOptions": {
1038
+ align?: number;
1039
+ autoFit?: boolean;
1040
+ crop?: Json; /** read by the command beside its listed parameters */
1041
+ edge?: string;
1042
+ fitting?: "none" | "fillProportionally" | "fitProportionally" | "fitContentToFrame" | "centerContent";
1043
+ ids?: Array<Json>; /** read by the command beside its listed parameters */
1044
+ to?: string;
1045
+ };
1046
+ /** Rename. Renames an object by id. Params: {id, name}. Acts on `id`. Reads the selection, mode. Changes the document. */
1047
+ "object.rename": {
1048
+ id?: Json;
1049
+ name?: string;
1050
+ };
1051
+ /** Step and Repeat. Makes copies of the selection a number of times at a dx, dy offset, or as a grid of rows and columns. Params: {count?: 1..1000, dx?, dy?, rows?, columns?, ids?} ? copies of the selection (or ids) offset by (dx, dy) (12 pt each when neither is given; one not given is 0); with rows/columns, a grid of at most 1000 cells, and at most 1000 item copies including group contents. Acts on `ids`. Reads the selection, mode. Changes the document. */
1052
+ "edit.stepAndRepeat": {
1053
+ columns?: number; /** 1 to 1000 */
1054
+ count?: number;
1055
+ dx?: number;
1056
+ dy?: number;
1057
+ ids?: Array<Json>;
1058
+ rows?: number;
1059
+ };
1060
+ /** Create Path. Creates a path from anchor points with optional handles, open or closed; answers its id. Params: {spread?, anchors: [{p:[x,y], in?:[x,y], out?:[x,y]}], closed?: bool}. Reads the active, mode. Changes the document. */
1061
+ "path.create": {
1062
+ anchors?: Array<{
1063
+ in?: Array<number>;
1064
+ out?: Array<number>;
1065
+ p?: Array<number>;
1066
+ }>;
1067
+ closed?: boolean; /** the spread (default spread 0); one that names no spread is refused */
1068
+ spread?: Json;
1069
+ };
1070
+ /** Add Anchor. Adds an anchor point with handles at the end of a path. Params: {id, anchor: {p, in?, out?}} (spread coords). Acts on `id`. Reads the mode. Changes the document. */
1071
+ "path.appendAnchor": {
1072
+ anchor?: {
1073
+ in?: Json;
1074
+ out?: Json;
1075
+ p?: Json;
1076
+ }; /** an id */
1077
+ id?: Json;
1078
+ };
1079
+ /** Close Path. Closes an open path. Params: {id}. Acts on `id`. Reads the mode. Changes the document. */
1080
+ "path.close": {
1081
+ id?: Json;
1082
+ };
1083
+ /** Move Anchors. Moves anchor points (or their handles) of a path by dx, dy. Params: {id, anchors: [[subpath, index]], dx, dy, handle?: in|out}. Acts on `id`. Reads the mode. Changes the document. */
1084
+ "path.moveAnchors": {
1085
+ anchors?: Array<Array<Json>>;
1086
+ dx?: number;
1087
+ dy?: number;
1088
+ handle?: "in" | "out"; /** an id */
1089
+ id?: Json;
1090
+ };
1091
+ /** Align. Aligns objects' edges or centres to each other, the key object, the margins, the page or the spread. Params: {edge: left|hcenter|right|top|vcenter|bottom, to?: selection|keyObject|margins|page|spread, ids?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
1092
+ "object.align": {
1093
+ edge?: "left" | "hcenter" | "right" | "top" | "vcenter" | "bottom";
1094
+ ids?: Array<Json>;
1095
+ to?: "selection" | "keyObject" | "margins" | "page" | "spread";
1096
+ };
1097
+ /** Distribute. Distributes objects horizontally or vertically by centres or by equal spacing. Params: {axis: horizontal|vertical, by?: centers|spacing, spacing?: points, ids?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
1098
+ "object.distribute": {
1099
+ axis?: "horizontal" | "vertical";
1100
+ by?: "centers" | "spacing";
1101
+ ids?: Array<Json>; /** points */
1102
+ spacing?: number;
1103
+ };
1104
+ /** Polygon Settings. Sets the number of sides and star inset new polygons use, and answers the settings. Params: {sides?: 3?100, starInset?: 0?100 (%)} ? the settings new polygons use. Reads the mode. Changes the document. */
1105
+ "tool.polygonSettings": {
1106
+ sides?: number; /** 0?100 (%) */
1107
+ starInset?: number;
1108
+ };
1109
+ /** Move Gap. Moves the gap between objects at a point (Gap tool), resizing the objects beside it. Params: {at: [x, y] (spread), delta | dx/dy, spread?} ? Gap tool: the gap at `at` between objects (or an object and the page edge) moves by `delta`; the objects on both sides resize ? {axis, changed}. Reads the mode. Changes the document. */
1110
+ "gap.move": {
1111
+ at?: Array<number>; /** read by the command beside its listed parameters */
1112
+ delta?: number; /** read by the command beside its listed parameters */
1113
+ dx?: number; /** read by the command beside its listed parameters */
1114
+ dy?: number; /** the spread (default spread 0); one that names no spread is refused */
1115
+ spread?: Json;
1116
+ };
1117
+ /** Gridify. Creates a grid of frames filling a rectangle with columns, rows and a gutter. Params: {rect, cols, rows, gutter? (pt, 12), shape?, content?, spread?} ? a grid of frames filling `rect` (frame tools: arrow keys while dragging). Reads the active, mode. Changes the document. */
1118
+ "frame.grid": {
1119
+ cols?: number; /** graphic, text or unassigned */
1120
+ content?: string; /** points */
1121
+ gutter?: number; /** [x0, y0, x1, y1] in points */
1122
+ rect?: Array<number>;
1123
+ rows?: number; /** a frame shape such as rectangle or ellipse */
1124
+ shape?: string;
1125
+ spread?: Json;
1126
+ };
1127
+ /** Clipping Path. Makes a clipping path for a placed graphic from its alpha channel or detected edges, with a threshold. Params: {type?: alpha|edges (default alpha), threshold?: 0?255 (alpha: opaque above; edges: darker than 255 ? threshold counts; default 25), tolerance?: px (2), ids?} ? traces the placed graphic and makes the outline the frame (Convert Clipping Path to Frame). Acts on `ids`. Reads the selection, mode. Changes the document. */
1128
+ "object.clippingPath": {
1129
+ ids?: Array<Json>;
1130
+ threshold?: number; /** pixels; 2 */
1131
+ tolerance?: number; /** default alpha */
1132
+ type?: "alpha" | "edges";
1133
+ };
1134
+ /** Primary Text Frame. Makes the selected text frame's story the primary text frame, or turns that off. Params: {on?: bool (default: toggle), ids?} ? the selected text frame's story becomes the primary story (Smart Text Reflow adds and removes pages for it). Acts on `ids`. Reads the selection, mode. Changes the document. */
1135
+ "object.primaryTextFrame": {
1136
+ ids?: Array<Json>; /** default: toggle */
1137
+ on?: boolean; /** read by the command beside its listed parameters */
1138
+ what?: string;
1139
+ };
1140
+ /** Attributes. Sets objects' print attributes: overprint fill, stroke and gap, and non-printing. Params: {overprintFill?, overprintStroke?, overprintGap?, nonprinting?: bool, ids?} ? Attributes panel. Acts on `ids`. Reads the selection, mode. Changes the document. */
1141
+ "object.attributes": {
1142
+ ids?: Array<Json>;
1143
+ nonprinting?: boolean;
1144
+ overprintFill?: boolean;
1145
+ overprintGap?: boolean;
1146
+ overprintStroke?: boolean;
1147
+ };
1148
+ /** Global Light. Sets the light angle shared by effects that use global light. Params: {angle} ? the light angle shared by shadows that use Global Light. Reads the mode. Changes the document. */
1149
+ "object.globalLight": {
1150
+ angle?: number;
1151
+ };
1152
+ /** Script Label. Sets a free-text script label on objects so scripts and agents can find them with object.findByLabel. Params: {label, ids?} ? free text scripts and agents can find objects by. Acts on `ids`. Reads the selection, mode. Changes the document. */
1153
+ "object.label": {
1154
+ ids?: Array<Json>;
1155
+ label?: string;
1156
+ };
1157
+ /** Object Export Options. Sets the alternative text of objects for tagged PDF and EPUB. Params: {text, ids?} ? alternative text for tagged PDF and EPUB. Acts on `ids`. Reads the selection, mode. Changes the document. */
1158
+ "object.altText": {
1159
+ ids?: Array<Json>;
1160
+ text?: string;
1161
+ };
1162
+ /** Group Transparency. Sets isolate blending and knockout group on groups. Params: {isolate?: bool, knockout?: bool, ids?} ? Effects panel: Isolate Blending, Knockout Group. Acts on `ids`. Reads the selection, mode. Changes the document. */
1163
+ "object.transparencyGroup": {
1164
+ ids?: Array<Json>;
1165
+ isolate?: boolean;
1166
+ knockout?: boolean;
1167
+ };
1168
+ /** Find by Script Label. Answers the ids of objects whose script label equals a text. Params: {label} ? ids of objects whose label is `label`. */
1169
+ "object.findByLabel": {
1170
+ label?: string;
1171
+ };
1172
+ /** Move to Layer. Moves objects to a layer. Params: {layer, ids?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
1173
+ "object.setLayer": {
1174
+ ids?: Array<Json>;
1175
+ layer?: number;
1176
+ };
1177
+ /** Thread Text Frames. Threads a text frame's story into another frame (or a new frame drawn on a spread). Params: {from: text frame id, to?: frame id (an empty or text frame), spread?, rect?: [x0,y0,x1,y1] (a new text frame there, spread coords), page?: n (1-based: a new text frame on the page's margins), side?: out|in (default out: the frame follows `from`; in: it goes before `from`), keepLoaded?: bool (load the text cursor again from the frame), autoflow?: bool (Shift-click: then add pages with frames on their margins, threaded, until the story fits)} ? continue a story in another frame; a text frame's own text joins the story. Reads the active, mode. Changes the document. */
1178
+ "frame.thread": {
1179
+ at?: number; /** Shift-click: then add pages with frames on their margins, threaded, until the story fits */
1180
+ autoflow?: boolean; /** an object id from document.inspect or object.list */
1181
+ from?: number; /** load the text cursor again from the frame */
1182
+ keepLoaded?: boolean; /** read by the command beside its listed parameters */
1183
+ orientation?: string; /** 1-based: a new text frame on the page's margins */
1184
+ page?: number; /** read by the command beside its listed parameters */
1185
+ position?: string; /** [x0, y0, x1, y1]; a new text frame there, spread coords */
1186
+ rect?: Array<number>; /** default out: the frame follows `from`; in: it goes before `from` */
1187
+ side?: "out" | "in"; /** the spread (default spread 0, for frame.thread the source frame's spread); one that names no spread is refused */
1188
+ spread?: Json; /** read by the command beside its listed parameters */
1189
+ spreadGuide?: boolean; /** an object id from document.inspect or object.list */
1190
+ to?: number;
1191
+ };
1192
+ /** Break Thread. Breaks a text frame's thread after it (or before it); the following frames lose the story. Params: {frame: text frame id, side?: out|in (default out: break after the frame; in: before it)} ? the frames after the break become an empty story; the text stays and may overset. Reads the mode. Changes the document. */
1193
+ "frame.unthread": {
1194
+ frame?: number; /** default out: break after the frame; in: before it */
1195
+ side?: "out" | "in";
1196
+ };
1197
+ /** Show Text Threads. Shows or hides the lines between threaded text frames in the editor. Params: {on?: bool (default: toggle)} ? lines between the threaded frames of the selected frames' stories ? {on}. Reads the mode. Changes the document. */
1198
+ "view.showTextThreads": {
1199
+ on?: boolean;
1200
+ };
1201
+ /** Load Text Cursor. Loads the text cursor from a text frame's out port (or in port) to continue its story elsewhere. Params: {frame: text frame id, side?: out|in (default out)} ? load the text cursor from a frame's out or in port (the editor's port click); a click with the loadedText tool then threads. Reads the mode. Changes the document. */
1202
+ "frame.loadText": {
1203
+ frame?: number; /** default out */
1204
+ side?: "out" | "in";
1205
+ };
1206
+ /** Fit Text to Frame. Shrinks the text of text frames until it fits without overset, down to a minimum size. Params: {ids?: text frame ids (default: the selection, or the text being edited), min?: pt (default 1), max?: pt (default 1296)} ? scales every point size (and fixed leading) of each frame's story by one factor, the largest at which the story fits its frames without breaking a word ? {stories: [{story, scale, size}]}. Acts on `ids`. Reads the selection, mode. Changes the document. */
1207
+ "frame.fitText": {
1208
+ ids?: Array<number>; /** points; default 1296 */
1209
+ max?: number; /** points; default 1 */
1210
+ min?: number;
1211
+ };
1212
+ /** Page Background. Sets the page background colour (hex or swatch), or none for transparent. Params: {color: "#rrggbb" | swatch name | null (no background: transparent in PNG export), pages?: [1-based] (default: every page)} ? a locked rectangle at the back of each page's parent (a parent is made for pages without one), covering the page and its bleed ? {parents, swatch}. Reads the mode. Changes the document. */
1213
+ "page.background": {
1214
+ color?: Json; /** [1-based] (default: every page); default: every page */
1215
+ pages?: Array<Json>;
1216
+ };
1217
+ /** Templates. Lists the starter layouts document.applyTemplate accepts, with their sizes. Params: {} ? [{id, name, width, height}] ? the starter layouts `document.applyTemplate` makes. */
1218
+ "template.list": Record<string, never>;
1219
+ /** New from Template. Replaces the document's pages, parents and styles with a starter template (editorial, event, sale, quote). Params: {template: editorial|event|sale|quote} ? replaces the document's pages, parents, swatches and styles with a starter layout (one undo step) ? {template, name, width, height}. Reads the mode. Changes the document. */
1220
+ "document.applyTemplate": {
1221
+ template?: "editorial" | "event" | "sale" | "quote";
1222
+ };
1223
+ /** Add Anchor Point. Adds an anchor point on a path at the nearest point to a position. Params: {id, at: [x,y] (spread coords; the nearest point on the path), tolerance?: pt (default 4)} ? {subpath, anchor}. Acts on `id`. Reads the mode. Changes the document. */
1224
+ "path.addAnchor": {
1225
+ at?: Array<number>; /** an id */
1226
+ id?: Json; /** points; default 4 */
1227
+ tolerance?: number;
1228
+ };
1229
+ /** Delete Anchor Point. Deletes an anchor point of a path by subpath and anchor index (0-based); the object goes when no path is left. Params: {id, subpath, anchor} ? removes the point (and the object when no path is left). Acts on `id`. Reads the mode. Changes the document. */
1230
+ "path.deleteAnchor": {
1231
+ anchor?: number; /** an id */
1232
+ id?: Json; /** a subpath counted from 0 */
1233
+ subpath?: number;
1234
+ };
1235
+ /** Convert Direction Point. Converts an anchor point between corner and smooth, or drags out symmetric handles to a point. Params: {id, subpath, anchor, to?: [x,y] (spread coords: drag out symmetric handles to there), corner?: bool} ? without `to`, a smooth point becomes a corner and a corner gets smooth handles. Acts on `id`. Reads the mode. Changes the document. */
1236
+ "path.convertAnchor": {
1237
+ anchor?: number;
1238
+ corner?: boolean; /** an id */
1239
+ id?: Json; /** a subpath counted from 0 */
1240
+ subpath?: number; /** spread coords: drag out symmetric handles to there */
1241
+ to?: Array<number>;
1242
+ };
1243
+ /** Erase. Erases the part of a path the drag points cross, as the Erase tool does. Params: {id, points: [[x,y], ...] (spread coords: the Erase tool's drag), tolerance?: pt (default 4)} ? removes the stretch of path the drag ran along. Acts on `id`. Reads the mode. Changes the document. */
1244
+ "path.erase": {
1245
+ id?: Json; /** spread coords: the Erase tool's drag */
1246
+ points?: Array<Array<number>>; /** points; default 4 */
1247
+ tolerance?: number;
1248
+ };
1249
+ /** Smooth. Smooths a path along the drag points, re-fitting fewer anchors. Params: {id, points: [[x,y], ...] (spread coords), tolerance?: pt (default 4)} ? re-fits the stretch the drag ran along with fewer, smoother anchors. Acts on `id`. Reads the mode. Changes the document. */
1250
+ "path.smooth": {
1251
+ id?: Json; /** spread coords */
1252
+ points?: Array<Array<number>>; /** points; default 4 */
1253
+ tolerance?: number;
1254
+ };
1255
+ /** Articles. Lists the articles (export reading-order groups) with their items. Params: {} ? [{name, items, export}]. */
1256
+ "article.list": Record<string, never>;
1257
+ /** New Article. Creates an article from objects (default: the selection); answers its name. Params: {name?, ids? (default: the selection)} ? {name}. Acts on `ids`. Reads the selection, mode. Changes the document. */
1258
+ "article.new": {
1259
+ ids?: Array<Json>;
1260
+ name?: string;
1261
+ };
1262
+ /** Add Selection to Article. Appends objects to an article in order. Params: {name, ids? (default: the selection)} ? appended in order. Acts on `ids`. Reads the selection, mode. Changes the document. */
1263
+ "article.add": {
1264
+ ids?: Array<Json>;
1265
+ name?: string;
1266
+ };
1267
+ /** Remove from Article. Removes objects from an article. Params: {name, ids}. Acts on `ids`. Reads the selection, mode. Changes the document. */
1268
+ "article.remove": {
1269
+ ids?: Array<Json>;
1270
+ name?: string;
1271
+ };
1272
+ /** Article Options. Renames an article, sets whether it exports, or reorders its items. Params: {name, to?: new name, export?: bool, order?: [ids] (reorder)}. Reads the mode. Changes the document. */
1273
+ "article.options": {
1274
+ export?: boolean;
1275
+ name?: string; /** [ids] (reorder); reorder */
1276
+ order?: Array<number>; /** a new name */
1277
+ to?: string;
1278
+ };
1279
+ /** Delete Article. Deletes an article; its objects stay. Params: {name}. Reads the mode. Changes the document. */
1280
+ "article.delete": {
1281
+ name?: string;
1282
+ };
1283
+ /** Make Compound Path. Joins the selected paths into one compound path with the backmost object's look. Params: {ids?} ? one path from the selected paths (the backmost object's look); paths inside others become holes ? {id}. Acts on `ids`. Reads the selection, mode. Changes the document. */
1284
+ "object.makeCompoundPath": {
1285
+ ids?: Array<Json>;
1286
+ };
1287
+ /** Release Compound Path. Splits a compound path so each subpath becomes its own object; answers their ids. Params: {ids?} ? each subpath becomes its own object ? {ids}. Acts on `ids`. Reads the selection, mode. Changes the document. */
1288
+ "object.releaseCompoundPath": {
1289
+ ids?: Array<Json>;
1290
+ };
1291
+ /** Create Outlines. Converts text frames into compound paths of their glyphs. Params: {ids?} ? text frames become compound paths of their glyphs (one per text colour, grouped when several) ? {ids}. Acts on `ids`. Reads the selection, mode. Changes the document. */
1292
+ "type.createOutlines": {
1293
+ ids?: Array<Json>;
1294
+ };
1295
+ /** Pathfinder. Combines the selected shapes by add, subtract, intersect, exclude or minus back. Params: {op: add|subtract|intersect|exclude|minusBack, ids?} ? combine the selected shapes into one (the backmost keeps its look; the frontmost for minusBack) ? {id}. Acts on `ids`. Reads the selection, mode. Changes the document. */
1296
+ "object.pathfinder": {
1297
+ ids?: Array<Json>;
1298
+ op?: "add" | "subtract" | "intersect" | "exclude" | "minusBack";
1299
+ };
1300
+ /** Gradient Feather. Turns a gradient feather on or off, linear or radial, with angle and start and end opacity. Params: {on?: true, radial?, angle?, start?: opacity 0?100 (100), end?: (0), from?: [x,y], to?: [x,y] (spread coords: the Gradient Feather tool's drag), ids?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
1301
+ "object.gradientFeather": {
1302
+ angle?: number; /** 0 */
1303
+ end?: number;
1304
+ from?: Array<number>;
1305
+ ids?: Array<Json>;
1306
+ on?: boolean;
1307
+ radial?: boolean; /** opacity from 0 to 100 */
1308
+ start?: number; /** spread coords: the Gradient Feather tool's drag */
1309
+ to?: Array<number>;
1310
+ };
1311
+ /** Split Path. Cuts a path at the nearest point to a position (Scissors), opening it or splitting it in two. Params: {id, at: [x,y] (spread coords; the nearest point on the path)} ? Scissors: an open path becomes two, a closed one opens there ? {ids}. Acts on `id`. Reads the mode. Changes the document. */
1312
+ "path.split": {
1313
+ at?: Array<number>; /** an id */
1314
+ id?: Json;
1315
+ };
1316
+ /** New Book. Creates an empty book file (.dcbook) at a path. Params: {path} ? an empty book file (.dcbook). Reads the mode. Changes the document. */
1317
+ "book.new": {
1318
+ path?: Json;
1319
+ };
1320
+ /** Open Book. Opens a book file and answers its documents. Params: {path} ? {documents}. Reads the mode. Changes the document. */
1321
+ "book.open": {
1322
+ path?: Json;
1323
+ };
1324
+ /** Close Book. Closes the open book file. Params: {}. Reads the mode. Changes the document. */
1325
+ "book.close": Record<string, never>;
1326
+ /** Add Document. Adds a document to the book, optionally at an index. Params: {path, at?: index}. Reads the mode. Changes the document. */
1327
+ "book.add": {
1328
+ at?: number;
1329
+ path?: Json;
1330
+ };
1331
+ /** Remove Document. Removes the document at an index from the book. Params: {index}. Reads the mode. Changes the document. */
1332
+ "book.remove": {
1333
+ index?: number;
1334
+ };
1335
+ /** Style Source. Makes the document at an index the book's style source. Params: {index}. Reads the mode. Changes the document. */
1336
+ "book.styleSource": {
1337
+ index?: number;
1338
+ };
1339
+ /** Book. Answers the book: its path, style source and documents with their page counts and first pages. Params: {} ? {path, styleSource, documents: [{path, pages, firstPage}]}. */
1340
+ "book.list": Record<string, never>;
1341
+ /** Update Numbering. Renumbers the book's documents so each starts where the previous one ended. Params: {} ? each document starts numbering where the previous one ended (files are saved). Reads the mode. Changes the document. */
1342
+ "book.paginate": Record<string, never>;
1343
+ /** Synchronize Book. Copies the style source's paragraph and character styles and swatches into every document of the book. Params: {} ? paragraph and character styles and swatches of the style source go into every document (by name). Reads the mode. Changes the document. */
1344
+ "book.syncStyles": Record<string, never>;
1345
+ /** Export Book to PDF. Exports every document of the book in order as one PDF. Params: {path?} ? every document in order as one PDF ? {path, bytes, pages} (no path: {base64, ...}). Reads the mode. Changes the document. */
1346
+ "book.exportPdf": {
1347
+ path?: Json;
1348
+ };
1349
+ /** Convert to Button. Turns objects into buttons that go to a page, the first, last, next or previous page, or a URL. Params: {ids?, action: page|firstPage|lastPage|nextPage|previousPage|url|none, page?, url?} ? the selected objects act on release in interactive PDF. Acts on `ids`. Reads the selection, mode. Changes the document. */
1350
+ "button.set": {
1351
+ action?: "page" | "firstPage" | "lastPage" | "nextPage" | "previousPage" | "url" | "none";
1352
+ ids?: Array<Json>;
1353
+ page?: number;
1354
+ url?: string;
1355
+ };
1356
+ /** Convert to Object. Turns buttons back into ordinary objects. Params: {ids?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
1357
+ "button.clear": {
1358
+ action?: string;
1359
+ ids?: Array<Json>;
1360
+ };
1361
+ /** Convert to Form Field. Turns objects into form fields (text field, check box, combo box, list box, signature) with name, value and options. Params: {ids?, kind: textField|checkBox|comboBox|listBox|signature, name?, value?, options?: [string], multiline?, required?, fontSize?} ? interactive PDF form fields. Acts on `ids`. Reads the selection, mode. Changes the document. */
1362
+ "form.set": {
1363
+ autoflow?: boolean; /** points */
1364
+ fontSize?: number;
1365
+ ids?: Array<Json>; /** read by the command beside its listed parameters */
1366
+ keepLoaded?: boolean;
1367
+ kind?: "textField" | "checkBox" | "comboBox" | "listBox" | "signature";
1368
+ multiline?: boolean;
1369
+ name?: string;
1370
+ options?: Array<string>;
1371
+ required?: boolean;
1372
+ value?: string;
1373
+ };
1374
+ /** Convert to Object. Turns form fields back into ordinary objects. Params: {ids?} ? no longer a form field. Acts on `ids`. Reads the selection, mode. Changes the document. */
1375
+ "form.clear": {
1376
+ ids?: Array<Json>;
1377
+ };
1378
+ /** Form Fields. Lists the form fields with their ids, kinds, names, values and options. Params: {} ? [{id, kind, name, value, options}]. */
1379
+ "form.list": Record<string, never>;
1380
+ /** Buttons. Lists the buttons with their ids, names and actions. Params: {} ? [{id, name, action}]. */
1381
+ "button.list": Record<string, never>;
1382
+ /** Generate Static Caption. Generates a static caption below objects from a template with variables such as {name} and {altText}. Params: {text?: template (default "{name}"; variables {name} {path} {altText} {label} {ppi} {dimensions} {format}), position?: below|above|left|right, offset? (pt, 0), height? (pt, 24), style?: paragraph style, live?: bool (kept current as the source changes), ids?} ? {ids}. Acts on `ids`. Reads the selection, active, mode. Changes the document. */
1383
+ "object.caption": {
1384
+ height?: number;
1385
+ ids?: Array<Json>; /** kept current as the source changes */
1386
+ live?: boolean; /** pt, 0 */
1387
+ offset?: number;
1388
+ position?: "below" | "above" | "left" | "right";
1389
+ style?: string; /** a caption template such as {name} */
1390
+ text?: string;
1391
+ };
1392
+ /** Color Settings. Sets the working RGB and CMYK profiles and the rendering intent. Params: {rgb?: working RGB profile, cmyk?: working CMYK profile, intent?: perceptual|relative|saturation|absolute, bpc?: bool} ? {rgb, cmyk, intent, bpc, profiles}. Reads the mode. Changes the document. */
1393
+ "color.settings": {
1394
+ bpc?: boolean;
1395
+ cmyk?: string;
1396
+ intent?: "perceptual" | "relative" | "saturation" | "absolute";
1397
+ rgb?: string;
1398
+ };
1399
+ /** Load Profile. Loads an ICC profile from a path for use as a working space or proof target. Params: {path} ? an ICC profile (.icc/.icm) to use as a working space or proof target. Reads the mode. Changes the document. */
1400
+ "color.loadProfile": {
1401
+ path?: Json;
1402
+ };
1403
+ /** Convert Color. Converts a colour between RGB, CMYK and gray with the working profiles; changes nothing. Params: {color: {model: rgb, r, g, b} | {model: cmyk, c, m, y, k} | {model: gray, k}, to: rgb|cmyk|gray|lab} ? through the working spaces. */
1404
+ "color.convert": {
1405
+ color?: {
1406
+ [key: string]: Json;
1407
+ };
1408
+ to?: "rgb" | "cmyk" | "gray" | "lab";
1409
+ };
1410
+ /** Track Changes. Turns Track Changes in stories on or off; without on it toggles. Params: {on?: bool (default: toggle)}. Reads the mode. Changes the document. */
1411
+ "changes.track": {
1412
+ on?: boolean;
1413
+ };
1414
+ /** Changes. Lists tracked changes with their story, position, kind (inserted or deleted) and text. Params: {} ? [{story, start, end, kind: inserted|deleted, text}]. */
1415
+ "changes.list": Record<string, never>;
1416
+ /** Accept Change. Accepts the tracked change at a story position. Params: {story, start} ? the change at that position. Reads the selection, mode. Changes the document. */
1417
+ "changes.accept": {
1418
+ start?: number; /** a story id from document.inspect */
1419
+ story?: number;
1420
+ };
1421
+ /** Reject Change. Rejects the tracked change at a story position. Params: {story, start} ? the change at that position. Reads the selection, mode. Changes the document. */
1422
+ "changes.reject": {
1423
+ start?: number; /** a story id from document.inspect */
1424
+ story?: number;
1425
+ };
1426
+ /** Accept All Changes. Accepts every tracked change (in one story or all). Params: {story?} ? deleted text goes, added text stays. Reads the selection, mode. Changes the document. */
1427
+ "changes.acceptAll": {
1428
+ story?: number;
1429
+ };
1430
+ /** Reject All Changes. Rejects every tracked change (in one story or all). Params: {story?} ? added text goes, deleted text comes back. Reads the selection, mode. Changes the document. */
1431
+ "changes.rejectAll": {
1432
+ story?: number;
1433
+ };
1434
+ /** Conditions. Lists the conditional-text conditions with their colours and visibility. Params: {} ? [{name, color, visible}]. */
1435
+ "condition.list": Record<string, never>;
1436
+ /** New Condition. Creates a condition with a colour and visibility; answers its name. Params: {name, color?: [r, g, b], visible?} ? {name}. Reads the mode. Changes the document. */
1437
+ "condition.new": {
1438
+ color?: Array<number>;
1439
+ name?: string;
1440
+ visible?: boolean;
1441
+ };
1442
+ /** Condition Options. Renames a condition or changes its colour or visibility. Params: {name, to?: new name, color?: [r, g, b], visible?: bool}. Reads the mode. Changes the document. */
1443
+ "condition.options": {
1444
+ color?: Array<number>;
1445
+ name?: string; /** a new name */
1446
+ to?: string;
1447
+ visible?: boolean;
1448
+ };
1449
+ /** Delete Condition. Deletes a condition; the text it was applied to stays and shows. Params: {name} ? the text it was applied to stays (shown). Reads the mode. Changes the document. */
1450
+ "condition.delete": {
1451
+ name?: string;
1452
+ };
1453
+ /** Apply Condition. Applies a condition to the selected text, or removes it. Params: {name, on?: bool (default true), only?: bool (remove the others)} ? to the selected text; `name: null` with `only` removes all. Reads the selection, mode. Changes the document. */
1454
+ "condition.apply": {
1455
+ name?: string; /** default true */
1456
+ on?: boolean; /** remove the others */
1457
+ only?: boolean; /** read by the command beside its listed parameters */
1458
+ story?: number;
1459
+ };
1460
+ /** New Library. Creates an empty object library, saved to a path when given. Params: {path?} ? an empty Object Library (saved to `path` when given). Reads the mode. Changes the document. */
1461
+ "library.new": {
1462
+ path?: Json;
1463
+ };
1464
+ /** Open Library. Opens an object library from a path or JSON and answers its items. Params: {path | json} ? {items}. Reads the mode. Changes the document. */
1465
+ "library.open": {
1466
+ json?: Json; /** one of several alternative parameters */
1467
+ path?: Json;
1468
+ };
1469
+ /** Library Items. Lists the library's items with their indexes, names and descriptions. Params: {} ? [{index, name, description}]. */
1470
+ "library.list": Record<string, never>;
1471
+ /** Library Contents. Answers the library as JSON text, to save where there is no file system. Params: {} ? the library as JSON text (to save where there's no file system). */
1472
+ "library.json": Record<string, never>;
1473
+ /** Add Item. Adds the selection to the library as an item; answers its index. Params: {name?, description?} ? the selection ? {index}. Reads the selection, mode. Changes the document. */
1474
+ "library.add": {
1475
+ description?: string;
1476
+ name?: string;
1477
+ };
1478
+ /** Place Item. Places a library item on a spread at its original position or at x, y. Params: {index, spread?, x?, y?} ? at its original position unless x/y (top-left) are given. Reads the mode. Changes the document. */
1479
+ "library.place": {
1480
+ base64?: string; /** a position counted from 0 (the first is 0) */
1481
+ index?: number;
1482
+ spread?: Json;
1483
+ x?: number;
1484
+ y?: number;
1485
+ };
1486
+ /** Delete Item. Deletes a library item by index. Params: {index}. Reads the mode. Changes the document. */
1487
+ "library.remove": {
1488
+ index?: number;
1489
+ };
1490
+ /** Collect. Puts objects (default: the selection) onto the Content Collector conveyor. Params: {ids? (default: the selection)} ? each object onto the Content Collector conveyor ? {count}. Acts on `ids`. Reads the selection, mode. Changes the document. */
1491
+ "conveyor.collect": {
1492
+ ids?: Array<Json>; /** read by the command beside its listed parameters */
1493
+ to?: string;
1494
+ };
1495
+ /** Place. Places an item from the conveyor on a spread, keeping it on the conveyor when asked. Params: {index? (0), spread?, x?, y?, keep?: bool (stay on the conveyor)} ? the Content Placer: the collected object at x/y (top-left). Reads the mode. Changes the document. */
1496
+ "conveyor.place": {
1497
+ base64?: string; /** a position counted from 0 (the first is 0); 0 */
1498
+ index?: number; /** stay on the conveyor */
1499
+ keep?: boolean;
1500
+ spread?: Json;
1501
+ x?: number;
1502
+ y?: number;
1503
+ };
1504
+ /** Conveyor. Lists the items on the conveyor. Params: {} ? [name]. */
1505
+ "conveyor.list": Record<string, never>;
1506
+ /** Clear Conveyor. Removes every item from the conveyor. Params: {}. Reads the mode. Changes the document. */
1507
+ "conveyor.clear": Record<string, never>;
1508
+ /** Close Library. Closes the open object library. Params: {}. Reads the mode. Changes the document. */
1509
+ "library.close": Record<string, never>;
1510
+ /** Define Lists. Defines or renames a named list that numbered paragraphs can join across stories. Params: {name, continueAcrossStories?: true, rename?} ? paragraphs join it with type.para {listType: numbers, listName}. Reads the mode. Changes the document. */
1511
+ "list.define": {
1512
+ continueAcrossStories?: boolean;
1513
+ name?: string;
1514
+ rename?: string;
1515
+ };
1516
+ /** Delete List. Deletes a named list. Params: {name}. Reads the mode. Changes the document. */
1517
+ "list.delete": {
1518
+ name?: string;
1519
+ };
1520
+ /** Place and Link. Places a linked copy of a story in a new frame; the copy follows the parent when updated. Params: {story (parent), rect, spread?} ? a new frame whose story copies the parent and stays linked ? {id, story}. Reads the active, mode. Changes the document. */
1521
+ "story.placeAndLink": {
1522
+ rect?: Array<number>; /** the spread (default spread 0); one that names no spread is refused */
1523
+ spread?: Json; /** a story id from document.inspect */
1524
+ story?: number;
1525
+ };
1526
+ /** Linked Stories. Lists linked stories with their parents and whether they are out of date. Params: {} ? [{story, parent, outOfDate}]. */
1527
+ "story.links": Record<string, never>;
1528
+ /** Update Link. Updates linked stories (default: every out-of-date one) from their parents. Params: {story? (default: every out-of-date linked story)} ? the child takes the parent's current content (its own edits are replaced). Reads the mode. Changes the document. */
1529
+ "story.updateLink": {
1530
+ story?: number;
1531
+ };
1532
+ /** Unlink. Unlinks a story from its parent. Params: {story}. Reads the mode. Changes the document. */
1533
+ "story.unlink": {
1534
+ story?: number;
1535
+ };
1536
+ /** Insert Math Expression. Inserts a math expression typeset from LaTeX at the text insertion point or at a position. Params: {latex, size?: points (12), x?, y?, spread?} ? at the text insertion point (inline), else as a frame; or {id, latex} to edit one. Acts on `id`. Reads the selection, active, mode. Changes the document. */
1537
+ "math.insert": {
1538
+ id?: Json; /** a LaTeX expression */
1539
+ latex?: string;
1540
+ size?: number; /** the spread (default spread 0); one that names no spread is refused */
1541
+ spread?: Json;
1542
+ x?: number;
1543
+ y?: number;
1544
+ };
1545
+ /** Math Expression SVG. Typesets a LaTeX expression and answers its SVG and size without placing it. Params: {latex, size?} ? {svg, width, height} ? typeset without placing. */
1546
+ "math.svg": {
1547
+ latex?: string;
1548
+ size?: number;
1549
+ };
1550
+ /** Media Options. Sets placed media options: play on page load, loop, controls and poster. Params: {ids?, playOnPageLoad?, loop?, controls?, poster?: {path | base64+name} | null (placeholder)} ? for placed video and sound. Acts on `ids`. Reads the selection, mode. Changes the document. */
1551
+ "media.options": {
1552
+ controls?: boolean;
1553
+ ids?: Array<Json>;
1554
+ loop?: boolean;
1555
+ playOnPageLoad?: boolean;
1556
+ poster?: Json; /** read by the command beside its listed parameters */
1557
+ what?: string;
1558
+ };
1559
+ /** Media. Answers a media object's kind, name and playback options. Params: {id?} ? {kind, name, playOnPageLoad, loop, controls, poster}. Acts on `id`. */
1560
+ "media.get": {
1561
+ id?: Json;
1562
+ };
1563
+ /** Object Layers. Lists the layers of the selected placed PDF with their visibility. Params: {id?} ? [{name, visible, default}] ? the layers of the selected placed PDF. Acts on `id`. */
1564
+ "object.pdfLayers": {
1565
+ id?: Json;
1566
+ };
1567
+ /** Object Layer Options. Hides layers of placed PDFs by name. Params: {ids?, hidden: [layer name]} ? layers of placed PDFs to hide ([] = the file's own settings). Acts on `ids`. Reads the selection, mode. Changes the document. */
1568
+ "object.layerOptions": {
1569
+ hidden?: Array<Json>;
1570
+ ids?: Array<Json>; /** read by the command beside its listed parameters */
1571
+ story?: number; /** read by the command beside its listed parameters */
1572
+ what?: string;
1573
+ };
1574
+ /** Liquid Page Rule. Sets the liquid layout rule (scale, re-centre, guide or object based) for pages. Params: {rule: off|scale|reCenter|guideBased|objectBased, pages?: [1-based] (default: all)}. Reads the mode. Changes the document. */
1575
+ "liquid.pageRule": {
1576
+ pages?: Array<Json>;
1577
+ rule?: "off" | "scale" | "reCenter" | "guideBased" | "objectBased"; /** read by the command beside its listed parameters */
1578
+ story?: number;
1579
+ };
1580
+ /** Object Liquid Settings. Sets objects' liquid layout constraints: resize and pin to edges. Params: {ids?, resizeWidth?, resizeHeight?, pinTop?, pinBottom?, pinLeft?, pinRight?} ? for object-based pages. Acts on `ids`. Reads the selection, mode. Changes the document. */
1581
+ "liquid.object": {
1582
+ ids?: Array<Json>;
1583
+ pinBottom?: boolean;
1584
+ pinLeft?: boolean;
1585
+ pinRight?: boolean;
1586
+ pinTop?: boolean;
1587
+ resizeHeight?: boolean;
1588
+ resizeWidth?: boolean;
1589
+ };
1590
+ /** Convert to Liquid Guide. Makes a guide a liquid guide, or not. Params: {spread?, page, index, on?: bool (default true)}. Reads the mode. Changes the document. */
1591
+ "guide.liquid": {
1592
+ index?: number; /** default true */
1593
+ on?: boolean;
1594
+ page?: number; /** the spread (default spread 0); one that names no spread is refused */
1595
+ spread?: Json;
1596
+ };
1597
+ /** Create Alternate Layout. Creates an alternate layout of the pages at a new size, with a page rule. Params: {name, width, height, source?: layout name (default: the original layout), rule?: page rule for the copies (default: keep each page's)} ? the source layout's pages copied after the last page at the new size (a new section marked `name`), objects following the liquid rules; each parent they use is copied at the new size ? {name, firstPage, pages}. Reads the mode. Changes the document. */
1598
+ "layout.createAlternate": {
1599
+ height?: number;
1600
+ name?: string; /** a page rule such as scale or reCenter */
1601
+ rule?: string; /** a layout name */
1602
+ source?: string;
1603
+ width?: number;
1604
+ };
1605
+ /** Delete Alternate Layout. Deletes an alternate layout's pages and parents. Params: {name} ? deletes an alternate layout's pages, and the parents made for it ? {deleted, pages}. Reads the selection, mode. Changes the document. */
1606
+ "layout.deleteAlternate": {
1607
+ name?: string;
1608
+ };
1609
+ /** Layouts. Lists the layouts with their first page, page count and size. Params: {} ? [{name (null: the original), firstPage, pages, width, height}]. */
1610
+ "layout.list": Record<string, never>;
1611
+ /** Tags. Answers the XML tags, the style-to-tag map and whether a DTD is loaded. Params: {} ? {root, tags: [{name, color}], styleMap: [[style, tag]], dtd: bool}. */
1612
+ "xml.tags": Record<string, never>;
1613
+ /** New Tag. Creates an XML tag with a colour. Params: {name, color?: [r, g, b]}. Reads the mode. Changes the document. */
1614
+ "xml.newTag": {
1615
+ color?: Array<number>;
1616
+ name?: string;
1617
+ };
1618
+ /** Delete Tag. Deletes an XML tag; tagged objects are untagged. Params: {name} ? tagged objects are untagged. Reads the mode. Changes the document. */
1619
+ "xml.deleteTag": {
1620
+ name?: string;
1621
+ };
1622
+ /** Tag Text. Tags the selected text as an inline element, or untags it. Params: {tag | null (untag)} ? the selected text becomes an inline element. Reads the selection, mode. Changes the document. */
1623
+ "xml.tagText": {
1624
+ null?: Json;
1625
+ tag?: string; /** read by the command beside its listed parameters */
1626
+ what?: string;
1627
+ };
1628
+ /** Tag Frame. Tags frames (default: the selection) with an XML tag, creating it if new, or untags them. Params: {tag (made if new), ids? (default: the selection)} ? `tag: null` untags. Acts on `ids`. Reads the selection, mode. Changes the document. */
1629
+ "xml.tag": {
1630
+ ids?: Array<Json>;
1631
+ tag?: string; /** read by the command beside its listed parameters */
1632
+ what?: string;
1633
+ };
1634
+ /** Map Styles to Tags. Maps a paragraph style to an XML tag for export. Params: {style: paragraph style, tag | null} ? that style's paragraphs export as `<tag>` elements and import back with it. Reads the mode. Changes the document. */
1635
+ "xml.mapStyle": {
1636
+ null?: Json;
1637
+ style?: string; /** one of several alternative parameters */
1638
+ tag?: Json;
1639
+ };
1640
+ /** Structure. Answers the XML structure in reading order: elements with tags, ids, kinds and text. Params: {} ? {root, elements: [{tag, id, kind, text?}]} in reading order. */
1641
+ "xml.structure": Record<string, never>;
1642
+ /** Export XML. Exports the tagged content as XML, to a path or as text. Params: {path?} ? the tagged content in reading order ? {path, bytes} (no path: {text}). Reads the mode. Changes the document. */
1643
+ "file.exportXml": {
1644
+ path?: Json;
1645
+ };
1646
+ /** Load DTD. Loads a DTD for validation and adds a tag for each element it declares. Params: {path | text} ? keep the DTD for validation and add a tag for each declared element; the root takes the first element's name unless already named ? {elements}. Reads the mode. Changes the document. */
1647
+ "xml.loadDtd": {
1648
+ path?: Json; /** one of several alternative parameters */
1649
+ text?: string;
1650
+ };
1651
+ /** Delete DTD. Removes the loaded DTD. Params: {}. Reads the mode. Changes the document. */
1652
+ "xml.deleteDtd": Record<string, never>;
1653
+ /** Validate from Root Element. Validates the XML structure against the loaded DTD and answers the problems. Params: {} ? check the structure (as exported) against the loaded DTD ? {valid, problems: [{path, message}]}. */
1654
+ "xml.validate": Record<string, never>;
1655
+ /** Import XML. Imports XML, putting each element's content into the next frame with that tag. Params: {path | text} ? each element's content goes into the next text frame with that tag (child elements of mapped tags become paragraphs in their style) ? {placed, unmatched}. Reads the mode. Changes the document. */
1656
+ "file.importXml": {
1657
+ path?: Json; /** one of several alternative parameters */
1658
+ text?: string;
1659
+ };
1660
+ /** Stroke Styles. Lists the stroke styles with their kinds. Params: {} ? [{name, kind}]. */
1661
+ "strokeStyle.list": Record<string, never>;
1662
+ /** New Stroke Style. Creates a stroke style of stripes, dashes or dots. Params: {name, type: stripes|dash|dot, bands?: [[start, width] (fractions of the weight)], pattern?: [dash, gap, ...] (pt)} ? apply with object.stroke {type: {kind: "style", name}}. Reads the mode. Changes the document. */
1663
+ "strokeStyle.new": {
1664
+ bands?: Array<Array<number>>;
1665
+ name?: string; /** [dash, gap]; pt */
1666
+ pattern?: Array<number>; /** read by the command beside its listed parameters */
1667
+ story?: number;
1668
+ type?: "stripes" | "dash" | "dot";
1669
+ };
1670
+ /** Delete Stroke Style. Deletes a stroke style; strokes using it become solid. Params: {name} ? strokes using it become solid. Reads the mode. Changes the document. */
1671
+ "strokeStyle.delete": {
1672
+ name?: string;
1673
+ };
1674
+ /** Run Script. Runs a command script (lines of command ids with JSON parameters, or a JSON array) as one undo step. Params: {text} ? command script lines (`command.id {json}`, JSON lines or a JSON array; `$N.path` refers to earlier results) ? {results, steps}. Reads the selection, active, mode. Changes the document. */
1675
+ "script.run": {
1676
+ text?: string;
1677
+ };
1678
+ /** Convert Selection to Multi-State Object. Turns objects (or one group's objects) into a multi-state object. Params: {ids? (default: the selection; one group's objects or several objects become states)} ? {id, states}. Acts on `ids`. Reads the selection, mode. Changes the document. */
1679
+ "states.create": {
1680
+ id?: Json; /** default: the selection; one group's objects or several objects become states */
1681
+ ids?: Array<Json>; /** read by the command beside its listed parameters */
1682
+ what?: string;
1683
+ };
1684
+ /** Object States. Lists a multi-state object's states and the active one. Params: {id?} ? {states, active}. Acts on `id`. */
1685
+ "states.list": {
1686
+ id?: Json;
1687
+ };
1688
+ /** Show State. Shows one state of a multi-state object by index or name. Params: {id?, index? | name?}. Acts on `id`. Reads the selection, mode. Changes the document. */
1689
+ "states.show": {
1690
+ id?: Json; /** a position counted from 0 (the first is 0); one of several alternative parameters */
1691
+ index?: number; /** one of several alternative parameters */
1692
+ name?: string;
1693
+ };
1694
+ /** State Options. Renames a state of a multi-state object. Params: {id?, index, name}. Acts on `id`. Reads the selection, mode. Changes the document. */
1695
+ "states.rename": {
1696
+ id?: Json; /** a position counted from 0 (the first is 0) */
1697
+ index?: number;
1698
+ name?: string;
1699
+ };
1700
+ /** Release State to Objects. Releases a multi-state object back to a plain group. Params: {id?} ? back to a plain group (every state shows). Acts on `id`. Reads the selection, mode. Changes the document. */
1701
+ "states.release": {
1702
+ id?: Json;
1703
+ };
1704
+ /** Page Transition. Sets a page transition (blinds, box, dissolve...) for pages, a spread, or all. Params: {pages?: [1-based] | spread? | all?: bool, kind: blinds|box|comb|cover|dissolve|fade|push|split|uncover|wipe|zoomIn|zoomOut|none, duration?: seconds (1), horizontal?: bool} ? for interactive PDF. Reads the mode. Changes the document. */
1705
+ "page.transition": {
1706
+ all?: boolean; /** seconds; 1 */
1707
+ duration?: number;
1708
+ horizontal?: boolean;
1709
+ kind?: "blinds" | "box" | "comb" | "cover" | "dissolve" | "fade" | "push" | "split" | "uncover" | "wipe" | "zoomIn" | "zoomOut" | "none"; /** pages counted from 1 */
1710
+ pages?: Array<number>; /** one of several alternative parameters */
1711
+ spread?: Json; /** read by the command beside its listed parameters */
1712
+ story?: number;
1713
+ };
1714
+ /** Page Transitions. Lists the page transitions by spread. Params: {} ? [{spread, kind, duration, horizontal}]. */
1715
+ "page.transitions": Record<string, never>;
1716
+ /** Type on a Path. Puts text on a path, with a start distance, flip and alignment. Params: {id: path, text?, start?: distance along the path, flip?, align?: baseline|ascender|descender|center} ? {story} ? the text cursor goes into it. Acts on `id`. Reads the mode. Changes the document. */
1717
+ "type.onPath": {
1718
+ align?: "baseline" | "ascender" | "descender" | "center"; /** read by the command beside its listed parameters */
1719
+ edge?: string;
1720
+ flip?: boolean;
1721
+ id?: string; /** distance along the path in points */
1722
+ start?: number;
1723
+ text?: string; /** read by the command beside its listed parameters */
1724
+ to?: string;
1725
+ };
1726
+ /** Type on a Path Options. Changes type on a path's start, flip and alignment, or removes it. Params: {id?, start?, flip?, align?: baseline|ascender|descender|center, delete?: true (Delete Type from Path)}. Acts on `id`. Reads the selection, mode. Changes the document. */
1727
+ "type.pathOptions": {
1728
+ align?: "baseline" | "ascender" | "descender" | "center"; /** Delete Type from Path */
1729
+ delete?: boolean; /** read by the command beside its listed parameters */
1730
+ edge?: string;
1731
+ flip?: boolean; /** an id */
1732
+ id?: Json;
1733
+ start?: number; /** read by the command beside its listed parameters */
1734
+ to?: string;
1735
+ };
1736
+ /** Generate QR Code. Generates a QR code object for a URL, text, SMS, email or vCard. Params: {type?: url|text|sms|email|vcard (default url), content (url/text), number?, message?, to?, subject?, body?, name?, phone?, email?, org?, url?, color? (swatch, [Black]), rect? (new object; else into the selected frame, or re-encode a selected code), spread?} ? {id, content}. Reads the selection, active, mode. Changes the document. */
1737
+ "object.qrCode": {
1738
+ body?: string; /** swatch, [Black] */
1739
+ color?: string; /** the URL or text */
1740
+ content?: string;
1741
+ email?: string;
1742
+ message?: string;
1743
+ name?: string;
1744
+ number?: string;
1745
+ org?: string;
1746
+ phone?: string; /** [x0, y0, x1, y1] in points */
1747
+ rect?: Array<number>; /** the spread (default spread 0); one that names no spread is refused */
1748
+ spread?: Json;
1749
+ subject?: string; /** the recipient */
1750
+ to?: string;
1751
+ type?: string;
1752
+ url?: string;
1753
+ };
1754
+ /** First Object Above. Selects the frontmost object on the spread. Params: {} ? the frontmost object on the spread (layers included). Reads the selection, mode. Changes the document. */
1755
+ "select.firstAbove": {
1756
+ what?: string;
1757
+ };
1758
+ /** Next Object Above. Selects the next object above the selection in the stacking order. Params: {}. Reads the selection, mode. Changes the document. */
1759
+ "select.nextAbove": {
1760
+ what?: string;
1761
+ };
1762
+ /** Next Object Below. Selects the next object below the selection in the stacking order. Params: {}. Reads the selection, mode. Changes the document. */
1763
+ "select.nextBelow": {
1764
+ what?: string;
1765
+ };
1766
+ /** Last Object Below. Selects the backmost object on the spread. Params: {} ? the backmost object on the spread. Reads the selection, mode. Changes the document. */
1767
+ "select.lastBelow": {
1768
+ what?: string;
1769
+ };
1770
+ /** Container. Selects the group or frame that holds the selection. Params: {} ? the group or frame holding the selection. Reads the selection, mode. Changes the document. */
1771
+ "select.container": {
1772
+ what?: string;
1773
+ };
1774
+ /** Content. Selects the graphic inside a frame, or the first object in a group. Params: {} ? the graphic in a frame, or the first object in a group. Reads the selection, mode. Changes the document. */
1775
+ "select.content": {
1776
+ what?: string;
1777
+ };
1778
+ /** Next Object in Group. Selects the next object in the selection's group. Params: {}. Reads the selection, mode. Changes the document. */
1779
+ "select.nextInGroup": {
1780
+ what?: string;
1781
+ };
1782
+ /** Previous Object in Group. Selects the previous object in the selection's group. Params: {}. Reads the selection, mode. Changes the document. */
1783
+ "select.previousInGroup": {
1784
+ what?: string;
1785
+ };
1786
+ /** Convert Shape. Converts objects to another shape (rectangle, rounded rectangle, ellipse, triangle, polygon, line...). Params: {to: rectangle|roundedRectangle|beveledRectangle|inverseRoundedRectangle|ellipse|triangle|polygon|line|orthogonalLine|openPath|closedPath, ids?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
1787
+ "object.convertShape": {
1788
+ ids?: Array<Json>;
1789
+ to?: "rectangle" | "roundedRectangle" | "beveledRectangle" | "inverseRoundedRectangle" | "ellipse" | "triangle" | "polygon" | "line" | "orthogonalLine" | "openPath" | "closedPath";
1790
+ };
1791
+ /** Package. Packages the document into a new folder with its fonts, links, and optionally IDML, PDF and instructions. Params: {dir: folder to create, idml?: true, pdf?: false, instructions?: text} ? the document (its placed files relinked to Links/), Links/, the font files that draw its text in Document Fonts/ (fallback fonts included; unless their licence restricts it), an IDML copy, an optional PDF and a report ? {dir, files, report}. Reads the mode. Changes the document. */
1792
+ "file.package": {
1793
+ dir?: Json;
1794
+ idml?: boolean;
1795
+ instructions?: string;
1796
+ pdf?: boolean;
1797
+ };
1798
+ /** Copy Link(s) To. Copies placed files to a folder and relinks the document to the copies. Params: {dir, assets?: [asset ids] (default: all)} ? write the placed files to `dir` and relink to the copies ? {copied}. Reads the mode. Changes the document. */
1799
+ "links.copyTo": {
1800
+ asset?: number; /** [asset ids] (default: all); default: all */
1801
+ assets?: Array<Json>;
1802
+ dir?: Json;
1803
+ path?: Json; /** read by the command beside its listed parameters */
1804
+ story?: number;
1805
+ };
1806
+ /** Printers. Lists the printers and the default one. Params: {} ? {printers: [names], default}. */
1807
+ "file.printers": Record<string, never>;
1808
+ /** Print. Prints pages or spreads to a printer with copies, marks and bleed; dryRun only answers what would print. Params: {printer?, copies?: 1, pages?: "1-3,5", spreads?, marks?, bleed?, dryRun?: bool (only return the spool command)} ? {printer, copies, pages, command}. Reads the mode. Changes the document. */
1809
+ "file.print": {
1810
+ bleed?: number;
1811
+ copies?: number; /** only return the spool command */
1812
+ dryRun?: boolean;
1813
+ marks?: Json; /** like 1-3,5 */
1814
+ pages?: string;
1815
+ printer?: string;
1816
+ spreads?: boolean;
1817
+ };
1818
+ /** Place Caret. Puts the text caret in a frame at a point, turning an empty frame into a text frame. Params: {frame, point: [x,y] (spread coords)} ? converts empty frames to text frames. Reads the selection, mode. Changes the document. */
1819
+ "text.placeCaret": {
1820
+ frame?: number; /** spread coords */
1821
+ point?: Array<number>;
1822
+ };
1823
+ /** Release. Ends a press in text at a point: a drag moves or copies the selected text there. Params: {frame, point, moved: bool, copy?: bool} ? ends a press in text: a drag that started in the selected text moves (copy: duplicates) it to the point; a click places the caret. Reads the selection, mode. Changes the document. */
1824
+ "text.release": {
1825
+ copy?: boolean;
1826
+ frame?: number;
1827
+ moved?: boolean; /** [x, y] in points */
1828
+ point?: Array<number>;
1829
+ };
1830
+ /** Extend Text Selection. Extends the text selection to a point in a frame. Params: {frame, point}. Reads the selection, mode. Changes the document. */
1831
+ "text.extendTo": {
1832
+ frame?: number; /** [x, y] in points */
1833
+ point?: Array<number>;
1834
+ };
1835
+ /** Select Word. Selects the word at a point in a frame. Params: {frame, point}. Reads the selection, mode. Changes the document. */
1836
+ "text.selectWord": {
1837
+ frame?: number; /** [x, y] in points */
1838
+ point?: Array<number>;
1839
+ };
1840
+ /** Select Text. Selects text in a story between two byte offsets, as find.find reports them. Params: {story, anchor, focus} (UTF-8 byte offsets into the story text, as find.find reports them: ? or ? counts 2 or 3). Reads the selection, mode. Changes the document. */
1841
+ "text.select": {
1842
+ anchor?: number; /** a text position */
1843
+ focus?: number; /** a story id from document.inspect */
1844
+ story?: number; /** read by the command beside its listed parameters */
1845
+ what?: string;
1846
+ };
1847
+ /** Type. Types text at the caret, replacing the selected text, with typographer's quotes unless raw. Params: {text, raw?: bool (no typographer's quotes)} ? replaces the selected text. Reads the selection, mode. Changes the document. */
1848
+ "text.insert": {
1849
+ raw?: boolean;
1850
+ text?: string;
1851
+ };
1852
+ /** Insert Special Character. Inserts a special character at the caret, replacing the selected text: a marker the text shows in place (the number of the page it sits on, the next or previous page's, the section marker) or a break (column, frame, page, odd or even page, forced line) or Indent to Here or Right Indent Tab. Params: {character: currentPageNumber|nextPageNumber|previousPageNumber|sectionMarker|columnBreak|frameBreak|pageBreak|oddPageBreak|evenPageBreak|forcedLineBreak|indentToHere|rightIndentTab} ? a marker (the page number where the text sits, ...) or break at the insertion point. Reads the selection, mode. Changes the document. */
1853
+ "text.insertSpecial": {
1854
+ character?: "currentPageNumber" | "nextPageNumber" | "previousPageNumber" | "sectionMarker" | "columnBreak" | "frameBreak" | "pageBreak" | "oddPageBreak" | "evenPageBreak" | "forcedLineBreak" | "indentToHere" | "rightIndentTab";
1855
+ };
1856
+ /** Delete Text. Deletes the selected text, or a character (or word) before or after the caret. Params: {forward?: bool, word?: bool}. Reads the selection, mode. Changes the document. */
1857
+ "text.delete": {
1858
+ forward?: boolean;
1859
+ word?: boolean;
1860
+ };
1861
+ /** Move Caret. Moves the text caret left, right, up, down, or to the line or story start or end, optionally by words or extending the selection. Params: {dir: left|right|up|down|lineStart|lineEnd|storyStart|storyEnd, extend?, word?}. Reads the selection, mode. Changes the document. */
1862
+ "text.move": {
1863
+ dir?: "left" | "right" | "up" | "down" | "lineStart" | "lineEnd" | "storyStart" | "storyEnd";
1864
+ extend?: boolean;
1865
+ word?: boolean;
1866
+ };
1867
+ /** Select Frame. Leaves text editing and selects the frame instead. Params: {}. Reads the selection, mode. Changes the document. */
1868
+ "text.exitToFrame": Record<string, never>;
1869
+ /** Story Column Direction. Sets a story's column progression to left to right or right to left. Params: {story?, direction: leftToRight|rightToLeft} ? column progression, independent of paragraph direction. Reads the selection, mode. Changes the document. */
1870
+ "story.setDirection": {
1871
+ direction?: "leftToRight" | "rightToLeft"; /** read by the command beside its listed parameters */
1872
+ frame?: Json; /** a story id from document.inspect */
1873
+ story?: number;
1874
+ };
1875
+ /** Set Story Text. Replaces a story's whole text; the story is found by its id from document.inspect. Params: {story, text} ? replace a story's whole text. Reads the selection, mode. Changes the document. */
1876
+ "story.setText": {
1877
+ story?: number;
1878
+ text?: string;
1879
+ };
1880
+ /** Edit Story. Replaces a byte range of a story's text, keeping the surrounding formatting. Params: {story, start, end, text} ? replace a byte range keeping surrounding formatting. Reads the selection, mode. Changes the document. */
1881
+ "story.replaceRange": {
1882
+ end?: number;
1883
+ start?: number; /** a story id from document.inspect */
1884
+ story?: number;
1885
+ text?: string;
1886
+ };
1887
+ /** Get Story. Answers a story's text, frames, paragraphs, direction and whether it is overset; the way to read text. Params: {story? | frame?} ? text, frames, paragraphs, vertical, overset. */
1888
+ "story.get": {
1889
+ frame?: number; /** read by the command beside its listed parameters */
1890
+ lines?: number; /** one of several alternative parameters */
1891
+ story?: Json;
1892
+ };
1893
+ /** Fill with Placeholder Text. Fills a text frame with placeholder text. Params: {frame?}. Reads the selection, mode. Changes the document. */
1894
+ "type.fillWithPlaceholder": {
1895
+ frame?: number; /** read by the command beside its listed parameters */
1896
+ story?: number;
1897
+ };
1898
+ /** Character Formatting. Sets character attributes on the selected text: font family and style, size, leading, tracking, colour and more. Params: {attrs: {fontFamily?, fontStyle?, size?, leading?: {kind:auto}|{kind:points,value}, tracking?, kerning?, hScale?, vScale?, baselineShift?, fill?, capitalization?, underline?, ...}}. Reads the selection, mode. Changes the document. */
1899
+ "type.char": {
1900
+ attrs?: {
1901
+ baselineShift?: Json;
1902
+ capitalization?: Json;
1903
+ fill?: Json;
1904
+ fontFamily?: Json;
1905
+ fontStyle?: Json;
1906
+ hScale?: Json;
1907
+ kerning?: Json;
1908
+ leading?: Json;
1909
+ size?: number;
1910
+ strikethroughColor?: string;
1911
+ stroke?: string;
1912
+ tracking?: Json;
1913
+ underline?: Json;
1914
+ underlineColor?: string;
1915
+ vScale?: Json;
1916
+ };
1917
+ fill?: string;
1918
+ strikethroughColor?: string;
1919
+ stroke?: string;
1920
+ underlineColor?: string;
1921
+ };
1922
+ /** Paragraph Formatting. Sets paragraph attributes on the selected paragraphs: alignment, indents, spacing, drop caps and more. Params: {attrs: {align?, leftIndent?, firstLineIndent?, spaceBefore?, spaceAfter?, dropCapLines?, hyphenate?, composer?, tabs?, ruleAbove?/ruleBelow?: {on?, weight?, color?, tint?, columnWidth?, offset?, leftIndent?, rightIndent?} (only the named rule fields change), ...}}. Reads the selection, mode. Changes the document. */
1923
+ "type.para": {
1924
+ attrs?: {
1925
+ align?: Json;
1926
+ borderColor?: string;
1927
+ composer?: Json;
1928
+ dropCapLines?: Json;
1929
+ firstLineIndent?: Json;
1930
+ grepStyles?: Array<{
1931
+ style?: string;
1932
+ }>;
1933
+ hyphenate?: Json;
1934
+ leftIndent?: Json;
1935
+ nestedLineStyles?: Array<{
1936
+ style?: string;
1937
+ }>;
1938
+ nestedStyles?: Array<{
1939
+ style?: string;
1940
+ }>;
1941
+ ruleAbove?: {
1942
+ color?: string;
1943
+ };
1944
+ ruleBelow?: {
1945
+ color?: string;
1946
+ };
1947
+ shadingColor?: string;
1948
+ spaceAfter?: Json;
1949
+ spaceBefore?: Json;
1950
+ tabs?: Json;
1951
+ };
1952
+ borderColor?: string;
1953
+ grepStyles?: Array<{
1954
+ style?: string;
1955
+ }>;
1956
+ nestedLineStyles?: Array<{
1957
+ style?: string;
1958
+ }>;
1959
+ nestedStyles?: Array<{
1960
+ style?: string;
1961
+ }>;
1962
+ ruleAbove?: {
1963
+ color?: string;
1964
+ };
1965
+ ruleBelow?: {
1966
+ color?: string;
1967
+ };
1968
+ shadingColor?: string;
1969
+ };
1970
+ /** Align. Sets the alignment of the selected paragraphs by name. Params: {align: left|center|right|leftJustified|...}. Reads the selection, mode. Changes the document. */
1971
+ "type.align": {
1972
+ align?: string; /** read by the command beside its listed parameters */
1973
+ edge?: string; /** read by the command beside its listed parameters */
1974
+ raw?: boolean; /** read by the command beside its listed parameters */
1975
+ text?: string; /** read by the command beside its listed parameters */
1976
+ to?: string;
1977
+ };
1978
+ /** Align Left. Aligns the selected paragraphs to the left. Params: {}. Reads the selection, mode. Changes the document. */
1979
+ "type.alignLeft": {
1980
+ edge?: string; /** read by the command beside its listed parameters */
1981
+ raw?: boolean; /** read by the command beside its listed parameters */
1982
+ text?: string; /** read by the command beside its listed parameters */
1983
+ to?: string;
1984
+ };
1985
+ /** Align Center. Centres the selected paragraphs. Params: {}. Reads the selection, mode. Changes the document. */
1986
+ "type.alignCenter": {
1987
+ edge?: string; /** read by the command beside its listed parameters */
1988
+ raw?: boolean; /** read by the command beside its listed parameters */
1989
+ text?: string; /** read by the command beside its listed parameters */
1990
+ to?: string;
1991
+ };
1992
+ /** Align Right. Aligns the selected paragraphs to the right. Params: {}. Reads the selection, mode. Changes the document. */
1993
+ "type.alignRight": {
1994
+ edge?: string; /** read by the command beside its listed parameters */
1995
+ raw?: boolean; /** read by the command beside its listed parameters */
1996
+ text?: string; /** read by the command beside its listed parameters */
1997
+ to?: string;
1998
+ };
1999
+ /** Justify Left. Justifies the selected paragraphs with the last line aligned left. Params: {}. Reads the selection, mode. Changes the document. */
2000
+ "type.justify": {
2001
+ edge?: string; /** read by the command beside its listed parameters */
2002
+ raw?: boolean; /** read by the command beside its listed parameters */
2003
+ text?: string; /** read by the command beside its listed parameters */
2004
+ to?: string;
2005
+ };
2006
+ /** Bold. Toggles bold on the selected text. Params: {}. Reads the selection, mode. Changes the document. */
2007
+ "type.bold": Record<string, never>;
2008
+ /** Italic. Toggles italic on the selected text. Params: {}. Reads the selection, mode. Changes the document. */
2009
+ "type.italic": Record<string, never>;
2010
+ /** Underline. Toggles underline on the selected text. Params: {}. Reads the selection, mode. Changes the document. */
2011
+ "type.underline": Record<string, never>;
2012
+ /** All Caps. Toggles all caps on the selected text. Params: {}. Reads the selection, mode. Changes the document. */
2013
+ "type.allCaps": Record<string, never>;
2014
+ /** Tate-Chu-Yoko. Sets the selected text horizontally within a vertical line (tate-chu-yoko), or not. Params: {on?: bool} ? set the selected text horizontally within one em of a vertical line (toggles by default). Reads the selection, mode. Changes the document. */
2015
+ "type.tateChuYoko": {
2016
+ on?: boolean;
2017
+ };
2018
+ /** Ruby. Sets the ruby reading over the selected text; empty text removes it. Params: {text} ? the reading set over the selected text (one group); empty removes it. Reads the selection, mode. Changes the document. */
2019
+ "type.ruby": {
2020
+ text?: string;
2021
+ };
2022
+ /** Kenten. Turns emphasis dots (kenten) on the selected characters on or off. Params: {on?: bool} ? emphasis dots over the selected characters (toggles by default). Reads the selection, mode. Changes the document. */
2023
+ "type.kenten": {
2024
+ on?: boolean;
2025
+ };
2026
+ /** Warichu. Turns warichu (inline split lines) on the selected text on or off, with lines, size, spacing and alignment. Params: {on?: bool, lines?: int, size?: number, lineSpacing?: number, align?: auto|left|center|right|justify, charsBeforeBreak?: int, charsAfterBreak?: int} ? set the selection as an inline note in smaller lines inside one line height (toggles by default). Reads the selection, mode. Changes the document. */
2027
+ "type.warichu": {
2028
+ align?: "auto" | "left" | "center" | "right" | "justify";
2029
+ charsAfterBreak?: number;
2030
+ charsBeforeBreak?: number; /** read by the command beside its listed parameters */
2031
+ edge?: string;
2032
+ lineSpacing?: number;
2033
+ lines?: number;
2034
+ on?: boolean; /** read by the command beside its listed parameters */
2035
+ raw?: boolean;
2036
+ size?: number; /** read by the command beside its listed parameters */
2037
+ text?: string; /** read by the command beside its listed parameters */
2038
+ to?: string;
2039
+ };
2040
+ /** Story Direction. Makes the stories of the text selection or selected frames vertical or horizontal. Params: {vertical: bool} ? the stories of the text selection or the selected frames: vertical lines run top to bottom and follow each other right to left, in every frame of the thread. Reads the selection, mode. Changes the document. */
2041
+ "type.storyDirection": {
2042
+ vertical?: boolean;
2043
+ };
2044
+ /** Increase Point Size. Increases the selected text's point size by one step. Params: {}. Reads the selection, mode. Changes the document. */
2045
+ "type.sizeUp": Record<string, never>;
2046
+ /** Decrease Point Size. Decreases the selected text's point size by one step. Params: {}. Reads the selection, mode. Changes the document. */
2047
+ "type.sizeDown": Record<string, never>;
2048
+ /** Change Case. Changes the selected text (or selected frames' stories) to upper, lower, title or sentence case. Params: {case: upper|lower|title|sentence} ? the selected text, or the stories of selected frames (formatting kept). Reads the selection, mode. Changes the document. */
2049
+ "type.changeCase": {
2050
+ case?: "upper" | "lower" | "title" | "sentence";
2051
+ };
2052
+ /** OpenType. Turns an OpenType feature (ligatures, fractions, ordinals, swashes, stylistic sets...) on or off for the selected text. Params: {feature?: dlig|frac|ordn|swsh|titl|calt|zero|ssNN|any tag, on?: bool (default: toggle), figures?: tabularLining|proportionalOldstyle|proportionalLining|tabularOldstyle|default, stylisticSets?: [1?20]} ? {features, figures}. Reads the selection, mode. Changes the document. */
2053
+ "type.openType": {
2054
+ feature?: string;
2055
+ figures?: "tabularLining" | "proportionalOldstyle" | "proportionalLining" | "tabularOldstyle" | "default"; /** default: toggle */
2056
+ on?: boolean; /** [1?20] */
2057
+ stylisticSets?: Array<Json>;
2058
+ };
2059
+ /** Break Link to Style. Keeps the selected text's look as local formatting and detaches it from its paragraph or character style. Params: {kind: paragraph|character} ? the selected text keeps its look as local formatting, with [No Paragraph Style] / [None]. Reads the selection, mode. Changes the document. */
2060
+ "style.breakLink": {
2061
+ kind?: "paragraph" | "character";
2062
+ };
2063
+ /** Selection Attributes. Answers the resolved character and paragraph attributes at the text selection. Params: {} ? resolved character/paragraph attributes at the text selection. Reads the selection. */
2064
+ "type.selectionAttrs": Record<string, never>;
2065
+ /** List Composite Fonts. Lists the composite font definitions. Params: {} ? composite font definitions. */
2066
+ "style.compositeFont.list": Record<string, never>;
2067
+ /** Set Composite Font. Creates or replaces a composite font: per character set, a family, style, relative size and scale. Params: {name, entries: [{name?, characters?, family, style?, relativeSize?, horizontalScale?, verticalScale?, baselineShift?, scaleOption?}]} ? replaces a composite font definition; empty characters selects the base entry. Reads the mode. Changes the document. */
2068
+ "style.compositeFont.set": {
2069
+ autoflow?: boolean; /** [{name?, characters?, family, style?, relativeSize?, horizontalScale?, verticalScale?, baselineShift?, scaleOption?}] */
2070
+ entries?: Array<{
2071
+ baselineShift?: Json;
2072
+ characters?: Json;
2073
+ family?: string;
2074
+ horizontalScale?: Json;
2075
+ name?: string;
2076
+ relativeSize?: Json;
2077
+ scaleOption?: Json;
2078
+ style?: string;
2079
+ verticalScale?: Json;
2080
+ }>; /** read by the command beside its listed parameters */
2081
+ keepLoaded?: boolean;
2082
+ name?: string; /** read by the command beside its listed parameters */
2083
+ story?: number;
2084
+ };
2085
+ /** Export Tagging. Sets the HTML or EPUB tag and class a style exports as. Params: {style, character?: bool, tag?: p|h1...h6|blockquote|pre|li|... (span|em|strong|code|sup|sub... for characters; "" = automatic), class?} ? the tagging. Reads the mode. Changes the document. */
2086
+ "style.exportTag": {
2087
+ character?: boolean;
2088
+ class?: string;
2089
+ style?: string;
2090
+ tag?: string;
2091
+ };
2092
+ /** Apply Paragraph Style. Applies a paragraph style to the selected paragraphs, clearing local overrides when asked. Params: {name, clearOverrides?: bool}. Reads the selection, mode. Changes the document. */
2093
+ "style.paragraph.apply": {
2094
+ clearOverrides?: boolean;
2095
+ name?: string;
2096
+ };
2097
+ /** Apply Character Style. Applies a character style to the selected text. Params: {name}. Reads the selection, mode. Changes the document. */
2098
+ "style.character.apply": {
2099
+ name?: string;
2100
+ };
2101
+ /** New Paragraph Style. Creates a paragraph style based on another, with paragraph and character attributes or from the selection. Params: {name, basedOn?, nextStyle?, para?: {...}, chars?: {...}, fromSelection?: bool}. Reads the selection, mode. Changes the document. */
2102
+ "style.paragraph.create": {
2103
+ basedOn?: string;
2104
+ chars?: {
2105
+ fill?: string;
2106
+ strikethroughColor?: string;
2107
+ stroke?: string;
2108
+ underlineColor?: string;
2109
+ };
2110
+ fromSelection?: boolean;
2111
+ name?: string; /** a style name */
2112
+ nextStyle?: string;
2113
+ para?: {
2114
+ borderColor?: string;
2115
+ grepStyles?: Array<{
2116
+ style?: string;
2117
+ }>;
2118
+ nestedLineStyles?: Array<{
2119
+ style?: string;
2120
+ }>;
2121
+ nestedStyles?: Array<{
2122
+ style?: string;
2123
+ }>;
2124
+ ruleAbove?: {
2125
+ color?: string;
2126
+ };
2127
+ ruleBelow?: {
2128
+ color?: string;
2129
+ };
2130
+ shadingColor?: string;
2131
+ };
2132
+ };
2133
+ /** Paragraph Style Options. Changes a paragraph style's name, base style, next style and attributes; text using it follows. Params: {name, rename?, basedOn?, nextStyle?, para?: {... ruleAbove?/ruleBelow?: only the named rule fields change}, chars?: {...}}. Reads the mode. Changes the document. */
2134
+ "style.paragraph.edit": {
2135
+ basedOn?: string;
2136
+ chars?: {
2137
+ fill?: string;
2138
+ strikethroughColor?: string;
2139
+ stroke?: string;
2140
+ underlineColor?: string;
2141
+ };
2142
+ name?: string; /** a style name */
2143
+ nextStyle?: string;
2144
+ para?: {
2145
+ borderColor?: string;
2146
+ grepStyles?: Array<{
2147
+ style?: string;
2148
+ }>;
2149
+ nestedLineStyles?: Array<{
2150
+ style?: string;
2151
+ }>;
2152
+ nestedStyles?: Array<{
2153
+ style?: string;
2154
+ }>;
2155
+ ruleAbove?: {
2156
+ color?: string;
2157
+ };
2158
+ ruleBelow?: {
2159
+ color?: string;
2160
+ };
2161
+ shadingColor?: string;
2162
+ };
2163
+ rename?: string;
2164
+ };
2165
+ /** Delete Paragraph Style. Deletes a paragraph style, replacing it in text with another. Params: {name, replaceWith?}. Reads the mode. Changes the document. */
2166
+ "style.paragraph.delete": {
2167
+ name?: string; /** a style name */
2168
+ replaceWith?: string;
2169
+ };
2170
+ /** Delete Character Style. Deletes a character style, replacing it in text with another (default [None]). Params: {name, replaceWith?: style (default "[None]")} ? text, styles based on it, and nested or GREP styles that used it take `replaceWith`. Reads the mode. Changes the document. */
2171
+ "style.character.delete": {
2172
+ name?: string; /** a style name */
2173
+ replaceWith?: string;
2174
+ };
2175
+ /** New Character Style. Creates a character style based on another, setting only the given attributes. Params: {name, basedOn?: style | "[None]", chars?: {...}} ? the style sets only `chars` ? {name} (made unique). Reads the mode. Changes the document. */
2176
+ "style.character.create": {
2177
+ basedOn?: string;
2178
+ chars?: {
2179
+ fill?: string;
2180
+ strikethroughColor?: string;
2181
+ stroke?: string;
2182
+ underlineColor?: string;
2183
+ };
2184
+ name?: string;
2185
+ };
2186
+ /** Character Style Options. Changes a character style's name, base style and attributes; null removes an attribute. Params: {name, rename?, basedOn?: style | "[None]" | null, chars?: {attr: value | null (no longer set)}} ? renaming updates every use. Reads the mode. Changes the document. */
2187
+ "style.character.edit": {
2188
+ basedOn?: string; /** {attr: value | null (no longer set)}; no longer set */
2189
+ chars?: {
2190
+ attr?: Json;
2191
+ fill?: string;
2192
+ strikethroughColor?: string;
2193
+ stroke?: string;
2194
+ underlineColor?: string;
2195
+ };
2196
+ name?: string;
2197
+ rename?: string;
2198
+ };
2199
+ /** List Styles. Lists the paragraph and character style names. Params: {} ? paragraph and character style names. */
2200
+ "style.list": Record<string, never>;
2201
+ /** Apply Object Style. Applies an object style to objects. Params: {name, ids?}. Acts on `ids`. Reads the selection, mode. Changes the document. */
2202
+ "style.object.apply": {
2203
+ ids?: Array<Json>;
2204
+ name?: string;
2205
+ };
2206
+ /** New Object Style. Creates an object style from the selection or with a fill and paragraph style. Params: {name, fromSelection?: true, fill?, paragraphStyle?}. Reads the selection, mode. Changes the document. */
2207
+ "style.object.create": {
2208
+ fill?: string;
2209
+ fromSelection?: boolean;
2210
+ name?: string;
2211
+ paragraphStyle?: string;
2212
+ };
2213
+ /** New Color Swatch. Creates a colour swatch from hex, CMYK (0 to 100) or RGB, process or spot. Params: {name?, color: "#rrggbb"|{c,m,y,k}(0..100)|[r,g,b], spot?: bool}. Reads the mode. Changes the document. */
2214
+ "swatch.create": {
2215
+ color?: string;
2216
+ name?: string;
2217
+ spot?: boolean;
2218
+ };
2219
+ /** Gradient. Applies a linear or radial gradient with colour stops to objects' fill or stroke. Params: {kind?: linear|radial, stops?: [{location: 0?100, color: "#rrggbb"|{c,m,y,k}|[r,g,b], opacity?: 0?100, midpoint?: 13?87}], reverse?: bool, angle?: degrees, from?: [x,y], to?: [x,y] (spread coords: the Gradient Swatch tool's drag), ids?} ? {swatch, kind, stops} ? edits the fill's gradient (an unnamed gradient unless it equals a gradient swatch). Acts on `ids`. Reads the selection, mode. Changes the document. */
2220
+ "object.gradient": {
2221
+ angle?: number;
2222
+ from?: Array<number>;
2223
+ ids?: Array<Json>;
2224
+ kind?: "linear" | "radial";
2225
+ reverse?: boolean; /** [{location: 0?100, color: "#rrggbb"|{c,m,y,k}|[r,g,b], opacity?: 0?100, midpoint?: 13?87}] */
2226
+ stops?: Array<{
2227
+ color?: Json;
2228
+ location?: Json;
2229
+ midpoint?: Json;
2230
+ opacity?: Json;
2231
+ }>; /** spread coords: the Gradient Swatch tool's drag */
2232
+ to?: Array<number>;
2233
+ };
2234
+ /** Move to Group. Moves paragraph or character styles into a style group. Params: {kind: paragraph|character, names: [style names], group: "Heads" | "Heads/Display" | "" (out of any group)} ? styles are named Group/Name; every use is renamed ? {renamed: {old: new}}. Reads the mode. Changes the document. */
2235
+ "style.group": {
2236
+ group?: "Heads" | "Heads/Display" | "";
2237
+ kind?: "paragraph" | "character"; /** [style names] */
2238
+ names?: Array<string>;
2239
+ };
2240
+ /** Load Swatches. Loads colour swatches from an .ase file, replacing the existing ones when asked. Params: {path?|base64?, replace?: bool} ? colour swatches from a swatch exchange (.ase) file; names already in the document are kept unless `replace` ? {added, replaced}. Reads the mode. Changes the document. */
2241
+ "swatch.load": {
2242
+ base64?: Json; /** one of several alternative parameters */
2243
+ path?: Json;
2244
+ replace?: boolean;
2245
+ };
2246
+ /** Save Swatches for Exchange. Saves colour swatches to an .ase file or as base64. Params: {path?, names?: [swatch names] (default: all colour swatches)} ? {base64} or writes `path` (.ase). Reads the mode. Changes the document. */
2247
+ "swatch.save": {
2248
+ names?: Array<string>;
2249
+ path?: Json; /** read by the command beside its listed parameters */
2250
+ story?: number;
2251
+ };
2252
+ /** Apply Color. Applies a colour (hex, CMYK or RGB) to objects' fill or stroke without making a swatch. Params: {color: "#rrggbb"|{c,m,y,k}(0..100)|[r,g,b](0..255), target?: fill|stroke, ids?} ? an unnamed colour (not in the Swatches panel until Add to Swatches) on the selection. Acts on `ids`. Reads the selection, mode. Changes the document. */
2253
+ "object.color": {
2254
+ color?: string;
2255
+ ids?: Array<Json>;
2256
+ target?: "fill" | "stroke";
2257
+ };
2258
+ /** Add to Swatches. Adds a colour (default: the selection's fill) to the swatches under a new name. Params: {swatch?: name (default: the selection's fill), target?: fill|stroke, name?: new name} ? makes an unnamed colour a swatch. Reads the selection, mode. Changes the document. */
2259
+ "swatch.addToSwatches": {
2260
+ name?: string; /** default: the selection's fill */
2261
+ swatch?: string;
2262
+ target?: "fill" | "stroke";
2263
+ };
2264
+ /** Add Unnamed Colors. Turns every unnamed colour in use into a swatch. Params: {} ? every unnamed colour used becomes a swatch. Reads the mode. Changes the document. */
2265
+ "swatch.addUnnamed": Record<string, never>;
2266
+ /** Delete Swatch. Deletes a swatch by name. Params: {name}. Reads the mode. Changes the document. */
2267
+ "swatch.delete": {
2268
+ name?: string;
2269
+ };
2270
+ /** Ink Manager. Answers the inks: whether each spot ink prints as process, and its alias. Params: {} ? {allToProcess, inks: [{name, process: bool (printed as process), alias?}]} ? the spot inks. */
2271
+ "ink.list": Record<string, never>;
2272
+ /** Ink Manager. Sets ink options: all to process, one ink to process, or an ink alias. Params: {allToProcess?: bool, ink?: spot swatch, toProcess?: bool, alias?: spot swatch | null} ? output: spots to process, ink aliases. Reads the mode. Changes the document. */
2273
+ "ink.options": {
2274
+ alias?: Json;
2275
+ allToProcess?: boolean;
2276
+ ink?: string; /** read by the command beside its listed parameters */
2277
+ story?: number;
2278
+ toProcess?: boolean;
2279
+ };
2280
+ /** New Color Group. Creates a colour group in the Swatches panel and moves swatches into it. Params: {name?, swatches?: [names]} ? a Swatches panel folder (the swatches move into it) ? {name}. Reads the mode. Changes the document. */
2281
+ "swatch.newColorGroup": {
2282
+ name?: string; /** [names] */
2283
+ swatches?: Array<Json>;
2284
+ };
2285
+ /** Move to Color Group. Moves swatches into a colour group, or to the top level with null. Params: {swatches: [names], group: name | null (top level)}. Reads the mode. Changes the document. */
2286
+ "swatch.moveToGroup": {
2287
+ group?: string; /** [names] */
2288
+ swatches?: Array<string>;
2289
+ };
2290
+ /** Ungroup Color Group. Removes a colour group, moving its swatches to the top level. Params: {name} ? its swatches go back to the top level. Reads the mode. Changes the document. */
2291
+ "swatch.ungroupColorGroup": {
2292
+ name?: string;
2293
+ };
2294
+ /** Color Group Options. Renames a colour group. Params: {name, to}. Reads the mode. Changes the document. */
2295
+ "swatch.renameColorGroup": {
2296
+ name?: string; /** a new name */
2297
+ to?: string;
2298
+ };
2299
+ /** New Cell Style. Creates a table cell style with fill, tint, insets and paragraph style, or from the target cell. Params: {name, fromSelection?: bool (the target cell's look), fill?, tint?, insets?: n|[t,l,b,r], vj?: top|center|bottom|justify, stroke?: {weight, color, tint?}, paragraphStyle?} ? {name}. Reads the selection, mode. Changes the document. */
2300
+ "style.cell.create": {
2301
+ basedOn?: string; /** read by the command beside its listed parameters */
2302
+ col?: number; /** inclusive zero-based index range */
2303
+ cols?: Array<number>;
2304
+ fill?: string; /** the target cell's look */
2305
+ fromSelection?: boolean;
2306
+ insets?: Json;
2307
+ name?: string;
2308
+ paragraphStyle?: string; /** read by the command beside its listed parameters */
2309
+ row?: number; /** inclusive zero-based index range */
2310
+ rows?: Array<number>; /** read by the command beside its listed parameters */
2311
+ story?: number; /** {weight, color, tint?} */
2312
+ stroke?: {
2313
+ color?: string;
2314
+ tint?: Json;
2315
+ weight?: number;
2316
+ }; /** read by the command beside its listed parameters */
2317
+ table?: number; /** percent from 0 to 100 */
2318
+ tint?: number;
2319
+ vj?: "top" | "center" | "bottom" | "justify";
2320
+ };
2321
+ /** Apply Cell Style. Applies a cell style to the target cells, or the whole table. Params: {name, story?, table?} ? the target cells (the whole table when the cursor is in it). Reads the selection, mode. Changes the document. */
2322
+ "style.cell.apply": {
2323
+ col?: number; /** inclusive zero-based index range */
2324
+ cols?: Array<number>;
2325
+ name?: string; /** read by the command beside its listed parameters */
2326
+ row?: number; /** inclusive zero-based index range */
2327
+ rows?: Array<number>; /** a story id from document.inspect */
2328
+ story?: number;
2329
+ table?: number;
2330
+ };
2331
+ /** Cell Style Options. Changes a cell style; cells using it follow. Params: {name, ...same as style.cell.create} ? cells using the style follow. Reads the mode. Changes the document. */
2332
+ "style.cell.edit": {
2333
+ basedOn?: string;
2334
+ fill?: string;
2335
+ insets?: Json;
2336
+ name?: string;
2337
+ paragraphStyle?: string;
2338
+ stroke?: {
2339
+ color?: string;
2340
+ }; /** read by the command beside its listed parameters */
2341
+ tint?: number; /** read by the command beside its listed parameters */
2342
+ vj?: string;
2343
+ };
2344
+ /** New Table Style. Creates a table style with cell styles for header, body, footer and columns, and borders. Params: {name, header?, body?, footer?, leftColumn?, rightColumn?: cell style names, border?: {weight, color}, altRows?: {first, firstColor, next, nextColor}, spaceBefore?, spaceAfter?} ? {name}. Reads the mode. Changes the document. */
2345
+ "style.table.create": {
2346
+ altRows?: {
2347
+ first?: Json;
2348
+ firstColor?: Json;
2349
+ next?: Json;
2350
+ nextColor?: Json;
2351
+ }; /** read by the command beside its listed parameters */
2352
+ basedOn?: string;
2353
+ body?: string;
2354
+ border?: {
2355
+ color?: string;
2356
+ weight?: number;
2357
+ }; /** a cell style name */
2358
+ footer?: string; /** a cell style name */
2359
+ header?: string; /** a cell style name */
2360
+ leftColumn?: string;
2361
+ name?: string; /** a cell style name */
2362
+ rightColumn?: string;
2363
+ spaceAfter?: number;
2364
+ spaceBefore?: number;
2365
+ };
2366
+ /** Apply Table Style. Applies a table style to a table. Params: {name, story?, table?}. Reads the selection, mode. Changes the document. */
2367
+ "style.table.apply": {
2368
+ col?: number; /** inclusive zero-based index range */
2369
+ cols?: Array<number>;
2370
+ name?: string; /** read by the command beside its listed parameters */
2371
+ row?: number; /** inclusive zero-based index range */
2372
+ rows?: Array<number>; /** a story id from document.inspect */
2373
+ story?: number;
2374
+ table?: number;
2375
+ };
2376
+ /** Table Style Options. Changes a table style; tables using it follow. Params: {name, ...same as style.table.create} ? tables using the style follow. Reads the mode. Changes the document. */
2377
+ "style.table.edit": {
2378
+ altRows?: {
2379
+ firstColor?: string;
2380
+ nextColor?: string;
2381
+ };
2382
+ basedOn?: string;
2383
+ body?: string;
2384
+ border?: {
2385
+ color?: string;
2386
+ };
2387
+ footer?: string;
2388
+ header?: string;
2389
+ leftColumn?: string;
2390
+ name?: string;
2391
+ rightColumn?: string; /** read by the command beside its listed parameters */
2392
+ spaceAfter?: number; /** read by the command beside its listed parameters */
2393
+ spaceBefore?: number;
2394
+ };
2395
+ /** Create Table. Creates a table at the text insertion point with body rows, columns, header and footer rows and width. Params: {rows?: body rows (4), cols? (4), headerRows? (0), footerRows? (0), width?} ? at the text insertion point. Reads the selection, mode. Changes the document. */
2396
+ "table.insert": {
2397
+ cols?: number; /** read by the command beside its listed parameters */
2398
+ columns?: number;
2399
+ footerRows?: number;
2400
+ headerRows?: number;
2401
+ rows?: number;
2402
+ width?: number;
2403
+ };
2404
+ /** Convert Text to Table. Converts the selected paragraphs into a table, splitting columns at tabs or commas. Params: {columnSeparator?: tab|comma} ? selected paragraphs become rows. Reads the selection, mode. Changes the document. */
2405
+ "table.convertFromText": {
2406
+ columnSeparator?: "tab" | "comma"; /** read by the command beside its listed parameters */
2407
+ width?: number;
2408
+ };
2409
+ /** Convert Table to Text. Converts the table at the caret into tab-separated paragraphs. Params: {} ? cells separated by tabs, rows by paragraphs. Reads the selection, mode. Changes the document. */
2410
+ "table.convertToText": {
2411
+ col?: number; /** inclusive zero-based index range */
2412
+ cols?: Array<number>; /** read by the command beside its listed parameters */
2413
+ row?: number; /** inclusive zero-based index range */
2414
+ rows?: Array<number>; /** read by the command beside its listed parameters */
2415
+ story?: number; /** read by the command beside its listed parameters */
2416
+ table?: number;
2417
+ };
2418
+ /** Insert Row. Inserts rows above or below the target cell's row. Params: {where?: above|below, count? (1)}. Reads the selection, mode. Changes the document. */
2419
+ "table.insertRow": {
2420
+ col?: number; /** inclusive zero-based index range */
2421
+ cols?: Array<number>; /** 1 */
2422
+ count?: number; /** read by the command beside its listed parameters */
2423
+ row?: number; /** inclusive zero-based index range */
2424
+ rows?: Array<number>; /** read by the command beside its listed parameters */
2425
+ story?: number; /** read by the command beside its listed parameters */
2426
+ table?: number;
2427
+ where?: "above" | "below";
2428
+ };
2429
+ /** Insert Row Above. Inserts rows above the target cell's row. Params: {count?}. Reads the selection, mode. Changes the document. */
2430
+ "table.insertRowAbove": {
2431
+ col?: number; /** inclusive zero-based index range */
2432
+ cols?: Array<number>;
2433
+ count?: number; /** read by the command beside its listed parameters */
2434
+ row?: number; /** inclusive zero-based index range */
2435
+ rows?: Array<number>; /** read by the command beside its listed parameters */
2436
+ story?: number; /** read by the command beside its listed parameters */
2437
+ table?: number;
2438
+ };
2439
+ /** Insert Row Below. Inserts rows below the target cell's row. Params: {count?}. Reads the selection, mode. Changes the document. */
2440
+ "table.insertRowBelow": {
2441
+ col?: number; /** inclusive zero-based index range */
2442
+ cols?: Array<number>;
2443
+ count?: number; /** read by the command beside its listed parameters */
2444
+ row?: number; /** inclusive zero-based index range */
2445
+ rows?: Array<number>; /** read by the command beside its listed parameters */
2446
+ story?: number; /** read by the command beside its listed parameters */
2447
+ table?: number;
2448
+ };
2449
+ /** Insert Column. Inserts columns left or right of the target cell's column, with a width. Params: {where?: left|right, count? (1), width?}. Reads the selection, mode. Changes the document. */
2450
+ "table.insertColumn": {
2451
+ col?: number; /** inclusive zero-based index range */
2452
+ cols?: Array<number>; /** 1 */
2453
+ count?: number; /** read by the command beside its listed parameters */
2454
+ row?: number; /** inclusive zero-based index range */
2455
+ rows?: Array<number>; /** read by the command beside its listed parameters */
2456
+ story?: number; /** read by the command beside its listed parameters */
2457
+ table?: number;
2458
+ where?: "left" | "right";
2459
+ width?: number;
2460
+ };
2461
+ /** Insert Column Left. Inserts columns to the left of the target cell's column. Params: {count?}. Reads the selection, mode. Changes the document. */
2462
+ "table.insertColumnLeft": {
2463
+ col?: number; /** inclusive zero-based index range */
2464
+ cols?: Array<number>;
2465
+ count?: number; /** read by the command beside its listed parameters */
2466
+ row?: number; /** inclusive zero-based index range */
2467
+ rows?: Array<number>; /** read by the command beside its listed parameters */
2468
+ story?: number; /** read by the command beside its listed parameters */
2469
+ table?: number;
2470
+ };
2471
+ /** Insert Column Right. Inserts columns to the right of the target cell's column. Params: {count?}. Reads the selection, mode. Changes the document. */
2472
+ "table.insertColumnRight": {
2473
+ col?: number; /** inclusive zero-based index range */
2474
+ cols?: Array<number>;
2475
+ count?: number; /** read by the command beside its listed parameters */
2476
+ row?: number; /** inclusive zero-based index range */
2477
+ rows?: Array<number>; /** read by the command beside its listed parameters */
2478
+ story?: number; /** read by the command beside its listed parameters */
2479
+ table?: number;
2480
+ };
2481
+ /** Delete Row. Deletes the rows of the target cells. Params: {} ? the rows of the target cells. Reads the selection, mode. Changes the document. */
2482
+ "table.deleteRow": {
2483
+ col?: number; /** inclusive zero-based index range */
2484
+ cols?: Array<number>; /** read by the command beside its listed parameters */
2485
+ row?: number; /** inclusive zero-based index range */
2486
+ rows?: Array<number>; /** read by the command beside its listed parameters */
2487
+ story?: number; /** read by the command beside its listed parameters */
2488
+ table?: number;
2489
+ };
2490
+ /** Delete Column. Deletes the columns of the target cells. Params: {} ? the columns of the target cells. Reads the selection, mode. Changes the document. */
2491
+ "table.deleteColumn": {
2492
+ col?: number; /** inclusive zero-based index range */
2493
+ cols?: Array<number>; /** read by the command beside its listed parameters */
2494
+ row?: number; /** inclusive zero-based index range */
2495
+ rows?: Array<number>; /** read by the command beside its listed parameters */
2496
+ story?: number; /** read by the command beside its listed parameters */
2497
+ table?: number;
2498
+ };
2499
+ /** Delete Table. Deletes the table at the caret. Params: {}. Reads the selection, mode. Changes the document. */
2500
+ "table.delete": {
2501
+ col?: number; /** inclusive zero-based index range */
2502
+ cols?: Array<number>; /** read by the command beside its listed parameters */
2503
+ row?: number; /** inclusive zero-based index range */
2504
+ rows?: Array<number>; /** read by the command beside its listed parameters */
2505
+ story?: number; /** read by the command beside its listed parameters */
2506
+ table?: number;
2507
+ };
2508
+ /** Merge Cells. Merges the target cell range into one cell. Params: {} ? merge the target cell range. Reads the selection, mode. Changes the document. */
2509
+ "table.merge": {
2510
+ col?: number; /** inclusive zero-based index range */
2511
+ cols?: Array<number>; /** read by the command beside its listed parameters */
2512
+ row?: number; /** inclusive zero-based index range */
2513
+ rows?: Array<number>; /** read by the command beside its listed parameters */
2514
+ story?: number; /** read by the command beside its listed parameters */
2515
+ table?: number;
2516
+ };
2517
+ /** Drag Rows or Columns. Moves selected whole rows or columns by dragging them from one point to another. Params: {frame, from: [x, y], to: [x, y]} ? selected whole rows (or columns) dragged from `from` move to the row (column) at `to`; otherwise a text drag. Reads the selection, mode. Changes the document. */
2518
+ "table.dropCells": {
2519
+ frame?: number;
2520
+ from?: Array<number>;
2521
+ to?: Array<number>;
2522
+ };
2523
+ /** Convert Cell to Graphic Cell. Turns the target cell into a graphic cell holding an image, fitted proportionally or to fill. Params: {path | base64+name, fit?: proportional|fill (default proportional)} ? an image in the target cell (its text is kept but hidden). Reads the selection, mode. Changes the document. */
2524
+ "table.placeGraphic": {
2525
+ base64?: string; /** read by the command beside its listed parameters */
2526
+ col?: number; /** inclusive zero-based index range */
2527
+ cols?: Array<number>; /** default proportional */
2528
+ fit?: "proportional" | "fill"; /** read by the command beside its listed parameters */
2529
+ name?: string;
2530
+ path?: Json; /** read by the command beside its listed parameters */
2531
+ row?: number; /** inclusive zero-based index range */
2532
+ rows?: Array<number>; /** read by the command beside its listed parameters */
2533
+ story?: number; /** read by the command beside its listed parameters */
2534
+ table?: number;
2535
+ };
2536
+ /** Convert Cell to Text Cell. Turns graphic cells back into text cells. Params: {} ? drop the target cells' graphics. Reads the selection, mode. Changes the document. */
2537
+ "table.textCell": {
2538
+ col?: number; /** inclusive zero-based index range */
2539
+ cols?: Array<number>; /** read by the command beside its listed parameters */
2540
+ row?: number; /** inclusive zero-based index range */
2541
+ rows?: Array<number>; /** read by the command beside its listed parameters */
2542
+ story?: number; /** read by the command beside its listed parameters */
2543
+ table?: number;
2544
+ };
2545
+ /** Move Row. Moves a row (0-based; default the target row) to another position. Params: {from?, to} (0-based; from defaults to the target row) ? like dragging a row. Reads the selection, mode. Changes the document. */
2546
+ "table.moveRow": {
2547
+ col?: number; /** inclusive zero-based index range */
2548
+ cols?: Array<number>; /** a row counted from 0 */
2549
+ from?: number; /** read by the command beside its listed parameters */
2550
+ row?: number; /** inclusive zero-based index range */
2551
+ rows?: Array<number>; /** read by the command beside its listed parameters */
2552
+ story?: number; /** read by the command beside its listed parameters */
2553
+ table?: number; /** a row counted from 0 */
2554
+ to?: number;
2555
+ };
2556
+ /** Move Column. Moves a column (0-based; default the target column) to another position. Params: {from?, to} (0-based; from defaults to the target column). Reads the selection, mode. Changes the document. */
2557
+ "table.moveColumn": {
2558
+ col?: number; /** inclusive zero-based index range */
2559
+ cols?: Array<number>; /** a column counted from 0 */
2560
+ from?: number; /** read by the command beside its listed parameters */
2561
+ row?: number; /** inclusive zero-based index range */
2562
+ rows?: Array<number>; /** read by the command beside its listed parameters */
2563
+ story?: number; /** read by the command beside its listed parameters */
2564
+ table?: number; /** a column counted from 0 */
2565
+ to?: number;
2566
+ };
2567
+ /** Sort. Sorts the body rows by a column (0-based; default the target cell's), ascending or descending. Params: {column?: 0-based (default: the target cell's), descending?: bool} ? body rows by that column's text (numbers numerically). Reads the selection, mode. Changes the document. */
2568
+ "table.sortRows": {
2569
+ col?: number; /** inclusive zero-based index range */
2570
+ cols?: Array<number>;
2571
+ column?: number;
2572
+ descending?: boolean; /** read by the command beside its listed parameters */
2573
+ row?: number; /** inclusive zero-based index range */
2574
+ rows?: Array<number>; /** read by the command beside its listed parameters */
2575
+ story?: number; /** read by the command beside its listed parameters */
2576
+ table?: number;
2577
+ };
2578
+ /** Unmerge Cells. Unmerges the target merged cell. Params: {}. Reads the selection, mode. Changes the document. */
2579
+ "table.unmerge": {
2580
+ col?: number; /** inclusive zero-based index range */
2581
+ cols?: Array<number>; /** read by the command beside its listed parameters */
2582
+ row?: number; /** inclusive zero-based index range */
2583
+ rows?: Array<number>; /** read by the command beside its listed parameters */
2584
+ story?: number; /** read by the command beside its listed parameters */
2585
+ table?: number;
2586
+ };
2587
+ /** Split Cell Horizontally. Splits the target cell into two, one above the other. Params: {} ? the target cell becomes two, one above the other. Reads the selection, mode. Changes the document. */
2588
+ "table.splitHorizontally": {
2589
+ col?: number; /** inclusive zero-based index range */
2590
+ cols?: Array<number>; /** read by the command beside its listed parameters */
2591
+ row?: number; /** inclusive zero-based index range */
2592
+ rows?: Array<number>; /** read by the command beside its listed parameters */
2593
+ story?: number; /** read by the command beside its listed parameters */
2594
+ table?: number;
2595
+ };
2596
+ /** Split Cell Vertically. Splits the target cell into two, side by side. Params: {} ? the target cell becomes two, side by side. Reads the selection, mode. Changes the document. */
2597
+ "table.splitVertically": {
2598
+ col?: number; /** inclusive zero-based index range */
2599
+ cols?: Array<number>; /** read by the command beside its listed parameters */
2600
+ row?: number; /** inclusive zero-based index range */
2601
+ rows?: Array<number>; /** read by the command beside its listed parameters */
2602
+ story?: number; /** read by the command beside its listed parameters */
2603
+ table?: number;
2604
+ };
2605
+ /** Cell Options. Sets the target cells' fill, tint, insets, vertical justification and text. Params: {fill?: swatch, tint?, insets?: n | [t,l,b,r], vj?: top|center|bottom|justify, text?, stroke?: {weight?, color?, tint?, type?: solid|dashed|dotted, edges?: all|outer|inner|top|left|bottom|right}}. Reads the selection, mode. Changes the document. */
2606
+ "table.setCell": {
2607
+ col?: number; /** inclusive zero-based index range */
2608
+ cols?: Array<number>;
2609
+ fill?: string;
2610
+ insets?: Json; /** read by the command beside its listed parameters */
2611
+ row?: number; /** inclusive zero-based index range */
2612
+ rows?: Array<number>; /** read by the command beside its listed parameters */
2613
+ story?: number; /** {weight?, color?, tint?, type?: solid|dashed|dotted, edges?: all|outer|inner|top|left|bottom|right} */
2614
+ stroke?: {
2615
+ color?: string;
2616
+ edges?: "all" | "outer" | "inner" | "top" | "left" | "bottom" | "right";
2617
+ tint?: Json;
2618
+ type?: "solid" | "dashed" | "dotted";
2619
+ weight?: number;
2620
+ }; /** read by the command beside its listed parameters */
2621
+ table?: number;
2622
+ text?: string; /** percent from 0 to 100 */
2623
+ tint?: number;
2624
+ vj?: "top" | "center" | "bottom" | "justify";
2625
+ };
2626
+ /** Row Height. Sets the target rows' height in points, at least or exactly. Params: {height, mode?: atLeast|exactly}. Reads the selection, mode. Changes the document. */
2627
+ "table.setRowHeight": {
2628
+ col?: number; /** inclusive zero-based index range */
2629
+ cols?: Array<number>;
2630
+ height?: number;
2631
+ mode?: "atLeast" | "exactly"; /** read by the command beside its listed parameters */
2632
+ row?: number; /** inclusive zero-based index range */
2633
+ rows?: Array<number>; /** read by the command beside its listed parameters */
2634
+ story?: number; /** read by the command beside its listed parameters */
2635
+ table?: number;
2636
+ };
2637
+ /** Column Width. Sets the target columns' width in points. Params: {width}. Reads the selection, mode. Changes the document. */
2638
+ "table.setColumnWidth": {
2639
+ col?: number; /** inclusive zero-based index range */
2640
+ cols?: Array<number>; /** read by the command beside its listed parameters */
2641
+ row?: number; /** inclusive zero-based index range */
2642
+ rows?: Array<number>; /** read by the command beside its listed parameters */
2643
+ story?: number; /** read by the command beside its listed parameters */
2644
+ table?: number;
2645
+ width?: number;
2646
+ };
2647
+ /** Distribute Columns Evenly. Gives the selected columns equal widths. Params: {}. Reads the selection, mode. Changes the document. */
2648
+ "table.distributeColumns": {
2649
+ col?: number; /** inclusive zero-based index range */
2650
+ cols?: Array<number>; /** read by the command beside its listed parameters */
2651
+ row?: number; /** inclusive zero-based index range */
2652
+ rows?: Array<number>; /** read by the command beside its listed parameters */
2653
+ story?: number; /** read by the command beside its listed parameters */
2654
+ table?: number;
2655
+ };
2656
+ /** Distribute Rows Evenly. Gives rows equal fixed heights. Params: {story?, table?, rows?: [a,b]} ? equal fixed heights preserving the selected rows' composed total height; may overset cell text; unmerge row-spanning cells first. Reads the selection, mode. Changes the document. */
2657
+ "table.distributeRows": {
2658
+ col?: number; /** inclusive zero-based index range */
2659
+ cols?: Array<number>; /** read by the command beside its listed parameters */
2660
+ row?: number; /** inclusive zero-based index range */
2661
+ rows?: Array<number>; /** a story id from document.inspect */
2662
+ story?: number;
2663
+ table?: number;
2664
+ };
2665
+ /** Table Options. Sets table options: direction, border, spacing before and after, header and footer rows and repeats, alternating fills. Params: {direction?: leftToRight|rightToLeft, border?: {weight?, color?, tint?, type?}, spaceBefore?, spaceAfter?, headerRows?, footerRows?, repeatHeader?, repeatFooter?, altRows?: {first, firstColor, firstTint, next, nextColor, nextTint, skipFirst, skipLast} | null, altCols?: ... | null}. Reads the selection, mode. Changes the document. */
2666
+ "table.options": {
2667
+ altCols?: {
2668
+ firstColor?: string;
2669
+ nextColor?: string;
2670
+ };
2671
+ altRows?: {
2672
+ firstColor?: string;
2673
+ nextColor?: string;
2674
+ }; /** {weight?, color?, tint?, type?} */
2675
+ border?: {
2676
+ color?: string;
2677
+ tint?: Json;
2678
+ type?: Json;
2679
+ weight?: number;
2680
+ }; /** read by the command beside its listed parameters */
2681
+ col?: number; /** inclusive zero-based index range */
2682
+ cols?: Array<number>;
2683
+ direction?: "leftToRight" | "rightToLeft";
2684
+ footerRows?: number;
2685
+ headerRows?: number;
2686
+ repeatFooter?: boolean;
2687
+ repeatHeader?: boolean; /** read by the command beside its listed parameters */
2688
+ row?: number; /** inclusive zero-based index range */
2689
+ rows?: Array<number>;
2690
+ spaceAfter?: number;
2691
+ spaceBefore?: number; /** read by the command beside its listed parameters */
2692
+ story?: number; /** read by the command beside its listed parameters */
2693
+ table?: number;
2694
+ };
2695
+ /** Select Cells. Selects cells, rows, columns or a whole table by story, table and row and column ranges. Params: {story?, table?, rows?: [a,b], cols?: [a,b], what?: cell|row|column|table}. Reads the selection, mode. Changes the document. */
2696
+ "table.select": {
2697
+ col?: number; /** inclusive zero-based index range */
2698
+ cols?: Array<number>; /** read by the command beside its listed parameters */
2699
+ row?: number; /** inclusive zero-based index range */
2700
+ rows?: Array<number>; /** a story id from document.inspect */
2701
+ story?: number;
2702
+ table?: number;
2703
+ what?: "cell" | "row" | "column" | "table";
2704
+ };
2705
+ /** Select Table. Selects the whole table at the caret. Params: {}. Reads the selection, mode. Changes the document. */
2706
+ "table.selectTable": {
2707
+ col?: number; /** inclusive zero-based index range */
2708
+ cols?: Array<number>; /** read by the command beside its listed parameters */
2709
+ row?: number; /** inclusive zero-based index range */
2710
+ rows?: Array<number>; /** read by the command beside its listed parameters */
2711
+ story?: number; /** read by the command beside its listed parameters */
2712
+ table?: number;
2713
+ };
2714
+ /** Select Row. Selects the row at the caret. Params: {}. Reads the selection, mode. Changes the document. */
2715
+ "table.selectRow": {
2716
+ col?: number; /** inclusive zero-based index range */
2717
+ cols?: Array<number>; /** read by the command beside its listed parameters */
2718
+ row?: number; /** inclusive zero-based index range */
2719
+ rows?: Array<number>; /** read by the command beside its listed parameters */
2720
+ story?: number; /** read by the command beside its listed parameters */
2721
+ table?: number;
2722
+ };
2723
+ /** Select Column. Selects the column at the caret. Params: {}. Reads the selection, mode. Changes the document. */
2724
+ "table.selectColumn": {
2725
+ col?: number; /** inclusive zero-based index range */
2726
+ cols?: Array<number>; /** read by the command beside its listed parameters */
2727
+ row?: number; /** inclusive zero-based index range */
2728
+ rows?: Array<number>; /** read by the command beside its listed parameters */
2729
+ story?: number; /** read by the command beside its listed parameters */
2730
+ table?: number;
2731
+ };
2732
+ /** Next Cell. Moves to the next table cell. Params: {}. Reads the selection, mode. Changes the document. */
2733
+ "table.nextCell": {
2734
+ col?: number; /** inclusive zero-based index range */
2735
+ cols?: Array<number>; /** read by the command beside its listed parameters */
2736
+ row?: number; /** inclusive zero-based index range */
2737
+ rows?: Array<number>; /** read by the command beside its listed parameters */
2738
+ story?: number; /** read by the command beside its listed parameters */
2739
+ table?: number;
2740
+ };
2741
+ /** Previous Cell. Moves to the previous table cell. Params: {}. Reads the selection, mode. Changes the document. */
2742
+ "table.prevCell": {
2743
+ col?: number; /** inclusive zero-based index range */
2744
+ cols?: Array<number>; /** read by the command beside its listed parameters */
2745
+ row?: number; /** inclusive zero-based index range */
2746
+ rows?: Array<number>; /** read by the command beside its listed parameters */
2747
+ story?: number; /** read by the command beside its listed parameters */
2748
+ table?: number;
2749
+ };
2750
+ /** Get Table. Answers a table's rows, columns and cells (text, spans, fill) and options. Params: {story?, table?} ? rows, columns, cells (text, spans, fill), options. Reads the selection. */
2751
+ "table.get": {
2752
+ col?: number; /** inclusive zero-based index range */
2753
+ cols?: Array<number>; /** read by the command beside its listed parameters */
2754
+ row?: number; /** inclusive zero-based index range */
2755
+ rows?: Array<number>; /** a story id from document.inspect */
2756
+ story?: number;
2757
+ table?: number;
2758
+ };
2759
+ /** Insert Pages. Inserts pages after a page (default: the last) with a parent. Params: {count?: 1, after?: page index (default: last), parent?: "A"|null}. Reads the mode. Changes the document. */
2760
+ "layout.pages.insert": {
2761
+ after?: number;
2762
+ count?: number; /** parent prefix or full prefix-name label; null clears */
2763
+ parent?: Json;
2764
+ };
2765
+ /** Rotate Spread. Rotates the view of one spread by 90, -90 or 180 degrees, or clears it; output is unchanged. Params: {spread?: index (0), angle: 90 (clockwise) | -90 | 180 | 0 (clear)} ? turn one spread on screen (output is unaffected). Reads the mode. Changes the document. */
2766
+ "layout.rotateSpreadView": {
2767
+ angle?: 90 | -90 | 180 | 0; /** a position counted from 0 (the first is 0); 0 */
2768
+ spread?: number;
2769
+ };
2770
+ /** Delete Pages. Deletes pages by index. Params: {pages: [index]}. Reads the selection, mode. Changes the document. */
2771
+ "layout.pages.delete": {
2772
+ pages?: Array<number>;
2773
+ };
2774
+ /** Move Pages. Moves a page from one index to another. Params: {from, to}. Reads the mode. Changes the document. */
2775
+ "layout.pages.move": {
2776
+ from?: number; /** a page counted from 0 */
2777
+ to?: number;
2778
+ };
2779
+ /** Duplicate Spread. Duplicates a spread with its items. Params: {spread}. Reads the mode. Changes the document. */
2780
+ "layout.pages.duplicateSpread": {
2781
+ spread?: Json; /** read by the command beside its listed parameters */
2782
+ to?: string;
2783
+ };
2784
+ /** Apply Parent to Pages. Applies a parent spread to pages, or none. Params: {pages: [number] (from 1, as layout.section and frame.thread count), parent: "A"|null}. Reads the mode. Changes the document. */
2785
+ "layout.pages.applyParent": {
2786
+ pages?: Array<number>; /** parent prefix or full prefix-name label; null clears */
2787
+ parent?: Json;
2788
+ };
2789
+ /** New Parent. Creates a parent spread with a prefix and name. Params: {prefix?, name?: "Parent"}. Reads the mode. Changes the document. */
2790
+ "layout.parents.new": {
2791
+ name?: string;
2792
+ prefix?: string;
2793
+ };
2794
+ /** Edit Parents. Shows or hides parent spreads on the canvas for editing. Params: {on: bool} ? show parent spreads on the canvas. Reads the mode. Changes the document. */
2795
+ "layout.parents.edit": {
2796
+ on?: boolean;
2797
+ };
2798
+ /** Margins and Columns. Sets pages' margins and columns. Params: {pages?: [index] (default all), margins?: number|{top,bottom,inside,outside}, columns?, gutter?, adjustLayout?: bool (objects follow the margins)}. Reads the mode. Changes the document. */
2799
+ "layout.marginsAndColumns": {
2800
+ adjustLayout?: boolean;
2801
+ columns?: number; /** points */
2802
+ gutter?: number;
2803
+ margins?: Json; /** default all */
2804
+ pages?: Array<number>; /** read by the command beside its listed parameters */
2805
+ story?: number;
2806
+ };
2807
+ /** Document Setup. Sets the document's page size, page count, start page, facing pages, binding, bleed and slug. Params: {width?, height?, pages?: count, startPage?: n, facingPages?, binding?: leftToRight|rightToLeft, intent?: print|web|mobile, bleed?, slug?: n | [top, bottom, inside, outside], adjustLayout?: bool (objects follow the new page size)} ? the document setup. Reads the mode. Changes the document. */
2808
+ "layout.documentSetup": {
2809
+ adjustLayout?: boolean;
2810
+ binding?: "leftToRight" | "rightToLeft"; /** points */
2811
+ bleed?: number;
2812
+ facingPages?: boolean;
2813
+ height?: number;
2814
+ intent?: "print" | "web" | "mobile";
2815
+ pages?: number;
2816
+ slug?: Json;
2817
+ startPage?: number;
2818
+ width?: number;
2819
+ };
2820
+ /** Add Page to Spread. Adds a page (1-based) to a spread (0-based). Params: {page (1-based), spread (0-based)} ? the page joins that spread (up to 10 pages; the spread stops shuffling). Reads the mode. Changes the document. */
2821
+ "layout.pages.toSpread": {
2822
+ page?: number;
2823
+ spread?: Json;
2824
+ };
2825
+ /** Allow Selected Spread to Shuffle. Allows or stops a spread's pages shuffling apart when pages are added or removed. Params: {spread (0-based), allow: bool} ? off keeps the spread's pages together when pages are added or removed. Reads the mode. Changes the document. */
2826
+ "layout.spreadShuffle": {
2827
+ allow?: boolean;
2828
+ spread?: Json;
2829
+ };
2830
+ /** Page Size. Sets the size of chosen pages (1-based) from a preset or width and height. Params: {pages: [1-based page numbers], width?, height?, preset?: "A4"|"Letter"|...} ? pages of their own size (Page tool); objects on the pages keep their place on them. Reads the mode. Changes the document. */
2831
+ "layout.pageSize": {
2832
+ height?: number; /** [1-based page numbers] */
2833
+ pages?: Array<Json>; /** "A4"|"Letter"|... */
2834
+ preset?: string;
2835
+ width?: number;
2836
+ };
2837
+ /** Numbering & Section Options. Starts a section at a page (1-based) with a start number, numbering style and marker. Params: {page (1-based; starts a section there), startNumber?: n|null (continue), style?: arabic|upperRoman|lowerRoman|upperLetters|lowerLetters, prefix?, includePrefix?, marker?, remove?: bool}. Reads the mode. Changes the document. */
2838
+ "layout.section": {
2839
+ includePrefix?: boolean;
2840
+ marker?: string; /** 1-based; starts a section there */
2841
+ page?: number;
2842
+ prefix?: string;
2843
+ remove?: boolean;
2844
+ startNumber?: Json;
2845
+ style?: "arabic" | "upperRoman" | "lowerRoman" | "upperLetters" | "lowerLetters";
2846
+ };
2847
+ /** Move Layer. Moves a layer to a position (0 is the top). Params: {id, to: index (0 = top/frontmost)}. Acts on `id`. Reads the mode. Changes the document. */
2848
+ "layer.move": {
2849
+ id?: Json; /** a position counted from 0 (the first is 0); 0 = top/frontmost */
2850
+ to?: number;
2851
+ };
2852
+ /** Select All on Layer. Selects every object on a layer. Params: {id}. Acts on `id`. Reads the mode. Changes the document. */
2853
+ "layer.selectItems": {
2854
+ id?: Json;
2855
+ };
2856
+ /** New Layer. Creates a layer; answers its id. Params: {name?}. Reads the mode. Changes the document. */
2857
+ "layer.new": {
2858
+ name?: string;
2859
+ };
2860
+ /** Layer Options. Sets a layer's name, visibility, lock, printing and colour. Params: {id, name?, visible?, locked?, printable?, color?: [r,g,b]}. Acts on `id`. Reads the mode. Changes the document. */
2861
+ "layer.set": {
2862
+ color?: Array<number>; /** an id */
2863
+ id?: Json;
2864
+ locked?: boolean;
2865
+ name?: string;
2866
+ printable?: boolean;
2867
+ visible?: boolean;
2868
+ };
2869
+ /** Delete Layer. Deletes a layer and its objects. Params: {id}. Acts on `id`. Reads the mode. Changes the document. */
2870
+ "layer.delete": {
2871
+ id?: Json;
2872
+ };
2873
+ /** Merge Layers. Merges layers into one, moving their objects. Params: {ids: [layer ids], into?: layer id (default: the first)} ? their objects move to `into`, the other layers are deleted. Acts on `ids`. Reads the mode. Changes the document. */
2874
+ "layer.merge": {
2875
+ ids?: Array<number>;
2876
+ into?: number;
2877
+ };
2878
+ /** Delete Unused Layers. Deletes layers without objects (one layer always stays). Params: {} ? layers without objects (one layer always stays). Reads the mode. Changes the document. */
2879
+ "layer.deleteUnused": Record<string, never>;
2880
+ /** Hide/Lock Others. Hides or locks every layer but one, or shows or unlocks all. Params: {id, hide?: bool, lock?: bool, show?: true (Show All Layers), unlock?: true (Unlock All Layers)} ? Hide Others / Lock Others act on every layer but `id`. Acts on `id`. Reads the mode. Changes the document. */
2881
+ "layer.others": {
2882
+ hide?: boolean; /** an id */
2883
+ id?: Json;
2884
+ lock?: boolean; /** Show All Layers */
2885
+ show?: boolean; /** Unlock All Layers */
2886
+ unlock?: boolean;
2887
+ };
2888
+ /** Set Active Layer. Makes a layer the active layer for new objects. Params: {id}. Acts on `id`. Reads the mode. Changes the document. */
2889
+ "layer.activate": {
2890
+ id?: Json;
2891
+ };
2892
+ /** Override All Parent Page Items. Overrides parent items on a page (0-based) so they can be edited there; answers the copies' ids. Params: {page (0-based), ids?: parent items (default: all on the page's parent page)} ? {ids} the page's editable copies. Acts on `ids`. Reads the selection, mode. Changes the document. */
2893
+ "layout.overrideParentItems": {
2894
+ ids?: Array<number>; /** 0-based */
2895
+ page?: number; /** read by the command beside its listed parameters */
2896
+ story?: number;
2897
+ };
2898
+ /** Remove All Local Overrides. Deletes a page's overridden parent copies so the parent items show again. Params: {page (0-based)} ? deletes the page's overridden copies; the parent items show again. Reads the selection, mode. Changes the document. */
2899
+ "layout.removeOverrides": {
2900
+ page?: number;
2901
+ };
2902
+ /** Detach All Objects from Parent. Detaches a page's overridden copies from the parent, making them ordinary items. Params: {page (0-based)} ? the page's overridden copies become ordinary items. Reads the selection, mode. Changes the document. */
2903
+ "layout.detachAll": {
2904
+ page?: number;
2905
+ };
2906
+ /** Transparency Blend Space. Sets the colour space (CMYK or RGB) transparency is composited in for output. Params: {space: cmyk|rgb} ? the colour space transparency is composited in for output. Reads the mode. Changes the document. */
2907
+ "edit.transparencyBlendSpace": {
2908
+ space?: "cmyk" | "rgb";
2909
+ };
2910
+ /** Preferences. Sets application preferences: hidden characters, typographer's quotes, polygon sides, stroke scaling and more. Params: {showHiddenCharacters?, typographersQuotes?, polygonSides?, starInset?, scaleStrokes?, dimensionsIncludeStroke?, transformationsAreTotals?, absolutePageNumbers?, highlightHj?, highlightKeeps?, highlightCustomTracking?, highlightSubstitutedFonts?, richBlackOutput?, favoriteFonts?: [family], showFontNamesInEnglish?} ? all application preferences. Reads the mode. Changes the document. */
2911
+ "prefs.set": {
2912
+ absolutePageNumbers?: boolean; /** read by the command beside its listed parameters */
2913
+ autocorrect?: boolean; /** read by the command beside its listed parameters */
2914
+ autocorrectList?: Array<Json>;
2915
+ dimensionsIncludeStroke?: boolean;
2916
+ favoriteFonts?: Array<string>;
2917
+ highlightCustomTracking?: boolean;
2918
+ highlightHj?: boolean;
2919
+ highlightKeeps?: boolean;
2920
+ highlightSubstitutedFonts?: boolean;
2921
+ polygonSides?: number; /** read by the command beside its listed parameters */
2922
+ recoveryMinutes?: number;
2923
+ richBlackOutput?: boolean;
2924
+ scaleStrokes?: boolean; /** read by the command beside its listed parameters */
2925
+ showAddedText?: boolean;
2926
+ showFontNamesInEnglish?: boolean;
2927
+ showHiddenCharacters?: boolean; /** read by the command beside its listed parameters */
2928
+ showNoteAnchors?: boolean; /** read by the command beside its listed parameters */
2929
+ showTextThreads?: boolean; /** read by the command beside its listed parameters */
2930
+ smartTextReflow?: boolean;
2931
+ starInset?: number; /** read by the command beside its listed parameters */
2932
+ story?: number;
2933
+ transformationsAreTotals?: boolean;
2934
+ typographersQuotes?: boolean;
2935
+ };
2936
+ /** Document Preferences. Sets document preferences: units, keyboard increments, guide colours, glyph fallback and black overprint. Params: {horizontalUnits?, verticalUnits?: points|picas|inches|millimeters|..., keyboardIncrement? (pt), baselineGrid?: {start, increment, relativeTo, color, viewThreshold}, grid?: {horizontal, vertical, subdivisions, color, inBack}, pasteboard?: [h, v], marginColor?, columnColor?, bleedColor?, slugColor?: [r, g, b], advancedType?: {superscriptSize, superscriptPosition, subscriptSize, subscriptPosition} (%), overprintBlack?, glyphFallback? (draw characters the font lacks from fallback fonts; off: as the font's missing-glyph box)} ? those settings. Reads the mode. Changes the document. */
2937
+ "document.preferences": {
2938
+ advancedType?: {
2939
+ subscriptPosition?: Json;
2940
+ subscriptSize?: Json;
2941
+ superscriptPosition?: Json;
2942
+ superscriptSize?: Json;
2943
+ }; /** {start, increment, relativeTo, color, viewThreshold} */
2944
+ baselineGrid?: {
2945
+ color?: string;
2946
+ increment?: Json;
2947
+ relativeTo?: Json;
2948
+ start?: number;
2949
+ viewThreshold?: Json;
2950
+ }; /** a colour */
2951
+ bleedColor?: string; /** a colour */
2952
+ columnColor?: string;
2953
+ glyphFallback?: boolean; /** {horizontal, vertical, subdivisions, color, inBack} */
2954
+ grid?: {
2955
+ color?: string;
2956
+ horizontal?: Json;
2957
+ inBack?: Json;
2958
+ subdivisions?: Json;
2959
+ vertical?: Json;
2960
+ }; /** points, millimetres, inches... */
2961
+ horizontalUnits?: string; /** points */
2962
+ keyboardIncrement?: number; /** a colour */
2963
+ marginColor?: string;
2964
+ overprintBlack?: boolean; /** [h, v] */
2965
+ pasteboard?: Array<Json>; /** [r, g, b] */
2966
+ slugColor?: Array<number>; /** points|picas|inches|millimeters|... */
2967
+ verticalUnits?: string;
2968
+ };
2969
+ /** Inspect Document. Answers the document's structure: pages, spreads, items with ids, stories with overset, styles, swatches and the selection. Use story.get for text. Params: {} ? pages, spreads, items, stories (with overset), styles, swatches, selection. */
2970
+ "document.inspect": Record<string, never>;
2971
+ /** List Documents. Lists the open documents with their indexes. Params: {}. */
2972
+ "document.list": Record<string, never>;
2973
+ /** Select Tool. Selects an editor tool (selection, direct selection, type, frame...). Params: {tool: selection|directSelection|type|rectangleFrame|...}. Reads the mode. Changes the document. */
2974
+ "tool.select": {
2975
+ tool?: string; /** read by the command beside its listed parameters */
2976
+ what?: string;
2977
+ };
2978
+ /** List Tools. Lists the editor tools. Params: {}. Reads the mode. */
2979
+ "tool.list": Record<string, never>;
2980
+ /** History. Answers the undo and redo history. Params: {}. */
2981
+ "document.history": Record<string, never>;
2982
+ /** Find Object. Finds and selects objects by fill, stroke, weight, opacity and kind; answers their ids. Params: {fill?, stroke?: swatch, strokeWeight?, opacity? (0?1), kind?: text|graphic|shape|line|group, layer?, label?, select?: bool (default true)} ? {ids} ? Find/Change ? Object, through the document. Reads the mode. Changes the document. */
2983
+ "find.objects": {
2984
+ fill?: string;
2985
+ kind?: "text" | "graphic" | "shape" | "line" | "group";
2986
+ label?: string;
2987
+ layer?: number; /** 0?1 */
2988
+ opacity?: number; /** default true */
2989
+ select?: boolean;
2990
+ stroke?: string;
2991
+ strokeWeight?: number;
2992
+ };
2993
+ /** Change All (Object). Finds objects by criteria and changes their fill, stroke, weight or opacity; answers how many changed. Params: {fill?, stroke?: swatch, strokeWeight?, opacity?, kind?, layer?, label?, change: {fill?, stroke?, strokeWeight?, opacity?}} ? {changed}. Reads the mode. Changes the document. */
2994
+ "find.changeObjects": {
2995
+ change?: {
2996
+ fill?: Json;
2997
+ opacity?: number;
2998
+ stroke?: Json;
2999
+ strokeWeight?: Json;
3000
+ };
3001
+ fill?: Json;
3002
+ kind?: Json;
3003
+ label?: string;
3004
+ layer?: number;
3005
+ opacity?: number; /** swatch */
3006
+ stroke?: Json;
3007
+ strokeWeight?: Json;
3008
+ };
3009
+ /** Find. Finds text (or a GREP pattern) in the document, a story or the selection and answers every match with its story and byte offsets; changes nothing. Params: {find, grep?: bool, caseSensitive?: bool, wholeWord?: bool, scope?: document|story|selection, story?} ? matches [{story, start, end, text}]. */
3010
+ "find.find": {
3011
+ caseSensitive?: boolean;
3012
+ find?: string;
3013
+ grep?: boolean;
3014
+ scope?: "document" | "story" | "selection"; /** a story id from document.inspect */
3015
+ story?: number;
3016
+ wholeWord?: boolean;
3017
+ };
3018
+ /** Change All. Replaces every match of text (or a GREP pattern) with new text, in a scope; answers how many changed. Params: {find, change, grep?, caseSensitive?, wholeWord?, scope?, story?, first?: bool (change only the first match), attrs?: {character attributes applied to changed text}} ? {count}. Reads the selection, mode. Changes the document. */
3019
+ "find.change": {
3020
+ attrs?: {
3021
+ [key: string]: Json;
3022
+ };
3023
+ caseSensitive?: boolean;
3024
+ change?: string;
3025
+ find?: string; /** change only the first match */
3026
+ first?: boolean;
3027
+ grep?: boolean;
3028
+ scope?: string; /** a story id from document.inspect */
3029
+ story?: number;
3030
+ wholeWord?: boolean;
3031
+ };
3032
+ /** Find Next. Selects the next match of a text after the caret. Params: {find, grep?, ...} ? selects the next match after the caret. Reads the selection, mode. Changes the document. */
3033
+ "find.next": {
3034
+ caseSensitive?: boolean;
3035
+ find?: string;
3036
+ grep?: boolean; /** read by the command beside its listed parameters */
3037
+ scope?: string; /** read by the command beside its listed parameters */
3038
+ story?: number; /** read by the command beside its listed parameters */
3039
+ wholeWord?: boolean;
3040
+ };
3041
+ /** Text Variables. Lists the text variables with their types and values. Params: {} ? [{index, name, type, ..., value (page 1)}]. */
3042
+ "variables.list": Record<string, never>;
3043
+ /** Define Text Variable. Defines a text variable (custom, last page number, chapter number, file name, dates, running header...). Params: {name, type: custom|lastPageNumber|chapterNumber|fileName|creationDate|modificationDate|outputDate|runningHeader, text?, format?, style?, use?: firstOnPage|lastOnPage, character?, section?, extension?, before?, after?} ? creates or replaces by name. Reads the mode. Changes the document. */
3044
+ "variables.define": {
3045
+ after?: string;
3046
+ before?: string;
3047
+ character?: boolean;
3048
+ extension?: boolean;
3049
+ format?: string;
3050
+ name?: string;
3051
+ section?: boolean;
3052
+ style?: string;
3053
+ text?: string;
3054
+ type?: "custom" | "lastPageNumber" | "chapterNumber" | "fileName" | "creationDate" | "modificationDate" | "outputDate" | "runningHeader";
3055
+ use?: "firstOnPage" | "lastOnPage";
3056
+ };
3057
+ /** Delete Text Variable. Deletes a text variable; its instances become plain text. Params: {name} ? instances become plain text of their current value. Reads the mode. Changes the document. */
3058
+ "variables.delete": {
3059
+ name?: string;
3060
+ };
3061
+ /** Insert Variable. Inserts a text variable at the text insertion point. Params: {name} ? at the text insertion point. Reads the selection, mode. Changes the document. */
3062
+ "variables.insert": {
3063
+ name?: string;
3064
+ };
3065
+ /** Table of Contents. Generates a table of contents from paragraph styles with levels, a title and page numbers, in a new frame. Params: {entries: [{style, level?: 1}] | styles: [names], title?: "Contents", pageNumbers?: true, page?: 1-based page for a new frame (its margins), rect?: [x0,y0,x1,y1] (spread coords)} ? {story, entries}. Reads the mode. Changes the document. */
3066
+ "toc.generate": {
3067
+ entries?: Array<{
3068
+ style?: string;
3069
+ }>; /** a page counted from 1 */
3070
+ page?: number;
3071
+ pageNumbers?: boolean; /** [x0, y0, x1, y1]; spread coords */
3072
+ rect?: Array<number>; /** [names]; one of several alternative parameters */
3073
+ styles?: Array<Json>; /** like Contents */
3074
+ title?: string;
3075
+ };
3076
+ /** Update Table of Contents. Regenerates the existing table of contents. Params: {} ? regenerate the existing table of contents. Reads the mode. Changes the document. */
3077
+ "toc.update": {
3078
+ asset?: number;
3079
+ };
3080
+ /** Table of Contents Entries. Answers the table-of-contents entries for styles (level, text, page) without changing the document. Params: {entries | styles} ? [{level, text, page}] without changing the document. */
3081
+ "toc.entries": {
3082
+ entries?: Json; /** one of several alternative parameters */
3083
+ styles?: Json;
3084
+ };
3085
+ /** Insert Footnote. Inserts a footnote reference at the insertion point with its text; the caret moves into the footnote. Params: {text?} ? a footnote reference at the insertion point; the caret moves into the new footnote's text. Reads the selection, mode. Changes the document. */
3086
+ "footnote.insert": {
3087
+ text?: string;
3088
+ };
3089
+ /** Document Footnote Options. Sets footnote numbering, styles, spacing and layout options. Params: {style?: arabic|upperRoman|lowerRoman|upperLetters|lowerLetters|symbols, startAt?, restart?: never|page|spread|section, prefix?, suffix?, affixIn?: none|reference|text|both, refPosition?: superscript|subscript|normal|otSuperscript, refCharStyle?, paraStyle?, separator?, spaceBefore?, spaceBetween?, firstBaseline?, firstBaselineMin?, spanColumns?, rule?: {on, weight, color, tint, width, offset, leftIndent}} ? the options (no params: just read them). Reads the mode. Changes the document. */
3090
+ "footnote.options": {
3091
+ affixIn?: "none" | "reference" | "text" | "both";
3092
+ firstBaseline?: string; /** points */
3093
+ firstBaselineMin?: number; /** a paragraph style name */
3094
+ paraStyle?: string;
3095
+ prefix?: string; /** a character style name */
3096
+ refCharStyle?: string;
3097
+ refPosition?: "superscript" | "subscript" | "normal" | "otSuperscript";
3098
+ restart?: "never" | "page" | "spread" | "section"; /** {on, weight, color, tint, width, offset, leftIndent} */
3099
+ rule?: {
3100
+ color?: string;
3101
+ leftIndent?: Json;
3102
+ offset?: number;
3103
+ on?: Json;
3104
+ tint?: Json;
3105
+ weight?: number;
3106
+ width?: number;
3107
+ };
3108
+ separator?: string;
3109
+ spaceBefore?: number; /** points */
3110
+ spaceBetween?: number;
3111
+ spanColumns?: boolean;
3112
+ startAt?: number;
3113
+ style?: "arabic" | "upperRoman" | "lowerRoman" | "upperLetters" | "lowerLetters" | "symbols";
3114
+ suffix?: string; /** read by the command beside its listed parameters */
3115
+ text?: string;
3116
+ };
3117
+ /** Footnotes. Lists footnotes in story order with their story, id, anchor and text. Params: {story?} ? [{story, id, index, anchor, text}] in story order. */
3118
+ "footnote.list": {
3119
+ story?: number;
3120
+ };
3121
+ /** Set Footnote Text. Replaces a footnote's text, by its story and id. Params: {story, id, text} ? replaces the footnote's text. Reads the mode. Changes the document. */
3122
+ "footnote.setText": {
3123
+ id?: Json; /** a story id from document.inspect */
3124
+ story?: number;
3125
+ text?: string;
3126
+ };
3127
+ /** Delete Footnote. Deletes a footnote's reference and text. Params: {story, id} ? deletes the reference (and so the footnote). Reads the selection, mode. Changes the document. */
3128
+ "footnote.delete": {
3129
+ id?: Json; /** a story id from document.inspect */
3130
+ story?: number;
3131
+ };
3132
+ /** Go to Footnote Reference. Moves the caret from footnote text to just after its reference. Params: {} ? from footnote text, puts the caret after the footnote's reference. Reads the selection, mode. Changes the document. */
3133
+ "footnote.goToReference": Record<string, never>;
3134
+ /** Insert Cross-Reference. Inserts a cross-reference to a text anchor or paragraph in a format at the insertion point. Params: {anchor? | paragraph?: text to find (first paragraph containing it) | story? + para? (0-based), format?: name (default Full Paragraph & Page Number)} ? at the insertion point; the text updates itself as the destination moves. Reads the selection, mode. Changes the document. */
3135
+ "xref.insert": {
3136
+ anchor?: number; /** default Full Paragraph & Page Number */
3137
+ format?: string; /** read by the command beside its listed parameters */
3138
+ para?: number; /** read by the command beside its listed parameters */
3139
+ paragraph?: string; /** read by the command beside its listed parameters */
3140
+ story?: number;
3141
+ };
3142
+ /** New Hyperlink Destination. Creates a named text anchor (hyperlink destination) at the insertion point. Params: {name} ? a text anchor at the insertion point. Reads the selection, mode. Changes the document. */
3143
+ "anchor.create": {
3144
+ name?: string;
3145
+ };
3146
+ /** Cross-References. Lists the cross-references with their position, target, format and text. Params: {} ? [{story, pos, target, format, text}]. */
3147
+ "xref.list": Record<string, never>;
3148
+ /** Text Anchors. Lists the text anchors with their ids, names, stories, positions and pages. Params: {} ? [{id, name, story, pos, page}]. */
3149
+ "anchor.list": Record<string, never>;
3150
+ /** Cross-Reference Formats. Lists the cross-reference formats with their definitions. Params: {} ? [{name, definition}]. */
3151
+ "xref.formats": Record<string, never>;
3152
+ /** Define Cross-Reference Format. Defines a cross-reference format from building blocks such as <paraText /> and <pageNum />. Params: {name, definition} ? building blocks: <fullPara />, <paraText />, <paraNum />, <pageNum />, <txtAnchrName />, <chapNum />, <fileName />, <partialPara delim=":" includeDelim="false" />; creates or replaces. Reads the mode. Changes the document. */
3153
+ "xref.defineFormat": {
3154
+ definition?: string;
3155
+ name?: string;
3156
+ };
3157
+ /** Set Cross-Reference Format. Changes a cross-reference's format. Params: {story, index, format}. Reads the mode. Changes the document. */
3158
+ "xref.setFormat": {
3159
+ format?: string; /** a position counted from 0 (the first is 0) */
3160
+ index?: number; /** a story id from document.inspect */
3161
+ story?: number;
3162
+ };
3163
+ /** New Page Reference. Adds an index page reference for topics (default: the selected text) or a see/see also reference. Params: {topics?: [level 1..4] | topic?: "Level 1 > Level 2" (default: the selected text), sort?: [keys], range?: currentPage|toEndOfStory|suppressPageRange|nextParagraphs|see|seeAlso, paragraphs?: n, target?: topic for see/seeAlso} ? a marker at the insertion point. Reads the selection, mode. Changes the document. */
3164
+ "index.addReference": {
3165
+ paragraphs?: number;
3166
+ range?: "currentPage" | "toEndOfStory" | "suppressPageRange" | "nextParagraphs" | "see" | "seeAlso"; /** [keys] */
3167
+ sort?: Array<Json>;
3168
+ target?: string; /** like Level 1 > Level 2; default: the selected text; one of several alternative parameters */
3169
+ topic?: string; /** topic levels 1 to 4 */
3170
+ topics?: Array<string>;
3171
+ };
3172
+ /** Index Page References. Lists the index page references with their topics and pages. Params: {} ? [{story, pos, topics, range, page}]. */
3173
+ "index.list": Record<string, never>;
3174
+ /** Generate Index. Generates an index with a title, section headings and run-in option in a new frame. Params: {title?: "Index", sectionHeadings?: true, runIn?: false, page?: 1-based page for a new frame, rect?: [x0,y0,x1,y1]} ? replaces the existing index ? {story, entries}. Reads the mode. Changes the document. */
3175
+ "index.generate": {
3176
+ page?: number; /** [x0, y0, x1, y1] */
3177
+ rect?: Array<number>;
3178
+ runIn?: boolean;
3179
+ sectionHeadings?: boolean; /** like Index */
3180
+ title?: string;
3181
+ };
3182
+ /** Update Index. Regenerates the existing index. Params: {} ? regenerate the existing index. Reads the mode. Changes the document. */
3183
+ "index.update": {
3184
+ asset?: number;
3185
+ };
3186
+ /** Insert Anchored Object. Anchors objects in a story at a text position, inline or above line, with offsets. Params: {ids, story?, pos? (default: the text insertion point), position?: inline|aboveLine|custom, yOffset?, align?: left|center|right, spaceBefore?, spaceAfter?, xRelative?/yRelative?: anchor|textFrame|columnEdge|pageMargin|pageEdge, xOffset?, objectPoint?/refPoint?: 0..8, keepWithinColumn?} ? moves the items into the text. Acts on `ids`. Reads the selection, mode. Changes the document. */
3187
+ "anchored.insert": {
3188
+ align?: "left" | "center" | "right"; /** read by the command beside its listed parameters */
3189
+ edge?: string;
3190
+ ids?: Array<Json>;
3191
+ keepWithinColumn?: boolean; /** a text position */
3192
+ pos?: number;
3193
+ position?: "inline" | "aboveLine" | "custom";
3194
+ spaceAfter?: number;
3195
+ spaceBefore?: number; /** a story id from document.inspect */
3196
+ story?: number; /** read by the command beside its listed parameters */
3197
+ to?: string; /** points */
3198
+ xOffset?: number; /** points */
3199
+ yOffset?: number;
3200
+ };
3201
+ /** Anchored Object Options. Changes an anchored object's position and offsets. Params: {story?, index? (default: the object at the insertion point), position?: inline|aboveLine|custom, yOffset?, align?: left|center|right, spaceBefore?, spaceAfter?, xRelative?/yRelative?: anchor|textFrame|columnEdge|pageMargin|pageEdge, xOffset?, objectPoint?/refPoint?: 0..8, keepWithinColumn?}. Reads the selection, mode. Changes the document. */
3202
+ "anchored.options": {
3203
+ align?: "left" | "center" | "right"; /** read by the command beside its listed parameters */
3204
+ edge?: string; /** a position counted from 0 (the first is 0); default: the object at the insertion point */
3205
+ index?: number;
3206
+ keepWithinColumn?: boolean;
3207
+ position?: "inline" | "aboveLine" | "custom";
3208
+ spaceAfter?: number;
3209
+ spaceBefore?: number; /** a story id from document.inspect */
3210
+ story?: number; /** read by the command beside its listed parameters */
3211
+ to?: string; /** points */
3212
+ xOffset?: number; /** points */
3213
+ yOffset?: number;
3214
+ };
3215
+ /** Release. Releases an anchored object back onto the page. Params: {story?, index? (default: the object at the insertion point)} ? puts the object back on the page where it is now and removes it from the text. Reads the selection, mode. Changes the document. */
3216
+ "anchored.release": {
3217
+ index?: number; /** a story id from document.inspect */
3218
+ story?: number;
3219
+ };
3220
+ /** Anchored Objects. Lists anchored objects with their story, position and size. Params: {story?} ? [{story, index, pos, position, size}]. */
3221
+ "anchored.list": {
3222
+ story?: number;
3223
+ };
3224
+ /** New Guide. Adds a horizontal or vertical guide at a position on a spread or page. Params: {orientation: horizontal|vertical, position (spread coordinate), spread?, page? (index in the spread; default: the page under `at` or the position), at? (the other coordinate), spreadGuide?: bool} ? {page, index}. Reads the active, mode. Changes the document. */
3225
+ "guide.add": {
3226
+ at?: number;
3227
+ orientation?: "horizontal" | "vertical"; /** index in the spread; default: the page under `at` or the position */
3228
+ page?: number; /** the guide's coordinate in points */
3229
+ position?: number;
3230
+ spread?: Json;
3231
+ spreadGuide?: boolean;
3232
+ };
3233
+ /** Move Guide. Moves a guide to a new position. Params: {spread?, page, index, position}. Reads the mode. Changes the document. */
3234
+ "guide.move": {
3235
+ index?: number;
3236
+ page?: number; /** the guide's coordinate in points */
3237
+ position?: number;
3238
+ spread?: Json;
3239
+ };
3240
+ /** Delete Guide. Deletes a guide by page and index. Params: {spread?, page, index}. Reads the mode. Changes the document. */
3241
+ "guide.delete": {
3242
+ index?: number;
3243
+ page?: number;
3244
+ spread?: Json;
3245
+ };
3246
+ /** Delete All Guides on Spread. Deletes every guide on a spread. Params: {spread?}. Reads the mode. Changes the document. */
3247
+ "guide.deleteAll": {
3248
+ spread?: Json;
3249
+ };
3250
+ /** Guides. Lists the guides on a spread with their orientation and position. Params: {spread?} ? [{page, index, orientation, position, spread}]. */
3251
+ "guide.list": {
3252
+ orientation?: string;
3253
+ spread?: Json;
3254
+ };
3255
+ /** Create Guides. Creates rows and columns of guides with gutters, fitted to the margins or the page. Params: {rows?: 0..1000, columns?: 0..1000, rowGutter?: 12, columnGutter?: 12, fitTo?: margins|page, removeExisting?: false, spread?, page? (index in the spread; default all pages)} ? at most 10000 guides per command. Reads the active, mode. Changes the document. */
3256
+ "layout.createGuides": {
3257
+ columnGutter?: number; /** 0 to 1000 */
3258
+ columns?: number;
3259
+ fitTo?: "margins" | "page"; /** index in the spread; default all pages */
3260
+ page?: number;
3261
+ removeExisting?: boolean;
3262
+ rowGutter?: number; /** 0 to 1000 */
3263
+ rows?: number;
3264
+ spread?: Json; /** read by the command beside its listed parameters */
3265
+ story?: number;
3266
+ };
3267
+ /** Links. Lists placed graphics' links with their status (ok, modified, missing, embedded), size and uses. Params: {} ? [{asset, name, path, status: ok|modified|missing|embedded, pixels, uses: [{id, page, ppi}]}]. */
3268
+ "links.list": Record<string, never>;
3269
+ /** Relink. Points every placement of a graphic at another file. Params: {asset, path} ? use another file for every placement of the graphic. Reads the mode. Changes the document. */
3270
+ "links.relink": {
3271
+ asset?: number;
3272
+ path?: Json;
3273
+ };
3274
+ /** Relink to Folder. Relinks graphics to files of the same name in a folder, optionally with another extension. Params: {dir?: folder to look in (default: each link's own folder), extension?: e.g. "tif" (Relink File Extension), assets?: [ids], missingOnly?: bool (default true with `dir`)} ? {relinked, notFound: [names]}. Reads the mode. Changes the document. */
3275
+ "links.relinkFolder": {
3276
+ assets?: Array<Json>; /** folder to look in (default: each link's own folder); default: each link's own folder */
3277
+ dir?: Json; /** a file extension such as tif */
3278
+ extension?: string; /** default true with `dir` */
3279
+ missingOnly?: boolean;
3280
+ };
3281
+ /** Update Link. Reloads modified links from their files (one or all). Params: {asset?} ? reload modified links from their files (all when no asset). Reads the mode. Changes the document. */
3282
+ "links.update": {
3283
+ asset?: number; /** read by the command beside its listed parameters */
3284
+ story?: number;
3285
+ };
3286
+ /** Embed Link. Embeds a linked graphic in the document. Params: {asset} ? keep only the copy in the document. Reads the mode. Changes the document. */
3287
+ "links.embed": {
3288
+ asset?: number;
3289
+ };
3290
+ /** Go To Link. Selects the frames showing a linked graphic. Params: {asset} ? selects the frames showing the graphic. Reads the mode. Changes the document. */
3291
+ "links.goTo": {
3292
+ asset?: number;
3293
+ };
3294
+ /** Font Families. Lists the font families text can be set in, or one family's styles. Params: {family?} ? the families text can be set in (bundled, installed, added), sorted; with `family`, {family, styles}. */
3295
+ "font.families": {
3296
+ family?: string;
3297
+ };
3298
+ /** Fonts in Document. Lists the fonts used in the document with the characters set in them and whether any are missing. Params: {} ? [{family, style, characters, missing, styleMissing, source: bundled|installed|document|added (null when missing)}] (missing first). */
3299
+ "font.list": Record<string, never>;
3300
+ /** Find/Replace Font. Replaces a font family and style in text (and styles, unless told not to) with another. Params: {family, style?, toFamily, toStyle?, redefineStyles?: true} ? replaces the font in text and (by default) in paragraph and character styles. Reads the mode. Changes the document. */
3301
+ "font.replace": {
3302
+ family?: string;
3303
+ redefineStyles?: boolean;
3304
+ style?: string;
3305
+ toFamily?: string;
3306
+ toStyle?: string;
3307
+ };
3308
+ /** Check Spelling. Checks spelling in a story or the document and answers misspelled words with positions and suggestions. Params: {story?, suggestions?: true} ? [{story, start, end, word, suggestions}]. */
3309
+ "spelling.check": {
3310
+ story?: number;
3311
+ suggestions?: boolean;
3312
+ };
3313
+ /** Add Hyphenation Exception. Adds a hyphenation exception: breaks only at ~, or never for a word without ~. Params: {word: "ex~am~ple" (breaks only at ~) or a word with no ~ (never hyphenated)}. Reads the mode. Changes the document. */
3314
+ "hyphenation.addException": {
3315
+ word?: boolean;
3316
+ };
3317
+ /** Remove Hyphenation Exception. Removes a hyphenation exception. Params: {word} (with or without ~). Reads the mode. Changes the document. */
3318
+ "hyphenation.removeException": {
3319
+ word?: boolean;
3320
+ };
3321
+ /** Hyphenation Exceptions. Lists the hyphenation exceptions. Params: {} ? [word]. */
3322
+ "hyphenation.list": Record<string, never>;
3323
+ /** User Dictionary. Replaces the document's user dictionary with a word list. Params: {words: [word]} ? replace the document's user dictionary. Reads the mode. Changes the document. */
3324
+ "spelling.setWords": {
3325
+ words?: Array<Json>;
3326
+ };
3327
+ /** User Dictionary Words. Lists the words in the document's user dictionary. Params: {} ? [word]. */
3328
+ "spelling.words": Record<string, never>;
3329
+ /** Add to Dictionary. Adds a word to the document's user dictionary. Params: {word}. Reads the mode. Changes the document. */
3330
+ "spelling.addWord": {
3331
+ word?: boolean;
3332
+ };
3333
+ /** Change. Replaces a misspelled word at a story range. Params: {story, start, end, to}. Reads the mode. Changes the document. */
3334
+ "spelling.change": {
3335
+ end?: number;
3336
+ start?: number; /** a story id from document.inspect */
3337
+ story?: number; /** the replacement word */
3338
+ to?: string;
3339
+ };
3340
+ /** Select Data Source. Selects a data merge source (CSV or spreadsheet by path or bytes) and answers its fields and records. Params: {path | bytes|base64, name, delimiter?: comma|tab|semicolon, sheet?} ? {fields, records, warnings}. Reads the mode. Changes the document. */
3341
+ "data.source.select": {
3342
+ base64?: Json; /** one of several alternative parameters */
3343
+ bytes?: Json;
3344
+ delimiter?: "comma" | "tab" | "semicolon";
3345
+ name?: string; /** one of several alternative parameters */
3346
+ path?: Json;
3347
+ sheet?: string; /** read by the command beside its listed parameters */
3348
+ what?: string;
3349
+ };
3350
+ /** Update Data Source. Re-reads the linked data merge source. Params: {} ? re-read the linked file. Reads the mode. Changes the document. */
3351
+ "data.source.update": {
3352
+ asset?: number;
3353
+ };
3354
+ /** Remove Data Source. Removes the data merge source; placeholders stay. Params: {} ? drop the source; placeholders stay. Reads the mode. Changes the document. */
3355
+ "data.source.remove": Record<string, never>;
3356
+ /** Data Fields. Answers data fields (name, kind, uses) from inline data or the linked source. Params: {csv? | rows? | path? | bytes?, name?} ? [{name, kind, uses}]; no params reads the linked source and does not attach one. */
3357
+ "data.fields": {
3358
+ base64?: string; /** one of several alternative parameters */
3359
+ bytes?: Json; /** one of several alternative parameters */
3360
+ csv?: Json; /** read by the command beside its listed parameters */
3361
+ delimiter?: string;
3362
+ name?: string; /** one of several alternative parameters */
3363
+ path?: Json; /** one of several alternative parameters */
3364
+ rows?: number; /** read by the command beside its listed parameters */
3365
+ sheet?: string;
3366
+ };
3367
+ /** Insert Field. Inserts a data field placeholder (text, image, QR or hyperlink) in a story or on an item. Params: {field, role?: text|image|qr|hyperlink, story?, at?, end?, item?} ? {id}. Reads the selection, mode. Changes the document. */
3368
+ "data.placeholder.add": {
3369
+ at?: Array<number>;
3370
+ end?: number;
3371
+ field?: string;
3372
+ item?: number;
3373
+ role?: "text" | "image" | "qr" | "hyperlink"; /** a story id from document.inspect */
3374
+ story?: number;
3375
+ };
3376
+ /** Remove Field. Removes a data field placeholder. Params: {id}. Reads the mode. Changes the document. */
3377
+ "data.placeholder.remove": {
3378
+ id?: Json;
3379
+ };
3380
+ /** Data Merge Options. Sets data merge options: records, layout per page, spacing, insets and image fitting. Params: {records?, one?, range?, perPage?, arrange?, insets?, columnSpacing?, rowSpacing?, fitting?, center?, linkImages?, limit?}. Reads the mode. Changes the document. */
3381
+ "data.options": {
3382
+ arrange?: string;
3383
+ center?: boolean; /** points */
3384
+ columnSpacing?: number;
3385
+ fitting?: string;
3386
+ insets?: Json;
3387
+ limit?: number;
3388
+ linkImages?: boolean;
3389
+ one?: number;
3390
+ perPage?: string;
3391
+ range?: string;
3392
+ records?: string; /** points */
3393
+ rowSpacing?: number; /** read by the command beside its listed parameters */
3394
+ to?: string;
3395
+ };
3396
+ /** Preview Record. Fills the template with one record for preview, for this session only. Params: {record?: n} ? fill the template with that record (session only). */
3397
+ "data.preview": {
3398
+ record?: number;
3399
+ };
3400
+ /** Stop Preview. Restores the unfilled template after a preview. Params: {} ? restore the unfilled template. Reads the mode. Changes the document. */
3401
+ "data.preview.stop": Record<string, never>;
3402
+ /** Create Merged Document. Creates a merged document from data and the template with the merge options. Params: {csv? | rows? | path? | bytes?, name?, records?, one?, range?, perPage?, arrange?, insets?, columnSpacing?, rowSpacing?, fitting?, center?, linkImages?, limit?} ? {records, pages, missingImages, oversetStories, warnings}. Reads the mode. Changes the document. */
3403
+ "data.merge": {
3404
+ arrange?: string; /** one of several alternative parameters */
3405
+ bytes?: Json;
3406
+ center?: boolean; /** points */
3407
+ columnSpacing?: number; /** one of several alternative parameters */
3408
+ csv?: Json;
3409
+ fitting?: string;
3410
+ insets?: Json;
3411
+ limit?: number;
3412
+ linkImages?: boolean;
3413
+ name?: string;
3414
+ one?: number; /** one of several alternative parameters */
3415
+ path?: Json;
3416
+ perPage?: string;
3417
+ range?: string;
3418
+ records?: string; /** points */
3419
+ rowSpacing?: number; /** one of several alternative parameters */
3420
+ rows?: number;
3421
+ };
3422
+ /** New Hyperlink. Creates a hyperlink from the selected text or objects to a URL, email or page. Params: {url? | email? | page? (1-based), name?, ids?} ? from the selected text, or the selected frames. Acts on `ids`. Reads the selection, mode. Changes the document. */
3423
+ "hyperlink.create": {
3424
+ email?: string;
3425
+ ids?: Array<Json>;
3426
+ name?: string; /** 1-based; one of several alternative parameters */
3427
+ page?: number; /** 1-based; one of several alternative parameters */
3428
+ url?: string;
3429
+ };
3430
+ /** Delete Hyperlink. Deletes a hyperlink by id. Params: {id}. Reads the mode. Changes the document. */
3431
+ "hyperlink.delete": {
3432
+ id?: Json;
3433
+ };
3434
+ /** Hyperlinks. Lists the hyperlinks with their ids, names and destinations. Params: {}. */
3435
+ "hyperlink.list": Record<string, never>;
3436
+ /** Hyperlink Options. Changes a hyperlink's name or destination. Params: {id, name?, url? | email? | page? (1-based)}. Reads the mode. Changes the document. */
3437
+ "hyperlink.edit": {
3438
+ email?: string; /** an id */
3439
+ id?: Json;
3440
+ name?: string; /** 1-based; one of several alternative parameters */
3441
+ page?: number; /** 1-based; one of several alternative parameters */
3442
+ url?: string;
3443
+ };
3444
+ /** Go To Source. Selects a hyperlink's text or frame. Params: {id} ? selects the hyperlink's text or frame. Reads the mode. Changes the document. */
3445
+ "hyperlink.goToSource": {
3446
+ id?: Json;
3447
+ };
3448
+ /** Rename Bookmark. Renames a PDF bookmark by index. Params: {index, name}. Reads the mode. Changes the document. */
3449
+ "bookmark.rename": {
3450
+ index?: number;
3451
+ name?: string;
3452
+ };
3453
+ /** New Bookmark. Adds a PDF bookmark for a page (1-based). Params: {name?, page? (1-based; default: current selection's page or 1)}. Reads the mode. Changes the document. */
3454
+ "bookmark.add": {
3455
+ name?: string; /** 1-based; default: current selection's page or 1 */
3456
+ page?: number;
3457
+ };
3458
+ /** Delete Bookmark. Deletes a PDF bookmark by index. Params: {index}. Reads the mode. Changes the document. */
3459
+ "bookmark.delete": {
3460
+ index?: number;
3461
+ };
3462
+ /** Bookmarks. Lists the PDF bookmarks. Params: {}. */
3463
+ "bookmark.list": Record<string, never>;
3464
+ /** Preflight Document. Checks the document for output problems (missing fonts and links, low-resolution images, overset text...) and answers the issues. Params: {minPpi?: 150} ? issues [{severity, kind, message, item?, page?}]. */
3465
+ "preflight.run": {
3466
+ minPpi?: number;
3467
+ };
3468
+ /** Render Preview. Renders a preview of the layout as a PNG, without changing it: the whole canvas, one page, one spread, or one object (a diagnostic's target); answers {png, width, height}. Params: {scale?, maxSize?, target?, slide?}. */
3469
+ "file.render": {
3470
+ maxSize?: number; /** device pixels per point, at most 2 (default 1) */
3471
+ scale?: number; /** a page counted from 0, when there is no target */
3472
+ slide?: number; /** the part to draw, as a diagnostic's target names it: an object ({path: "item:<id>"}, an id layout_inspect lists), a page ({page}, counted from 1) or a spread ({spread}, counted from 0); without it, the whole canvas */
3473
+ target?: {
3474
+ page?: number;
3475
+ path?: string;
3476
+ spread?: number;
3477
+ };
3478
+ };
3479
+ }
3480
+ /** A Layout file opened with `openDocument<Layout, LayoutCommands>`. */
3481
+ export type LayoutDocument = ModelDocument<Layout, LayoutCommands>;
3482
+ export type LayoutContext = RequestContext<Layout, LayoutCommands>;
3483
+ export {};