@zsherman/canvas 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (196) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/LICENSE +373 -0
  3. package/README.md +15 -2
  4. package/THIRD_PARTY_NOTICES.md +117 -0
  5. package/dist/dom/canvas/assets.js +89 -0
  6. package/dist/dom/canvas/board-store.js +56 -0
  7. package/dist/dom/canvas/canvas-actions.js +78 -0
  8. package/dist/dom/canvas/canvas-board.js +557 -0
  9. package/dist/dom/canvas/canvas-board.styles.js +110 -0
  10. package/dist/dom/canvas/canvas-chrome.js +1167 -0
  11. package/dist/dom/canvas/canvas-chrome.styles.js +220 -0
  12. package/dist/dom/canvas/canvas-comments.js +950 -0
  13. package/dist/dom/canvas/canvas-comments.styles.js +231 -0
  14. package/dist/dom/canvas/canvas-context.js +196 -0
  15. package/dist/dom/canvas/canvas-controller.js +697 -0
  16. package/dist/dom/canvas/canvas-cursor-chat.js +120 -0
  17. package/dist/dom/canvas/canvas-cursor-chat.styles.js +55 -0
  18. package/dist/dom/canvas/canvas-menus.js +276 -0
  19. package/dist/dom/canvas/canvas-menus.styles.js +7 -0
  20. package/dist/dom/canvas/canvas-style-bar.js +930 -0
  21. package/dist/dom/canvas/canvas-style-bar.styles.js +52 -0
  22. package/dist/dom/canvas/canvas-surface.js +1354 -0
  23. package/dist/dom/canvas/canvas-surface.styles.js +345 -0
  24. package/dist/dom/canvas/canvas-tool-rail.js +406 -0
  25. package/dist/dom/canvas/canvas-tool-rail.styles.js +20 -0
  26. package/dist/dom/canvas/comments.js +58 -0
  27. package/dist/dom/canvas/equality.js +13 -0
  28. package/dist/dom/canvas/export-png.js +496 -0
  29. package/dist/dom/canvas/gesture-machine.js +91 -0
  30. package/dist/dom/canvas/handlers.js +18 -0
  31. package/dist/dom/canvas/index.js +9 -0
  32. package/dist/dom/canvas/input.js +85 -0
  33. package/dist/dom/canvas/instant.js +28 -0
  34. package/dist/dom/canvas/kernel.js +39 -0
  35. package/dist/dom/canvas/motion.js +686 -0
  36. package/dist/dom/canvas/palette.js +165 -0
  37. package/dist/dom/canvas/random-id.js +15 -0
  38. package/dist/dom/canvas/scene-renderer.js +559 -0
  39. package/dist/dom/canvas/scene.styles.js +7 -0
  40. package/dist/dom/canvas/surface-model.js +324 -0
  41. package/dist/dom/canvas/uploads.js +294 -0
  42. package/dist/dom/index.js +9 -0
  43. package/dist/dom/kernel/actions.js +455 -0
  44. package/dist/dom/kernel/board.js +856 -0
  45. package/dist/dom/kernel/claims.js +40 -0
  46. package/dist/dom/kernel/clipboard.js +30 -0
  47. package/dist/dom/kernel/constants.js +210 -0
  48. package/dist/dom/kernel/contract.js +0 -0
  49. package/dist/dom/kernel/decode.js +85 -0
  50. package/dist/dom/kernel/editor.js +2077 -0
  51. package/dist/dom/kernel/errors.js +82 -0
  52. package/dist/dom/kernel/fonts/inter.js +7924 -0
  53. package/dist/dom/kernel/fractional-index.js +54 -0
  54. package/dist/dom/kernel/geometry.js +123 -0
  55. package/dist/dom/kernel/hit-test.js +156 -0
  56. package/dist/dom/kernel/index.js +22 -0
  57. package/dist/dom/kernel/inspect.js +116 -0
  58. package/dist/dom/kernel/kernel.js +251 -0
  59. package/dist/dom/kernel/outline.js +64 -0
  60. package/dist/dom/kernel/plan.js +1370 -0
  61. package/dist/dom/kernel/rev.js +173 -0
  62. package/dist/dom/kernel/scene.js +580 -0
  63. package/dist/dom/kernel/schema.js +1109 -0
  64. package/dist/dom/kernel/snap.js +258 -0
  65. package/dist/dom/kernel/svg.js +148 -0
  66. package/dist/dom/kernel/text.js +142 -0
  67. package/dist/solid/canvas/assets.jsx +89 -0
  68. package/dist/solid/canvas/board-store.jsx +56 -0
  69. package/dist/solid/canvas/canvas-actions.jsx +78 -0
  70. package/dist/solid/canvas/canvas-board.jsx +326 -0
  71. package/dist/solid/canvas/canvas-board.styles.jsx +110 -0
  72. package/dist/solid/canvas/canvas-chrome.jsx +612 -0
  73. package/dist/solid/canvas/canvas-chrome.styles.jsx +220 -0
  74. package/dist/solid/canvas/canvas-comments.jsx +435 -0
  75. package/dist/solid/canvas/canvas-comments.styles.jsx +231 -0
  76. package/dist/solid/canvas/canvas-context.jsx +174 -0
  77. package/dist/solid/canvas/canvas-controller.jsx +697 -0
  78. package/dist/solid/canvas/canvas-cursor-chat.jsx +87 -0
  79. package/dist/solid/canvas/canvas-cursor-chat.styles.jsx +55 -0
  80. package/dist/solid/canvas/canvas-menus.jsx +223 -0
  81. package/dist/solid/canvas/canvas-menus.styles.jsx +7 -0
  82. package/dist/solid/canvas/canvas-style-bar.jsx +486 -0
  83. package/dist/solid/canvas/canvas-style-bar.styles.jsx +52 -0
  84. package/dist/solid/canvas/canvas-surface.jsx +681 -0
  85. package/dist/solid/canvas/canvas-surface.styles.jsx +345 -0
  86. package/dist/solid/canvas/canvas-tool-rail.jsx +195 -0
  87. package/dist/solid/canvas/canvas-tool-rail.styles.jsx +20 -0
  88. package/dist/solid/canvas/comments.jsx +58 -0
  89. package/dist/solid/canvas/equality.jsx +13 -0
  90. package/dist/solid/canvas/export-png.jsx +496 -0
  91. package/dist/solid/canvas/gesture-machine.jsx +91 -0
  92. package/dist/solid/canvas/handlers.jsx +18 -0
  93. package/dist/solid/canvas/index.jsx +9 -0
  94. package/dist/solid/canvas/input.jsx +85 -0
  95. package/dist/solid/canvas/instant.jsx +28 -0
  96. package/dist/solid/canvas/kernel.jsx +39 -0
  97. package/dist/solid/canvas/motion.jsx +686 -0
  98. package/dist/solid/canvas/palette.jsx +165 -0
  99. package/dist/solid/canvas/random-id.jsx +15 -0
  100. package/dist/solid/canvas/scene-renderer.jsx +559 -0
  101. package/dist/solid/canvas/scene.styles.jsx +7 -0
  102. package/dist/solid/canvas/surface-model.jsx +324 -0
  103. package/dist/solid/canvas/uploads.jsx +294 -0
  104. package/dist/solid/index.jsx +9 -0
  105. package/dist/solid/kernel/actions.jsx +455 -0
  106. package/dist/solid/kernel/board.jsx +856 -0
  107. package/dist/solid/kernel/claims.jsx +40 -0
  108. package/dist/solid/kernel/clipboard.jsx +30 -0
  109. package/dist/solid/kernel/constants.jsx +210 -0
  110. package/dist/solid/kernel/contract.jsx +0 -0
  111. package/dist/solid/kernel/decode.jsx +85 -0
  112. package/dist/solid/kernel/editor.jsx +2077 -0
  113. package/dist/solid/kernel/errors.jsx +82 -0
  114. package/dist/solid/kernel/fonts/inter.jsx +7924 -0
  115. package/dist/solid/kernel/fractional-index.jsx +54 -0
  116. package/dist/solid/kernel/geometry.jsx +123 -0
  117. package/dist/solid/kernel/hit-test.jsx +156 -0
  118. package/dist/solid/kernel/index.jsx +22 -0
  119. package/dist/solid/kernel/inspect.jsx +116 -0
  120. package/dist/solid/kernel/kernel.jsx +251 -0
  121. package/dist/solid/kernel/outline.jsx +64 -0
  122. package/dist/solid/kernel/plan.jsx +1370 -0
  123. package/dist/solid/kernel/rev.jsx +173 -0
  124. package/dist/solid/kernel/scene.jsx +580 -0
  125. package/dist/solid/kernel/schema.jsx +1109 -0
  126. package/dist/solid/kernel/snap.jsx +258 -0
  127. package/dist/solid/kernel/svg.jsx +148 -0
  128. package/dist/solid/kernel/text.jsx +142 -0
  129. package/dist/styles.css +1 -0
  130. package/dist/types/canvas/assets.d.ts +111 -0
  131. package/dist/types/canvas/board-store.d.ts +86 -0
  132. package/dist/types/canvas/canvas-actions.d.ts +21 -0
  133. package/dist/types/canvas/canvas-board.d.ts +53 -0
  134. package/dist/types/canvas/canvas-board.styles.d.ts +94 -0
  135. package/dist/types/canvas/canvas-chrome.d.ts +109 -0
  136. package/dist/types/canvas/canvas-chrome.styles.d.ts +193 -0
  137. package/dist/types/canvas/canvas-comments.d.ts +20 -0
  138. package/dist/types/canvas/canvas-comments.styles.d.ts +208 -0
  139. package/dist/types/canvas/canvas-context.d.ts +104 -0
  140. package/dist/types/canvas/canvas-controller.d.ts +159 -0
  141. package/dist/types/canvas/canvas-cursor-chat.d.ts +13 -0
  142. package/dist/types/canvas/canvas-cursor-chat.styles.d.ts +54 -0
  143. package/dist/types/canvas/canvas-menus.d.ts +21 -0
  144. package/dist/types/canvas/canvas-menus.styles.d.ts +6 -0
  145. package/dist/types/canvas/canvas-style-bar.d.ts +19 -0
  146. package/dist/types/canvas/canvas-style-bar.styles.d.ts +43 -0
  147. package/dist/types/canvas/canvas-surface.d.ts +15 -0
  148. package/dist/types/canvas/canvas-surface.styles.d.ts +313 -0
  149. package/dist/types/canvas/canvas-tool-rail.d.ts +41 -0
  150. package/dist/types/canvas/canvas-tool-rail.styles.d.ts +15 -0
  151. package/dist/types/canvas/comments.d.ts +106 -0
  152. package/dist/types/canvas/equality.d.ts +4 -0
  153. package/dist/types/canvas/export-png.d.ts +77 -0
  154. package/dist/types/canvas/gesture-machine.d.ts +46 -0
  155. package/dist/types/canvas/handlers.d.ts +7 -0
  156. package/dist/types/canvas/index.d.ts +18 -0
  157. package/dist/types/canvas/input.d.ts +63 -0
  158. package/dist/types/canvas/instant.d.ts +13 -0
  159. package/dist/types/canvas/kernel.d.ts +27 -0
  160. package/dist/types/canvas/motion.d.ts +72 -0
  161. package/dist/types/canvas/palette.d.ts +46 -0
  162. package/dist/types/canvas/random-id.d.ts +6 -0
  163. package/dist/types/canvas/scene-renderer.d.ts +27 -0
  164. package/dist/types/canvas/scene.styles.d.ts +4 -0
  165. package/dist/types/canvas/surface-model.d.ts +113 -0
  166. package/dist/types/canvas/uploads.d.ts +58 -0
  167. package/dist/types/index.d.ts +1 -0
  168. package/dist/types/kernel/actions.d.ts +19 -0
  169. package/dist/types/kernel/board.d.ts +137 -0
  170. package/dist/types/kernel/claims.d.ts +29 -0
  171. package/dist/types/kernel/clipboard.d.ts +10 -0
  172. package/dist/types/kernel/constants.d.ts +195 -0
  173. package/dist/types/kernel/contract.d.ts +1533 -0
  174. package/dist/types/kernel/decode.d.ts +60 -0
  175. package/dist/types/kernel/editor.d.ts +12 -0
  176. package/dist/types/kernel/errors.d.ts +11 -0
  177. package/dist/types/kernel/fractional-index.d.ts +7 -0
  178. package/dist/types/kernel/geometry.d.ts +42 -0
  179. package/dist/types/kernel/hit-test.d.ts +16 -0
  180. package/dist/types/kernel/index.d.ts +8 -0
  181. package/dist/types/kernel/inspect.d.ts +6 -0
  182. package/dist/types/kernel/kernel.d.ts +6 -0
  183. package/dist/types/kernel/outline.d.ts +4 -0
  184. package/dist/types/kernel/plan.d.ts +20 -0
  185. package/dist/types/kernel/rev.d.ts +21 -0
  186. package/dist/types/kernel/scene.d.ts +16 -0
  187. package/dist/types/kernel/schema.d.ts +3436 -0
  188. package/dist/types/kernel/snap.d.ts +41 -0
  189. package/dist/types/kernel/svg.d.ts +3 -0
  190. package/dist/types/kernel/text.d.ts +21 -0
  191. package/docs/api.json +207 -0
  192. package/docs/canvas.md +444 -0
  193. package/docs/kernel.md +108 -0
  194. package/docs/llms.txt +41 -0
  195. package/docs/search-index.json +52 -0
  196. package/package.json +60 -4
@@ -0,0 +1,3436 @@
1
+ import type { StyleJson } from "./contract.js";
2
+ import { type Guard } from "./decode.js";
3
+ export declare const board: Guard<{
4
+ readonly shapes: readonly ({
5
+ readonly id: string;
6
+ readonly x: number;
7
+ readonly y: number;
8
+ readonly z: string;
9
+ readonly group: string | null;
10
+ readonly locked: boolean;
11
+ readonly createdBy: string;
12
+ readonly updatedBy: string;
13
+ readonly kind: "Arrow";
14
+ readonly w: number;
15
+ readonly h: number;
16
+ readonly from: {
17
+ readonly _tag: "Point";
18
+ readonly x: number;
19
+ readonly y: number;
20
+ } | {
21
+ readonly _tag: "Shape";
22
+ readonly id: string;
23
+ readonly at: {
24
+ readonly x: number;
25
+ readonly y: number;
26
+ } | null;
27
+ };
28
+ readonly to: {
29
+ readonly _tag: "Point";
30
+ readonly x: number;
31
+ readonly y: number;
32
+ } | {
33
+ readonly _tag: "Shape";
34
+ readonly id: string;
35
+ readonly at: {
36
+ readonly x: number;
37
+ readonly y: number;
38
+ } | null;
39
+ };
40
+ readonly style: {
41
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
42
+ readonly start: "arrow" | "dot" | "none" | "triangle";
43
+ readonly end: "arrow" | "dot" | "none" | "triangle";
44
+ readonly route: "elbow" | "straight";
45
+ readonly dash: "dashed" | "dotted" | "solid";
46
+ };
47
+ } | {
48
+ readonly id: string;
49
+ readonly x: number;
50
+ readonly y: number;
51
+ readonly z: string;
52
+ readonly group: string | null;
53
+ readonly locked: boolean;
54
+ readonly createdBy: string;
55
+ readonly updatedBy: string;
56
+ readonly kind: "Box";
57
+ readonly w: number;
58
+ readonly h: number;
59
+ readonly text: string;
60
+ readonly style: {
61
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
62
+ readonly form: "ellipse" | "rectangle";
63
+ readonly size: "l" | "m" | "s" | "xl";
64
+ readonly align: "center" | "end" | "start";
65
+ readonly fill: boolean;
66
+ readonly dash: "dashed" | "dotted" | "solid";
67
+ };
68
+ } | {
69
+ readonly id: string;
70
+ readonly x: number;
71
+ readonly y: number;
72
+ readonly z: string;
73
+ readonly group: string | null;
74
+ readonly locked: boolean;
75
+ readonly createdBy: string;
76
+ readonly updatedBy: string;
77
+ readonly kind: "Ink";
78
+ readonly w: number;
79
+ readonly h: number;
80
+ readonly points: readonly {
81
+ readonly x: number;
82
+ readonly y: number;
83
+ }[];
84
+ readonly style: {
85
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
86
+ readonly size: "l" | "m" | "s" | "xl";
87
+ readonly brush: "highlighter" | "marker" | "pen";
88
+ };
89
+ } | {
90
+ readonly id: string;
91
+ readonly x: number;
92
+ readonly y: number;
93
+ readonly z: string;
94
+ readonly group: string | null;
95
+ readonly locked: boolean;
96
+ readonly createdBy: string;
97
+ readonly updatedBy: string;
98
+ readonly kind: "Sticky";
99
+ readonly w: number;
100
+ readonly h: number;
101
+ readonly text: string;
102
+ readonly style: {
103
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
104
+ readonly size: "l" | "m" | "s" | "xl";
105
+ readonly align: "center" | "end" | "start";
106
+ };
107
+ } | {
108
+ readonly id: string;
109
+ readonly x: number;
110
+ readonly y: number;
111
+ readonly z: string;
112
+ readonly group: string | null;
113
+ readonly locked: boolean;
114
+ readonly createdBy: string;
115
+ readonly updatedBy: string;
116
+ readonly kind: "Image";
117
+ readonly w: number;
118
+ readonly h: number;
119
+ readonly asset: string;
120
+ readonly alt: string;
121
+ } | {
122
+ readonly id: string;
123
+ readonly x: number;
124
+ readonly y: number;
125
+ readonly z: string;
126
+ readonly group: string | null;
127
+ readonly locked: boolean;
128
+ readonly createdBy: string;
129
+ readonly updatedBy: string;
130
+ readonly kind: "Text";
131
+ readonly w: number;
132
+ readonly h: number;
133
+ readonly text: string;
134
+ readonly style: {
135
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
136
+ readonly size: "l" | "m" | "s" | "xl";
137
+ readonly align: "center" | "end" | "start";
138
+ readonly width: "auto" | "fixed";
139
+ };
140
+ } | {
141
+ readonly id: string;
142
+ readonly x: number;
143
+ readonly y: number;
144
+ readonly z: string;
145
+ readonly group: string | null;
146
+ readonly locked: boolean;
147
+ readonly createdBy: string;
148
+ readonly updatedBy: string;
149
+ readonly kind: "Timestamp";
150
+ readonly w: number;
151
+ readonly h: number;
152
+ readonly at: number;
153
+ })[];
154
+ readonly head: number;
155
+ readonly transactions: readonly {
156
+ readonly id: string;
157
+ readonly seq: number;
158
+ readonly author: {
159
+ readonly principal: string;
160
+ readonly via: string | null;
161
+ };
162
+ readonly reason: string | null;
163
+ readonly mode: "commit" | "propose";
164
+ readonly changes: readonly ({
165
+ readonly op: "patch";
166
+ readonly id: string;
167
+ readonly fields: {
168
+ readonly x?: number | undefined;
169
+ readonly y?: number | undefined;
170
+ readonly w?: number | undefined;
171
+ readonly h?: number | undefined;
172
+ readonly z?: string | undefined;
173
+ readonly group?: string | null | undefined;
174
+ readonly locked?: boolean | undefined;
175
+ readonly text?: string | undefined;
176
+ readonly style?: StyleJson | undefined;
177
+ readonly from?: {
178
+ readonly _tag: "Point";
179
+ readonly x: number;
180
+ readonly y: number;
181
+ } | {
182
+ readonly _tag: "Shape";
183
+ readonly id: string;
184
+ readonly at: {
185
+ readonly x: number;
186
+ readonly y: number;
187
+ } | null;
188
+ } | undefined;
189
+ readonly to?: {
190
+ readonly _tag: "Point";
191
+ readonly x: number;
192
+ readonly y: number;
193
+ } | {
194
+ readonly _tag: "Shape";
195
+ readonly id: string;
196
+ readonly at: {
197
+ readonly x: number;
198
+ readonly y: number;
199
+ } | null;
200
+ } | undefined;
201
+ readonly points?: readonly {
202
+ readonly x: number;
203
+ readonly y: number;
204
+ }[] | undefined;
205
+ readonly asset?: string | undefined;
206
+ readonly alt?: string | undefined;
207
+ readonly updatedBy?: string | undefined;
208
+ };
209
+ } | {
210
+ readonly op: "remove";
211
+ readonly id: string;
212
+ } | {
213
+ readonly op: "set";
214
+ readonly shape: {
215
+ readonly id: string;
216
+ readonly x: number;
217
+ readonly y: number;
218
+ readonly z: string;
219
+ readonly group: string | null;
220
+ readonly locked: boolean;
221
+ readonly createdBy: string;
222
+ readonly updatedBy: string;
223
+ readonly kind: "Arrow";
224
+ readonly w: number;
225
+ readonly h: number;
226
+ readonly from: {
227
+ readonly _tag: "Point";
228
+ readonly x: number;
229
+ readonly y: number;
230
+ } | {
231
+ readonly _tag: "Shape";
232
+ readonly id: string;
233
+ readonly at: {
234
+ readonly x: number;
235
+ readonly y: number;
236
+ } | null;
237
+ };
238
+ readonly to: {
239
+ readonly _tag: "Point";
240
+ readonly x: number;
241
+ readonly y: number;
242
+ } | {
243
+ readonly _tag: "Shape";
244
+ readonly id: string;
245
+ readonly at: {
246
+ readonly x: number;
247
+ readonly y: number;
248
+ } | null;
249
+ };
250
+ readonly style: {
251
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
252
+ readonly start: "arrow" | "dot" | "none" | "triangle";
253
+ readonly end: "arrow" | "dot" | "none" | "triangle";
254
+ readonly route: "elbow" | "straight";
255
+ readonly dash: "dashed" | "dotted" | "solid";
256
+ };
257
+ } | {
258
+ readonly id: string;
259
+ readonly x: number;
260
+ readonly y: number;
261
+ readonly z: string;
262
+ readonly group: string | null;
263
+ readonly locked: boolean;
264
+ readonly createdBy: string;
265
+ readonly updatedBy: string;
266
+ readonly kind: "Box";
267
+ readonly w: number;
268
+ readonly h: number;
269
+ readonly text: string;
270
+ readonly style: {
271
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
272
+ readonly form: "ellipse" | "rectangle";
273
+ readonly size: "l" | "m" | "s" | "xl";
274
+ readonly align: "center" | "end" | "start";
275
+ readonly fill: boolean;
276
+ readonly dash: "dashed" | "dotted" | "solid";
277
+ };
278
+ } | {
279
+ readonly id: string;
280
+ readonly x: number;
281
+ readonly y: number;
282
+ readonly z: string;
283
+ readonly group: string | null;
284
+ readonly locked: boolean;
285
+ readonly createdBy: string;
286
+ readonly updatedBy: string;
287
+ readonly kind: "Ink";
288
+ readonly w: number;
289
+ readonly h: number;
290
+ readonly points: readonly {
291
+ readonly x: number;
292
+ readonly y: number;
293
+ }[];
294
+ readonly style: {
295
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
296
+ readonly size: "l" | "m" | "s" | "xl";
297
+ readonly brush: "highlighter" | "marker" | "pen";
298
+ };
299
+ } | {
300
+ readonly id: string;
301
+ readonly x: number;
302
+ readonly y: number;
303
+ readonly z: string;
304
+ readonly group: string | null;
305
+ readonly locked: boolean;
306
+ readonly createdBy: string;
307
+ readonly updatedBy: string;
308
+ readonly kind: "Sticky";
309
+ readonly w: number;
310
+ readonly h: number;
311
+ readonly text: string;
312
+ readonly style: {
313
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
314
+ readonly size: "l" | "m" | "s" | "xl";
315
+ readonly align: "center" | "end" | "start";
316
+ };
317
+ } | {
318
+ readonly id: string;
319
+ readonly x: number;
320
+ readonly y: number;
321
+ readonly z: string;
322
+ readonly group: string | null;
323
+ readonly locked: boolean;
324
+ readonly createdBy: string;
325
+ readonly updatedBy: string;
326
+ readonly kind: "Image";
327
+ readonly w: number;
328
+ readonly h: number;
329
+ readonly asset: string;
330
+ readonly alt: string;
331
+ } | {
332
+ readonly id: string;
333
+ readonly x: number;
334
+ readonly y: number;
335
+ readonly z: string;
336
+ readonly group: string | null;
337
+ readonly locked: boolean;
338
+ readonly createdBy: string;
339
+ readonly updatedBy: string;
340
+ readonly kind: "Text";
341
+ readonly w: number;
342
+ readonly h: number;
343
+ readonly text: string;
344
+ readonly style: {
345
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
346
+ readonly size: "l" | "m" | "s" | "xl";
347
+ readonly align: "center" | "end" | "start";
348
+ readonly width: "auto" | "fixed";
349
+ };
350
+ } | {
351
+ readonly id: string;
352
+ readonly x: number;
353
+ readonly y: number;
354
+ readonly z: string;
355
+ readonly group: string | null;
356
+ readonly locked: boolean;
357
+ readonly createdBy: string;
358
+ readonly updatedBy: string;
359
+ readonly kind: "Timestamp";
360
+ readonly w: number;
361
+ readonly h: number;
362
+ readonly at: number;
363
+ };
364
+ })[];
365
+ readonly inverse: readonly ({
366
+ readonly op: "patch";
367
+ readonly id: string;
368
+ readonly fields: {
369
+ readonly x?: number | undefined;
370
+ readonly y?: number | undefined;
371
+ readonly w?: number | undefined;
372
+ readonly h?: number | undefined;
373
+ readonly z?: string | undefined;
374
+ readonly group?: string | null | undefined;
375
+ readonly locked?: boolean | undefined;
376
+ readonly text?: string | undefined;
377
+ readonly style?: StyleJson | undefined;
378
+ readonly from?: {
379
+ readonly _tag: "Point";
380
+ readonly x: number;
381
+ readonly y: number;
382
+ } | {
383
+ readonly _tag: "Shape";
384
+ readonly id: string;
385
+ readonly at: {
386
+ readonly x: number;
387
+ readonly y: number;
388
+ } | null;
389
+ } | undefined;
390
+ readonly to?: {
391
+ readonly _tag: "Point";
392
+ readonly x: number;
393
+ readonly y: number;
394
+ } | {
395
+ readonly _tag: "Shape";
396
+ readonly id: string;
397
+ readonly at: {
398
+ readonly x: number;
399
+ readonly y: number;
400
+ } | null;
401
+ } | undefined;
402
+ readonly points?: readonly {
403
+ readonly x: number;
404
+ readonly y: number;
405
+ }[] | undefined;
406
+ readonly asset?: string | undefined;
407
+ readonly alt?: string | undefined;
408
+ readonly updatedBy?: string | undefined;
409
+ };
410
+ } | {
411
+ readonly op: "remove";
412
+ readonly id: string;
413
+ } | {
414
+ readonly op: "set";
415
+ readonly shape: {
416
+ readonly id: string;
417
+ readonly x: number;
418
+ readonly y: number;
419
+ readonly z: string;
420
+ readonly group: string | null;
421
+ readonly locked: boolean;
422
+ readonly createdBy: string;
423
+ readonly updatedBy: string;
424
+ readonly kind: "Arrow";
425
+ readonly w: number;
426
+ readonly h: number;
427
+ readonly from: {
428
+ readonly _tag: "Point";
429
+ readonly x: number;
430
+ readonly y: number;
431
+ } | {
432
+ readonly _tag: "Shape";
433
+ readonly id: string;
434
+ readonly at: {
435
+ readonly x: number;
436
+ readonly y: number;
437
+ } | null;
438
+ };
439
+ readonly to: {
440
+ readonly _tag: "Point";
441
+ readonly x: number;
442
+ readonly y: number;
443
+ } | {
444
+ readonly _tag: "Shape";
445
+ readonly id: string;
446
+ readonly at: {
447
+ readonly x: number;
448
+ readonly y: number;
449
+ } | null;
450
+ };
451
+ readonly style: {
452
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
453
+ readonly start: "arrow" | "dot" | "none" | "triangle";
454
+ readonly end: "arrow" | "dot" | "none" | "triangle";
455
+ readonly route: "elbow" | "straight";
456
+ readonly dash: "dashed" | "dotted" | "solid";
457
+ };
458
+ } | {
459
+ readonly id: string;
460
+ readonly x: number;
461
+ readonly y: number;
462
+ readonly z: string;
463
+ readonly group: string | null;
464
+ readonly locked: boolean;
465
+ readonly createdBy: string;
466
+ readonly updatedBy: string;
467
+ readonly kind: "Box";
468
+ readonly w: number;
469
+ readonly h: number;
470
+ readonly text: string;
471
+ readonly style: {
472
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
473
+ readonly form: "ellipse" | "rectangle";
474
+ readonly size: "l" | "m" | "s" | "xl";
475
+ readonly align: "center" | "end" | "start";
476
+ readonly fill: boolean;
477
+ readonly dash: "dashed" | "dotted" | "solid";
478
+ };
479
+ } | {
480
+ readonly id: string;
481
+ readonly x: number;
482
+ readonly y: number;
483
+ readonly z: string;
484
+ readonly group: string | null;
485
+ readonly locked: boolean;
486
+ readonly createdBy: string;
487
+ readonly updatedBy: string;
488
+ readonly kind: "Ink";
489
+ readonly w: number;
490
+ readonly h: number;
491
+ readonly points: readonly {
492
+ readonly x: number;
493
+ readonly y: number;
494
+ }[];
495
+ readonly style: {
496
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
497
+ readonly size: "l" | "m" | "s" | "xl";
498
+ readonly brush: "highlighter" | "marker" | "pen";
499
+ };
500
+ } | {
501
+ readonly id: string;
502
+ readonly x: number;
503
+ readonly y: number;
504
+ readonly z: string;
505
+ readonly group: string | null;
506
+ readonly locked: boolean;
507
+ readonly createdBy: string;
508
+ readonly updatedBy: string;
509
+ readonly kind: "Sticky";
510
+ readonly w: number;
511
+ readonly h: number;
512
+ readonly text: string;
513
+ readonly style: {
514
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
515
+ readonly size: "l" | "m" | "s" | "xl";
516
+ readonly align: "center" | "end" | "start";
517
+ };
518
+ } | {
519
+ readonly id: string;
520
+ readonly x: number;
521
+ readonly y: number;
522
+ readonly z: string;
523
+ readonly group: string | null;
524
+ readonly locked: boolean;
525
+ readonly createdBy: string;
526
+ readonly updatedBy: string;
527
+ readonly kind: "Image";
528
+ readonly w: number;
529
+ readonly h: number;
530
+ readonly asset: string;
531
+ readonly alt: string;
532
+ } | {
533
+ readonly id: string;
534
+ readonly x: number;
535
+ readonly y: number;
536
+ readonly z: string;
537
+ readonly group: string | null;
538
+ readonly locked: boolean;
539
+ readonly createdBy: string;
540
+ readonly updatedBy: string;
541
+ readonly kind: "Text";
542
+ readonly w: number;
543
+ readonly h: number;
544
+ readonly text: string;
545
+ readonly style: {
546
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
547
+ readonly size: "l" | "m" | "s" | "xl";
548
+ readonly align: "center" | "end" | "start";
549
+ readonly width: "auto" | "fixed";
550
+ };
551
+ } | {
552
+ readonly id: string;
553
+ readonly x: number;
554
+ readonly y: number;
555
+ readonly z: string;
556
+ readonly group: string | null;
557
+ readonly locked: boolean;
558
+ readonly createdBy: string;
559
+ readonly updatedBy: string;
560
+ readonly kind: "Timestamp";
561
+ readonly w: number;
562
+ readonly h: number;
563
+ readonly at: number;
564
+ };
565
+ })[];
566
+ readonly shapes: readonly string[];
567
+ readonly accepts: readonly string[];
568
+ readonly reverts: readonly string[];
569
+ }[];
570
+ }>;
571
+ export declare const plan: Guard<{
572
+ readonly changes: readonly ({
573
+ readonly op: "patch";
574
+ readonly id: string;
575
+ readonly fields: {
576
+ readonly x?: number | undefined;
577
+ readonly y?: number | undefined;
578
+ readonly w?: number | undefined;
579
+ readonly h?: number | undefined;
580
+ readonly z?: string | undefined;
581
+ readonly group?: string | null | undefined;
582
+ readonly locked?: boolean | undefined;
583
+ readonly text?: string | undefined;
584
+ readonly style?: StyleJson | undefined;
585
+ readonly from?: {
586
+ readonly _tag: "Point";
587
+ readonly x: number;
588
+ readonly y: number;
589
+ } | {
590
+ readonly _tag: "Shape";
591
+ readonly id: string;
592
+ readonly at: {
593
+ readonly x: number;
594
+ readonly y: number;
595
+ } | null;
596
+ } | undefined;
597
+ readonly to?: {
598
+ readonly _tag: "Point";
599
+ readonly x: number;
600
+ readonly y: number;
601
+ } | {
602
+ readonly _tag: "Shape";
603
+ readonly id: string;
604
+ readonly at: {
605
+ readonly x: number;
606
+ readonly y: number;
607
+ } | null;
608
+ } | undefined;
609
+ readonly points?: readonly {
610
+ readonly x: number;
611
+ readonly y: number;
612
+ }[] | undefined;
613
+ readonly asset?: string | undefined;
614
+ readonly alt?: string | undefined;
615
+ readonly updatedBy?: string | undefined;
616
+ };
617
+ } | {
618
+ readonly op: "remove";
619
+ readonly id: string;
620
+ } | {
621
+ readonly op: "set";
622
+ readonly shape: {
623
+ readonly id: string;
624
+ readonly x: number;
625
+ readonly y: number;
626
+ readonly z: string;
627
+ readonly group: string | null;
628
+ readonly locked: boolean;
629
+ readonly createdBy: string;
630
+ readonly updatedBy: string;
631
+ readonly kind: "Arrow";
632
+ readonly w: number;
633
+ readonly h: number;
634
+ readonly from: {
635
+ readonly _tag: "Point";
636
+ readonly x: number;
637
+ readonly y: number;
638
+ } | {
639
+ readonly _tag: "Shape";
640
+ readonly id: string;
641
+ readonly at: {
642
+ readonly x: number;
643
+ readonly y: number;
644
+ } | null;
645
+ };
646
+ readonly to: {
647
+ readonly _tag: "Point";
648
+ readonly x: number;
649
+ readonly y: number;
650
+ } | {
651
+ readonly _tag: "Shape";
652
+ readonly id: string;
653
+ readonly at: {
654
+ readonly x: number;
655
+ readonly y: number;
656
+ } | null;
657
+ };
658
+ readonly style: {
659
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
660
+ readonly start: "arrow" | "dot" | "none" | "triangle";
661
+ readonly end: "arrow" | "dot" | "none" | "triangle";
662
+ readonly route: "elbow" | "straight";
663
+ readonly dash: "dashed" | "dotted" | "solid";
664
+ };
665
+ } | {
666
+ readonly id: string;
667
+ readonly x: number;
668
+ readonly y: number;
669
+ readonly z: string;
670
+ readonly group: string | null;
671
+ readonly locked: boolean;
672
+ readonly createdBy: string;
673
+ readonly updatedBy: string;
674
+ readonly kind: "Box";
675
+ readonly w: number;
676
+ readonly h: number;
677
+ readonly text: string;
678
+ readonly style: {
679
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
680
+ readonly form: "ellipse" | "rectangle";
681
+ readonly size: "l" | "m" | "s" | "xl";
682
+ readonly align: "center" | "end" | "start";
683
+ readonly fill: boolean;
684
+ readonly dash: "dashed" | "dotted" | "solid";
685
+ };
686
+ } | {
687
+ readonly id: string;
688
+ readonly x: number;
689
+ readonly y: number;
690
+ readonly z: string;
691
+ readonly group: string | null;
692
+ readonly locked: boolean;
693
+ readonly createdBy: string;
694
+ readonly updatedBy: string;
695
+ readonly kind: "Ink";
696
+ readonly w: number;
697
+ readonly h: number;
698
+ readonly points: readonly {
699
+ readonly x: number;
700
+ readonly y: number;
701
+ }[];
702
+ readonly style: {
703
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
704
+ readonly size: "l" | "m" | "s" | "xl";
705
+ readonly brush: "highlighter" | "marker" | "pen";
706
+ };
707
+ } | {
708
+ readonly id: string;
709
+ readonly x: number;
710
+ readonly y: number;
711
+ readonly z: string;
712
+ readonly group: string | null;
713
+ readonly locked: boolean;
714
+ readonly createdBy: string;
715
+ readonly updatedBy: string;
716
+ readonly kind: "Sticky";
717
+ readonly w: number;
718
+ readonly h: number;
719
+ readonly text: string;
720
+ readonly style: {
721
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
722
+ readonly size: "l" | "m" | "s" | "xl";
723
+ readonly align: "center" | "end" | "start";
724
+ };
725
+ } | {
726
+ readonly id: string;
727
+ readonly x: number;
728
+ readonly y: number;
729
+ readonly z: string;
730
+ readonly group: string | null;
731
+ readonly locked: boolean;
732
+ readonly createdBy: string;
733
+ readonly updatedBy: string;
734
+ readonly kind: "Image";
735
+ readonly w: number;
736
+ readonly h: number;
737
+ readonly asset: string;
738
+ readonly alt: string;
739
+ } | {
740
+ readonly id: string;
741
+ readonly x: number;
742
+ readonly y: number;
743
+ readonly z: string;
744
+ readonly group: string | null;
745
+ readonly locked: boolean;
746
+ readonly createdBy: string;
747
+ readonly updatedBy: string;
748
+ readonly kind: "Text";
749
+ readonly w: number;
750
+ readonly h: number;
751
+ readonly text: string;
752
+ readonly style: {
753
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
754
+ readonly size: "l" | "m" | "s" | "xl";
755
+ readonly align: "center" | "end" | "start";
756
+ readonly width: "auto" | "fixed";
757
+ };
758
+ } | {
759
+ readonly id: string;
760
+ readonly x: number;
761
+ readonly y: number;
762
+ readonly z: string;
763
+ readonly group: string | null;
764
+ readonly locked: boolean;
765
+ readonly createdBy: string;
766
+ readonly updatedBy: string;
767
+ readonly kind: "Timestamp";
768
+ readonly w: number;
769
+ readonly h: number;
770
+ readonly at: number;
771
+ };
772
+ })[];
773
+ readonly inverse: readonly ({
774
+ readonly op: "patch";
775
+ readonly id: string;
776
+ readonly fields: {
777
+ readonly x?: number | undefined;
778
+ readonly y?: number | undefined;
779
+ readonly w?: number | undefined;
780
+ readonly h?: number | undefined;
781
+ readonly z?: string | undefined;
782
+ readonly group?: string | null | undefined;
783
+ readonly locked?: boolean | undefined;
784
+ readonly text?: string | undefined;
785
+ readonly style?: StyleJson | undefined;
786
+ readonly from?: {
787
+ readonly _tag: "Point";
788
+ readonly x: number;
789
+ readonly y: number;
790
+ } | {
791
+ readonly _tag: "Shape";
792
+ readonly id: string;
793
+ readonly at: {
794
+ readonly x: number;
795
+ readonly y: number;
796
+ } | null;
797
+ } | undefined;
798
+ readonly to?: {
799
+ readonly _tag: "Point";
800
+ readonly x: number;
801
+ readonly y: number;
802
+ } | {
803
+ readonly _tag: "Shape";
804
+ readonly id: string;
805
+ readonly at: {
806
+ readonly x: number;
807
+ readonly y: number;
808
+ } | null;
809
+ } | undefined;
810
+ readonly points?: readonly {
811
+ readonly x: number;
812
+ readonly y: number;
813
+ }[] | undefined;
814
+ readonly asset?: string | undefined;
815
+ readonly alt?: string | undefined;
816
+ readonly updatedBy?: string | undefined;
817
+ };
818
+ } | {
819
+ readonly op: "remove";
820
+ readonly id: string;
821
+ } | {
822
+ readonly op: "set";
823
+ readonly shape: {
824
+ readonly id: string;
825
+ readonly x: number;
826
+ readonly y: number;
827
+ readonly z: string;
828
+ readonly group: string | null;
829
+ readonly locked: boolean;
830
+ readonly createdBy: string;
831
+ readonly updatedBy: string;
832
+ readonly kind: "Arrow";
833
+ readonly w: number;
834
+ readonly h: number;
835
+ readonly from: {
836
+ readonly _tag: "Point";
837
+ readonly x: number;
838
+ readonly y: number;
839
+ } | {
840
+ readonly _tag: "Shape";
841
+ readonly id: string;
842
+ readonly at: {
843
+ readonly x: number;
844
+ readonly y: number;
845
+ } | null;
846
+ };
847
+ readonly to: {
848
+ readonly _tag: "Point";
849
+ readonly x: number;
850
+ readonly y: number;
851
+ } | {
852
+ readonly _tag: "Shape";
853
+ readonly id: string;
854
+ readonly at: {
855
+ readonly x: number;
856
+ readonly y: number;
857
+ } | null;
858
+ };
859
+ readonly style: {
860
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
861
+ readonly start: "arrow" | "dot" | "none" | "triangle";
862
+ readonly end: "arrow" | "dot" | "none" | "triangle";
863
+ readonly route: "elbow" | "straight";
864
+ readonly dash: "dashed" | "dotted" | "solid";
865
+ };
866
+ } | {
867
+ readonly id: string;
868
+ readonly x: number;
869
+ readonly y: number;
870
+ readonly z: string;
871
+ readonly group: string | null;
872
+ readonly locked: boolean;
873
+ readonly createdBy: string;
874
+ readonly updatedBy: string;
875
+ readonly kind: "Box";
876
+ readonly w: number;
877
+ readonly h: number;
878
+ readonly text: string;
879
+ readonly style: {
880
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
881
+ readonly form: "ellipse" | "rectangle";
882
+ readonly size: "l" | "m" | "s" | "xl";
883
+ readonly align: "center" | "end" | "start";
884
+ readonly fill: boolean;
885
+ readonly dash: "dashed" | "dotted" | "solid";
886
+ };
887
+ } | {
888
+ readonly id: string;
889
+ readonly x: number;
890
+ readonly y: number;
891
+ readonly z: string;
892
+ readonly group: string | null;
893
+ readonly locked: boolean;
894
+ readonly createdBy: string;
895
+ readonly updatedBy: string;
896
+ readonly kind: "Ink";
897
+ readonly w: number;
898
+ readonly h: number;
899
+ readonly points: readonly {
900
+ readonly x: number;
901
+ readonly y: number;
902
+ }[];
903
+ readonly style: {
904
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
905
+ readonly size: "l" | "m" | "s" | "xl";
906
+ readonly brush: "highlighter" | "marker" | "pen";
907
+ };
908
+ } | {
909
+ readonly id: string;
910
+ readonly x: number;
911
+ readonly y: number;
912
+ readonly z: string;
913
+ readonly group: string | null;
914
+ readonly locked: boolean;
915
+ readonly createdBy: string;
916
+ readonly updatedBy: string;
917
+ readonly kind: "Sticky";
918
+ readonly w: number;
919
+ readonly h: number;
920
+ readonly text: string;
921
+ readonly style: {
922
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
923
+ readonly size: "l" | "m" | "s" | "xl";
924
+ readonly align: "center" | "end" | "start";
925
+ };
926
+ } | {
927
+ readonly id: string;
928
+ readonly x: number;
929
+ readonly y: number;
930
+ readonly z: string;
931
+ readonly group: string | null;
932
+ readonly locked: boolean;
933
+ readonly createdBy: string;
934
+ readonly updatedBy: string;
935
+ readonly kind: "Image";
936
+ readonly w: number;
937
+ readonly h: number;
938
+ readonly asset: string;
939
+ readonly alt: string;
940
+ } | {
941
+ readonly id: string;
942
+ readonly x: number;
943
+ readonly y: number;
944
+ readonly z: string;
945
+ readonly group: string | null;
946
+ readonly locked: boolean;
947
+ readonly createdBy: string;
948
+ readonly updatedBy: string;
949
+ readonly kind: "Text";
950
+ readonly w: number;
951
+ readonly h: number;
952
+ readonly text: string;
953
+ readonly style: {
954
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
955
+ readonly size: "l" | "m" | "s" | "xl";
956
+ readonly align: "center" | "end" | "start";
957
+ readonly width: "auto" | "fixed";
958
+ };
959
+ } | {
960
+ readonly id: string;
961
+ readonly x: number;
962
+ readonly y: number;
963
+ readonly z: string;
964
+ readonly group: string | null;
965
+ readonly locked: boolean;
966
+ readonly createdBy: string;
967
+ readonly updatedBy: string;
968
+ readonly kind: "Timestamp";
969
+ readonly w: number;
970
+ readonly h: number;
971
+ readonly at: number;
972
+ };
973
+ })[];
974
+ readonly record: {
975
+ readonly id: string;
976
+ readonly seq: number;
977
+ readonly author: {
978
+ readonly principal: string;
979
+ readonly via: string | null;
980
+ };
981
+ readonly reason: string | null;
982
+ readonly mode: "commit" | "propose";
983
+ readonly changes: readonly ({
984
+ readonly op: "patch";
985
+ readonly id: string;
986
+ readonly fields: {
987
+ readonly x?: number | undefined;
988
+ readonly y?: number | undefined;
989
+ readonly w?: number | undefined;
990
+ readonly h?: number | undefined;
991
+ readonly z?: string | undefined;
992
+ readonly group?: string | null | undefined;
993
+ readonly locked?: boolean | undefined;
994
+ readonly text?: string | undefined;
995
+ readonly style?: StyleJson | undefined;
996
+ readonly from?: {
997
+ readonly _tag: "Point";
998
+ readonly x: number;
999
+ readonly y: number;
1000
+ } | {
1001
+ readonly _tag: "Shape";
1002
+ readonly id: string;
1003
+ readonly at: {
1004
+ readonly x: number;
1005
+ readonly y: number;
1006
+ } | null;
1007
+ } | undefined;
1008
+ readonly to?: {
1009
+ readonly _tag: "Point";
1010
+ readonly x: number;
1011
+ readonly y: number;
1012
+ } | {
1013
+ readonly _tag: "Shape";
1014
+ readonly id: string;
1015
+ readonly at: {
1016
+ readonly x: number;
1017
+ readonly y: number;
1018
+ } | null;
1019
+ } | undefined;
1020
+ readonly points?: readonly {
1021
+ readonly x: number;
1022
+ readonly y: number;
1023
+ }[] | undefined;
1024
+ readonly asset?: string | undefined;
1025
+ readonly alt?: string | undefined;
1026
+ readonly updatedBy?: string | undefined;
1027
+ };
1028
+ } | {
1029
+ readonly op: "remove";
1030
+ readonly id: string;
1031
+ } | {
1032
+ readonly op: "set";
1033
+ readonly shape: {
1034
+ readonly id: string;
1035
+ readonly x: number;
1036
+ readonly y: number;
1037
+ readonly z: string;
1038
+ readonly group: string | null;
1039
+ readonly locked: boolean;
1040
+ readonly createdBy: string;
1041
+ readonly updatedBy: string;
1042
+ readonly kind: "Arrow";
1043
+ readonly w: number;
1044
+ readonly h: number;
1045
+ readonly from: {
1046
+ readonly _tag: "Point";
1047
+ readonly x: number;
1048
+ readonly y: number;
1049
+ } | {
1050
+ readonly _tag: "Shape";
1051
+ readonly id: string;
1052
+ readonly at: {
1053
+ readonly x: number;
1054
+ readonly y: number;
1055
+ } | null;
1056
+ };
1057
+ readonly to: {
1058
+ readonly _tag: "Point";
1059
+ readonly x: number;
1060
+ readonly y: number;
1061
+ } | {
1062
+ readonly _tag: "Shape";
1063
+ readonly id: string;
1064
+ readonly at: {
1065
+ readonly x: number;
1066
+ readonly y: number;
1067
+ } | null;
1068
+ };
1069
+ readonly style: {
1070
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
1071
+ readonly start: "arrow" | "dot" | "none" | "triangle";
1072
+ readonly end: "arrow" | "dot" | "none" | "triangle";
1073
+ readonly route: "elbow" | "straight";
1074
+ readonly dash: "dashed" | "dotted" | "solid";
1075
+ };
1076
+ } | {
1077
+ readonly id: string;
1078
+ readonly x: number;
1079
+ readonly y: number;
1080
+ readonly z: string;
1081
+ readonly group: string | null;
1082
+ readonly locked: boolean;
1083
+ readonly createdBy: string;
1084
+ readonly updatedBy: string;
1085
+ readonly kind: "Box";
1086
+ readonly w: number;
1087
+ readonly h: number;
1088
+ readonly text: string;
1089
+ readonly style: {
1090
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
1091
+ readonly form: "ellipse" | "rectangle";
1092
+ readonly size: "l" | "m" | "s" | "xl";
1093
+ readonly align: "center" | "end" | "start";
1094
+ readonly fill: boolean;
1095
+ readonly dash: "dashed" | "dotted" | "solid";
1096
+ };
1097
+ } | {
1098
+ readonly id: string;
1099
+ readonly x: number;
1100
+ readonly y: number;
1101
+ readonly z: string;
1102
+ readonly group: string | null;
1103
+ readonly locked: boolean;
1104
+ readonly createdBy: string;
1105
+ readonly updatedBy: string;
1106
+ readonly kind: "Ink";
1107
+ readonly w: number;
1108
+ readonly h: number;
1109
+ readonly points: readonly {
1110
+ readonly x: number;
1111
+ readonly y: number;
1112
+ }[];
1113
+ readonly style: {
1114
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
1115
+ readonly size: "l" | "m" | "s" | "xl";
1116
+ readonly brush: "highlighter" | "marker" | "pen";
1117
+ };
1118
+ } | {
1119
+ readonly id: string;
1120
+ readonly x: number;
1121
+ readonly y: number;
1122
+ readonly z: string;
1123
+ readonly group: string | null;
1124
+ readonly locked: boolean;
1125
+ readonly createdBy: string;
1126
+ readonly updatedBy: string;
1127
+ readonly kind: "Sticky";
1128
+ readonly w: number;
1129
+ readonly h: number;
1130
+ readonly text: string;
1131
+ readonly style: {
1132
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
1133
+ readonly size: "l" | "m" | "s" | "xl";
1134
+ readonly align: "center" | "end" | "start";
1135
+ };
1136
+ } | {
1137
+ readonly id: string;
1138
+ readonly x: number;
1139
+ readonly y: number;
1140
+ readonly z: string;
1141
+ readonly group: string | null;
1142
+ readonly locked: boolean;
1143
+ readonly createdBy: string;
1144
+ readonly updatedBy: string;
1145
+ readonly kind: "Image";
1146
+ readonly w: number;
1147
+ readonly h: number;
1148
+ readonly asset: string;
1149
+ readonly alt: string;
1150
+ } | {
1151
+ readonly id: string;
1152
+ readonly x: number;
1153
+ readonly y: number;
1154
+ readonly z: string;
1155
+ readonly group: string | null;
1156
+ readonly locked: boolean;
1157
+ readonly createdBy: string;
1158
+ readonly updatedBy: string;
1159
+ readonly kind: "Text";
1160
+ readonly w: number;
1161
+ readonly h: number;
1162
+ readonly text: string;
1163
+ readonly style: {
1164
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
1165
+ readonly size: "l" | "m" | "s" | "xl";
1166
+ readonly align: "center" | "end" | "start";
1167
+ readonly width: "auto" | "fixed";
1168
+ };
1169
+ } | {
1170
+ readonly id: string;
1171
+ readonly x: number;
1172
+ readonly y: number;
1173
+ readonly z: string;
1174
+ readonly group: string | null;
1175
+ readonly locked: boolean;
1176
+ readonly createdBy: string;
1177
+ readonly updatedBy: string;
1178
+ readonly kind: "Timestamp";
1179
+ readonly w: number;
1180
+ readonly h: number;
1181
+ readonly at: number;
1182
+ };
1183
+ })[];
1184
+ readonly inverse: readonly ({
1185
+ readonly op: "patch";
1186
+ readonly id: string;
1187
+ readonly fields: {
1188
+ readonly x?: number | undefined;
1189
+ readonly y?: number | undefined;
1190
+ readonly w?: number | undefined;
1191
+ readonly h?: number | undefined;
1192
+ readonly z?: string | undefined;
1193
+ readonly group?: string | null | undefined;
1194
+ readonly locked?: boolean | undefined;
1195
+ readonly text?: string | undefined;
1196
+ readonly style?: StyleJson | undefined;
1197
+ readonly from?: {
1198
+ readonly _tag: "Point";
1199
+ readonly x: number;
1200
+ readonly y: number;
1201
+ } | {
1202
+ readonly _tag: "Shape";
1203
+ readonly id: string;
1204
+ readonly at: {
1205
+ readonly x: number;
1206
+ readonly y: number;
1207
+ } | null;
1208
+ } | undefined;
1209
+ readonly to?: {
1210
+ readonly _tag: "Point";
1211
+ readonly x: number;
1212
+ readonly y: number;
1213
+ } | {
1214
+ readonly _tag: "Shape";
1215
+ readonly id: string;
1216
+ readonly at: {
1217
+ readonly x: number;
1218
+ readonly y: number;
1219
+ } | null;
1220
+ } | undefined;
1221
+ readonly points?: readonly {
1222
+ readonly x: number;
1223
+ readonly y: number;
1224
+ }[] | undefined;
1225
+ readonly asset?: string | undefined;
1226
+ readonly alt?: string | undefined;
1227
+ readonly updatedBy?: string | undefined;
1228
+ };
1229
+ } | {
1230
+ readonly op: "remove";
1231
+ readonly id: string;
1232
+ } | {
1233
+ readonly op: "set";
1234
+ readonly shape: {
1235
+ readonly id: string;
1236
+ readonly x: number;
1237
+ readonly y: number;
1238
+ readonly z: string;
1239
+ readonly group: string | null;
1240
+ readonly locked: boolean;
1241
+ readonly createdBy: string;
1242
+ readonly updatedBy: string;
1243
+ readonly kind: "Arrow";
1244
+ readonly w: number;
1245
+ readonly h: number;
1246
+ readonly from: {
1247
+ readonly _tag: "Point";
1248
+ readonly x: number;
1249
+ readonly y: number;
1250
+ } | {
1251
+ readonly _tag: "Shape";
1252
+ readonly id: string;
1253
+ readonly at: {
1254
+ readonly x: number;
1255
+ readonly y: number;
1256
+ } | null;
1257
+ };
1258
+ readonly to: {
1259
+ readonly _tag: "Point";
1260
+ readonly x: number;
1261
+ readonly y: number;
1262
+ } | {
1263
+ readonly _tag: "Shape";
1264
+ readonly id: string;
1265
+ readonly at: {
1266
+ readonly x: number;
1267
+ readonly y: number;
1268
+ } | null;
1269
+ };
1270
+ readonly style: {
1271
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
1272
+ readonly start: "arrow" | "dot" | "none" | "triangle";
1273
+ readonly end: "arrow" | "dot" | "none" | "triangle";
1274
+ readonly route: "elbow" | "straight";
1275
+ readonly dash: "dashed" | "dotted" | "solid";
1276
+ };
1277
+ } | {
1278
+ readonly id: string;
1279
+ readonly x: number;
1280
+ readonly y: number;
1281
+ readonly z: string;
1282
+ readonly group: string | null;
1283
+ readonly locked: boolean;
1284
+ readonly createdBy: string;
1285
+ readonly updatedBy: string;
1286
+ readonly kind: "Box";
1287
+ readonly w: number;
1288
+ readonly h: number;
1289
+ readonly text: string;
1290
+ readonly style: {
1291
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
1292
+ readonly form: "ellipse" | "rectangle";
1293
+ readonly size: "l" | "m" | "s" | "xl";
1294
+ readonly align: "center" | "end" | "start";
1295
+ readonly fill: boolean;
1296
+ readonly dash: "dashed" | "dotted" | "solid";
1297
+ };
1298
+ } | {
1299
+ readonly id: string;
1300
+ readonly x: number;
1301
+ readonly y: number;
1302
+ readonly z: string;
1303
+ readonly group: string | null;
1304
+ readonly locked: boolean;
1305
+ readonly createdBy: string;
1306
+ readonly updatedBy: string;
1307
+ readonly kind: "Ink";
1308
+ readonly w: number;
1309
+ readonly h: number;
1310
+ readonly points: readonly {
1311
+ readonly x: number;
1312
+ readonly y: number;
1313
+ }[];
1314
+ readonly style: {
1315
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
1316
+ readonly size: "l" | "m" | "s" | "xl";
1317
+ readonly brush: "highlighter" | "marker" | "pen";
1318
+ };
1319
+ } | {
1320
+ readonly id: string;
1321
+ readonly x: number;
1322
+ readonly y: number;
1323
+ readonly z: string;
1324
+ readonly group: string | null;
1325
+ readonly locked: boolean;
1326
+ readonly createdBy: string;
1327
+ readonly updatedBy: string;
1328
+ readonly kind: "Sticky";
1329
+ readonly w: number;
1330
+ readonly h: number;
1331
+ readonly text: string;
1332
+ readonly style: {
1333
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
1334
+ readonly size: "l" | "m" | "s" | "xl";
1335
+ readonly align: "center" | "end" | "start";
1336
+ };
1337
+ } | {
1338
+ readonly id: string;
1339
+ readonly x: number;
1340
+ readonly y: number;
1341
+ readonly z: string;
1342
+ readonly group: string | null;
1343
+ readonly locked: boolean;
1344
+ readonly createdBy: string;
1345
+ readonly updatedBy: string;
1346
+ readonly kind: "Image";
1347
+ readonly w: number;
1348
+ readonly h: number;
1349
+ readonly asset: string;
1350
+ readonly alt: string;
1351
+ } | {
1352
+ readonly id: string;
1353
+ readonly x: number;
1354
+ readonly y: number;
1355
+ readonly z: string;
1356
+ readonly group: string | null;
1357
+ readonly locked: boolean;
1358
+ readonly createdBy: string;
1359
+ readonly updatedBy: string;
1360
+ readonly kind: "Text";
1361
+ readonly w: number;
1362
+ readonly h: number;
1363
+ readonly text: string;
1364
+ readonly style: {
1365
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
1366
+ readonly size: "l" | "m" | "s" | "xl";
1367
+ readonly align: "center" | "end" | "start";
1368
+ readonly width: "auto" | "fixed";
1369
+ };
1370
+ } | {
1371
+ readonly id: string;
1372
+ readonly x: number;
1373
+ readonly y: number;
1374
+ readonly z: string;
1375
+ readonly group: string | null;
1376
+ readonly locked: boolean;
1377
+ readonly createdBy: string;
1378
+ readonly updatedBy: string;
1379
+ readonly kind: "Timestamp";
1380
+ readonly w: number;
1381
+ readonly h: number;
1382
+ readonly at: number;
1383
+ };
1384
+ })[];
1385
+ readonly shapes: readonly string[];
1386
+ readonly accepts: readonly string[];
1387
+ readonly reverts: readonly string[];
1388
+ };
1389
+ }>;
1390
+ export declare const clipboard: Guard<{
1391
+ readonly kind: "hyper-canvas";
1392
+ readonly version: 1;
1393
+ readonly shapes: readonly ({
1394
+ readonly id: string;
1395
+ readonly x: number;
1396
+ readonly y: number;
1397
+ readonly z: string;
1398
+ readonly group: string | null;
1399
+ readonly locked: boolean;
1400
+ readonly createdBy: string;
1401
+ readonly updatedBy: string;
1402
+ readonly kind: "Arrow";
1403
+ readonly w: number;
1404
+ readonly h: number;
1405
+ readonly from: {
1406
+ readonly _tag: "Point";
1407
+ readonly x: number;
1408
+ readonly y: number;
1409
+ } | {
1410
+ readonly _tag: "Shape";
1411
+ readonly id: string;
1412
+ readonly at: {
1413
+ readonly x: number;
1414
+ readonly y: number;
1415
+ } | null;
1416
+ };
1417
+ readonly to: {
1418
+ readonly _tag: "Point";
1419
+ readonly x: number;
1420
+ readonly y: number;
1421
+ } | {
1422
+ readonly _tag: "Shape";
1423
+ readonly id: string;
1424
+ readonly at: {
1425
+ readonly x: number;
1426
+ readonly y: number;
1427
+ } | null;
1428
+ };
1429
+ readonly style: {
1430
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
1431
+ readonly start: "arrow" | "dot" | "none" | "triangle";
1432
+ readonly end: "arrow" | "dot" | "none" | "triangle";
1433
+ readonly route: "elbow" | "straight";
1434
+ readonly dash: "dashed" | "dotted" | "solid";
1435
+ };
1436
+ } | {
1437
+ readonly id: string;
1438
+ readonly x: number;
1439
+ readonly y: number;
1440
+ readonly z: string;
1441
+ readonly group: string | null;
1442
+ readonly locked: boolean;
1443
+ readonly createdBy: string;
1444
+ readonly updatedBy: string;
1445
+ readonly kind: "Box";
1446
+ readonly w: number;
1447
+ readonly h: number;
1448
+ readonly text: string;
1449
+ readonly style: {
1450
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
1451
+ readonly form: "ellipse" | "rectangle";
1452
+ readonly size: "l" | "m" | "s" | "xl";
1453
+ readonly align: "center" | "end" | "start";
1454
+ readonly fill: boolean;
1455
+ readonly dash: "dashed" | "dotted" | "solid";
1456
+ };
1457
+ } | {
1458
+ readonly id: string;
1459
+ readonly x: number;
1460
+ readonly y: number;
1461
+ readonly z: string;
1462
+ readonly group: string | null;
1463
+ readonly locked: boolean;
1464
+ readonly createdBy: string;
1465
+ readonly updatedBy: string;
1466
+ readonly kind: "Ink";
1467
+ readonly w: number;
1468
+ readonly h: number;
1469
+ readonly points: readonly {
1470
+ readonly x: number;
1471
+ readonly y: number;
1472
+ }[];
1473
+ readonly style: {
1474
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
1475
+ readonly size: "l" | "m" | "s" | "xl";
1476
+ readonly brush: "highlighter" | "marker" | "pen";
1477
+ };
1478
+ } | {
1479
+ readonly id: string;
1480
+ readonly x: number;
1481
+ readonly y: number;
1482
+ readonly z: string;
1483
+ readonly group: string | null;
1484
+ readonly locked: boolean;
1485
+ readonly createdBy: string;
1486
+ readonly updatedBy: string;
1487
+ readonly kind: "Sticky";
1488
+ readonly w: number;
1489
+ readonly h: number;
1490
+ readonly text: string;
1491
+ readonly style: {
1492
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
1493
+ readonly size: "l" | "m" | "s" | "xl";
1494
+ readonly align: "center" | "end" | "start";
1495
+ };
1496
+ } | {
1497
+ readonly id: string;
1498
+ readonly x: number;
1499
+ readonly y: number;
1500
+ readonly z: string;
1501
+ readonly group: string | null;
1502
+ readonly locked: boolean;
1503
+ readonly createdBy: string;
1504
+ readonly updatedBy: string;
1505
+ readonly kind: "Image";
1506
+ readonly w: number;
1507
+ readonly h: number;
1508
+ readonly asset: string;
1509
+ readonly alt: string;
1510
+ } | {
1511
+ readonly id: string;
1512
+ readonly x: number;
1513
+ readonly y: number;
1514
+ readonly z: string;
1515
+ readonly group: string | null;
1516
+ readonly locked: boolean;
1517
+ readonly createdBy: string;
1518
+ readonly updatedBy: string;
1519
+ readonly kind: "Text";
1520
+ readonly w: number;
1521
+ readonly h: number;
1522
+ readonly text: string;
1523
+ readonly style: {
1524
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
1525
+ readonly size: "l" | "m" | "s" | "xl";
1526
+ readonly align: "center" | "end" | "start";
1527
+ readonly width: "auto" | "fixed";
1528
+ };
1529
+ } | {
1530
+ readonly id: string;
1531
+ readonly x: number;
1532
+ readonly y: number;
1533
+ readonly z: string;
1534
+ readonly group: string | null;
1535
+ readonly locked: boolean;
1536
+ readonly createdBy: string;
1537
+ readonly updatedBy: string;
1538
+ readonly kind: "Timestamp";
1539
+ readonly w: number;
1540
+ readonly h: number;
1541
+ readonly at: number;
1542
+ })[];
1543
+ }>;
1544
+ export declare const transaction: Guard<{
1545
+ readonly id: string;
1546
+ readonly commands: readonly ({
1547
+ readonly _tag: "Accept";
1548
+ readonly transaction: string;
1549
+ } | {
1550
+ readonly _tag: "Align";
1551
+ readonly ids: readonly string[];
1552
+ readonly to: "bottom" | "center" | "left" | "middle" | "right" | "top";
1553
+ } | {
1554
+ readonly _tag: "Create";
1555
+ readonly shape: {
1556
+ readonly kind: "Arrow";
1557
+ readonly from: {
1558
+ readonly _tag: "Point";
1559
+ readonly x: number;
1560
+ readonly y: number;
1561
+ } | {
1562
+ readonly _tag: "Shape";
1563
+ readonly id: string;
1564
+ readonly at: {
1565
+ readonly x: number;
1566
+ readonly y: number;
1567
+ } | null;
1568
+ };
1569
+ readonly to: {
1570
+ readonly _tag: "Point";
1571
+ readonly x: number;
1572
+ readonly y: number;
1573
+ } | {
1574
+ readonly _tag: "Shape";
1575
+ readonly id: string;
1576
+ readonly at: {
1577
+ readonly x: number;
1578
+ readonly y: number;
1579
+ } | null;
1580
+ };
1581
+ readonly id?: string | undefined;
1582
+ readonly color?: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow" | undefined;
1583
+ readonly start?: "arrow" | "dot" | "none" | "triangle" | undefined;
1584
+ readonly end?: "arrow" | "dot" | "none" | "triangle" | undefined;
1585
+ readonly route?: "elbow" | "straight" | undefined;
1586
+ readonly dash?: "dashed" | "dotted" | "solid" | undefined;
1587
+ } | {
1588
+ readonly kind: "Box";
1589
+ readonly id?: string | undefined;
1590
+ readonly text?: string | undefined;
1591
+ readonly form?: "ellipse" | "rectangle" | undefined;
1592
+ readonly color?: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow" | undefined;
1593
+ readonly size?: "l" | "m" | "s" | "xl" | undefined;
1594
+ readonly align?: "center" | "end" | "start" | undefined;
1595
+ readonly fill?: boolean | undefined;
1596
+ readonly dash?: "dashed" | "dotted" | "solid" | undefined;
1597
+ readonly w?: number | undefined;
1598
+ readonly h?: number | undefined;
1599
+ } | {
1600
+ readonly kind: "Image";
1601
+ readonly asset: string;
1602
+ readonly w: number;
1603
+ readonly h: number;
1604
+ readonly id?: string | undefined;
1605
+ readonly alt?: string | undefined;
1606
+ } | {
1607
+ readonly kind: "Ink";
1608
+ readonly points: readonly {
1609
+ readonly x: number;
1610
+ readonly y: number;
1611
+ }[];
1612
+ readonly id?: string | undefined;
1613
+ readonly color?: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow" | undefined;
1614
+ readonly size?: "l" | "m" | "s" | "xl" | undefined;
1615
+ readonly brush?: "highlighter" | "marker" | "pen" | undefined;
1616
+ } | {
1617
+ readonly kind: "Sticky";
1618
+ readonly id?: string | undefined;
1619
+ readonly text?: string | undefined;
1620
+ readonly color?: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow" | undefined;
1621
+ readonly size?: "l" | "m" | "s" | "xl" | undefined;
1622
+ readonly align?: "center" | "end" | "start" | undefined;
1623
+ readonly w?: number | undefined;
1624
+ readonly h?: number | undefined;
1625
+ } | {
1626
+ readonly kind: "Text";
1627
+ readonly text: string;
1628
+ readonly id?: string | undefined;
1629
+ readonly color?: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow" | undefined;
1630
+ readonly size?: "l" | "m" | "s" | "xl" | undefined;
1631
+ readonly align?: "center" | "end" | "start" | undefined;
1632
+ readonly w?: number | undefined;
1633
+ } | {
1634
+ readonly kind: "Timestamp";
1635
+ readonly at: number;
1636
+ readonly id?: string | undefined;
1637
+ readonly w?: number | undefined;
1638
+ readonly h?: number | undefined;
1639
+ };
1640
+ readonly place?: {
1641
+ readonly _tag: "At";
1642
+ readonly x: number;
1643
+ readonly y: number;
1644
+ } | {
1645
+ readonly _tag: "Beside";
1646
+ readonly shape: string;
1647
+ readonly side: "bottom" | "left" | "right" | "top";
1648
+ readonly gap?: number | undefined;
1649
+ } | undefined;
1650
+ } | {
1651
+ readonly _tag: "Delete";
1652
+ readonly ids: readonly string[];
1653
+ } | {
1654
+ readonly _tag: "Distribute";
1655
+ readonly ids: readonly string[];
1656
+ readonly axis: "horizontal" | "vertical";
1657
+ } | {
1658
+ readonly _tag: "Duplicate";
1659
+ readonly ids: readonly string[];
1660
+ readonly dx?: number | undefined;
1661
+ readonly dy?: number | undefined;
1662
+ readonly as?: readonly string[] | undefined;
1663
+ } | {
1664
+ readonly _tag: "Group";
1665
+ readonly ids: readonly string[];
1666
+ readonly group?: string | undefined;
1667
+ } | {
1668
+ readonly _tag: "Lock";
1669
+ readonly ids: readonly string[];
1670
+ readonly locked: boolean;
1671
+ } | {
1672
+ readonly _tag: "Move";
1673
+ readonly ids: readonly string[];
1674
+ readonly place: {
1675
+ readonly _tag: "At";
1676
+ readonly x: number;
1677
+ readonly y: number;
1678
+ } | {
1679
+ readonly _tag: "Beside";
1680
+ readonly shape: string;
1681
+ readonly side: "bottom" | "left" | "right" | "top";
1682
+ readonly gap?: number | undefined;
1683
+ };
1684
+ } | {
1685
+ readonly _tag: "Paste";
1686
+ readonly clipboard: {
1687
+ readonly kind: "hyper-canvas";
1688
+ readonly version: 1;
1689
+ readonly shapes: readonly ({
1690
+ readonly id: string;
1691
+ readonly x: number;
1692
+ readonly y: number;
1693
+ readonly z: string;
1694
+ readonly group: string | null;
1695
+ readonly locked: boolean;
1696
+ readonly createdBy: string;
1697
+ readonly updatedBy: string;
1698
+ readonly kind: "Arrow";
1699
+ readonly w: number;
1700
+ readonly h: number;
1701
+ readonly from: {
1702
+ readonly _tag: "Point";
1703
+ readonly x: number;
1704
+ readonly y: number;
1705
+ } | {
1706
+ readonly _tag: "Shape";
1707
+ readonly id: string;
1708
+ readonly at: {
1709
+ readonly x: number;
1710
+ readonly y: number;
1711
+ } | null;
1712
+ };
1713
+ readonly to: {
1714
+ readonly _tag: "Point";
1715
+ readonly x: number;
1716
+ readonly y: number;
1717
+ } | {
1718
+ readonly _tag: "Shape";
1719
+ readonly id: string;
1720
+ readonly at: {
1721
+ readonly x: number;
1722
+ readonly y: number;
1723
+ } | null;
1724
+ };
1725
+ readonly style: {
1726
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
1727
+ readonly start: "arrow" | "dot" | "none" | "triangle";
1728
+ readonly end: "arrow" | "dot" | "none" | "triangle";
1729
+ readonly route: "elbow" | "straight";
1730
+ readonly dash: "dashed" | "dotted" | "solid";
1731
+ };
1732
+ } | {
1733
+ readonly id: string;
1734
+ readonly x: number;
1735
+ readonly y: number;
1736
+ readonly z: string;
1737
+ readonly group: string | null;
1738
+ readonly locked: boolean;
1739
+ readonly createdBy: string;
1740
+ readonly updatedBy: string;
1741
+ readonly kind: "Box";
1742
+ readonly w: number;
1743
+ readonly h: number;
1744
+ readonly text: string;
1745
+ readonly style: {
1746
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
1747
+ readonly form: "ellipse" | "rectangle";
1748
+ readonly size: "l" | "m" | "s" | "xl";
1749
+ readonly align: "center" | "end" | "start";
1750
+ readonly fill: boolean;
1751
+ readonly dash: "dashed" | "dotted" | "solid";
1752
+ };
1753
+ } | {
1754
+ readonly id: string;
1755
+ readonly x: number;
1756
+ readonly y: number;
1757
+ readonly z: string;
1758
+ readonly group: string | null;
1759
+ readonly locked: boolean;
1760
+ readonly createdBy: string;
1761
+ readonly updatedBy: string;
1762
+ readonly kind: "Ink";
1763
+ readonly w: number;
1764
+ readonly h: number;
1765
+ readonly points: readonly {
1766
+ readonly x: number;
1767
+ readonly y: number;
1768
+ }[];
1769
+ readonly style: {
1770
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
1771
+ readonly size: "l" | "m" | "s" | "xl";
1772
+ readonly brush: "highlighter" | "marker" | "pen";
1773
+ };
1774
+ } | {
1775
+ readonly id: string;
1776
+ readonly x: number;
1777
+ readonly y: number;
1778
+ readonly z: string;
1779
+ readonly group: string | null;
1780
+ readonly locked: boolean;
1781
+ readonly createdBy: string;
1782
+ readonly updatedBy: string;
1783
+ readonly kind: "Sticky";
1784
+ readonly w: number;
1785
+ readonly h: number;
1786
+ readonly text: string;
1787
+ readonly style: {
1788
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
1789
+ readonly size: "l" | "m" | "s" | "xl";
1790
+ readonly align: "center" | "end" | "start";
1791
+ };
1792
+ } | {
1793
+ readonly id: string;
1794
+ readonly x: number;
1795
+ readonly y: number;
1796
+ readonly z: string;
1797
+ readonly group: string | null;
1798
+ readonly locked: boolean;
1799
+ readonly createdBy: string;
1800
+ readonly updatedBy: string;
1801
+ readonly kind: "Image";
1802
+ readonly w: number;
1803
+ readonly h: number;
1804
+ readonly asset: string;
1805
+ readonly alt: string;
1806
+ } | {
1807
+ readonly id: string;
1808
+ readonly x: number;
1809
+ readonly y: number;
1810
+ readonly z: string;
1811
+ readonly group: string | null;
1812
+ readonly locked: boolean;
1813
+ readonly createdBy: string;
1814
+ readonly updatedBy: string;
1815
+ readonly kind: "Text";
1816
+ readonly w: number;
1817
+ readonly h: number;
1818
+ readonly text: string;
1819
+ readonly style: {
1820
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
1821
+ readonly size: "l" | "m" | "s" | "xl";
1822
+ readonly align: "center" | "end" | "start";
1823
+ readonly width: "auto" | "fixed";
1824
+ };
1825
+ } | {
1826
+ readonly id: string;
1827
+ readonly x: number;
1828
+ readonly y: number;
1829
+ readonly z: string;
1830
+ readonly group: string | null;
1831
+ readonly locked: boolean;
1832
+ readonly createdBy: string;
1833
+ readonly updatedBy: string;
1834
+ readonly kind: "Timestamp";
1835
+ readonly w: number;
1836
+ readonly h: number;
1837
+ readonly at: number;
1838
+ })[];
1839
+ };
1840
+ readonly place?: {
1841
+ readonly _tag: "At";
1842
+ readonly x: number;
1843
+ readonly y: number;
1844
+ } | {
1845
+ readonly _tag: "Beside";
1846
+ readonly shape: string;
1847
+ readonly side: "bottom" | "left" | "right" | "top";
1848
+ readonly gap?: number | undefined;
1849
+ } | undefined;
1850
+ readonly as?: readonly string[] | undefined;
1851
+ } | {
1852
+ readonly _tag: "Reorder";
1853
+ readonly ids: readonly string[];
1854
+ readonly to: "back" | "backward" | "forward" | "front";
1855
+ } | {
1856
+ readonly _tag: "Resize";
1857
+ readonly ids: readonly string[];
1858
+ readonly box: {
1859
+ readonly x: number;
1860
+ readonly y: number;
1861
+ readonly w: number;
1862
+ readonly h: number;
1863
+ };
1864
+ } | {
1865
+ readonly _tag: "Revert";
1866
+ readonly transaction: string;
1867
+ } | {
1868
+ readonly _tag: "Ungroup";
1869
+ readonly ids: readonly string[];
1870
+ } | {
1871
+ readonly _tag: "Update";
1872
+ readonly id: string;
1873
+ readonly patch: {
1874
+ readonly x?: number | undefined;
1875
+ readonly y?: number | undefined;
1876
+ readonly w?: number | undefined;
1877
+ readonly h?: number | undefined;
1878
+ readonly text?: string | undefined;
1879
+ readonly color?: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow" | undefined;
1880
+ readonly size?: "l" | "m" | "s" | "xl" | undefined;
1881
+ readonly align?: "center" | "end" | "start" | undefined;
1882
+ readonly form?: "ellipse" | "rectangle" | undefined;
1883
+ readonly fill?: boolean | undefined;
1884
+ readonly dash?: "dashed" | "dotted" | "solid" | undefined;
1885
+ readonly brush?: "highlighter" | "marker" | "pen" | undefined;
1886
+ readonly start?: "arrow" | "dot" | "none" | "triangle" | undefined;
1887
+ readonly end?: "arrow" | "dot" | "none" | "triangle" | undefined;
1888
+ readonly route?: "elbow" | "straight" | undefined;
1889
+ readonly from?: {
1890
+ readonly _tag: "Point";
1891
+ readonly x: number;
1892
+ readonly y: number;
1893
+ } | {
1894
+ readonly _tag: "Shape";
1895
+ readonly id: string;
1896
+ readonly at: {
1897
+ readonly x: number;
1898
+ readonly y: number;
1899
+ } | null;
1900
+ } | undefined;
1901
+ readonly to?: {
1902
+ readonly _tag: "Point";
1903
+ readonly x: number;
1904
+ readonly y: number;
1905
+ } | {
1906
+ readonly _tag: "Shape";
1907
+ readonly id: string;
1908
+ readonly at: {
1909
+ readonly x: number;
1910
+ readonly y: number;
1911
+ } | null;
1912
+ } | undefined;
1913
+ readonly asset?: string | undefined;
1914
+ readonly alt?: string | undefined;
1915
+ };
1916
+ })[];
1917
+ readonly mode: "commit" | "propose";
1918
+ readonly reason?: string | undefined;
1919
+ readonly via?: string | undefined;
1920
+ }>;
1921
+ export declare const presence: Guard<readonly {
1922
+ readonly actor: string;
1923
+ readonly connection: string;
1924
+ readonly name: string;
1925
+ readonly kind: "agent" | "person";
1926
+ readonly cursor: {
1927
+ readonly point: {
1928
+ readonly x: number;
1929
+ readonly y: number;
1930
+ };
1931
+ readonly arriveInMs: number;
1932
+ } | null;
1933
+ readonly selection: readonly string[];
1934
+ readonly viewport: {
1935
+ readonly x: number;
1936
+ readonly y: number;
1937
+ readonly w: number;
1938
+ readonly h: number;
1939
+ };
1940
+ readonly following: string | null;
1941
+ readonly activity: {
1942
+ readonly _tag: "Connecting";
1943
+ readonly arrow: string | null;
1944
+ readonly from: {
1945
+ readonly _tag: "Point";
1946
+ readonly x: number;
1947
+ readonly y: number;
1948
+ } | {
1949
+ readonly _tag: "Shape";
1950
+ readonly id: string;
1951
+ readonly at: {
1952
+ readonly x: number;
1953
+ readonly y: number;
1954
+ } | null;
1955
+ };
1956
+ readonly to: {
1957
+ readonly _tag: "Point";
1958
+ readonly x: number;
1959
+ readonly y: number;
1960
+ } | {
1961
+ readonly _tag: "Shape";
1962
+ readonly id: string;
1963
+ readonly at: {
1964
+ readonly x: number;
1965
+ readonly y: number;
1966
+ } | null;
1967
+ };
1968
+ } | {
1969
+ readonly _tag: "Creating";
1970
+ readonly draft: "ellipse" | "rectangle" | "sticky" | "text";
1971
+ readonly box: {
1972
+ readonly x: number;
1973
+ readonly y: number;
1974
+ readonly w: number;
1975
+ readonly h: number;
1976
+ };
1977
+ readonly id: string | null;
1978
+ } | {
1979
+ readonly _tag: "Erasing";
1980
+ readonly ids: readonly string[];
1981
+ } | {
1982
+ readonly _tag: "Gesture";
1983
+ readonly shapes: readonly {
1984
+ readonly id: string;
1985
+ readonly x: number;
1986
+ readonly y: number;
1987
+ }[];
1988
+ readonly transaction: string;
1989
+ } | {
1990
+ readonly _tag: "Idle";
1991
+ } | {
1992
+ readonly _tag: "Inking";
1993
+ readonly points: readonly {
1994
+ readonly x: number;
1995
+ readonly y: number;
1996
+ }[];
1997
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
1998
+ readonly size: "l" | "m" | "s" | "xl";
1999
+ readonly brush: "highlighter" | "marker" | "pen";
2000
+ readonly id: string | null;
2001
+ } | {
2002
+ readonly _tag: "Resizing";
2003
+ readonly ids: readonly string[];
2004
+ readonly box: {
2005
+ readonly x: number;
2006
+ readonly y: number;
2007
+ readonly w: number;
2008
+ readonly h: number;
2009
+ };
2010
+ readonly transaction: string;
2011
+ } | {
2012
+ readonly _tag: "Selecting";
2013
+ readonly box: {
2014
+ readonly x: number;
2015
+ readonly y: number;
2016
+ readonly w: number;
2017
+ readonly h: number;
2018
+ };
2019
+ } | {
2020
+ readonly _tag: "Thinking";
2021
+ readonly label: string;
2022
+ } | {
2023
+ readonly _tag: "Typing";
2024
+ readonly id: string;
2025
+ } | {
2026
+ readonly _tag: "Working";
2027
+ readonly label: string;
2028
+ };
2029
+ readonly claims: readonly string[];
2030
+ readonly uploads: readonly {
2031
+ readonly id: string;
2032
+ readonly box: {
2033
+ readonly x: number;
2034
+ readonly y: number;
2035
+ readonly w: number;
2036
+ readonly h: number;
2037
+ };
2038
+ readonly name: string | null;
2039
+ }[];
2040
+ readonly chat: string | null;
2041
+ }[]>;
2042
+ export declare const viewport: Guard<{
2043
+ readonly x: number;
2044
+ readonly y: number;
2045
+ readonly w: number;
2046
+ readonly h: number;
2047
+ readonly zoom: number;
2048
+ readonly viewer: string | null;
2049
+ }>;
2050
+ export declare const probe: Guard<{
2051
+ readonly point: {
2052
+ readonly x: number;
2053
+ readonly y: number;
2054
+ };
2055
+ readonly zoom: number;
2056
+ readonly selection: readonly string[];
2057
+ readonly pointer: "mouse" | "pen" | "touch";
2058
+ }>;
2059
+ export declare const scene: Guard<{
2060
+ readonly box: {
2061
+ readonly x: number;
2062
+ readonly y: number;
2063
+ readonly w: number;
2064
+ readonly h: number;
2065
+ };
2066
+ readonly zoom: number;
2067
+ readonly items: readonly ({
2068
+ readonly _tag: "Bounds";
2069
+ readonly key: string;
2070
+ readonly rev: string;
2071
+ readonly box: {
2072
+ readonly x: number;
2073
+ readonly y: number;
2074
+ readonly w: number;
2075
+ readonly h: number;
2076
+ };
2077
+ } | {
2078
+ readonly _tag: "Cursor";
2079
+ readonly key: string;
2080
+ readonly rev: string;
2081
+ readonly actor: string;
2082
+ readonly kind: "agent" | "person";
2083
+ readonly point: {
2084
+ readonly x: number;
2085
+ readonly y: number;
2086
+ };
2087
+ readonly label: string;
2088
+ readonly arriveInMs: number;
2089
+ readonly chat: string | null;
2090
+ } | {
2091
+ readonly _tag: "Draft";
2092
+ readonly key: string;
2093
+ readonly rev: string;
2094
+ readonly actor: string;
2095
+ readonly kind: "agent" | "person";
2096
+ readonly draft: "ellipse" | "rectangle" | "sticky" | "text";
2097
+ readonly box: {
2098
+ readonly x: number;
2099
+ readonly y: number;
2100
+ readonly w: number;
2101
+ readonly h: number;
2102
+ };
2103
+ } | {
2104
+ readonly _tag: "Ellipse";
2105
+ readonly key: string;
2106
+ readonly rev: string;
2107
+ readonly id: string;
2108
+ readonly box: {
2109
+ readonly x: number;
2110
+ readonly y: number;
2111
+ readonly w: number;
2112
+ readonly h: number;
2113
+ };
2114
+ readonly fill: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow" | null;
2115
+ readonly tone: "light" | "note";
2116
+ readonly stroke: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow" | null;
2117
+ readonly dash: "dashed" | "dotted" | "solid";
2118
+ readonly ghost: {
2119
+ readonly _tag: "Erasing";
2120
+ readonly actor: string;
2121
+ } | {
2122
+ readonly _tag: "Proposal";
2123
+ readonly transaction: string;
2124
+ readonly change: "add" | "change" | "remove";
2125
+ } | null;
2126
+ } | {
2127
+ readonly _tag: "EraserTrail";
2128
+ readonly key: string;
2129
+ readonly rev: string;
2130
+ readonly d: string;
2131
+ } | {
2132
+ readonly _tag: "Guide";
2133
+ readonly key: string;
2134
+ readonly rev: string;
2135
+ readonly actor: string;
2136
+ readonly kind: "agent" | "person";
2137
+ readonly d: string;
2138
+ readonly start: "arrow" | "dot" | "none" | "triangle";
2139
+ readonly end: "arrow" | "dot" | "none" | "triangle";
2140
+ } | {
2141
+ readonly _tag: "Handle";
2142
+ readonly key: string;
2143
+ readonly rev: string;
2144
+ readonly handle: "e" | "from" | "n" | "ne" | "nw" | "s" | "se" | "sw" | "to" | "w";
2145
+ readonly box: {
2146
+ readonly x: number;
2147
+ readonly y: number;
2148
+ readonly w: number;
2149
+ readonly h: number;
2150
+ };
2151
+ } | {
2152
+ readonly _tag: "Hover";
2153
+ readonly key: string;
2154
+ readonly rev: string;
2155
+ readonly id: string;
2156
+ readonly d: string;
2157
+ } | {
2158
+ readonly _tag: "Image";
2159
+ readonly key: string;
2160
+ readonly rev: string;
2161
+ readonly id: string;
2162
+ readonly box: {
2163
+ readonly x: number;
2164
+ readonly y: number;
2165
+ readonly w: number;
2166
+ readonly h: number;
2167
+ };
2168
+ readonly asset: string;
2169
+ readonly alt: string;
2170
+ readonly ghost: {
2171
+ readonly _tag: "Erasing";
2172
+ readonly actor: string;
2173
+ } | {
2174
+ readonly _tag: "Proposal";
2175
+ readonly transaction: string;
2176
+ readonly change: "add" | "change" | "remove";
2177
+ } | null;
2178
+ } | {
2179
+ readonly _tag: "InkPreview";
2180
+ readonly key: string;
2181
+ readonly rev: string;
2182
+ readonly actor: string;
2183
+ readonly d: string;
2184
+ readonly stroke: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
2185
+ readonly width: number;
2186
+ readonly opacity: number;
2187
+ } | {
2188
+ readonly _tag: "Marquee";
2189
+ readonly key: string;
2190
+ readonly rev: string;
2191
+ readonly actor: string;
2192
+ readonly kind: "agent" | "person";
2193
+ readonly mine: boolean;
2194
+ readonly box: {
2195
+ readonly x: number;
2196
+ readonly y: number;
2197
+ readonly w: number;
2198
+ readonly h: number;
2199
+ };
2200
+ } | {
2201
+ readonly _tag: "Path";
2202
+ readonly key: string;
2203
+ readonly rev: string;
2204
+ readonly id: string;
2205
+ readonly d: string;
2206
+ readonly stroke: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
2207
+ readonly width: number;
2208
+ readonly dash: "dashed" | "dotted" | "solid";
2209
+ readonly opacity: number;
2210
+ readonly start: "arrow" | "dot" | "none" | "triangle";
2211
+ readonly end: "arrow" | "dot" | "none" | "triangle";
2212
+ readonly ghost: {
2213
+ readonly _tag: "Erasing";
2214
+ readonly actor: string;
2215
+ } | {
2216
+ readonly _tag: "Proposal";
2217
+ readonly transaction: string;
2218
+ readonly change: "add" | "change" | "remove";
2219
+ } | null;
2220
+ } | {
2221
+ readonly _tag: "Rect";
2222
+ readonly key: string;
2223
+ readonly rev: string;
2224
+ readonly id: string;
2225
+ readonly box: {
2226
+ readonly x: number;
2227
+ readonly y: number;
2228
+ readonly w: number;
2229
+ readonly h: number;
2230
+ };
2231
+ readonly fill: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow" | null;
2232
+ readonly tone: "light" | "note";
2233
+ readonly stroke: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow" | null;
2234
+ readonly dash: "dashed" | "dotted" | "solid";
2235
+ readonly radius: number;
2236
+ readonly shadow: boolean;
2237
+ readonly ghost: {
2238
+ readonly _tag: "Erasing";
2239
+ readonly actor: string;
2240
+ } | {
2241
+ readonly _tag: "Proposal";
2242
+ readonly transaction: string;
2243
+ readonly change: "add" | "change" | "remove";
2244
+ } | null;
2245
+ } | {
2246
+ readonly _tag: "Selection";
2247
+ readonly key: string;
2248
+ readonly rev: string;
2249
+ readonly actor: string;
2250
+ readonly kind: "agent" | "person";
2251
+ readonly mine: boolean;
2252
+ readonly id: string;
2253
+ readonly box: {
2254
+ readonly x: number;
2255
+ readonly y: number;
2256
+ readonly w: number;
2257
+ readonly h: number;
2258
+ };
2259
+ } | {
2260
+ readonly _tag: "SnapGuide";
2261
+ readonly key: string;
2262
+ readonly rev: string;
2263
+ readonly guide: "center" | "edge" | "grid" | "spacing";
2264
+ readonly from: {
2265
+ readonly x: number;
2266
+ readonly y: number;
2267
+ };
2268
+ readonly to: {
2269
+ readonly x: number;
2270
+ readonly y: number;
2271
+ };
2272
+ } | {
2273
+ readonly _tag: "Upload";
2274
+ readonly key: string;
2275
+ readonly rev: string;
2276
+ readonly actor: string;
2277
+ readonly kind: "agent" | "person";
2278
+ readonly mine: boolean;
2279
+ readonly id: string;
2280
+ readonly box: {
2281
+ readonly x: number;
2282
+ readonly y: number;
2283
+ readonly w: number;
2284
+ readonly h: number;
2285
+ };
2286
+ readonly name: string | null;
2287
+ } | {
2288
+ readonly _tag: "TextEditor";
2289
+ readonly key: string;
2290
+ readonly rev: string;
2291
+ readonly id: string;
2292
+ readonly box: {
2293
+ readonly x: number;
2294
+ readonly y: number;
2295
+ readonly w: number;
2296
+ readonly h: number;
2297
+ };
2298
+ readonly font: {
2299
+ readonly families: readonly string[];
2300
+ readonly weight: number;
2301
+ readonly size: number;
2302
+ readonly lineHeight: number;
2303
+ };
2304
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
2305
+ readonly align: "center" | "end" | "start";
2306
+ } | {
2307
+ readonly _tag: "TextLines";
2308
+ readonly key: string;
2309
+ readonly rev: string;
2310
+ readonly id: string;
2311
+ readonly box: {
2312
+ readonly x: number;
2313
+ readonly y: number;
2314
+ readonly w: number;
2315
+ readonly h: number;
2316
+ };
2317
+ readonly lines: readonly {
2318
+ readonly text: string;
2319
+ readonly x: number;
2320
+ readonly y: number;
2321
+ readonly width: number;
2322
+ }[];
2323
+ readonly font: {
2324
+ readonly families: readonly string[];
2325
+ readonly weight: number;
2326
+ readonly size: number;
2327
+ readonly lineHeight: number;
2328
+ };
2329
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
2330
+ readonly align: "center" | "end" | "start";
2331
+ readonly ghost: {
2332
+ readonly _tag: "Erasing";
2333
+ readonly actor: string;
2334
+ } | {
2335
+ readonly _tag: "Proposal";
2336
+ readonly transaction: string;
2337
+ readonly change: "add" | "change" | "remove";
2338
+ } | null;
2339
+ } | {
2340
+ readonly _tag: "Timestamp";
2341
+ readonly key: string;
2342
+ readonly rev: string;
2343
+ readonly id: string;
2344
+ readonly box: {
2345
+ readonly x: number;
2346
+ readonly y: number;
2347
+ readonly w: number;
2348
+ readonly h: number;
2349
+ };
2350
+ readonly at: number;
2351
+ readonly ghost: {
2352
+ readonly _tag: "Erasing";
2353
+ readonly actor: string;
2354
+ } | {
2355
+ readonly _tag: "Proposal";
2356
+ readonly transaction: string;
2357
+ readonly change: "add" | "change" | "remove";
2358
+ } | null;
2359
+ })[];
2360
+ }>;
2361
+ export declare const assets: Guard<Readonly<Record<string, string>>>;
2362
+ export declare const palette: Guard<{
2363
+ readonly background: string;
2364
+ readonly noteInk: string;
2365
+ readonly colors: {
2366
+ readonly ink: {
2367
+ readonly strong: string;
2368
+ readonly light: string;
2369
+ readonly note: string;
2370
+ };
2371
+ readonly gray: {
2372
+ readonly strong: string;
2373
+ readonly light: string;
2374
+ readonly note: string;
2375
+ };
2376
+ readonly yellow: {
2377
+ readonly strong: string;
2378
+ readonly light: string;
2379
+ readonly note: string;
2380
+ };
2381
+ readonly orange: {
2382
+ readonly strong: string;
2383
+ readonly light: string;
2384
+ readonly note: string;
2385
+ };
2386
+ readonly red: {
2387
+ readonly strong: string;
2388
+ readonly light: string;
2389
+ readonly note: string;
2390
+ };
2391
+ readonly pink: {
2392
+ readonly strong: string;
2393
+ readonly light: string;
2394
+ readonly note: string;
2395
+ };
2396
+ readonly violet: {
2397
+ readonly strong: string;
2398
+ readonly light: string;
2399
+ readonly note: string;
2400
+ };
2401
+ readonly blue: {
2402
+ readonly strong: string;
2403
+ readonly light: string;
2404
+ readonly note: string;
2405
+ };
2406
+ readonly teal: {
2407
+ readonly strong: string;
2408
+ readonly light: string;
2409
+ readonly note: string;
2410
+ };
2411
+ readonly green: {
2412
+ readonly strong: string;
2413
+ readonly light: string;
2414
+ readonly note: string;
2415
+ };
2416
+ };
2417
+ readonly selection: string;
2418
+ readonly person: string;
2419
+ readonly agent: string;
2420
+ readonly snap: string;
2421
+ }>;
2422
+ export declare const fonts: Guard<{
2423
+ readonly faces: readonly {
2424
+ readonly family: string;
2425
+ readonly weight: number;
2426
+ readonly unitsPerEm: number;
2427
+ readonly ascender: number;
2428
+ readonly descender: number;
2429
+ readonly sizes: readonly {
2430
+ readonly size: number;
2431
+ readonly missing: number;
2432
+ readonly ranges: readonly {
2433
+ readonly start: number;
2434
+ readonly advances: readonly number[];
2435
+ }[];
2436
+ }[];
2437
+ }[];
2438
+ }>;
2439
+ export declare const session: Guard<string>;
2440
+ export declare const editorState: Guard<{
2441
+ readonly session: string;
2442
+ readonly seq: number;
2443
+ readonly tool: "arrow" | "comment" | "ellipse" | "eraser" | "hand" | "pen" | "rectangle" | "select" | "sticky" | "text" | "timestamp";
2444
+ readonly spaceTool: "arrow" | "comment" | "ellipse" | "eraser" | "hand" | "pen" | "rectangle" | "select" | "sticky" | "text" | "timestamp" | null;
2445
+ readonly style: {
2446
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow" | null;
2447
+ readonly size: "l" | "m" | "s" | "xl" | null;
2448
+ readonly align: "center" | "end" | "start" | null;
2449
+ readonly fill: boolean | null;
2450
+ readonly dash: "dashed" | "dotted" | "solid" | null;
2451
+ readonly brush: "highlighter" | "marker" | "pen" | null;
2452
+ readonly start: "arrow" | "dot" | "none" | "triangle" | null;
2453
+ readonly end: "arrow" | "dot" | "none" | "triangle" | null;
2454
+ readonly route: "elbow" | "straight" | null;
2455
+ };
2456
+ readonly grid: number | null;
2457
+ readonly readOnly: boolean;
2458
+ readonly selection: readonly string[];
2459
+ readonly view: {
2460
+ readonly x: number;
2461
+ readonly y: number;
2462
+ readonly w: number;
2463
+ readonly h: number;
2464
+ readonly zoom: number;
2465
+ readonly viewer: string | null;
2466
+ };
2467
+ readonly inset: {
2468
+ readonly top: number;
2469
+ readonly right: number;
2470
+ readonly bottom: number;
2471
+ readonly left: number;
2472
+ };
2473
+ readonly following: string | null;
2474
+ readonly pointer: {
2475
+ readonly x: number;
2476
+ readonly y: number;
2477
+ } | null;
2478
+ readonly pointerKind: "mouse" | "pen" | "touch";
2479
+ readonly modifiers: {
2480
+ readonly shift: boolean;
2481
+ readonly alt: boolean;
2482
+ readonly meta: boolean;
2483
+ };
2484
+ readonly hover: {
2485
+ readonly _tag: "End";
2486
+ readonly id: string;
2487
+ readonly end: "from" | "to";
2488
+ } | {
2489
+ readonly _tag: "Handle";
2490
+ readonly handle: "e" | "n" | "ne" | "nw" | "s" | "se" | "sw" | "w";
2491
+ } | {
2492
+ readonly _tag: "Nothing";
2493
+ } | {
2494
+ readonly _tag: "Shape";
2495
+ readonly id: string;
2496
+ };
2497
+ readonly undo: readonly {
2498
+ readonly transaction: string;
2499
+ readonly restores: string | null;
2500
+ }[];
2501
+ readonly redo: readonly {
2502
+ readonly transaction: string;
2503
+ readonly restores: string | null;
2504
+ }[];
2505
+ readonly mode: {
2506
+ readonly _tag: "Connecting";
2507
+ readonly origin: {
2508
+ readonly x: number;
2509
+ readonly y: number;
2510
+ };
2511
+ readonly arrow: string | null;
2512
+ readonly from: {
2513
+ readonly _tag: "Point";
2514
+ readonly x: number;
2515
+ readonly y: number;
2516
+ } | {
2517
+ readonly _tag: "Shape";
2518
+ readonly id: string;
2519
+ readonly at: {
2520
+ readonly x: number;
2521
+ readonly y: number;
2522
+ } | null;
2523
+ };
2524
+ readonly to: {
2525
+ readonly _tag: "Point";
2526
+ readonly x: number;
2527
+ readonly y: number;
2528
+ } | {
2529
+ readonly _tag: "Shape";
2530
+ readonly id: string;
2531
+ readonly at: {
2532
+ readonly x: number;
2533
+ readonly y: number;
2534
+ } | null;
2535
+ };
2536
+ readonly moving: "from" | "to";
2537
+ } | {
2538
+ readonly _tag: "Creating";
2539
+ readonly draft: "ellipse" | "rectangle" | "sticky" | "text";
2540
+ readonly origin: {
2541
+ readonly x: number;
2542
+ readonly y: number;
2543
+ };
2544
+ readonly box: {
2545
+ readonly x: number;
2546
+ readonly y: number;
2547
+ readonly w: number;
2548
+ readonly h: number;
2549
+ };
2550
+ readonly dragged: boolean;
2551
+ readonly guides: readonly {
2552
+ readonly guide: "center" | "edge" | "grid" | "spacing";
2553
+ readonly from: {
2554
+ readonly x: number;
2555
+ readonly y: number;
2556
+ };
2557
+ readonly to: {
2558
+ readonly x: number;
2559
+ readonly y: number;
2560
+ };
2561
+ }[];
2562
+ } | {
2563
+ readonly _tag: "Dragging";
2564
+ readonly origin: {
2565
+ readonly x: number;
2566
+ readonly y: number;
2567
+ };
2568
+ readonly ids: readonly string[];
2569
+ readonly dx: number;
2570
+ readonly dy: number;
2571
+ readonly copy: boolean;
2572
+ readonly guides: readonly {
2573
+ readonly guide: "center" | "edge" | "grid" | "spacing";
2574
+ readonly from: {
2575
+ readonly x: number;
2576
+ readonly y: number;
2577
+ };
2578
+ readonly to: {
2579
+ readonly x: number;
2580
+ readonly y: number;
2581
+ };
2582
+ }[];
2583
+ readonly transaction: string;
2584
+ } | {
2585
+ readonly _tag: "EditingText";
2586
+ readonly id: string;
2587
+ readonly draft: string;
2588
+ readonly original: string;
2589
+ readonly created: string | null;
2590
+ } | {
2591
+ readonly _tag: "Erasing";
2592
+ readonly ids: readonly string[];
2593
+ readonly trail: readonly {
2594
+ readonly x: number;
2595
+ readonly y: number;
2596
+ }[];
2597
+ } | {
2598
+ readonly _tag: "Idle";
2599
+ } | {
2600
+ readonly _tag: "Inking";
2601
+ readonly points: readonly {
2602
+ readonly x: number;
2603
+ readonly y: number;
2604
+ }[];
2605
+ } | {
2606
+ readonly _tag: "Marquee";
2607
+ readonly origin: {
2608
+ readonly x: number;
2609
+ readonly y: number;
2610
+ };
2611
+ readonly point: {
2612
+ readonly x: number;
2613
+ readonly y: number;
2614
+ };
2615
+ readonly base: readonly string[];
2616
+ } | {
2617
+ readonly _tag: "Panning";
2618
+ readonly origin: {
2619
+ readonly x: number;
2620
+ readonly y: number;
2621
+ };
2622
+ readonly start: {
2623
+ readonly x: number;
2624
+ readonly y: number;
2625
+ readonly w: number;
2626
+ readonly h: number;
2627
+ readonly zoom: number;
2628
+ readonly viewer: string | null;
2629
+ };
2630
+ } | {
2631
+ readonly _tag: "Placing";
2632
+ readonly tool: "comment" | "timestamp";
2633
+ readonly origin: {
2634
+ readonly x: number;
2635
+ readonly y: number;
2636
+ };
2637
+ } | {
2638
+ readonly _tag: "Pressing";
2639
+ readonly origin: {
2640
+ readonly x: number;
2641
+ readonly y: number;
2642
+ };
2643
+ readonly target: {
2644
+ readonly _tag: "End";
2645
+ readonly id: string;
2646
+ readonly end: "from" | "to";
2647
+ } | {
2648
+ readonly _tag: "Handle";
2649
+ readonly handle: "e" | "n" | "ne" | "nw" | "s" | "se" | "sw" | "w";
2650
+ } | {
2651
+ readonly _tag: "Nothing";
2652
+ } | {
2653
+ readonly _tag: "Shape";
2654
+ readonly id: string;
2655
+ };
2656
+ readonly additive: boolean;
2657
+ readonly wasSelected: boolean;
2658
+ } | {
2659
+ readonly _tag: "Resizing";
2660
+ readonly ids: readonly string[];
2661
+ readonly handle: "e" | "n" | "ne" | "nw" | "s" | "se" | "sw" | "w";
2662
+ readonly origin: {
2663
+ readonly x: number;
2664
+ readonly y: number;
2665
+ };
2666
+ readonly start: {
2667
+ readonly x: number;
2668
+ readonly y: number;
2669
+ readonly w: number;
2670
+ readonly h: number;
2671
+ };
2672
+ readonly box: {
2673
+ readonly x: number;
2674
+ readonly y: number;
2675
+ readonly w: number;
2676
+ readonly h: number;
2677
+ };
2678
+ readonly guides: readonly {
2679
+ readonly guide: "center" | "edge" | "grid" | "spacing";
2680
+ readonly from: {
2681
+ readonly x: number;
2682
+ readonly y: number;
2683
+ };
2684
+ readonly to: {
2685
+ readonly x: number;
2686
+ readonly y: number;
2687
+ };
2688
+ }[];
2689
+ readonly transaction: string;
2690
+ };
2691
+ readonly uploads: readonly {
2692
+ readonly id: string;
2693
+ readonly box: {
2694
+ readonly x: number;
2695
+ readonly y: number;
2696
+ readonly w: number;
2697
+ readonly h: number;
2698
+ };
2699
+ readonly name: string | null;
2700
+ }[];
2701
+ readonly chat: string | null;
2702
+ }>;
2703
+ export declare const editorInput: Guard<{
2704
+ readonly _tag: "Action";
2705
+ readonly action: "align-bottom" | "align-center" | "align-left" | "align-middle" | "align-right" | "align-top" | "bring-forward" | "bring-to-front" | "cancel" | "connect" | "copy" | "cut" | "delete" | "distribute-horizontal" | "distribute-vertical" | "duplicate" | "edit-text" | "group" | "lock" | "nudge-down" | "nudge-down-large" | "nudge-left" | "nudge-left-large" | "nudge-right" | "nudge-right-large" | "nudge-up" | "nudge-up-large" | "redo" | "select-all" | "select-next" | "select-previous" | "send-backward" | "send-to-back" | "toggle-grid" | "tool-arrow" | "tool-comment" | "tool-ellipse" | "tool-eraser" | "tool-hand" | "tool-pen" | "tool-rectangle" | "tool-select" | "tool-sticky" | "tool-text" | "tool-timestamp" | "undo" | "ungroup" | "unlock" | "zoom-in" | "zoom-out" | "zoom-reset" | "zoom-to-fit" | "zoom-to-selection";
2706
+ } | {
2707
+ readonly _tag: "BeginUpload";
2708
+ readonly at: {
2709
+ readonly x: number;
2710
+ readonly y: number;
2711
+ };
2712
+ readonly uploads: readonly {
2713
+ readonly id: string;
2714
+ readonly naturalW: number | null;
2715
+ readonly naturalH: number | null;
2716
+ readonly name: string | null;
2717
+ }[];
2718
+ } | {
2719
+ readonly _tag: "EndUpload";
2720
+ readonly id: string;
2721
+ } | {
2722
+ readonly _tag: "InsertImage";
2723
+ readonly at: {
2724
+ readonly x: number;
2725
+ readonly y: number;
2726
+ };
2727
+ readonly images: readonly {
2728
+ readonly asset: string;
2729
+ readonly alt: string;
2730
+ readonly naturalW: number;
2731
+ readonly naturalH: number;
2732
+ readonly upload: string | null;
2733
+ }[];
2734
+ } | {
2735
+ readonly _tag: "Blur";
2736
+ } | {
2737
+ readonly _tag: "Chat";
2738
+ readonly text: string | null;
2739
+ } | {
2740
+ readonly _tag: "Copy";
2741
+ } | {
2742
+ readonly _tag: "Cut";
2743
+ } | {
2744
+ readonly _tag: "DoubleClick";
2745
+ readonly point: {
2746
+ readonly x: number;
2747
+ readonly y: number;
2748
+ };
2749
+ } | {
2750
+ readonly _tag: "Follow";
2751
+ readonly actor: string | null;
2752
+ } | {
2753
+ readonly _tag: "Inset";
2754
+ readonly inset: {
2755
+ readonly top: number;
2756
+ readonly right: number;
2757
+ readonly bottom: number;
2758
+ readonly left: number;
2759
+ };
2760
+ } | {
2761
+ readonly _tag: "KeyDown";
2762
+ readonly key: string;
2763
+ readonly modifiers: {
2764
+ readonly shift: boolean;
2765
+ readonly alt: boolean;
2766
+ readonly meta: boolean;
2767
+ };
2768
+ } | {
2769
+ readonly _tag: "KeyUp";
2770
+ readonly key: string;
2771
+ readonly modifiers: {
2772
+ readonly shift: boolean;
2773
+ readonly alt: boolean;
2774
+ readonly meta: boolean;
2775
+ };
2776
+ } | {
2777
+ readonly _tag: "Modifiers";
2778
+ readonly modifiers: {
2779
+ readonly shift: boolean;
2780
+ readonly alt: boolean;
2781
+ readonly meta: boolean;
2782
+ };
2783
+ } | {
2784
+ readonly _tag: "Pan";
2785
+ readonly dx: number;
2786
+ readonly dy: number;
2787
+ } | {
2788
+ readonly _tag: "Paste";
2789
+ readonly clipboard: {
2790
+ readonly kind: "hyper-canvas";
2791
+ readonly version: 1;
2792
+ readonly shapes: readonly ({
2793
+ readonly id: string;
2794
+ readonly x: number;
2795
+ readonly y: number;
2796
+ readonly z: string;
2797
+ readonly group: string | null;
2798
+ readonly locked: boolean;
2799
+ readonly createdBy: string;
2800
+ readonly updatedBy: string;
2801
+ readonly kind: "Arrow";
2802
+ readonly w: number;
2803
+ readonly h: number;
2804
+ readonly from: {
2805
+ readonly _tag: "Point";
2806
+ readonly x: number;
2807
+ readonly y: number;
2808
+ } | {
2809
+ readonly _tag: "Shape";
2810
+ readonly id: string;
2811
+ readonly at: {
2812
+ readonly x: number;
2813
+ readonly y: number;
2814
+ } | null;
2815
+ };
2816
+ readonly to: {
2817
+ readonly _tag: "Point";
2818
+ readonly x: number;
2819
+ readonly y: number;
2820
+ } | {
2821
+ readonly _tag: "Shape";
2822
+ readonly id: string;
2823
+ readonly at: {
2824
+ readonly x: number;
2825
+ readonly y: number;
2826
+ } | null;
2827
+ };
2828
+ readonly style: {
2829
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
2830
+ readonly start: "arrow" | "dot" | "none" | "triangle";
2831
+ readonly end: "arrow" | "dot" | "none" | "triangle";
2832
+ readonly route: "elbow" | "straight";
2833
+ readonly dash: "dashed" | "dotted" | "solid";
2834
+ };
2835
+ } | {
2836
+ readonly id: string;
2837
+ readonly x: number;
2838
+ readonly y: number;
2839
+ readonly z: string;
2840
+ readonly group: string | null;
2841
+ readonly locked: boolean;
2842
+ readonly createdBy: string;
2843
+ readonly updatedBy: string;
2844
+ readonly kind: "Box";
2845
+ readonly w: number;
2846
+ readonly h: number;
2847
+ readonly text: string;
2848
+ readonly style: {
2849
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
2850
+ readonly form: "ellipse" | "rectangle";
2851
+ readonly size: "l" | "m" | "s" | "xl";
2852
+ readonly align: "center" | "end" | "start";
2853
+ readonly fill: boolean;
2854
+ readonly dash: "dashed" | "dotted" | "solid";
2855
+ };
2856
+ } | {
2857
+ readonly id: string;
2858
+ readonly x: number;
2859
+ readonly y: number;
2860
+ readonly z: string;
2861
+ readonly group: string | null;
2862
+ readonly locked: boolean;
2863
+ readonly createdBy: string;
2864
+ readonly updatedBy: string;
2865
+ readonly kind: "Ink";
2866
+ readonly w: number;
2867
+ readonly h: number;
2868
+ readonly points: readonly {
2869
+ readonly x: number;
2870
+ readonly y: number;
2871
+ }[];
2872
+ readonly style: {
2873
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
2874
+ readonly size: "l" | "m" | "s" | "xl";
2875
+ readonly brush: "highlighter" | "marker" | "pen";
2876
+ };
2877
+ } | {
2878
+ readonly id: string;
2879
+ readonly x: number;
2880
+ readonly y: number;
2881
+ readonly z: string;
2882
+ readonly group: string | null;
2883
+ readonly locked: boolean;
2884
+ readonly createdBy: string;
2885
+ readonly updatedBy: string;
2886
+ readonly kind: "Sticky";
2887
+ readonly w: number;
2888
+ readonly h: number;
2889
+ readonly text: string;
2890
+ readonly style: {
2891
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
2892
+ readonly size: "l" | "m" | "s" | "xl";
2893
+ readonly align: "center" | "end" | "start";
2894
+ };
2895
+ } | {
2896
+ readonly id: string;
2897
+ readonly x: number;
2898
+ readonly y: number;
2899
+ readonly z: string;
2900
+ readonly group: string | null;
2901
+ readonly locked: boolean;
2902
+ readonly createdBy: string;
2903
+ readonly updatedBy: string;
2904
+ readonly kind: "Image";
2905
+ readonly w: number;
2906
+ readonly h: number;
2907
+ readonly asset: string;
2908
+ readonly alt: string;
2909
+ } | {
2910
+ readonly id: string;
2911
+ readonly x: number;
2912
+ readonly y: number;
2913
+ readonly z: string;
2914
+ readonly group: string | null;
2915
+ readonly locked: boolean;
2916
+ readonly createdBy: string;
2917
+ readonly updatedBy: string;
2918
+ readonly kind: "Text";
2919
+ readonly w: number;
2920
+ readonly h: number;
2921
+ readonly text: string;
2922
+ readonly style: {
2923
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
2924
+ readonly size: "l" | "m" | "s" | "xl";
2925
+ readonly align: "center" | "end" | "start";
2926
+ readonly width: "auto" | "fixed";
2927
+ };
2928
+ } | {
2929
+ readonly id: string;
2930
+ readonly x: number;
2931
+ readonly y: number;
2932
+ readonly z: string;
2933
+ readonly group: string | null;
2934
+ readonly locked: boolean;
2935
+ readonly createdBy: string;
2936
+ readonly updatedBy: string;
2937
+ readonly kind: "Timestamp";
2938
+ readonly w: number;
2939
+ readonly h: number;
2940
+ readonly at: number;
2941
+ })[];
2942
+ };
2943
+ readonly at: {
2944
+ readonly x: number;
2945
+ readonly y: number;
2946
+ } | null;
2947
+ readonly ids: readonly string[];
2948
+ } | {
2949
+ readonly _tag: "PasteText";
2950
+ readonly text: string;
2951
+ readonly at: {
2952
+ readonly x: number;
2953
+ readonly y: number;
2954
+ } | null;
2955
+ } | {
2956
+ readonly _tag: "PointerCancel";
2957
+ } | {
2958
+ readonly _tag: "PointerDown";
2959
+ readonly point: {
2960
+ readonly x: number;
2961
+ readonly y: number;
2962
+ };
2963
+ readonly button: "middle" | "primary" | "secondary";
2964
+ readonly pointer: "mouse" | "pen" | "touch";
2965
+ readonly pressure: number;
2966
+ readonly modifiers: {
2967
+ readonly shift: boolean;
2968
+ readonly alt: boolean;
2969
+ readonly meta: boolean;
2970
+ };
2971
+ } | {
2972
+ readonly _tag: "PointerLeave";
2973
+ } | {
2974
+ readonly _tag: "PointerMove";
2975
+ readonly point: {
2976
+ readonly x: number;
2977
+ readonly y: number;
2978
+ };
2979
+ readonly pointer: "mouse" | "pen" | "touch";
2980
+ readonly pressure: number;
2981
+ readonly samples: readonly {
2982
+ readonly x: number;
2983
+ readonly y: number;
2984
+ }[];
2985
+ readonly modifiers: {
2986
+ readonly shift: boolean;
2987
+ readonly alt: boolean;
2988
+ readonly meta: boolean;
2989
+ };
2990
+ } | {
2991
+ readonly _tag: "PointerUp";
2992
+ readonly point: {
2993
+ readonly x: number;
2994
+ readonly y: number;
2995
+ };
2996
+ readonly pointer: "mouse" | "pen" | "touch";
2997
+ readonly modifiers: {
2998
+ readonly shift: boolean;
2999
+ readonly alt: boolean;
3000
+ readonly meta: boolean;
3001
+ };
3002
+ } | {
3003
+ readonly _tag: "ReadOnly";
3004
+ readonly readOnly: boolean;
3005
+ } | {
3006
+ readonly _tag: "Rejected";
3007
+ readonly transaction: string;
3008
+ } | {
3009
+ readonly _tag: "Run";
3010
+ readonly commands: readonly ({
3011
+ readonly _tag: "Accept";
3012
+ readonly transaction: string;
3013
+ } | {
3014
+ readonly _tag: "Align";
3015
+ readonly ids: readonly string[];
3016
+ readonly to: "bottom" | "center" | "left" | "middle" | "right" | "top";
3017
+ } | {
3018
+ readonly _tag: "Create";
3019
+ readonly shape: {
3020
+ readonly kind: "Arrow";
3021
+ readonly from: {
3022
+ readonly _tag: "Point";
3023
+ readonly x: number;
3024
+ readonly y: number;
3025
+ } | {
3026
+ readonly _tag: "Shape";
3027
+ readonly id: string;
3028
+ readonly at: {
3029
+ readonly x: number;
3030
+ readonly y: number;
3031
+ } | null;
3032
+ };
3033
+ readonly to: {
3034
+ readonly _tag: "Point";
3035
+ readonly x: number;
3036
+ readonly y: number;
3037
+ } | {
3038
+ readonly _tag: "Shape";
3039
+ readonly id: string;
3040
+ readonly at: {
3041
+ readonly x: number;
3042
+ readonly y: number;
3043
+ } | null;
3044
+ };
3045
+ readonly id?: string | undefined;
3046
+ readonly color?: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow" | undefined;
3047
+ readonly start?: "arrow" | "dot" | "none" | "triangle" | undefined;
3048
+ readonly end?: "arrow" | "dot" | "none" | "triangle" | undefined;
3049
+ readonly route?: "elbow" | "straight" | undefined;
3050
+ readonly dash?: "dashed" | "dotted" | "solid" | undefined;
3051
+ } | {
3052
+ readonly kind: "Box";
3053
+ readonly id?: string | undefined;
3054
+ readonly text?: string | undefined;
3055
+ readonly form?: "ellipse" | "rectangle" | undefined;
3056
+ readonly color?: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow" | undefined;
3057
+ readonly size?: "l" | "m" | "s" | "xl" | undefined;
3058
+ readonly align?: "center" | "end" | "start" | undefined;
3059
+ readonly fill?: boolean | undefined;
3060
+ readonly dash?: "dashed" | "dotted" | "solid" | undefined;
3061
+ readonly w?: number | undefined;
3062
+ readonly h?: number | undefined;
3063
+ } | {
3064
+ readonly kind: "Image";
3065
+ readonly asset: string;
3066
+ readonly w: number;
3067
+ readonly h: number;
3068
+ readonly id?: string | undefined;
3069
+ readonly alt?: string | undefined;
3070
+ } | {
3071
+ readonly kind: "Ink";
3072
+ readonly points: readonly {
3073
+ readonly x: number;
3074
+ readonly y: number;
3075
+ }[];
3076
+ readonly id?: string | undefined;
3077
+ readonly color?: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow" | undefined;
3078
+ readonly size?: "l" | "m" | "s" | "xl" | undefined;
3079
+ readonly brush?: "highlighter" | "marker" | "pen" | undefined;
3080
+ } | {
3081
+ readonly kind: "Sticky";
3082
+ readonly id?: string | undefined;
3083
+ readonly text?: string | undefined;
3084
+ readonly color?: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow" | undefined;
3085
+ readonly size?: "l" | "m" | "s" | "xl" | undefined;
3086
+ readonly align?: "center" | "end" | "start" | undefined;
3087
+ readonly w?: number | undefined;
3088
+ readonly h?: number | undefined;
3089
+ } | {
3090
+ readonly kind: "Text";
3091
+ readonly text: string;
3092
+ readonly id?: string | undefined;
3093
+ readonly color?: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow" | undefined;
3094
+ readonly size?: "l" | "m" | "s" | "xl" | undefined;
3095
+ readonly align?: "center" | "end" | "start" | undefined;
3096
+ readonly w?: number | undefined;
3097
+ } | {
3098
+ readonly kind: "Timestamp";
3099
+ readonly at: number;
3100
+ readonly id?: string | undefined;
3101
+ readonly w?: number | undefined;
3102
+ readonly h?: number | undefined;
3103
+ };
3104
+ readonly place?: {
3105
+ readonly _tag: "At";
3106
+ readonly x: number;
3107
+ readonly y: number;
3108
+ } | {
3109
+ readonly _tag: "Beside";
3110
+ readonly shape: string;
3111
+ readonly side: "bottom" | "left" | "right" | "top";
3112
+ readonly gap?: number | undefined;
3113
+ } | undefined;
3114
+ } | {
3115
+ readonly _tag: "Delete";
3116
+ readonly ids: readonly string[];
3117
+ } | {
3118
+ readonly _tag: "Distribute";
3119
+ readonly ids: readonly string[];
3120
+ readonly axis: "horizontal" | "vertical";
3121
+ } | {
3122
+ readonly _tag: "Duplicate";
3123
+ readonly ids: readonly string[];
3124
+ readonly dx?: number | undefined;
3125
+ readonly dy?: number | undefined;
3126
+ readonly as?: readonly string[] | undefined;
3127
+ } | {
3128
+ readonly _tag: "Group";
3129
+ readonly ids: readonly string[];
3130
+ readonly group?: string | undefined;
3131
+ } | {
3132
+ readonly _tag: "Lock";
3133
+ readonly ids: readonly string[];
3134
+ readonly locked: boolean;
3135
+ } | {
3136
+ readonly _tag: "Move";
3137
+ readonly ids: readonly string[];
3138
+ readonly place: {
3139
+ readonly _tag: "At";
3140
+ readonly x: number;
3141
+ readonly y: number;
3142
+ } | {
3143
+ readonly _tag: "Beside";
3144
+ readonly shape: string;
3145
+ readonly side: "bottom" | "left" | "right" | "top";
3146
+ readonly gap?: number | undefined;
3147
+ };
3148
+ } | {
3149
+ readonly _tag: "Paste";
3150
+ readonly clipboard: {
3151
+ readonly kind: "hyper-canvas";
3152
+ readonly version: 1;
3153
+ readonly shapes: readonly ({
3154
+ readonly id: string;
3155
+ readonly x: number;
3156
+ readonly y: number;
3157
+ readonly z: string;
3158
+ readonly group: string | null;
3159
+ readonly locked: boolean;
3160
+ readonly createdBy: string;
3161
+ readonly updatedBy: string;
3162
+ readonly kind: "Arrow";
3163
+ readonly w: number;
3164
+ readonly h: number;
3165
+ readonly from: {
3166
+ readonly _tag: "Point";
3167
+ readonly x: number;
3168
+ readonly y: number;
3169
+ } | {
3170
+ readonly _tag: "Shape";
3171
+ readonly id: string;
3172
+ readonly at: {
3173
+ readonly x: number;
3174
+ readonly y: number;
3175
+ } | null;
3176
+ };
3177
+ readonly to: {
3178
+ readonly _tag: "Point";
3179
+ readonly x: number;
3180
+ readonly y: number;
3181
+ } | {
3182
+ readonly _tag: "Shape";
3183
+ readonly id: string;
3184
+ readonly at: {
3185
+ readonly x: number;
3186
+ readonly y: number;
3187
+ } | null;
3188
+ };
3189
+ readonly style: {
3190
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
3191
+ readonly start: "arrow" | "dot" | "none" | "triangle";
3192
+ readonly end: "arrow" | "dot" | "none" | "triangle";
3193
+ readonly route: "elbow" | "straight";
3194
+ readonly dash: "dashed" | "dotted" | "solid";
3195
+ };
3196
+ } | {
3197
+ readonly id: string;
3198
+ readonly x: number;
3199
+ readonly y: number;
3200
+ readonly z: string;
3201
+ readonly group: string | null;
3202
+ readonly locked: boolean;
3203
+ readonly createdBy: string;
3204
+ readonly updatedBy: string;
3205
+ readonly kind: "Box";
3206
+ readonly w: number;
3207
+ readonly h: number;
3208
+ readonly text: string;
3209
+ readonly style: {
3210
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
3211
+ readonly form: "ellipse" | "rectangle";
3212
+ readonly size: "l" | "m" | "s" | "xl";
3213
+ readonly align: "center" | "end" | "start";
3214
+ readonly fill: boolean;
3215
+ readonly dash: "dashed" | "dotted" | "solid";
3216
+ };
3217
+ } | {
3218
+ readonly id: string;
3219
+ readonly x: number;
3220
+ readonly y: number;
3221
+ readonly z: string;
3222
+ readonly group: string | null;
3223
+ readonly locked: boolean;
3224
+ readonly createdBy: string;
3225
+ readonly updatedBy: string;
3226
+ readonly kind: "Ink";
3227
+ readonly w: number;
3228
+ readonly h: number;
3229
+ readonly points: readonly {
3230
+ readonly x: number;
3231
+ readonly y: number;
3232
+ }[];
3233
+ readonly style: {
3234
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
3235
+ readonly size: "l" | "m" | "s" | "xl";
3236
+ readonly brush: "highlighter" | "marker" | "pen";
3237
+ };
3238
+ } | {
3239
+ readonly id: string;
3240
+ readonly x: number;
3241
+ readonly y: number;
3242
+ readonly z: string;
3243
+ readonly group: string | null;
3244
+ readonly locked: boolean;
3245
+ readonly createdBy: string;
3246
+ readonly updatedBy: string;
3247
+ readonly kind: "Sticky";
3248
+ readonly w: number;
3249
+ readonly h: number;
3250
+ readonly text: string;
3251
+ readonly style: {
3252
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
3253
+ readonly size: "l" | "m" | "s" | "xl";
3254
+ readonly align: "center" | "end" | "start";
3255
+ };
3256
+ } | {
3257
+ readonly id: string;
3258
+ readonly x: number;
3259
+ readonly y: number;
3260
+ readonly z: string;
3261
+ readonly group: string | null;
3262
+ readonly locked: boolean;
3263
+ readonly createdBy: string;
3264
+ readonly updatedBy: string;
3265
+ readonly kind: "Image";
3266
+ readonly w: number;
3267
+ readonly h: number;
3268
+ readonly asset: string;
3269
+ readonly alt: string;
3270
+ } | {
3271
+ readonly id: string;
3272
+ readonly x: number;
3273
+ readonly y: number;
3274
+ readonly z: string;
3275
+ readonly group: string | null;
3276
+ readonly locked: boolean;
3277
+ readonly createdBy: string;
3278
+ readonly updatedBy: string;
3279
+ readonly kind: "Text";
3280
+ readonly w: number;
3281
+ readonly h: number;
3282
+ readonly text: string;
3283
+ readonly style: {
3284
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow";
3285
+ readonly size: "l" | "m" | "s" | "xl";
3286
+ readonly align: "center" | "end" | "start";
3287
+ readonly width: "auto" | "fixed";
3288
+ };
3289
+ } | {
3290
+ readonly id: string;
3291
+ readonly x: number;
3292
+ readonly y: number;
3293
+ readonly z: string;
3294
+ readonly group: string | null;
3295
+ readonly locked: boolean;
3296
+ readonly createdBy: string;
3297
+ readonly updatedBy: string;
3298
+ readonly kind: "Timestamp";
3299
+ readonly w: number;
3300
+ readonly h: number;
3301
+ readonly at: number;
3302
+ })[];
3303
+ };
3304
+ readonly place?: {
3305
+ readonly _tag: "At";
3306
+ readonly x: number;
3307
+ readonly y: number;
3308
+ } | {
3309
+ readonly _tag: "Beside";
3310
+ readonly shape: string;
3311
+ readonly side: "bottom" | "left" | "right" | "top";
3312
+ readonly gap?: number | undefined;
3313
+ } | undefined;
3314
+ readonly as?: readonly string[] | undefined;
3315
+ } | {
3316
+ readonly _tag: "Reorder";
3317
+ readonly ids: readonly string[];
3318
+ readonly to: "back" | "backward" | "forward" | "front";
3319
+ } | {
3320
+ readonly _tag: "Resize";
3321
+ readonly ids: readonly string[];
3322
+ readonly box: {
3323
+ readonly x: number;
3324
+ readonly y: number;
3325
+ readonly w: number;
3326
+ readonly h: number;
3327
+ };
3328
+ } | {
3329
+ readonly _tag: "Revert";
3330
+ readonly transaction: string;
3331
+ } | {
3332
+ readonly _tag: "Ungroup";
3333
+ readonly ids: readonly string[];
3334
+ } | {
3335
+ readonly _tag: "Update";
3336
+ readonly id: string;
3337
+ readonly patch: {
3338
+ readonly x?: number | undefined;
3339
+ readonly y?: number | undefined;
3340
+ readonly w?: number | undefined;
3341
+ readonly h?: number | undefined;
3342
+ readonly text?: string | undefined;
3343
+ readonly color?: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow" | undefined;
3344
+ readonly size?: "l" | "m" | "s" | "xl" | undefined;
3345
+ readonly align?: "center" | "end" | "start" | undefined;
3346
+ readonly form?: "ellipse" | "rectangle" | undefined;
3347
+ readonly fill?: boolean | undefined;
3348
+ readonly dash?: "dashed" | "dotted" | "solid" | undefined;
3349
+ readonly brush?: "highlighter" | "marker" | "pen" | undefined;
3350
+ readonly start?: "arrow" | "dot" | "none" | "triangle" | undefined;
3351
+ readonly end?: "arrow" | "dot" | "none" | "triangle" | undefined;
3352
+ readonly route?: "elbow" | "straight" | undefined;
3353
+ readonly from?: {
3354
+ readonly _tag: "Point";
3355
+ readonly x: number;
3356
+ readonly y: number;
3357
+ } | {
3358
+ readonly _tag: "Shape";
3359
+ readonly id: string;
3360
+ readonly at: {
3361
+ readonly x: number;
3362
+ readonly y: number;
3363
+ } | null;
3364
+ } | undefined;
3365
+ readonly to?: {
3366
+ readonly _tag: "Point";
3367
+ readonly x: number;
3368
+ readonly y: number;
3369
+ } | {
3370
+ readonly _tag: "Shape";
3371
+ readonly id: string;
3372
+ readonly at: {
3373
+ readonly x: number;
3374
+ readonly y: number;
3375
+ } | null;
3376
+ } | undefined;
3377
+ readonly asset?: string | undefined;
3378
+ readonly alt?: string | undefined;
3379
+ };
3380
+ })[];
3381
+ readonly reason: string | null;
3382
+ } | {
3383
+ readonly _tag: "Select";
3384
+ readonly ids: readonly string[];
3385
+ } | {
3386
+ readonly _tag: "SetView";
3387
+ readonly view: {
3388
+ readonly x: number;
3389
+ readonly y: number;
3390
+ readonly w: number;
3391
+ readonly h: number;
3392
+ readonly zoom: number;
3393
+ readonly viewer: string | null;
3394
+ };
3395
+ } | {
3396
+ readonly _tag: "Style";
3397
+ readonly style: {
3398
+ readonly color: "blue" | "gray" | "green" | "ink" | "orange" | "pink" | "red" | "teal" | "violet" | "yellow" | null;
3399
+ readonly size: "l" | "m" | "s" | "xl" | null;
3400
+ readonly align: "center" | "end" | "start" | null;
3401
+ readonly fill: boolean | null;
3402
+ readonly dash: "dashed" | "dotted" | "solid" | null;
3403
+ readonly brush: "highlighter" | "marker" | "pen" | null;
3404
+ readonly start: "arrow" | "dot" | "none" | "triangle" | null;
3405
+ readonly end: "arrow" | "dot" | "none" | "triangle" | null;
3406
+ readonly route: "elbow" | "straight" | null;
3407
+ };
3408
+ } | {
3409
+ readonly _tag: "Sync";
3410
+ } | {
3411
+ readonly _tag: "Text";
3412
+ readonly value: string;
3413
+ } | {
3414
+ readonly _tag: "Wheel";
3415
+ readonly point: {
3416
+ readonly x: number;
3417
+ readonly y: number;
3418
+ };
3419
+ readonly dx: number;
3420
+ readonly dy: number;
3421
+ readonly modifiers: {
3422
+ readonly shift: boolean;
3423
+ readonly alt: boolean;
3424
+ readonly meta: boolean;
3425
+ };
3426
+ } | {
3427
+ readonly _tag: "Zoom";
3428
+ readonly point: {
3429
+ readonly x: number;
3430
+ readonly y: number;
3431
+ };
3432
+ readonly factor: number;
3433
+ } | {
3434
+ readonly _tag: "ZoomTo";
3435
+ readonly to: "fit" | "in" | "out" | "reset" | "selection";
3436
+ }>;