@copilotkit/react-textarea 0.0.0-main-20250908181442 → 0.0.0-max-runner-auth-20251229215815

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 (85) hide show
  1. package/CHANGELOG.md +509 -4
  2. package/dist/{chunk-HDBI2WN5.mjs → chunk-2IWVZ4PP.mjs} +17 -27
  3. package/dist/chunk-2IWVZ4PP.mjs.map +1 -0
  4. package/dist/{chunk-XW3ICO4S.mjs → chunk-3QJOFG3V.mjs} +1 -1
  5. package/dist/chunk-3QJOFG3V.mjs.map +1 -0
  6. package/dist/{chunk-C3PMJNQA.mjs → chunk-72GJNLCO.mjs} +3 -3
  7. package/dist/{chunk-RXV67GJN.mjs → chunk-DL3JWL2E.mjs} +4 -2
  8. package/dist/chunk-DL3JWL2E.mjs.map +1 -0
  9. package/dist/{chunk-7L6GIHDM.mjs → chunk-F2ULK22F.mjs} +1 -1
  10. package/dist/chunk-F2ULK22F.mjs.map +1 -0
  11. package/dist/{chunk-7WVURIB7.mjs → chunk-FFYCP5ZP.mjs} +5 -5
  12. package/dist/{chunk-HBWBHJ64.mjs → chunk-GU5LTWGL.mjs} +2 -2
  13. package/dist/{chunk-2DF2AVDU.mjs → chunk-H5ZNEKUR.mjs} +2 -2
  14. package/dist/{chunk-LQ2OWQU7.mjs → chunk-JLOABKLH.mjs} +2 -2
  15. package/dist/{chunk-LQ2OWQU7.mjs.map → chunk-JLOABKLH.mjs.map} +1 -1
  16. package/dist/{chunk-NZIHZWRU.mjs → chunk-KGU7Z4W7.mjs} +4 -4
  17. package/dist/chunk-KGU7Z4W7.mjs.map +1 -0
  18. package/dist/{chunk-3PQ7GSFE.mjs → chunk-NAFNY4FL.mjs} +1 -1
  19. package/dist/chunk-NAFNY4FL.mjs.map +1 -0
  20. package/dist/{chunk-F6GMWOLE.mjs → chunk-ZQSEYPNN.mjs} +6 -25
  21. package/dist/chunk-ZQSEYPNN.mjs.map +1 -0
  22. package/dist/components/base-copilot-textarea/base-copilot-textarea.js +17 -27
  23. package/dist/components/base-copilot-textarea/base-copilot-textarea.js.map +1 -1
  24. package/dist/components/base-copilot-textarea/base-copilot-textarea.mjs +9 -9
  25. package/dist/components/base-copilot-textarea/render-element.d.ts +3 -2
  26. package/dist/components/base-copilot-textarea/render-element.js.map +1 -1
  27. package/dist/components/base-copilot-textarea/render-element.mjs +1 -1
  28. package/dist/components/base-copilot-textarea/render-placeholder.d.ts +3 -2
  29. package/dist/components/base-copilot-textarea/render-placeholder.js.map +1 -1
  30. package/dist/components/base-copilot-textarea/render-placeholder.mjs +1 -1
  31. package/dist/components/base-copilot-textarea/track-cursor-moved-since-last-text-change.js +1 -1
  32. package/dist/components/base-copilot-textarea/track-cursor-moved-since-last-text-change.js.map +1 -1
  33. package/dist/components/base-copilot-textarea/track-cursor-moved-since-last-text-change.mjs +1 -1
  34. package/dist/components/copilot-textarea/copilot-textarea.d.ts +3 -3
  35. package/dist/components/copilot-textarea/copilot-textarea.js +24 -48
  36. package/dist/components/copilot-textarea/copilot-textarea.js.map +1 -1
  37. package/dist/components/copilot-textarea/copilot-textarea.mjs +12 -12
  38. package/dist/components/hovering-toolbar/hovering-toolbar-components.d.ts +1 -1
  39. package/dist/components/hovering-toolbar/hovering-toolbar-components.js +16 -26
  40. package/dist/components/hovering-toolbar/hovering-toolbar-components.js.map +1 -1
  41. package/dist/components/hovering-toolbar/hovering-toolbar-components.mjs +1 -1
  42. package/dist/components/hovering-toolbar/hovering-toolbar.js +16 -26
  43. package/dist/components/hovering-toolbar/hovering-toolbar.js.map +1 -1
  44. package/dist/components/hovering-toolbar/hovering-toolbar.mjs +5 -5
  45. package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.js.map +1 -1
  46. package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.mjs +2 -2
  47. package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.js.map +1 -1
  48. package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.mjs +3 -3
  49. package/dist/components/hovering-toolbar/text-insertion-prompt-box/index.js.map +1 -1
  50. package/dist/components/hovering-toolbar/text-insertion-prompt-box/index.mjs +3 -3
  51. package/dist/components/index.js +24 -48
  52. package/dist/components/index.js.map +1 -1
  53. package/dist/components/index.mjs +12 -12
  54. package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.js +4 -20
  55. package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.js.map +1 -1
  56. package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.mjs +1 -1
  57. package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.js +3 -1
  58. package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.js.map +1 -1
  59. package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.mjs +1 -1
  60. package/dist/hooks/misc/use-autosize-textarea.d.ts +1 -1
  61. package/dist/hooks/misc/use-autosize-textarea.js.map +1 -1
  62. package/dist/hooks/misc/use-autosize-textarea.mjs +1 -1
  63. package/dist/index.js +24 -48
  64. package/dist/index.js.map +1 -1
  65. package/dist/index.mjs +12 -12
  66. package/package.json +6 -6
  67. package/src/components/base-copilot-textarea/render-element.tsx +2 -1
  68. package/src/components/base-copilot-textarea/render-placeholder.tsx +2 -1
  69. package/src/components/base-copilot-textarea/track-cursor-moved-since-last-text-change.tsx +1 -1
  70. package/src/components/copilot-textarea/copilot-textarea.tsx +3 -3
  71. package/src/components/hovering-toolbar/hovering-toolbar-components.tsx +28 -40
  72. package/src/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.tsx +24 -22
  73. package/src/hooks/make-autosuggestions-function/use-make-standard-insertion-function.tsx +2 -1
  74. package/src/hooks/misc/use-autosize-textarea.tsx +1 -1
  75. package/dist/chunk-3PQ7GSFE.mjs.map +0 -1
  76. package/dist/chunk-7L6GIHDM.mjs.map +0 -1
  77. package/dist/chunk-F6GMWOLE.mjs.map +0 -1
  78. package/dist/chunk-HDBI2WN5.mjs.map +0 -1
  79. package/dist/chunk-NZIHZWRU.mjs.map +0 -1
  80. package/dist/chunk-RXV67GJN.mjs.map +0 -1
  81. package/dist/chunk-XW3ICO4S.mjs.map +0 -1
  82. /package/dist/{chunk-C3PMJNQA.mjs.map → chunk-72GJNLCO.mjs.map} +0 -0
  83. /package/dist/{chunk-7WVURIB7.mjs.map → chunk-FFYCP5ZP.mjs.map} +0 -0
  84. /package/dist/{chunk-HBWBHJ64.mjs.map → chunk-GU5LTWGL.mjs.map} +0 -0
  85. /package/dist/{chunk-2DF2AVDU.mjs.map → chunk-H5ZNEKUR.mjs.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,15 +1,520 @@
1
1
  # ui
2
2
 
3
- ## 0.0.0-main-20250908181442
3
+ ## 0.0.0-max-runner-auth-20251229215815
4
+
5
+ ### Patch Changes
6
+
7
+ - ea4238f: Add request as optional param to runtime.run
8
+ - Updated dependencies [ea4238f]
9
+ - @copilotkit/react-core@0.0.0-max-runner-auth-20251229215815
10
+ - @copilotkit/runtime-client-gql@0.0.0-max-runner-auth-20251229215815
11
+ - @copilotkit/shared@0.0.0-max-runner-auth-20251229215815
12
+
13
+ ## 1.50.1
14
+
15
+ ### Patch Changes
16
+
17
+ - 80dffec: Updated the default model and API version for the Google GenAI adapter
18
+ - Updated dependencies [bdc7a8f]
19
+ - Updated dependencies [80dffec]
20
+ - Updated dependencies [cfa4185]
21
+ - Updated dependencies [eac8b20]
22
+ - @copilotkit/react-core@1.50.1
23
+ - @copilotkit/runtime-client-gql@1.50.1
24
+ - @copilotkit/shared@1.50.1
25
+
26
+ ## 1.50.1-next.3
27
+
28
+ ### Patch Changes
29
+
30
+ - Updated dependencies [eac8b20]
31
+ - @copilotkit/react-core@1.50.1-next.3
32
+ - @copilotkit/runtime-client-gql@1.50.1-next.3
33
+ - @copilotkit/shared@1.50.1-next.3
34
+
35
+ ## 1.50.1-next.2
36
+
37
+ ### Patch Changes
38
+
39
+ - Updated dependencies [bdc7a8f]
40
+ - @copilotkit/react-core@1.50.1-next.2
41
+ - @copilotkit/runtime-client-gql@1.50.1-next.2
42
+ - @copilotkit/shared@1.50.1-next.2
43
+
44
+ ## 1.50.1-next.1
45
+
46
+ ### Patch Changes
47
+
48
+ - Updated dependencies [cfa4185]
49
+ - @copilotkit/react-core@1.50.1-next.1
50
+ - @copilotkit/runtime-client-gql@1.50.1-next.1
51
+ - @copilotkit/shared@1.50.1-next.1
52
+
53
+ ## 1.50.1-next.0
54
+
55
+ ### Patch Changes
56
+
57
+ - Updated the default model and API version for the Google GenAI adapter
58
+ - Updated dependencies
59
+ - @copilotkit/runtime-client-gql@1.50.1-next.0
60
+ - @copilotkit/react-core@1.50.1-next.0
61
+ - @copilotkit/shared@1.50.1-next.0
62
+
63
+ ## 1.50.0
64
+
65
+ ### Minor Changes
66
+
67
+ - 0fc76d7: add new runner with telemetry baked in
68
+ - c942f9c: Minor fixes and stability improvements
69
+ - eed6021: Updating to the latest version of vnext
70
+ - 3b7367e: Improving general stability around LangChain
71
+ - 7ff9ca7: Minor fixes and improvements
72
+ - 974875e: Lint and format code to resolve Prettier errors
73
+ - 3bd484f: Minor fixes and stability improvements
74
+ - 5a534bf: fix telemetry in v1.50 runtime
75
+ - 907ae5d: - feat: route CPK implementation to 2.0 copilotkitnext
76
+ - 769a06c: Refactor suggestions to not always run
77
+ - 788292b: Improving langchain dependency resolution
78
+ - eab69a2: Enabling the new inspector
79
+ - 0a7bfe0: Updating dependency versions across all packages
80
+
81
+ ### Patch Changes
82
+
83
+ - Updated dependencies [0fc76d7]
84
+ - Updated dependencies [c942f9c]
85
+ - Updated dependencies [bad5f06]
86
+ - Updated dependencies [8ce60af]
87
+ - Updated dependencies [33f47e3]
88
+ - Updated dependencies [04057d5]
89
+ - Updated dependencies [6ce0edc]
90
+ - Updated dependencies [2c93ff1]
91
+ - Updated dependencies [b0e3652]
92
+ - Updated dependencies [7643e71]
93
+ - Updated dependencies [d55a8bd]
94
+ - Updated dependencies [eed6021]
95
+ - Updated dependencies [3b7367e]
96
+ - Updated dependencies [c38da1c]
97
+ - Updated dependencies [7ff9ca7]
98
+ - Updated dependencies [3c60073]
99
+ - Updated dependencies [962546c]
100
+ - Updated dependencies [974875e]
101
+ - Updated dependencies [4942f62]
102
+ - Updated dependencies [3bd484f]
103
+ - Updated dependencies [5a534bf]
104
+ - Updated dependencies [ca8eb39]
105
+ - Updated dependencies [907ae5d]
106
+ - Updated dependencies [769a06c]
107
+ - Updated dependencies [788292b]
108
+ - Updated dependencies [c3d55e5]
109
+ - Updated dependencies [eab69a2]
110
+ - Updated dependencies [5840bab]
111
+ - Updated dependencies [7808fac]
112
+ - Updated dependencies [0a7bfe0]
113
+ - Updated dependencies [c70210e]
114
+ - Updated dependencies [d2c57a1]
115
+ - @copilotkit/runtime-client-gql@1.50.0
116
+ - @copilotkit/react-core@1.50.0
117
+ - @copilotkit/shared@1.50.0
118
+
119
+ ## 1.50.0-beta.19
120
+
121
+ ### Minor Changes
122
+
123
+ - Improving langchain dependency resolution
124
+
125
+ ### Patch Changes
126
+
127
+ - Updated dependencies
128
+ - @copilotkit/runtime-client-gql@1.50.0-beta.19
129
+ - @copilotkit/react-core@1.50.0-beta.19
130
+ - @copilotkit/shared@1.50.0-beta.19
131
+
132
+ ## 1.50.0-beta.18
133
+
134
+ ### Minor Changes
135
+
136
+ - Improving general stability around LangChain
137
+
138
+ ### Patch Changes
139
+
140
+ - Updated dependencies
141
+ - @copilotkit/runtime-client-gql@1.50.0-beta.18
142
+ - @copilotkit/react-core@1.50.0-beta.18
143
+ - @copilotkit/shared@1.50.0-beta.18
144
+
145
+ ## 1.50.0-beta.17
146
+
147
+ ### Minor Changes
148
+
149
+ - Minor fixes and improvements
150
+
151
+ ### Patch Changes
152
+
153
+ - Updated dependencies
154
+ - @copilotkit/runtime-client-gql@1.50.0-beta.17
155
+ - @copilotkit/react-core@1.50.0-beta.17
156
+ - @copilotkit/shared@1.50.0-beta.17
157
+
158
+ ## 1.50.0-beta.16
159
+
160
+ ### Minor Changes
161
+
162
+ - Minor fixes and stability improvements
163
+
164
+ ### Patch Changes
165
+
166
+ - Updated dependencies
167
+ - @copilotkit/runtime-client-gql@1.50.0-beta.16
168
+ - @copilotkit/react-core@1.50.0-beta.16
169
+ - @copilotkit/shared@1.50.0-beta.16
170
+
171
+ ## 1.50.0-beta.15
172
+
173
+ ### Minor Changes
174
+
175
+ - Lint and format code to resolve Prettier errors
176
+
177
+ ### Patch Changes
178
+
179
+ - Updated dependencies
180
+ - @copilotkit/runtime-client-gql@1.50.0-beta.15
181
+ - @copilotkit/react-core@1.50.0-beta.15
182
+ - @copilotkit/shared@1.50.0-beta.15
183
+
184
+ ## 1.50.0-beta.14
185
+
186
+ ### Minor Changes
187
+
188
+ - Minor fixes and stability improvements
189
+
190
+ ### Patch Changes
191
+
192
+ - Updated dependencies
193
+ - @copilotkit/runtime-client-gql@1.50.0-beta.14
194
+ - @copilotkit/react-core@1.50.0-beta.14
195
+ - @copilotkit/shared@1.50.0-beta.14
196
+
197
+ ## 1.50.0-beta.13
198
+
199
+ ### Minor Changes
200
+
201
+ - Updating to the latest version of vnext
202
+
203
+ ### Patch Changes
204
+
205
+ - Updated dependencies
206
+ - @copilotkit/runtime-client-gql@1.50.0-beta.13
207
+ - @copilotkit/react-core@1.50.0-beta.13
208
+ - @copilotkit/shared@1.50.0-beta.13
209
+
210
+ ## 1.50.0-beta.12
211
+
212
+ ### Minor Changes
213
+
214
+ - eab69a2: Enabling the new inspector
215
+
216
+ ### Patch Changes
217
+
218
+ - Updated dependencies [eab69a2]
219
+ - @copilotkit/runtime-client-gql@1.50.0-beta.12
220
+ - @copilotkit/react-core@1.50.0-beta.12
221
+ - @copilotkit/shared@1.50.0-beta.12
222
+
223
+ ## 1.50.0-beta.11
224
+
225
+ ### Minor Changes
226
+
227
+ - fix telemetry in v1.50 runtime
228
+
229
+ ### Patch Changes
230
+
231
+ - Updated dependencies
232
+ - @copilotkit/runtime-client-gql@1.50.0-beta.11
233
+ - @copilotkit/react-core@1.50.0-beta.11
234
+ - @copilotkit/shared@1.50.0-beta.11
235
+
236
+ ## 1.50.0-beta.10
237
+
238
+ ### Minor Changes
239
+
240
+ - add new runner with telemetry baked in
241
+
242
+ ### Patch Changes
243
+
244
+ - Updated dependencies
245
+ - @copilotkit/runtime-client-gql@1.50.0-beta.10
246
+ - @copilotkit/react-core@1.50.0-beta.10
247
+ - @copilotkit/shared@1.50.0-beta.10
248
+
249
+ ## 1.50.0-beta.9
250
+
251
+ ### Minor Changes
252
+
253
+ - Refactor suggestions to not always run
254
+
255
+ ### Patch Changes
256
+
257
+ - Updated dependencies
258
+ - @copilotkit/runtime-client-gql@1.50.0-beta.9
259
+ - @copilotkit/react-core@1.50.0-beta.9
260
+ - @copilotkit/shared@1.50.0-beta.9
261
+
262
+ ## 1.50.0-beta.8
263
+
264
+ ### Patch Changes
265
+
266
+ - @copilotkit/react-core@1.50.0-beta.8
267
+ - @copilotkit/runtime-client-gql@1.50.0-beta.8
268
+ - @copilotkit/shared@1.50.0-beta.8
269
+
270
+ ## 1.50.0-beta.7
271
+
272
+ ### Patch Changes
273
+
274
+ - Updated dependencies [6ce0edc]
275
+ - @copilotkit/react-core@1.50.0-beta.7
276
+ - @copilotkit/runtime-client-gql@1.50.0-beta.7
277
+ - @copilotkit/shared@1.50.0-beta.7
278
+
279
+ ## 1.50.0-beta.6
280
+
281
+ ### Minor Changes
282
+
283
+ - Updating dependency versions across all packages
284
+
285
+ ### Patch Changes
286
+
287
+ - Updated dependencies
288
+ - @copilotkit/runtime-client-gql@1.50.0-beta.6
289
+ - @copilotkit/react-core@1.50.0-beta.6
290
+ - @copilotkit/shared@1.50.0-beta.6
291
+
292
+ ## 1.50.0-beta.4
293
+
294
+ ### Minor Changes
295
+
296
+ - 907ae5d: - feat: route CPK implementation to 2.0 copilotkitnext
297
+
298
+ ### Patch Changes
299
+
300
+ - Updated dependencies [bad5f06]
301
+ - Updated dependencies [8ce60af]
302
+ - Updated dependencies [33f47e3]
303
+ - Updated dependencies [04057d5]
304
+ - Updated dependencies [2c93ff1]
305
+ - Updated dependencies [b0e3652]
306
+ - Updated dependencies [7643e71]
307
+ - Updated dependencies [d55a8bd]
308
+ - Updated dependencies [c38da1c]
309
+ - Updated dependencies [3c60073]
310
+ - Updated dependencies [962546c]
311
+ - Updated dependencies [4942f62]
312
+ - Updated dependencies [ca8eb39]
313
+ - Updated dependencies [907ae5d]
314
+ - Updated dependencies [c3d55e5]
315
+ - Updated dependencies [5840bab]
316
+ - Updated dependencies [7808fac]
317
+ - Updated dependencies [c70210e]
318
+ - Updated dependencies [d2c57a1]
319
+ - @copilotkit/react-core@1.50.0-beta.4
320
+ - @copilotkit/runtime-client-gql@1.50.0-beta.4
321
+ - @copilotkit/shared@1.50.0-beta.4
322
+
323
+ ## 1.10.7-next.0
324
+
325
+ ### Patch Changes
326
+
327
+ - @copilotkit/react-core@1.10.7-next.0
328
+ - @copilotkit/runtime-client-gql@1.10.7-next.0
329
+ - @copilotkit/shared@1.10.7-next.0
330
+
331
+ ## 1.10.6
332
+
333
+ ### Patch Changes
334
+
335
+ - Updated dependencies [3ac64bf]
336
+ - Updated dependencies [c9e499f]
337
+ - Updated dependencies [8626c5a]
338
+ - Updated dependencies [e0dd5d5]
339
+ - @copilotkit/react-core@1.10.6
340
+ - @copilotkit/runtime-client-gql@1.10.6
341
+ - @copilotkit/shared@1.10.6
342
+
343
+ ## 1.10.6-next.6
344
+
345
+ ### Patch Changes
346
+
347
+ - @copilotkit/runtime-client-gql@1.10.6-next.6
348
+ - @copilotkit/react-core@1.10.6-next.6
349
+ - @copilotkit/shared@1.10.6-next.6
350
+
351
+ ## 1.10.6-next.5
352
+
353
+ ### Patch Changes
354
+
355
+ - Updated dependencies [e0dd5d5]
356
+ - @copilotkit/shared@1.10.6-next.5
357
+ - @copilotkit/runtime-client-gql@1.10.6-next.5
358
+ - @copilotkit/react-core@1.10.6-next.5
359
+
360
+ ## 1.10.6-next.4
361
+
362
+ ### Patch Changes
363
+
364
+ - Updated dependencies [8626c5a]
365
+ - @copilotkit/react-core@1.10.6-next.4
366
+ - @copilotkit/runtime-client-gql@1.10.6-next.4
367
+ - @copilotkit/shared@1.10.6-next.4
368
+
369
+ ## 1.10.6-next.3
370
+
371
+ ### Patch Changes
372
+
373
+ - @copilotkit/runtime-client-gql@1.10.6-next.3
374
+ - @copilotkit/react-core@1.10.6-next.3
375
+ - @copilotkit/shared@1.10.6-next.3
376
+
377
+ ## 1.10.6-next.2
378
+
379
+ ### Patch Changes
380
+
381
+ - Updated dependencies [3ac64bf]
382
+ - @copilotkit/react-core@1.10.6-next.2
383
+ - @copilotkit/runtime-client-gql@1.10.6-next.2
384
+ - @copilotkit/shared@1.10.6-next.2
385
+
386
+ ## 1.10.6-next.1
387
+
388
+ ### Patch Changes
389
+
390
+ - Updated dependencies [c9e499f]
391
+ - @copilotkit/react-core@1.10.6-next.1
392
+ - @copilotkit/runtime-client-gql@1.10.6-next.1
393
+ - @copilotkit/shared@1.10.6-next.1
394
+
395
+ ## 1.10.6-next.0
396
+
397
+ ### Patch Changes
398
+
399
+ - @copilotkit/react-core@1.10.6-next.0
400
+ - @copilotkit/runtime-client-gql@1.10.6-next.0
401
+ - @copilotkit/shared@1.10.6-next.0
402
+
403
+ ## 1.10.5
404
+
405
+ ### Patch Changes
406
+
407
+ - Updated dependencies [b7bc3a0]
408
+ - Updated dependencies [f3fdd7a]
409
+ - Updated dependencies [32c163e]
410
+ - Updated dependencies [6112a67]
411
+ - @copilotkit/react-core@1.10.5
412
+ - @copilotkit/runtime-client-gql@1.10.5
413
+ - @copilotkit/shared@1.10.5
414
+
415
+ ## 1.10.5-next.10
416
+
417
+ ### Patch Changes
418
+
419
+ - Updated dependencies [b79ed5c]
420
+ - @copilotkit/react-core@1.10.5-next.10
421
+ - @copilotkit/runtime-client-gql@1.10.5-next.10
422
+ - @copilotkit/shared@1.10.5-next.10
423
+
424
+ ## 1.10.5-next.9
425
+
426
+ ### Patch Changes
427
+
428
+ - @copilotkit/runtime-client-gql@1.10.5-next.9
429
+ - @copilotkit/react-core@1.10.5-next.9
430
+ - @copilotkit/shared@1.10.5-next.9
431
+
432
+ ## 1.10.5-next.8
433
+
434
+ ### Patch Changes
435
+
436
+ - @copilotkit/react-core@1.10.5-next.8
437
+ - @copilotkit/runtime-client-gql@1.10.5-next.8
438
+ - @copilotkit/shared@1.10.5-next.8
439
+
440
+ ## 1.10.5-next.7
441
+
442
+ ### Patch Changes
443
+
444
+ - @copilotkit/runtime-client-gql@1.10.5-next.7
445
+ - @copilotkit/react-core@1.10.5-next.7
446
+ - @copilotkit/shared@1.10.5-next.7
447
+
448
+ ## 1.10.5-next.6
449
+
450
+ ### Patch Changes
451
+
452
+ - Updated dependencies [f3fdd7a]
453
+ - @copilotkit/react-core@1.10.5-next.6
454
+ - @copilotkit/runtime-client-gql@1.10.5-next.6
455
+ - @copilotkit/shared@1.10.5-next.6
456
+
457
+ ## 1.10.5-next.5
458
+
459
+ ### Patch Changes
460
+
461
+ - Updated dependencies [6112a67]
462
+ - @copilotkit/react-core@1.10.5-next.5
463
+ - @copilotkit/runtime-client-gql@1.10.5-next.5
464
+ - @copilotkit/shared@1.10.5-next.5
465
+
466
+ ## 1.10.5-next.4
467
+
468
+ ### Patch Changes
469
+
470
+ - @copilotkit/runtime-client-gql@1.10.5-next.4
471
+ - @copilotkit/react-core@1.10.5-next.4
472
+ - @copilotkit/shared@1.10.5-next.4
473
+
474
+ ## 1.10.5-next.3
475
+
476
+ ### Patch Changes
477
+
478
+ - @copilotkit/runtime-client-gql@1.10.5-next.3
479
+ - @copilotkit/react-core@1.10.5-next.3
480
+ - @copilotkit/shared@1.10.5-next.3
481
+
482
+ ## 1.10.5-next.2
483
+
484
+ ### Patch Changes
485
+
486
+ - @copilotkit/runtime-client-gql@1.10.5-next.2
487
+ - @copilotkit/react-core@1.10.5-next.2
488
+ - @copilotkit/shared@1.10.5-next.2
489
+
490
+ ## 1.10.5-next.1
491
+
492
+ ### Patch Changes
493
+
494
+ - Updated dependencies [b7bc3a0]
495
+ - @copilotkit/react-core@1.10.5-next.1
496
+ - @copilotkit/runtime-client-gql@1.10.5-next.1
497
+ - @copilotkit/shared@1.10.5-next.1
498
+
499
+ ## 1.10.5-next.0
500
+
501
+ ### Patch Changes
502
+
503
+ - Updated dependencies [32c163e]
504
+ - @copilotkit/react-core@1.10.5-next.0
505
+ - @copilotkit/runtime-client-gql@1.10.5-next.0
506
+ - @copilotkit/shared@1.10.5-next.0
507
+
508
+ ## 1.10.4
4
509
 
5
510
  ### Patch Changes
6
511
 
7
512
  - Updated dependencies [ef98963]
8
513
  - Updated dependencies [a640d8e]
9
514
  - Updated dependencies [052d54d]
10
- - @copilotkit/react-core@0.0.0-main-20250908181442
11
- - @copilotkit/shared@0.0.0-main-20250908181442
12
- - @copilotkit/runtime-client-gql@0.0.0-main-20250908181442
515
+ - @copilotkit/react-core@1.10.4
516
+ - @copilotkit/shared@1.10.4
517
+ - @copilotkit/runtime-client-gql@1.10.4
13
518
 
14
519
  ## 1.10.4-next.3
15
520
 
@@ -9,32 +9,22 @@ import { css, cx } from "@emotion/css";
9
9
  import React from "react";
10
10
  import ReactDOM from "react-dom";
11
11
  import { jsx } from "react/jsx-runtime";
12
- var Button = React.forwardRef(
13
- (_a, ref) => {
14
- var _b = _a, {
15
- className,
16
- active,
17
- reversed
18
- } = _b, props = __objRest(_b, [
19
- "className",
20
- "active",
21
- "reversed"
22
- ]);
23
- return /* @__PURE__ */ jsx(
24
- "span",
25
- __spreadProps(__spreadValues({}, props), {
26
- ref,
27
- className: cx(
28
- className,
29
- css`
30
- cursor: pointer;
31
- color: ${reversed ? active ? "white" : "#aaa" : active ? "black" : "#ccc"};
32
- `
33
- )
34
- })
35
- );
36
- }
37
- );
12
+ var Button = React.forwardRef((_a, ref) => {
13
+ var _b = _a, { className, active, reversed } = _b, props = __objRest(_b, ["className", "active", "reversed"]);
14
+ return /* @__PURE__ */ jsx(
15
+ "span",
16
+ __spreadProps(__spreadValues({}, props), {
17
+ ref,
18
+ className: cx(
19
+ className,
20
+ css`
21
+ cursor: pointer;
22
+ color: ${reversed ? active ? "white" : "#aaa" : active ? "black" : "#ccc"};
23
+ `
24
+ )
25
+ })
26
+ );
27
+ });
38
28
  var Icon = React.forwardRef(
39
29
  (_a, ref) => {
40
30
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
@@ -110,4 +100,4 @@ export {
110
100
  Portal,
111
101
  Toolbar
112
102
  };
113
- //# sourceMappingURL=chunk-HDBI2WN5.mjs.map
103
+ //# sourceMappingURL=chunk-2IWVZ4PP.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/hovering-toolbar/hovering-toolbar-components.tsx"],"sourcesContent":["import { css, cx } from \"@emotion/css\";\nimport React, { PropsWithChildren, Ref } from \"react\";\nimport ReactDOM from \"react-dom\";\n\ninterface BaseProps {\n className?: string;\n [key: string]: unknown;\n}\n\nexport const Button = React.forwardRef<\n HTMLSpanElement,\n PropsWithChildren<{ active: boolean; reversed: boolean } & BaseProps>\n>(({ className, active, reversed, ...props }, ref) => (\n <span\n {...props}\n ref={ref}\n className={cx(\n className as string,\n css`\n cursor: pointer;\n color: ${reversed ? (active ? \"white\" : \"#aaa\") : active ? \"black\" : \"#ccc\"};\n `,\n )}\n />\n));\n\nexport const Icon = React.forwardRef<HTMLSpanElement, PropsWithChildren<BaseProps>>(\n ({ className, ...props }, ref) => (\n <span\n {...props}\n ref={ref}\n className={cx(\n \"material-icons\",\n className as string,\n css`\n font-size: 18px;\n vertical-align: text-bottom;\n `,\n )}\n />\n ),\n);\n\nexport const Menu = React.forwardRef<HTMLDivElement, PropsWithChildren<BaseProps>>(\n ({ className, ...props }, ref) => {\n return (\n <div\n {...props}\n data-testid=\"menu\"\n ref={ref}\n className={cx(\n className as string,\n css`\n & > * {\n display: inline-block;\n }\n\n & > * + * {\n margin-left: 15px;\n }\n `,\n )}\n />\n );\n },\n);\nexport const Portal = ({ children }: { children: React.ReactNode }) => {\n return typeof document === \"object\" ? ReactDOM.createPortal(children, document.body) : null;\n};\n\nexport const Toolbar = React.forwardRef<HTMLDivElement, PropsWithChildren<BaseProps>>(\n ({ className, ...props }, ref) => (\n <Menu\n {...props}\n ref={ref}\n className={cx(\n className as string,\n css`\n position: relative;\n padding: 1px 18px 17px;\n margin: 0 -20px;\n border-bottom: 2px solid #eee;\n margin-bottom: 20px;\n `,\n )}\n />\n ),\n);\n"],"mappings":";;;;;;;AAAA,SAAS,KAAK,UAAU;AACxB,OAAO,WAAuC;AAC9C,OAAO,cAAc;AAWnB;AAJK,IAAM,SAAS,MAAM,WAG1B,CAAC,IAA2C,QAAK;AAAhD,eAAE,aAAW,QAAQ,SAZxB,IAYG,IAAkC,kBAAlC,IAAkC,CAAhC,aAAW,UAAQ;AACtB;AAAA,IAAC;AAAA,qCACK,QADL;AAAA,MAEC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA;AAAA,iBAEW,WAAY,SAAS,UAAU,SAAU,SAAS,UAAU;AAAA;AAAA,MAEzE;AAAA;AAAA,EACF;AAAA,CACD;AAEM,IAAM,OAAO,MAAM;AAAA,EACxB,CAAC,IAAyB,QAAK;AAA9B,iBAAE,YA3BL,IA2BG,IAAgB,kBAAhB,IAAgB,CAAd;AACD;AAAA,MAAC;AAAA,uCACK,QADL;AAAA,QAEC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA;AAAA;AAAA;AAAA,QAIF;AAAA;AAAA,IACF;AAAA;AAEJ;AAEO,IAAM,OAAO,MAAM;AAAA,EACxB,CAAC,IAAyB,QAAQ;AAAjC,iBAAE,YA5CL,IA4CG,IAAgB,kBAAhB,IAAgB,CAAd;AACD,WACE;AAAA,MAAC;AAAA,uCACK,QADL;AAAA,QAEC,eAAY;AAAA,QACZ;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QASF;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AACO,IAAM,SAAS,CAAC,EAAE,SAAS,MAAqC;AACrE,SAAO,OAAO,aAAa,WAAW,SAAS,aAAa,UAAU,SAAS,IAAI,IAAI;AACzF;AAEO,IAAM,UAAU,MAAM;AAAA,EAC3B,CAAC,IAAyB,QAAK;AAA9B,iBAAE,YAvEL,IAuEG,IAAgB,kBAAhB,IAAgB,CAAd;AACD;AAAA,MAAC;AAAA,uCACK,QADL;AAAA,QAEC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAOF;AAAA;AAAA,IACF;AAAA;AAEJ;","names":[]}
@@ -22,4 +22,4 @@ function makeRenderPlaceholderFunction(placeholderStyle) {
22
22
  export {
23
23
  makeRenderPlaceholderFunction
24
24
  };
25
- //# sourceMappingURL=chunk-XW3ICO4S.mjs.map
25
+ //# sourceMappingURL=chunk-3QJOFG3V.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/base-copilot-textarea/render-placeholder.tsx"],"sourcesContent":["import { RenderPlaceholderProps } from \"slate-react\";\nimport React from \"react\";\n\nexport type RenderPlaceholderFunction = (props: RenderPlaceholderProps) => React.JSX.Element;\n\nexport function makeRenderPlaceholderFunction(\n placeholderStyle?: React.CSSProperties,\n): RenderPlaceholderFunction {\n return (props: RenderPlaceholderProps) => {\n const { style, ...restAttributes } = props.attributes;\n\n return (\n <div\n {...restAttributes}\n style={{\n ...style,\n ...placeholderStyle,\n }}\n >\n {props.children}\n </div>\n );\n };\n}\n"],"mappings":";;;;;;;AAYM;AAPC,SAAS,8BACd,kBAC2B;AAC3B,SAAO,CAAC,UAAkC;AACxC,UAAqC,WAAM,YAAnC,QATZ,IASyC,IAAnB,2BAAmB,IAAnB,CAAV;AAER,WACE;AAAA,MAAC;AAAA,uCACK,iBADL;AAAA,QAEC,OAAO,kCACF,QACA;AAAA,QAGJ,gBAAM;AAAA;AAAA,IACT;AAAA,EAEJ;AACF;","names":[]}
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  HoveringInsertionPromptBox
3
- } from "./chunk-2DF2AVDU.mjs";
3
+ } from "./chunk-H5ZNEKUR.mjs";
4
4
  import {
5
5
  useHoveringEditorContext
6
6
  } from "./chunk-LYB4B6MK.mjs";
7
7
  import {
8
8
  Menu,
9
9
  Portal
10
- } from "./chunk-HDBI2WN5.mjs";
10
+ } from "./chunk-2IWVZ4PP.mjs";
11
11
  import {
12
12
  getFullEditorTextWithNewlines,
13
13
  getTextAroundSelection
@@ -117,4 +117,4 @@ function editorState(editor, selection) {
117
117
  export {
118
118
  HoveringToolbar
119
119
  };
120
- //# sourceMappingURL=chunk-C3PMJNQA.mjs.map
120
+ //# sourceMappingURL=chunk-72GJNLCO.mjs.map
@@ -19,7 +19,9 @@ import {
19
19
  CopilotRequestType
20
20
  } from "@copilotkit/runtime-client-gql";
21
21
  function useMakeStandardInsertionOrEditingFunction(textareaPurpose, contextCategories, insertionApiConfig, editingApiConfig) {
22
- const { getContextString, copilotApiConfig, runtimeClient } = useCopilotContext();
22
+ const runtimeClient = { generateCopilotResponse: (...args) => {
23
+ } };
24
+ const { getContextString, copilotApiConfig } = useCopilotContext();
23
25
  const headers = __spreadValues({}, copilotApiConfig.publicApiKey ? { [COPILOT_CLOUD_PUBLIC_API_KEY_HEADER]: copilotApiConfig.publicApiKey } : {});
24
26
  function runtimeClientResponseToStringStream(responsePromise) {
25
27
  return __async(this, null, function* () {
@@ -165,4 +167,4 @@ function useMakeStandardInsertionOrEditingFunction(textareaPurpose, contextCateg
165
167
  export {
166
168
  useMakeStandardInsertionOrEditingFunction
167
169
  };
168
- //# sourceMappingURL=chunk-RXV67GJN.mjs.map
170
+ //# sourceMappingURL=chunk-DL3JWL2E.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/hooks/make-autosuggestions-function/use-make-standard-insertion-function.tsx"],"sourcesContent":["import { COPILOT_CLOUD_PUBLIC_API_KEY_HEADER } from \"@copilotkit/shared\";\nimport { useCopilotContext } from \"@copilotkit/react-core\";\nimport { useCallback } from \"react\";\nimport {\n CopilotRuntimeClient,\n Message,\n Role,\n TextMessage,\n convertGqlOutputToMessages,\n convertMessagesToGqlInput,\n filterAgentStateMessages,\n CopilotRequestType,\n} from \"@copilotkit/runtime-client-gql\";\nimport { retry } from \"../../lib/retry\";\nimport {\n EditingEditorState,\n Generator_InsertionOrEditingSuggestion,\n} from \"../../types/base/autosuggestions-bare-function\";\nimport { InsertionsApiConfig } from \"../../types/autosuggestions-config/insertions-api-config\";\nimport { EditingApiConfig } from \"../../types/autosuggestions-config/editing-api-config\";\nimport { DocumentPointer } from \"@copilotkit/react-core\";\n\n/**\n * Returns a memoized function that sends a request to the specified API endpoint to get an autosuggestion for the user's input.\n * The function takes in the text before and after the cursor, and an abort signal.\n * It sends a POST request to the API endpoint with the messages array containing the system message, few shot messages, and user messages.\n * The function returns the suggestion from the API response.\n *\n * @param textareaPurpose - The purpose of the textarea. This is included in the system message.\n * @param apiEndpoint - The API endpoint to send the autosuggestion request to.\n * @param makeSystemMessage - A function that takes in a context string and returns a system message to include in the autosuggestion request.\n * @param fewShotMessages - An array of few shot messages to include in the autosuggestion request.\n * @param contextCategories - The categories of context strings we want to include. By default, we include the (default) \"global\" context category.\n * @returns A memoized function that sends a request to the specified API endpoint to get an autosuggestion for the user's input.\n */\nexport function useMakeStandardInsertionOrEditingFunction(\n textareaPurpose: string,\n contextCategories: string[],\n insertionApiConfig: InsertionsApiConfig,\n editingApiConfig: EditingApiConfig,\n): Generator_InsertionOrEditingSuggestion {\n const runtimeClient: any = { generateCopilotResponse: (...args: any[]) => {} };\n const { getContextString, copilotApiConfig } = useCopilotContext();\n const headers = {\n ...(copilotApiConfig.publicApiKey\n ? { [COPILOT_CLOUD_PUBLIC_API_KEY_HEADER]: copilotApiConfig.publicApiKey }\n : {}),\n };\n\n async function runtimeClientResponseToStringStream(\n responsePromise: ReturnType<typeof runtimeClient.generateCopilotResponse>,\n ) {\n const messagesStream = runtimeClient.asStream(responsePromise);\n\n return new ReadableStream({\n async start(controller) {\n const reader = messagesStream.getReader();\n let sentContent = \"\";\n\n while (true) {\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n\n const messages = convertGqlOutputToMessages(value.generateCopilotResponse.messages);\n\n let newContent = \"\";\n\n for (const message of messages) {\n if (message.isTextMessage()) {\n newContent += message.content;\n }\n }\n if (newContent) {\n const contentToSend = newContent.slice(sentContent.length);\n controller.enqueue(contentToSend);\n sentContent += contentToSend;\n }\n }\n controller.close();\n },\n });\n }\n\n const insertionFunction = useCallback(\n async (\n editorState: EditingEditorState,\n insertionPrompt: string,\n documents: DocumentPointer[],\n abortSignal: AbortSignal,\n ) => {\n const res = await retry(async () => {\n const messages: Message[] = [\n new TextMessage({\n role: Role.System,\n content: insertionApiConfig.makeSystemPrompt(\n textareaPurpose,\n getContextString(documents, contextCategories),\n ),\n }),\n ...insertionApiConfig.fewShotMessages,\n new TextMessage({\n role: Role.User,\n content: `<TextAfterCursor>${editorState.textAfterCursor}</TextAfterCursor>`,\n }),\n new TextMessage({\n role: Role.User,\n content: `<TextBeforeCursor>${editorState.textBeforeCursor}</TextBeforeCursor>`,\n }),\n new TextMessage({\n role: Role.User,\n content: `<InsertionPrompt>${insertionPrompt}</InsertionPrompt>`,\n }),\n ];\n\n return runtimeClientResponseToStringStream(\n runtimeClient.generateCopilotResponse({\n data: {\n frontend: {\n actions: [],\n url: window.location.href,\n },\n messages: convertMessagesToGqlInput(filterAgentStateMessages(messages)),\n metadata: {\n requestType: CopilotRequestType.TextareaCompletion,\n },\n },\n properties: copilotApiConfig.properties,\n signal: abortSignal,\n }),\n );\n });\n\n return res;\n },\n [insertionApiConfig, getContextString, contextCategories, textareaPurpose],\n );\n\n const editingFunction = useCallback(\n async (\n editorState: EditingEditorState,\n editingPrompt: string,\n documents: DocumentPointer[],\n abortSignal: AbortSignal,\n ) => {\n const res = await retry(async () => {\n const messages: Message[] = [\n new TextMessage({\n role: Role.System,\n content: editingApiConfig.makeSystemPrompt(\n textareaPurpose,\n getContextString(documents, contextCategories),\n ),\n }),\n ...editingApiConfig.fewShotMessages,\n new TextMessage({\n role: Role.User,\n content: `<TextBeforeCursor>${editorState.textBeforeCursor}</TextBeforeCursor>`,\n }),\n new TextMessage({\n role: Role.User,\n content: `<TextToEdit>${editorState.selectedText}</TextToEdit>`,\n }),\n new TextMessage({\n role: Role.User,\n content: `<TextAfterCursor>${editorState.textAfterCursor}</TextAfterCursor>`,\n }),\n new TextMessage({\n role: Role.User,\n content: `<EditingPrompt>${editingPrompt}</EditingPrompt>`,\n }),\n ];\n\n return runtimeClientResponseToStringStream(\n runtimeClient.generateCopilotResponse({\n data: {\n frontend: {\n actions: [],\n url: window.location.href,\n },\n messages: convertMessagesToGqlInput(filterAgentStateMessages(messages)),\n metadata: {\n requestType: CopilotRequestType.TextareaCompletion,\n },\n },\n properties: copilotApiConfig.properties,\n signal: abortSignal,\n }),\n );\n });\n\n return res;\n },\n [editingApiConfig, getContextString, contextCategories, textareaPurpose],\n );\n\n const insertionOrEditingFunction = useCallback(\n async (\n editorState: EditingEditorState,\n insertionPrompt: string,\n documents: DocumentPointer[],\n abortSignal: AbortSignal,\n ) => {\n if (editorState.selectedText === \"\") {\n return await insertionFunction(editorState, insertionPrompt, documents, abortSignal);\n } else {\n return await editingFunction(editorState, insertionPrompt, documents, abortSignal);\n }\n },\n [insertionFunction, editingFunction],\n );\n\n return insertionOrEditingFunction;\n}\n"],"mappings":"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","names":[]}
@@ -36,4 +36,4 @@ var SuggestionElement = (props) => {
36
36
  export {
37
37
  makeRenderElementFunction
38
38
  };
39
- //# sourceMappingURL=chunk-7L6GIHDM.mjs.map
39
+ //# sourceMappingURL=chunk-F2ULK22F.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/base-copilot-textarea/render-element.tsx"],"sourcesContent":["import { RenderElementProps } from \"slate-react\";\nimport React from \"react\";\n\nexport type RenderElementFunction = (props: RenderElementProps) => React.JSX.Element;\n\nexport function makeRenderElementFunction(\n suggestionsStyle: React.CSSProperties,\n): RenderElementFunction {\n return (props: RenderElementProps) => {\n switch (props.element.type) {\n case \"paragraph\":\n return <DefaultElement {...props} />;\n case \"suggestion\":\n return <SuggestionElement {...props} suggestionsStyle={suggestionsStyle} />;\n }\n };\n}\n\nconst DefaultElement = (props: RenderElementProps) => {\n return <div {...props.attributes}>{props.children}</div>;\n};\nconst SuggestionElement = (\n props: RenderElementProps & {\n suggestionsStyle: React.CSSProperties;\n },\n) => {\n return (\n <span\n {...props.attributes}\n style={{\n ...props.suggestionsStyle,\n }}\n data-testid=\"suggestion\"\n contentEditable={false}\n >\n {props.children /* https://github.com/ianstormtaylor/slate/issues/3930 */}\n {props.element.type === \"suggestion\" && props.element.content}\n </span>\n );\n};\n"],"mappings":";;;;;;AAWe,cAgBX,YAhBW;AANR,SAAS,0BACd,kBACuB;AACvB,SAAO,CAAC,UAA8B;AACpC,YAAQ,MAAM,QAAQ,MAAM;AAAA,MAC1B,KAAK;AACH,eAAO,oBAAC,mCAAmB,MAAO;AAAA,MACpC,KAAK;AACH,eAAO,oBAAC,oDAAsB,QAAtB,EAA6B,mBAAoC;AAAA,IAC7E;AAAA,EACF;AACF;AAEA,IAAM,iBAAiB,CAAC,UAA8B;AACpD,SAAO,oBAAC,wCAAQ,MAAM,aAAd,EAA2B,gBAAM,WAAS;AACpD;AACA,IAAM,oBAAoB,CACxB,UAGG;AACH,SACE;AAAA,IAAC;AAAA,qCACK,MAAM,aADX;AAAA,MAEC,OAAO,mBACF,MAAM;AAAA,MAEX,eAAY;AAAA,MACZ,iBAAiB;AAAA,MAEhB;AAAA,cAAM;AAAA,QACN,MAAM,QAAQ,SAAS,gBAAgB,MAAM,QAAQ;AAAA;AAAA;AAAA,EACxD;AAEJ;","names":[]}