@avento-space/ts-ui 1.1.1 → 1.2.2
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 +123 -213
- package/dist/card.wc-pFLgjfwm.d.ts +1595 -0
- package/dist/chunk-7GJXOXOW.js +108 -0
- package/dist/chunk-7GJXOXOW.js.map +1 -0
- package/dist/chunk-ICB6OBEZ.js +2087 -0
- package/dist/chunk-ICB6OBEZ.js.map +1 -0
- package/dist/chunk-Q5RCPPCF.js +406 -0
- package/dist/chunk-Q5RCPPCF.js.map +1 -0
- package/dist/chunk-QTANS5ZS.js +81 -0
- package/dist/chunk-QTANS5ZS.js.map +1 -0
- package/dist/chunk-RATTHYIP.js +4855 -0
- package/dist/chunk-RATTHYIP.js.map +1 -0
- package/dist/chunk-RAWESWNC.js +3 -0
- package/dist/chunk-RAWESWNC.js.map +1 -0
- package/dist/chunk-RQZ7KDYP.js +5941 -0
- package/dist/chunk-RQZ7KDYP.js.map +1 -0
- package/dist/chunk-T7QLIHHU.js +3 -0
- package/dist/chunk-T7QLIHHU.js.map +1 -0
- package/dist/chunk-U4WYCYL6.js +116 -0
- package/dist/chunk-U4WYCYL6.js.map +1 -0
- package/dist/components/index.d.ts +13 -11
- package/dist/components/index.js +5 -5
- package/dist/components/index.js.map +1 -1
- package/dist/define.d.ts +2 -2
- package/dist/define.js +8 -1
- package/dist/define.js.map +1 -1
- package/dist/{core/element.d.ts → element-DHtonJNX.d.ts} +3 -2
- package/dist/icons/index.d.ts +33 -5
- package/dist/icons/index.js +5 -3
- package/dist/icons/index.js.map +1 -1
- package/dist/index.d.ts +35 -10
- package/dist/index.js +44 -9
- package/dist/index.js.map +1 -1
- package/dist/jsx-dev-runtime.d.ts +1 -2
- package/dist/jsx-dev-runtime.js +3 -1
- package/dist/jsx-dev-runtime.js.map +1 -1
- package/dist/jsx-runtime.d.ts +644 -7
- package/dist/jsx-runtime.js +3 -120
- package/dist/jsx-runtime.js.map +1 -1
- package/dist/plugins/index.d.ts +21 -3
- package/dist/plugins/index.js +85 -1
- package/dist/plugins/index.js.map +1 -1
- package/dist/react/index.d.ts +1261 -15
- package/dist/react/index.js +1443 -15
- package/dist/react/index.js.map +1 -1
- package/dist/{core/types.d.ts → types-DWglFa91.d.ts} +8 -7
- package/package.json +32 -8
- package/dist/components/box.wc.d.ts +0 -24
- package/dist/components/box.wc.d.ts.map +0 -1
- package/dist/components/box.wc.js +0 -52
- package/dist/components/box.wc.js.map +0 -1
- package/dist/components/button.wc.d.ts +0 -32
- package/dist/components/button.wc.d.ts.map +0 -1
- package/dist/components/button.wc.js +0 -91
- package/dist/components/button.wc.js.map +0 -1
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/input.wc.d.ts +0 -45
- package/dist/components/input.wc.d.ts.map +0 -1
- package/dist/components/input.wc.js +0 -130
- package/dist/components/input.wc.js.map +0 -1
- package/dist/components/list.wc.d.ts +0 -49
- package/dist/components/list.wc.d.ts.map +0 -1
- package/dist/components/list.wc.js +0 -120
- package/dist/components/list.wc.js.map +0 -1
- package/dist/components/portal.wc.d.ts +0 -18
- package/dist/components/portal.wc.d.ts.map +0 -1
- package/dist/components/portal.wc.js +0 -78
- package/dist/components/portal.wc.js.map +0 -1
- package/dist/components/styles.d.ts +0 -7
- package/dist/components/styles.d.ts.map +0 -1
- package/dist/components/styles.js +0 -134
- package/dist/components/styles.js.map +0 -1
- package/dist/core/define.d.ts +0 -5
- package/dist/core/define.d.ts.map +0 -1
- package/dist/core/define.js +0 -26
- package/dist/core/define.js.map +0 -1
- package/dist/core/element.d.ts.map +0 -1
- package/dist/core/element.js +0 -30
- package/dist/core/element.js.map +0 -1
- package/dist/core/index.d.ts +0 -7
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js +0 -5
- package/dist/core/index.js.map +0 -1
- package/dist/core/plugin.d.ts +0 -17
- package/dist/core/plugin.d.ts.map +0 -1
- package/dist/core/plugin.js +0 -117
- package/dist/core/plugin.js.map +0 -1
- package/dist/core/reactive-context.d.ts +0 -12
- package/dist/core/reactive-context.d.ts.map +0 -1
- package/dist/core/reactive-context.js +0 -34
- package/dist/core/reactive-context.js.map +0 -1
- package/dist/core/scheduler.d.ts +0 -13
- package/dist/core/scheduler.d.ts.map +0 -1
- package/dist/core/scheduler.js +0 -80
- package/dist/core/scheduler.js.map +0 -1
- package/dist/core/signal.d.ts +0 -14
- package/dist/core/signal.d.ts.map +0 -1
- package/dist/core/signal.js +0 -391
- package/dist/core/signal.js.map +0 -1
- package/dist/core/store.d.ts +0 -6
- package/dist/core/store.d.ts.map +0 -1
- package/dist/core/store.js +0 -35
- package/dist/core/store.js.map +0 -1
- package/dist/core/types.d.ts.map +0 -1
- package/dist/core/types.js +0 -2
- package/dist/core/types.js.map +0 -1
- package/dist/define.d.ts.map +0 -1
- package/dist/icons/icon-element.d.ts +0 -25
- package/dist/icons/icon-element.d.ts.map +0 -1
- package/dist/icons/icon-element.js +0 -63
- package/dist/icons/icon-element.js.map +0 -1
- package/dist/icons/index.d.ts.map +0 -1
- package/dist/icons/registry.d.ts +0 -6
- package/dist/icons/registry.d.ts.map +0 -1
- package/dist/icons/registry.js +0 -4775
- package/dist/icons/registry.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/jsx-dev-runtime.d.ts.map +0 -1
- package/dist/jsx-runtime.d.ts.map +0 -1
- package/dist/jsx-types.d.ts +0 -651
- package/dist/jsx-types.d.ts.map +0 -1
- package/dist/jsx-types.js +0 -3
- package/dist/jsx-types.js.map +0 -1
- package/dist/plugins/index.d.ts.map +0 -1
- package/dist/plugins/router.d.ts +0 -4
- package/dist/plugins/router.d.ts.map +0 -1
- package/dist/plugins/router.js +0 -90
- package/dist/plugins/router.js.map +0 -1
- package/dist/plugins/types.d.ts +0 -16
- package/dist/plugins/types.d.ts.map +0 -1
- package/dist/plugins/types.js +0 -2
- package/dist/plugins/types.js.map +0 -1
- package/dist/react/icon.d.ts +0 -8
- package/dist/react/icon.d.ts.map +0 -1
- package/dist/react/icon.js +0 -7
- package/dist/react/icon.js.map +0 -1
- package/dist/react/icons.d.ts +0 -1194
- package/dist/react/icons.d.ts.map +0 -1
- package/dist/react/icons.js +0 -1196
- package/dist/react/icons.js.map +0 -1
- package/dist/react/index.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -1,38 +1,22 @@
|
|
|
1
1
|
# Avento TS UI
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**Web Components UI library — framework-agnostic, signal-driven, tree-shakeable.**
|
|
4
4
|
|
|
5
|
-
Build reactive
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Philosophy
|
|
10
|
-
|
|
11
|
-
Avento TS UI is built on a strict separation of concerns:
|
|
12
|
-
|
|
13
|
-
- **Core** — abstract UI model (VNodes), reactive primitives (signals/computed/effects), context, store, lifecycle, and plugin system. Zero platform dependencies.
|
|
14
|
-
- **Render** — generic `Renderer<T, THost>` interface that decouples UI definition from output strategy.
|
|
15
|
-
- **Adapters** — platform-specific renderers (DOM with reconciliation and hydration, SSR with streaming).
|
|
16
|
-
- **Components** — pure functional components consuming `(props, children?) => VNode`, fully portable across all adapters.
|
|
17
|
-
|
|
18
|
-
No layer depends on the internals of another. The same component function works unchanged in the browser and on the server.
|
|
5
|
+
Build reactive UIs with native web components. Works with any framework (React, Vue, Angular, or vanilla JS) or no framework at all.
|
|
19
6
|
|
|
20
7
|
---
|
|
21
8
|
|
|
22
9
|
## Features
|
|
23
10
|
|
|
24
|
-
- **
|
|
25
|
-
- **
|
|
26
|
-
- **
|
|
27
|
-
- **
|
|
28
|
-
- **
|
|
29
|
-
- **
|
|
30
|
-
- **
|
|
31
|
-
- **
|
|
32
|
-
|
|
33
|
-
- **JSX transform** — `jsx`/`jsxs`/`jsxDEV` functions for compiler integration
|
|
34
|
-
- **Strong TypeScript** — full type inference for signals, components, and renderers
|
|
35
|
-
- **Zero runtime dependencies** — only TypeScript
|
|
11
|
+
- **50+ production-ready components** — buttons, modals, tables, forms, overlays, and more
|
|
12
|
+
- **Shadow DOM** — encapsulated styles, no leaks
|
|
13
|
+
- **Signal-based reactivity** — fine-grained updates without virtual DOM
|
|
14
|
+
- **Tree-shakeable** — import only what you use
|
|
15
|
+
- **Framework-agnostic** — use directly as HTML tags or via React wrappers
|
|
16
|
+
- **Accessible** — WAI-ARIA patterns, keyboard navigation, focus management
|
|
17
|
+
- **Icon system** — 3000+ SVG icons built in
|
|
18
|
+
- **Zero dependencies** — only TypeScript
|
|
19
|
+
|
|
36
20
|
---
|
|
37
21
|
|
|
38
22
|
## Quick Start
|
|
@@ -40,235 +24,161 @@ No layer depends on the internals of another. The same component function works
|
|
|
40
24
|
### Install
|
|
41
25
|
|
|
42
26
|
```bash
|
|
43
|
-
npm install @avento/ts-ui
|
|
27
|
+
npm install @avento-space/ts-ui
|
|
44
28
|
```
|
|
45
29
|
|
|
46
|
-
###
|
|
30
|
+
### Usage (vanilla JS / any framework)
|
|
47
31
|
|
|
48
32
|
```typescript
|
|
49
|
-
import {
|
|
33
|
+
import { defineComponents } from '@avento-space/ts-ui';
|
|
50
34
|
|
|
51
|
-
|
|
52
|
-
|
|
35
|
+
// Register all components (prefix: u-)
|
|
36
|
+
defineComponents();
|
|
53
37
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
h('h1', null, ['Avento Counter']),
|
|
57
|
-
h('p', null, [`Count: `, count]),
|
|
58
|
-
h('p', null, [`Doubled: `, doubled]),
|
|
59
|
-
h('button', { onClick: () => count.set(count.get() + 1) }, ['+']),
|
|
60
|
-
h('button', { onClick: () => count.set(count.get() - 1) }, ['-']),
|
|
61
|
-
]);
|
|
62
|
-
}
|
|
38
|
+
// Components are now available as HTML tags
|
|
39
|
+
```
|
|
63
40
|
|
|
64
|
-
|
|
41
|
+
```html
|
|
42
|
+
<u-button variant="primary">Click me</u-button>
|
|
43
|
+
<u-modal title="Hello" open>
|
|
44
|
+
<p>Modal content</p>
|
|
45
|
+
</u-modal>
|
|
65
46
|
```
|
|
66
47
|
|
|
67
|
-
|
|
48
|
+
### Usage with React
|
|
68
49
|
|
|
69
|
-
|
|
50
|
+
```tsx
|
|
51
|
+
import { defineComponents } from '@avento-space/ts-ui';
|
|
52
|
+
import { Button, Modal } from '@avento-space/ts-ui/react';
|
|
70
53
|
|
|
71
|
-
|
|
72
|
-
import { h, renderToString } from '@avento/ts-ui';
|
|
54
|
+
defineComponents();
|
|
73
55
|
|
|
74
|
-
function
|
|
75
|
-
return
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
56
|
+
function App() {
|
|
57
|
+
return (
|
|
58
|
+
<Button variant="primary" onClick={() => alert('Hi!')}>
|
|
59
|
+
Click me
|
|
60
|
+
</Button>
|
|
61
|
+
);
|
|
79
62
|
}
|
|
80
|
-
|
|
81
|
-
const html = renderToString(h(Page));
|
|
82
|
-
console.log(html);
|
|
83
|
-
// <div class="page"><h1>Hello from SSR</h1><p>This was rendered on the server.</p></div>
|
|
84
63
|
```
|
|
85
64
|
|
|
86
65
|
---
|
|
87
66
|
|
|
88
|
-
##
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
67
|
+
## Components
|
|
68
|
+
|
|
69
|
+
| Component | Tag | Description |
|
|
70
|
+
|-----------|-----|-------------|
|
|
71
|
+
| Accordion | `<u-accordion>` | Collapsible sections |
|
|
72
|
+
| Badge | `<u-badge>` | Status indicators, labels |
|
|
73
|
+
| Box | `<u-box>` | Semantic layout wrapper |
|
|
74
|
+
| Breadcrumb | `<u-breadcrumb>` | Navigation trail |
|
|
75
|
+
| Button | `<u-button>` | Primary, secondary, ghost, danger, link |
|
|
76
|
+
| Calendar | `<u-calendar>` | Date picker |
|
|
77
|
+
| Card | `<u-card>` | Content container with header/footer |
|
|
78
|
+
| Checkbox | `<u-checkbox>` | Toggle option |
|
|
79
|
+
| Collection | `<u-collection>` | Managed item selection |
|
|
80
|
+
| Combobox | `<u-combobox>` | Autocomplete input |
|
|
81
|
+
| CommandPalette | `<u-command-palette>` | ⌘K command menu |
|
|
82
|
+
| Container | `<u-container>` | Max-width layout wrapper |
|
|
83
|
+
| ContextMenu | `<u-context-menu>` | Right-click menu |
|
|
84
|
+
| DataTable | `<u-data-table>` | Sortable, filterable table |
|
|
85
|
+
| DialogRoot | `<u-dialog-root>` | Dialog base behavior |
|
|
86
|
+
| DismissableLayer | `<u-dismissable-layer>` | Click-outside handler |
|
|
87
|
+
| Drawer | `<u-drawer>` | Slide-in panel |
|
|
88
|
+
| Dropdown | `<u-dropdown>` | Menu button |
|
|
89
|
+
| Field | `<u-field>` | Label + input wrapper |
|
|
90
|
+
| FocusManager | `<u-focus-manager>` | Keyboard focus orchestration |
|
|
91
|
+
| FocusScope | `<u-focus-scope>` | Isolated focus zone |
|
|
92
|
+
| FocusTrap | `<u-focus-trap>` | Tab cycle trapping |
|
|
93
|
+
| Form | `<u-form>` | Form validation wrapper |
|
|
94
|
+
| Grid | `<u-grid>` | CSS Grid layout |
|
|
95
|
+
| Hoverable | `<u-hoverable>` | Hover state behavior |
|
|
96
|
+
| Input | `<u-input>` | Text input |
|
|
97
|
+
| KeyboardNavigation | `<u-keyboard-navigation>` | Arrow key navigation |
|
|
98
|
+
| Label | `<u-label>` | Form label |
|
|
99
|
+
| Link | `<u-link>` | Styled anchor |
|
|
100
|
+
| List | `<u-list>` | Keyed list renderer |
|
|
101
|
+
| LiveRegion | `<u-live-region>` | Screen reader announcements |
|
|
102
|
+
| Modal | `<u-modal>` | Dialog overlay |
|
|
103
|
+
| Overlay | `<u-overlay>` | Backdrop layer |
|
|
104
|
+
| Popover | `<u-popover>` | Hover/focus tooltip-like |
|
|
105
|
+
| Popper | `<u-popper>` | Positioning utility |
|
|
106
|
+
| Portal | `<u-portal>` | Teleport to another node |
|
|
107
|
+
| Presence | `<u-presence>` | Mount/unmount animation |
|
|
108
|
+
| Pressable | `<u-pressable>` | Press interaction behavior |
|
|
109
|
+
| RadioGroup | `<u-radio-group>` | Radio button group |
|
|
110
|
+
| RouterView | `<u-router-view>` | Router outlet |
|
|
111
|
+
| Select | `<u-select>` | Native select replacement |
|
|
112
|
+
| Slot | `<u-slot>` | Named slot content |
|
|
113
|
+
| Sortable | `<u-sortable>` | Drag-to-reorder list |
|
|
114
|
+
| Spacer | `<u-spacer>` | Flex spacing utility |
|
|
115
|
+
| Stack / HStack | `<u-stack>` / `<u-hstack>` | Flexbox layouts |
|
|
116
|
+
| Switch | `<u-switch>` | Toggle control |
|
|
117
|
+
| Table | `<u-table>` | Data table |
|
|
118
|
+
| Tabs | `<u-tabs>` | Tabbed interface |
|
|
119
|
+
| Text | `<u-text>` | Typography with size/weight/color |
|
|
120
|
+
| Textarea | `<u-textarea>` | Multi-line input |
|
|
121
|
+
| Toast | `<u-toast>` | Notification popup |
|
|
122
|
+
| TooltipRoot | `<u-tooltip-root>` | Hover tooltip |
|
|
123
|
+
| Transition | `<u-transition>` | CSS transition behavior |
|
|
124
|
+
| Tree | `<u-tree>` | Hierarchical list |
|
|
125
|
+
| VisuallyHidden | `<u-visually-hidden>` | Screen reader-only content |
|
|
126
|
+
| Icon | `<u-icon>` | 3000+ SVG icons |
|
|
117
127
|
|
|
118
128
|
---
|
|
119
129
|
|
|
120
|
-
##
|
|
121
|
-
|
|
122
|
-
### VNode
|
|
130
|
+
## Styling
|
|
123
131
|
|
|
124
|
-
|
|
132
|
+
All components use **Shadow DOM** for style encapsulation. Override styles via:
|
|
125
133
|
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
children: VNodeChild[];
|
|
131
|
-
key?: string | number;
|
|
132
|
-
}
|
|
134
|
+
```css
|
|
135
|
+
/* CSS parts */
|
|
136
|
+
u-button::part(button) { font-weight: 700; }
|
|
137
|
+
u-modal::part(modal-wrapper) { border-radius: 16px; }
|
|
133
138
|
```
|
|
134
139
|
|
|
135
|
-
|
|
140
|
+
Design tokens are available as CSS custom properties:
|
|
136
141
|
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
- `type` — element tag name, component function, or `Fragment`
|
|
145
|
-
- `props` — attributes, properties, event listeners (`onClick`, etc.), signals
|
|
146
|
-
- `children` — VNodes, strings, numbers, booleans, `null`, or signals
|
|
147
|
-
|
|
148
|
-
### Signals
|
|
149
|
-
|
|
150
|
-
```typescript
|
|
151
|
-
import { signal, computed, effect, batch, untrack } from '@avento/ts-ui';
|
|
152
|
-
|
|
153
|
-
const name = signal('World');
|
|
154
|
-
const greeting = computed(() => `Hello, ${name.get()}!`);
|
|
155
|
-
|
|
156
|
-
effect(() => {
|
|
157
|
-
console.log(greeting.get()); // logs whenever name changes
|
|
158
|
-
});
|
|
159
|
-
|
|
160
|
-
batch(() => {
|
|
161
|
-
name.set('Agnostic');
|
|
162
|
-
name.set('UI'); // only one notification after batch
|
|
163
|
-
});
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
### Context
|
|
167
|
-
|
|
168
|
-
```typescript
|
|
169
|
-
import { createContext, useContext, h, mount } from '@avento/ts-ui';
|
|
170
|
-
|
|
171
|
-
const Theme = createContext('light');
|
|
172
|
-
|
|
173
|
-
function Panel() {
|
|
174
|
-
const theme = useContext(Theme);
|
|
175
|
-
return h('div', { class: `theme-${theme}` }, ['Themed content']);
|
|
142
|
+
```css
|
|
143
|
+
:root {
|
|
144
|
+
--u-color-primary: #3b82f6;
|
|
145
|
+
--u-color-text: #111827;
|
|
146
|
+
--u-color-text-muted: #4b5563;
|
|
147
|
+
--u-radius-2xl: 12px;
|
|
176
148
|
}
|
|
177
149
|
```
|
|
178
150
|
|
|
179
151
|
---
|
|
180
152
|
|
|
181
|
-
##
|
|
153
|
+
## React Wrappers
|
|
182
154
|
|
|
183
|
-
```
|
|
184
|
-
import {
|
|
185
|
-
|
|
186
|
-
const instance = mount(h(App), document.getElementById('root')!);
|
|
187
|
-
// instance.render(newVNode) — re-render
|
|
188
|
-
// instance.hydrate(vnode) — attach to existing DOM
|
|
189
|
-
// instance.destroy() — unmount and clean up
|
|
155
|
+
```tsx
|
|
156
|
+
import { Button, Modal, Tabs, Text, Badge, Card } from '@avento-space/ts-ui/react';
|
|
190
157
|
```
|
|
191
158
|
|
|
192
|
-
|
|
159
|
+
Each web component has a React wrapper that forwards props and refs.
|
|
193
160
|
|
|
194
161
|
---
|
|
195
162
|
|
|
196
|
-
##
|
|
197
|
-
|
|
198
|
-
```typescript
|
|
199
|
-
import { renderToString, renderToStream } from '@avento/ts-ui';
|
|
163
|
+
## Icons
|
|
200
164
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
// Streaming
|
|
205
|
-
for await (const chunk of renderToStream(h(Page))) {
|
|
206
|
-
res.write(chunk);
|
|
207
|
-
}
|
|
165
|
+
```html
|
|
166
|
+
<u-icon name="heart"></u-icon>
|
|
167
|
+
<u-icon name="settings" size="32" stroke-width="1.5"></u-icon>
|
|
208
168
|
```
|
|
209
169
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
---
|
|
213
|
-
|
|
214
|
-
## Built-in Components
|
|
215
|
-
|
|
216
|
-
Avento TS UI provides a set of highly optimized, platform-agnostic UI components:
|
|
217
|
-
|
|
218
|
-
- **Button**: Custom styled interactive button.
|
|
219
|
-
- **Input**: Reactive text input control with controlled states.
|
|
220
|
-
- **List**: Keyed child element list wrapper.
|
|
221
|
-
- **VirtualList**: Zero-overhead windowed list virtualization (scrolling requires external scroll bindings).
|
|
222
|
-
- **Portal**: Renders children outside the standard DOM hierarchy.
|
|
223
|
-
|
|
224
|
-
For complete API details and scroll state implementation examples, see the [Components Documentation](docs/components.md).
|
|
170
|
+
3000+ icons available. See the icon registry for all names.
|
|
225
171
|
|
|
226
172
|
---
|
|
227
173
|
|
|
228
|
-
##
|
|
229
|
-
|
|
230
|
-
```typescript
|
|
231
|
-
import { registerPlugin, createRouter } from '@avento/ts-ui';
|
|
232
|
-
|
|
233
|
-
const router = createRouter({ mode: 'history' });
|
|
234
|
-
registerPlugin(router);
|
|
235
|
-
|
|
236
|
-
router.navigate('/dashboard');
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
The plugin system uses named hooks. Custom plugins receive a `PluginAPI` to register and invoke hooks.
|
|
240
|
-
|
|
241
|
-
---
|
|
242
|
-
|
|
243
|
-
## JSX Support
|
|
244
|
-
|
|
245
|
-
Configure your TypeScript `tsconfig.json`:
|
|
246
|
-
|
|
247
|
-
```json
|
|
248
|
-
{
|
|
249
|
-
"compilerOptions": {
|
|
250
|
-
"jsx": "react-jsx",
|
|
251
|
-
"jsxImportSource": "@avento/ts-ui"
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
The compiler module exports `jsx`, `jsxs`, and `jsxDEV` for the automatic JSX runtime.
|
|
257
|
-
|
|
258
|
-
---
|
|
174
|
+
## Scripts
|
|
259
175
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
|
263
|
-
|
|
264
|
-
|
|
|
265
|
-
|
|
|
266
|
-
| DOM Adapter | `src/adapters/dom/` | mount(), hydrate(), signal bindings |
|
|
267
|
-
| SSR Adapter | `src/adapters/ssr/` | renderToString(), renderToStream() |
|
|
268
|
-
| Components | `src/components/` | Button, Input, List, Portal |
|
|
269
|
-
| Plugins | `src/plugins/` | Router plugin |
|
|
270
|
-
| Compiler | `src/compiler/` | JSX transform functions |
|
|
271
|
-
| DevTools | `src/devtools/` | Inspector, state logger |
|
|
176
|
+
| Command | Description |
|
|
177
|
+
|---------|-------------|
|
|
178
|
+
| `npm run build` | Build with tsup (ESM + .d.ts) |
|
|
179
|
+
| `npm test` | Run vitest |
|
|
180
|
+
| `npm run typecheck` | TypeScript check |
|
|
181
|
+
| `npm run lint` | ESLint |
|
|
272
182
|
|
|
273
183
|
---
|
|
274
184
|
|