@autumnsgrove/groveengine 0.6.3 → 0.6.5
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/components/admin/FloatingToolbar.svelte +373 -0
- package/dist/components/admin/FloatingToolbar.svelte.d.ts +17 -0
- package/dist/components/admin/MarkdownEditor.svelte +26 -347
- package/dist/components/admin/MarkdownEditor.svelte.d.ts +1 -1
- package/dist/components/admin/composables/index.d.ts +0 -2
- package/dist/components/admin/composables/index.js +0 -2
- package/dist/components/custom/MobileTOC.svelte +20 -13
- package/dist/components/quota/UpgradePrompt.svelte +1 -1
- package/dist/server/services/database.d.ts +138 -0
- package/dist/server/services/database.js +234 -0
- package/dist/server/services/index.d.ts +5 -1
- package/dist/server/services/index.js +24 -2
- package/dist/server/services/turnstile.d.ts +66 -0
- package/dist/server/services/turnstile.js +131 -0
- package/dist/server/services/users.d.ts +104 -0
- package/dist/server/services/users.js +158 -0
- package/dist/styles/README.md +50 -0
- package/dist/styles/vine-pattern.css +24 -0
- package/dist/types/turnstile.d.ts +42 -0
- package/dist/ui/components/forms/TurnstileWidget.svelte +111 -0
- package/dist/ui/components/forms/TurnstileWidget.svelte.d.ts +14 -0
- package/dist/ui/components/primitives/dialog/dialog-overlay.svelte +1 -1
- package/dist/ui/components/primitives/sheet/sheet-overlay.svelte +1 -1
- package/dist/ui/components/ui/Logo.svelte +161 -23
- package/dist/ui/components/ui/Logo.svelte.d.ts +4 -10
- package/dist/ui/tokens/fonts.d.ts +69 -0
- package/dist/ui/tokens/fonts.js +341 -0
- package/dist/ui/tokens/index.d.ts +6 -5
- package/dist/ui/tokens/index.js +7 -6
- package/package.json +1 -1
- package/static/robots.txt +487 -0
- package/dist/components/admin/composables/useCommandPalette.svelte.d.ts +0 -87
- package/dist/components/admin/composables/useCommandPalette.svelte.js +0 -158
- package/dist/components/admin/composables/useSlashCommands.svelte.d.ts +0 -104
- package/dist/components/admin/composables/useSlashCommands.svelte.js +0 -215
package/dist/ui/tokens/index.js
CHANGED
|
@@ -11,9 +11,10 @@
|
|
|
11
11
|
// - Bark Brown: Text and dark accents (#3d2914)
|
|
12
12
|
// - Cream: Background and light surfaces (#fefdfb)
|
|
13
13
|
// Design token exports
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export
|
|
14
|
+
export * from "./colors.js";
|
|
15
|
+
export * from "./typography.js";
|
|
16
|
+
export * from "./spacing.js";
|
|
17
|
+
export * from "./effects.js";
|
|
18
|
+
export * from "./animation.js";
|
|
19
|
+
export * from "./fonts.js";
|
|
20
|
+
export const TOKENS_VERSION = "0.2.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autumnsgrove/groveengine",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.5",
|
|
4
4
|
"description": "Multi-tenant blog engine for Grove Platform. Features gutter annotations, markdown editing, magic code auth, and Cloudflare Workers deployment.",
|
|
5
5
|
"author": "AutumnsGrove",
|
|
6
6
|
"license": "AGPL-3.0-only",
|
|
@@ -0,0 +1,487 @@
|
|
|
1
|
+
# Grove User Blog robots.txt
|
|
2
|
+
# Last updated: December 22, 2025
|
|
3
|
+
#
|
|
4
|
+
# Grove blocks AI crawlers and training bots to protect user content.
|
|
5
|
+
# We allow traditional search engines for discoverability.
|
|
6
|
+
#
|
|
7
|
+
# This list is maintained using https://github.com/ai-robots-txt/ai.robots.txt
|
|
8
|
+
# as a reference, plus additional known crawlers.
|
|
9
|
+
#
|
|
10
|
+
# Note: robots.txt is voluntary. Some bad actors ignore it entirely.
|
|
11
|
+
# We also use Cloudflare's AI bot blocking for enforcement.
|
|
12
|
+
# See: https://developers.cloudflare.com/bots/additional-configurations/block-ai-bots/
|
|
13
|
+
|
|
14
|
+
# =============================================================================
|
|
15
|
+
# TRADITIONAL SEARCH ENGINES (ALLOWED)
|
|
16
|
+
# =============================================================================
|
|
17
|
+
|
|
18
|
+
User-agent: Googlebot
|
|
19
|
+
Allow: /
|
|
20
|
+
|
|
21
|
+
User-agent: Bingbot
|
|
22
|
+
Allow: /
|
|
23
|
+
|
|
24
|
+
User-agent: DuckDuckBot
|
|
25
|
+
Allow: /
|
|
26
|
+
|
|
27
|
+
User-agent: KagiBot
|
|
28
|
+
Allow: /
|
|
29
|
+
|
|
30
|
+
# Slurp is Yahoo's crawler (yes, really)
|
|
31
|
+
User-agent: Slurp
|
|
32
|
+
Allow: /
|
|
33
|
+
|
|
34
|
+
User-agent: Yandex
|
|
35
|
+
Allow: /
|
|
36
|
+
|
|
37
|
+
User-agent: Baiduspider
|
|
38
|
+
Allow: /
|
|
39
|
+
|
|
40
|
+
# =============================================================================
|
|
41
|
+
# OPENAI CRAWLERS
|
|
42
|
+
# =============================================================================
|
|
43
|
+
|
|
44
|
+
User-agent: GPTBot
|
|
45
|
+
Disallow: /
|
|
46
|
+
|
|
47
|
+
User-agent: ChatGPT-User
|
|
48
|
+
Disallow: /
|
|
49
|
+
|
|
50
|
+
User-agent: ChatGPT Agent
|
|
51
|
+
Disallow: /
|
|
52
|
+
|
|
53
|
+
User-agent: OAI-SearchBot
|
|
54
|
+
Disallow: /
|
|
55
|
+
|
|
56
|
+
User-agent: OpenAI
|
|
57
|
+
Disallow: /
|
|
58
|
+
|
|
59
|
+
User-agent: Operator
|
|
60
|
+
Disallow: /
|
|
61
|
+
|
|
62
|
+
# =============================================================================
|
|
63
|
+
# ANTHROPIC CRAWLERS
|
|
64
|
+
# =============================================================================
|
|
65
|
+
|
|
66
|
+
User-agent: anthropic-ai
|
|
67
|
+
Disallow: /
|
|
68
|
+
|
|
69
|
+
User-agent: ClaudeBot
|
|
70
|
+
Disallow: /
|
|
71
|
+
|
|
72
|
+
User-agent: Claude-Web
|
|
73
|
+
Disallow: /
|
|
74
|
+
|
|
75
|
+
User-agent: Claude-User
|
|
76
|
+
Disallow: /
|
|
77
|
+
|
|
78
|
+
User-agent: Claude-SearchBot
|
|
79
|
+
Disallow: /
|
|
80
|
+
|
|
81
|
+
# =============================================================================
|
|
82
|
+
# GOOGLE AI CRAWLERS (distinct from search)
|
|
83
|
+
# =============================================================================
|
|
84
|
+
|
|
85
|
+
User-agent: Google-Extended
|
|
86
|
+
Disallow: /
|
|
87
|
+
|
|
88
|
+
User-agent: Google-CloudVertexBot
|
|
89
|
+
Disallow: /
|
|
90
|
+
|
|
91
|
+
User-agent: CloudVertexBot
|
|
92
|
+
Disallow: /
|
|
93
|
+
|
|
94
|
+
User-agent: Google-Firebase
|
|
95
|
+
Disallow: /
|
|
96
|
+
|
|
97
|
+
User-agent: Google-NotebookLM
|
|
98
|
+
Disallow: /
|
|
99
|
+
|
|
100
|
+
User-agent: NotebookLM
|
|
101
|
+
Disallow: /
|
|
102
|
+
|
|
103
|
+
User-agent: GoogleOther
|
|
104
|
+
Disallow: /
|
|
105
|
+
|
|
106
|
+
User-agent: GoogleOther-Image
|
|
107
|
+
Disallow: /
|
|
108
|
+
|
|
109
|
+
User-agent: GoogleOther-Video
|
|
110
|
+
Disallow: /
|
|
111
|
+
|
|
112
|
+
User-agent: GoogleAgent-Mariner
|
|
113
|
+
Disallow: /
|
|
114
|
+
|
|
115
|
+
User-agent: Gemini-Deep-Research
|
|
116
|
+
Disallow: /
|
|
117
|
+
|
|
118
|
+
# =============================================================================
|
|
119
|
+
# META CRAWLERS
|
|
120
|
+
# =============================================================================
|
|
121
|
+
|
|
122
|
+
User-agent: Meta-ExternalAgent
|
|
123
|
+
Disallow: /
|
|
124
|
+
|
|
125
|
+
User-agent: meta-externalagent
|
|
126
|
+
Disallow: /
|
|
127
|
+
|
|
128
|
+
User-agent: Meta-ExternalFetcher
|
|
129
|
+
Disallow: /
|
|
130
|
+
|
|
131
|
+
User-agent: meta-externalfetcher
|
|
132
|
+
Disallow: /
|
|
133
|
+
|
|
134
|
+
User-agent: meta-webindexer
|
|
135
|
+
Disallow: /
|
|
136
|
+
|
|
137
|
+
User-agent: FacebookBot
|
|
138
|
+
Disallow: /
|
|
139
|
+
|
|
140
|
+
User-agent: facebookexternalhit
|
|
141
|
+
Disallow: /
|
|
142
|
+
|
|
143
|
+
# =============================================================================
|
|
144
|
+
# APPLE CRAWLERS
|
|
145
|
+
# =============================================================================
|
|
146
|
+
|
|
147
|
+
User-agent: Applebot-Extended
|
|
148
|
+
Disallow: /
|
|
149
|
+
|
|
150
|
+
# Note: Regular Applebot for Siri/Spotlight is allowed
|
|
151
|
+
|
|
152
|
+
# =============================================================================
|
|
153
|
+
# AMAZON CRAWLERS
|
|
154
|
+
# =============================================================================
|
|
155
|
+
|
|
156
|
+
User-agent: Amazonbot
|
|
157
|
+
Disallow: /
|
|
158
|
+
|
|
159
|
+
User-agent: AmazonBuyForMe
|
|
160
|
+
Disallow: /
|
|
161
|
+
|
|
162
|
+
User-agent: amazon-kendra
|
|
163
|
+
Disallow: /
|
|
164
|
+
|
|
165
|
+
User-agent: bedrockbot
|
|
166
|
+
Disallow: /
|
|
167
|
+
|
|
168
|
+
# =============================================================================
|
|
169
|
+
# BYTEDANCE / TIKTOK
|
|
170
|
+
# =============================================================================
|
|
171
|
+
|
|
172
|
+
User-agent: Bytespider
|
|
173
|
+
Disallow: /
|
|
174
|
+
|
|
175
|
+
User-agent: TikTokSpider
|
|
176
|
+
Disallow: /
|
|
177
|
+
|
|
178
|
+
# =============================================================================
|
|
179
|
+
# PERPLEXITY
|
|
180
|
+
# =============================================================================
|
|
181
|
+
|
|
182
|
+
User-agent: PerplexityBot
|
|
183
|
+
Disallow: /
|
|
184
|
+
|
|
185
|
+
User-agent: Perplexity-User
|
|
186
|
+
Disallow: /
|
|
187
|
+
|
|
188
|
+
# =============================================================================
|
|
189
|
+
# COMMON CRAWL (used for ML training datasets)
|
|
190
|
+
# =============================================================================
|
|
191
|
+
|
|
192
|
+
User-agent: CCBot
|
|
193
|
+
Disallow: /
|
|
194
|
+
|
|
195
|
+
# =============================================================================
|
|
196
|
+
# MISTRAL
|
|
197
|
+
# =============================================================================
|
|
198
|
+
|
|
199
|
+
User-agent: MistralAI-User
|
|
200
|
+
Disallow: /
|
|
201
|
+
|
|
202
|
+
User-agent: MistralAI-User/1.0
|
|
203
|
+
Disallow: /
|
|
204
|
+
|
|
205
|
+
# =============================================================================
|
|
206
|
+
# DEEPSEEK
|
|
207
|
+
# =============================================================================
|
|
208
|
+
|
|
209
|
+
User-agent: DeepSeekBot
|
|
210
|
+
Disallow: /
|
|
211
|
+
|
|
212
|
+
# =============================================================================
|
|
213
|
+
# COHERE
|
|
214
|
+
# =============================================================================
|
|
215
|
+
|
|
216
|
+
User-agent: cohere-ai
|
|
217
|
+
Disallow: /
|
|
218
|
+
|
|
219
|
+
User-agent: cohere-training-data-crawler
|
|
220
|
+
Disallow: /
|
|
221
|
+
|
|
222
|
+
# =============================================================================
|
|
223
|
+
# OTHER AI CRAWLERS (alphabetical)
|
|
224
|
+
# =============================================================================
|
|
225
|
+
|
|
226
|
+
User-agent: AddSearchBot
|
|
227
|
+
Disallow: /
|
|
228
|
+
|
|
229
|
+
User-agent: AI2Bot
|
|
230
|
+
Disallow: /
|
|
231
|
+
|
|
232
|
+
User-agent: AI2Bot-DeepResearchEval
|
|
233
|
+
Disallow: /
|
|
234
|
+
|
|
235
|
+
User-agent: Ai2Bot-Dolma
|
|
236
|
+
Disallow: /
|
|
237
|
+
|
|
238
|
+
User-agent: aiHitBot
|
|
239
|
+
Disallow: /
|
|
240
|
+
|
|
241
|
+
User-agent: Andibot
|
|
242
|
+
Disallow: /
|
|
243
|
+
|
|
244
|
+
User-agent: Anomura
|
|
245
|
+
Disallow: /
|
|
246
|
+
|
|
247
|
+
User-agent: atlassian-bot
|
|
248
|
+
Disallow: /
|
|
249
|
+
|
|
250
|
+
User-agent: Awario
|
|
251
|
+
Disallow: /
|
|
252
|
+
|
|
253
|
+
User-agent: bigsur.ai
|
|
254
|
+
Disallow: /
|
|
255
|
+
|
|
256
|
+
User-agent: Bravebot
|
|
257
|
+
Disallow: /
|
|
258
|
+
|
|
259
|
+
User-agent: Brightbot 1.0
|
|
260
|
+
Disallow: /
|
|
261
|
+
|
|
262
|
+
User-agent: BuddyBot
|
|
263
|
+
Disallow: /
|
|
264
|
+
|
|
265
|
+
User-agent: Channel3Bot
|
|
266
|
+
Disallow: /
|
|
267
|
+
|
|
268
|
+
User-agent: ChatGLM-Spider
|
|
269
|
+
Disallow: /
|
|
270
|
+
|
|
271
|
+
User-agent: Cloudflare-AutoRAG
|
|
272
|
+
Disallow: /
|
|
273
|
+
|
|
274
|
+
User-agent: Cotoyogi
|
|
275
|
+
Disallow: /
|
|
276
|
+
|
|
277
|
+
User-agent: Crawl4AI
|
|
278
|
+
Disallow: /
|
|
279
|
+
|
|
280
|
+
User-agent: Crawlspace
|
|
281
|
+
Disallow: /
|
|
282
|
+
|
|
283
|
+
User-agent: Datenbank Crawler
|
|
284
|
+
Disallow: /
|
|
285
|
+
|
|
286
|
+
User-agent: Devin
|
|
287
|
+
Disallow: /
|
|
288
|
+
|
|
289
|
+
User-agent: Diffbot
|
|
290
|
+
Disallow: /
|
|
291
|
+
|
|
292
|
+
User-agent: DuckAssistBot
|
|
293
|
+
Disallow: /
|
|
294
|
+
|
|
295
|
+
User-agent: Echobot Bot
|
|
296
|
+
Disallow: /
|
|
297
|
+
|
|
298
|
+
User-agent: EchoboxBot
|
|
299
|
+
Disallow: /
|
|
300
|
+
|
|
301
|
+
User-agent: Factset_spyderbot
|
|
302
|
+
Disallow: /
|
|
303
|
+
|
|
304
|
+
User-agent: FirecrawlAgent
|
|
305
|
+
Disallow: /
|
|
306
|
+
|
|
307
|
+
User-agent: FriendlyCrawler
|
|
308
|
+
Disallow: /
|
|
309
|
+
|
|
310
|
+
User-agent: iAskBot
|
|
311
|
+
Disallow: /
|
|
312
|
+
|
|
313
|
+
User-agent: iaskspider
|
|
314
|
+
Disallow: /
|
|
315
|
+
|
|
316
|
+
User-agent: iaskspider/2.0
|
|
317
|
+
Disallow: /
|
|
318
|
+
|
|
319
|
+
User-agent: IbouBot
|
|
320
|
+
Disallow: /
|
|
321
|
+
|
|
322
|
+
User-agent: ICC-Crawler
|
|
323
|
+
Disallow: /
|
|
324
|
+
|
|
325
|
+
User-agent: ImagesiftBot
|
|
326
|
+
Disallow: /
|
|
327
|
+
|
|
328
|
+
User-agent: imageSpider
|
|
329
|
+
Disallow: /
|
|
330
|
+
|
|
331
|
+
User-agent: img2dataset
|
|
332
|
+
Disallow: /
|
|
333
|
+
|
|
334
|
+
User-agent: ISSCyberRiskCrawler
|
|
335
|
+
Disallow: /
|
|
336
|
+
|
|
337
|
+
User-agent: Kangaroo Bot
|
|
338
|
+
Disallow: /
|
|
339
|
+
|
|
340
|
+
User-agent: KlaviyoAIBot
|
|
341
|
+
Disallow: /
|
|
342
|
+
|
|
343
|
+
User-agent: KunatoCrawler
|
|
344
|
+
Disallow: /
|
|
345
|
+
|
|
346
|
+
User-agent: laion-huggingface-processor
|
|
347
|
+
Disallow: /
|
|
348
|
+
|
|
349
|
+
User-agent: LAIONDownloader
|
|
350
|
+
Disallow: /
|
|
351
|
+
|
|
352
|
+
User-agent: LCC
|
|
353
|
+
Disallow: /
|
|
354
|
+
|
|
355
|
+
User-agent: LinerBot
|
|
356
|
+
Disallow: /
|
|
357
|
+
|
|
358
|
+
User-agent: Linguee Bot
|
|
359
|
+
Disallow: /
|
|
360
|
+
|
|
361
|
+
User-agent: LinkupBot
|
|
362
|
+
Disallow: /
|
|
363
|
+
|
|
364
|
+
User-agent: Manus-User
|
|
365
|
+
Disallow: /
|
|
366
|
+
|
|
367
|
+
User-agent: MyCentralAIScraperBot
|
|
368
|
+
Disallow: /
|
|
369
|
+
|
|
370
|
+
User-agent: netEstate Imprint Crawler
|
|
371
|
+
Disallow: /
|
|
372
|
+
|
|
373
|
+
User-agent: NovaAct
|
|
374
|
+
Disallow: /
|
|
375
|
+
|
|
376
|
+
User-agent: omgili
|
|
377
|
+
Disallow: /
|
|
378
|
+
|
|
379
|
+
User-agent: omgilibot
|
|
380
|
+
Disallow: /
|
|
381
|
+
|
|
382
|
+
User-agent: PanguBot
|
|
383
|
+
Disallow: /
|
|
384
|
+
|
|
385
|
+
User-agent: Panscient
|
|
386
|
+
Disallow: /
|
|
387
|
+
|
|
388
|
+
User-agent: panscient.com
|
|
389
|
+
Disallow: /
|
|
390
|
+
|
|
391
|
+
User-agent: PetalBot
|
|
392
|
+
Disallow: /
|
|
393
|
+
|
|
394
|
+
User-agent: PhindBot
|
|
395
|
+
Disallow: /
|
|
396
|
+
|
|
397
|
+
User-agent: Poggio-Citations
|
|
398
|
+
Disallow: /
|
|
399
|
+
|
|
400
|
+
User-agent: Poseidon Research Crawler
|
|
401
|
+
Disallow: /
|
|
402
|
+
|
|
403
|
+
User-agent: QualifiedBot
|
|
404
|
+
Disallow: /
|
|
405
|
+
|
|
406
|
+
User-agent: QuillBot
|
|
407
|
+
Disallow: /
|
|
408
|
+
|
|
409
|
+
User-agent: quillbot.com
|
|
410
|
+
Disallow: /
|
|
411
|
+
|
|
412
|
+
User-agent: SBIntuitionsBot
|
|
413
|
+
Disallow: /
|
|
414
|
+
|
|
415
|
+
User-agent: Scrapy
|
|
416
|
+
Disallow: /
|
|
417
|
+
|
|
418
|
+
User-agent: SemrushBot-OCOB
|
|
419
|
+
Disallow: /
|
|
420
|
+
|
|
421
|
+
User-agent: SemrushBot-SWA
|
|
422
|
+
Disallow: /
|
|
423
|
+
|
|
424
|
+
User-agent: ShapBot
|
|
425
|
+
Disallow: /
|
|
426
|
+
|
|
427
|
+
User-agent: Sidetrade indexer bot
|
|
428
|
+
Disallow: /
|
|
429
|
+
|
|
430
|
+
User-agent: Spider
|
|
431
|
+
Disallow: /
|
|
432
|
+
|
|
433
|
+
User-agent: TavilyBot
|
|
434
|
+
Disallow: /
|
|
435
|
+
|
|
436
|
+
User-agent: TerraCotta
|
|
437
|
+
Disallow: /
|
|
438
|
+
|
|
439
|
+
User-agent: Thinkbot
|
|
440
|
+
Disallow: /
|
|
441
|
+
|
|
442
|
+
User-agent: Timpibot
|
|
443
|
+
Disallow: /
|
|
444
|
+
|
|
445
|
+
User-agent: TwinAgent
|
|
446
|
+
Disallow: /
|
|
447
|
+
|
|
448
|
+
User-agent: VelenPublicWebCrawler
|
|
449
|
+
Disallow: /
|
|
450
|
+
|
|
451
|
+
User-agent: WARDBot
|
|
452
|
+
Disallow: /
|
|
453
|
+
|
|
454
|
+
User-agent: Webzio-Extended
|
|
455
|
+
Disallow: /
|
|
456
|
+
|
|
457
|
+
User-agent: webzio-extended
|
|
458
|
+
Disallow: /
|
|
459
|
+
|
|
460
|
+
User-agent: wpbot
|
|
461
|
+
Disallow: /
|
|
462
|
+
|
|
463
|
+
User-agent: WRTNBot
|
|
464
|
+
Disallow: /
|
|
465
|
+
|
|
466
|
+
User-agent: YaK
|
|
467
|
+
Disallow: /
|
|
468
|
+
|
|
469
|
+
User-agent: YandexAdditional
|
|
470
|
+
Disallow: /
|
|
471
|
+
|
|
472
|
+
User-agent: YandexAdditionalBot
|
|
473
|
+
Disallow: /
|
|
474
|
+
|
|
475
|
+
User-agent: YouBot
|
|
476
|
+
Disallow: /
|
|
477
|
+
|
|
478
|
+
User-agent: ZanistaBot
|
|
479
|
+
Disallow: /
|
|
480
|
+
|
|
481
|
+
# =============================================================================
|
|
482
|
+
# DEFAULT RULE
|
|
483
|
+
# =============================================================================
|
|
484
|
+
|
|
485
|
+
# Allow all other well-behaved crawlers
|
|
486
|
+
User-agent: *
|
|
487
|
+
Allow: /
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Command Palette Composable
|
|
3
|
-
* Manages the command palette (Cmd+K) functionality
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @typedef {Object} PaletteAction
|
|
7
|
-
* @property {string} id
|
|
8
|
-
* @property {string} label
|
|
9
|
-
* @property {string} shortcut
|
|
10
|
-
* @property {() => void} action
|
|
11
|
-
* @property {string} [themeKey]
|
|
12
|
-
* @property {boolean} [isTheme]
|
|
13
|
-
*/
|
|
14
|
-
/**
|
|
15
|
-
* @typedef {Object} CommandPaletteState
|
|
16
|
-
* @property {boolean} open
|
|
17
|
-
* @property {string} query
|
|
18
|
-
* @property {number} selectedIndex
|
|
19
|
-
*/
|
|
20
|
-
/**
|
|
21
|
-
* @typedef {Object} CommandPaletteOptions
|
|
22
|
-
* @property {() => PaletteAction[]} [getActions] - Function to get available actions
|
|
23
|
-
* @property {() => Record<string, any>} [getThemes] - Function to get available themes
|
|
24
|
-
* @property {() => string} [getCurrentTheme] - Function to get current theme
|
|
25
|
-
*/
|
|
26
|
-
/**
|
|
27
|
-
* @typedef {Object} CommandPaletteManager
|
|
28
|
-
* @property {CommandPaletteState} state
|
|
29
|
-
* @property {boolean} isOpen
|
|
30
|
-
* @property {string} query
|
|
31
|
-
* @property {number} selectedIndex
|
|
32
|
-
* @property {() => PaletteAction[]} getAllCommands
|
|
33
|
-
* @property {() => PaletteAction[]} getFilteredCommands
|
|
34
|
-
* @property {() => void} open
|
|
35
|
-
* @property {() => void} close
|
|
36
|
-
* @property {() => void} toggle
|
|
37
|
-
* @property {(direction: 'up' | 'down') => void} navigate
|
|
38
|
-
* @property {(index: number) => PaletteAction | undefined} execute
|
|
39
|
-
* @property {(query: string) => void} setQuery
|
|
40
|
-
*/
|
|
41
|
-
/**
|
|
42
|
-
* Creates a command palette manager with Svelte 5 runes
|
|
43
|
-
* @param {CommandPaletteOptions} options - Configuration options
|
|
44
|
-
* @returns {CommandPaletteManager} Command palette state and controls
|
|
45
|
-
*/
|
|
46
|
-
export function useCommandPalette(options?: CommandPaletteOptions): CommandPaletteManager;
|
|
47
|
-
export type PaletteAction = {
|
|
48
|
-
id: string;
|
|
49
|
-
label: string;
|
|
50
|
-
shortcut: string;
|
|
51
|
-
action: () => void;
|
|
52
|
-
themeKey?: string | undefined;
|
|
53
|
-
isTheme?: boolean | undefined;
|
|
54
|
-
};
|
|
55
|
-
export type CommandPaletteState = {
|
|
56
|
-
open: boolean;
|
|
57
|
-
query: string;
|
|
58
|
-
selectedIndex: number;
|
|
59
|
-
};
|
|
60
|
-
export type CommandPaletteOptions = {
|
|
61
|
-
/**
|
|
62
|
-
* - Function to get available actions
|
|
63
|
-
*/
|
|
64
|
-
getActions?: (() => PaletteAction[]) | undefined;
|
|
65
|
-
/**
|
|
66
|
-
* - Function to get available themes
|
|
67
|
-
*/
|
|
68
|
-
getThemes?: (() => Record<string, any>) | undefined;
|
|
69
|
-
/**
|
|
70
|
-
* - Function to get current theme
|
|
71
|
-
*/
|
|
72
|
-
getCurrentTheme?: (() => string) | undefined;
|
|
73
|
-
};
|
|
74
|
-
export type CommandPaletteManager = {
|
|
75
|
-
state: CommandPaletteState;
|
|
76
|
-
isOpen: boolean;
|
|
77
|
-
query: string;
|
|
78
|
-
selectedIndex: number;
|
|
79
|
-
getAllCommands: () => PaletteAction[];
|
|
80
|
-
getFilteredCommands: () => PaletteAction[];
|
|
81
|
-
open: () => void;
|
|
82
|
-
close: () => void;
|
|
83
|
-
toggle: () => void;
|
|
84
|
-
navigate: (direction: "up" | "down") => void;
|
|
85
|
-
execute: (index: number) => PaletteAction | undefined;
|
|
86
|
-
setQuery: (query: string) => void;
|
|
87
|
-
};
|