flexium 0.10.6 → 0.12.6
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 +15 -15
- package/dist/canvas.d.cts +83 -23
- package/dist/canvas.d.ts +83 -23
- package/dist/canvas.js +1 -1
- package/dist/canvas.js.map +1 -1
- package/dist/canvas.mjs +1 -1
- package/dist/canvas.mjs.map +1 -1
- package/dist/chunk-44RZHCII.mjs +2 -0
- package/dist/chunk-44RZHCII.mjs.map +1 -0
- package/dist/chunk-7BXR4ZFD.js +2 -0
- package/dist/chunk-7BXR4ZFD.js.map +1 -0
- package/dist/chunk-7DXFHPWZ.mjs +2 -0
- package/dist/chunk-7DXFHPWZ.mjs.map +1 -0
- package/dist/chunk-ALTO2MGI.js +2 -0
- package/dist/chunk-ALTO2MGI.js.map +1 -0
- package/dist/chunk-C452JE6C.js +2 -0
- package/dist/chunk-C452JE6C.js.map +1 -0
- package/dist/chunk-CPJRQL2C.mjs +2 -0
- package/dist/chunk-CPJRQL2C.mjs.map +1 -0
- package/dist/chunk-EJ7Z5OMU.mjs +2 -0
- package/dist/chunk-EJ7Z5OMU.mjs.map +1 -0
- package/dist/chunk-ENWGYQNU.js +2 -0
- package/dist/chunk-ENWGYQNU.js.map +1 -0
- package/dist/chunk-EXLNKYSH.js +2 -0
- package/dist/chunk-EXLNKYSH.js.map +1 -0
- package/dist/chunk-LUREDEUB.mjs +2 -0
- package/dist/chunk-LUREDEUB.mjs.map +1 -0
- package/dist/chunk-LUW7DIEW.js +2 -0
- package/dist/chunk-LUW7DIEW.js.map +1 -0
- package/dist/chunk-ZCO4NIGC.mjs +2 -0
- package/dist/chunk-ZCO4NIGC.mjs.map +1 -0
- package/dist/core.d.cts +41 -2
- package/dist/core.d.ts +41 -2
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/dom.d.cts +10 -33
- package/dist/dom.d.ts +10 -33
- package/dist/dom.js +1 -1
- package/dist/dom.js.map +1 -1
- package/dist/dom.mjs +1 -1
- package/dist/dom.mjs.map +1 -1
- package/dist/index.d.cts +1 -24
- package/dist/index.d.ts +1 -24
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/interactive.d.cts +65 -148
- package/dist/interactive.d.ts +65 -148
- package/dist/interactive.js +1 -1
- package/dist/interactive.js.map +1 -1
- package/dist/interactive.mjs +1 -1
- package/dist/interactive.mjs.map +1 -1
- package/dist/jsx-dev-runtime.d.cts +6 -2
- package/dist/jsx-dev-runtime.d.ts +6 -2
- package/dist/jsx-dev-runtime.js +1 -1
- package/dist/jsx-dev-runtime.js.map +1 -1
- package/dist/jsx-dev-runtime.mjs +1 -1
- package/dist/jsx-dev-runtime.mjs.map +1 -1
- package/dist/jsx-runtime.d.cts +6 -68
- package/dist/jsx-runtime.d.ts +6 -68
- package/dist/jsx-runtime.js +1 -1
- package/dist/jsx-runtime.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/router.d.cts +48 -15
- package/dist/router.d.ts +48 -15
- package/dist/router.js +1 -1
- package/dist/router.js.map +1 -1
- package/dist/router.mjs +1 -1
- package/dist/router.mjs.map +1 -1
- package/package.json +13 -53
- package/dist/DrawText-CVAKQ5wZ.d.cts +0 -309
- package/dist/DrawText-Dlh1L1Ar.d.ts +0 -309
- package/dist/Motion-BrOAJzgH.d.cts +0 -87
- package/dist/Motion-BrOAJzgH.d.ts +0 -87
- package/dist/advanced.d.cts +0 -32
- package/dist/advanced.d.ts +0 -32
- package/dist/advanced.js +0 -2
- package/dist/advanced.js.map +0 -1
- package/dist/advanced.mjs +0 -2
- package/dist/advanced.mjs.map +0 -1
- package/dist/chunk-2L2QFYBL.mjs +0 -2
- package/dist/chunk-2L2QFYBL.mjs.map +0 -1
- package/dist/chunk-ANJNQW77.js +0 -2
- package/dist/chunk-ANJNQW77.js.map +0 -1
- package/dist/chunk-BYHIHYRR.mjs +0 -2
- package/dist/chunk-BYHIHYRR.mjs.map +0 -1
- package/dist/chunk-DZ7L3SHV.js +0 -2
- package/dist/chunk-DZ7L3SHV.js.map +0 -1
- package/dist/chunk-E5WYPGCV.mjs +0 -3
- package/dist/chunk-E5WYPGCV.mjs.map +0 -1
- package/dist/chunk-ECYYIQEX.mjs +0 -3
- package/dist/chunk-ECYYIQEX.mjs.map +0 -1
- package/dist/chunk-ERIXVRJ4.mjs +0 -3
- package/dist/chunk-ERIXVRJ4.mjs.map +0 -1
- package/dist/chunk-F23GIQDE.mjs +0 -2
- package/dist/chunk-F23GIQDE.mjs.map +0 -1
- package/dist/chunk-FDMJHFN7.mjs +0 -2
- package/dist/chunk-FDMJHFN7.mjs.map +0 -1
- package/dist/chunk-GKJQEOP7.mjs +0 -2
- package/dist/chunk-GKJQEOP7.mjs.map +0 -1
- package/dist/chunk-GYDP6MFV.js +0 -3
- package/dist/chunk-GYDP6MFV.js.map +0 -1
- package/dist/chunk-HB5VPQTB.mjs +0 -2
- package/dist/chunk-HB5VPQTB.mjs.map +0 -1
- package/dist/chunk-KNF5ERPK.mjs +0 -2
- package/dist/chunk-KNF5ERPK.mjs.map +0 -1
- package/dist/chunk-NF4RPLCK.js +0 -3
- package/dist/chunk-NF4RPLCK.js.map +0 -1
- package/dist/chunk-OPAAGNBO.mjs +0 -2
- package/dist/chunk-OPAAGNBO.mjs.map +0 -1
- package/dist/chunk-OPAQ4R4M.mjs +0 -2
- package/dist/chunk-OPAQ4R4M.mjs.map +0 -1
- package/dist/chunk-Q7IWDVJ4.js +0 -2
- package/dist/chunk-Q7IWDVJ4.js.map +0 -1
- package/dist/chunk-RLLO5M6F.js +0 -3
- package/dist/chunk-RLLO5M6F.js.map +0 -1
- package/dist/chunk-RMN5IPS5.js +0 -2
- package/dist/chunk-RMN5IPS5.js.map +0 -1
- package/dist/chunk-U6C6VDVZ.js +0 -2
- package/dist/chunk-U6C6VDVZ.js.map +0 -1
- package/dist/chunk-WQFQO5LK.js +0 -2
- package/dist/chunk-WQFQO5LK.js.map +0 -1
- package/dist/chunk-WVEJT7HD.mjs +0 -2
- package/dist/chunk-WVEJT7HD.mjs.map +0 -1
- package/dist/chunk-WWEWRI6S.js +0 -2
- package/dist/chunk-WWEWRI6S.js.map +0 -1
- package/dist/chunk-YDZ37ZZ4.js +0 -2
- package/dist/chunk-YDZ37ZZ4.js.map +0 -1
- package/dist/chunk-YEBBTVHG.js +0 -2
- package/dist/chunk-YEBBTVHG.js.map +0 -1
- package/dist/chunk-YPVRQKMW.js +0 -2
- package/dist/chunk-YPVRQKMW.js.map +0 -1
- package/dist/components-BMbqsbMY.d.cts +0 -126
- package/dist/components-C83mBQXW.d.ts +0 -126
- package/dist/core-CxHP8991.d.cts +0 -32
- package/dist/core-D0ggvjX3.d.ts +0 -32
- package/dist/effect-554ONNZR.js +0 -2
- package/dist/effect-554ONNZR.js.map +0 -1
- package/dist/effect-T2GVIS3T.mjs +0 -2
- package/dist/effect-T2GVIS3T.mjs.map +0 -1
- package/dist/owner-QS9tPwPr.d.cts +0 -27
- package/dist/owner-QS9tPwPr.d.ts +0 -27
- package/dist/portal-BK_0Z0hE.d.cts +0 -206
- package/dist/portal-CbguxtuQ.d.ts +0 -206
- package/dist/primitives/layout.d.cts +0 -295
- package/dist/primitives/layout.d.ts +0 -295
- package/dist/primitives/layout.js +0 -2
- package/dist/primitives/layout.js.map +0 -1
- package/dist/primitives/layout.mjs +0 -2
- package/dist/primitives/layout.mjs.map +0 -1
- package/dist/primitives/motion.d.cts +0 -230
- package/dist/primitives/motion.d.ts +0 -230
- package/dist/primitives/motion.js +0 -2
- package/dist/primitives/motion.js.map +0 -1
- package/dist/primitives/motion.mjs +0 -2
- package/dist/primitives/motion.mjs.map +0 -1
- package/dist/primitives/ui.d.cts +0 -81
- package/dist/primitives/ui.d.ts +0 -81
- package/dist/primitives/ui.js +0 -2
- package/dist/primitives/ui.js.map +0 -1
- package/dist/primitives/ui.mjs +0 -2
- package/dist/primitives/ui.mjs.map +0 -1
- package/dist/primitives.d.cts +0 -93
- package/dist/primitives.d.ts +0 -93
- package/dist/primitives.js +0 -2
- package/dist/primitives.js.map +0 -1
- package/dist/primitives.mjs +0 -2
- package/dist/primitives.mjs.map +0 -1
- package/dist/renderer-DSLb-FGg.d.cts +0 -135
- package/dist/renderer-DSLb-FGg.d.ts +0 -135
- package/dist/server.d.cts +0 -3
- package/dist/server.d.ts +0 -3
- package/dist/server.js +0 -2
- package/dist/server.js.map +0 -1
- package/dist/server.mjs +0 -2
- package/dist/server.mjs.map +0 -1
- package/dist/state-DitsMyev.d.cts +0 -96
- package/dist/state-DitsMyev.d.ts +0 -96
- package/dist/state-S3TSPDMB.js +0 -2
- package/dist/state-S3TSPDMB.js.map +0 -1
- package/dist/state-SUVOJZYY.mjs +0 -2
- package/dist/state-SUVOJZYY.mjs.map +0 -1
- package/dist/sync-Z4QqUDjF.d.cts +0 -25
- package/dist/sync-Z4QqUDjF.d.ts +0 -25
- package/dist/test-exports.d.cts +0 -68
- package/dist/test-exports.d.ts +0 -68
- package/dist/test-exports.js +0 -2
- package/dist/test-exports.js.map +0 -1
- package/dist/test-exports.mjs +0 -2
- package/dist/test-exports.mjs.map +0 -1
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
import { A as AnimatableProps } from '../Motion-BrOAJzgH.cjs';
|
|
2
|
-
export { M as MotionController, a as MotionProps, S as SpringConfig, c as cleanupMotionState } from '../Motion-BrOAJzgH.cjs';
|
|
3
|
-
import { F as FNode } from '../renderer-DSLb-FGg.cjs';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Preset animation types
|
|
7
|
-
*/
|
|
8
|
-
type TransitionPreset = 'fade' | 'slide-up' | 'slide-down' | 'slide-left' | 'slide-right' | 'scale' | 'scale-fade';
|
|
9
|
-
/**
|
|
10
|
-
* Transition timing configuration
|
|
11
|
-
*/
|
|
12
|
-
interface TransitionTiming {
|
|
13
|
-
duration?: number;
|
|
14
|
-
delay?: number;
|
|
15
|
-
easing?: string;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Transition component props
|
|
19
|
-
*/
|
|
20
|
-
interface TransitionProps {
|
|
21
|
-
/** Use a preset animation */
|
|
22
|
-
preset?: TransitionPreset;
|
|
23
|
-
/** Custom enter animation (from state) */
|
|
24
|
-
enter?: AnimatableProps;
|
|
25
|
-
/** Custom enter animation (to state) */
|
|
26
|
-
enterTo?: AnimatableProps;
|
|
27
|
-
/** Custom exit animation (to state) */
|
|
28
|
-
exit?: AnimatableProps;
|
|
29
|
-
/** Enter timing */
|
|
30
|
-
enterTiming?: TransitionTiming;
|
|
31
|
-
/** Exit timing */
|
|
32
|
-
exitTiming?: TransitionTiming;
|
|
33
|
-
/** Callback when enter animation starts */
|
|
34
|
-
onEnterStart?: () => void;
|
|
35
|
-
/** Callback when enter animation completes */
|
|
36
|
-
onEnterComplete?: () => void;
|
|
37
|
-
/** Callback when exit animation starts */
|
|
38
|
-
onExitStart?: () => void;
|
|
39
|
-
/** Callback when exit animation completes */
|
|
40
|
-
onExitComplete?: () => void;
|
|
41
|
-
/** Children to animate */
|
|
42
|
-
children: any;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Transition component for animated enter/exit
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
* {() => visible() && (
|
|
49
|
-
* <Transition preset="fade">
|
|
50
|
-
* <div>Content appears with fade</div>
|
|
51
|
-
* </Transition>
|
|
52
|
-
* )}
|
|
53
|
-
*
|
|
54
|
-
* @example
|
|
55
|
-
* <Transition
|
|
56
|
-
* enter={{ opacity: 0, y: 50 }}
|
|
57
|
-
* enterTo={{ opacity: 1, y: 0 }}
|
|
58
|
-
* exit={{ opacity: 0, y: -50 }}
|
|
59
|
-
* enterTiming={{ duration: 300, easing: 'ease-out' }}
|
|
60
|
-
* exitTiming={{ duration: 200, easing: 'ease-in' }}
|
|
61
|
-
* >
|
|
62
|
-
* <div>Custom animated content</div>
|
|
63
|
-
* </Transition>
|
|
64
|
-
*/
|
|
65
|
-
declare function Transition(props: TransitionProps): FNode;
|
|
66
|
-
/**
|
|
67
|
-
* TransitionGroup props
|
|
68
|
-
*/
|
|
69
|
-
interface TransitionGroupProps {
|
|
70
|
-
/** Delay between each child animation (stagger effect) */
|
|
71
|
-
stagger?: number;
|
|
72
|
-
/** Children (should contain Transition components) */
|
|
73
|
-
children: any;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* TransitionGroup component for staggered animations
|
|
77
|
-
*
|
|
78
|
-
* @example
|
|
79
|
-
* <TransitionGroup stagger={50}>
|
|
80
|
-
* <For each={items}>
|
|
81
|
-
* {(item) => (
|
|
82
|
-
* <Transition preset="slide-up">
|
|
83
|
-
* <div>{item.name}</div>
|
|
84
|
-
* </Transition>
|
|
85
|
-
* )}
|
|
86
|
-
* </For>
|
|
87
|
-
* </TransitionGroup>
|
|
88
|
-
*/
|
|
89
|
-
declare function TransitionGroup(props: TransitionGroupProps): () => any;
|
|
90
|
-
/**
|
|
91
|
-
* Preset transition configurations
|
|
92
|
-
*/
|
|
93
|
-
declare const transitions: {
|
|
94
|
-
fade: {
|
|
95
|
-
preset: "fade";
|
|
96
|
-
};
|
|
97
|
-
slideUp: {
|
|
98
|
-
preset: "slide-up";
|
|
99
|
-
};
|
|
100
|
-
slideDown: {
|
|
101
|
-
preset: "slide-down";
|
|
102
|
-
};
|
|
103
|
-
slideLeft: {
|
|
104
|
-
preset: "slide-left";
|
|
105
|
-
};
|
|
106
|
-
slideRight: {
|
|
107
|
-
preset: "slide-right";
|
|
108
|
-
};
|
|
109
|
-
scale: {
|
|
110
|
-
preset: "scale";
|
|
111
|
-
};
|
|
112
|
-
scaleFade: {
|
|
113
|
-
preset: "scale-fade";
|
|
114
|
-
};
|
|
115
|
-
modal: {
|
|
116
|
-
enter: {
|
|
117
|
-
opacity: number;
|
|
118
|
-
scale: number;
|
|
119
|
-
y: number;
|
|
120
|
-
};
|
|
121
|
-
enterTo: {
|
|
122
|
-
opacity: number;
|
|
123
|
-
scale: number;
|
|
124
|
-
y: number;
|
|
125
|
-
};
|
|
126
|
-
exit: {
|
|
127
|
-
opacity: number;
|
|
128
|
-
scale: number;
|
|
129
|
-
y: number;
|
|
130
|
-
};
|
|
131
|
-
enterTiming: {
|
|
132
|
-
duration: number;
|
|
133
|
-
easing: string;
|
|
134
|
-
};
|
|
135
|
-
exitTiming: {
|
|
136
|
-
duration: number;
|
|
137
|
-
easing: string;
|
|
138
|
-
};
|
|
139
|
-
};
|
|
140
|
-
dropdown: {
|
|
141
|
-
enter: {
|
|
142
|
-
opacity: number;
|
|
143
|
-
y: number;
|
|
144
|
-
scale: number;
|
|
145
|
-
};
|
|
146
|
-
enterTo: {
|
|
147
|
-
opacity: number;
|
|
148
|
-
y: number;
|
|
149
|
-
scale: number;
|
|
150
|
-
};
|
|
151
|
-
exit: {
|
|
152
|
-
opacity: number;
|
|
153
|
-
y: number;
|
|
154
|
-
scale: number;
|
|
155
|
-
};
|
|
156
|
-
enterTiming: {
|
|
157
|
-
duration: number;
|
|
158
|
-
easing: string;
|
|
159
|
-
};
|
|
160
|
-
exitTiming: {
|
|
161
|
-
duration: number;
|
|
162
|
-
easing: string;
|
|
163
|
-
};
|
|
164
|
-
};
|
|
165
|
-
tooltip: {
|
|
166
|
-
enter: {
|
|
167
|
-
opacity: number;
|
|
168
|
-
scale: number;
|
|
169
|
-
};
|
|
170
|
-
enterTo: {
|
|
171
|
-
opacity: number;
|
|
172
|
-
scale: number;
|
|
173
|
-
};
|
|
174
|
-
exit: {
|
|
175
|
-
opacity: number;
|
|
176
|
-
scale: number;
|
|
177
|
-
};
|
|
178
|
-
enterTiming: {
|
|
179
|
-
duration: number;
|
|
180
|
-
easing: string;
|
|
181
|
-
};
|
|
182
|
-
exitTiming: {
|
|
183
|
-
duration: number;
|
|
184
|
-
easing: string;
|
|
185
|
-
};
|
|
186
|
-
};
|
|
187
|
-
notification: {
|
|
188
|
-
enter: {
|
|
189
|
-
opacity: number;
|
|
190
|
-
x: number;
|
|
191
|
-
};
|
|
192
|
-
enterTo: {
|
|
193
|
-
opacity: number;
|
|
194
|
-
x: number;
|
|
195
|
-
};
|
|
196
|
-
exit: {
|
|
197
|
-
opacity: number;
|
|
198
|
-
x: number;
|
|
199
|
-
};
|
|
200
|
-
enterTiming: {
|
|
201
|
-
duration: number;
|
|
202
|
-
easing: string;
|
|
203
|
-
};
|
|
204
|
-
exitTiming: {
|
|
205
|
-
duration: number;
|
|
206
|
-
easing: string;
|
|
207
|
-
};
|
|
208
|
-
};
|
|
209
|
-
page: {
|
|
210
|
-
enter: {
|
|
211
|
-
opacity: number;
|
|
212
|
-
};
|
|
213
|
-
enterTo: {
|
|
214
|
-
opacity: number;
|
|
215
|
-
};
|
|
216
|
-
exit: {
|
|
217
|
-
opacity: number;
|
|
218
|
-
};
|
|
219
|
-
enterTiming: {
|
|
220
|
-
duration: number;
|
|
221
|
-
easing: string;
|
|
222
|
-
};
|
|
223
|
-
exitTiming: {
|
|
224
|
-
duration: number;
|
|
225
|
-
easing: string;
|
|
226
|
-
};
|
|
227
|
-
};
|
|
228
|
-
};
|
|
229
|
-
|
|
230
|
-
export { AnimatableProps, Transition, TransitionGroup, type TransitionGroupProps, type TransitionPreset, type TransitionProps, type TransitionTiming, transitions };
|
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
import { A as AnimatableProps } from '../Motion-BrOAJzgH.js';
|
|
2
|
-
export { M as MotionController, a as MotionProps, S as SpringConfig, c as cleanupMotionState } from '../Motion-BrOAJzgH.js';
|
|
3
|
-
import { F as FNode } from '../renderer-DSLb-FGg.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Preset animation types
|
|
7
|
-
*/
|
|
8
|
-
type TransitionPreset = 'fade' | 'slide-up' | 'slide-down' | 'slide-left' | 'slide-right' | 'scale' | 'scale-fade';
|
|
9
|
-
/**
|
|
10
|
-
* Transition timing configuration
|
|
11
|
-
*/
|
|
12
|
-
interface TransitionTiming {
|
|
13
|
-
duration?: number;
|
|
14
|
-
delay?: number;
|
|
15
|
-
easing?: string;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Transition component props
|
|
19
|
-
*/
|
|
20
|
-
interface TransitionProps {
|
|
21
|
-
/** Use a preset animation */
|
|
22
|
-
preset?: TransitionPreset;
|
|
23
|
-
/** Custom enter animation (from state) */
|
|
24
|
-
enter?: AnimatableProps;
|
|
25
|
-
/** Custom enter animation (to state) */
|
|
26
|
-
enterTo?: AnimatableProps;
|
|
27
|
-
/** Custom exit animation (to state) */
|
|
28
|
-
exit?: AnimatableProps;
|
|
29
|
-
/** Enter timing */
|
|
30
|
-
enterTiming?: TransitionTiming;
|
|
31
|
-
/** Exit timing */
|
|
32
|
-
exitTiming?: TransitionTiming;
|
|
33
|
-
/** Callback when enter animation starts */
|
|
34
|
-
onEnterStart?: () => void;
|
|
35
|
-
/** Callback when enter animation completes */
|
|
36
|
-
onEnterComplete?: () => void;
|
|
37
|
-
/** Callback when exit animation starts */
|
|
38
|
-
onExitStart?: () => void;
|
|
39
|
-
/** Callback when exit animation completes */
|
|
40
|
-
onExitComplete?: () => void;
|
|
41
|
-
/** Children to animate */
|
|
42
|
-
children: any;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Transition component for animated enter/exit
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
* {() => visible() && (
|
|
49
|
-
* <Transition preset="fade">
|
|
50
|
-
* <div>Content appears with fade</div>
|
|
51
|
-
* </Transition>
|
|
52
|
-
* )}
|
|
53
|
-
*
|
|
54
|
-
* @example
|
|
55
|
-
* <Transition
|
|
56
|
-
* enter={{ opacity: 0, y: 50 }}
|
|
57
|
-
* enterTo={{ opacity: 1, y: 0 }}
|
|
58
|
-
* exit={{ opacity: 0, y: -50 }}
|
|
59
|
-
* enterTiming={{ duration: 300, easing: 'ease-out' }}
|
|
60
|
-
* exitTiming={{ duration: 200, easing: 'ease-in' }}
|
|
61
|
-
* >
|
|
62
|
-
* <div>Custom animated content</div>
|
|
63
|
-
* </Transition>
|
|
64
|
-
*/
|
|
65
|
-
declare function Transition(props: TransitionProps): FNode;
|
|
66
|
-
/**
|
|
67
|
-
* TransitionGroup props
|
|
68
|
-
*/
|
|
69
|
-
interface TransitionGroupProps {
|
|
70
|
-
/** Delay between each child animation (stagger effect) */
|
|
71
|
-
stagger?: number;
|
|
72
|
-
/** Children (should contain Transition components) */
|
|
73
|
-
children: any;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* TransitionGroup component for staggered animations
|
|
77
|
-
*
|
|
78
|
-
* @example
|
|
79
|
-
* <TransitionGroup stagger={50}>
|
|
80
|
-
* <For each={items}>
|
|
81
|
-
* {(item) => (
|
|
82
|
-
* <Transition preset="slide-up">
|
|
83
|
-
* <div>{item.name}</div>
|
|
84
|
-
* </Transition>
|
|
85
|
-
* )}
|
|
86
|
-
* </For>
|
|
87
|
-
* </TransitionGroup>
|
|
88
|
-
*/
|
|
89
|
-
declare function TransitionGroup(props: TransitionGroupProps): () => any;
|
|
90
|
-
/**
|
|
91
|
-
* Preset transition configurations
|
|
92
|
-
*/
|
|
93
|
-
declare const transitions: {
|
|
94
|
-
fade: {
|
|
95
|
-
preset: "fade";
|
|
96
|
-
};
|
|
97
|
-
slideUp: {
|
|
98
|
-
preset: "slide-up";
|
|
99
|
-
};
|
|
100
|
-
slideDown: {
|
|
101
|
-
preset: "slide-down";
|
|
102
|
-
};
|
|
103
|
-
slideLeft: {
|
|
104
|
-
preset: "slide-left";
|
|
105
|
-
};
|
|
106
|
-
slideRight: {
|
|
107
|
-
preset: "slide-right";
|
|
108
|
-
};
|
|
109
|
-
scale: {
|
|
110
|
-
preset: "scale";
|
|
111
|
-
};
|
|
112
|
-
scaleFade: {
|
|
113
|
-
preset: "scale-fade";
|
|
114
|
-
};
|
|
115
|
-
modal: {
|
|
116
|
-
enter: {
|
|
117
|
-
opacity: number;
|
|
118
|
-
scale: number;
|
|
119
|
-
y: number;
|
|
120
|
-
};
|
|
121
|
-
enterTo: {
|
|
122
|
-
opacity: number;
|
|
123
|
-
scale: number;
|
|
124
|
-
y: number;
|
|
125
|
-
};
|
|
126
|
-
exit: {
|
|
127
|
-
opacity: number;
|
|
128
|
-
scale: number;
|
|
129
|
-
y: number;
|
|
130
|
-
};
|
|
131
|
-
enterTiming: {
|
|
132
|
-
duration: number;
|
|
133
|
-
easing: string;
|
|
134
|
-
};
|
|
135
|
-
exitTiming: {
|
|
136
|
-
duration: number;
|
|
137
|
-
easing: string;
|
|
138
|
-
};
|
|
139
|
-
};
|
|
140
|
-
dropdown: {
|
|
141
|
-
enter: {
|
|
142
|
-
opacity: number;
|
|
143
|
-
y: number;
|
|
144
|
-
scale: number;
|
|
145
|
-
};
|
|
146
|
-
enterTo: {
|
|
147
|
-
opacity: number;
|
|
148
|
-
y: number;
|
|
149
|
-
scale: number;
|
|
150
|
-
};
|
|
151
|
-
exit: {
|
|
152
|
-
opacity: number;
|
|
153
|
-
y: number;
|
|
154
|
-
scale: number;
|
|
155
|
-
};
|
|
156
|
-
enterTiming: {
|
|
157
|
-
duration: number;
|
|
158
|
-
easing: string;
|
|
159
|
-
};
|
|
160
|
-
exitTiming: {
|
|
161
|
-
duration: number;
|
|
162
|
-
easing: string;
|
|
163
|
-
};
|
|
164
|
-
};
|
|
165
|
-
tooltip: {
|
|
166
|
-
enter: {
|
|
167
|
-
opacity: number;
|
|
168
|
-
scale: number;
|
|
169
|
-
};
|
|
170
|
-
enterTo: {
|
|
171
|
-
opacity: number;
|
|
172
|
-
scale: number;
|
|
173
|
-
};
|
|
174
|
-
exit: {
|
|
175
|
-
opacity: number;
|
|
176
|
-
scale: number;
|
|
177
|
-
};
|
|
178
|
-
enterTiming: {
|
|
179
|
-
duration: number;
|
|
180
|
-
easing: string;
|
|
181
|
-
};
|
|
182
|
-
exitTiming: {
|
|
183
|
-
duration: number;
|
|
184
|
-
easing: string;
|
|
185
|
-
};
|
|
186
|
-
};
|
|
187
|
-
notification: {
|
|
188
|
-
enter: {
|
|
189
|
-
opacity: number;
|
|
190
|
-
x: number;
|
|
191
|
-
};
|
|
192
|
-
enterTo: {
|
|
193
|
-
opacity: number;
|
|
194
|
-
x: number;
|
|
195
|
-
};
|
|
196
|
-
exit: {
|
|
197
|
-
opacity: number;
|
|
198
|
-
x: number;
|
|
199
|
-
};
|
|
200
|
-
enterTiming: {
|
|
201
|
-
duration: number;
|
|
202
|
-
easing: string;
|
|
203
|
-
};
|
|
204
|
-
exitTiming: {
|
|
205
|
-
duration: number;
|
|
206
|
-
easing: string;
|
|
207
|
-
};
|
|
208
|
-
};
|
|
209
|
-
page: {
|
|
210
|
-
enter: {
|
|
211
|
-
opacity: number;
|
|
212
|
-
};
|
|
213
|
-
enterTo: {
|
|
214
|
-
opacity: number;
|
|
215
|
-
};
|
|
216
|
-
exit: {
|
|
217
|
-
opacity: number;
|
|
218
|
-
};
|
|
219
|
-
enterTiming: {
|
|
220
|
-
duration: number;
|
|
221
|
-
easing: string;
|
|
222
|
-
};
|
|
223
|
-
exitTiming: {
|
|
224
|
-
duration: number;
|
|
225
|
-
easing: string;
|
|
226
|
-
};
|
|
227
|
-
};
|
|
228
|
-
};
|
|
229
|
-
|
|
230
|
-
export { AnimatableProps, Transition, TransitionGroup, type TransitionGroupProps, type TransitionPreset, type TransitionProps, type TransitionTiming, transitions };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkRMN5IPS5_js=require('../chunk-RMN5IPS5.js');require('../chunk-Q7IWDVJ4.js'),require('../chunk-WQFQO5LK.js'),require('../chunk-WWEWRI6S.js'),require('../chunk-GYDP6MFV.js');Object.defineProperty(exports,"MotionController",{enumerable:true,get:function(){return chunkRMN5IPS5_js.b}});Object.defineProperty(exports,"Transition",{enumerable:true,get:function(){return chunkRMN5IPS5_js.c}});Object.defineProperty(exports,"TransitionGroup",{enumerable:true,get:function(){return chunkRMN5IPS5_js.d}});Object.defineProperty(exports,"cleanupMotionState",{enumerable:true,get:function(){return chunkRMN5IPS5_js.a}});Object.defineProperty(exports,"transitions",{enumerable:true,get:function(){return chunkRMN5IPS5_js.e}});//# sourceMappingURL=motion.js.map
|
|
2
|
-
//# sourceMappingURL=motion.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"motion.js"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export{b as MotionController,c as Transition,d as TransitionGroup,a as cleanupMotionState,e as transitions}from'../chunk-GKJQEOP7.mjs';import'../chunk-WVEJT7HD.mjs';import'../chunk-KNF5ERPK.mjs';import'../chunk-HB5VPQTB.mjs';import'../chunk-ECYYIQEX.mjs';//# sourceMappingURL=motion.mjs.map
|
|
2
|
-
//# sourceMappingURL=motion.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"motion.mjs"}
|
package/dist/primitives/ui.d.cts
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { S as StateValue } from '../state-DitsMyev.cjs';
|
|
2
|
-
import { F as FNode } from '../renderer-DSLb-FGg.cjs';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Button Component - Accessible button with unified touch/click handler
|
|
6
|
-
*
|
|
7
|
-
* Provides onPress handler that works consistently across mouse, touch, and keyboard
|
|
8
|
-
* Includes full ARIA support and style props
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Button variants
|
|
13
|
-
*/
|
|
14
|
-
type ButtonVariant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger';
|
|
15
|
-
/**
|
|
16
|
-
* Button sizes
|
|
17
|
-
*/
|
|
18
|
-
type ButtonSize = 'sm' | 'md' | 'lg';
|
|
19
|
-
/**
|
|
20
|
-
* Button type attribute
|
|
21
|
-
*/
|
|
22
|
-
type ButtonType = 'button' | 'submit' | 'reset';
|
|
23
|
-
/**
|
|
24
|
-
* Button component props
|
|
25
|
-
*/
|
|
26
|
-
interface ButtonProps {
|
|
27
|
-
type?: ButtonType;
|
|
28
|
-
variant?: ButtonVariant;
|
|
29
|
-
size?: ButtonSize;
|
|
30
|
-
disabled?: StateValue<boolean> | boolean;
|
|
31
|
-
loading?: StateValue<boolean> | boolean;
|
|
32
|
-
fullWidth?: boolean;
|
|
33
|
-
children?: any;
|
|
34
|
-
leftIcon?: any;
|
|
35
|
-
rightIcon?: any;
|
|
36
|
-
loadingText?: string;
|
|
37
|
-
className?: string;
|
|
38
|
-
style?: Partial<CSSStyleDeclaration>;
|
|
39
|
-
id?: string;
|
|
40
|
-
role?: string;
|
|
41
|
-
ariaLabel?: string;
|
|
42
|
-
ariaDescribedby?: string;
|
|
43
|
-
ariaExpanded?: boolean;
|
|
44
|
-
ariaPressed?: boolean;
|
|
45
|
-
ariaControls?: string;
|
|
46
|
-
onPress?: (event: Event) => void | Promise<void>;
|
|
47
|
-
onPressStart?: (event: PointerEvent) => void;
|
|
48
|
-
onPressEnd?: (event: PointerEvent) => void;
|
|
49
|
-
onFocus?: (event: FocusEvent) => void;
|
|
50
|
-
onBlur?: (event: FocusEvent) => void;
|
|
51
|
-
onKeyDown?: (event: KeyboardEvent) => void;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Button component - Accessible button with unified touch/click handler
|
|
55
|
-
*
|
|
56
|
-
* @example
|
|
57
|
-
* ```tsx
|
|
58
|
-
* <Button variant="primary" onPress={() => console.log('clicked')}>
|
|
59
|
-
* Click me
|
|
60
|
-
* </Button>
|
|
61
|
-
*
|
|
62
|
-
* const loading = signal(false)
|
|
63
|
-
* <Button loading={loading} loadingText="Saving...">
|
|
64
|
-
* Save
|
|
65
|
-
* </Button>
|
|
66
|
-
* ```
|
|
67
|
-
*/
|
|
68
|
-
declare function Button(props: ButtonProps): FNode;
|
|
69
|
-
/**
|
|
70
|
-
* IconButton component - Button with only an icon
|
|
71
|
-
*
|
|
72
|
-
* @example
|
|
73
|
-
* ```tsx
|
|
74
|
-
* <IconButton icon={<i class="icon-close" />} ariaLabel="Close" onPress={handleClose} />
|
|
75
|
-
* ```
|
|
76
|
-
*/
|
|
77
|
-
declare function IconButton(props: ButtonProps & {
|
|
78
|
-
icon: any;
|
|
79
|
-
}): FNode;
|
|
80
|
-
|
|
81
|
-
export { Button, type ButtonProps, type ButtonSize, type ButtonType, type ButtonVariant, IconButton };
|
package/dist/primitives/ui.d.ts
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { S as StateValue } from '../state-DitsMyev.js';
|
|
2
|
-
import { F as FNode } from '../renderer-DSLb-FGg.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Button Component - Accessible button with unified touch/click handler
|
|
6
|
-
*
|
|
7
|
-
* Provides onPress handler that works consistently across mouse, touch, and keyboard
|
|
8
|
-
* Includes full ARIA support and style props
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Button variants
|
|
13
|
-
*/
|
|
14
|
-
type ButtonVariant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger';
|
|
15
|
-
/**
|
|
16
|
-
* Button sizes
|
|
17
|
-
*/
|
|
18
|
-
type ButtonSize = 'sm' | 'md' | 'lg';
|
|
19
|
-
/**
|
|
20
|
-
* Button type attribute
|
|
21
|
-
*/
|
|
22
|
-
type ButtonType = 'button' | 'submit' | 'reset';
|
|
23
|
-
/**
|
|
24
|
-
* Button component props
|
|
25
|
-
*/
|
|
26
|
-
interface ButtonProps {
|
|
27
|
-
type?: ButtonType;
|
|
28
|
-
variant?: ButtonVariant;
|
|
29
|
-
size?: ButtonSize;
|
|
30
|
-
disabled?: StateValue<boolean> | boolean;
|
|
31
|
-
loading?: StateValue<boolean> | boolean;
|
|
32
|
-
fullWidth?: boolean;
|
|
33
|
-
children?: any;
|
|
34
|
-
leftIcon?: any;
|
|
35
|
-
rightIcon?: any;
|
|
36
|
-
loadingText?: string;
|
|
37
|
-
className?: string;
|
|
38
|
-
style?: Partial<CSSStyleDeclaration>;
|
|
39
|
-
id?: string;
|
|
40
|
-
role?: string;
|
|
41
|
-
ariaLabel?: string;
|
|
42
|
-
ariaDescribedby?: string;
|
|
43
|
-
ariaExpanded?: boolean;
|
|
44
|
-
ariaPressed?: boolean;
|
|
45
|
-
ariaControls?: string;
|
|
46
|
-
onPress?: (event: Event) => void | Promise<void>;
|
|
47
|
-
onPressStart?: (event: PointerEvent) => void;
|
|
48
|
-
onPressEnd?: (event: PointerEvent) => void;
|
|
49
|
-
onFocus?: (event: FocusEvent) => void;
|
|
50
|
-
onBlur?: (event: FocusEvent) => void;
|
|
51
|
-
onKeyDown?: (event: KeyboardEvent) => void;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Button component - Accessible button with unified touch/click handler
|
|
55
|
-
*
|
|
56
|
-
* @example
|
|
57
|
-
* ```tsx
|
|
58
|
-
* <Button variant="primary" onPress={() => console.log('clicked')}>
|
|
59
|
-
* Click me
|
|
60
|
-
* </Button>
|
|
61
|
-
*
|
|
62
|
-
* const loading = signal(false)
|
|
63
|
-
* <Button loading={loading} loadingText="Saving...">
|
|
64
|
-
* Save
|
|
65
|
-
* </Button>
|
|
66
|
-
* ```
|
|
67
|
-
*/
|
|
68
|
-
declare function Button(props: ButtonProps): FNode;
|
|
69
|
-
/**
|
|
70
|
-
* IconButton component - Button with only an icon
|
|
71
|
-
*
|
|
72
|
-
* @example
|
|
73
|
-
* ```tsx
|
|
74
|
-
* <IconButton icon={<i class="icon-close" />} ariaLabel="Close" onPress={handleClose} />
|
|
75
|
-
* ```
|
|
76
|
-
*/
|
|
77
|
-
declare function IconButton(props: ButtonProps & {
|
|
78
|
-
icon: any;
|
|
79
|
-
}): FNode;
|
|
80
|
-
|
|
81
|
-
export { Button, type ButtonProps, type ButtonSize, type ButtonType, type ButtonVariant, IconButton };
|
package/dist/primitives/ui.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkYEBBTVHG_js=require('../chunk-YEBBTVHG.js');require('../chunk-YPVRQKMW.js');var chunkQ7IWDVJ4_js=require('../chunk-Q7IWDVJ4.js');require('../chunk-WQFQO5LK.js');var chunkWWEWRI6S_js=require('../chunk-WWEWRI6S.js'),chunkGYDP6MFV_js=require('../chunk-GYDP6MFV.js');function j(u){let{type:y="button",variant:a="primary",size:v="md",disabled:r=false,loading:b=false,fullWidth:G=false,children:E,leftIcon:k,rightIcon:D,loadingText:C="Loading...",className:N="",style:J,id:w,role:I,ariaLabel:V,ariaDescribedby:A,ariaExpanded:F,ariaPressed:K,ariaControls:z,onPress:H,onPressStart:s,onPressEnd:l,onFocus:m,onBlur:L,onKeyDown:M}=u,g=["button",`button-${a}`,`button-${v}`];G&&g.push("button-full-width"),N&&g.push(N);let o={type:y,class:g.join(" "),style:J};w&&(o.id=w),I&&(o.role=I),V&&(o["aria-label"]=V),A&&(o["aria-describedby"]=A),F!==void 0&&(o["aria-expanded"]=F),K!==void 0&&(o["aria-pressed"]=K),z&&(o["aria-controls"]=z),o.ref=e=>{if(!e)return;let B=typeof r=="boolean"?chunkYEBBTVHG_js.k(r)[0]:r,P=typeof b=="boolean"?chunkYEBBTVHG_js.k(b)[0]:b,d=e.querySelector(".button-content"),c=e.querySelector(".button-spinner"),p=e.querySelector(".button-text");if(chunkWWEWRI6S_js.c(()=>{let n=typeof B=="function"?B():B;e.disabled=n,n?e.setAttribute("aria-disabled","true"):e.removeAttribute("aria-disabled");}),chunkWWEWRI6S_js.c(()=>{(typeof P=="function"?P():P)?(c&&(c.style.display="inline-block"),d&&(d.style.visibility="hidden"),C&&p&&(p.textContent=C),e.disabled=true,e.setAttribute("aria-busy","true")):(c&&(c.style.display="none"),d&&(d.style.visibility="visible"),typeof E=="string"&&p&&(p.textContent=E),e.removeAttribute("aria-busy"));}),H){let n=false,_=t=>{e.disabled||(n=true,e.classList.add("button-pressed"),s&&s(t));},U=t=>{n&&(n=false,e.classList.remove("button-pressed"),l&&l(t));},S=async t=>{if(e.disabled){t.preventDefault();return}try{await H(t);}catch(X){chunkGYDP6MFV_js.b(chunkGYDP6MFV_js.a.BUTTON_HANDLER_FAILED,void 0,X);}},W=t=>{e.disabled||((t.key==="Enter"||t.key===" ")&&(t.preventDefault(),n=true,e.classList.add("button-pressed"),s&&s(t)),M&&M(t));},q=t=>{e.disabled||(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),n=false,e.classList.remove("button-pressed"),l&&l(t),S(t));},R=()=>{n=false,e.classList.remove("button-pressed");};e.addEventListener("pointerdown",_),e.addEventListener("pointerup",U),e.addEventListener("click",S),e.addEventListener("keydown",W),e.addEventListener("keyup",q),e.addEventListener("pointercancel",R),chunkWWEWRI6S_js.d(()=>{e.removeEventListener("pointerdown",_),e.removeEventListener("pointerup",U),e.removeEventListener("click",S),e.removeEventListener("keydown",W),e.removeEventListener("keyup",q),e.removeEventListener("pointercancel",R);});}m&&(e.addEventListener("focus",m),chunkWWEWRI6S_js.d(()=>e.removeEventListener("focus",m))),L&&(e.addEventListener("blur",L),chunkWWEWRI6S_js.d(()=>e.removeEventListener("blur",L)));};let Q=[chunkQ7IWDVJ4_js.a("span",{class:"button-spinner","aria-hidden":"true",style:{display:"none"}}),chunkQ7IWDVJ4_js.a("span",{class:"button-content"},[k&&chunkQ7IWDVJ4_js.a("span",{class:"button-icon button-icon-left"},k),chunkQ7IWDVJ4_js.a("span",{class:"button-text"},E),D&&chunkQ7IWDVJ4_js.a("span",{class:"button-icon button-icon-right"},D)].filter(Boolean))];return chunkQ7IWDVJ4_js.a("button",o,Q)}function Y(u){let{icon:y,ariaLabel:a,className:v,...r}=u;return a||chunkGYDP6MFV_js.c(chunkGYDP6MFV_js.a.BUTTON_MISSING_ARIA_LABEL),j({...r,children:y,ariaLabel:a,className:`icon-button ${v||""}`})}exports.Button=j;exports.IconButton=Y;//# sourceMappingURL=ui.js.map
|
|
2
|
-
//# sourceMappingURL=ui.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/primitives/ui/Button.ts"],"names":["Button","props","type","variant","size","disabled","loading","fullWidth","children","leftIcon","rightIcon","loadingText","className","style","id","role","ariaLabel","ariaDescribedby","ariaExpanded","ariaPressed","ariaControls","onPress","onPressStart","onPressEnd","onFocus","onBlur","onKeyDown","classes","buttonProps","button","disabledSignal","state","loadingSignal","contentWrapper","loadingSpinner","textContent","effect","val","isPressing","handlePointerDown","e","handlePointerUp","handleClick","error","logError","ErrorCodes","handleKeyDown","handleKeyUp","handlePointerCancel","onCleanup","buttonChildren","f","IconButton","icon","logWarning"],"mappings":"6RAwFO,SAASA,CAAAA,CAAOC,CAAAA,CAA2B,CAChD,GAAM,CACJ,IAAA,CAAAC,CAAAA,CAAO,QAAA,CACP,OAAA,CAAAC,CAAAA,CAAU,SAAA,CACV,IAAA,CAAAC,CAAAA,CAAO,KACP,QAAA,CAAAC,CAAAA,CAAW,KAAA,CACX,OAAA,CAAAC,CAAAA,CAAU,KAAA,CACV,SAAA,CAAAC,CAAAA,CAAY,MACZ,QAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,UAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CAAc,YAAA,CACd,UAAAC,CAAAA,CAAY,EAAA,CACZ,KAAA,CAAAC,CAAAA,CACA,EAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,UAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,EACA,OAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,OAAAC,CAAAA,CACA,SAAA,CAAAC,CACF,CAAA,CAAIzB,EAGE0B,CAAAA,CAAU,CAAC,QAAA,CAAU,CAAA,OAAA,EAAUxB,CAAO,CAAA,CA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,KAAA,CAAO,CAAE,OAAA,CAAS,MAAO,CAC3B,CAAC,CAAA,CAEDA,kBAAAA,CACE,OACA,CAAE,KAAA,CAAO,gBAAiB,CAAA,CAC1B,CACE1C,CAAAA,EAAY0C,kBAAAA,CAAE,MAAA,CAAQ,CAAE,KAAA,CAAO,8BAA+B,CAAA,CAAG1C,CAAQ,EACzE0C,kBAAAA,CAAE,MAAA,CAAQ,CAAE,KAAA,CAAO,aAAc,CAAA,CAAG3C,CAAQ,CAAA,CAC5CE,GACAyC,kBAAAA,CAAE,MAAA,CAAQ,CAAE,KAAA,CAAO,+BAAgC,CAAA,CAAGzC,CAAS,CACjE,EAAE,MAAA,CAAO,OAAO,CAClB,CACF,EAEA,OAAOyC,kBAAAA,CAAE,QAAA,CAAUvB,CAAAA,CAAasB,CAAc,CAChD,CAUO,SAASE,CAAAA,CAAWnD,CAAAA,CAA2C,CACpE,GAAM,CAAE,KAAAoD,CAAAA,CAAM,SAAA,CAAArC,CAAAA,CAAW,SAAA,CAAAJ,EAAW,GAAGgB,CAAY,CAAA,CAAI3B,CAAAA,CAEvD,OAAKe,CAAAA,EACHsC,kBAAAA,CAAWT,kBAAAA,CAAW,yBAAyB,CAAA,CAG1C7C,CAAAA,CAAO,CACZ,GAAG4B,EACH,QAAA,CAAUyB,CAAAA,CACV,SAAA,CAAArC,CAAAA,CACA,UAAW,CAAA,YAAA,EAAeJ,CAAAA,EAAa,EAAE,CAAA,CAC3C,CAAC,CACH","file":"ui.js","sourcesContent":["/**\n * Button Component - Accessible button with unified touch/click handler\n *\n * Provides onPress handler that works consistently across mouse, touch, and keyboard\n * Includes full ARIA support and style props\n */\n\nimport { state, type StateValue } from '../../core/state'\nimport { onCleanup } from '../../core/effect'\nimport { effect } from '../../core/effect'\nimport { ErrorCodes, logError, logWarning } from '../../core/errors'\nimport { f } from '../../renderers/dom/f'\nimport type { FNode } from '../../core/renderer'\n\n/**\n * Button variants\n */\nexport type ButtonVariant =\n | 'primary'\n | 'secondary'\n | 'outline'\n | 'ghost'\n | 'danger'\n\n/**\n * Button sizes\n */\nexport type ButtonSize = 'sm' | 'md' | 'lg'\n\n/**\n * Button type attribute\n */\nexport type ButtonType = 'button' | 'submit' | 'reset'\n\n/**\n * Button component props\n */\nexport interface ButtonProps {\n type?: ButtonType\n variant?: ButtonVariant\n size?: ButtonSize\n disabled?: StateValue<boolean> | boolean\n loading?: StateValue<boolean> | boolean\n fullWidth?: boolean\n\n // Content\n children?: any\n leftIcon?: any\n rightIcon?: any\n loadingText?: string\n\n // Styling\n className?: string\n style?: Partial<CSSStyleDeclaration>\n\n // Accessibility\n id?: string\n role?: string\n ariaLabel?: string\n ariaDescribedby?: string\n ariaExpanded?: boolean\n ariaPressed?: boolean\n ariaControls?: string\n\n // Event handlers\n onPress?: (event: Event) => void | Promise<void>\n onPressStart?: (event: PointerEvent) => void\n onPressEnd?: (event: PointerEvent) => void\n onFocus?: (event: FocusEvent) => void\n onBlur?: (event: FocusEvent) => void\n onKeyDown?: (event: KeyboardEvent) => void\n}\n\n/**\n * Button component - Accessible button with unified touch/click handler\n *\n * @example\n * ```tsx\n * <Button variant=\"primary\" onPress={() => console.log('clicked')}>\n * Click me\n * </Button>\n *\n * const loading = signal(false)\n * <Button loading={loading} loadingText=\"Saving...\">\n * Save\n * </Button>\n * ```\n */\nexport function Button(props: ButtonProps): FNode {\n const {\n type = 'button',\n variant = 'primary',\n size = 'md',\n disabled = false,\n loading = false,\n fullWidth = false,\n children,\n leftIcon,\n rightIcon,\n loadingText = 'Loading...',\n className = '',\n style,\n id,\n role,\n ariaLabel,\n ariaDescribedby,\n ariaExpanded,\n ariaPressed,\n ariaControls,\n onPress,\n onPressStart,\n onPressEnd,\n onFocus,\n onBlur,\n onKeyDown,\n } = props\n\n // Build class names\n const classes = ['button', `button-${variant}`, `button-${size}`]\n if (fullWidth) classes.push('button-full-width')\n if (className) classes.push(className)\n\n // Build props for the button element\n const buttonProps: Record<string, any> = {\n type,\n class: classes.join(' '),\n style,\n }\n\n if (id) buttonProps.id = id\n if (role) buttonProps.role = role\n if (ariaLabel) buttonProps['aria-label'] = ariaLabel\n if (ariaDescribedby) buttonProps['aria-describedby'] = ariaDescribedby\n if (ariaExpanded !== undefined) buttonProps['aria-expanded'] = ariaExpanded\n if (ariaPressed !== undefined) buttonProps['aria-pressed'] = ariaPressed\n if (ariaControls) buttonProps['aria-controls'] = ariaControls\n\n // Add ref callback to set up reactive behavior\n buttonProps.ref = (button: HTMLButtonElement | null) => {\n if (!button) return\n\n // Convert disabled/loading to signals if needed\n const disabledSignal: StateValue<boolean> | boolean =\n typeof disabled === 'boolean' ? state(disabled)[0] : disabled\n const loadingSignal: StateValue<boolean> | boolean =\n typeof loading === 'boolean' ? state(loading)[0] : loading\n\n // Find content elements after mount\n const contentWrapper = button.querySelector('.button-content') as HTMLElement\n const loadingSpinner = button.querySelector('.button-spinner') as HTMLElement\n const textContent = button.querySelector('.button-text') as HTMLElement\n\n // Handle disabled state\n effect(() => {\n const val = typeof disabledSignal === 'function' ? (disabledSignal as StateValue<boolean>)() : disabledSignal\n button.disabled = val\n if (val) {\n button.setAttribute('aria-disabled', 'true')\n } else {\n button.removeAttribute('aria-disabled')\n }\n })\n\n // Handle loading state\n effect(() => {\n const isLoading = typeof loadingSignal === 'function' ? (loadingSignal as StateValue<boolean>)() : loadingSignal\n\n if (isLoading) {\n // Show spinner\n if (loadingSpinner) loadingSpinner.style.display = 'inline-block'\n if (contentWrapper) contentWrapper.style.visibility = 'hidden'\n\n // Update text for screen readers\n if (loadingText && textContent) {\n textContent.textContent = loadingText\n }\n\n // Disable button during loading\n button.disabled = true\n button.setAttribute('aria-busy', 'true')\n } else {\n // Hide spinner\n if (loadingSpinner) loadingSpinner.style.display = 'none'\n if (contentWrapper) contentWrapper.style.visibility = 'visible'\n\n // Restore original text\n if (typeof children === 'string' && textContent) {\n textContent.textContent = children\n }\n\n button.removeAttribute('aria-busy')\n }\n })\n\n // Unified press handler (works for mouse, touch, and keyboard)\n if (onPress) {\n let isPressing = false\n\n // Pointer down (mouse/touch start)\n const handlePointerDown = (e: PointerEvent) => {\n if (button.disabled) return\n\n isPressing = true\n button.classList.add('button-pressed')\n\n if (onPressStart) {\n onPressStart(e)\n }\n }\n\n // Pointer up (mouse/touch end)\n const handlePointerUp = (e: PointerEvent) => {\n if (!isPressing) return\n\n isPressing = false\n button.classList.remove('button-pressed')\n\n if (onPressEnd) {\n onPressEnd(e)\n }\n }\n\n // Click (fires after pointer up)\n const handleClick = async (e: Event) => {\n if (button.disabled) {\n e.preventDefault()\n return\n }\n\n try {\n await onPress(e)\n } catch (error) {\n logError(ErrorCodes.BUTTON_HANDLER_FAILED, undefined, error)\n }\n }\n\n // Keyboard (Enter/Space)\n const handleKeyDown = (e: KeyboardEvent) => {\n if (button.disabled) return\n\n // Enter or Space triggers press\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault()\n isPressing = true\n button.classList.add('button-pressed')\n\n if (onPressStart) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onPressStart(e as any)\n }\n }\n\n // Custom keydown handler\n if (onKeyDown) {\n onKeyDown(e)\n }\n }\n\n const handleKeyUp = (e: KeyboardEvent) => {\n if (button.disabled) return\n\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault()\n isPressing = false\n button.classList.remove('button-pressed')\n\n if (onPressEnd) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onPressEnd(e as any)\n }\n\n // Trigger press\n handleClick(e)\n }\n }\n\n // Pointer cancel (touch interrupted)\n const handlePointerCancel = () => {\n isPressing = false\n button.classList.remove('button-pressed')\n }\n\n button.addEventListener('pointerdown', handlePointerDown)\n button.addEventListener('pointerup', handlePointerUp)\n button.addEventListener('click', handleClick)\n button.addEventListener('keydown', handleKeyDown)\n button.addEventListener('keyup', handleKeyUp)\n button.addEventListener('pointercancel', handlePointerCancel)\n\n onCleanup(() => {\n button.removeEventListener('pointerdown', handlePointerDown)\n button.removeEventListener('pointerup', handlePointerUp)\n button.removeEventListener('click', handleClick)\n button.removeEventListener('keydown', handleKeyDown)\n button.removeEventListener('keyup', handleKeyUp)\n button.removeEventListener('pointercancel', handlePointerCancel)\n })\n }\n\n // Focus/blur handlers\n if (onFocus) {\n button.addEventListener('focus', onFocus)\n onCleanup(() => button.removeEventListener('focus', onFocus))\n }\n\n if (onBlur) {\n button.addEventListener('blur', onBlur)\n onCleanup(() => button.removeEventListener('blur', onBlur))\n }\n }\n\n // Build button content structure\n const buttonChildren = [\n // Loading spinner\n f('span', {\n class: 'button-spinner',\n 'aria-hidden': 'true',\n style: { display: 'none' },\n }),\n // Content wrapper with icons and text\n f(\n 'span',\n { class: 'button-content' },\n [\n leftIcon && f('span', { class: 'button-icon button-icon-left' }, leftIcon),\n f('span', { class: 'button-text' }, children),\n rightIcon &&\n f('span', { class: 'button-icon button-icon-right' }, rightIcon),\n ].filter(Boolean)\n ),\n ]\n\n return f('button', buttonProps, buttonChildren)\n}\n\n/**\n * IconButton component - Button with only an icon\n *\n * @example\n * ```tsx\n * <IconButton icon={<i class=\"icon-close\" />} ariaLabel=\"Close\" onPress={handleClose} />\n * ```\n */\nexport function IconButton(props: ButtonProps & { icon: any }): FNode {\n const { icon, ariaLabel, className, ...buttonProps } = props\n\n if (!ariaLabel) {\n logWarning(ErrorCodes.BUTTON_MISSING_ARIA_LABEL)\n }\n\n return Button({\n ...buttonProps,\n children: icon,\n ariaLabel,\n className: `icon-button ${className || ''}`,\n })\n}\n"]}
|