@hfd-sdk/keyboard-kit 1.0.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.
@@ -0,0 +1,5 @@
1
+ import { AiLightingPreset, AiLightingPresetParam, AiLightingPresetParamValue } from '../shared/types';
2
+ export declare function resolveParamDefault(param: AiLightingPresetParam): AiLightingPresetParamValue;
3
+ export declare function resolvePresetParams(preset: AiLightingPreset): Record<string, AiLightingPresetParamValue>;
4
+ /** 只保留 preset.params 中定义的键,忽略其他预设或全局缓存里的多余字段 */
5
+ export declare function pickPresetParamValues(preset: AiLightingPreset | null | undefined, values?: Partial<Record<string, AiLightingPresetParamValue>>): Record<string, AiLightingPresetParamValue>;
@@ -0,0 +1,17 @@
1
+ import { AiLightingPreset, ImportPresetPayload } from '../shared/types';
2
+ export interface CreatePresetStoreOptions {
3
+ initialPresets?: AiLightingPreset[];
4
+ initialImported?: AiLightingPreset[];
5
+ onPresetsChange?: (importedSerialized: Record<string, unknown>[]) => void;
6
+ onImportPreset?: (detail: ImportPresetPayload) => void;
7
+ }
8
+ export declare function createPresetStore(options?: CreatePresetStoreOptions): {
9
+ presetList: import('vue').ShallowRef<AiLightingPreset[], AiLightingPreset[]>;
10
+ selectedPresetId: import('vue').Ref<string, string>;
11
+ selectedPreset: () => AiLightingPreset;
12
+ selectPreset: (id: string) => void;
13
+ isInitialPreset: (id: string) => boolean;
14
+ importPreset: (code: string) => Promise<AiLightingPreset | null>;
15
+ deleteImportedPreset: (id: string) => Promise<void>;
16
+ };
17
+ export type PresetStore = ReturnType<typeof createPresetStore>;
@@ -0,0 +1,3 @@
1
+ import { AiLightingPreset } from '../shared/types';
2
+ export declare function validatePreset(raw: unknown): raw is AiLightingPreset;
3
+ export declare function parsePresetCode(code: string): AiLightingPreset;
@@ -0,0 +1,2 @@
1
+ export * from './ai-lighting/index';
2
+ export { registerAiLightingElements } from './ai-lighting/index';
@@ -0,0 +1,10 @@
1
+ import { HfdAiLightingElement as r, HfdAiLightingKeyboardOverlayElement as t, registerAiLightingElements as g, validatePreset as l } from "./ai-lighting/index.es.js";
2
+ import { deserializePreset as a, serializePreset as n } from "./runtime.es.js";
3
+ export {
4
+ r as HfdAiLightingElement,
5
+ t as HfdAiLightingKeyboardOverlayElement,
6
+ a as deserializePreset,
7
+ g as registerAiLightingElements,
8
+ n as serializePreset,
9
+ l as validatePreset
10
+ };
@@ -0,0 +1,3 @@
1
+ export { setInterval, clearInterval } from 'worker-timers';
2
+ export * from '../shared/types';
3
+ export { serializePreset, deserializePreset } from '../shared/serialize';