@tachui/primitives 0.8.0-alpha
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/LICENSE +363 -0
- package/README.md +458 -0
- package/dist/BasicInput-CWFHw9rL.js +390 -0
- package/dist/Divider-DWgDKavU.js +474 -0
- package/dist/HTML-aWcvQ0VC.js +321 -0
- package/dist/Picker-DrZ7ibdt.js +1675 -0
- package/dist/Text-DYyFBJ6i.js +165 -0
- package/dist/controls/Button.d.ts +250 -0
- package/dist/controls/Button.d.ts.map +1 -0
- package/dist/controls/Link.d.ts +365 -0
- package/dist/controls/Link.d.ts.map +1 -0
- package/dist/controls/Picker.d.ts +153 -0
- package/dist/controls/Picker.d.ts.map +1 -0
- package/dist/controls/Toggle.d.ts +207 -0
- package/dist/controls/Toggle.d.ts.map +1 -0
- package/dist/controls/index.d.ts +8 -0
- package/dist/controls/index.d.ts.map +1 -0
- package/dist/controls/index.js +18 -0
- package/dist/display/HTML.d.ts +120 -0
- package/dist/display/HTML.d.ts.map +1 -0
- package/dist/display/Image.d.ts +192 -0
- package/dist/display/Image.d.ts.map +1 -0
- package/dist/display/Text.d.ts +269 -0
- package/dist/display/Text.d.ts.map +1 -0
- package/dist/display/index.d.ts +7 -0
- package/dist/display/index.d.ts.map +1 -0
- package/dist/display/index.js +21 -0
- package/dist/forms/BasicForm.d.ts +141 -0
- package/dist/forms/BasicForm.d.ts.map +1 -0
- package/dist/forms/BasicInput.d.ts +116 -0
- package/dist/forms/BasicInput.d.ts.map +1 -0
- package/dist/forms/index.d.ts +6 -0
- package/dist/forms/index.d.ts.map +1 -0
- package/dist/forms/index.js +10 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +485 -0
- package/dist/layout/Divider.d.ts +168 -0
- package/dist/layout/Divider.d.ts.map +1 -0
- package/dist/layout/Spacer.d.ts +35 -0
- package/dist/layout/Spacer.d.ts.map +1 -0
- package/dist/layout/Stack.d.ts +74 -0
- package/dist/layout/Stack.d.ts.map +1 -0
- package/dist/layout/index.d.ts +7 -0
- package/dist/layout/index.d.ts.map +1 -0
- package/dist/layout/index.js +15 -0
- package/dist/validation.d.ts +91 -0
- package/dist/validation.d.ts.map +1 -0
- package/package.json +82 -0
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enhanced Toggle Component (Phase 6.4.5)
|
|
3
|
+
*
|
|
4
|
+
* SwiftUI-inspired Toggle component with switch-style boolean controls,
|
|
5
|
+
* smooth animations, and multiple style variants.
|
|
6
|
+
*/
|
|
7
|
+
import type { ModifiableComponent, ModifierBuilder } from '@tachui/core';
|
|
8
|
+
import type { Signal } from '@tachui/core';
|
|
9
|
+
import type { ComponentInstance, ComponentProps, DOMNode } from '@tachui/core';
|
|
10
|
+
/**
|
|
11
|
+
* Toggle component properties
|
|
12
|
+
*/
|
|
13
|
+
export interface ToggleProps extends ComponentProps {
|
|
14
|
+
isOn: boolean | Signal<boolean>;
|
|
15
|
+
onToggle?: (isOn: boolean) => void;
|
|
16
|
+
label?: string | (() => string) | Signal<string> | ComponentInstance;
|
|
17
|
+
variant?: 'switch' | 'checkbox' | 'button';
|
|
18
|
+
size?: 'small' | 'medium' | 'large';
|
|
19
|
+
color?: string;
|
|
20
|
+
offColor?: string;
|
|
21
|
+
thumbColor?: string;
|
|
22
|
+
disabled?: boolean | Signal<boolean>;
|
|
23
|
+
animated?: boolean;
|
|
24
|
+
labelPosition?: 'leading' | 'trailing';
|
|
25
|
+
spacing?: number;
|
|
26
|
+
accessibilityLabel?: string;
|
|
27
|
+
accessibilityHint?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Enhanced Toggle component class
|
|
31
|
+
*/
|
|
32
|
+
export declare class EnhancedToggle implements ComponentInstance<ToggleProps> {
|
|
33
|
+
props: ToggleProps;
|
|
34
|
+
readonly type: "component";
|
|
35
|
+
readonly id: string;
|
|
36
|
+
mounted: boolean;
|
|
37
|
+
cleanup: (() => void)[];
|
|
38
|
+
private toggleElement;
|
|
39
|
+
private setIsAnimating;
|
|
40
|
+
constructor(props: ToggleProps);
|
|
41
|
+
/**
|
|
42
|
+
* Get current toggle state
|
|
43
|
+
*/
|
|
44
|
+
private getIsOn;
|
|
45
|
+
/**
|
|
46
|
+
* Check if toggle is disabled
|
|
47
|
+
*/
|
|
48
|
+
private isDisabled;
|
|
49
|
+
/**
|
|
50
|
+
* Resolve label content
|
|
51
|
+
*/
|
|
52
|
+
private resolveLabel;
|
|
53
|
+
/**
|
|
54
|
+
* Helper to render component content safely
|
|
55
|
+
*/
|
|
56
|
+
private renderComponentContent;
|
|
57
|
+
/**
|
|
58
|
+
* Handle toggle change
|
|
59
|
+
*/
|
|
60
|
+
private handleToggle;
|
|
61
|
+
/**
|
|
62
|
+
* Get toggle size styles
|
|
63
|
+
*/
|
|
64
|
+
private getSizeStyles;
|
|
65
|
+
/**
|
|
66
|
+
* Render switch variant
|
|
67
|
+
*/
|
|
68
|
+
private renderSwitch;
|
|
69
|
+
/**
|
|
70
|
+
* Render checkbox variant
|
|
71
|
+
*/
|
|
72
|
+
private renderCheckbox;
|
|
73
|
+
/**
|
|
74
|
+
* Render button variant
|
|
75
|
+
*/
|
|
76
|
+
private renderButton;
|
|
77
|
+
/**
|
|
78
|
+
* Render toggle control based on variant
|
|
79
|
+
*/
|
|
80
|
+
private renderToggleControl;
|
|
81
|
+
/**
|
|
82
|
+
* Render label content
|
|
83
|
+
*/
|
|
84
|
+
private renderLabel;
|
|
85
|
+
render(): DOMNode;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Toggle component function
|
|
89
|
+
*/
|
|
90
|
+
export declare function Toggle(isOn: boolean | Signal<boolean>, props?: Omit<ToggleProps, 'isOn'>): ModifiableComponent<ToggleProps> & {
|
|
91
|
+
modifier: ModifierBuilder<ModifiableComponent<ToggleProps>>;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Toggle with label
|
|
95
|
+
*/
|
|
96
|
+
export declare function ToggleWithLabel(label: string | (() => string) | Signal<string> | ComponentInstance, isOn: boolean | Signal<boolean>, props?: Omit<ToggleProps, 'isOn' | 'label'>): ModifiableComponent<ToggleProps> & {
|
|
97
|
+
modifier: ModifierBuilder<ModifiableComponent<ToggleProps>>;
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* Toggle style variants
|
|
101
|
+
*/
|
|
102
|
+
export declare const ToggleStyles: {
|
|
103
|
+
/**
|
|
104
|
+
* Switch toggle (default)
|
|
105
|
+
*/
|
|
106
|
+
Switch(isOn: boolean | Signal<boolean>, props?: Omit<ToggleProps, "isOn" | "variant">): ModifiableComponent<ToggleProps> & {
|
|
107
|
+
modifier: ModifierBuilder<ModifiableComponent<ToggleProps>>;
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* Checkbox toggle
|
|
111
|
+
*/
|
|
112
|
+
Checkbox(isOn: boolean | Signal<boolean>, props?: Omit<ToggleProps, "isOn" | "variant">): ModifiableComponent<ToggleProps> & {
|
|
113
|
+
modifier: ModifierBuilder<ModifiableComponent<ToggleProps>>;
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* Button toggle
|
|
117
|
+
*/
|
|
118
|
+
Button(isOn: boolean | Signal<boolean>, props?: Omit<ToggleProps, "isOn" | "variant">): ModifiableComponent<ToggleProps> & {
|
|
119
|
+
modifier: ModifierBuilder<ModifiableComponent<ToggleProps>>;
|
|
120
|
+
};
|
|
121
|
+
/**
|
|
122
|
+
* Small toggle
|
|
123
|
+
*/
|
|
124
|
+
Small(isOn: boolean | Signal<boolean>, props?: Omit<ToggleProps, "isOn" | "size">): ModifiableComponent<ToggleProps> & {
|
|
125
|
+
modifier: ModifierBuilder<ModifiableComponent<ToggleProps>>;
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* Large toggle
|
|
129
|
+
*/
|
|
130
|
+
Large(isOn: boolean | Signal<boolean>, props?: Omit<ToggleProps, "isOn" | "size">): ModifiableComponent<ToggleProps> & {
|
|
131
|
+
modifier: ModifierBuilder<ModifiableComponent<ToggleProps>>;
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* Custom color toggle
|
|
135
|
+
*/
|
|
136
|
+
CustomColor(isOn: boolean | Signal<boolean>, color: string, props?: Omit<ToggleProps, "isOn" | "color">): ModifiableComponent<ToggleProps> & {
|
|
137
|
+
modifier: ModifierBuilder<ModifiableComponent<ToggleProps>>;
|
|
138
|
+
};
|
|
139
|
+
/**
|
|
140
|
+
* Toggle with leading label
|
|
141
|
+
*/
|
|
142
|
+
WithLeadingLabel(label: string | (() => string) | Signal<string> | ComponentInstance, isOn: boolean | Signal<boolean>, props?: Omit<ToggleProps, "isOn" | "label" | "labelPosition">): ModifiableComponent<ToggleProps> & {
|
|
143
|
+
modifier: ModifierBuilder<ModifiableComponent<ToggleProps>>;
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* Toggle with trailing label (default)
|
|
147
|
+
*/
|
|
148
|
+
WithTrailingLabel(label: string | (() => string) | Signal<string> | ComponentInstance, isOn: boolean | Signal<boolean>, props?: Omit<ToggleProps, "isOn" | "label" | "labelPosition">): ModifiableComponent<ToggleProps> & {
|
|
149
|
+
modifier: ModifierBuilder<ModifiableComponent<ToggleProps>>;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* Toggle utilities
|
|
154
|
+
*/
|
|
155
|
+
export declare const ToggleUtils: {
|
|
156
|
+
/**
|
|
157
|
+
* Create a toggle group with multiple options
|
|
158
|
+
*/
|
|
159
|
+
createGroup(options: Array<{
|
|
160
|
+
key: string;
|
|
161
|
+
label: string;
|
|
162
|
+
isOn: boolean | Signal<boolean>;
|
|
163
|
+
onToggle?: (isOn: boolean) => void;
|
|
164
|
+
}>, props?: Omit<ToggleProps, "isOn" | "label" | "onToggle">): (ModifiableComponent<ToggleProps> & {
|
|
165
|
+
modifier: ModifierBuilder<ModifiableComponent<ToggleProps>>;
|
|
166
|
+
})[];
|
|
167
|
+
/**
|
|
168
|
+
* Create exclusive toggle group (radio-like behavior)
|
|
169
|
+
*/
|
|
170
|
+
createExclusiveGroup(options: Array<{
|
|
171
|
+
key: string;
|
|
172
|
+
label: string;
|
|
173
|
+
}>, selectedKey: string | Signal<string>, onSelectionChange?: (key: string) => void, props?: Omit<ToggleProps, "isOn" | "label" | "onToggle">): (ModifiableComponent<ToggleProps> & {
|
|
174
|
+
modifier: ModifierBuilder<ModifiableComponent<ToggleProps>>;
|
|
175
|
+
})[];
|
|
176
|
+
/**
|
|
177
|
+
* Batch toggle operations
|
|
178
|
+
*/
|
|
179
|
+
batch: {
|
|
180
|
+
/**
|
|
181
|
+
* Toggle all items in a group
|
|
182
|
+
*/
|
|
183
|
+
toggleAll(toggles: Array<{
|
|
184
|
+
isOn: boolean | Signal<boolean>;
|
|
185
|
+
onToggle?: (isOn: boolean) => void;
|
|
186
|
+
}>, newState: boolean): void;
|
|
187
|
+
/**
|
|
188
|
+
* Get state of all toggles in a group
|
|
189
|
+
*/
|
|
190
|
+
getStates(toggles: Array<{
|
|
191
|
+
isOn: boolean | Signal<boolean>;
|
|
192
|
+
}>): boolean[];
|
|
193
|
+
/**
|
|
194
|
+
* Check if all toggles are on
|
|
195
|
+
*/
|
|
196
|
+
allOn(toggles: Array<{
|
|
197
|
+
isOn: boolean | Signal<boolean>;
|
|
198
|
+
}>): boolean;
|
|
199
|
+
/**
|
|
200
|
+
* Check if any toggle is on
|
|
201
|
+
*/
|
|
202
|
+
anyOn(toggles: Array<{
|
|
203
|
+
isOn: boolean | Signal<boolean>;
|
|
204
|
+
}>): boolean;
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
//# sourceMappingURL=Toggle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toggle.d.ts","sourceRoot":"","sources":["../../src/controls/Toggle.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;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AC,OAAO,CAAC,CAAA;SAAE,CAAC,GAAG,OAAO,EAAE;QASzE;;WAEG;uBACY,KAAK,CAAC;YAAE,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,CAAA;SAAE,CAAC,GAAG,OAAO;QAInE;;WAEG;uBACY,KAAK,CAAC;YAAE,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,CAAA;SAAE,CAAC,GAAG,OAAO;;CAItE,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Control Components
|
|
3
|
+
*/
|
|
4
|
+
export { Button, EnhancedButton, ButtonStyles, defaultButtonTheme, type ButtonProps, type ButtonRole, type ButtonSize, type ButtonState, type ButtonTheme, type ButtonVariant, } from './Button';
|
|
5
|
+
export { Link, LinkUtils, type EnhancedLinkProps, type OpenURLAction, } from './Link';
|
|
6
|
+
export { Toggle, EnhancedToggle, ToggleStyles, ToggleUtils, ToggleWithLabel, type ToggleProps, } from './Toggle';
|
|
7
|
+
export { Picker, EnhancedPicker, PickerStyles, PickerUtils, type PickerOption, type PickerProps, } from './Picker';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/controls/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,MAAM,EACN,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,aAAa,GACnB,MAAM,UAAU,CAAA;AAEjB,OAAO,EACL,IAAI,EACJ,SAAS,EACT,KAAK,iBAAiB,EACtB,KAAK,aAAa,GACnB,MAAM,QAAQ,CAAA;AAEf,OAAO,EACL,MAAM,EACN,cAAc,EACd,YAAY,EACZ,WAAW,EACX,eAAe,EACf,KAAK,WAAW,GACjB,MAAM,UAAU,CAAA;AAEjB,OAAO,EACL,MAAM,EACN,cAAc,EACd,YAAY,EACZ,WAAW,EACX,KAAK,YAAY,EACjB,KAAK,WAAW,GACjB,MAAM,UAAU,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { B as s, a as t, E as l, h as n, c as g, L as i, b as o, P as c, i as T, j as h, T as k, e as r, f as d, g as u, d as B } from "../Picker-DrZ7ibdt.js";
|
|
2
|
+
export {
|
|
3
|
+
s as Button,
|
|
4
|
+
t as ButtonStyles,
|
|
5
|
+
l as EnhancedButton,
|
|
6
|
+
n as EnhancedPicker,
|
|
7
|
+
g as EnhancedToggle,
|
|
8
|
+
i as Link,
|
|
9
|
+
o as LinkUtils,
|
|
10
|
+
c as Picker,
|
|
11
|
+
T as PickerStyles,
|
|
12
|
+
h as PickerUtils,
|
|
13
|
+
k as Toggle,
|
|
14
|
+
r as ToggleStyles,
|
|
15
|
+
d as ToggleUtils,
|
|
16
|
+
u as ToggleWithLabel,
|
|
17
|
+
B as defaultButtonTheme
|
|
18
|
+
};
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Simple HTML Element Components
|
|
3
|
+
*
|
|
4
|
+
* Basic HTML element wrappers with modifier support for simple use cases.
|
|
5
|
+
* For enhanced SwiftUI-style components with advanced features,
|
|
6
|
+
* use the main component exports (Button, Image, Text, etc.).
|
|
7
|
+
*/
|
|
8
|
+
import type { ComponentProps } from '@tachui/core';
|
|
9
|
+
/**
|
|
10
|
+
* Simple HTML element wrappers with modifier support
|
|
11
|
+
*
|
|
12
|
+
* These are basic HTML element wrappers for simple use cases.
|
|
13
|
+
* For enhanced SwiftUI-style components with advanced features,
|
|
14
|
+
* use the main component exports (Button, Image, Text, etc.).
|
|
15
|
+
*/
|
|
16
|
+
export declare const HTML: {
|
|
17
|
+
/**
|
|
18
|
+
* Create a div element with modifier support
|
|
19
|
+
*/
|
|
20
|
+
div: (props?: {
|
|
21
|
+
children?: any;
|
|
22
|
+
}) => import("@tachui/core").ModifiableComponent<ComponentProps> & {
|
|
23
|
+
modifier: import("@tachui/core").ModifierBuilder<import("@tachui/core").ModifiableComponent<ComponentProps>>;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Create a span element with modifier support
|
|
27
|
+
*/
|
|
28
|
+
span: (props?: {
|
|
29
|
+
children?: any;
|
|
30
|
+
}) => import("@tachui/core").ModifiableComponent<ComponentProps> & {
|
|
31
|
+
modifier: import("@tachui/core").ModifierBuilder<import("@tachui/core").ModifiableComponent<ComponentProps>>;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Create a paragraph element with modifier support
|
|
35
|
+
*/
|
|
36
|
+
p: (props?: {
|
|
37
|
+
children?: any;
|
|
38
|
+
}) => import("@tachui/core").ModifiableComponent<ComponentProps> & {
|
|
39
|
+
modifier: import("@tachui/core").ModifierBuilder<import("@tachui/core").ModifiableComponent<ComponentProps>>;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Create a button element with modifier support
|
|
43
|
+
*
|
|
44
|
+
* Note: For enhanced button features (press states, variants, accessibility),
|
|
45
|
+
* use the main Button component instead.
|
|
46
|
+
*/
|
|
47
|
+
button: (props?: {
|
|
48
|
+
children?: any;
|
|
49
|
+
onClick?: () => void;
|
|
50
|
+
}) => import("@tachui/core").ModifiableComponent<ComponentProps> & {
|
|
51
|
+
modifier: import("@tachui/core").ModifierBuilder<import("@tachui/core").ModifiableComponent<ComponentProps>>;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Create an input element with modifier support
|
|
55
|
+
*/
|
|
56
|
+
input: (props?: {
|
|
57
|
+
type?: string;
|
|
58
|
+
value?: string;
|
|
59
|
+
placeholder?: string;
|
|
60
|
+
onChange?: (value: string) => void;
|
|
61
|
+
}) => import("@tachui/core").ModifiableComponent<ComponentProps> & {
|
|
62
|
+
modifier: import("@tachui/core").ModifierBuilder<import("@tachui/core").ModifiableComponent<ComponentProps>>;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Create an image element with modifier support
|
|
66
|
+
*
|
|
67
|
+
* Note: For enhanced image features (loading states, content modes, progressive loading),
|
|
68
|
+
* use the main Image component instead.
|
|
69
|
+
*/
|
|
70
|
+
img: (props: {
|
|
71
|
+
src: string;
|
|
72
|
+
alt?: string;
|
|
73
|
+
width?: number | string;
|
|
74
|
+
height?: number | string;
|
|
75
|
+
}) => import("@tachui/core").ModifiableComponent<ComponentProps> & {
|
|
76
|
+
modifier: import("@tachui/core").ModifierBuilder<import("@tachui/core").ModifiableComponent<ComponentProps>>;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Create a heading element with modifier support
|
|
80
|
+
*/
|
|
81
|
+
heading: (level: 1 | 2 | 3 | 4 | 5 | 6) => (props?: {
|
|
82
|
+
children?: any;
|
|
83
|
+
}) => import("@tachui/core").ModifiableComponent<ComponentProps> & {
|
|
84
|
+
modifier: import("@tachui/core").ModifierBuilder<import("@tachui/core").ModifiableComponent<ComponentProps>>;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Shorthand for heading elements
|
|
89
|
+
*/
|
|
90
|
+
export declare const H1: (props?: {
|
|
91
|
+
children?: any;
|
|
92
|
+
}) => import("@tachui/core").ModifiableComponent<ComponentProps> & {
|
|
93
|
+
modifier: import("@tachui/core").ModifierBuilder<import("@tachui/core").ModifiableComponent<ComponentProps>>;
|
|
94
|
+
};
|
|
95
|
+
export declare const H2: (props?: {
|
|
96
|
+
children?: any;
|
|
97
|
+
}) => import("@tachui/core").ModifiableComponent<ComponentProps> & {
|
|
98
|
+
modifier: import("@tachui/core").ModifierBuilder<import("@tachui/core").ModifiableComponent<ComponentProps>>;
|
|
99
|
+
};
|
|
100
|
+
export declare const H3: (props?: {
|
|
101
|
+
children?: any;
|
|
102
|
+
}) => import("@tachui/core").ModifiableComponent<ComponentProps> & {
|
|
103
|
+
modifier: import("@tachui/core").ModifierBuilder<import("@tachui/core").ModifiableComponent<ComponentProps>>;
|
|
104
|
+
};
|
|
105
|
+
export declare const H4: (props?: {
|
|
106
|
+
children?: any;
|
|
107
|
+
}) => import("@tachui/core").ModifiableComponent<ComponentProps> & {
|
|
108
|
+
modifier: import("@tachui/core").ModifierBuilder<import("@tachui/core").ModifiableComponent<ComponentProps>>;
|
|
109
|
+
};
|
|
110
|
+
export declare const H5: (props?: {
|
|
111
|
+
children?: any;
|
|
112
|
+
}) => import("@tachui/core").ModifiableComponent<ComponentProps> & {
|
|
113
|
+
modifier: import("@tachui/core").ModifierBuilder<import("@tachui/core").ModifiableComponent<ComponentProps>>;
|
|
114
|
+
};
|
|
115
|
+
export declare const H6: (props?: {
|
|
116
|
+
children?: any;
|
|
117
|
+
}) => import("@tachui/core").ModifiableComponent<ComponentProps> & {
|
|
118
|
+
modifier: import("@tachui/core").ModifierBuilder<import("@tachui/core").ModifiableComponent<ComponentProps>>;
|
|
119
|
+
};
|
|
120
|
+
//# sourceMappingURL=HTML.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HTML.d.ts","sourceRoot":"","sources":["../../src/display/HTML.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAqB,cAAc,EAAE,MAAM,cAAc,CAAA;AA4BrE;;;;;;GAMG;AACH,eAAO,MAAM,IAAI;IACf;;OAEG;kBACU;QAAE,QAAQ,CAAC,EAAE,GAAG,CAAA;KAAE;;;IAS/B;;OAEG;mBACW;QAAE,QAAQ,CAAC,EAAE,GAAG,CAAA;KAAE;;;IAShC;;OAEG;gBACQ;QAAE,QAAQ,CAAC,EAAE,GAAG,CAAA;KAAE;;;IAS7B;;;;;OAKG;qBACa;QAAE,QAAQ,CAAC,EAAE,GAAG,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;KAAE;;;IAsBxD;;OAEG;oBAEM;QACL,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;KACnC;;;IAcH;;;;;OAKG;iBACU;QACX,GAAG,EAAE,MAAM,CAAA;QACX,GAAG,CAAC,EAAE,MAAM,CAAA;QACZ,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;QACvB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KACzB;;;IAUD;;OAEG;qBAEO,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,MAC5B,QAAO;QAAE,QAAQ,CAAC,EAAE,GAAG,CAAA;KAAO;;;CAQlC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,EAAE,WAbH;IAAE,QAAQ,CAAC,EAAE,GAAG,CAAA;CAAE;;CAaG,CAAA;AACjC,eAAO,MAAM,EAAE,WAdH;IAAE,QAAQ,CAAC,EAAE,GAAG,CAAA;CAAE;;CAcG,CAAA;AACjC,eAAO,MAAM,EAAE,WAfH;IAAE,QAAQ,CAAC,EAAE,GAAG,CAAA;CAAE;;CAeG,CAAA;AACjC,eAAO,MAAM,EAAE,WAhBH;IAAE,QAAQ,CAAC,EAAE,GAAG,CAAA;CAAE;;CAgBG,CAAA;AACjC,eAAO,MAAM,EAAE,WAjBH;IAAE,QAAQ,CAAC,EAAE,GAAG,CAAA;CAAE;;CAiBG,CAAA;AACjC,eAAO,MAAM,EAAE,WAlBH;IAAE,QAAQ,CAAC,EAAE,GAAG,CAAA;CAAE;;CAkBG,CAAA"}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enhanced Image Component (Phase 5.4)
|
|
3
|
+
*
|
|
4
|
+
* SwiftUI-inspired Image component with loading states, error handling,
|
|
5
|
+
* responsive sizing, and advanced image handling capabilities.
|
|
6
|
+
*/
|
|
7
|
+
import type { ModifiableComponent, ModifierBuilder } from '@tachui/core';
|
|
8
|
+
import type { Signal } from '@tachui/core';
|
|
9
|
+
import type { ComponentInstance, ComponentProps } from '@tachui/core';
|
|
10
|
+
import { ImageAsset } from '@tachui/core';
|
|
11
|
+
import type { Concatenatable, ComponentSegment } from '@tachui/core';
|
|
12
|
+
import { ConcatenatedComponent } from '@tachui/core';
|
|
13
|
+
import { type ElementOverrideProps } from '@tachui/core';
|
|
14
|
+
import { ComponentWithCSSClasses, type CSSClassesProps } from '@tachui/core';
|
|
15
|
+
/**
|
|
16
|
+
* Image loading state
|
|
17
|
+
*/
|
|
18
|
+
export type ImageLoadingState = 'idle' | 'loading' | 'loaded' | 'error';
|
|
19
|
+
/**
|
|
20
|
+
* Image content mode (how image fits within bounds)
|
|
21
|
+
*/
|
|
22
|
+
export type ImageContentMode = 'fit' | 'fill' | 'stretch' | 'center' | 'scaleDown';
|
|
23
|
+
/**
|
|
24
|
+
* Image resize mode for different screen densities
|
|
25
|
+
*/
|
|
26
|
+
export type ImageResizeMode = 'cover' | 'contain' | 'fill' | 'none';
|
|
27
|
+
/**
|
|
28
|
+
* Image loading strategy
|
|
29
|
+
*/
|
|
30
|
+
export type ImageLoadingStrategy = 'eager' | 'lazy';
|
|
31
|
+
/**
|
|
32
|
+
* Image component properties with element override support and CSS classes
|
|
33
|
+
*/
|
|
34
|
+
export interface ImageProps extends ComponentProps, ElementOverrideProps, CSSClassesProps {
|
|
35
|
+
src?: string | Signal<string> | ImageAsset;
|
|
36
|
+
srcSet?: string | Signal<string>;
|
|
37
|
+
alt?: string | Signal<string>;
|
|
38
|
+
width?: number | string | Signal<number | string>;
|
|
39
|
+
height?: number | string | Signal<number | string>;
|
|
40
|
+
aspectRatio?: number | Signal<number>;
|
|
41
|
+
contentMode?: ImageContentMode;
|
|
42
|
+
resizeMode?: ImageResizeMode;
|
|
43
|
+
loadingStrategy?: ImageLoadingStrategy;
|
|
44
|
+
placeholder?: string | ComponentInstance;
|
|
45
|
+
errorPlaceholder?: string | ComponentInstance;
|
|
46
|
+
loadingState?: Signal<ImageLoadingState>;
|
|
47
|
+
onLoadingStateChange?: (state: ImageLoadingState) => void;
|
|
48
|
+
onLoad?: (event: Event) => void;
|
|
49
|
+
onError?: (event: Event) => void;
|
|
50
|
+
onLoadStart?: () => void;
|
|
51
|
+
crossOrigin?: 'anonymous' | 'use-credentials';
|
|
52
|
+
decoding?: 'sync' | 'async' | 'auto';
|
|
53
|
+
fetchPriority?: 'high' | 'low' | 'auto';
|
|
54
|
+
accessibilityLabel?: string;
|
|
55
|
+
accessibilityRole?: string;
|
|
56
|
+
blur?: number | Signal<number>;
|
|
57
|
+
opacity?: number | Signal<number>;
|
|
58
|
+
grayscale?: boolean | Signal<boolean>;
|
|
59
|
+
sepia?: boolean | Signal<boolean>;
|
|
60
|
+
lowQualitySrc?: string;
|
|
61
|
+
highQualitySrc?: string;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Enhanced Image component class with element override support and CSS classes
|
|
65
|
+
*/
|
|
66
|
+
export declare class EnhancedImage extends ComponentWithCSSClasses implements ComponentInstance<ImageProps>, Concatenatable<ImageProps> {
|
|
67
|
+
props: ImageProps;
|
|
68
|
+
readonly type: "component";
|
|
69
|
+
readonly id: string;
|
|
70
|
+
mounted: boolean;
|
|
71
|
+
cleanup: (() => void)[];
|
|
72
|
+
private effectiveTag;
|
|
73
|
+
private validationResult;
|
|
74
|
+
private loadingStateSignal;
|
|
75
|
+
private setLoadingState;
|
|
76
|
+
/**
|
|
77
|
+
* Set loading state and notify callback
|
|
78
|
+
*/
|
|
79
|
+
private setLoadingStateWithCallback;
|
|
80
|
+
constructor(props: ImageProps);
|
|
81
|
+
/**
|
|
82
|
+
* Render the image component with reactive content handling
|
|
83
|
+
*/
|
|
84
|
+
render(): import("@tachui/core").DOMNode | import("@tachui/core").DOMNode[];
|
|
85
|
+
/**
|
|
86
|
+
* Set up ImageAsset reactivity for a real DOM element (called from onDOMReady)
|
|
87
|
+
*/
|
|
88
|
+
private setupImageAssetReactivityForDOMElement;
|
|
89
|
+
/**
|
|
90
|
+
* Concatenate this image with another concatenatable component
|
|
91
|
+
*/
|
|
92
|
+
concat<U extends Concatenatable<any>>(other: U): ConcatenatedComponent<ImageProps | U>;
|
|
93
|
+
/**
|
|
94
|
+
* Convert this image to a segment for concatenation
|
|
95
|
+
*/
|
|
96
|
+
toSegment(): ComponentSegment;
|
|
97
|
+
/**
|
|
98
|
+
* Check if this component supports concatenation
|
|
99
|
+
*/
|
|
100
|
+
isConcatenatable(): boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Determine accessibility role for concatenation
|
|
103
|
+
*/
|
|
104
|
+
private determineAccessibilityRole;
|
|
105
|
+
/**
|
|
106
|
+
* Merge accessibility roles when combining components
|
|
107
|
+
*/
|
|
108
|
+
private mergeAccessibilityRoles;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Create enhanced Image component with modifier support and SwiftUI-style shorthands
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* ```typescript
|
|
115
|
+
* // Using aspectRatio modifier
|
|
116
|
+
* Image('photo.jpg')
|
|
117
|
+
* .aspectRatio(16/9, 'fit')
|
|
118
|
+
*
|
|
119
|
+
* // Using SwiftUI-style shorthands
|
|
120
|
+
* Image('photo.jpg')
|
|
121
|
+
* .scaledToFit() // Same as aspectRatio(undefined, 'fit')
|
|
122
|
+
*
|
|
123
|
+
* Image('photo.jpg')
|
|
124
|
+
* .scaledToFill() // Same as aspectRatio(undefined, 'fill')
|
|
125
|
+
* ```
|
|
126
|
+
*/
|
|
127
|
+
/**
|
|
128
|
+
* Extended Image component interface with SwiftUI-style shorthands
|
|
129
|
+
*/
|
|
130
|
+
export interface ImageWithShorthands extends ModifiableComponent<ImageProps> {
|
|
131
|
+
modifier: ModifierBuilder<ModifiableComponent<ImageProps>>;
|
|
132
|
+
scaledToFit(): ImageWithShorthands;
|
|
133
|
+
scaledToFill(): ImageWithShorthands;
|
|
134
|
+
}
|
|
135
|
+
export declare function Image(src: string | Signal<string> | ImageAsset, props?: Omit<ImageProps, 'src'>): ImageWithShorthands;
|
|
136
|
+
/**
|
|
137
|
+
* Image loading states for external use
|
|
138
|
+
*/
|
|
139
|
+
export declare const ImageStates: {
|
|
140
|
+
idle: "idle";
|
|
141
|
+
loading: "loading";
|
|
142
|
+
loaded: "loaded";
|
|
143
|
+
error: "error";
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* Image content modes for external use
|
|
147
|
+
*/
|
|
148
|
+
export declare const ImageContentModes: {
|
|
149
|
+
fit: "fit";
|
|
150
|
+
fill: "fill";
|
|
151
|
+
stretch: "stretch";
|
|
152
|
+
center: "center";
|
|
153
|
+
scaleDown: "scaleDown";
|
|
154
|
+
};
|
|
155
|
+
/**
|
|
156
|
+
* Image utility functions
|
|
157
|
+
*
|
|
158
|
+
* These utilities work seamlessly with the new scaledTo* shorthands:
|
|
159
|
+
*
|
|
160
|
+
* @example
|
|
161
|
+
* ```typescript
|
|
162
|
+
* // Combine utilities with shorthands
|
|
163
|
+
* ImageUtils.responsive([...])
|
|
164
|
+
* .scaledToFit()
|
|
165
|
+
* .frame(200, 200)
|
|
166
|
+
* ```
|
|
167
|
+
*/
|
|
168
|
+
export declare const ImageUtils: {
|
|
169
|
+
/**
|
|
170
|
+
* Create a responsive image with multiple sources
|
|
171
|
+
*/
|
|
172
|
+
responsive(sources: {
|
|
173
|
+
src: string;
|
|
174
|
+
width?: number;
|
|
175
|
+
media?: string;
|
|
176
|
+
}[], fallbackSrc: string, props?: Omit<ImageProps, "src" | "srcSet">): ModifiableComponent<ImageProps> & {
|
|
177
|
+
modifier: ModifierBuilder<ModifiableComponent<ImageProps>>;
|
|
178
|
+
};
|
|
179
|
+
/**
|
|
180
|
+
* Create an image with progressive loading
|
|
181
|
+
*/
|
|
182
|
+
progressive(lowQualitySrc: string, highQualitySrc: string, props?: Omit<ImageProps, "src" | "lowQualitySrc" | "highQualitySrc">): ModifiableComponent<ImageProps> & {
|
|
183
|
+
modifier: ModifierBuilder<ModifiableComponent<ImageProps>>;
|
|
184
|
+
};
|
|
185
|
+
/**
|
|
186
|
+
* Create an image with loading placeholder
|
|
187
|
+
*/
|
|
188
|
+
withPlaceholder(src: string | Signal<string>, placeholderSrc: string, props?: Omit<ImageProps, "src" | "placeholder">): ModifiableComponent<ImageProps> & {
|
|
189
|
+
modifier: ModifierBuilder<ModifiableComponent<ImageProps>>;
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
//# sourceMappingURL=Image.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../src/display/Image.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAExE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAE1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAErE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAIzC,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAEjB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,EAA0B,KAAK,oBAAoB,EAAE,MAAM,cAAc,CAAA;AAChF,OAAO,EAAE,uBAAuB,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAA;AAG5E;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAA;AAEvE;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACxB,KAAK,GACL,MAAM,GACN,SAAS,GACT,QAAQ,GACR,WAAW,CAAA;AAEf;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,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