@adia-ai/web-components 0.4.5 → 0.4.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 +63 -24
- package/USAGE.md +584 -0
- package/components/calendar-picker/calendar-picker.d.ts +27 -0
- package/components/check/check.d.ts +30 -0
- package/components/code/code.d.ts +39 -0
- package/components/color-picker/color-picker.d.ts +37 -0
- package/components/index.js +1 -0
- package/components/input/input.d.ts +61 -0
- package/components/option-card/option-card.d.ts +30 -0
- package/components/otp-input/otp-input.d.ts +25 -0
- package/components/pane/pane.css +10 -0
- package/components/pane/pane.js +28 -4
- package/components/radio/radio.d.ts +28 -0
- package/components/range/range.d.ts +31 -0
- package/components/rating/rating.d.ts +33 -0
- package/components/search/search.d.ts +35 -0
- package/components/segmented/segmented.d.ts +24 -0
- package/components/select/select.d.ts +57 -0
- package/components/slider/slider.d.ts +31 -0
- package/components/switch/switch.d.ts +30 -0
- package/components/textarea/textarea.d.ts +31 -0
- package/components/toggle-scheme/toggle-scheme.a2ui.json +197 -0
- package/components/toggle-scheme/toggle-scheme.css +20 -0
- package/components/toggle-scheme/toggle-scheme.js +277 -0
- package/components/toggle-scheme/toggle-scheme.yaml +173 -0
- package/components/upload/upload.d.ts +27 -0
- package/core/element.d.ts +174 -0
- package/core/form.d.ts +108 -0
- package/core/index.d.ts +11 -0
- package/core/index.js +1 -0
- package/core/register.d.ts +25 -0
- package/core/register.js +58 -0
- package/core/signals.d.ts +94 -0
- package/core/template.d.ts +70 -0
- package/index.d.ts +161 -0
- package/package.json +21 -6
- package/traits/CATEGORIES.md +1 -1
package/index.d.ts
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@adia-ai/web-components` — public TypeScript declarations.
|
|
3
|
+
*
|
|
4
|
+
* Re-exports the core types + augments `HTMLElementTagNameMap` so
|
|
5
|
+
* `document.querySelector('slider-ui')` returns `UISlider` (typed),
|
|
6
|
+
* not `Element`.
|
|
7
|
+
*
|
|
8
|
+
* @see ./USAGE.md
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
// ── Core utilities ──────────────────────────────────────────────────
|
|
12
|
+
export * from './core/index.js';
|
|
13
|
+
|
|
14
|
+
// ── Form-bearing primitives (typed) ─────────────────────────────────
|
|
15
|
+
export type {
|
|
16
|
+
UIInput,
|
|
17
|
+
UIInputType,
|
|
18
|
+
InputChangeEvent,
|
|
19
|
+
InputInputEvent,
|
|
20
|
+
InputChangeEventDetail,
|
|
21
|
+
} from './components/input/input.js';
|
|
22
|
+
|
|
23
|
+
export type {
|
|
24
|
+
UISelect,
|
|
25
|
+
SelectOption,
|
|
26
|
+
SelectChangeEvent,
|
|
27
|
+
SelectActionEvent,
|
|
28
|
+
SelectChangeEventDetail,
|
|
29
|
+
SelectActionEventDetail,
|
|
30
|
+
} from './components/select/select.js';
|
|
31
|
+
|
|
32
|
+
export type {
|
|
33
|
+
UISlider,
|
|
34
|
+
SliderChangeEvent,
|
|
35
|
+
SliderInputEvent,
|
|
36
|
+
SliderChangeEventDetail,
|
|
37
|
+
} from './components/slider/slider.js';
|
|
38
|
+
|
|
39
|
+
export type {
|
|
40
|
+
UIRange,
|
|
41
|
+
RangeChangeEvent,
|
|
42
|
+
RangeInputEvent,
|
|
43
|
+
RangeChangeEventDetail,
|
|
44
|
+
} from './components/range/range.js';
|
|
45
|
+
|
|
46
|
+
export type {
|
|
47
|
+
UITextarea,
|
|
48
|
+
TextareaChangeEvent,
|
|
49
|
+
TextareaInputEvent,
|
|
50
|
+
TextareaChangeEventDetail,
|
|
51
|
+
} from './components/textarea/textarea.js';
|
|
52
|
+
|
|
53
|
+
export type {
|
|
54
|
+
UISwitch,
|
|
55
|
+
SwitchChangeEvent,
|
|
56
|
+
SwitchChangeEventDetail,
|
|
57
|
+
} from './components/switch/switch.js';
|
|
58
|
+
|
|
59
|
+
export type {
|
|
60
|
+
UICheck,
|
|
61
|
+
CheckChangeEvent,
|
|
62
|
+
CheckChangeEventDetail,
|
|
63
|
+
} from './components/check/check.js';
|
|
64
|
+
|
|
65
|
+
export type {
|
|
66
|
+
UIRadio,
|
|
67
|
+
RadioChangeEvent,
|
|
68
|
+
RadioChangeEventDetail,
|
|
69
|
+
} from './components/radio/radio.js';
|
|
70
|
+
|
|
71
|
+
export type {
|
|
72
|
+
UISegmented,
|
|
73
|
+
SegmentedChangeEvent,
|
|
74
|
+
SegmentedChangeEventDetail,
|
|
75
|
+
} from './components/segmented/segmented.js';
|
|
76
|
+
|
|
77
|
+
export type {
|
|
78
|
+
UISearch,
|
|
79
|
+
SearchInputEvent,
|
|
80
|
+
SearchEvent,
|
|
81
|
+
SearchInputEventDetail,
|
|
82
|
+
SearchEventDetail,
|
|
83
|
+
} from './components/search/search.js';
|
|
84
|
+
|
|
85
|
+
export type {
|
|
86
|
+
UIOtpInput,
|
|
87
|
+
OtpInputEvent,
|
|
88
|
+
OtpInputEventDetail,
|
|
89
|
+
} from './components/otp-input/otp-input.js';
|
|
90
|
+
|
|
91
|
+
export type {
|
|
92
|
+
UIOptionCard,
|
|
93
|
+
OptionCardChangeEvent,
|
|
94
|
+
OptionCardChangeEventDetail,
|
|
95
|
+
} from './components/option-card/option-card.js';
|
|
96
|
+
|
|
97
|
+
export type {
|
|
98
|
+
UIColorPicker,
|
|
99
|
+
ColorFormat,
|
|
100
|
+
ColorPickerChangeEvent,
|
|
101
|
+
ColorPickerInputEvent,
|
|
102
|
+
ColorPickerFormatChangeEvent,
|
|
103
|
+
ColorPickerChangeEventDetail,
|
|
104
|
+
ColorPickerFormatChangeEventDetail,
|
|
105
|
+
} from './components/color-picker/color-picker.js';
|
|
106
|
+
|
|
107
|
+
export type {
|
|
108
|
+
UIRating,
|
|
109
|
+
RatingChangeEvent,
|
|
110
|
+
RatingChangeEventDetail,
|
|
111
|
+
} from './components/rating/rating.js';
|
|
112
|
+
|
|
113
|
+
export type {
|
|
114
|
+
UICode,
|
|
115
|
+
CodeChangeEvent,
|
|
116
|
+
CodeInputEvent,
|
|
117
|
+
CodeChangeEventDetail,
|
|
118
|
+
} from './components/code/code.js';
|
|
119
|
+
|
|
120
|
+
export type {
|
|
121
|
+
UICalendarPicker,
|
|
122
|
+
CalendarPickerChangeEvent,
|
|
123
|
+
CalendarPickerChangeEventDetail,
|
|
124
|
+
} from './components/calendar-picker/calendar-picker.js';
|
|
125
|
+
|
|
126
|
+
export type {
|
|
127
|
+
UIUpload,
|
|
128
|
+
UploadChangeEvent,
|
|
129
|
+
UploadChangeEventDetail,
|
|
130
|
+
} from './components/upload/upload.js';
|
|
131
|
+
|
|
132
|
+
// ── Global HTMLElementTagNameMap augmentation ───────────────────────
|
|
133
|
+
//
|
|
134
|
+
// Tells TypeScript that `document.querySelector('slider-ui')` returns
|
|
135
|
+
// `UISlider`, that `createElement('input-ui')` returns `UIInput`, etc.
|
|
136
|
+
//
|
|
137
|
+
// Note: only the typed primitives are listed here. Non-form primitives
|
|
138
|
+
// (button-ui, card-ui, table-ui, etc.) will be added in subsequent
|
|
139
|
+
// arcs as their .d.ts files land. Until then, querying for those tags
|
|
140
|
+
// returns the base `HTMLElement` type.
|
|
141
|
+
declare global {
|
|
142
|
+
interface HTMLElementTagNameMap {
|
|
143
|
+
'input-ui': import('./components/input/input.js').UIInput;
|
|
144
|
+
'select-ui': import('./components/select/select.js').UISelect;
|
|
145
|
+
'slider-ui': import('./components/slider/slider.js').UISlider;
|
|
146
|
+
'range-ui': import('./components/range/range.js').UIRange;
|
|
147
|
+
'textarea-ui': import('./components/textarea/textarea.js').UITextarea;
|
|
148
|
+
'switch-ui': import('./components/switch/switch.js').UISwitch;
|
|
149
|
+
'check-ui': import('./components/check/check.js').UICheck;
|
|
150
|
+
'radio-ui': import('./components/radio/radio.js').UIRadio;
|
|
151
|
+
'segmented-ui': import('./components/segmented/segmented.js').UISegmented;
|
|
152
|
+
'search-ui': import('./components/search/search.js').UISearch;
|
|
153
|
+
'otp-input-ui': import('./components/otp-input/otp-input.js').UIOtpInput;
|
|
154
|
+
'option-card-ui': import('./components/option-card/option-card.js').UIOptionCard;
|
|
155
|
+
'color-picker-ui': import('./components/color-picker/color-picker.js').UIColorPicker;
|
|
156
|
+
'rating-ui': import('./components/rating/rating.js').UIRating;
|
|
157
|
+
'code-ui': import('./components/code/code.js').UICode;
|
|
158
|
+
'calendar-picker-ui': import('./components/calendar-picker/calendar-picker.js').UICalendarPicker;
|
|
159
|
+
'upload-ui': import('./components/upload/upload.js').UIUpload;
|
|
160
|
+
}
|
|
161
|
+
}
|
package/package.json
CHANGED
|
@@ -1,15 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adia-ai/web-components",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.6",
|
|
4
4
|
"description": "AdiaUI web components — vanilla custom elements. A2UI runtime (renderer, registry, streams, wiring) lives in @adia-ai/a2ui-runtime.",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"types": "./index.d.ts",
|
|
6
7
|
"exports": {
|
|
7
|
-
".":
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./index.d.ts",
|
|
10
|
+
"default": "./index.js"
|
|
11
|
+
},
|
|
8
12
|
"./css": "./index.css",
|
|
9
|
-
"./core":
|
|
10
|
-
|
|
13
|
+
"./core": {
|
|
14
|
+
"types": "./core/index.d.ts",
|
|
15
|
+
"default": "./core/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./core/*": {
|
|
18
|
+
"types": "./core/*.d.ts",
|
|
19
|
+
"default": "./core/*.js"
|
|
20
|
+
},
|
|
11
21
|
"./components": "./components/index.js",
|
|
12
|
-
"./components/*":
|
|
22
|
+
"./components/*": {
|
|
23
|
+
"types": "./components/*/*.d.ts",
|
|
24
|
+
"default": "./components/*/*.js"
|
|
25
|
+
},
|
|
13
26
|
"./components/*.css": "./components/*/*.css",
|
|
14
27
|
"./styles/*": "./styles/*",
|
|
15
28
|
"./traits": "./traits/index.js",
|
|
@@ -29,7 +42,9 @@
|
|
|
29
42
|
"!traits/**/*.examples.js",
|
|
30
43
|
"!traits/_api-table.js",
|
|
31
44
|
"index.js",
|
|
32
|
-
"index.css"
|
|
45
|
+
"index.css",
|
|
46
|
+
"index.d.ts",
|
|
47
|
+
"USAGE.md"
|
|
33
48
|
],
|
|
34
49
|
"sideEffects": [
|
|
35
50
|
"*.css",
|
package/traits/CATEGORIES.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
**56 traits across 9 categories.**
|
|
6
6
|
|
|
7
|
-
Traits are cross-cutting capabilities — orthogonal to the
|
|
7
|
+
Traits are cross-cutting capabilities — orthogonal to the 95 primitives. Any primitive can opt into any trait by adding `data-*` attributes; traits hydrate via `defineTrait()` calls in the trait's `<name>.js`.
|
|
8
8
|
|
|
9
9
|
## At a glance
|
|
10
10
|
|