@allyhub/sdk 0.9.0 → 0.11.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.
- package/CHANGELOG.md +16 -0
- package/dist/node_modules/@allyhub/audio/package.json +1 -1
- package/dist/node_modules/@allyhub/chart/dist/chart-xml.d.ts +3 -0
- package/dist/node_modules/@allyhub/chart/dist/chart-xml.js +2 -2
- package/dist/node_modules/@allyhub/chart/dist/chart.d.ts +22 -0
- package/dist/node_modules/@allyhub/chart/dist/chart.js +1 -1
- package/dist/node_modules/@allyhub/chart/package.json +1 -1
- package/dist/node_modules/@allyhub/diagnostics/dist/problem.d.ts +7 -0
- package/dist/node_modules/@allyhub/diagnostics/package.json +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/faces.d.ts +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/sheet.d.ts +87 -1
- package/dist/node_modules/@allyhub/formats/dist/data/sheet.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +89 -0
- package/dist/node_modules/@allyhub/formats/dist/data/slides.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/note-shape.d.ts +20 -0
- package/dist/node_modules/@allyhub/formats/dist/note-shape.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/schemas.d.ts +50 -0
- package/dist/node_modules/@allyhub/formats/package.json +1 -1
- package/dist/node_modules/@allyhub/image-draw/package.json +1 -1
- package/dist/node_modules/@allyhub/image-measure/package.json +1 -1
- package/dist/node_modules/@allyhub/image-sdk/dist/index.d.ts +1 -1
- package/dist/node_modules/@allyhub/image-sdk/package.json +1 -1
- package/dist/node_modules/@allyhub/measure/package.json +1 -1
- package/dist/node_modules/@allyhub/ooxml/dist/geometry/index.js +1 -1
- package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
- package/dist/node_modules/@allyhub/piece/dist/layer.d.ts +2 -0
- package/dist/node_modules/@allyhub/piece/dist/layout.d.ts +16 -0
- package/dist/node_modules/@allyhub/piece/dist/page/index.d.ts +1 -1
- package/dist/node_modules/@allyhub/piece/dist/page/index.js +1 -1
- package/dist/node_modules/@allyhub/piece/dist/page/locate.d.ts +14 -1
- package/dist/node_modules/@allyhub/piece/dist/page/locate.js +1 -1
- package/dist/node_modules/@allyhub/piece/dist/stage.d.ts +18 -0
- package/dist/node_modules/@allyhub/piece/package.json +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/account.d.ts +140 -0
- package/dist/node_modules/@allyhub/protocol/dist/account.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/auth.d.ts +19 -1
- package/dist/node_modules/@allyhub/protocol/dist/auth.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/cloud.d.ts +157 -0
- package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +10 -2
- package/dist/node_modules/@allyhub/protocol/dist/editor.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +101 -186
- package/dist/node_modules/@allyhub/protocol/dist/frame.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/mail.d.ts +1 -0
- package/dist/node_modules/@allyhub/protocol/dist/mail.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/notes.d.ts +92 -94
- package/dist/node_modules/@allyhub/protocol/dist/notes.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/snapshots.d.ts +17 -0
- package/dist/node_modules/@allyhub/protocol/dist/snapshots.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/teams.d.ts +7 -0
- package/dist/node_modules/@allyhub/protocol/dist/teams.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +15 -3
- package/dist/node_modules/@allyhub/protocol/dist/tools.js +1 -1
- package/dist/node_modules/@allyhub/protocol/package.json +1 -1
- package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
- package/dist/node_modules/@allyhub/scenery/dist/index.d.ts +2 -2
- package/dist/node_modules/@allyhub/scenery/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/scenery/dist/moire.d.ts +45 -5
- package/dist/node_modules/@allyhub/scenery/dist/moire.js +2 -2
- package/dist/node_modules/@allyhub/scenery/dist/phone.d.ts +4 -3
- package/dist/node_modules/@allyhub/scenery/dist/phone.js +1 -1
- package/dist/node_modules/@allyhub/scenery/package.json +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/coerce.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/engine.d.ts +70 -0
- package/dist/node_modules/@allyhub/sheet/dist/calc/engine.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/criteria.d.ts +6 -0
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/criteria.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/date.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/define.d.ts +3 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/define.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/info.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/kernels.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/lookup.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/maths.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/text.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/indexes.d.ts +9 -0
- package/dist/node_modules/@allyhub/sheet/dist/calc/indexes.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/types.d.ts +6 -0
- package/dist/node_modules/@allyhub/sheet/dist/calc/types.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/chart.d.ts +9 -0
- package/dist/node_modules/@allyhub/sheet/dist/chart.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/export.d.ts +0 -8
- package/dist/node_modules/@allyhub/sheet/dist/export.js +2 -4
- package/dist/node_modules/@allyhub/sheet/dist/formula/ast.d.ts +12 -1
- package/dist/node_modules/@allyhub/sheet/dist/formula/move.d.ts +5 -1
- package/dist/node_modules/@allyhub/sheet/dist/formula/move.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/formula/parse.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/formula/print.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/index.d.ts +3 -2
- package/dist/node_modules/@allyhub/sheet/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/inspect.d.ts +12 -2
- package/dist/node_modules/@allyhub/sheet/dist/inspect.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/printed.d.ts +19 -0
- package/dist/node_modules/@allyhub/sheet/dist/printed.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/values.d.ts +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/values.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/workbook.d.ts +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/workbook.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/write.js +15 -15
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.d.ts +6 -2
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/formula.js +2 -2
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.d.ts +0 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/read.d.ts +3 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/read.js +2 -2
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/sax.d.ts +7 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/sax.js +3 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/styles.d.ts +6 -0
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/styles.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/write.d.ts +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/write.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/xml.d.ts +12 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/xml.js +3 -2
- package/dist/node_modules/@allyhub/sheet/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/api.d.ts +57 -7
- package/dist/node_modules/@allyhub/slides-core/dist/api.js +2 -2
- package/dist/node_modules/@allyhub/slides-core/dist/capabilities.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/enums.d.ts +24 -0
- package/dist/node_modules/@allyhub/slides-core/dist/enums.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/fact.d.ts +15 -0
- package/dist/node_modules/@allyhub/slides-core/dist/measure.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/model.d.ts +6 -2
- package/dist/node_modules/@allyhub/slides-core/dist/resolve.d.ts +3 -1
- package/dist/node_modules/@allyhub/slides-core/dist/resolve.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/sdk.d.ts +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/sdk.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/piece.d.ts +2 -2
- package/dist/node_modules/@allyhub/video-core/dist/schema.d.ts +2 -2
- package/dist/node_modules/@allyhub/video-core/dist/schema.js +1 -1
- package/dist/node_modules/@allyhub/video-core/package.json +1 -1
- package/dist/node_modules/@allyhub/video-sdk/dist/phone.d.ts +12 -5
- package/dist/node_modules/@allyhub/video-sdk/dist/phone.js +1 -1
- package/dist/node_modules/@allyhub/video-sdk/package.json +1 -1
- package/docs/README.md +4 -0
- package/docs/canvas.md +28 -0
- package/docs/defaults.md +30 -4
- package/docs/docs.md +10 -10
- package/docs/image.md +3 -3
- package/docs/linkedin.md +96 -0
- package/docs/reports.md +89 -0
- package/docs/scenery.md +3 -4
- package/docs/sheets.md +23 -6
- package/docs/slides.md +50 -4
- package/docs/speech.md +1 -1
- package/docs/x.md +73 -0
- package/package.json +1 -1
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
/** What the window asks the page. */
|
|
3
3
|
export declare const FRAME_METHODS: {
|
|
4
|
-
readonly "note/hold": import("./jsonrpc.js").MethodSpec<z.ZodObject<{
|
|
4
|
+
readonly "note/hold": import("./jsonrpc.js").MethodSpec<z.ZodObject<{
|
|
5
|
+
selection: z.ZodOptional<z.ZodBoolean>;
|
|
6
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
5
7
|
key: z.ZodString;
|
|
6
8
|
what: z.ZodString;
|
|
7
9
|
source: z.ZodOptional<z.ZodObject<{
|
|
@@ -9,44 +11,66 @@ export declare const FRAME_METHODS: {
|
|
|
9
11
|
line: z.ZodOptional<z.ZodInt>;
|
|
10
12
|
endLine: z.ZodOptional<z.ZodInt>;
|
|
11
13
|
}, z.core.$strict>>;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
25
|
-
kind: z.ZodLiteral<"round">;
|
|
26
|
-
rect: z.ZodObject<{
|
|
27
|
-
x: z.ZodNumber;
|
|
28
|
-
y: z.ZodNumber;
|
|
14
|
+
selected: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
15
|
+
element: z.ZodObject<{
|
|
16
|
+
name: z.ZodString;
|
|
17
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
18
|
+
path: z.ZodString;
|
|
19
|
+
line: z.ZodOptional<z.ZodInt>;
|
|
20
|
+
endLine: z.ZodOptional<z.ZodInt>;
|
|
21
|
+
}, z.core.$strict>>;
|
|
22
|
+
text: z.ZodOptional<z.ZodString>;
|
|
23
|
+
regions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
24
|
+
in: z.ZodString;
|
|
25
|
+
file: z.ZodOptional<z.ZodString>;
|
|
29
26
|
width: z.ZodNumber;
|
|
30
27
|
height: z.ZodNumber;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
28
|
+
path: z.ZodString;
|
|
29
|
+
area: z.ZodBoolean;
|
|
30
|
+
scale: z.ZodNumber;
|
|
31
|
+
}, z.core.$strict>>>;
|
|
32
|
+
}, z.core.$strict>;
|
|
33
|
+
outline: z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
34
|
+
x: z.ZodNumber;
|
|
35
|
+
y: z.ZodNumber;
|
|
36
|
+
}, z.core.$strict>>>;
|
|
37
|
+
where: z.ZodOptional<z.ZodString>;
|
|
38
|
+
}, z.core.$strict>>>;
|
|
39
|
+
}, z.core.$strict>>;
|
|
40
|
+
readonly "note/locate": import("./jsonrpc.js").MethodSpec<z.ZodObject<{
|
|
41
|
+
shape: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
42
|
+
kind: z.ZodLiteral<"box">;
|
|
43
|
+
rect: z.ZodObject<{
|
|
44
|
+
x: z.ZodNumber;
|
|
45
|
+
y: z.ZodNumber;
|
|
46
|
+
width: z.ZodNumber;
|
|
47
|
+
height: z.ZodNumber;
|
|
48
|
+
}, z.core.$strict>;
|
|
49
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
50
|
+
kind: z.ZodLiteral<"round">;
|
|
51
|
+
rect: z.ZodObject<{
|
|
52
|
+
x: z.ZodNumber;
|
|
53
|
+
y: z.ZodNumber;
|
|
54
|
+
width: z.ZodNumber;
|
|
55
|
+
height: z.ZodNumber;
|
|
56
|
+
}, z.core.$strict>;
|
|
57
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
58
|
+
kind: z.ZodLiteral<"arrow">;
|
|
59
|
+
from: z.ZodObject<{
|
|
60
|
+
x: z.ZodNumber;
|
|
61
|
+
y: z.ZodNumber;
|
|
62
|
+
}, z.core.$strict>;
|
|
63
|
+
to: z.ZodObject<{
|
|
64
|
+
x: z.ZodNumber;
|
|
65
|
+
y: z.ZodNumber;
|
|
66
|
+
}, z.core.$strict>;
|
|
67
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
68
|
+
kind: z.ZodLiteral<"line">;
|
|
69
|
+
points: z.ZodArray<z.ZodObject<{
|
|
70
|
+
x: z.ZodNumber;
|
|
71
|
+
y: z.ZodNumber;
|
|
72
|
+
}, z.core.$strict>>;
|
|
73
|
+
}, z.core.$strict>], "kind">;
|
|
50
74
|
}, z.core.$strict>, z.ZodObject<{
|
|
51
75
|
elements: z.ZodArray<z.ZodObject<{
|
|
52
76
|
name: z.ZodString;
|
|
@@ -68,18 +92,39 @@ export declare const FRAME_METHODS: {
|
|
|
68
92
|
}, z.core.$strict>>;
|
|
69
93
|
where: z.ZodOptional<z.ZodString>;
|
|
70
94
|
}, z.core.$strict>>;
|
|
71
|
-
readonly "note/
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
95
|
+
readonly "note/pick": import("./jsonrpc.js").MethodSpec<z.ZodObject<{
|
|
96
|
+
at: z.ZodObject<{
|
|
97
|
+
x: z.ZodNumber;
|
|
98
|
+
y: z.ZodNumber;
|
|
99
|
+
}, z.core.$strict>;
|
|
100
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
101
|
+
pick: z.ZodOptional<z.ZodObject<{
|
|
102
|
+
element: z.ZodObject<{
|
|
103
|
+
name: z.ZodString;
|
|
104
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
105
|
+
path: z.ZodString;
|
|
106
|
+
line: z.ZodOptional<z.ZodInt>;
|
|
107
|
+
endLine: z.ZodOptional<z.ZodInt>;
|
|
108
|
+
}, z.core.$strict>>;
|
|
109
|
+
text: z.ZodOptional<z.ZodString>;
|
|
110
|
+
regions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
111
|
+
in: z.ZodString;
|
|
112
|
+
file: z.ZodOptional<z.ZodString>;
|
|
113
|
+
width: z.ZodNumber;
|
|
114
|
+
height: z.ZodNumber;
|
|
115
|
+
path: z.ZodString;
|
|
116
|
+
area: z.ZodBoolean;
|
|
117
|
+
scale: z.ZodNumber;
|
|
118
|
+
}, z.core.$strict>>>;
|
|
119
|
+
}, z.core.$strict>;
|
|
120
|
+
outline: z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
76
121
|
x: z.ZodNumber;
|
|
77
122
|
y: z.ZodNumber;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}, z.core.$strict>;
|
|
123
|
+
}, z.core.$strict>>>;
|
|
124
|
+
where: z.ZodOptional<z.ZodString>;
|
|
81
125
|
}, z.core.$strict>>;
|
|
82
|
-
}, z.core.$strict
|
|
126
|
+
}, z.core.$strict>>;
|
|
127
|
+
readonly "note/pictures": import("./jsonrpc.js").MethodSpec<z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
|
|
83
128
|
pictures: z.ZodArray<z.ZodObject<{
|
|
84
129
|
rect: z.ZodOptional<z.ZodObject<{
|
|
85
130
|
x: z.ZodNumber;
|
|
@@ -90,167 +135,36 @@ export declare const FRAME_METHODS: {
|
|
|
90
135
|
mime: z.ZodString;
|
|
91
136
|
data: z.ZodString;
|
|
92
137
|
}, z.core.$strict>>;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
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<{
|
|
138
|
+
uncovered: z.ZodArray<z.ZodObject<{
|
|
139
|
+
name: z.ZodString;
|
|
140
|
+
rect: z.ZodObject<{
|
|
115
141
|
x: z.ZodNumber;
|
|
116
142
|
y: z.ZodNumber;
|
|
117
143
|
width: z.ZodNumber;
|
|
118
144
|
height: z.ZodNumber;
|
|
119
145
|
}, 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;
|
|
146
|
+
}, z.core.$strict>>;
|
|
130
147
|
}, z.core.$strict>>;
|
|
131
148
|
readonly "note/release": import("./jsonrpc.js").MethodSpec<z.ZodObject<{}, z.core.$strict>, z.ZodObject<{}, z.core.$strict>>;
|
|
132
149
|
};
|
|
133
150
|
/** What the window tells the page. */
|
|
134
151
|
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
152
|
readonly "editor/command": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{
|
|
141
153
|
command: z.ZodString;
|
|
142
154
|
open: z.ZodOptional<z.ZodBoolean>;
|
|
143
155
|
}, z.core.$strict>>;
|
|
144
156
|
};
|
|
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
157
|
/** What the page tells the window. */
|
|
192
158
|
export declare const FRAME_NOTIFICATIONS: {
|
|
193
159
|
readonly "note/ready": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{}, z.core.$strict>>;
|
|
194
160
|
readonly "note/gone": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{}, z.core.$strict>>;
|
|
195
|
-
readonly "
|
|
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
|
-
}>;
|
|
161
|
+
readonly "window/key": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{
|
|
237
162
|
key: z.ZodString;
|
|
238
163
|
code: z.ZodString;
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
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>>>;
|
|
164
|
+
meta: z.ZodBoolean;
|
|
165
|
+
ctrl: z.ZodBoolean;
|
|
166
|
+
shift: z.ZodBoolean;
|
|
167
|
+
alt: z.ZodBoolean;
|
|
254
168
|
}, z.core.$strict>>;
|
|
255
169
|
readonly "agent/ask": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{
|
|
256
170
|
text: z.ZodString;
|
|
@@ -262,6 +176,7 @@ export declare const FRAME_NOTIFICATIONS: {
|
|
|
262
176
|
width: z.ZodNumber;
|
|
263
177
|
height: z.ZodNumber;
|
|
264
178
|
}, z.core.$strict>>;
|
|
179
|
+
selection: z.ZodOptional<z.ZodBoolean>;
|
|
265
180
|
}, z.core.$strict>>;
|
|
266
181
|
readonly "share/begin": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{}, z.core.$strict>>;
|
|
267
182
|
readonly "edit/request": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{}, z.core.$strict>>;
|
|
@@ -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
|
|
2
|
+
import{z as e}from"zod";import{EDITOR_STATES as r,ExportStateSchema as n,PlaceSchema as a}from"./editor.js";import{AgentHereSchema as h}from"./presence.js";import{PathSchema as c}from"./files.js";import{method as o,notification as t}from"./jsonrpc.js";import{HeldSchema as d,NoteFoundSchema as p,NotePickSchema as s,NotePictureSchema as m,NotePointSchema as w,NoteRectSchema as i,NoteShapeSchema as l}from"./notes.js";export const FRAME_METHODS={"note/hold":o(e.strictObject({selection:e.boolean().optional()}),d.extend({selected:e.array(s).optional()}),"Holds what moves by itself while the person marks a picture of it; says what is on show, and with `selection` what is selected in it."),"note/locate":o(e.strictObject({shape:l}),p,"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/pick":o(e.strictObject({at:w}),e.strictObject({pick:s.optional()}),"The one thing in front at a point, with its edge: the innermost inset's under it that answers, else the editor's. None is an answer."),"note/pictures":o(e.strictObject({}),e.strictObject({pictures:e.array(m),uncovered:e.array(e.strictObject({name:e.string(),rect:i}))}),"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:i.optional(),selection:e.boolean().optional()}),"The person asked for Mark up from the editor: the window shows its tools, or with `selection` begins with what is selected marked; `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 pressed an Edit of the page's own on a read-only page, or the page needs the machine for what they asked: the window wakes it. Never for a key pressed in the item."),"editor/place":t(e.strictObject({item:c,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(n,"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(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`.")};
|
|
@@ -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()});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
2
|
+
import { insideOutline, mapOutline, mapShape, outlineBox, pointsOf, rectOutline, roundOutline, touches, turnedOutline, type NoteOutline, type NoteShape } from "@allyhub/formats";
|
|
3
3
|
export declare const NoteRectSchema: z.ZodObject<{
|
|
4
4
|
x: z.ZodNumber;
|
|
5
5
|
y: z.ZodNumber;
|
|
@@ -46,46 +46,8 @@ export declare const NoteShapeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
46
46
|
y: z.ZodNumber;
|
|
47
47
|
}, z.core.$strict>>;
|
|
48
48
|
}, z.core.$strict>], "kind">;
|
|
49
|
-
export { mapShape, pointsOf, touches };
|
|
50
|
-
|
|
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
|
-
export type { NoteShape };
|
|
49
|
+
export { insideOutline, mapOutline, mapShape, outlineBox, pointsOf, rectOutline, roundOutline, touches, turnedOutline, };
|
|
50
|
+
export type { NoteOutline, NoteShape };
|
|
89
51
|
/** Where to change something: a project's file, and its line. */
|
|
90
52
|
export declare const NoteSourceSchema: z.ZodObject<{
|
|
91
53
|
path: z.ZodString;
|
|
@@ -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,100 @@ 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
|
-
*
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
|
|
139
|
+
* An element a person picked rather than drew round (docs/design/notes.md,
|
|
140
|
+
* "Select"): what it is, and its edge as it is drawn, closed rings of
|
|
141
|
+
* points in px of the surface. The host draws the edge as the mark and
|
|
142
|
+
* passes the element on unread.
|
|
143
|
+
*/
|
|
144
|
+
export declare const NotePickSchema: z.ZodObject<{
|
|
145
|
+
element: z.ZodObject<{
|
|
146
|
+
name: z.ZodString;
|
|
147
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
148
|
+
path: z.ZodString;
|
|
149
|
+
line: z.ZodOptional<z.ZodInt>;
|
|
150
|
+
endLine: z.ZodOptional<z.ZodInt>;
|
|
151
|
+
}, z.core.$strict>>;
|
|
152
|
+
text: z.ZodOptional<z.ZodString>;
|
|
153
|
+
regions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
154
|
+
in: z.ZodString;
|
|
155
|
+
file: z.ZodOptional<z.ZodString>;
|
|
156
|
+
width: z.ZodNumber;
|
|
157
|
+
height: z.ZodNumber;
|
|
158
|
+
path: z.ZodString;
|
|
159
|
+
area: z.ZodBoolean;
|
|
160
|
+
scale: z.ZodNumber;
|
|
161
|
+
}, z.core.$strict>>>;
|
|
162
|
+
}, z.core.$strict>;
|
|
163
|
+
outline: z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
164
|
+
x: z.ZodNumber;
|
|
165
|
+
y: z.ZodNumber;
|
|
166
|
+
}, z.core.$strict>>>;
|
|
167
|
+
where: z.ZodOptional<z.ZodString>;
|
|
168
|
+
}, z.core.$strict>;
|
|
169
|
+
export type NotePick = z.infer<typeof NotePickSchema>;
|
|
170
|
+
/**
|
|
171
|
+
* What every editor gives its host for notes on it, for as long as it is on
|
|
172
|
+
* show (docs/design/notes.md, "The contract"): Mark up takes a picture of
|
|
173
|
+
* the page and the person marks it. From `hold` to `release` nothing on
|
|
174
|
+
* show changes: the editor stops what moves by itself, and the page holds
|
|
175
|
+
* back what its host tells it. The page draws itself; what it cannot draw
|
|
176
|
+
* (a frame, a WebGL view, a video) is an inset's (`NoteInset`). Points and
|
|
177
|
+
* shapes are px of the page.
|
|
192
178
|
*/
|
|
193
179
|
export interface NoteSurface {
|
|
194
|
-
/** Stops what moves by itself (playback) and says what is on show. Answered once it is drawn. */
|
|
180
|
+
/** Stops what moves by itself (playback, an animation) and says what is on show. Answered once it is drawn. */
|
|
195
181
|
hold(): Promise<Held>;
|
|
196
|
-
/**
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
|
|
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>;
|
|
182
|
+
/** What a mark is on, among what the editor draws in the page itself; insets answer for theirs. Empty is an answer. */
|
|
183
|
+
locate(mark: NoteShape): Promise<NoteFound>;
|
|
184
|
+
/** The one thing in front at a point, among what the editor draws in the page itself, with its edge; none where there is nothing to pick. */
|
|
185
|
+
pick?(at: NotePoint): Promise<NotePick | undefined>;
|
|
186
|
+
/** What the person has selected in the editor now, each as a pick: what Mark up asked from a selection marks. None where nothing is. */
|
|
187
|
+
selected?(): Promise<NotePick[]>;
|
|
210
188
|
/** The person is done. Nothing starts by itself: a video that was paused stays paused. */
|
|
211
189
|
release?(): void;
|
|
212
190
|
}
|
|
191
|
+
/**
|
|
192
|
+
* A box of the page that draws itself and answers for what is in it: a
|
|
193
|
+
* stage's frame, a 3D view, a video, an item embedded in another. Whatever
|
|
194
|
+
* puts in the page what the page cannot draw gives one, whichever
|
|
195
|
+
* extension it is; insets nest by where they are, the page composes them
|
|
196
|
+
* and never asks what they show.
|
|
197
|
+
*/
|
|
198
|
+
export interface NoteInset {
|
|
199
|
+
/** 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. */
|
|
200
|
+
box(): NoteRect | undefined;
|
|
201
|
+
/** It drawn as it shows now, each part at its rect in px of the page; none where the page draws it. */
|
|
202
|
+
pictures?(): Promise<NotePicture[]>;
|
|
203
|
+
/** What a mark (px of the page) is on inside it. */
|
|
204
|
+
locate?(mark: NoteShape): Promise<NoteFound>;
|
|
205
|
+
/** The one thing in front at a point (px of the page) inside it, with its edge. */
|
|
206
|
+
pick?(at: NotePoint): Promise<NotePick | undefined>;
|
|
207
|
+
/** Stops what moves by itself in it. */
|
|
208
|
+
hold?(): Promise<void>;
|
|
209
|
+
release?(): void;
|
|
210
|
+
}
|
|
213
211
|
//# 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{
|
|
2
|
+
import{z as t}from"zod";import{insideOutline as i,mapOutline as n,mapShape as o,outlineBox as r,pointsOf as c,rectOutline as a,roundOutline as s,touches as m,turnedOutline as p}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{i as insideOutline,n as mapOutline,o as mapShape,r as outlineBox,c as pointsOf,a as rectOutline,s as roundOutline,m as touches,p as turnedOutline};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()}),NotePickSchema=t.strictObject({element:NoteElementSchema,outline:t.array(t.array(NotePointSchema).min(3)).min(1),where:t.string().optional()});
|