@qikbar/qikbar 0.1.0 → 0.2.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/README.md +30 -1
- package/bin/qikbar.mjs +203 -0
- package/dist/ai/embeddings.d.ts +51 -0
- package/dist/ai/index.d.ts +4 -0
- package/dist/ai/mcp.d.ts +84 -0
- package/dist/ai.js +27 -9
- package/dist/chunks/{bar-D5CSPT3U.js → bar-P3SCR4SJ.js} +684 -160
- package/dist/chunks/bar-P3SCR4SJ.js.map +7 -0
- package/dist/chunks/chunk-5FI7DNG7.js +271 -0
- package/dist/chunks/chunk-5FI7DNG7.js.map +7 -0
- package/dist/chunks/{chunk-I77YSUJN.js → chunk-INTEVQYK.js} +7 -3
- package/dist/chunks/{chunk-I77YSUJN.js.map → chunk-INTEVQYK.js.map} +2 -2
- package/dist/chunks/{chunk-VXTYD56F.js → chunk-JHQAIXM7.js} +9 -4
- package/dist/chunks/{chunk-VXTYD56F.js.map → chunk-JHQAIXM7.js.map} +2 -2
- package/dist/chunks/{chunk-2ADXL7KQ.js → chunk-MRHKJ2FZ.js} +63 -2
- package/dist/chunks/{chunk-2ADXL7KQ.js.map → chunk-MRHKJ2FZ.js.map} +3 -3
- package/dist/chunks/{chunk-HBBSETRF.js → chunk-OLXZNYZ4.js} +46 -6
- package/dist/chunks/chunk-OLXZNYZ4.js.map +7 -0
- package/dist/chunks/{chunk-IJ3WUM3T.js → chunk-R2AY6LRL.js} +35 -4
- package/dist/chunks/chunk-R2AY6LRL.js.map +7 -0
- package/dist/chunks/chunk-TIM4VBM4.js +98 -0
- package/dist/chunks/chunk-TIM4VBM4.js.map +7 -0
- package/dist/chunks/launcher-B5MGOPEQ.js +37 -0
- package/dist/chunks/launcher-B5MGOPEQ.js.map +7 -0
- package/dist/core/labels.d.ts +98 -0
- package/dist/core/launcher.d.ts +8 -0
- package/dist/core/lazy.d.ts +12 -0
- package/dist/core/types.d.ts +138 -2
- package/dist/element/index.d.ts +56 -0
- package/dist/element.js +146 -0
- package/dist/element.js.map +7 -0
- package/dist/extensions.js +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +25 -7
- package/dist/locales/index.d.ts +24 -0
- package/dist/locales.js +810 -0
- package/dist/locales.js.map +7 -0
- package/dist/qikbar.global.js +68 -25
- package/dist/qikbar.global.js.map +4 -4
- package/dist/react.js +8 -6
- package/dist/react.js.map +2 -2
- package/dist/server/index.d.ts +19 -0
- package/dist/server.js +38 -2
- package/dist/server.js.map +2 -2
- package/dist/solid/index.d.ts +42 -0
- package/dist/solid.js +93 -0
- package/dist/solid.js.map +7 -0
- package/dist/styles.css +34 -3
- package/dist/svelte/index.d.ts +58 -0
- package/dist/svelte.js +55 -0
- package/dist/svelte.js.map +7 -0
- package/dist/theme.js +1 -1
- package/dist/ui/bar.d.ts +89 -3
- package/dist/ui/icons.d.ts +5 -0
- package/dist/ui/markdown.d.ts +3 -1
- package/dist/ui/views.d.ts +8 -0
- package/dist/ui/webmcp.d.ts +33 -0
- package/dist/utils.js +1 -1
- package/dist/vue/index.d.ts +74 -0
- package/dist/vue.js +122 -0
- package/dist/vue.js.map +7 -0
- package/package.json +45 -4
- package/dist/chunks/bar-D5CSPT3U.js.map +0 -7
- package/dist/chunks/chunk-6TC6G2C5.js +0 -107
- package/dist/chunks/chunk-6TC6G2C5.js.map +0 -7
- package/dist/chunks/chunk-HBBSETRF.js.map +0 -7
- package/dist/chunks/chunk-IJ3WUM3T.js.map +0 -7
package/dist/ui/bar.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Frecency } from '../core/frecency.js';
|
|
2
|
-
import
|
|
2
|
+
import { type LabelKey, type Labels } from '../core/labels.js';
|
|
3
|
+
import type { Action, AIClient, AIMessage, AIOptions, ConfirmOptions, Context, EventItem, Extension, FormView, Item, Preference, QikbarConfig, QikbarEvent, QikbarEvents, QikbarInstance, ScopedStorage, Source, ToastHandle, ToastOptions, Tool, View } from '../core/types.js';
|
|
3
4
|
export interface RootView {
|
|
4
5
|
type: 'root';
|
|
5
6
|
title?: string;
|
|
@@ -72,6 +73,15 @@ export interface Frame {
|
|
|
72
73
|
error?: string;
|
|
73
74
|
/** The user moved the selection since the last query change. */
|
|
74
75
|
userMoved?: boolean;
|
|
76
|
+
/** Marked items in a `multiSelect` list, by row key. */
|
|
77
|
+
marked?: Map<string, Item>;
|
|
78
|
+
/** Row key where a Shift-click range starts. */
|
|
79
|
+
anchor?: string;
|
|
80
|
+
/** Results found by meaning (`semantic`). */
|
|
81
|
+
related?: {
|
|
82
|
+
item: Item;
|
|
83
|
+
score: number;
|
|
84
|
+
}[];
|
|
75
85
|
}
|
|
76
86
|
interface Dom {
|
|
77
87
|
root: HTMLElement;
|
|
@@ -150,13 +160,27 @@ export declare class Bar implements QikbarInstance {
|
|
|
150
160
|
private closeTimer?;
|
|
151
161
|
private destroyed;
|
|
152
162
|
private styleEl?;
|
|
163
|
+
private searchEventTimer?;
|
|
164
|
+
private webmcpCleanup?;
|
|
153
165
|
constructor(config?: QikbarConfig);
|
|
154
166
|
get isOpen(): boolean;
|
|
155
167
|
get query(): string;
|
|
156
168
|
get top(): Frame | undefined;
|
|
157
169
|
get isInline(): boolean;
|
|
170
|
+
/** Touch-friendly mode: no keyboard hints, long-press for actions, bigger targets. */
|
|
171
|
+
get isTouch(): boolean;
|
|
172
|
+
private applyTouch;
|
|
173
|
+
/** Track the visible viewport so the bar stays above the on-screen keyboard. */
|
|
174
|
+
private watchViewport;
|
|
158
175
|
get aiName(): string;
|
|
159
176
|
get actionsHotkey(): string;
|
|
177
|
+
private labelCache?;
|
|
178
|
+
/** The active labels (English merged with `config.labels`). */
|
|
179
|
+
get labels(): Labels;
|
|
180
|
+
/** A translated label with `{placeholders}` filled in. `{ai}` is always available. */
|
|
181
|
+
t(key: LabelKey, vars?: Record<string, string | number>): string;
|
|
182
|
+
/** Title of an action, translated when it's an untouched built-in. */
|
|
183
|
+
actionTitle(act: Action): string;
|
|
160
184
|
open(options?: {
|
|
161
185
|
query?: string;
|
|
162
186
|
view?: View;
|
|
@@ -173,13 +197,28 @@ export declare class Bar implements QikbarInstance {
|
|
|
173
197
|
setQuery(query: string): void;
|
|
174
198
|
ask(prompt?: string): void;
|
|
175
199
|
commands(): Item[];
|
|
200
|
+
get personalize(): boolean;
|
|
201
|
+
pins(): string[];
|
|
202
|
+
pin(id: string, pinned?: boolean): void;
|
|
203
|
+
aliases(): Record<string, string>;
|
|
204
|
+
aliasOf(id: string): string | undefined;
|
|
205
|
+
setAlias(id: string, alias: string | null): void;
|
|
206
|
+
/** Whether pin/alias actions apply to this item. */
|
|
207
|
+
private personalizable;
|
|
208
|
+
private aliasForm;
|
|
176
209
|
on<K extends keyof QikbarEvents>(event: K, handler: (payload: QikbarEvents[K]) => void): () => void;
|
|
177
210
|
preload(): Promise<void>;
|
|
178
211
|
destroy(): void;
|
|
179
212
|
private applyConfig;
|
|
213
|
+
private applyWebMCP;
|
|
180
214
|
private inlineTarget;
|
|
181
215
|
private emit;
|
|
182
216
|
private emitChange;
|
|
217
|
+
/** Report a usage event to `onEvent` and `on('event')`. */
|
|
218
|
+
track(event: QikbarEvent): void;
|
|
219
|
+
eventItem(item: Item): EventItem;
|
|
220
|
+
/** Report what the user searched for once they stop typing. */
|
|
221
|
+
private scheduleSearchEvent;
|
|
183
222
|
private listen;
|
|
184
223
|
idOf(item: Item): string;
|
|
185
224
|
private invalidateRoot;
|
|
@@ -196,6 +235,12 @@ export declare class Bar implements QikbarInstance {
|
|
|
196
235
|
private listGroups;
|
|
197
236
|
private onQueryChange;
|
|
198
237
|
private searchSources;
|
|
238
|
+
private vectors;
|
|
239
|
+
private semanticWarned;
|
|
240
|
+
/** Find items by meaning, in the background, and show them as "Related". */
|
|
241
|
+
private searchSemantic;
|
|
242
|
+
/** Related results that the fuzzy search didn't already find. */
|
|
243
|
+
private relatedResults;
|
|
199
244
|
private loadItems;
|
|
200
245
|
private setItems;
|
|
201
246
|
private loadDetail;
|
|
@@ -207,16 +252,52 @@ export declare class Bar implements QikbarInstance {
|
|
|
207
252
|
navigate(href: string, newTab?: boolean): void;
|
|
208
253
|
actionsFor(item: Item | undefined, frame: Frame): Action[];
|
|
209
254
|
selectedItem(frame?: Frame | undefined): Item | undefined;
|
|
210
|
-
runAction(frame: Frame, item: Item | undefined, act: Action, args?: Record<string, string
|
|
211
|
-
|
|
255
|
+
runAction(frame: Frame, item: Item | undefined, act: Action, args?: Record<string, string>, via?: Extract<QikbarEvent, {
|
|
256
|
+
type: 'run';
|
|
257
|
+
}>['via']): Promise<void>;
|
|
258
|
+
runPrimary(frame?: Frame | undefined, index?: number, via?: 'keyboard' | 'click'): void;
|
|
259
|
+
isMulti(frame: Frame): boolean;
|
|
260
|
+
private rowKeyOf;
|
|
261
|
+
isMarked(frame: Frame, key: string): boolean;
|
|
262
|
+
toggleMark(frame: Frame, item: Item, on?: boolean): void;
|
|
263
|
+
/** Mark every row between the anchor and `item` (Shift-click). */
|
|
264
|
+
markRange(frame: Frame, item: Item): void;
|
|
265
|
+
markAll(frame: Frame): void;
|
|
266
|
+
clearMarks(frame: Frame): void;
|
|
267
|
+
private marksChanged;
|
|
268
|
+
private bulkActions;
|
|
212
269
|
preferencesForm(rt: ExtRuntime, then?: () => void): FormView;
|
|
213
270
|
private enterArgMode;
|
|
214
271
|
private submitArgs;
|
|
215
272
|
sendChat(frame: Frame, text: string): void;
|
|
216
273
|
stopChat(frame: Frame): boolean;
|
|
217
274
|
private systemPrompt;
|
|
275
|
+
/**
|
|
276
|
+
* Run an item on behalf of an AI model (chat or WebMCP agent) and describe what happened.
|
|
277
|
+
* Navigation happens without closing a chat; destructive primary actions ask first.
|
|
278
|
+
*/
|
|
279
|
+
runForAgent(item: Item, rawArgs: Record<string, unknown> | undefined, frame: Frame | undefined, via: 'ai' | 'agent'): Promise<string>;
|
|
280
|
+
/** Search commands and sources for an AI model. Results carry ids for `run`. */
|
|
281
|
+
searchForAgent(q: string, frame: Frame | undefined, signal: AbortSignal, found: Map<string, Item>): Promise<{
|
|
282
|
+
id: string;
|
|
283
|
+
title: string;
|
|
284
|
+
subtitle: string | undefined;
|
|
285
|
+
section: string;
|
|
286
|
+
description: string | undefined;
|
|
287
|
+
href: string | undefined;
|
|
288
|
+
}[]>;
|
|
218
289
|
private agentTools;
|
|
290
|
+
/** Every tool from config and extensions, with the extension it belongs to. */
|
|
291
|
+
toolList(): {
|
|
292
|
+
tool: Tool;
|
|
293
|
+
rt?: ExtRuntime;
|
|
294
|
+
prefix: string;
|
|
295
|
+
}[];
|
|
296
|
+
/** Make a context for running a tool outside a chat (WebMCP). */
|
|
297
|
+
toolContext(rt?: ExtRuntime): Context;
|
|
219
298
|
toast(options: ToastOptions | string): ToastHandle;
|
|
299
|
+
/** Run the visible toast's action (e.g. Undo) and dismiss the toast. */
|
|
300
|
+
runToastAction(): Promise<void>;
|
|
220
301
|
confirm(options: ConfirmOptions | string): Promise<boolean>;
|
|
221
302
|
private onGlobalKeyDown;
|
|
222
303
|
private onGlobalClick;
|
|
@@ -247,6 +328,11 @@ export declare class Bar implements QikbarInstance {
|
|
|
247
328
|
private footerButton;
|
|
248
329
|
private renderToast;
|
|
249
330
|
private renderLayer;
|
|
331
|
+
/** Render Markdown with translated UI strings. */
|
|
332
|
+
md(text: string): string;
|
|
250
333
|
announce(text: string): void;
|
|
251
334
|
}
|
|
335
|
+
export declare const normalizeAlias: (alias: string) => string;
|
|
336
|
+
/** The text embedded for semantic search. */
|
|
337
|
+
export declare function embedText(item: Item): string;
|
|
252
338
|
export {};
|
package/dist/ui/icons.d.ts
CHANGED
|
@@ -82,6 +82,11 @@ export declare const icons: {
|
|
|
82
82
|
readonly languages: "<path d=\"m5 8 6 6\"/><path d=\"m4 14 6-6 2-3\"/><path d=\"M2 5h12\"/><path d=\"M7 2h1\"/><path d=\"m22 22-5-10-5 10\"/><path d=\"M14 18h6\"/>";
|
|
83
83
|
readonly wand: "<path d=\"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72\"/><path d=\"m14 7 3 3\"/><path d=\"M5 6v4\"/><path d=\"M19 14v4\"/><path d=\"M10 2v2\"/><path d=\"M7 8H3\"/><path d=\"M21 16h-4\"/><path d=\"M11 3H9\"/>";
|
|
84
84
|
readonly keyboard: "<rect x=\"2\" y=\"4\" width=\"20\" height=\"16\" rx=\"2\"/><path d=\"M6 8h.01\"/><path d=\"M10 8h.01\"/><path d=\"M14 8h.01\"/><path d=\"M18 8h.01\"/><path d=\"M8 12h.01\"/><path d=\"M12 12h.01\"/><path d=\"M16 12h.01\"/><path d=\"M7 16h10\"/>";
|
|
85
|
+
readonly pin: "<path d=\"M12 17v5\"/><path d=\"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z\"/>";
|
|
86
|
+
readonly undo: "<path d=\"M9 14 4 9l5-5\"/><path d=\"M4 9h10.5a5.5 5.5 0 0 1 0 11H11\"/>";
|
|
87
|
+
readonly 'check-square': "<rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\"/><path d=\"m9 12 2 2 4-4\"/>";
|
|
88
|
+
readonly square: "<rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\"/>";
|
|
89
|
+
readonly 'at-sign': "<circle cx=\"12\" cy=\"12\" r=\"4\"/><path d=\"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8\"/>";
|
|
85
90
|
readonly github: "<path d=\"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4\"/><path d=\"M9 18c-4.51 2-5-2-7-2\"/>";
|
|
86
91
|
};
|
|
87
92
|
export type IconName = keyof typeof icons;
|
package/dist/ui/markdown.d.ts
CHANGED
|
@@ -5,4 +5,6 @@
|
|
|
5
5
|
* links, images, block quotes, ordered/unordered/task lists, tables and rules.
|
|
6
6
|
*/
|
|
7
7
|
export declare function escapeHtml(s: string): string;
|
|
8
|
-
export declare function renderMarkdown(md: string
|
|
8
|
+
export declare function renderMarkdown(md: string, options?: {
|
|
9
|
+
copyLabel?: string;
|
|
10
|
+
}): string;
|
package/dist/ui/views.d.ts
CHANGED
|
@@ -21,6 +21,8 @@ export interface ViewRenderer {
|
|
|
21
21
|
run: () => void;
|
|
22
22
|
} | undefined;
|
|
23
23
|
viewActions?(): Action[];
|
|
24
|
+
/** Re-render every row (labels, pins or marks changed). */
|
|
25
|
+
refresh?(): void;
|
|
24
26
|
}
|
|
25
27
|
export declare class ListRenderer implements ViewRenderer {
|
|
26
28
|
protected bar: Bar;
|
|
@@ -43,8 +45,10 @@ export declare class ListRenderer implements ViewRenderer {
|
|
|
43
45
|
protected sectionHeight: number;
|
|
44
46
|
private rafId;
|
|
45
47
|
private detailFor?;
|
|
48
|
+
private press?;
|
|
46
49
|
constructor(bar: Bar, frame: Frame);
|
|
47
50
|
protected measure(): void;
|
|
51
|
+
refresh(): void;
|
|
48
52
|
update(): void;
|
|
49
53
|
protected prune(keep: Set<string>): void;
|
|
50
54
|
private renderWindow;
|
|
@@ -61,6 +65,10 @@ export declare class ListRenderer implements ViewRenderer {
|
|
|
61
65
|
protected updateDetail(): void;
|
|
62
66
|
private onPointerMove;
|
|
63
67
|
private onClick;
|
|
68
|
+
/** Keep focus in the search box; on touch, a long press opens the actions. */
|
|
69
|
+
private onPointerDown;
|
|
70
|
+
private cancelPress;
|
|
71
|
+
private onContextMenu;
|
|
64
72
|
select(index: number, scroll?: boolean): void;
|
|
65
73
|
move(delta: number): void;
|
|
66
74
|
ensureVisible(): void;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WebMCP: expose the bar's commands to AI agents running in the browser
|
|
3
|
+
* (Chrome's built-in agent, extensions, the @mcp-b polyfill, …).
|
|
4
|
+
*
|
|
5
|
+
* Tools are registered with `document.modelContext.registerTool()` (or the
|
|
6
|
+
* older `navigator.modelContext`) and unregistered with an AbortSignal.
|
|
7
|
+
*/
|
|
8
|
+
import type { WebMCPOptions } from '../core/types.js';
|
|
9
|
+
import type { Bar } from './bar.js';
|
|
10
|
+
interface WebMCPTool {
|
|
11
|
+
name: string;
|
|
12
|
+
description: string;
|
|
13
|
+
inputSchema: Record<string, unknown>;
|
|
14
|
+
annotations?: {
|
|
15
|
+
readOnlyHint?: boolean;
|
|
16
|
+
consequentialHint?: boolean;
|
|
17
|
+
untrustedContentHint?: boolean;
|
|
18
|
+
};
|
|
19
|
+
execute(args: Record<string, unknown>, options?: {
|
|
20
|
+
signal?: AbortSignal;
|
|
21
|
+
}): Promise<unknown>;
|
|
22
|
+
}
|
|
23
|
+
interface ModelContext {
|
|
24
|
+
registerTool(tool: WebMCPTool, options?: {
|
|
25
|
+
signal?: AbortSignal;
|
|
26
|
+
}): unknown;
|
|
27
|
+
unregisterTool?(name: string): void;
|
|
28
|
+
}
|
|
29
|
+
/** The browser's model context, if WebMCP is available. */
|
|
30
|
+
export declare function modelContext(): ModelContext | undefined;
|
|
31
|
+
/** Register the bar's tools. Returns a function that unregisters them. */
|
|
32
|
+
export declare function exposeWebMCP(bar: Bar, options?: WebMCPOptions): () => void;
|
|
33
|
+
export {};
|
package/dist/utils.js
CHANGED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vue 3 bindings.
|
|
3
|
+
*
|
|
4
|
+
* ```vue
|
|
5
|
+
* <script setup lang="ts">
|
|
6
|
+
* import { Qikbar, useCommands } from '@qikbar/qikbar/vue'
|
|
7
|
+
* const router = useRouter()
|
|
8
|
+
* </script>
|
|
9
|
+
*
|
|
10
|
+
* <template>
|
|
11
|
+
* <Qikbar :config="{ routes, navigate: (href) => router.push(href) }" />
|
|
12
|
+
* </template>
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
import { type InjectionKey, type PropType, type Ref, type ShallowRef } from 'vue';
|
|
16
|
+
import type { Command, Extension, QikbarConfig, QikbarInstance, QikbarState, Source } from '../core/types.js';
|
|
17
|
+
export declare const QikbarKey: InjectionKey<ShallowRef<QikbarInstance | null>>;
|
|
18
|
+
/** Mounts a command bar. Put it once near the root of your app. */
|
|
19
|
+
export declare const Qikbar: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
20
|
+
/** Everything you'd pass to `createQikbar()`. Changes are applied live. */
|
|
21
|
+
config: {
|
|
22
|
+
type: PropType<Omit<QikbarConfig, "inline">>;
|
|
23
|
+
default: () => {};
|
|
24
|
+
};
|
|
25
|
+
/** Render inline (always open) where the component is placed. */
|
|
26
|
+
inline: {
|
|
27
|
+
type: BooleanConstructor;
|
|
28
|
+
default: boolean;
|
|
29
|
+
};
|
|
30
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
31
|
+
[key: string]: any;
|
|
32
|
+
}> | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
33
|
+
[key: string]: any;
|
|
34
|
+
}>[] | undefined, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
35
|
+
ready: (_bar: QikbarInstance) => true;
|
|
36
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
37
|
+
/** Everything you'd pass to `createQikbar()`. Changes are applied live. */
|
|
38
|
+
config: {
|
|
39
|
+
type: PropType<Omit<QikbarConfig, "inline">>;
|
|
40
|
+
default: () => {};
|
|
41
|
+
};
|
|
42
|
+
/** Render inline (always open) where the component is placed. */
|
|
43
|
+
inline: {
|
|
44
|
+
type: BooleanConstructor;
|
|
45
|
+
default: boolean;
|
|
46
|
+
};
|
|
47
|
+
}>> & Readonly<{
|
|
48
|
+
onReady?: ((_bar: QikbarInstance) => any) | undefined;
|
|
49
|
+
}>, {
|
|
50
|
+
inline: boolean;
|
|
51
|
+
config: Omit<QikbarConfig, "inline">;
|
|
52
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
53
|
+
/** The nearest bar (from `<Qikbar>` or the last one mounted). */
|
|
54
|
+
export declare function useQikbarInstance(): ShallowRef<QikbarInstance | null>;
|
|
55
|
+
export interface UseQikbar {
|
|
56
|
+
bar: Readonly<ShallowRef<QikbarInstance | null>>;
|
|
57
|
+
state: Readonly<Ref<QikbarState>>;
|
|
58
|
+
open: (options?: Parameters<QikbarInstance['open']>[0]) => void;
|
|
59
|
+
close: () => void;
|
|
60
|
+
toggle: () => void;
|
|
61
|
+
ask: (prompt?: string) => void;
|
|
62
|
+
}
|
|
63
|
+
/** Control the bar and read its state reactively. */
|
|
64
|
+
export declare function useQikbar(): UseQikbar;
|
|
65
|
+
/**
|
|
66
|
+
* Register commands while the component is mounted. Pass a getter to re-register
|
|
67
|
+
* when reactive state it reads changes.
|
|
68
|
+
*/
|
|
69
|
+
export declare function useCommands(commands: Command[] | (() => Command[])): void;
|
|
70
|
+
/** Add a search source while mounted. */
|
|
71
|
+
export declare function useSource(source: Source): void;
|
|
72
|
+
/** Install an extension while mounted. */
|
|
73
|
+
export declare function useExtension(extension: Extension, preferences?: Record<string, any>): void;
|
|
74
|
+
export type { QikbarConfig, QikbarInstance, QikbarState } from '../core/types.js';
|
package/dist/vue.js
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createQikbar
|
|
3
|
+
} from "./chunks/chunk-OLXZNYZ4.js";
|
|
4
|
+
import "./chunks/chunk-5FI7DNG7.js";
|
|
5
|
+
import "./chunks/chunk-N4Y2Z6YD.js";
|
|
6
|
+
import "./chunks/chunk-MRHKJ2FZ.js";
|
|
7
|
+
import "./chunks/chunk-INTEVQYK.js";
|
|
8
|
+
import "./chunks/chunk-YCVJQ7U3.js";
|
|
9
|
+
import "./chunks/chunk-PQEHV3D4.js";
|
|
10
|
+
import "./chunks/chunk-TIM4VBM4.js";
|
|
11
|
+
import "./chunks/chunk-MPTP2EWW.js";
|
|
12
|
+
|
|
13
|
+
// src/vue/index.ts
|
|
14
|
+
import {
|
|
15
|
+
defineComponent,
|
|
16
|
+
getCurrentInstance,
|
|
17
|
+
h,
|
|
18
|
+
inject,
|
|
19
|
+
onBeforeUnmount,
|
|
20
|
+
onMounted,
|
|
21
|
+
provide,
|
|
22
|
+
readonly,
|
|
23
|
+
ref,
|
|
24
|
+
shallowRef,
|
|
25
|
+
watch
|
|
26
|
+
} from "vue";
|
|
27
|
+
var QikbarKey = /* @__PURE__ */ Symbol("qikbar"), current = shallowRef(null);
|
|
28
|
+
function diff(next, prev) {
|
|
29
|
+
let changed = {}, dirty = !1;
|
|
30
|
+
for (let key of /* @__PURE__ */ new Set([...Object.keys(next), ...Object.keys(prev)]))
|
|
31
|
+
Object.is(next[key], prev[key]) || (changed[key] = next[key], dirty = !0);
|
|
32
|
+
return dirty ? changed : void 0;
|
|
33
|
+
}
|
|
34
|
+
var Qikbar = defineComponent({
|
|
35
|
+
name: "Qikbar",
|
|
36
|
+
props: {
|
|
37
|
+
/** Everything you'd pass to `createQikbar()`. Changes are applied live. */
|
|
38
|
+
config: { type: Object, default: () => ({}) },
|
|
39
|
+
/** Render inline (always open) where the component is placed. */
|
|
40
|
+
inline: { type: Boolean, default: !1 }
|
|
41
|
+
},
|
|
42
|
+
emits: { ready: (_bar) => !0 },
|
|
43
|
+
setup(props, { slots, emit }) {
|
|
44
|
+
let bar = shallowRef(null), el = ref(null);
|
|
45
|
+
provide(QikbarKey, bar);
|
|
46
|
+
let applied = {}, mount = () => {
|
|
47
|
+
applied = { ...props.config };
|
|
48
|
+
let instance = createQikbar({ ...applied, inline: props.inline ? el.value ?? void 0 : void 0 });
|
|
49
|
+
bar.value = instance, current.value = instance, emit("ready", instance);
|
|
50
|
+
}, unmount = () => {
|
|
51
|
+
let instance = bar.value;
|
|
52
|
+
instance && (instance.destroy(), current.value === instance && (current.value = null), bar.value = null);
|
|
53
|
+
};
|
|
54
|
+
return onMounted(mount), onBeforeUnmount(unmount), watch(
|
|
55
|
+
() => ({ ...props.config }),
|
|
56
|
+
(next) => {
|
|
57
|
+
let changed = diff(next, applied);
|
|
58
|
+
applied = next, changed && bar.value && bar.value.configure(changed);
|
|
59
|
+
}
|
|
60
|
+
), watch(
|
|
61
|
+
() => props.inline,
|
|
62
|
+
() => {
|
|
63
|
+
unmount(), mount();
|
|
64
|
+
},
|
|
65
|
+
{ flush: "post" }
|
|
66
|
+
), () => props.inline ? h("div", { ref: el, class: "qikbar-inline" }, slots.default?.()) : slots.default?.();
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
function useQikbarInstance() {
|
|
70
|
+
return getCurrentInstance() ? inject(QikbarKey, current) : current;
|
|
71
|
+
}
|
|
72
|
+
function useQikbar() {
|
|
73
|
+
let bar = useQikbarInstance(), state = ref({ open: !1, query: "", depth: 0, loading: !1 }), off;
|
|
74
|
+
return watch(
|
|
75
|
+
bar,
|
|
76
|
+
(b) => {
|
|
77
|
+
off?.(), off = b?.on("change", (s) => state.value = s);
|
|
78
|
+
},
|
|
79
|
+
{ immediate: !0 }
|
|
80
|
+
), getCurrentInstance() && onBeforeUnmount(() => off?.()), {
|
|
81
|
+
bar,
|
|
82
|
+
state: readonly(state),
|
|
83
|
+
open: (o) => bar.value?.open(o),
|
|
84
|
+
close: () => bar.value?.close(),
|
|
85
|
+
toggle: () => bar.value?.toggle(),
|
|
86
|
+
ask: (p) => bar.value?.ask(p)
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
function whileMounted(fn, deps) {
|
|
90
|
+
let bar = useQikbarInstance(), off, stop = watch(
|
|
91
|
+
() => [bar.value, deps?.()],
|
|
92
|
+
([b]) => {
|
|
93
|
+
off?.(), off = b ? fn(b) : void 0;
|
|
94
|
+
},
|
|
95
|
+
{ immediate: !0 }
|
|
96
|
+
);
|
|
97
|
+
onBeforeUnmount(() => {
|
|
98
|
+
stop(), off?.();
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
function useCommands(commands) {
|
|
102
|
+
whileMounted(
|
|
103
|
+
(b) => b.register(typeof commands == "function" ? commands() : commands),
|
|
104
|
+
typeof commands == "function" ? commands : void 0
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
function useSource(source) {
|
|
108
|
+
whileMounted((b) => b.addSource(source));
|
|
109
|
+
}
|
|
110
|
+
function useExtension(extension, preferences) {
|
|
111
|
+
whileMounted((b) => b.use(extension, preferences));
|
|
112
|
+
}
|
|
113
|
+
export {
|
|
114
|
+
Qikbar,
|
|
115
|
+
QikbarKey,
|
|
116
|
+
useCommands,
|
|
117
|
+
useExtension,
|
|
118
|
+
useQikbar,
|
|
119
|
+
useQikbarInstance,
|
|
120
|
+
useSource
|
|
121
|
+
};
|
|
122
|
+
//# sourceMappingURL=vue.js.map
|
package/dist/vue.js.map
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/vue/index.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Vue 3 bindings.\n *\n * ```vue\n * <script setup lang=\"ts\">\n * import { Qikbar, useCommands } from '@qikbar/qikbar/vue'\n * const router = useRouter()\n * </script>\n *\n * <template>\n * <Qikbar :config=\"{ routes, navigate: (href) => router.push(href) }\" />\n * </template>\n * ```\n */\n\nimport {\n defineComponent,\n getCurrentInstance,\n h,\n inject,\n onBeforeUnmount,\n onMounted,\n provide,\n readonly,\n ref,\n shallowRef,\n watch,\n type InjectionKey,\n type PropType,\n type Ref,\n type ShallowRef,\n} from 'vue'\nimport { createQikbar } from '../index.js'\nimport type { Command, Extension, QikbarConfig, QikbarInstance, QikbarState, Source } from '../core/types.js'\n\nexport const QikbarKey: InjectionKey<ShallowRef<QikbarInstance | null>> = Symbol('qikbar')\n\n// The most recently mounted instance, so composables work outside <Qikbar>.\nconst current = shallowRef<QikbarInstance | null>(null)\n\nfunction diff(next: QikbarConfig, prev: QikbarConfig): Partial<QikbarConfig> | undefined {\n const changed: Partial<QikbarConfig> = {}\n let dirty = false\n for (const key of new Set([...Object.keys(next), ...Object.keys(prev)]) as Set<keyof QikbarConfig>) {\n if (!Object.is(next[key], prev[key])) {\n ;(changed as any)[key] = next[key]\n dirty = true\n }\n }\n return dirty ? changed : undefined\n}\n\n/** Mounts a command bar. Put it once near the root of your app. */\nexport const Qikbar = defineComponent({\n name: 'Qikbar',\n props: {\n /** Everything you'd pass to `createQikbar()`. Changes are applied live. */\n config: { type: Object as PropType<Omit<QikbarConfig, 'inline'>>, default: () => ({}) },\n /** Render inline (always open) where the component is placed. */\n inline: { type: Boolean, default: false },\n },\n emits: { ready: (_bar: QikbarInstance) => true },\n setup(props, { slots, emit }) {\n const bar = shallowRef<QikbarInstance | null>(null)\n const el = ref<HTMLElement | null>(null)\n provide(QikbarKey, bar)\n let applied: QikbarConfig = {}\n\n const mount = () => {\n applied = { ...props.config }\n const instance = createQikbar({ ...applied, inline: props.inline ? (el.value ?? undefined) : undefined })\n bar.value = instance\n current.value = instance\n emit('ready', instance)\n }\n const unmount = () => {\n const instance = bar.value\n if (!instance) return\n instance.destroy()\n if (current.value === instance) current.value = null\n bar.value = null\n }\n\n onMounted(mount)\n onBeforeUnmount(unmount)\n watch(\n () => ({ ...props.config }),\n (next) => {\n const changed = diff(next, applied)\n applied = next\n if (changed && bar.value) bar.value.configure(changed)\n },\n )\n watch(\n () => props.inline,\n () => {\n unmount()\n mount()\n },\n { flush: 'post' },\n )\n\n return () => (props.inline ? h('div', { ref: el, class: 'qikbar-inline' }, slots.default?.()) : slots.default?.())\n },\n})\n\n/** The nearest bar (from `<Qikbar>` or the last one mounted). */\nexport function useQikbarInstance(): ShallowRef<QikbarInstance | null> {\n return getCurrentInstance() ? inject(QikbarKey, current) : current\n}\n\nexport interface UseQikbar {\n bar: Readonly<ShallowRef<QikbarInstance | null>>\n state: Readonly<Ref<QikbarState>>\n open: (options?: Parameters<QikbarInstance['open']>[0]) => void\n close: () => void\n toggle: () => void\n ask: (prompt?: string) => void\n}\n\n/** Control the bar and read its state reactively. */\nexport function useQikbar(): UseQikbar {\n const bar = useQikbarInstance()\n const state = ref<QikbarState>({ open: false, query: '', depth: 0, loading: false })\n let off: (() => void) | undefined\n watch(\n bar,\n (b) => {\n off?.()\n off = b?.on('change', (s) => (state.value = s))\n },\n { immediate: true },\n )\n if (getCurrentInstance()) onBeforeUnmount(() => off?.())\n return {\n bar,\n state: readonly(state) as Readonly<Ref<QikbarState>>,\n open: (o) => bar.value?.open(o),\n close: () => bar.value?.close(),\n toggle: () => bar.value?.toggle(),\n ask: (p) => bar.value?.ask(p),\n }\n}\n\n/** Run `fn(bar)` while the component is mounted; re-runs when the bar or the getter's dependencies change. */\nfunction whileMounted(fn: (bar: QikbarInstance) => () => void, deps?: () => unknown) {\n const bar = useQikbarInstance()\n let off: (() => void) | undefined\n const stop = watch(\n () => [bar.value, deps?.()] as const,\n ([b]) => {\n off?.()\n off = b ? fn(b) : undefined\n },\n { immediate: true },\n )\n onBeforeUnmount(() => {\n stop()\n off?.()\n })\n}\n\n/**\n * Register commands while the component is mounted. Pass a getter to re-register\n * when reactive state it reads changes.\n */\nexport function useCommands(commands: Command[] | (() => Command[])) {\n whileMounted(\n (b) => b.register(typeof commands === 'function' ? commands() : commands),\n typeof commands === 'function' ? commands : undefined,\n )\n}\n\n/** Add a search source while mounted. */\nexport function useSource(source: Source) {\n whileMounted((b) => b.addSource(source))\n}\n\n/** Install an extension while mounted. */\nexport function useExtension(extension: Extension, preferences?: Record<string, any>) {\n whileMounted((b) => b.use(extension, preferences))\n}\n\nexport type { QikbarConfig, QikbarInstance, QikbarState } from '../core/types.js'\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qikbar/qikbar",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "The open-source command bar for any web app. Raycast-style search, routing, actions, extensions and AI in one tiny, themeable package.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"command-bar",
|
|
@@ -11,7 +11,13 @@
|
|
|
11
11
|
"spotlight",
|
|
12
12
|
"search",
|
|
13
13
|
"ai",
|
|
14
|
+
"mcp",
|
|
15
|
+
"webmcp",
|
|
14
16
|
"react",
|
|
17
|
+
"vue",
|
|
18
|
+
"svelte",
|
|
19
|
+
"solid",
|
|
20
|
+
"web-component",
|
|
15
21
|
"vanilla"
|
|
16
22
|
],
|
|
17
23
|
"license": "MIT",
|
|
@@ -25,13 +31,17 @@
|
|
|
25
31
|
"bugs": "https://github.com/nearbycoder/qikbar-next/issues",
|
|
26
32
|
"type": "module",
|
|
27
33
|
"sideEffects": [
|
|
28
|
-
"*.css"
|
|
34
|
+
"*.css",
|
|
35
|
+
"./dist/element.js"
|
|
29
36
|
],
|
|
30
37
|
"main": "./dist/index.js",
|
|
31
38
|
"module": "./dist/index.js",
|
|
32
39
|
"types": "./dist/index.d.ts",
|
|
33
40
|
"unpkg": "./dist/qikbar.global.js",
|
|
34
41
|
"jsdelivr": "./dist/qikbar.global.js",
|
|
42
|
+
"bin": {
|
|
43
|
+
"qikbar": "./bin/qikbar.mjs"
|
|
44
|
+
},
|
|
35
45
|
"exports": {
|
|
36
46
|
".": {
|
|
37
47
|
"types": "./dist/index.d.ts",
|
|
@@ -61,12 +71,33 @@
|
|
|
61
71
|
"types": "./dist/utils.d.ts",
|
|
62
72
|
"default": "./dist/utils.js"
|
|
63
73
|
},
|
|
74
|
+
"./locales": {
|
|
75
|
+
"types": "./dist/locales/index.d.ts",
|
|
76
|
+
"default": "./dist/locales.js"
|
|
77
|
+
},
|
|
78
|
+
"./element": {
|
|
79
|
+
"types": "./dist/element/index.d.ts",
|
|
80
|
+
"default": "./dist/element.js"
|
|
81
|
+
},
|
|
82
|
+
"./vue": {
|
|
83
|
+
"types": "./dist/vue/index.d.ts",
|
|
84
|
+
"default": "./dist/vue.js"
|
|
85
|
+
},
|
|
86
|
+
"./svelte": {
|
|
87
|
+
"types": "./dist/svelte/index.d.ts",
|
|
88
|
+
"default": "./dist/svelte.js"
|
|
89
|
+
},
|
|
90
|
+
"./solid": {
|
|
91
|
+
"types": "./dist/solid/index.d.ts",
|
|
92
|
+
"default": "./dist/solid.js"
|
|
93
|
+
},
|
|
64
94
|
"./styles.css": "./dist/styles.css",
|
|
65
95
|
"./global": "./dist/qikbar.global.js",
|
|
66
96
|
"./package.json": "./package.json"
|
|
67
97
|
},
|
|
68
98
|
"files": [
|
|
69
99
|
"dist",
|
|
100
|
+
"bin",
|
|
70
101
|
"README.md",
|
|
71
102
|
"LICENSE"
|
|
72
103
|
],
|
|
@@ -78,11 +109,19 @@
|
|
|
78
109
|
"prepublishOnly": "bun run build && bun run test"
|
|
79
110
|
},
|
|
80
111
|
"peerDependencies": {
|
|
81
|
-
"react": ">=18"
|
|
112
|
+
"react": ">=18",
|
|
113
|
+
"vue": ">=3.3",
|
|
114
|
+
"solid-js": ">=1.8"
|
|
82
115
|
},
|
|
83
116
|
"peerDependenciesMeta": {
|
|
84
117
|
"react": {
|
|
85
118
|
"optional": true
|
|
119
|
+
},
|
|
120
|
+
"vue": {
|
|
121
|
+
"optional": true
|
|
122
|
+
},
|
|
123
|
+
"solid-js": {
|
|
124
|
+
"optional": true
|
|
86
125
|
}
|
|
87
126
|
},
|
|
88
127
|
"devDependencies": {
|
|
@@ -93,8 +132,10 @@
|
|
|
93
132
|
"happy-dom": "^21.0.1",
|
|
94
133
|
"react": "^19.3.0",
|
|
95
134
|
"react-dom": "^19.3.0",
|
|
135
|
+
"solid-js": "^1.9",
|
|
96
136
|
"typescript": "^5.9.3",
|
|
97
|
-
"vitest": "^5.0.4"
|
|
137
|
+
"vitest": "^5.0.4",
|
|
138
|
+
"vue": "^3.5"
|
|
98
139
|
},
|
|
99
140
|
"publishConfig": {
|
|
100
141
|
"access": "public"
|