@xom11/whiteboard 0.28.0 → 0.29.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/dist/ai.d.mts +236 -295
- package/dist/ai.d.ts +236 -295
- package/dist/ai.js +6019 -7612
- package/dist/ai.js.map +1 -1
- package/dist/ai.mjs +4804 -5457
- package/dist/ai.mjs.map +1 -1
- package/dist/catalog.json +2 -2
- package/dist/{chunk-AJAHD35N.mjs → chunk-E6EDOPGT.mjs} +3 -105
- package/dist/chunk-E6EDOPGT.mjs.map +1 -0
- package/dist/{chunk-QCZVFEN4.mjs → chunk-GEC2D2EQ.mjs} +3 -3
- package/dist/{chunk-QCZVFEN4.mjs.map → chunk-GEC2D2EQ.mjs.map} +1 -1
- package/dist/geometry-2d.d.mts +1 -2
- package/dist/geometry-2d.d.ts +1 -2
- package/dist/geometry-2d.js +888 -3623
- package/dist/geometry-2d.js.map +1 -1
- package/dist/geometry-2d.mjs +1 -1
- package/dist/geometry-3d.d.mts +1 -2
- package/dist/geometry-3d.d.ts +1 -2
- package/dist/graph-2d.d.mts +1 -2
- package/dist/graph-2d.d.ts +1 -2
- package/dist/{host-4P766V4J.mjs → host-HKMZSCIT.mjs} +54 -313
- package/dist/host-HKMZSCIT.mjs.map +1 -0
- package/dist/index.d.mts +2 -4
- package/dist/index.d.ts +2 -4
- package/dist/index.js +880 -3619
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -4
- package/dist/index.mjs.map +1 -1
- package/dist/latex.d.mts +1 -2
- package/dist/latex.d.ts +1 -2
- package/dist/{types-BHYC2Fiw.d.mts → types-C3FjpoUi.d.mts} +1 -232
- package/dist/{types-BHYC2Fiw.d.ts → types-C3FjpoUi.d.ts} +1 -232
- package/package.json +1 -9
- package/dist/chunk-AJAHD35N.mjs.map +0 -1
- package/dist/chunk-T3SOHYB2.mjs +0 -851
- package/dist/chunk-T3SOHYB2.mjs.map +0 -1
- package/dist/handleExtractProblem-C-U5KluK.d.mts +0 -158
- package/dist/handleExtractProblem-C-U5KluK.d.ts +0 -158
- package/dist/host-4P766V4J.mjs.map +0 -1
package/dist/latex.d.mts
CHANGED
package/dist/latex.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
1
|
import { ReactNode, ComponentType, RefAttributes } from 'react';
|
|
3
2
|
import { ExcalidrawElement } from '@excalidraw/excalidraw/element/types';
|
|
4
3
|
|
|
@@ -21,231 +20,6 @@ interface GeometryDraftPreview {
|
|
|
21
20
|
seq: number;
|
|
22
21
|
}
|
|
23
22
|
|
|
24
|
-
declare const NameZ: z.ZodString;
|
|
25
|
-
|
|
26
|
-
type Name = z.infer<typeof NameZ>;
|
|
27
|
-
type DslDistanceSpec = {
|
|
28
|
-
kind: 'circleRadius';
|
|
29
|
-
circle: Name;
|
|
30
|
-
scale?: number;
|
|
31
|
-
offset?: number;
|
|
32
|
-
} | {
|
|
33
|
-
kind: 'segmentLength';
|
|
34
|
-
p1: Name;
|
|
35
|
-
p2: Name;
|
|
36
|
-
scale?: number;
|
|
37
|
-
offset?: number;
|
|
38
|
-
} | {
|
|
39
|
-
kind: 'literal';
|
|
40
|
-
value: number;
|
|
41
|
-
scale?: number;
|
|
42
|
-
offset?: number;
|
|
43
|
-
};
|
|
44
|
-
type DslPointT = {
|
|
45
|
-
name: Name;
|
|
46
|
-
kind: 'free';
|
|
47
|
-
x: number;
|
|
48
|
-
y: number;
|
|
49
|
-
} | {
|
|
50
|
-
name: Name;
|
|
51
|
-
kind: 'midpoint';
|
|
52
|
-
p1: Name;
|
|
53
|
-
p2: Name;
|
|
54
|
-
visible?: boolean;
|
|
55
|
-
} | {
|
|
56
|
-
name: Name;
|
|
57
|
-
kind: 'onSegment';
|
|
58
|
-
segmentId: Name;
|
|
59
|
-
t: number;
|
|
60
|
-
} | {
|
|
61
|
-
name: Name;
|
|
62
|
-
kind: 'onLine';
|
|
63
|
-
lineId: Name;
|
|
64
|
-
t: number;
|
|
65
|
-
} | {
|
|
66
|
-
name: Name;
|
|
67
|
-
kind: 'onCircle';
|
|
68
|
-
circleId: Name;
|
|
69
|
-
theta: number;
|
|
70
|
-
} | {
|
|
71
|
-
name: Name;
|
|
72
|
-
kind: 'perpFoot';
|
|
73
|
-
from: Name;
|
|
74
|
-
onLine: Name;
|
|
75
|
-
} | {
|
|
76
|
-
name: Name;
|
|
77
|
-
kind: 'circumcenter';
|
|
78
|
-
vertices: [Name, Name, Name];
|
|
79
|
-
} | {
|
|
80
|
-
name: Name;
|
|
81
|
-
kind: 'incenter';
|
|
82
|
-
vertices: [Name, Name, Name];
|
|
83
|
-
} | {
|
|
84
|
-
name: Name;
|
|
85
|
-
kind: 'centroid';
|
|
86
|
-
vertices: [Name, Name, Name];
|
|
87
|
-
} | {
|
|
88
|
-
name: Name;
|
|
89
|
-
kind: 'orthocenter';
|
|
90
|
-
vertices: [Name, Name, Name];
|
|
91
|
-
} | {
|
|
92
|
-
name: Name;
|
|
93
|
-
kind: 'intersection';
|
|
94
|
-
ref1: Name;
|
|
95
|
-
ref2: Name;
|
|
96
|
-
branch?: 0 | 1;
|
|
97
|
-
} | {
|
|
98
|
-
name: Name;
|
|
99
|
-
kind: 'secondIntersection';
|
|
100
|
-
line: Name;
|
|
101
|
-
circle: Name;
|
|
102
|
-
other: Name;
|
|
103
|
-
} | {
|
|
104
|
-
name: Name;
|
|
105
|
-
kind: 'circleIntersection';
|
|
106
|
-
c1: Name;
|
|
107
|
-
c2: Name;
|
|
108
|
-
which: 0 | 1;
|
|
109
|
-
} | {
|
|
110
|
-
name: Name;
|
|
111
|
-
kind: 'circleSecondIntersection';
|
|
112
|
-
c1: Name;
|
|
113
|
-
c2: Name;
|
|
114
|
-
exclude: Name;
|
|
115
|
-
} | {
|
|
116
|
-
name: Name;
|
|
117
|
-
kind: 'tangencyPoint';
|
|
118
|
-
circle: Name;
|
|
119
|
-
onLine: Name;
|
|
120
|
-
} | {
|
|
121
|
-
name: Name;
|
|
122
|
-
kind: 'tangentPointExt';
|
|
123
|
-
from: Name;
|
|
124
|
-
circle: Name;
|
|
125
|
-
which: 0 | 1;
|
|
126
|
-
} | {
|
|
127
|
-
name: Name;
|
|
128
|
-
kind: 'arcMidpoint';
|
|
129
|
-
circle: Name;
|
|
130
|
-
a: Name;
|
|
131
|
-
b: Name;
|
|
132
|
-
notContaining: Name;
|
|
133
|
-
} | {
|
|
134
|
-
name: Name;
|
|
135
|
-
kind: 'excenter';
|
|
136
|
-
vertices: [Name, Name, Name];
|
|
137
|
-
opposite: Name;
|
|
138
|
-
} | {
|
|
139
|
-
name: Name;
|
|
140
|
-
kind: 'reflectPoint';
|
|
141
|
-
of: Name;
|
|
142
|
-
through: Name;
|
|
143
|
-
} | {
|
|
144
|
-
name: Name;
|
|
145
|
-
kind: 'reflectLine';
|
|
146
|
-
of: Name;
|
|
147
|
-
through: Name;
|
|
148
|
-
} | {
|
|
149
|
-
name: Name;
|
|
150
|
-
kind: 'pointAtDistance';
|
|
151
|
-
from: Name;
|
|
152
|
-
through: Name;
|
|
153
|
-
distance: DslDistanceSpec;
|
|
154
|
-
};
|
|
155
|
-
type DslShapeT = {
|
|
156
|
-
name: Name;
|
|
157
|
-
kind: 'segment';
|
|
158
|
-
p1: Name;
|
|
159
|
-
p2: Name;
|
|
160
|
-
} | {
|
|
161
|
-
name: Name;
|
|
162
|
-
kind: 'line';
|
|
163
|
-
p1: Name;
|
|
164
|
-
p2: Name;
|
|
165
|
-
} | {
|
|
166
|
-
name: Name;
|
|
167
|
-
kind: 'ray';
|
|
168
|
-
origin: Name;
|
|
169
|
-
through: Name;
|
|
170
|
-
} | {
|
|
171
|
-
name: Name;
|
|
172
|
-
kind: 'polygon';
|
|
173
|
-
vertices: Name[];
|
|
174
|
-
} | {
|
|
175
|
-
name: Name;
|
|
176
|
-
kind: 'perpendicular';
|
|
177
|
-
throughPoint: Name;
|
|
178
|
-
toLine: Name;
|
|
179
|
-
} | {
|
|
180
|
-
name: Name;
|
|
181
|
-
kind: 'parallel';
|
|
182
|
-
throughPoint: Name;
|
|
183
|
-
toLine: Name;
|
|
184
|
-
} | {
|
|
185
|
-
name: Name;
|
|
186
|
-
kind: 'perpBisector';
|
|
187
|
-
p1: Name;
|
|
188
|
-
p2: Name;
|
|
189
|
-
} | {
|
|
190
|
-
name: Name;
|
|
191
|
-
kind: 'angleBisector';
|
|
192
|
-
p1: Name;
|
|
193
|
-
vertex: Name;
|
|
194
|
-
p2: Name;
|
|
195
|
-
} | {
|
|
196
|
-
name: Name;
|
|
197
|
-
kind: 'lineThrough';
|
|
198
|
-
points: Name[];
|
|
199
|
-
} | {
|
|
200
|
-
name: Name;
|
|
201
|
-
kind: 'radicalAxis';
|
|
202
|
-
circle1: Name;
|
|
203
|
-
circle2: Name;
|
|
204
|
-
} | {
|
|
205
|
-
name: Name;
|
|
206
|
-
kind: 'tangent';
|
|
207
|
-
throughPoint: Name;
|
|
208
|
-
toCircle: Name;
|
|
209
|
-
branch?: 0 | 1 | 'on';
|
|
210
|
-
} | {
|
|
211
|
-
name: Name;
|
|
212
|
-
kind: 'circleCP';
|
|
213
|
-
center: Name;
|
|
214
|
-
surfacePoint: Name;
|
|
215
|
-
visible?: boolean;
|
|
216
|
-
} | {
|
|
217
|
-
name: Name;
|
|
218
|
-
kind: 'circle3';
|
|
219
|
-
p1: Name;
|
|
220
|
-
p2: Name;
|
|
221
|
-
p3: Name;
|
|
222
|
-
} | {
|
|
223
|
-
name: Name;
|
|
224
|
-
kind: 'circleDiameter';
|
|
225
|
-
p1: Name;
|
|
226
|
-
p2: Name;
|
|
227
|
-
visible?: boolean;
|
|
228
|
-
} | {
|
|
229
|
-
name: Name;
|
|
230
|
-
kind: 'circleCR';
|
|
231
|
-
center: Name;
|
|
232
|
-
radius: number;
|
|
233
|
-
} | {
|
|
234
|
-
name: Name;
|
|
235
|
-
kind: 'incircle';
|
|
236
|
-
vertices: [Name, Name, Name];
|
|
237
|
-
} | {
|
|
238
|
-
name: Name;
|
|
239
|
-
kind: 'excircle';
|
|
240
|
-
vertices: [Name, Name, Name];
|
|
241
|
-
opposite: Name;
|
|
242
|
-
};
|
|
243
|
-
type DslInputT = {
|
|
244
|
-
version: 1;
|
|
245
|
-
points: DslPointT[];
|
|
246
|
-
shapes: DslShapeT[];
|
|
247
|
-
};
|
|
248
|
-
|
|
249
23
|
type SceneObject<A = Record<string, unknown>> = {
|
|
250
24
|
id: string;
|
|
251
25
|
kind: string;
|
|
@@ -316,15 +90,10 @@ interface AiFigureProgress {
|
|
|
316
90
|
*
|
|
317
91
|
* `onProgress` là optional: nếu consumer dùng streaming endpoint (SSE),
|
|
318
92
|
* forward chunk events vào đây. Non-streaming impl bỏ qua.
|
|
319
|
-
*
|
|
320
|
-
* `currentDsl` (MỚI cho multi-step refine): khi caller có hình hiện tại
|
|
321
|
-
* (state.order.length > 0) và muốn AI sửa/thêm → pass currentDsl. Consumer
|
|
322
|
-
* branch sang refine endpoint. Không pass → build endpoint cũ.
|
|
323
93
|
*/
|
|
324
94
|
type GenerateGeometryFigure = (problem: string, options: {
|
|
325
95
|
signal: AbortSignal;
|
|
326
96
|
onProgress?: (info: AiFigureProgress) => void;
|
|
327
|
-
currentDsl?: DslInputT;
|
|
328
97
|
}) => Promise<AiFigureUiResult>;
|
|
329
98
|
/**
|
|
330
99
|
* Kết quả trả về từ `restoreFileFromCustomData`. Chứa đủ thông tin để
|
|
@@ -439,4 +208,4 @@ interface StampType<TCustomData extends BaseStampCustomData = BaseStampCustomDat
|
|
|
439
208
|
experimental?: boolean;
|
|
440
209
|
}
|
|
441
210
|
|
|
442
|
-
export type { AiFigureProgress as A, BaseStampCustomData as B,
|
|
211
|
+
export type { AiFigureProgress as A, BaseStampCustomData as B, GenerateGeometryFigure as G, StampType as S, GeometryDraftPreview as a, AiFigureUiResult as b, State as c };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
1
|
import { ReactNode, ComponentType, RefAttributes } from 'react';
|
|
3
2
|
import { ExcalidrawElement } from '@excalidraw/excalidraw/element/types';
|
|
4
3
|
|
|
@@ -21,231 +20,6 @@ interface GeometryDraftPreview {
|
|
|
21
20
|
seq: number;
|
|
22
21
|
}
|
|
23
22
|
|
|
24
|
-
declare const NameZ: z.ZodString;
|
|
25
|
-
|
|
26
|
-
type Name = z.infer<typeof NameZ>;
|
|
27
|
-
type DslDistanceSpec = {
|
|
28
|
-
kind: 'circleRadius';
|
|
29
|
-
circle: Name;
|
|
30
|
-
scale?: number;
|
|
31
|
-
offset?: number;
|
|
32
|
-
} | {
|
|
33
|
-
kind: 'segmentLength';
|
|
34
|
-
p1: Name;
|
|
35
|
-
p2: Name;
|
|
36
|
-
scale?: number;
|
|
37
|
-
offset?: number;
|
|
38
|
-
} | {
|
|
39
|
-
kind: 'literal';
|
|
40
|
-
value: number;
|
|
41
|
-
scale?: number;
|
|
42
|
-
offset?: number;
|
|
43
|
-
};
|
|
44
|
-
type DslPointT = {
|
|
45
|
-
name: Name;
|
|
46
|
-
kind: 'free';
|
|
47
|
-
x: number;
|
|
48
|
-
y: number;
|
|
49
|
-
} | {
|
|
50
|
-
name: Name;
|
|
51
|
-
kind: 'midpoint';
|
|
52
|
-
p1: Name;
|
|
53
|
-
p2: Name;
|
|
54
|
-
visible?: boolean;
|
|
55
|
-
} | {
|
|
56
|
-
name: Name;
|
|
57
|
-
kind: 'onSegment';
|
|
58
|
-
segmentId: Name;
|
|
59
|
-
t: number;
|
|
60
|
-
} | {
|
|
61
|
-
name: Name;
|
|
62
|
-
kind: 'onLine';
|
|
63
|
-
lineId: Name;
|
|
64
|
-
t: number;
|
|
65
|
-
} | {
|
|
66
|
-
name: Name;
|
|
67
|
-
kind: 'onCircle';
|
|
68
|
-
circleId: Name;
|
|
69
|
-
theta: number;
|
|
70
|
-
} | {
|
|
71
|
-
name: Name;
|
|
72
|
-
kind: 'perpFoot';
|
|
73
|
-
from: Name;
|
|
74
|
-
onLine: Name;
|
|
75
|
-
} | {
|
|
76
|
-
name: Name;
|
|
77
|
-
kind: 'circumcenter';
|
|
78
|
-
vertices: [Name, Name, Name];
|
|
79
|
-
} | {
|
|
80
|
-
name: Name;
|
|
81
|
-
kind: 'incenter';
|
|
82
|
-
vertices: [Name, Name, Name];
|
|
83
|
-
} | {
|
|
84
|
-
name: Name;
|
|
85
|
-
kind: 'centroid';
|
|
86
|
-
vertices: [Name, Name, Name];
|
|
87
|
-
} | {
|
|
88
|
-
name: Name;
|
|
89
|
-
kind: 'orthocenter';
|
|
90
|
-
vertices: [Name, Name, Name];
|
|
91
|
-
} | {
|
|
92
|
-
name: Name;
|
|
93
|
-
kind: 'intersection';
|
|
94
|
-
ref1: Name;
|
|
95
|
-
ref2: Name;
|
|
96
|
-
branch?: 0 | 1;
|
|
97
|
-
} | {
|
|
98
|
-
name: Name;
|
|
99
|
-
kind: 'secondIntersection';
|
|
100
|
-
line: Name;
|
|
101
|
-
circle: Name;
|
|
102
|
-
other: Name;
|
|
103
|
-
} | {
|
|
104
|
-
name: Name;
|
|
105
|
-
kind: 'circleIntersection';
|
|
106
|
-
c1: Name;
|
|
107
|
-
c2: Name;
|
|
108
|
-
which: 0 | 1;
|
|
109
|
-
} | {
|
|
110
|
-
name: Name;
|
|
111
|
-
kind: 'circleSecondIntersection';
|
|
112
|
-
c1: Name;
|
|
113
|
-
c2: Name;
|
|
114
|
-
exclude: Name;
|
|
115
|
-
} | {
|
|
116
|
-
name: Name;
|
|
117
|
-
kind: 'tangencyPoint';
|
|
118
|
-
circle: Name;
|
|
119
|
-
onLine: Name;
|
|
120
|
-
} | {
|
|
121
|
-
name: Name;
|
|
122
|
-
kind: 'tangentPointExt';
|
|
123
|
-
from: Name;
|
|
124
|
-
circle: Name;
|
|
125
|
-
which: 0 | 1;
|
|
126
|
-
} | {
|
|
127
|
-
name: Name;
|
|
128
|
-
kind: 'arcMidpoint';
|
|
129
|
-
circle: Name;
|
|
130
|
-
a: Name;
|
|
131
|
-
b: Name;
|
|
132
|
-
notContaining: Name;
|
|
133
|
-
} | {
|
|
134
|
-
name: Name;
|
|
135
|
-
kind: 'excenter';
|
|
136
|
-
vertices: [Name, Name, Name];
|
|
137
|
-
opposite: Name;
|
|
138
|
-
} | {
|
|
139
|
-
name: Name;
|
|
140
|
-
kind: 'reflectPoint';
|
|
141
|
-
of: Name;
|
|
142
|
-
through: Name;
|
|
143
|
-
} | {
|
|
144
|
-
name: Name;
|
|
145
|
-
kind: 'reflectLine';
|
|
146
|
-
of: Name;
|
|
147
|
-
through: Name;
|
|
148
|
-
} | {
|
|
149
|
-
name: Name;
|
|
150
|
-
kind: 'pointAtDistance';
|
|
151
|
-
from: Name;
|
|
152
|
-
through: Name;
|
|
153
|
-
distance: DslDistanceSpec;
|
|
154
|
-
};
|
|
155
|
-
type DslShapeT = {
|
|
156
|
-
name: Name;
|
|
157
|
-
kind: 'segment';
|
|
158
|
-
p1: Name;
|
|
159
|
-
p2: Name;
|
|
160
|
-
} | {
|
|
161
|
-
name: Name;
|
|
162
|
-
kind: 'line';
|
|
163
|
-
p1: Name;
|
|
164
|
-
p2: Name;
|
|
165
|
-
} | {
|
|
166
|
-
name: Name;
|
|
167
|
-
kind: 'ray';
|
|
168
|
-
origin: Name;
|
|
169
|
-
through: Name;
|
|
170
|
-
} | {
|
|
171
|
-
name: Name;
|
|
172
|
-
kind: 'polygon';
|
|
173
|
-
vertices: Name[];
|
|
174
|
-
} | {
|
|
175
|
-
name: Name;
|
|
176
|
-
kind: 'perpendicular';
|
|
177
|
-
throughPoint: Name;
|
|
178
|
-
toLine: Name;
|
|
179
|
-
} | {
|
|
180
|
-
name: Name;
|
|
181
|
-
kind: 'parallel';
|
|
182
|
-
throughPoint: Name;
|
|
183
|
-
toLine: Name;
|
|
184
|
-
} | {
|
|
185
|
-
name: Name;
|
|
186
|
-
kind: 'perpBisector';
|
|
187
|
-
p1: Name;
|
|
188
|
-
p2: Name;
|
|
189
|
-
} | {
|
|
190
|
-
name: Name;
|
|
191
|
-
kind: 'angleBisector';
|
|
192
|
-
p1: Name;
|
|
193
|
-
vertex: Name;
|
|
194
|
-
p2: Name;
|
|
195
|
-
} | {
|
|
196
|
-
name: Name;
|
|
197
|
-
kind: 'lineThrough';
|
|
198
|
-
points: Name[];
|
|
199
|
-
} | {
|
|
200
|
-
name: Name;
|
|
201
|
-
kind: 'radicalAxis';
|
|
202
|
-
circle1: Name;
|
|
203
|
-
circle2: Name;
|
|
204
|
-
} | {
|
|
205
|
-
name: Name;
|
|
206
|
-
kind: 'tangent';
|
|
207
|
-
throughPoint: Name;
|
|
208
|
-
toCircle: Name;
|
|
209
|
-
branch?: 0 | 1 | 'on';
|
|
210
|
-
} | {
|
|
211
|
-
name: Name;
|
|
212
|
-
kind: 'circleCP';
|
|
213
|
-
center: Name;
|
|
214
|
-
surfacePoint: Name;
|
|
215
|
-
visible?: boolean;
|
|
216
|
-
} | {
|
|
217
|
-
name: Name;
|
|
218
|
-
kind: 'circle3';
|
|
219
|
-
p1: Name;
|
|
220
|
-
p2: Name;
|
|
221
|
-
p3: Name;
|
|
222
|
-
} | {
|
|
223
|
-
name: Name;
|
|
224
|
-
kind: 'circleDiameter';
|
|
225
|
-
p1: Name;
|
|
226
|
-
p2: Name;
|
|
227
|
-
visible?: boolean;
|
|
228
|
-
} | {
|
|
229
|
-
name: Name;
|
|
230
|
-
kind: 'circleCR';
|
|
231
|
-
center: Name;
|
|
232
|
-
radius: number;
|
|
233
|
-
} | {
|
|
234
|
-
name: Name;
|
|
235
|
-
kind: 'incircle';
|
|
236
|
-
vertices: [Name, Name, Name];
|
|
237
|
-
} | {
|
|
238
|
-
name: Name;
|
|
239
|
-
kind: 'excircle';
|
|
240
|
-
vertices: [Name, Name, Name];
|
|
241
|
-
opposite: Name;
|
|
242
|
-
};
|
|
243
|
-
type DslInputT = {
|
|
244
|
-
version: 1;
|
|
245
|
-
points: DslPointT[];
|
|
246
|
-
shapes: DslShapeT[];
|
|
247
|
-
};
|
|
248
|
-
|
|
249
23
|
type SceneObject<A = Record<string, unknown>> = {
|
|
250
24
|
id: string;
|
|
251
25
|
kind: string;
|
|
@@ -316,15 +90,10 @@ interface AiFigureProgress {
|
|
|
316
90
|
*
|
|
317
91
|
* `onProgress` là optional: nếu consumer dùng streaming endpoint (SSE),
|
|
318
92
|
* forward chunk events vào đây. Non-streaming impl bỏ qua.
|
|
319
|
-
*
|
|
320
|
-
* `currentDsl` (MỚI cho multi-step refine): khi caller có hình hiện tại
|
|
321
|
-
* (state.order.length > 0) và muốn AI sửa/thêm → pass currentDsl. Consumer
|
|
322
|
-
* branch sang refine endpoint. Không pass → build endpoint cũ.
|
|
323
93
|
*/
|
|
324
94
|
type GenerateGeometryFigure = (problem: string, options: {
|
|
325
95
|
signal: AbortSignal;
|
|
326
96
|
onProgress?: (info: AiFigureProgress) => void;
|
|
327
|
-
currentDsl?: DslInputT;
|
|
328
97
|
}) => Promise<AiFigureUiResult>;
|
|
329
98
|
/**
|
|
330
99
|
* Kết quả trả về từ `restoreFileFromCustomData`. Chứa đủ thông tin để
|
|
@@ -439,4 +208,4 @@ interface StampType<TCustomData extends BaseStampCustomData = BaseStampCustomDat
|
|
|
439
208
|
experimental?: boolean;
|
|
440
209
|
}
|
|
441
210
|
|
|
442
|
-
export type { AiFigureProgress as A, BaseStampCustomData as B,
|
|
211
|
+
export type { AiFigureProgress as A, BaseStampCustomData as B, GenerateGeometryFigure as G, StampType as S, GeometryDraftPreview as a, AiFigureUiResult as b, State as c };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xom11/whiteboard",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Excalidraw + JSXGraph + KaTeX whiteboard component (drawing, geometry stamps, LaTeX stamps).",
|
|
6
6
|
"repository": {
|
|
@@ -118,17 +118,9 @@
|
|
|
118
118
|
"vite": "^8.0.13"
|
|
119
119
|
},
|
|
120
120
|
"dependencies": {
|
|
121
|
-
"@anthropic-ai/claude-agent-sdk": "^0.3.161",
|
|
122
|
-
"@anthropic-ai/sdk": "^0.98.0",
|
|
123
121
|
"immer": "^10.2.0",
|
|
124
122
|
"pdfjs-dist": "^5.7.284",
|
|
125
|
-
"tesseract.js": "^7.0.0",
|
|
126
123
|
"zod": "^3.23.8",
|
|
127
124
|
"zod-to-json-schema": "^3.25.2"
|
|
128
|
-
},
|
|
129
|
-
"overrides": {
|
|
130
|
-
"@anthropic-ai/claude-agent-sdk": {
|
|
131
|
-
"zod": "$zod"
|
|
132
|
-
}
|
|
133
125
|
}
|
|
134
126
|
}
|