@allyhub/sdk 0.9.0 → 0.10.0

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 (134) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/node_modules/@allyhub/audio/package.json +1 -1
  3. package/dist/node_modules/@allyhub/chart/dist/chart-xml.d.ts +3 -0
  4. package/dist/node_modules/@allyhub/chart/dist/chart-xml.js +2 -2
  5. package/dist/node_modules/@allyhub/chart/dist/chart.d.ts +22 -0
  6. package/dist/node_modules/@allyhub/chart/dist/chart.js +1 -1
  7. package/dist/node_modules/@allyhub/chart/package.json +1 -1
  8. package/dist/node_modules/@allyhub/diagnostics/package.json +1 -1
  9. package/dist/node_modules/@allyhub/formats/dist/data/faces.d.ts +1 -1
  10. package/dist/node_modules/@allyhub/formats/dist/data/sheet.d.ts +87 -1
  11. package/dist/node_modules/@allyhub/formats/dist/data/sheet.js +1 -1
  12. package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +89 -0
  13. package/dist/node_modules/@allyhub/formats/dist/data/slides.js +1 -1
  14. package/dist/node_modules/@allyhub/formats/dist/schemas.d.ts +50 -0
  15. package/dist/node_modules/@allyhub/formats/package.json +1 -1
  16. package/dist/node_modules/@allyhub/image-draw/package.json +1 -1
  17. package/dist/node_modules/@allyhub/image-measure/package.json +1 -1
  18. package/dist/node_modules/@allyhub/image-sdk/package.json +1 -1
  19. package/dist/node_modules/@allyhub/measure/package.json +1 -1
  20. package/dist/node_modules/@allyhub/ooxml/dist/geometry/index.js +1 -1
  21. package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
  22. package/dist/node_modules/@allyhub/piece/dist/layout.d.ts +16 -0
  23. package/dist/node_modules/@allyhub/piece/dist/page/locate.js +1 -1
  24. package/dist/node_modules/@allyhub/piece/dist/stage.d.ts +6 -0
  25. package/dist/node_modules/@allyhub/piece/package.json +1 -1
  26. package/dist/node_modules/@allyhub/protocol/dist/account.d.ts +132 -0
  27. package/dist/node_modules/@allyhub/protocol/dist/account.js +1 -1
  28. package/dist/node_modules/@allyhub/protocol/dist/auth.d.ts +19 -1
  29. package/dist/node_modules/@allyhub/protocol/dist/auth.js +1 -1
  30. package/dist/node_modules/@allyhub/protocol/dist/browser-bridge.d.ts +337 -0
  31. package/dist/node_modules/@allyhub/protocol/dist/browser-bridge.js +2 -0
  32. package/dist/node_modules/@allyhub/protocol/dist/cloud.d.ts +153 -0
  33. package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
  34. package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +4 -2
  35. package/dist/node_modules/@allyhub/protocol/dist/editor.js +1 -1
  36. package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +43 -188
  37. package/dist/node_modules/@allyhub/protocol/dist/frame.js +1 -1
  38. package/dist/node_modules/@allyhub/protocol/dist/index.d.ts +1 -0
  39. package/dist/node_modules/@allyhub/protocol/dist/index.js +1 -1
  40. package/dist/node_modules/@allyhub/protocol/dist/mail.d.ts +1 -0
  41. package/dist/node_modules/@allyhub/protocol/dist/mail.js +1 -1
  42. package/dist/node_modules/@allyhub/protocol/dist/notes.d.ts +51 -91
  43. package/dist/node_modules/@allyhub/protocol/dist/notes.js +1 -1
  44. package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +3 -3
  45. package/dist/node_modules/@allyhub/protocol/package.json +5 -1
  46. package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
  47. package/dist/node_modules/@allyhub/scenery/dist/index.d.ts +2 -2
  48. package/dist/node_modules/@allyhub/scenery/dist/index.js +1 -1
  49. package/dist/node_modules/@allyhub/scenery/dist/moire.d.ts +45 -5
  50. package/dist/node_modules/@allyhub/scenery/dist/moire.js +2 -2
  51. package/dist/node_modules/@allyhub/scenery/dist/phone.d.ts +4 -3
  52. package/dist/node_modules/@allyhub/scenery/dist/phone.js +1 -1
  53. package/dist/node_modules/@allyhub/scenery/package.json +1 -1
  54. package/dist/node_modules/@allyhub/sheet/dist/calc/coerce.js +1 -1
  55. package/dist/node_modules/@allyhub/sheet/dist/calc/engine.d.ts +70 -0
  56. package/dist/node_modules/@allyhub/sheet/dist/calc/engine.js +1 -1
  57. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/criteria.d.ts +6 -0
  58. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/criteria.js +1 -1
  59. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/date.js +1 -1
  60. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/define.d.ts +3 -1
  61. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/define.js +1 -1
  62. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/info.js +1 -1
  63. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/kernels.js +1 -1
  64. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/lookup.js +1 -1
  65. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/maths.js +1 -1
  66. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/text.js +1 -1
  67. package/dist/node_modules/@allyhub/sheet/dist/calc/indexes.d.ts +9 -0
  68. package/dist/node_modules/@allyhub/sheet/dist/calc/indexes.js +1 -1
  69. package/dist/node_modules/@allyhub/sheet/dist/calc/types.d.ts +6 -0
  70. package/dist/node_modules/@allyhub/sheet/dist/calc/types.js +1 -1
  71. package/dist/node_modules/@allyhub/sheet/dist/chart.d.ts +9 -0
  72. package/dist/node_modules/@allyhub/sheet/dist/chart.js +1 -1
  73. package/dist/node_modules/@allyhub/sheet/dist/formula/ast.d.ts +12 -1
  74. package/dist/node_modules/@allyhub/sheet/dist/formula/move.d.ts +5 -1
  75. package/dist/node_modules/@allyhub/sheet/dist/formula/move.js +1 -1
  76. package/dist/node_modules/@allyhub/sheet/dist/formula/parse.js +1 -1
  77. package/dist/node_modules/@allyhub/sheet/dist/formula/print.js +1 -1
  78. package/dist/node_modules/@allyhub/sheet/dist/index.d.ts +2 -1
  79. package/dist/node_modules/@allyhub/sheet/dist/index.js +1 -1
  80. package/dist/node_modules/@allyhub/sheet/dist/inspect.d.ts +12 -2
  81. package/dist/node_modules/@allyhub/sheet/dist/inspect.js +1 -1
  82. package/dist/node_modules/@allyhub/sheet/dist/printed.d.ts +19 -0
  83. package/dist/node_modules/@allyhub/sheet/dist/printed.js +2 -0
  84. package/dist/node_modules/@allyhub/sheet/dist/values.d.ts +2 -0
  85. package/dist/node_modules/@allyhub/sheet/dist/values.js +1 -1
  86. package/dist/node_modules/@allyhub/sheet/dist/workbook.d.ts +2 -0
  87. package/dist/node_modules/@allyhub/sheet/dist/workbook.js +1 -1
  88. package/dist/node_modules/@allyhub/sheet/dist/write.js +15 -15
  89. package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.d.ts +6 -2
  90. package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.js +1 -1
  91. package/dist/node_modules/@allyhub/sheet/dist/xlsx/formula.js +2 -2
  92. package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.d.ts +0 -1
  93. package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.js +1 -1
  94. package/dist/node_modules/@allyhub/sheet/dist/xlsx/read.d.ts +3 -1
  95. package/dist/node_modules/@allyhub/sheet/dist/xlsx/read.js +2 -2
  96. package/dist/node_modules/@allyhub/sheet/dist/xlsx/sax.d.ts +7 -1
  97. package/dist/node_modules/@allyhub/sheet/dist/xlsx/sax.js +3 -1
  98. package/dist/node_modules/@allyhub/sheet/dist/xlsx/styles.d.ts +6 -0
  99. package/dist/node_modules/@allyhub/sheet/dist/xlsx/styles.js +1 -1
  100. package/dist/node_modules/@allyhub/sheet/dist/xlsx/write.d.ts +1 -1
  101. package/dist/node_modules/@allyhub/sheet/dist/xlsx/write.js +1 -1
  102. package/dist/node_modules/@allyhub/sheet/dist/xlsx/xml.d.ts +12 -1
  103. package/dist/node_modules/@allyhub/sheet/dist/xlsx/xml.js +3 -2
  104. package/dist/node_modules/@allyhub/sheet/package.json +1 -1
  105. package/dist/node_modules/@allyhub/slides-core/dist/api.d.ts +57 -7
  106. package/dist/node_modules/@allyhub/slides-core/dist/api.js +2 -2
  107. package/dist/node_modules/@allyhub/slides-core/dist/capabilities.js +1 -1
  108. package/dist/node_modules/@allyhub/slides-core/dist/enums.d.ts +24 -0
  109. package/dist/node_modules/@allyhub/slides-core/dist/enums.js +1 -1
  110. package/dist/node_modules/@allyhub/slides-core/dist/fact.d.ts +15 -0
  111. package/dist/node_modules/@allyhub/slides-core/dist/measure.js +1 -1
  112. package/dist/node_modules/@allyhub/slides-core/dist/model.d.ts +6 -2
  113. package/dist/node_modules/@allyhub/slides-core/dist/resolve.d.ts +3 -1
  114. package/dist/node_modules/@allyhub/slides-core/dist/resolve.js +1 -1
  115. package/dist/node_modules/@allyhub/slides-core/dist/sdk.d.ts +1 -1
  116. package/dist/node_modules/@allyhub/slides-core/dist/sdk.js +1 -1
  117. package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
  118. package/dist/node_modules/@allyhub/video-core/dist/piece.d.ts +2 -2
  119. package/dist/node_modules/@allyhub/video-core/dist/schema.d.ts +2 -2
  120. package/dist/node_modules/@allyhub/video-core/dist/schema.js +1 -1
  121. package/dist/node_modules/@allyhub/video-core/package.json +1 -1
  122. package/dist/node_modules/@allyhub/video-sdk/dist/phone.d.ts +12 -5
  123. package/dist/node_modules/@allyhub/video-sdk/dist/phone.js +1 -1
  124. package/dist/node_modules/@allyhub/video-sdk/package.json +1 -1
  125. package/docs/README.md +2 -0
  126. package/docs/canvas.md +28 -0
  127. package/docs/defaults.md +20 -2
  128. package/docs/docs.md +8 -8
  129. package/docs/scenery.md +3 -4
  130. package/docs/sheets.md +22 -5
  131. package/docs/slides.md +50 -4
  132. package/docs/speech.md +1 -1
  133. package/docs/x.md +73 -0
  134. package/package.json +1 -1
@@ -11,42 +11,39 @@ export declare const FRAME_METHODS: {
11
11
  }, z.core.$strict>>;
12
12
  }, z.core.$strict>>;
13
13
  readonly "note/locate": import("./jsonrpc.js").MethodSpec<z.ZodObject<{
14
- mark: z.ZodObject<{
15
- anchor: z.ZodString;
16
- shape: z.ZodDiscriminatedUnion<[z.ZodObject<{
17
- kind: z.ZodLiteral<"box">;
18
- rect: z.ZodObject<{
19
- x: z.ZodNumber;
20
- y: z.ZodNumber;
21
- width: z.ZodNumber;
22
- height: z.ZodNumber;
23
- }, z.core.$strict>;
24
- }, z.core.$strict>, z.ZodObject<{
25
- kind: z.ZodLiteral<"round">;
26
- rect: z.ZodObject<{
27
- x: z.ZodNumber;
28
- y: z.ZodNumber;
29
- width: z.ZodNumber;
30
- height: z.ZodNumber;
31
- }, z.core.$strict>;
32
- }, z.core.$strict>, z.ZodObject<{
33
- kind: z.ZodLiteral<"arrow">;
34
- from: z.ZodObject<{
35
- x: z.ZodNumber;
36
- y: z.ZodNumber;
37
- }, z.core.$strict>;
38
- to: z.ZodObject<{
39
- x: z.ZodNumber;
40
- y: z.ZodNumber;
41
- }, z.core.$strict>;
42
- }, z.core.$strict>, z.ZodObject<{
43
- kind: z.ZodLiteral<"line">;
44
- points: z.ZodArray<z.ZodObject<{
45
- x: z.ZodNumber;
46
- y: z.ZodNumber;
47
- }, z.core.$strict>>;
48
- }, z.core.$strict>], "kind">;
49
- }, z.core.$strict>;
14
+ shape: z.ZodDiscriminatedUnion<[z.ZodObject<{
15
+ kind: z.ZodLiteral<"box">;
16
+ rect: z.ZodObject<{
17
+ x: z.ZodNumber;
18
+ y: z.ZodNumber;
19
+ width: z.ZodNumber;
20
+ height: z.ZodNumber;
21
+ }, z.core.$strict>;
22
+ }, z.core.$strict>, z.ZodObject<{
23
+ kind: z.ZodLiteral<"round">;
24
+ rect: z.ZodObject<{
25
+ x: z.ZodNumber;
26
+ y: z.ZodNumber;
27
+ width: z.ZodNumber;
28
+ height: z.ZodNumber;
29
+ }, z.core.$strict>;
30
+ }, z.core.$strict>, z.ZodObject<{
31
+ kind: z.ZodLiteral<"arrow">;
32
+ from: z.ZodObject<{
33
+ x: z.ZodNumber;
34
+ y: z.ZodNumber;
35
+ }, z.core.$strict>;
36
+ to: z.ZodObject<{
37
+ x: z.ZodNumber;
38
+ y: z.ZodNumber;
39
+ }, z.core.$strict>;
40
+ }, z.core.$strict>, z.ZodObject<{
41
+ kind: z.ZodLiteral<"line">;
42
+ points: z.ZodArray<z.ZodObject<{
43
+ x: z.ZodNumber;
44
+ y: z.ZodNumber;
45
+ }, z.core.$strict>>;
46
+ }, z.core.$strict>], "kind">;
50
47
  }, z.core.$strict>, z.ZodObject<{
51
48
  elements: z.ZodArray<z.ZodObject<{
52
49
  name: z.ZodString;
@@ -68,18 +65,7 @@ export declare const FRAME_METHODS: {
68
65
  }, z.core.$strict>>;
69
66
  where: z.ZodOptional<z.ZodString>;
70
67
  }, z.core.$strict>>;
71
- readonly "note/pictures": import("./jsonrpc.js").MethodSpec<z.ZodObject<{
72
- anchors: z.ZodArray<z.ZodString>;
73
- region: z.ZodOptional<z.ZodObject<{
74
- anchor: z.ZodString;
75
- rect: z.ZodObject<{
76
- x: z.ZodNumber;
77
- y: z.ZodNumber;
78
- width: z.ZodNumber;
79
- height: z.ZodNumber;
80
- }, z.core.$strict>;
81
- }, z.core.$strict>>;
82
- }, z.core.$strict>, z.ZodObject<{
68
+ readonly "note/pictures": import("./jsonrpc.js").MethodSpec<z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
83
69
  pictures: z.ZodArray<z.ZodObject<{
84
70
  rect: z.ZodOptional<z.ZodObject<{
85
71
  x: z.ZodNumber;
@@ -90,167 +76,36 @@ export declare const FRAME_METHODS: {
90
76
  mime: z.ZodString;
91
77
  data: z.ZodString;
92
78
  }, z.core.$strict>>;
93
- placements: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodObject<{
94
- x: z.ZodNumber;
95
- y: z.ZodNumber;
96
- sx: z.ZodNumber;
97
- sy: z.ZodNumber;
98
- clip: z.ZodObject<{
99
- x: z.ZodNumber;
100
- y: z.ZodNumber;
101
- width: z.ZodNumber;
102
- height: z.ZodNumber;
103
- }, z.core.$strict>;
104
- }, z.core.$strict>>>;
105
- }, z.core.$strict>>;
106
- readonly "note/where": import("./jsonrpc.js").MethodSpec<z.ZodObject<{
107
- anchors: z.ZodArray<z.ZodString>;
108
- }, z.core.$strict>, z.ZodObject<{
109
- placements: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodObject<{
110
- x: z.ZodNumber;
111
- y: z.ZodNumber;
112
- sx: z.ZodNumber;
113
- sy: z.ZodNumber;
114
- clip: z.ZodObject<{
79
+ uncovered: z.ZodArray<z.ZodObject<{
80
+ name: z.ZodString;
81
+ rect: z.ZodObject<{
115
82
  x: z.ZodNumber;
116
83
  y: z.ZodNumber;
117
84
  width: z.ZodNumber;
118
85
  height: z.ZodNumber;
119
86
  }, z.core.$strict>;
120
- }, z.core.$strict>>>;
121
- }, z.core.$strict>>;
122
- readonly "note/show": import("./jsonrpc.js").MethodSpec<z.ZodObject<{
123
- anchor: z.ZodString;
124
- at: z.ZodObject<{
125
- x: z.ZodNumber;
126
- y: z.ZodNumber;
127
- }, z.core.$strict>;
128
- }, z.core.$strict>, z.ZodObject<{
129
- shown: z.ZodBoolean;
87
+ }, z.core.$strict>>;
130
88
  }, z.core.$strict>>;
131
89
  readonly "note/release": import("./jsonrpc.js").MethodSpec<z.ZodObject<{}, z.core.$strict>, z.ZodObject<{}, z.core.$strict>>;
132
90
  };
133
91
  /** What the window tells the page. */
134
92
  export declare const WINDOW_NOTIFICATIONS: {
135
- readonly "note/mode": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{
136
- catch: z.ZodBoolean;
137
- cursor: z.ZodString;
138
- nudge: z.ZodBoolean;
139
- }, z.core.$strict>>;
140
93
  readonly "editor/command": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{
141
94
  command: z.ZodString;
142
95
  open: z.ZodOptional<z.ZodBoolean>;
143
96
  }, z.core.$strict>>;
144
97
  };
145
- export declare const NoteInputSchema: z.ZodObject<{
146
- anchor: z.ZodOptional<z.ZodObject<{
147
- id: z.ZodString;
148
- placement: z.ZodNullable<z.ZodObject<{
149
- x: z.ZodNumber;
150
- y: z.ZodNumber;
151
- sx: z.ZodNumber;
152
- sy: z.ZodNumber;
153
- clip: z.ZodObject<{
154
- x: z.ZodNumber;
155
- y: z.ZodNumber;
156
- width: z.ZodNumber;
157
- height: z.ZodNumber;
158
- }, z.core.$strict>;
159
- }, z.core.$strict>>;
160
- }, z.core.$strict>>;
161
- shift: z.ZodBoolean;
162
- alt: z.ZodBoolean;
163
- meta: z.ZodBoolean;
164
- ctrl: z.ZodBoolean;
165
- type: z.ZodEnum<{
166
- cancel: "cancel";
167
- down: "down";
168
- move: "move";
169
- up: "up";
170
- double: "double";
171
- }>;
172
- x: z.ZodNumber;
173
- y: z.ZodNumber;
174
- buttons: z.ZodInt;
175
- }, z.core.$strict>;
176
- export type NoteInput = z.infer<typeof NoteInputSchema>;
177
- export declare const NoteKeySchema: z.ZodObject<{
178
- shift: z.ZodBoolean;
179
- alt: z.ZodBoolean;
180
- meta: z.ZodBoolean;
181
- ctrl: z.ZodBoolean;
182
- type: z.ZodEnum<{
183
- down: "down";
184
- up: "up";
185
- }>;
186
- key: z.ZodString;
187
- code: z.ZodString;
188
- repeat: z.ZodBoolean;
189
- }, z.core.$strict>;
190
- export type NoteKey = z.infer<typeof NoteKeySchema>;
191
98
  /** What the page tells the window. */
192
99
  export declare const FRAME_NOTIFICATIONS: {
193
100
  readonly "note/ready": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{}, z.core.$strict>>;
194
101
  readonly "note/gone": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{}, z.core.$strict>>;
195
- readonly "note/input": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{
196
- events: z.ZodArray<z.ZodObject<{
197
- anchor: z.ZodOptional<z.ZodObject<{
198
- id: z.ZodString;
199
- placement: z.ZodNullable<z.ZodObject<{
200
- x: z.ZodNumber;
201
- y: z.ZodNumber;
202
- sx: z.ZodNumber;
203
- sy: z.ZodNumber;
204
- clip: z.ZodObject<{
205
- x: z.ZodNumber;
206
- y: z.ZodNumber;
207
- width: z.ZodNumber;
208
- height: z.ZodNumber;
209
- }, z.core.$strict>;
210
- }, z.core.$strict>>;
211
- }, z.core.$strict>>;
212
- shift: z.ZodBoolean;
213
- alt: z.ZodBoolean;
214
- meta: z.ZodBoolean;
215
- ctrl: z.ZodBoolean;
216
- type: z.ZodEnum<{
217
- cancel: "cancel";
218
- down: "down";
219
- move: "move";
220
- up: "up";
221
- double: "double";
222
- }>;
223
- x: z.ZodNumber;
224
- y: z.ZodNumber;
225
- buttons: z.ZodInt;
226
- }, z.core.$strict>>;
227
- }, z.core.$strict>>;
228
- readonly "note/key": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{
229
- shift: z.ZodBoolean;
230
- alt: z.ZodBoolean;
231
- meta: z.ZodBoolean;
232
- ctrl: z.ZodBoolean;
233
- type: z.ZodEnum<{
234
- down: "down";
235
- up: "up";
236
- }>;
102
+ readonly "window/key": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{
237
103
  key: z.ZodString;
238
104
  code: z.ZodString;
239
- repeat: z.ZodBoolean;
240
- }, z.core.$strict>>;
241
- readonly "note/moved": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{
242
- placements: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodObject<{
243
- x: z.ZodNumber;
244
- y: z.ZodNumber;
245
- sx: z.ZodNumber;
246
- sy: z.ZodNumber;
247
- clip: z.ZodObject<{
248
- x: z.ZodNumber;
249
- y: z.ZodNumber;
250
- width: z.ZodNumber;
251
- height: z.ZodNumber;
252
- }, z.core.$strict>;
253
- }, z.core.$strict>>>;
105
+ meta: z.ZodBoolean;
106
+ ctrl: z.ZodBoolean;
107
+ shift: z.ZodBoolean;
108
+ alt: z.ZodBoolean;
254
109
  }, z.core.$strict>>;
255
110
  readonly "agent/ask": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{
256
111
  text: z.ZodString;
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{z as e}from"zod";import{EDITOR_STATES as a,ExportStateSchema as i,PlaceSchema as c}from"./editor.js";import{AgentHereSchema as h}from"./presence.js";import{PathSchema as m}from"./files.js";import{method as o,notification as t}from"./jsonrpc.js";import{AnchoredShapeSchema as d,HeldSchema as p,NoteElementSchema as l,NotePictureSchema as w,NoteRectSchema as r,NotePlacementSchema as g,NotePlacementsSchema as s,NotePointSchema as b}from"./notes.js";export const FRAME_METHODS={"note/hold":o(e.strictObject({}),p,"Holds what moves by itself and starts catching presses for Note mode; says what is on show."),"note/locate":o(e.strictObject({mark:d}),e.strictObject({elements:e.array(l),where:e.string().optional()}),"What a mark is on, while it is on show. Empty is an answer: the mark's place still goes."),"note/pictures":o(e.strictObject({anchors:e.array(e.string().min(1)),region:e.strictObject({anchor:e.string().min(1),rect:r}).optional()}),e.strictObject({pictures:e.array(w),placements:s}),"The page as it shows now, drawn without the window's marks, and what its editor draws better, each at its rect."),"note/where":o(e.strictObject({anchors:e.array(e.string().min(1))}),e.strictObject({placements:s}),"Where anchors are now, which the page goes on telling as they move."),"note/show":o(e.strictObject({anchor:e.string().min(1),at:b}),e.strictObject({shown:e.boolean()}),"Brings a point of an anchor back on show: scrolls to it, turns to its slide, goes to its moment."),"note/release":o(e.strictObject({}),e.strictObject({}),"Note mode is over: presses go to the editor again. Nothing starts by itself.")},WINDOW_NOTIFICATIONS={"note/mode":t(e.strictObject({catch:e.boolean(),cursor:e.string().min(1),nudge:e.boolean()}),"How the page treats input while Note mode holds it."),"editor/command":t(e.strictObject({command:e.string().min(1),open:e.boolean().optional()}),"A shortcut the window took, its header's Export or its agent's name, or a command of the editor's extension, for the editor to do as its own.")};const n={shift:e.boolean(),alt:e.boolean(),meta:e.boolean(),ctrl:e.boolean()};export const NoteInputSchema=e.strictObject({type:e.enum(["down","move","up","cancel","double"]),x:e.number(),y:e.number(),buttons:e.int().nonnegative(),...n,anchor:e.strictObject({id:e.string().min(1),placement:g}).optional()}),NoteKeySchema=e.strictObject({type:e.enum(["down","up"]),key:e.string(),code:e.string(),repeat:e.boolean(),...n}),FRAME_NOTIFICATIONS={"note/ready":t(e.strictObject({}),"The page's editor has given its surface: the page answers notes."),"note/gone":t(e.strictObject({}),"The page no longer answers notes: its editor went, or the page goes."),"note/input":t(e.strictObject({events:e.array(NoteInputSchema).min(1)}),"Presses the page caught while Note mode holds it, in order; a pen's moves come together."),"note/key":t(NoteKeySchema,"A key the page caught while held."),"note/moved":t(e.strictObject({placements:s}),"Anchors that moved, and where they are now: once a frame at most, only those the page has named."),"agent/ask":t(e.strictObject({text:e.string().min(1)}),"Words the editor puts before the person's agent, for them to go on and send."),"note/begin":t(e.strictObject({from:r.optional()}),"The person asked for Note mode from the editor (Mark up); `from` is what they pressed, in the page's viewport, for the bar to come out of."),"share/begin":t(e.strictObject({}),"The person asked to share the item on show."),"edit/request":t(e.strictObject({}),"The person tried to change what a read-only page shows, or the page needs the machine: the window offers to wake it."),"editor/place":t(e.strictObject({item:m,place:c}),"Where the person is in an item, as its editor says it, so the window opens it there again; the window keeps it unread."),"export/state":t(i,"How the item's exports go, for its Export button in the window's header."),"editor/state":t(e.strictObject({state:e.enum(a),message:e.string().optional()}),"Whether what the person typed is saved, for the window's header."),"agent/here":t(h,"The project's agent in the item on show and whether its editor follows it, for the window's header; its button asks back with `editor/command`'s `follow` or `unfollow`.")};
2
+ import{z as e}from"zod";import{EDITOR_STATES as r,ExportStateSchema as i,PlaceSchema as a}from"./editor.js";import{AgentHereSchema as n}from"./presence.js";import{PathSchema as h}from"./files.js";import{method as o,notification as t}from"./jsonrpc.js";import{HeldSchema as c,NoteFoundSchema as d,NotePictureSchema as m,NoteRectSchema as s,NoteShapeSchema as p}from"./notes.js";export const FRAME_METHODS={"note/hold":o(e.strictObject({}),c,"Holds what moves by itself while the person marks a picture of it; says what is on show."),"note/locate":o(e.strictObject({shape:p}),d,"What a mark is on: the editor's answer and every inset's under it, innermost first. Empty is an answer: the mark's place still goes."),"note/pictures":o(e.strictObject({}),e.strictObject({pictures:e.array(m),uncovered:e.array(e.strictObject({name:e.string(),rect:s}))}),"The page as it shows now, drawn without the window's marks, then its insets' pictures, each at its rect, outermost first."),"note/release":o(e.strictObject({}),e.strictObject({}),"The person is done marking. Nothing starts by itself.")},WINDOW_NOTIFICATIONS={"editor/command":t(e.strictObject({command:e.string().min(1),open:e.boolean().optional()}),"A shortcut the window took, its header's Export or its agent's name, or a command of the editor's extension, for the editor to do as its own.")},FRAME_NOTIFICATIONS={"note/ready":t(e.strictObject({}),"The page's editor has given its surface: the page answers notes."),"note/gone":t(e.strictObject({}),"The page no longer answers notes: its editor went, or the page goes."),"window/key":t(e.strictObject({key:e.string(),code:e.string(),meta:e.boolean(),ctrl:e.boolean(),shift:e.boolean(),alt:e.boolean()}),"A key with ⌘ or Ctrl pressed in the page that its editor did not take: the window's shortcut (⌘⇧M, ⌘K), heard where the keys are in the page. A desktop shell's menu hears them itself, so a page framed there tells none."),"agent/ask":t(e.strictObject({text:e.string().min(1)}),"Words the editor puts before the person's agent, for them to go on and send."),"note/begin":t(e.strictObject({from:s.optional()}),"The person asked for Mark up from the editor: the window shows its tools; `from` is what they pressed, in the page's viewport."),"share/begin":t(e.strictObject({}),"The person asked to share the item on show."),"edit/request":t(e.strictObject({}),"The person tried to change what a read-only page shows, or the page needs the machine: the window offers to wake it."),"editor/place":t(e.strictObject({item:h,place:a}),"Where the person is in an item, as its editor says it, so the window opens it there again; the window keeps it unread."),"export/state":t(i,"How the item's exports go, for its Export button in the window's header."),"editor/state":t(e.strictObject({state:e.enum(r),message:e.string().optional()}),"Whether what the person typed is saved, for the window's header."),"agent/here":t(n,"The project's agent in the item on show and whether its editor follows it, for the window's header; its button asks back with `editor/command`'s `follow` or `unfollow`.")};
@@ -22,6 +22,7 @@ export * from "./sources.js";
22
22
  export * from "./shares.js";
23
23
  export * from "./account.js";
24
24
  export * from "./open.js";
25
+ export * from "./browser-bridge.js";
25
26
  export * from "./jobs.js";
26
27
  export * from "./peer.js";
27
28
  export * from "./shape.js";
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- export*from"./jsonrpc.js";export*from"./files.js";export*from"./editor.js";export*from"./presence.js";export*from"./kinds.js";export*from"./notes.js";export*from"./frame.js";export*from"./tools.js";export*from"./cli.js";export*from"./auth.js";export*from"./registry.js";export*from"./runtimes.js";export*from"./cloud.js";export*from"./teams.js";export*from"./app.js";export*from"./routes.js";export*from"./blobs.js";export*from"./sites.js";export*from"./mail.js";export*from"./snapshots.js";export*from"./sources.js";export*from"./shares.js";export*from"./account.js";export*from"./open.js";export*from"./jobs.js";export*from"./peer.js";export*from"./shape.js";
2
+ export*from"./jsonrpc.js";export*from"./files.js";export*from"./editor.js";export*from"./presence.js";export*from"./kinds.js";export*from"./notes.js";export*from"./frame.js";export*from"./tools.js";export*from"./cli.js";export*from"./auth.js";export*from"./registry.js";export*from"./runtimes.js";export*from"./cloud.js";export*from"./teams.js";export*from"./app.js";export*from"./routes.js";export*from"./blobs.js";export*from"./sites.js";export*from"./mail.js";export*from"./snapshots.js";export*from"./sources.js";export*from"./shares.js";export*from"./account.js";export*from"./open.js";export*from"./browser-bridge.js";export*from"./jobs.js";export*from"./peer.js";export*from"./shape.js";
@@ -72,6 +72,7 @@ export declare const MailboxSchema: z.ZodObject<{
72
72
  anyone: "anyone";
73
73
  }>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
74
74
  sendsLeft: z.ZodNumber;
75
+ sendsPerDay: z.ZodOptional<z.ZodNumber>;
75
76
  addresses: z.ZodArray<z.ZodObject<{
76
77
  address: z.ZodString;
77
78
  kind: z.ZodUnion<readonly [z.ZodEnum<{
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{z as t}from"zod";import{openEnum as n}from"./open.js";export const MAIL_LIMITS={listed:100,textBytes:256*1024,aliases:20,recipients:50,subject:998,body:1024*1024,attachmentBytes:10*1024*1024,attachments:32,retentionDays:{min:1,max:365}},MAIL_AGENT_WORDS="AI agent",MAIL_NAME_LENGTH={min:2,max:40};export function mailNameProblem(e){if(e.length<MAIL_NAME_LENGTH.min||e.length>MAIL_NAME_LENGTH.max)return`A name is ${String(MAIL_NAME_LENGTH.min)} to ${String(MAIL_NAME_LENGTH.max)} characters.`;if(!/^[a-z0-9-]+$/u.test(e))return"A name is lowercase letters, digits and hyphens.";if(e.startsWith("-")||e.endsWith("-"))return"A name neither starts nor ends with a hyphen.";if(e.includes("--"))return"A name does not have two hyphens in a row."}export const MailNameSchema=t.string().superRefine((e,r)=>{const a=mailNameProblem(e);a!==void 0&&r.addIssue({code:"custom",message:a})}),MAIL_PATH="/api/mail",MAIL_SETTINGS_PATH="/api/mail/settings",MAIL_PERSON_QUERY="person=1",MAIL_SEND_PATH="/api/mail/send",MAIL_ALIASES_PATH="/api/mail/aliases",MAIL_MESSAGES_PATH="/api/mail/messages",mailMessagePath=e=>`${MAIL_MESSAGES_PATH}/${encodeURIComponent(e)}`,mailRawPath=e=>`${mailMessagePath(e)}/raw`,mailReplyPath=e=>`${mailMessagePath(e)}/reply`,MAIL_SEND_POLICIES=["off","team","anyone"],MAIL_DIRECTIONS=["in","out"],MAIL_ADDRESS_KINDS=["main","alias"],MailAddressSchema=t.object({address:t.string(),kind:n(MAIL_ADDRESS_KINDS),project:t.string().nullable(),createdAt:t.string()}),MailboxSchema=t.object({domain:t.string(),displayName:t.string(),retentionDays:t.number(),sendPolicy:n(MAIL_SEND_POLICIES),sendsLeft:t.number(),addresses:t.array(MailAddressSchema)}),MailAliasCreateSchema=t.strictObject({name:MailNameSchema,project:t.string().min(1).max(200).optional()}),MailPersonSchema=t.object({address:t.string(),name:t.string()}),MailSummarySchema=t.object({id:t.string(),direction:n(MAIL_DIRECTIONS),receivedAt:t.string(),to:t.string(),tag:t.string().nullable(),from:MailPersonSchema.nullable(),recipients:t.array(MailPersonSchema).default([]),subject:t.string(),threadId:t.string(),size:t.number()}),MailLinkSchema=t.object({href:t.string(),text:t.string()}),MailHeaderSchema=t.object({name:t.string(),value:t.string()}),MailAttachmentSchema=t.object({name:t.string().nullable(),type:t.string(),size:t.number()}),MailMessageSchema=MailSummarySchema.extend({cc:t.array(MailPersonSchema),replyTo:t.array(MailPersonSchema),date:t.string().nullable(),messageId:t.string().nullable(),inReplyTo:t.string().nullable(),references:t.array(t.string()),text:t.string(),textCut:t.boolean(),links:t.array(MailLinkSchema),headers:t.array(MailHeaderSchema),attachments:t.array(MailAttachmentSchema),html:t.string().optional()}),MAIL_ORDERS=["newest","oldest"],MailSearchSchema=t.strictObject({to:t.string().min(1).max(320).optional(),from:t.string().min(1).max(320).optional(),subject:t.string().min(1).max(500).optional(),text:t.string().min(1).max(500).optional(),project:t.string().min(1).max(200).optional(),thread:t.string().min(1).max(200).optional(),direction:t.enum(MAIL_DIRECTIONS).optional(),since:t.iso.datetime({offset:!0}).optional(),order:t.enum(MAIL_ORDERS).default("newest"),limit:t.coerce.number().int().min(1).max(MAIL_LIMITS.listed).default(20)}),MailSearchResponseSchema=t.object({messages:t.array(MailSummarySchema)});const i=t.email().max(320);export const MailAttachmentSendSchema=t.strictObject({name:t.string().min(1).max(255),type:t.string().min(1).max(255),content:t.base64()});const s={text:t.string().max(MAIL_LIMITS.body),html:t.string().max(MAIL_LIMITS.body).optional(),attachments:t.array(MailAttachmentSendSchema).max(MAIL_LIMITS.attachments).optional(),from:t.string().min(3).max(320).optional()};export const MailSendSchema=t.strictObject({to:t.array(i).min(1).max(MAIL_LIMITS.recipients),cc:t.array(i).max(MAIL_LIMITS.recipients).optional(),subject:t.string().max(MAIL_LIMITS.subject),...s}),MailReplySchema=t.strictObject({all:t.boolean().optional(),...s}),MailSettingsSchema=t.strictObject({displayName:t.string().min(1).max(100).refine(e=>e.toLowerCase().includes(MAIL_AGENT_WORDS.toLowerCase()),{message:`A display name says "${MAIL_AGENT_WORDS}", so a recipient knows who writes.`}).optional(),sendPolicy:t.enum(MAIL_SEND_POLICIES).optional(),retentionDays:t.number().int().min(MAIL_LIMITS.retentionDays.min).max(MAIL_LIMITS.retentionDays.max).optional()});
2
+ import{z as t}from"zod";import{openEnum as n}from"./open.js";export const MAIL_LIMITS={listed:100,textBytes:256*1024,aliases:20,recipients:50,subject:998,body:1024*1024,attachmentBytes:10*1024*1024,attachments:32,retentionDays:{min:1,max:365}},MAIL_AGENT_WORDS="AI agent",MAIL_NAME_LENGTH={min:2,max:40};export function mailNameProblem(e){if(e.length<MAIL_NAME_LENGTH.min||e.length>MAIL_NAME_LENGTH.max)return`A name is ${String(MAIL_NAME_LENGTH.min)} to ${String(MAIL_NAME_LENGTH.max)} characters.`;if(!/^[a-z0-9-]+$/u.test(e))return"A name is lowercase letters, digits and hyphens.";if(e.startsWith("-")||e.endsWith("-"))return"A name neither starts nor ends with a hyphen.";if(e.includes("--"))return"A name does not have two hyphens in a row."}export const MailNameSchema=t.string().superRefine((e,r)=>{const a=mailNameProblem(e);a!==void 0&&r.addIssue({code:"custom",message:a})}),MAIL_PATH="/api/mail",MAIL_SETTINGS_PATH="/api/mail/settings",MAIL_PERSON_QUERY="person=1",MAIL_SEND_PATH="/api/mail/send",MAIL_ALIASES_PATH="/api/mail/aliases",MAIL_MESSAGES_PATH="/api/mail/messages",mailMessagePath=e=>`${MAIL_MESSAGES_PATH}/${encodeURIComponent(e)}`,mailRawPath=e=>`${mailMessagePath(e)}/raw`,mailReplyPath=e=>`${mailMessagePath(e)}/reply`,MAIL_SEND_POLICIES=["off","team","anyone"],MAIL_DIRECTIONS=["in","out"],MAIL_ADDRESS_KINDS=["main","alias"],MailAddressSchema=t.object({address:t.string(),kind:n(MAIL_ADDRESS_KINDS),project:t.string().nullable(),createdAt:t.string()}),MailboxSchema=t.object({domain:t.string(),displayName:t.string(),retentionDays:t.number(),sendPolicy:n(MAIL_SEND_POLICIES),sendsLeft:t.number(),sendsPerDay:t.number().optional(),addresses:t.array(MailAddressSchema)}),MailAliasCreateSchema=t.strictObject({name:MailNameSchema,project:t.string().min(1).max(200).optional()}),MailPersonSchema=t.object({address:t.string(),name:t.string()}),MailSummarySchema=t.object({id:t.string(),direction:n(MAIL_DIRECTIONS),receivedAt:t.string(),to:t.string(),tag:t.string().nullable(),from:MailPersonSchema.nullable(),recipients:t.array(MailPersonSchema).default([]),subject:t.string(),threadId:t.string(),size:t.number()}),MailLinkSchema=t.object({href:t.string(),text:t.string()}),MailHeaderSchema=t.object({name:t.string(),value:t.string()}),MailAttachmentSchema=t.object({name:t.string().nullable(),type:t.string(),size:t.number()}),MailMessageSchema=MailSummarySchema.extend({cc:t.array(MailPersonSchema),replyTo:t.array(MailPersonSchema),date:t.string().nullable(),messageId:t.string().nullable(),inReplyTo:t.string().nullable(),references:t.array(t.string()),text:t.string(),textCut:t.boolean(),links:t.array(MailLinkSchema),headers:t.array(MailHeaderSchema),attachments:t.array(MailAttachmentSchema),html:t.string().optional()}),MAIL_ORDERS=["newest","oldest"],MailSearchSchema=t.strictObject({to:t.string().min(1).max(320).optional(),from:t.string().min(1).max(320).optional(),subject:t.string().min(1).max(500).optional(),text:t.string().min(1).max(500).optional(),project:t.string().min(1).max(200).optional(),thread:t.string().min(1).max(200).optional(),direction:t.enum(MAIL_DIRECTIONS).optional(),since:t.iso.datetime({offset:!0}).optional(),order:t.enum(MAIL_ORDERS).default("newest"),limit:t.coerce.number().int().min(1).max(MAIL_LIMITS.listed).default(20)}),MailSearchResponseSchema=t.object({messages:t.array(MailSummarySchema)});const i=t.email().max(320);export const MailAttachmentSendSchema=t.strictObject({name:t.string().min(1).max(255),type:t.string().min(1).max(255),content:t.base64()});const s={text:t.string().max(MAIL_LIMITS.body),html:t.string().max(MAIL_LIMITS.body).optional(),attachments:t.array(MailAttachmentSendSchema).max(MAIL_LIMITS.attachments).optional(),from:t.string().min(3).max(320).optional()};export const MailSendSchema=t.strictObject({to:t.array(i).min(1).max(MAIL_LIMITS.recipients),cc:t.array(i).max(MAIL_LIMITS.recipients).optional(),subject:t.string().max(MAIL_LIMITS.subject),...s}),MailReplySchema=t.strictObject({all:t.boolean().optional(),...s}),MailSettingsSchema=t.strictObject({displayName:t.string().min(1).max(100).refine(e=>e.toLowerCase().includes(MAIL_AGENT_WORDS.toLowerCase()),{message:`A display name says "${MAIL_AGENT_WORDS}", so a recipient knows who writes.`}).optional(),sendPolicy:t.enum(MAIL_SEND_POLICIES).optional(),retentionDays:t.number().int().min(MAIL_LIMITS.retentionDays.min).max(MAIL_LIMITS.retentionDays.max).optional()});
@@ -47,44 +47,6 @@ export declare const NoteShapeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
47
47
  }, z.core.$strict>>;
48
48
  }, z.core.$strict>], "kind">;
49
49
  export { mapShape, pointsOf, touches };
50
- /** A mark's shape in the units of the anchor it is pinned to. */
51
- export declare const AnchoredShapeSchema: z.ZodObject<{
52
- anchor: z.ZodString;
53
- shape: z.ZodDiscriminatedUnion<[z.ZodObject<{
54
- kind: z.ZodLiteral<"box">;
55
- rect: z.ZodObject<{
56
- x: z.ZodNumber;
57
- y: z.ZodNumber;
58
- width: z.ZodNumber;
59
- height: z.ZodNumber;
60
- }, z.core.$strict>;
61
- }, z.core.$strict>, z.ZodObject<{
62
- kind: z.ZodLiteral<"round">;
63
- rect: z.ZodObject<{
64
- x: z.ZodNumber;
65
- y: z.ZodNumber;
66
- width: z.ZodNumber;
67
- height: z.ZodNumber;
68
- }, z.core.$strict>;
69
- }, z.core.$strict>, z.ZodObject<{
70
- kind: z.ZodLiteral<"arrow">;
71
- from: z.ZodObject<{
72
- x: z.ZodNumber;
73
- y: z.ZodNumber;
74
- }, z.core.$strict>;
75
- to: z.ZodObject<{
76
- x: z.ZodNumber;
77
- y: z.ZodNumber;
78
- }, z.core.$strict>;
79
- }, z.core.$strict>, z.ZodObject<{
80
- kind: z.ZodLiteral<"line">;
81
- points: z.ZodArray<z.ZodObject<{
82
- x: z.ZodNumber;
83
- y: z.ZodNumber;
84
- }, z.core.$strict>>;
85
- }, z.core.$strict>], "kind">;
86
- }, z.core.$strict>;
87
- export type AnchoredShape = z.infer<typeof AnchoredShapeSchema>;
88
50
  export type { NoteShape };
89
51
  /** Where to change something: a project's file, and its line. */
90
52
  export declare const NoteSourceSchema: z.ZodObject<{
@@ -103,39 +65,6 @@ export declare const HeldSchema: z.ZodObject<{
103
65
  }, z.core.$strict>>;
104
66
  }, z.core.$strict>;
105
67
  export type Held = z.infer<typeof HeldSchema>;
106
- /**
107
- * Where an anchor is on the card now: card px = origin + the anchor's own
108
- * units × scale, on each axis (a timeline's seconds and its rows zoom apart),
109
- * seen through `clip`, the box of what scrolls it. Null where it is not on
110
- * show: another slide, another moment, scrolled out of what is drawn, gone.
111
- */
112
- export declare const NotePlacementSchema: z.ZodNullable<z.ZodObject<{
113
- x: z.ZodNumber;
114
- y: z.ZodNumber;
115
- sx: z.ZodNumber;
116
- sy: z.ZodNumber;
117
- clip: z.ZodObject<{
118
- x: z.ZodNumber;
119
- y: z.ZodNumber;
120
- width: z.ZodNumber;
121
- height: z.ZodNumber;
122
- }, z.core.$strict>;
123
- }, z.core.$strict>>;
124
- export type NotePlacement = z.infer<typeof NotePlacementSchema>;
125
- /** Anchors by id, and where each is. */
126
- export declare const NotePlacementsSchema: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodObject<{
127
- x: z.ZodNumber;
128
- y: z.ZodNumber;
129
- sx: z.ZodNumber;
130
- sy: z.ZodNumber;
131
- clip: z.ZodObject<{
132
- x: z.ZodNumber;
133
- y: z.ZodNumber;
134
- width: z.ZodNumber;
135
- height: z.ZodNumber;
136
- }, z.core.$strict>;
137
- }, z.core.$strict>>>;
138
- export type NotePlacements = z.infer<typeof NotePlacementsSchema>;
139
68
  export declare const NotePictureSchema: z.ZodObject<{
140
69
  rect: z.ZodOptional<z.ZodObject<{
141
70
  x: z.ZodNumber;
@@ -183,31 +112,62 @@ export declare const NoteElementSchema: z.ZodObject<{
183
112
  }, z.core.$strict>>>;
184
113
  }, z.core.$strict>;
185
114
  export type NoteElement = z.infer<typeof NoteElementSchema>;
115
+ /** What a mark is on, as a surface answers: the elements under it, and where it is in words. */
116
+ export declare const NoteFoundSchema: z.ZodObject<{
117
+ elements: z.ZodArray<z.ZodObject<{
118
+ name: z.ZodString;
119
+ source: z.ZodOptional<z.ZodObject<{
120
+ path: z.ZodString;
121
+ line: z.ZodOptional<z.ZodInt>;
122
+ endLine: z.ZodOptional<z.ZodInt>;
123
+ }, z.core.$strict>>;
124
+ text: z.ZodOptional<z.ZodString>;
125
+ regions: z.ZodOptional<z.ZodArray<z.ZodObject<{
126
+ in: z.ZodString;
127
+ file: z.ZodOptional<z.ZodString>;
128
+ width: z.ZodNumber;
129
+ height: z.ZodNumber;
130
+ path: z.ZodString;
131
+ area: z.ZodBoolean;
132
+ scale: z.ZodNumber;
133
+ }, z.core.$strict>>>;
134
+ }, z.core.$strict>>;
135
+ where: z.ZodOptional<z.ZodString>;
136
+ }, z.core.$strict>;
137
+ export type NoteFound = z.infer<typeof NoteFoundSchema>;
186
138
  /**
187
- * What an editor gives its host for notes on it, for as long as it is on
188
- * show. Only `hold` is needed: the page that holds the editor gives its
189
- * scrollers as anchors and draws itself, so every editor is marked live,
190
- * and each call it adds pins more precisely. Points and shapes are px of
191
- * the page, which are the card's.
139
+ * What every editor gives its host for notes on it, for as long as it is on
140
+ * show (docs/design/notes.md, "The contract"): Mark up takes a picture of
141
+ * the page and the person marks it. From `hold` to `release` nothing on
142
+ * show changes: the editor stops what moves by itself, and the page holds
143
+ * back what its host tells it. The page draws itself; what it cannot draw
144
+ * (a frame, a WebGL view, a video) is an inset's (`NoteInset`). Points and
145
+ * shapes are px of the page.
192
146
  */
193
147
  export interface NoteSurface {
194
- /** Stops what moves by itself (playback) and says what is on show. Answered once it is drawn. */
148
+ /** Stops what moves by itself (playback, an animation) and says what is on show. Answered once it is drawn. */
195
149
  hold(): Promise<Held>;
196
- /** The anchor a press at a point is pinned to, at once; undefined leaves it to the page. */
197
- anchorAt?(at: NotePoint): string | undefined;
198
- /** Where one of its own anchors is now; undefined where the id is not its own. */
199
- placement?(anchor: string): NotePlacement | undefined;
200
- /** Calls `moved` whenever its anchors may have moved (a scroll of its own, a zoom, a turn, a seek); answers how to stop. */
201
- onMoved?(moved: () => void): () => void;
202
- /** Where a place is, in words for the agent: "under the heading Pricing", "slide 4", "at 3.20 s". */
203
- where?(at: NotePoint): string | undefined;
204
- /** What is on show drawn better than the page draws it, each at its rect. */
205
- pictures?(): Promise<NotePicture[]>;
206
- /** What a mark is on, while it is on show. */
207
- locate?(mark: NoteShape): Promise<NoteElement[]>;
208
- /** Brings a point of one of its own anchors back on show (turns to the slide, seeks the moment); false where it cannot. */
209
- show?(anchor: string, at: NotePoint): Promise<boolean>;
150
+ /** What a mark is on, among what the editor draws in the page itself; insets answer for theirs. Empty is an answer. */
151
+ locate(mark: NoteShape): Promise<NoteFound>;
210
152
  /** The person is done. Nothing starts by itself: a video that was paused stays paused. */
211
153
  release?(): void;
212
154
  }
155
+ /**
156
+ * A box of the page that draws itself and answers for what is in it: a
157
+ * stage's frame, a 3D view, a video, an item embedded in another. Whatever
158
+ * puts in the page what the page cannot draw gives one, whichever
159
+ * extension it is; insets nest by where they are, the page composes them
160
+ * and never asks what they show.
161
+ */
162
+ export interface NoteInset {
163
+ /** The part of it that shows, px of the page (cut by what scrolls or clips it): its pictures are cut to it. None while it is not on show. */
164
+ box(): NoteRect | undefined;
165
+ /** It drawn as it shows now, each part at its rect in px of the page; none where the page draws it. */
166
+ pictures?(): Promise<NotePicture[]>;
167
+ /** What a mark (px of the page) is on inside it. */
168
+ locate?(mark: NoteShape): Promise<NoteFound>;
169
+ /** Stops what moves by itself in it. */
170
+ hold?(): Promise<void>;
171
+ release?(): void;
172
+ }
213
173
  //# sourceMappingURL=notes.d.ts.map
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{z as t}from"zod";import{pointsOf as i,mapShape as n,touches as o}from"@allyhub/formats";import{PathSchema as e}from"./files.js";export const NoteRectSchema=t.strictObject({x:t.number(),y:t.number(),width:t.number().nonnegative(),height:t.number().nonnegative()}),NotePointSchema=t.strictObject({x:t.number(),y:t.number()}),NoteShapeSchema=t.discriminatedUnion("kind",[t.strictObject({kind:t.literal("box"),rect:NoteRectSchema}),t.strictObject({kind:t.literal("round"),rect:NoteRectSchema}),t.strictObject({kind:t.literal("arrow"),from:NotePointSchema,to:NotePointSchema}),t.strictObject({kind:t.literal("line"),points:t.array(NotePointSchema).min(1)})]);export{n as mapShape,i as pointsOf,o as touches};export const AnchoredShapeSchema=t.strictObject({anchor:t.string().min(1),shape:NoteShapeSchema}),NoteSourceSchema=t.strictObject({path:e,line:t.int().positive().optional(),endLine:t.int().positive().optional()}),HeldSchema=t.strictObject({key:t.string().min(1),what:t.string(),source:NoteSourceSchema.optional()}),NotePlacementSchema=t.strictObject({x:t.number(),y:t.number(),sx:t.number().positive(),sy:t.number().positive(),clip:NoteRectSchema}).nullable(),NotePlacementsSchema=t.record(t.string().min(1),NotePlacementSchema),NotePictureSchema=t.strictObject({rect:NoteRectSchema.optional(),mime:t.string().min(1),data:t.string().min(1)}),NoteRegionSchema=t.strictObject({in:t.string().min(1),file:e.optional(),width:t.number().positive(),height:t.number().positive(),path:t.string().min(1),area:t.boolean(),scale:t.number().positive()}),NoteElementSchema=t.strictObject({name:t.string().min(1),source:NoteSourceSchema.optional(),text:t.string().optional(),regions:t.array(NoteRegionSchema).optional()});
2
+ import{z as t}from"zod";import{pointsOf as i,mapShape as o,touches as n}from"@allyhub/formats";import{PathSchema as e}from"./files.js";export const NoteRectSchema=t.strictObject({x:t.number(),y:t.number(),width:t.number().nonnegative(),height:t.number().nonnegative()}),NotePointSchema=t.strictObject({x:t.number(),y:t.number()}),NoteShapeSchema=t.discriminatedUnion("kind",[t.strictObject({kind:t.literal("box"),rect:NoteRectSchema}),t.strictObject({kind:t.literal("round"),rect:NoteRectSchema}),t.strictObject({kind:t.literal("arrow"),from:NotePointSchema,to:NotePointSchema}),t.strictObject({kind:t.literal("line"),points:t.array(NotePointSchema).min(1)})]);export{o as mapShape,i as pointsOf,n as touches};export const NoteSourceSchema=t.strictObject({path:e,line:t.int().positive().optional(),endLine:t.int().positive().optional()}),HeldSchema=t.strictObject({key:t.string().min(1),what:t.string(),source:NoteSourceSchema.optional()}),NotePictureSchema=t.strictObject({rect:NoteRectSchema.optional(),mime:t.string().min(1),data:t.string().min(1)}),NoteRegionSchema=t.strictObject({in:t.string().min(1),file:e.optional(),width:t.number().positive(),height:t.number().positive(),path:t.string().min(1),area:t.boolean(),scale:t.number().positive()}),NoteElementSchema=t.strictObject({name:t.string().min(1),source:NoteSourceSchema.optional(),text:t.string().optional(),regions:t.array(NoteRegionSchema).optional()}),NoteFoundSchema=t.strictObject({elements:t.array(NoteElementSchema),where:t.string().optional()});
@@ -29,8 +29,8 @@ export declare const CHECK_STATES: readonly ["off", "waiting", "running", "done"
29
29
  /** The check the server runs after edits, as it stands. */
30
30
  export declare const CheckStateSchema: z.ZodObject<{
31
31
  status: z.ZodEnum<{
32
- failed: "failed";
33
32
  off: "off";
33
+ failed: "failed";
34
34
  running: "running";
35
35
  done: "done";
36
36
  waiting: "waiting";
@@ -232,8 +232,8 @@ export declare const PROJECT_TOOLS: {
232
232
  }, z.core.$strict>>;
233
233
  readonly "check/results": MethodSpec<z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
234
234
  status: z.ZodEnum<{
235
- failed: "failed";
236
235
  off: "off";
236
+ failed: "failed";
237
237
  running: "running";
238
238
  done: "done";
239
239
  waiting: "waiting";
@@ -370,8 +370,8 @@ export declare const TOOL_NOTIFICATIONS: {
370
370
  }, z.core.$strict>>;
371
371
  readonly "check/changed": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{
372
372
  status: z.ZodEnum<{
373
- failed: "failed";
374
373
  off: "off";
374
+ failed: "failed";
375
375
  running: "running";
376
376
  done: "done";
377
377
  waiting: "waiting";
@@ -1,11 +1,15 @@
1
1
  {
2
2
  "name": "@allyhub/protocol",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.ts",
8
8
  "default": "./dist/index.js"
9
+ },
10
+ "./browser-bridge": {
11
+ "types": "./dist/browser-bridge.d.ts",
12
+ "default": "./dist/browser-bridge.js"
9
13
  }
10
14
  },
11
15
  "sideEffects": false,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/runtimes",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -11,9 +11,9 @@ export { AUTO_EXPOSURE_DEFAULTS, AUTOFOCUS_DEFAULTS, handheld, HANDHELD_DEFAULTS
11
11
  export { bandNoise, gauss3, hash3, powerNoise, swellOf, unit3, type Band, type Slope, } from "./noise.js";
12
12
  export { convexHull, floorRect, type Floor, type FloorRect } from "./hull.js";
13
13
  export { solveCamera, SOLVE_DEFAULTS, SOLVE_PARAMS, type SolveLine, type SolveOptions, type SolveParam, type SolvePoint, type SolveResidual, type SolveResult, } from "./solve.js";
14
- export { invert3, moireAt, moireBand, moireCamera, moireProblems, moireScreen, MOIRE_GLSL, MOIRE_SCREENS, PANEL_DEFAULTS, SENSOR_DEFAULTS, STRIPE_DEPTH, type MoireCamera, type MoireScreen, type PanelOptions, type SensorOptions, } from "./moire.js";
14
+ export { invert3, moireAt, moireBand, moireCamera, moireProblems, screenGradeWeight, moireScreen, MOIRE_GLSL, MOIRE_SCREENS, PANEL_DEFAULTS, SENSOR_DEFAULTS, STRIPE_DEPTH, type MoireCamera, type MoireScreen, type PanelOptions, type Grade, type SensorGrade, type SensorOptions, } from "./moire.js";
15
15
  export { screenFocus, SCREEN_FOCUS_DEFAULTS, type ScreenFocus, type ScreenFocusOptions, } from "./screen-focus.js";
16
- export { apply, homography, matrix3d, screenOnFrame, shownCentre, SCREEN_LIGHT_DEFAULTS, screenLightBaseProblem, type Px, type ScreenLightBase, type ScreenOnFrame, } from "./screen.js";
16
+ export { apply, homography, matrix3d, clipToFrame, screenOnFrame, shownCentre, SCREEN_LIGHT_DEFAULTS, screenLightBaseProblem, type Px, type ScreenLightBase, type ScreenOnFrame, } from "./screen.js";
17
17
  export { AROUND_DEFAULTS, FLOOR_DEFAULTS, INVENTORY_FRAME, MAP_DEFAULTS, MAP_VIEWS, MEASURE_DEFAULTS, MOTION_DEFAULTS, SIDES, type AxisBox, type CameraClearance, type CameraSource, type Channel, type ClearAhead, type Contact, type FreeFloor, type Levels, type MeasureRequest, type MeasureResult, type MeshHealth, type Motion, type MotionRequest, type SeeRequest, type SeeResult, type SeeTile, type Sight, type Support, type DrawnCamera, type Footprint, type MapPath, type MapRequest, type MapResult, type MapView, type MapViewResult, type OwnBox, type PointRef, type PointsRequest, type Seen, type Side, type UprightBox, type ViewRequest, type ViewResult, type ViewTile, type ViewTileResult, type SceneryInventory, type SceneryLight, type SceneryObject, topObjects, } from "./report.js";
18
18
  export { channel, motionOf, type CameraSample, type MotionNumbers, } from "./motion.js";
19
19
  export { easeValue, timedNumber, type Ease, type NumberKey } from "./timing.js";
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- export{blurDiameter,CAMERA_DEFAULTS,CameraError,cameraProblems,directionOf,exposureOf,project,resolveCamera,yawPitchOf}from"./camera.js";export{BAKE_CPU,BAKE_DEFAULTS,BAKE_MIN_SIZE,bakeProblems,bakeRenderer,resolveBake}from"./bake.js";export{Curve,SAME_POINT}from"./curve.js";export{defineScenery,isScenery,SCENERY_RENDERER_DEFAULTS}from"./define.js";export{FIT_DEFAULTS,fitCamera}from"./fit.js";export{diagonalLens,fieldOfView,fieldOfViewFromVertical,FULL_FRAME_DIAGONAL,lensForVertical,lensFrameProblem}from"./lens.js";export{blend,cutsOf,focusScreen,keys,mixCameras,momentOf,orbit,path,PATH_DEFAULTS,pathCurve,shots,stateOf,withCuts,NeedsTimeError}from"./move.js";export{GLASS_DEFAULTS,glassIor,glassProblems}from"./glass.js";export{aimAt,aimed,AIM_DEFAULTS,aimProblem,aimShape,rise}from"./aim.js";export{AUTO_EXPOSURE_DEFAULTS,AUTOFOCUS_DEFAULTS,handheld,HANDHELD_DEFAULTS,handheldProblem,STABILIZER_DEFAULTS}from"./handheld.js";export{bandNoise,gauss3,hash3,powerNoise,swellOf,unit3}from"./noise.js";export{convexHull,floorRect}from"./hull.js";export{solveCamera,SOLVE_DEFAULTS,SOLVE_PARAMS}from"./solve.js";export{invert3,moireAt,moireBand,moireCamera,moireProblems,moireScreen,MOIRE_GLSL,MOIRE_SCREENS,PANEL_DEFAULTS,SENSOR_DEFAULTS,STRIPE_DEPTH}from"./moire.js";export{screenFocus,SCREEN_FOCUS_DEFAULTS}from"./screen-focus.js";export{apply,homography,matrix3d,screenOnFrame,shownCentre,SCREEN_LIGHT_DEFAULTS,screenLightBaseProblem}from"./screen.js";export{AROUND_DEFAULTS,FLOOR_DEFAULTS,INVENTORY_FRAME,MAP_DEFAULTS,MAP_VIEWS,MEASURE_DEFAULTS,MOTION_DEFAULTS,SIDES,topObjects}from"./report.js";export{channel,motionOf}from"./motion.js";export{easeValue,timedNumber}from"./timing.js";export{PHONE_CAMERA,phoneCamera}from"./phone.js";
2
+ export{blurDiameter,CAMERA_DEFAULTS,CameraError,cameraProblems,directionOf,exposureOf,project,resolveCamera,yawPitchOf}from"./camera.js";export{BAKE_CPU,BAKE_DEFAULTS,BAKE_MIN_SIZE,bakeProblems,bakeRenderer,resolveBake}from"./bake.js";export{Curve,SAME_POINT}from"./curve.js";export{defineScenery,isScenery,SCENERY_RENDERER_DEFAULTS}from"./define.js";export{FIT_DEFAULTS,fitCamera}from"./fit.js";export{diagonalLens,fieldOfView,fieldOfViewFromVertical,FULL_FRAME_DIAGONAL,lensForVertical,lensFrameProblem}from"./lens.js";export{blend,cutsOf,focusScreen,keys,mixCameras,momentOf,orbit,path,PATH_DEFAULTS,pathCurve,shots,stateOf,withCuts,NeedsTimeError}from"./move.js";export{GLASS_DEFAULTS,glassIor,glassProblems}from"./glass.js";export{aimAt,aimed,AIM_DEFAULTS,aimProblem,aimShape,rise}from"./aim.js";export{AUTO_EXPOSURE_DEFAULTS,AUTOFOCUS_DEFAULTS,handheld,HANDHELD_DEFAULTS,handheldProblem,STABILIZER_DEFAULTS}from"./handheld.js";export{bandNoise,gauss3,hash3,powerNoise,swellOf,unit3}from"./noise.js";export{convexHull,floorRect}from"./hull.js";export{solveCamera,SOLVE_DEFAULTS,SOLVE_PARAMS}from"./solve.js";export{invert3,moireAt,moireBand,moireCamera,moireProblems,screenGradeWeight,moireScreen,MOIRE_GLSL,MOIRE_SCREENS,PANEL_DEFAULTS,SENSOR_DEFAULTS,STRIPE_DEPTH}from"./moire.js";export{screenFocus,SCREEN_FOCUS_DEFAULTS}from"./screen-focus.js";export{apply,homography,matrix3d,clipToFrame,screenOnFrame,shownCentre,SCREEN_LIGHT_DEFAULTS,screenLightBaseProblem}from"./screen.js";export{AROUND_DEFAULTS,FLOOR_DEFAULTS,INVENTORY_FRAME,MAP_DEFAULTS,MAP_VIEWS,MEASURE_DEFAULTS,MOTION_DEFAULTS,SIDES,topObjects}from"./report.js";export{channel,motionOf}from"./motion.js";export{easeValue,timedNumber}from"./timing.js";export{PHONE_CAMERA,phoneCamera}from"./phone.js";