@vizejs/fresco 0.57.0 → 0.59.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,142 @@
1
+ import { Ref } from "@vue/runtime-core";
2
+ import * as _$_vue_reactivity0 from "@vue/reactivity";
3
+
4
+ //#region src/composables/useInput.d.ts
5
+ interface KeyHandler {
6
+ (key: string, modifiers: {
7
+ ctrl: boolean;
8
+ alt: boolean;
9
+ shift: boolean;
10
+ }): void;
11
+ }
12
+ interface UseInputOptions {
13
+ /** Whether to capture input (boolean or Ref<boolean>) */
14
+ active?: boolean | Ref<boolean>;
15
+ /** Whether to capture input (alias for active, boolean or Ref<boolean>) */
16
+ isActive?: boolean | Ref<boolean>;
17
+ /** Called on key press */
18
+ onKey?: KeyHandler;
19
+ /** Called on character input */
20
+ onChar?: (char: string) => void;
21
+ /** Called on Enter */
22
+ onSubmit?: () => void;
23
+ /** Called on Escape */
24
+ onEscape?: () => void;
25
+ /** Called on arrow keys */
26
+ onArrow?: (direction: "up" | "down" | "left" | "right") => void;
27
+ }
28
+ declare function useInput(options?: UseInputOptions): {
29
+ isActive: Ref<boolean, boolean>;
30
+ lastKey: Ref<string | null, string | null>;
31
+ enable: () => void;
32
+ disable: () => void;
33
+ };
34
+ //#endregion
35
+ //#region src/composables/useFocus.d.ts
36
+ interface UseFocusOptions {
37
+ /** Whether this element starts focused */
38
+ autoFocus?: boolean;
39
+ /** Focus ID for this element */
40
+ id?: string;
41
+ }
42
+ interface FocusManager {
43
+ /** Currently focused element ID */
44
+ focusedId: Ref<string | null>;
45
+ /** All focusable element IDs */
46
+ focusableIds: Ref<string[]>;
47
+ /** Focus a specific element */
48
+ focus: (id: string) => void;
49
+ /** Focus next element */
50
+ focusNext: () => void;
51
+ /** Focus previous element */
52
+ focusPrevious: () => void;
53
+ /** Register a focusable element */
54
+ register: (id: string) => void;
55
+ /** Unregister a focusable element */
56
+ unregister: (id: string) => void;
57
+ }
58
+ /**
59
+ * Use focus management
60
+ */
61
+ declare function useFocus(options?: UseFocusOptions): {
62
+ id: string;
63
+ isFocused: _$_vue_reactivity0.ComputedRef<boolean>;
64
+ focus: () => void;
65
+ blur: () => void;
66
+ };
67
+ //#endregion
68
+ //#region src/composables/useApp.d.ts
69
+ interface UseAppReturn {
70
+ /** Terminal width */
71
+ width: Ref<number>;
72
+ /** Terminal height */
73
+ height: Ref<number>;
74
+ /** Whether app is running */
75
+ isRunning: Ref<boolean>;
76
+ /** Exit the app */
77
+ exit: (code?: number) => void;
78
+ /** Force re-render */
79
+ render: () => void;
80
+ /** Clear the screen */
81
+ clear: () => void;
82
+ }
83
+ /**
84
+ * Use app context
85
+ */
86
+ declare function useApp(): UseAppReturn;
87
+ //#endregion
88
+ //#region src/composables/useIme.d.ts
89
+ interface UseImeOptions {
90
+ /** Initial IME mode */
91
+ mode?: ImeMode;
92
+ /** Called when IME mode changes */
93
+ onModeChange?: (mode: ImeMode) => void;
94
+ /** Called when composition updates */
95
+ onCompositionUpdate?: (text: string, cursor: number) => void;
96
+ /** Called when text is committed */
97
+ onCommit?: (text: string) => void;
98
+ }
99
+ type ImeMode = "direct" | "hiragana" | "katakana" | "half-katakana" | "full-alpha" | "pinyin" | "hangul";
100
+ interface ImeManager {
101
+ /** Whether IME is active */
102
+ isActive: Ref<boolean>;
103
+ /** Current input mode */
104
+ mode: Ref<ImeMode>;
105
+ /** Whether currently composing */
106
+ isComposing: Ref<boolean>;
107
+ /** Preedit text */
108
+ preedit: Ref<string>;
109
+ /** Cursor position in preedit */
110
+ preeditCursor: Ref<number>;
111
+ /** Candidate list */
112
+ candidates: Ref<string[]>;
113
+ /** Selected candidate index */
114
+ selectedCandidate: Ref<number>;
115
+ /** Mode display name */
116
+ modeDisplay: Ref<string>;
117
+ /** Enable IME */
118
+ enable: () => void;
119
+ /** Disable IME */
120
+ disable: () => void;
121
+ /** Set input mode */
122
+ setMode: (mode: ImeMode) => void;
123
+ /** Handle key event for IME */
124
+ handleKey: (key: string, modifiers: {
125
+ ctrl: boolean;
126
+ alt: boolean;
127
+ }) => boolean;
128
+ /** Commit current composition */
129
+ commit: () => void;
130
+ /** Cancel current composition */
131
+ cancel: () => void;
132
+ /** Select next candidate */
133
+ nextCandidate: () => void;
134
+ /** Select previous candidate */
135
+ prevCandidate: () => void;
136
+ /** Select candidate by number (1-9) */
137
+ selectCandidate: (num: number) => void;
138
+ }
139
+ declare function useIme(options?: UseImeOptions): ImeManager;
140
+ //#endregion
141
+ export { useApp as a, useFocus as c, useInput as d, UseAppReturn as i, KeyHandler as l, UseImeOptions as n, FocusManager as o, useIme as r, UseFocusOptions as s, ImeManager as t, UseInputOptions as u };
142
+ //# sourceMappingURL=index-BeImxraZ.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-BeImxraZ.d.mts","names":[],"sources":["../src/composables/useInput.ts","../src/composables/useFocus.ts","../src/composables/useApp.ts","../src/composables/useIme.ts"],"mappings":";;;;UAOiB,UAAA;EAAA,CACd,GAAA,UAAa,SAAA;IAAa,IAAA;IAAe,GAAA;IAAc,KAAA;EAAA;AAAA;AAAA,UAGzC,eAAA;EAHD;EAKd,MAAA,aAAmB,GAAA;EALqD;EAOxE,QAAA,aAAqB,GAAA;EAJS;EAM9B,KAAA,GAAQ,UAAA;EAJW;EAMnB,MAAA,IAAU,IAAA;EAFF;EAIR,QAAA;EAJkB;EAMlB,QAAA;EAVmB;EAYnB,OAAA,IAAW,SAAA;AAAA;AAAA,iBAGG,QAAA,CAAS,OAAA,GAAS,eAAA;;;;;;;;UCpBjB,eAAA;EDDU;ECGzB,SAAA;EDHyB;ECKzB,EAAA;AAAA;AAAA,UAGe,YAAA;EDPyC;ECSxD,SAAA,EAAW,GAAA;EDT6D;ECWxE,YAAA,EAAc,GAAA;EDRC;ECUf,KAAA,GAAQ,EAAA;;EAER,SAAA;EDRqB;ECUrB,aAAA;EDRkB;ECUlB,QAAA,GAAW,EAAA;EDdX;ECgBA,UAAA,GAAa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