@qilin-agent/client-ui-shortcuts 0.0.0-stage → 3.1.4

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/lib/index.js ADDED
@@ -0,0 +1,6 @@
1
+ //#region lib/types/index.js
2
+ /** Host Loader entry; keyboard commands execute in the browser half. */
3
+ /** Register the browser package without adding Host behavior. */
4
+ function apply() {}
5
+ //#endregion
6
+ export { apply };
@@ -0,0 +1,18 @@
1
+ import type { ShortcutCatalogEntry } from '@qilin-agent/client-shortcuts/client';
2
+ import type { InjectFace, PropsLocale } from '@qilin-agent/client-ui-slots';
3
+ import type { ReferenceInjected } from './Reference.tsx';
4
+ type EditorInjected = ReferenceInjected;
5
+ type EditorProps = InjectFace<EditorInjected> & PropsLocale<'shortcuts'> & {
6
+ target: ShortcutCatalogEntry;
7
+ onClose(this: void): void;
8
+ onSaved(this: void): void;
9
+ onError(this: void, message: string): void;
10
+ };
11
+ /**
12
+ * Save a released physical combination against the configuration the user reviewed.
13
+ * @param props - command, accepted snapshots, and storage/feedback callbacks.
14
+ * @returns inline command controls; failures retain the draft and allow another recording.
15
+ */
16
+ export declare function ShortcutEditor({ target, onClose, onSaved, onError, useCatalog, useConfig, useFixedCatalog, edit, recording, describeBinding, runtime, platform, t }: EditorProps): import("react").JSX.Element;
17
+ export {};
18
+ //# sourceMappingURL=Editor.d.ts.map
@@ -0,0 +1,17 @@
1
+ /** Supplied shortcut-control and feedback artwork, colored by the owning UI. */
2
+ declare const artwork: {
3
+ edit: import("react").JSX.Element;
4
+ error: import("react").JSX.Element;
5
+ success: import("react").JSX.Element;
6
+ };
7
+ /**
8
+ * Render the shortcut design artwork at its supplied size.
9
+ * @param props - glyph kind and semantic color class.
10
+ * @returns an ornamental SVG hidden from assistive technology.
11
+ */
12
+ export declare function ShortcutIcon({ kind, className }: {
13
+ kind: keyof typeof artwork;
14
+ className?: string | undefined;
15
+ }): import("react").JSX.Element;
16
+ export {};
17
+ //# sourceMappingURL=Icons.d.ts.map
@@ -0,0 +1,33 @@
1
+ import type { InjectFace, PropsLocale, PropsRuntime } from '@qilin-agent/client-ui-slots';
2
+ import type { ObservableSnapshot, PropsStore } from '@qilin-agent/client-store';
3
+ import type { ShortcutCatalogEntry, ShortcutPlatform, Shortcuts } from '@qilin-agent/client-shortcuts/client';
4
+ import type { createShortcutsStore } from './store.ts';
5
+ /** Catalog and device labels delivered through renderer-bound hooks. */
6
+ export interface ReferenceInjected {
7
+ platform: ShortcutPlatform;
8
+ runtime: Shortcuts['runtime'];
9
+ edit: Shortcuts['edit'];
10
+ recording: Shortcuts['recording'];
11
+ describeBinding: Shortcuts['describeBinding'];
12
+ hooks: {
13
+ catalog: ObservableSnapshot<readonly ShortcutCatalogEntry[]>;
14
+ config: Shortcuts['config'];
15
+ fixedCatalog: Shortcuts['fixedCatalog'];
16
+ };
17
+ }
18
+ type Store = PropsStore<ReturnType<typeof createShortcutsStore>>;
19
+ type Locale = PropsLocale<'shortcuts'>;
20
+ /**
21
+ * Render the General Settings action that opens the shortcut reference.
22
+ * @param props - shared dialog action and localized labels.
23
+ * @returns the settings row.
24
+ */
25
+ export declare function ShortcutsRow({ actions, t, useCatalog }: PropsRuntime<'settings.general.item'> & Store & Locale & InjectFace<ReferenceInjected>): import("react").JSX.Element;
26
+ /**
27
+ * Render core actions in product order, then other commands by ID within each group. Search relevance takes precedence.
28
+ * @param props - root store, effective catalog, and localized copy.
29
+ * @returns the single reference dialog when open.
30
+ */
31
+ export declare function ShortcutReference({ useStore, actions, useCatalog, useConfig, useFixedCatalog, platform, runtime, edit, recording, describeBinding, t, }: PropsRuntime<'shell.overlay'> & Store & Locale & InjectFace<ReferenceInjected>): import("react").JSX.Element;
32
+ export {};
33
+ //# sourceMappingURL=Reference.d.ts.map
@@ -0,0 +1,22 @@
1
+ /** Localized failures shared by direct removal and inline shortcut editing. */
2
+ import type { ShortcutConfigSnapshot, ShortcutRuntime, ShortcutSaveResult } from '@qilin-agent/client-shortcuts/protocol';
3
+ import type { ShortcutCatalogEntry } from '@qilin-agent/client-shortcuts/client';
4
+ import type { PropsLocale } from '@qilin-agent/client-ui-slots';
5
+ /**
6
+ * Identify the unreadable preferences, their recovery path, and the bindings still in use.
7
+ * @param config - failed read and last accepted preferences.
8
+ * @param runtime - storage owner whose location and reload action to show.
9
+ * @param t - shortcut dictionary.
10
+ * @returns localized recovery guidance without replacing the stored document.
11
+ */
12
+ export declare function shortcutReadFailure(config: ShortcutConfigSnapshot, runtime: ShortcutRuntime, t: PropsLocale<'shortcuts'>['t']): string;
13
+ /**
14
+ * Describe an unsuccessful preference write without losing command names.
15
+ * @param result - rejected operation result.
16
+ * @param catalog - current command labels.
17
+ * @param t - shortcut dictionary.
18
+ * @param runtime - storage owner for unreadable-document recovery guidance.
19
+ * @returns localized diagnosis for a system toast and accessible field description.
20
+ */
21
+ export declare function shortcutFailure(result: ShortcutSaveResult, catalog: readonly Pick<ShortcutCatalogEntry, 'id' | 'label'>[], t: PropsLocale<'shortcuts'>['t'], runtime: ShortcutRuntime): string;
22
+ //# sourceMappingURL=feedback.d.ts.map
@@ -0,0 +1,10 @@
1
+ /** Menu reservations contributed by the product's shortcut reference integration. */
2
+ import type { ShortcutFixedCommand } from '@qilin-agent/client-shortcuts/client';
3
+ import type { PropsLocale } from '@qilin-agent/client-ui-slots';
4
+ /**
5
+ * Describe shared menu actions for display and conflict checking.
6
+ * @param t - shortcut dictionary.
7
+ * @returns read-only actions and each physical combination they occupy.
8
+ */
9
+ export declare function fixedCommands(t: PropsLocale<'shortcuts'>['t']): readonly ShortcutFixedCommand[];
10
+ //# sourceMappingURL=fixed.d.ts.map
@@ -0,0 +1,17 @@
1
+ /** Shortcut reference plugin; commands and entry points share one declared store. */
2
+ import type { Context } from '@qilin-agent/kylin';
3
+ import { zh } from './locales.ts';
4
+ declare module '@qilin-agent/client-ui-slots' {
5
+ interface LocaleNamespaceMap {
6
+ /** Shortcut reference and settings entry copy. */
7
+ shortcuts: keyof typeof zh;
8
+ }
9
+ }
10
+ /** Required command, locale, and slot services. */
11
+ export declare const inject: string[];
12
+ /**
13
+ * Register the reference command, settings row, and single shell overlay.
14
+ * @param ctx - plugin-owned client context.
15
+ */
16
+ export declare function apply(ctx: Context): void;
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,62 @@
1
+ /** Shortcut reference copy; only implemented operations appear in the catalog. */
2
+ export declare const zh: {
3
+ 'edit-label': string;
4
+ record: string;
5
+ 'record-help': string;
6
+ 'web-help': string;
7
+ 'unsupported-key': string;
8
+ reserved: string;
9
+ 'modifier-required': string;
10
+ 'too-many-keys': string;
11
+ 'macos-web-help': string;
12
+ 'windows-web-help': string;
13
+ 'unsupported-browser': string;
14
+ conflict: string;
15
+ saved: string;
16
+ clear: string;
17
+ 'retry-save': string;
18
+ reset: string;
19
+ 'reset-all': string;
20
+ 'modified-count': string;
21
+ 'reset-title': string;
22
+ 'reset-description': string;
23
+ cancel: string;
24
+ 'reset-saved': string;
25
+ 'close-confirmation': string;
26
+ 'reset-failed': string;
27
+ review: string;
28
+ stale: string;
29
+ 'write-failed': string;
30
+ 'not-ready': string;
31
+ read: string;
32
+ invalid: string;
33
+ future: string;
34
+ 'web-document': string;
35
+ 'desktop-document': string;
36
+ 'web-reload': string;
37
+ 'desktop-reload': string;
38
+ 'using-defaults': string;
39
+ 'using-accepted': string;
40
+ 'native-failed': string;
41
+ 'global-hint': string;
42
+ 'clear-search': string;
43
+ title: string;
44
+ open: string;
45
+ settings: string;
46
+ view: string;
47
+ description: string;
48
+ search: string;
49
+ close: string;
50
+ application: string;
51
+ input: string;
52
+ menus: string;
53
+ approval: string;
54
+ unbound: string;
55
+ empty: string;
56
+ move: string;
57
+ select: string;
58
+ dismiss: string;
59
+ };
60
+ /** Typed English counterpart. */
61
+ export declare const en: Record<keyof typeof zh, string>;
62
+ //# sourceMappingURL=locales.d.ts.map
@@ -0,0 +1,19 @@
1
+ /** Shortcut reference visibility and search state, shared by its entry points. */
2
+ import { type EngineStoreHandle } from '@qilin-agent/client-store';
3
+ type State = {
4
+ open: boolean;
5
+ query: string;
6
+ focusRequest: number;
7
+ };
8
+ type Actions = {
9
+ open(draft: State): void;
10
+ close(draft: State): void;
11
+ search(draft: State, query: string): void;
12
+ };
13
+ /**
14
+ * Declare the reference dialog store.
15
+ * @returns root-scoped visibility, focus request, and search actions.
16
+ */
17
+ export declare function createShortcutsStore(): EngineStoreHandle<State, Actions>;
18
+ export {};
19
+ //# sourceMappingURL=store.d.ts.map
@@ -0,0 +1,4 @@
1
+ /** Host Loader entry; keyboard commands execute in the browser half. */
2
+ /** Register the browser package without adding Host behavior. */
3
+ export declare function apply(): void;
4
+ //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,71 @@
1
1
  {
2
2
  "name": "@qilin-agent/client-ui-shortcuts",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "description": "Keyboard shortcut reference, recording, and local preference editing",
4
+ "version": "3.1.4",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/kkutysllb/QiLin.git",
11
+ "directory": "packages/client/ui-shortcuts"
12
+ },
13
+ "engines": {
14
+ "node": "^22.19.0 || >=24.0.0"
15
+ },
16
+ "type": "module",
17
+ "main": "lib/index.js",
18
+ "types": "lib/types/index.d.ts",
19
+ "exports": {
20
+ ".": {
21
+ "types": "./lib/types/index.d.ts",
22
+ "default": "./lib/index.js"
23
+ },
24
+ "./client": {
25
+ "types": "./lib/types/client/index.d.ts",
26
+ "default": "./lib/client.js"
27
+ },
28
+ "./src/*": "./src/*",
29
+ "./package.json": "./package.json"
30
+ },
31
+ "files": [
32
+ "lib/index.js",
33
+ "lib/client.js",
34
+ "lib/types/**/*.d.ts"
35
+ ],
36
+ "license": "MIT",
37
+ "qilin": {
38
+ "client": {
39
+ "inject": [
40
+ "@qilin-agent/client-shortcuts",
41
+ "@qilin-agent/client-locale",
42
+ "@qilin-agent/client-ui-layout",
43
+ "@qilin-agent/client-ui-settings"
44
+ ],
45
+ "platform": "web"
46
+ }
47
+ },
48
+ "peerDependencies": {
49
+ "@qilin-agent/kylin": "~4.0.3"
50
+ },
51
+ "devDependencies": {
52
+ "@types/react": "~18.3.1",
53
+ "clsx": "^2.1.1",
54
+ "react": "^18.2.0",
55
+ "@qilin-agent/kylin": "~4.0.3",
56
+ "@qilin-agent/brand": "3.1.4",
57
+ "@qilin-agent/client-store": "3.1.4",
58
+ "@qilin-agent/client-test-runtime": "3.1.4",
59
+ "@qilin-agent/client-shortcuts": "3.1.4",
60
+ "@qilin-agent/client-locale": "3.1.4",
61
+ "@qilin-agent/client-ui-layout": "3.1.4",
62
+ "@qilin-agent/client-ui-renderer": "3.1.4",
63
+ "@qilin-agent/client-ui-primitives": "3.1.4",
64
+ "@qilin-agent/client-ui-settings": "3.1.4",
65
+ "@qilin-agent/client-ui-slots": "3.1.4"
66
+ },
67
+ "scripts": {
68
+ "bundle": "tsdown",
69
+ "watch": "tsdown --watch"
70
+ }
6
71
  }