@copilotkit/react-textarea 0.0.0-main-20260220223427 → 0.0.0-main-20260403195251
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 +354 -4
- package/dist/index.cjs +22 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +5 -5
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +318 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +22 -0
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +22 -0
- package/dist/index.umd.js.map +1 -1
- package/package.json +45 -46
- package/src/components/base-copilot-textarea/base-copilot-textarea.css +5 -6
- package/src/components/copilot-textarea/copilot-textarea.tsx +3 -3
- package/src/components/hovering-toolbar/hovering-toolbar-components.tsx +3 -7
- package/src/components/hovering-toolbar/hovering-toolbar.tsx +31 -1
- package/src/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.tsx +3 -0
- package/src/esm-compat.test.ts +44 -0
- package/tsconfig.json +3 -3
- /package/{postcss.config.js → postcss.config.cjs} +0 -0
- /package/{tailwind.config.js → tailwind.config.cjs} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,359 @@
|
|
|
1
1
|
# ui
|
|
2
2
|
|
|
3
|
-
## 0.0.0-main-
|
|
3
|
+
## 0.0.0-main-20260403195251
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 1ceb963: refactor: consolidate V1/V2 packages into flat @copilotkit/\* structure
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 52a9322: Fixing license warnings, barrel export and typing
|
|
12
|
+
- Updated dependencies [1ceb963]
|
|
13
|
+
- Updated dependencies [0f6a61c]
|
|
14
|
+
- Updated dependencies [1ceb963]
|
|
15
|
+
- Updated dependencies [1ceb963]
|
|
16
|
+
- Updated dependencies [1ceb963]
|
|
17
|
+
- Updated dependencies [53e5669]
|
|
18
|
+
- Updated dependencies [52a9322]
|
|
19
|
+
- Updated dependencies [c341ed2]
|
|
20
|
+
- @copilotkit/react-core@0.0.0-main-20260403195251
|
|
21
|
+
- @copilotkit/runtime-client-gql@0.0.0-main-20260403195251
|
|
22
|
+
- @copilotkit/shared@0.0.0-main-20260403195251
|
|
23
|
+
|
|
24
|
+
## 1.55.0-next.8
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- Updated dependencies [0f6a61c]
|
|
29
|
+
- Updated dependencies [53e5669]
|
|
30
|
+
- @copilotkit/react-core@1.55.0-next.8
|
|
31
|
+
- @copilotkit/runtime-client-gql@1.55.0-next.8
|
|
32
|
+
- @copilotkit/shared@1.55.0-next.8
|
|
33
|
+
|
|
34
|
+
## 1.55.0-next.7
|
|
35
|
+
|
|
36
|
+
### Minor Changes
|
|
37
|
+
|
|
38
|
+
- 1ceb963: refactor: consolidate V1/V2 packages into flat @copilotkit/\* structure
|
|
39
|
+
|
|
40
|
+
### Patch Changes
|
|
41
|
+
|
|
42
|
+
- Updated dependencies [1ceb963]
|
|
43
|
+
- @copilotkit/react-core@1.55.0-next.7
|
|
44
|
+
- @copilotkit/runtime-client-gql@1.55.0-next.7
|
|
45
|
+
- @copilotkit/shared@1.55.0-next.7
|
|
46
|
+
|
|
47
|
+
## 1.54.1-next.6
|
|
48
|
+
|
|
49
|
+
### Patch Changes
|
|
50
|
+
|
|
51
|
+
- @copilotkit/react-core@1.54.1-next.6
|
|
52
|
+
- @copilotkit/runtime-client-gql@1.54.1-next.6
|
|
53
|
+
- @copilotkit/shared@1.54.1-next.6
|
|
54
|
+
|
|
55
|
+
## 1.54.1-next.5
|
|
56
|
+
|
|
57
|
+
### Patch Changes
|
|
58
|
+
|
|
59
|
+
- @copilotkit/react-core@1.54.1-next.5
|
|
60
|
+
- @copilotkit/runtime-client-gql@1.54.1-next.5
|
|
61
|
+
- @copilotkit/shared@1.54.1-next.5
|
|
62
|
+
|
|
63
|
+
## 1.54.1-next.4
|
|
64
|
+
|
|
65
|
+
### Patch Changes
|
|
66
|
+
|
|
67
|
+
- Updated dependencies [8113dba]
|
|
68
|
+
- @copilotkit/react-core@1.54.1-next.4
|
|
69
|
+
- @copilotkit/runtime-client-gql@1.54.1-next.4
|
|
70
|
+
- @copilotkit/shared@1.54.1-next.4
|
|
71
|
+
|
|
72
|
+
## 1.54.1-next.3
|
|
73
|
+
|
|
74
|
+
### Patch Changes
|
|
75
|
+
|
|
76
|
+
- @copilotkit/react-core@1.54.1-next.3
|
|
77
|
+
- @copilotkit/runtime-client-gql@1.54.1-next.3
|
|
78
|
+
- @copilotkit/shared@1.54.1-next.3
|
|
79
|
+
|
|
80
|
+
## 1.54.1-next.2
|
|
81
|
+
|
|
82
|
+
### Patch Changes
|
|
83
|
+
|
|
84
|
+
- @copilotkit/react-core@1.54.1-next.2
|
|
85
|
+
- @copilotkit/runtime-client-gql@1.54.1-next.2
|
|
86
|
+
- @copilotkit/shared@1.54.1-next.2
|
|
87
|
+
|
|
88
|
+
## 1.54.1-next.1
|
|
89
|
+
|
|
90
|
+
### Patch Changes
|
|
91
|
+
|
|
92
|
+
- @copilotkit/react-core@1.54.1-next.1
|
|
93
|
+
- @copilotkit/runtime-client-gql@1.54.1-next.1
|
|
94
|
+
- @copilotkit/shared@1.54.1-next.1
|
|
95
|
+
|
|
96
|
+
## 1.54.1-next.0
|
|
97
|
+
|
|
98
|
+
### Patch Changes
|
|
99
|
+
|
|
100
|
+
- @copilotkit/react-core@1.54.1-next.0
|
|
101
|
+
- @copilotkit/runtime-client-gql@1.54.1-next.0
|
|
102
|
+
- @copilotkit/shared@1.54.1-next.0
|
|
103
|
+
|
|
104
|
+
## 1.54.0
|
|
105
|
+
|
|
106
|
+
### Patch Changes
|
|
107
|
+
|
|
108
|
+
- 40c22a0: fix: restore focus to textarea when hitting Escape in CMD+K popup
|
|
109
|
+
- Updated dependencies [fa0d1cd]
|
|
110
|
+
- Updated dependencies [c80498e]
|
|
111
|
+
- Updated dependencies [af11b1e]
|
|
112
|
+
- @copilotkit/react-core@1.54.0
|
|
113
|
+
- @copilotkit/runtime-client-gql@1.54.0
|
|
114
|
+
- @copilotkit/shared@1.54.0
|
|
115
|
+
|
|
116
|
+
## 1.54.0-next.9
|
|
117
|
+
|
|
118
|
+
### Patch Changes
|
|
119
|
+
|
|
120
|
+
- @copilotkit/react-core@1.54.0-next.9
|
|
121
|
+
- @copilotkit/runtime-client-gql@1.54.0-next.9
|
|
122
|
+
- @copilotkit/shared@1.54.0-next.9
|
|
123
|
+
|
|
124
|
+
## 1.54.0-next.8
|
|
125
|
+
|
|
126
|
+
### Patch Changes
|
|
127
|
+
|
|
128
|
+
- @copilotkit/react-core@1.54.0-next.8
|
|
129
|
+
- @copilotkit/runtime-client-gql@1.54.0-next.8
|
|
130
|
+
- @copilotkit/shared@1.54.0-next.8
|
|
131
|
+
|
|
132
|
+
## 1.54.0-next.7
|
|
133
|
+
|
|
134
|
+
### Patch Changes
|
|
135
|
+
|
|
136
|
+
- @copilotkit/react-core@1.54.0-next.7
|
|
137
|
+
- @copilotkit/runtime-client-gql@1.54.0-next.7
|
|
138
|
+
- @copilotkit/shared@1.54.0-next.7
|
|
139
|
+
|
|
140
|
+
## 1.54.0-next.6
|
|
141
|
+
|
|
142
|
+
### Patch Changes
|
|
143
|
+
|
|
144
|
+
- Updated dependencies [c80498e]
|
|
145
|
+
- @copilotkit/react-core@1.54.0-next.6
|
|
146
|
+
- @copilotkit/runtime-client-gql@1.54.0-next.6
|
|
147
|
+
- @copilotkit/shared@1.54.0-next.6
|
|
148
|
+
|
|
149
|
+
## 1.54.0-next.5
|
|
150
|
+
|
|
151
|
+
### Patch Changes
|
|
152
|
+
|
|
153
|
+
- @copilotkit/react-core@1.54.0-next.5
|
|
154
|
+
- @copilotkit/runtime-client-gql@1.54.0-next.5
|
|
155
|
+
- @copilotkit/shared@1.54.0-next.5
|
|
156
|
+
|
|
157
|
+
## 1.54.0-next.4
|
|
4
158
|
|
|
5
159
|
### Patch Changes
|
|
6
160
|
|
|
161
|
+
- Updated dependencies [af11b1e]
|
|
162
|
+
- @copilotkit/react-core@1.54.0-next.4
|
|
163
|
+
- @copilotkit/runtime-client-gql@1.54.0-next.4
|
|
164
|
+
- @copilotkit/shared@1.54.0-next.4
|
|
165
|
+
|
|
166
|
+
## 1.54.0-next.3
|
|
167
|
+
|
|
168
|
+
### Patch Changes
|
|
169
|
+
|
|
170
|
+
- Updated dependencies [fa0d1cd]
|
|
171
|
+
- @copilotkit/react-core@1.54.0-next.3
|
|
172
|
+
- @copilotkit/runtime-client-gql@1.54.0-next.3
|
|
173
|
+
- @copilotkit/shared@1.54.0-next.3
|
|
174
|
+
|
|
175
|
+
## 1.53.1-next.2
|
|
176
|
+
|
|
177
|
+
### Patch Changes
|
|
178
|
+
|
|
179
|
+
- @copilotkit/react-core@1.53.1-next.2
|
|
180
|
+
- @copilotkit/runtime-client-gql@1.53.1-next.2
|
|
181
|
+
- @copilotkit/shared@1.53.1-next.2
|
|
182
|
+
|
|
183
|
+
## 1.53.1-next.1
|
|
184
|
+
|
|
185
|
+
### Patch Changes
|
|
186
|
+
|
|
187
|
+
- 40c22a0: fix: restore focus to textarea when hitting Escape in CMD+K popup
|
|
188
|
+
- @copilotkit/react-core@1.53.1-next.1
|
|
189
|
+
- @copilotkit/runtime-client-gql@1.53.1-next.1
|
|
190
|
+
- @copilotkit/shared@1.53.1-next.1
|
|
191
|
+
|
|
192
|
+
## 1.53.1-next.0
|
|
193
|
+
|
|
194
|
+
### Patch Changes
|
|
195
|
+
|
|
196
|
+
- @copilotkit/react-core@1.53.1-next.0
|
|
197
|
+
- @copilotkit/runtime-client-gql@1.53.1-next.0
|
|
198
|
+
- @copilotkit/shared@1.53.1-next.0
|
|
199
|
+
|
|
200
|
+
## 1.53.0
|
|
201
|
+
|
|
202
|
+
### Patch Changes
|
|
203
|
+
|
|
204
|
+
- Updated dependencies [1510f64]
|
|
205
|
+
- Updated dependencies [f1eaa4c]
|
|
206
|
+
- Updated dependencies [bf1fc6f]
|
|
207
|
+
- Updated dependencies [ac31331]
|
|
208
|
+
- @copilotkit/react-core@1.53.0
|
|
209
|
+
- @copilotkit/shared@1.53.0
|
|
210
|
+
- @copilotkit/runtime-client-gql@1.53.0
|
|
211
|
+
|
|
212
|
+
## 1.53.0-next.6
|
|
213
|
+
|
|
214
|
+
### Patch Changes
|
|
215
|
+
|
|
216
|
+
- @copilotkit/react-core@1.53.0-next.6
|
|
217
|
+
- @copilotkit/runtime-client-gql@1.53.0-next.6
|
|
218
|
+
- @copilotkit/shared@1.53.0-next.6
|
|
219
|
+
|
|
220
|
+
## 1.53.0-next.5
|
|
221
|
+
|
|
222
|
+
### Patch Changes
|
|
223
|
+
|
|
224
|
+
- @copilotkit/react-core@1.53.0-next.5
|
|
225
|
+
- @copilotkit/runtime-client-gql@1.53.0-next.5
|
|
226
|
+
- @copilotkit/shared@1.53.0-next.5
|
|
227
|
+
|
|
228
|
+
## 1.52.2-next.4
|
|
229
|
+
|
|
230
|
+
### Patch Changes
|
|
231
|
+
|
|
232
|
+
- Updated dependencies [ac31331]
|
|
233
|
+
- @copilotkit/react-core@1.52.2-next.4
|
|
234
|
+
- @copilotkit/runtime-client-gql@1.52.2-next.4
|
|
235
|
+
- @copilotkit/shared@1.52.2-next.4
|
|
236
|
+
|
|
237
|
+
## 1.52.2-next.3
|
|
238
|
+
|
|
239
|
+
### Patch Changes
|
|
240
|
+
|
|
241
|
+
- Updated dependencies [1510f64]
|
|
242
|
+
- @copilotkit/react-core@1.52.2-next.3
|
|
243
|
+
- @copilotkit/shared@1.52.2-next.3
|
|
244
|
+
- @copilotkit/runtime-client-gql@1.52.2-next.3
|
|
245
|
+
|
|
246
|
+
## 1.52.2-next.2
|
|
247
|
+
|
|
248
|
+
### Patch Changes
|
|
249
|
+
|
|
250
|
+
- @copilotkit/runtime-client-gql@1.52.2-next.2
|
|
251
|
+
- @copilotkit/react-core@1.52.2-next.2
|
|
252
|
+
- @copilotkit/shared@1.52.2-next.2
|
|
253
|
+
|
|
254
|
+
## 1.52.2-next.1
|
|
255
|
+
|
|
256
|
+
### Patch Changes
|
|
257
|
+
|
|
258
|
+
- Updated dependencies [bf1fc6f]
|
|
259
|
+
- @copilotkit/shared@1.52.2-next.1
|
|
260
|
+
- @copilotkit/runtime-client-gql@1.52.2-next.1
|
|
261
|
+
- @copilotkit/react-core@1.52.2-next.1
|
|
262
|
+
|
|
263
|
+
## 1.52.2-next.0
|
|
264
|
+
|
|
265
|
+
### Patch Changes
|
|
266
|
+
|
|
267
|
+
- Updated dependencies [f1eaa4c]
|
|
268
|
+
- @copilotkit/react-core@1.52.2-next.0
|
|
269
|
+
- @copilotkit/runtime-client-gql@1.52.2-next.0
|
|
270
|
+
- @copilotkit/shared@1.52.2-next.0
|
|
271
|
+
|
|
272
|
+
## 1.52.1
|
|
273
|
+
|
|
274
|
+
### Patch Changes
|
|
275
|
+
|
|
276
|
+
- bbdf67d: fix(css): address imcompat with CJS
|
|
277
|
+
- Updated dependencies [b555ac4]
|
|
278
|
+
- @copilotkit/react-core@1.52.1
|
|
279
|
+
- @copilotkit/runtime-client-gql@1.52.1
|
|
280
|
+
- @copilotkit/shared@1.52.1
|
|
281
|
+
|
|
282
|
+
## 1.52.1-next.1
|
|
283
|
+
|
|
284
|
+
### Patch Changes
|
|
285
|
+
|
|
286
|
+
- Updated dependencies [b555ac4]
|
|
287
|
+
- @copilotkit/react-core@1.52.1-next.1
|
|
288
|
+
- @copilotkit/runtime-client-gql@1.52.1-next.1
|
|
289
|
+
- @copilotkit/shared@1.52.1-next.1
|
|
290
|
+
|
|
291
|
+
## 1.52.1-next.0
|
|
292
|
+
|
|
293
|
+
### Patch Changes
|
|
294
|
+
|
|
295
|
+
- bbdf67d: fix(css): address imcompat with CJS
|
|
296
|
+
- @copilotkit/react-core@1.52.1-next.0
|
|
297
|
+
- @copilotkit/runtime-client-gql@1.52.1-next.0
|
|
298
|
+
- @copilotkit/shared@1.52.1-next.0
|
|
299
|
+
|
|
300
|
+
## 1.52.0
|
|
301
|
+
|
|
302
|
+
### Patch Changes
|
|
303
|
+
|
|
304
|
+
- Updated dependencies [6dd6c84]
|
|
305
|
+
- Updated dependencies [d77f347]
|
|
306
|
+
- Updated dependencies [2007f8b]
|
|
7
307
|
- Updated dependencies [ef0f539]
|
|
8
308
|
- Updated dependencies [412965a]
|
|
9
|
-
|
|
10
|
-
- @copilotkit/
|
|
11
|
-
- @copilotkit/
|
|
309
|
+
- Updated dependencies [5f941db]
|
|
310
|
+
- @copilotkit/react-core@1.52.0
|
|
311
|
+
- @copilotkit/shared@1.52.0
|
|
312
|
+
- @copilotkit/runtime-client-gql@1.52.0
|
|
313
|
+
|
|
314
|
+
## 1.52.0-next.8
|
|
315
|
+
|
|
316
|
+
### Patch Changes
|
|
317
|
+
|
|
318
|
+
- @copilotkit/react-core@1.52.0-next.8
|
|
319
|
+
- @copilotkit/runtime-client-gql@1.52.0-next.8
|
|
320
|
+
- @copilotkit/shared@1.52.0-next.8
|
|
321
|
+
|
|
322
|
+
## 1.52.0-next.7
|
|
323
|
+
|
|
324
|
+
### Patch Changes
|
|
325
|
+
|
|
326
|
+
- Updated dependencies [d77f347]
|
|
327
|
+
- @copilotkit/react-core@1.52.0-next.7
|
|
328
|
+
- @copilotkit/runtime-client-gql@1.52.0-next.7
|
|
329
|
+
- @copilotkit/shared@1.52.0-next.7
|
|
330
|
+
|
|
331
|
+
## 1.52.0-next.6
|
|
332
|
+
|
|
333
|
+
### Patch Changes
|
|
334
|
+
|
|
335
|
+
- Updated dependencies [2007f8b]
|
|
336
|
+
- Updated dependencies [5f941db]
|
|
337
|
+
- @copilotkit/react-core@1.52.0-next.6
|
|
338
|
+
- @copilotkit/runtime-client-gql@1.52.0-next.6
|
|
339
|
+
- @copilotkit/shared@1.52.0-next.6
|
|
340
|
+
|
|
341
|
+
## 1.52.0-next.5
|
|
342
|
+
|
|
343
|
+
### Patch Changes
|
|
344
|
+
|
|
345
|
+
- Updated dependencies [6dd6c84]
|
|
346
|
+
- @copilotkit/react-core@1.52.0-next.5
|
|
347
|
+
- @copilotkit/runtime-client-gql@1.52.0-next.5
|
|
348
|
+
- @copilotkit/shared@1.52.0-next.5
|
|
349
|
+
|
|
350
|
+
## 1.51.5-next.4
|
|
351
|
+
|
|
352
|
+
### Patch Changes
|
|
353
|
+
|
|
354
|
+
- @copilotkit/react-core@1.51.5-next.4
|
|
355
|
+
- @copilotkit/runtime-client-gql@1.51.5-next.4
|
|
356
|
+
- @copilotkit/shared@1.51.5-next.4
|
|
12
357
|
|
|
13
358
|
## 1.51.5-next.3
|
|
14
359
|
|
|
@@ -2997,6 +3342,7 @@
|
|
|
2997
3342
|
- e16d95e: New prerelease
|
|
2998
3343
|
- 1721cbd: Add convertActionsToDynamicStructuredTools to sdk-js
|
|
2999
3344
|
- CopilotKit Core:
|
|
3345
|
+
|
|
3000
3346
|
- Improved error messages and overall logs
|
|
3001
3347
|
- `useCopilotAction.renderAndAwait` renamed to `.renderAndAwaitForResponse` (backwards compatible, will be deprecated in the future)
|
|
3002
3348
|
- Improved scrolling behavior. It is now possible to scroll up during LLM response generation
|
|
@@ -3004,6 +3350,7 @@
|
|
|
3004
3350
|
- Updated interfaces for better developer ergonomics
|
|
3005
3351
|
|
|
3006
3352
|
CoAgents:
|
|
3353
|
+
|
|
3007
3354
|
- Renamed `remoteActions` to `remoteEndpoints` (backwards compatible, will be deprecated in the future)
|
|
3008
3355
|
- Support for LangGraph Platform in Remote Endpoints
|
|
3009
3356
|
- LangGraph JS Support for CoAgents (locally via `langgraph dev`, `langgraph up` or deployed to LangGraph Platform)
|
|
@@ -3011,6 +3358,7 @@
|
|
|
3011
3358
|
- Enhanced state management and message handling
|
|
3012
3359
|
|
|
3013
3360
|
CopilotKid Back-end SDK:
|
|
3361
|
+
|
|
3014
3362
|
- Released a whole-new `@copilotkit/sdk-js` for building agents with LangGraph JS Support
|
|
3015
3363
|
|
|
3016
3364
|
- 8d0144f: bump
|
|
@@ -3413,6 +3761,7 @@ CopilotKid Back-end SDK:
|
|
|
3413
3761
|
### Patch Changes
|
|
3414
3762
|
|
|
3415
3763
|
- inject minified css in bundle
|
|
3764
|
+
|
|
3416
3765
|
- removes the need to import `styles.css` manually
|
|
3417
3766
|
- empty `styles.css` included in the build for backwards compatibility
|
|
3418
3767
|
- uses tsup's `injectStyles` with `postcss` to bundle and minify the CSS, then inject it as a style tag
|
|
@@ -3577,6 +3926,7 @@ CopilotKid Back-end SDK:
|
|
|
3577
3926
|
### Major Changes
|
|
3578
3927
|
|
|
3579
3928
|
- b6a4b6eb: V1.0 Release Candidate
|
|
3929
|
+
|
|
3580
3930
|
- A robust new protocol between the frontend and the Copilot Runtime
|
|
3581
3931
|
- Support for Copilot Cloud
|
|
3582
3932
|
- Generative UI
|
package/dist/index.cjs
CHANGED
|
@@ -895,6 +895,9 @@ const HoveringInsertionPromptBoxCore = ({ performInsertion, state, insertionOrEd
|
|
|
895
895
|
} else if (e.key === "Enter") {
|
|
896
896
|
e.preventDefault();
|
|
897
897
|
beginGeneratingAdjustment();
|
|
898
|
+
} else if (e.key === "Escape") {
|
|
899
|
+
e.preventDefault();
|
|
900
|
+
setIsDisplayed(false);
|
|
898
901
|
}
|
|
899
902
|
},
|
|
900
903
|
placeholder,
|
|
@@ -1041,6 +1044,25 @@ const HoveringToolbar = (props) => {
|
|
|
1041
1044
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
1042
1045
|
};
|
|
1043
1046
|
}, [ref, setIsDisplayed]);
|
|
1047
|
+
(0, react.useEffect)(() => {
|
|
1048
|
+
const handleEscapeKey = (event) => {
|
|
1049
|
+
if (event.key === "Escape") {
|
|
1050
|
+
event.preventDefault();
|
|
1051
|
+
setIsDisplayed(false);
|
|
1052
|
+
try {
|
|
1053
|
+
slate_react.ReactEditor.focus(editor);
|
|
1054
|
+
} catch {}
|
|
1055
|
+
}
|
|
1056
|
+
};
|
|
1057
|
+
if (isDisplayed) document.addEventListener("keydown", handleEscapeKey);
|
|
1058
|
+
return () => {
|
|
1059
|
+
document.removeEventListener("keydown", handleEscapeKey);
|
|
1060
|
+
};
|
|
1061
|
+
}, [
|
|
1062
|
+
isDisplayed,
|
|
1063
|
+
setIsDisplayed,
|
|
1064
|
+
editor
|
|
1065
|
+
]);
|
|
1044
1066
|
if (!isShown) return null;
|
|
1045
1067
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Portal, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Menu, {
|
|
1046
1068
|
ref,
|