airx 0.4.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +247 -63
- package/output/app/app.d.ts +11 -0
- package/output/app/app.d.ts.map +1 -0
- package/output/app/app.test.d.ts +2 -0
- package/output/app/app.test.d.ts.map +1 -0
- package/output/app/index.d.ts +2 -0
- package/output/app/index.d.ts.map +1 -0
- package/output/{esm → element}/element.d.ts +2 -1
- package/output/element/element.d.ts.map +1 -0
- package/output/element/element.test.d.ts +2 -0
- package/output/element/element.test.d.ts.map +1 -0
- package/output/element/index.d.ts +2 -0
- package/output/element/index.d.ts.map +1 -0
- package/output/index.d.ts +6 -0
- package/output/index.d.ts.map +1 -0
- package/output/index.js +711 -0
- package/output/index.umd.cjs +1 -0
- package/output/logger/index.d.ts +2 -0
- package/output/logger/index.d.ts.map +1 -0
- package/output/{esm → logger}/logger.d.ts +1 -0
- package/output/logger/logger.d.ts.map +1 -0
- package/output/logger/logger.test.d.ts +2 -0
- package/output/logger/logger.test.d.ts.map +1 -0
- package/output/{esm/render/common/index.d.ts → render/basic/common.d.ts} +2 -1
- package/output/render/basic/common.d.ts.map +1 -0
- package/output/render/basic/common.test.d.ts +2 -0
- package/output/render/basic/common.test.d.ts.map +1 -0
- package/output/{umd/render/common → render/basic/hooks}/hooks.d.ts +2 -1
- package/output/render/basic/hooks/hooks.d.ts.map +1 -0
- package/output/render/basic/hooks/hooks.test.d.ts +2 -0
- package/output/render/basic/hooks/hooks.test.d.ts.map +1 -0
- package/output/render/basic/hooks/index.d.ts +2 -0
- package/output/render/basic/hooks/index.d.ts.map +1 -0
- package/output/render/basic/index.d.ts +2 -0
- package/output/render/basic/index.d.ts.map +1 -0
- package/output/{esm/render/common/plugins → render/basic/plugins/context}/context.d.ts +2 -1
- package/output/render/basic/plugins/context/context.d.ts.map +1 -0
- package/output/render/basic/plugins/context/context.test.d.ts +2 -0
- package/output/render/basic/plugins/context/context.test.d.ts.map +1 -0
- package/output/render/basic/plugins/context/index.d.ts +2 -0
- package/output/render/basic/plugins/context/index.d.ts.map +1 -0
- package/output/render/basic/plugins/index.d.ts +3 -0
- package/output/render/basic/plugins/index.d.ts.map +1 -0
- package/output/{umd/render/common/plugins/internal → render/basic/plugins/internal/basic}/basic.d.ts +4 -3
- package/output/render/basic/plugins/internal/basic/basic.d.ts.map +1 -0
- package/output/render/basic/plugins/internal/basic/basic.test.d.ts +2 -0
- package/output/render/basic/plugins/internal/basic/basic.test.d.ts.map +1 -0
- package/output/render/basic/plugins/internal/basic/index.d.ts +2 -0
- package/output/render/basic/plugins/internal/basic/index.d.ts.map +1 -0
- package/output/render/basic/plugins/internal/inject/index.d.ts +2 -0
- package/output/render/basic/plugins/internal/inject/index.d.ts.map +1 -0
- package/output/{esm/render/common/plugins/internal → render/basic/plugins/internal/inject}/inject.d.ts +3 -2
- package/output/render/basic/plugins/internal/inject/inject.d.ts.map +1 -0
- package/output/render/basic/plugins/internal/inject/inject.test.d.ts +2 -0
- package/output/render/basic/plugins/internal/inject/inject.test.d.ts.map +1 -0
- package/output/{umd/render/common/plugins/index.d.ts → render/basic/plugins/plugin.d.ts} +2 -2
- package/output/render/basic/plugins/plugin.d.ts.map +1 -0
- package/output/render/basic/plugins/plugin.test.d.ts +2 -0
- package/output/render/basic/plugins/plugin.test.d.ts.map +1 -0
- package/output/{esm/render → render/browser}/browser.d.ts +4 -3
- package/output/render/browser/browser.d.ts.map +1 -0
- package/output/render/browser/browser.test.d.ts +2 -0
- package/output/render/browser/browser.test.d.ts.map +1 -0
- package/output/render/browser/index.d.ts +2 -0
- package/output/render/browser/index.d.ts.map +1 -0
- package/output/render/index.d.ts +5 -0
- package/output/render/index.d.ts.map +1 -0
- package/output/render/server/index.d.ts +2 -0
- package/output/render/server/index.d.ts.map +1 -0
- package/output/{umd/render → render/server}/server.d.ts +3 -2
- package/output/render/server/server.d.ts.map +1 -0
- package/output/render/server/server.test.d.ts +2 -0
- package/output/render/server/server.test.d.ts.map +1 -0
- package/output/signal/index.d.ts +4 -0
- package/output/signal/index.d.ts.map +1 -0
- package/output/{esm/signal/index.d.ts → signal/signal.d.ts} +2 -2
- package/output/signal/signal.d.ts.map +1 -0
- package/output/signal/signal.test.d.ts +5 -0
- package/output/signal/signal.test.d.ts.map +1 -0
- package/output/symbol/index.d.ts +2 -0
- package/output/symbol/index.d.ts.map +1 -0
- package/output/types/index.d.ts +2 -0
- package/output/types/index.d.ts.map +1 -0
- package/output/{esm → types}/types.d.ts +4 -2
- package/output/types/types.d.ts.map +1 -0
- package/package.json +35 -11
- package/output/esm/index.d.ts +0 -14
- package/output/esm/index.js +0 -1289
- package/output/esm/index.js.map +0 -1
- package/output/esm/render/common/hooks.d.ts +0 -10
- package/output/esm/render/common/plugins/index.d.ts +0 -19
- package/output/esm/render/common/plugins/internal/basic.d.ts +0 -10
- package/output/esm/render/index.d.ts +0 -4
- package/output/esm/render/server.d.ts +0 -5
- package/output/esm/symbol.d.ts +0 -2
- package/output/umd/element.d.ts +0 -48
- package/output/umd/index.d.ts +0 -14
- package/output/umd/index.js +0 -1304
- package/output/umd/index.js.map +0 -1
- package/output/umd/logger.d.ts +0 -3
- package/output/umd/render/browser.d.ts +0 -7
- package/output/umd/render/common/index.d.ts +0 -64
- package/output/umd/render/common/plugins/context.d.ts +0 -5
- package/output/umd/render/common/plugins/internal/inject.d.ts +0 -6
- package/output/umd/render/index.d.ts +0 -4
- package/output/umd/signal/index.d.ts +0 -6
- package/output/umd/symbol.d.ts +0 -2
- package/output/umd/types.d.ts +0 -1173
package/README.md
CHANGED
|
@@ -1,118 +1,302 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Airx ☁️
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/airx)
|
|
3
|
+
[](https://www.npmjs.com/package/airx)
|
|
4
|
+
[](https://github.com/airxjs/airx/actions/workflows/check.yml)
|
|
5
|
+
[](https://www.typescriptlang.org/)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
> A lightweight, Signal-driven JSX web application framework
|
|
6
9
|
|
|
7
|
-
[中文文档](
|
|
8
|
-
|
|
|
9
|
-
[English Document](https://github.com/airxjs/airx/blob/main/README.md)
|
|
10
|
+
[中文文档](./README_CN.md) • [English Documentation](./README.md)
|
|
10
11
|
|
|
11
|
-
Airx is a frontend
|
|
12
|
+
Airx is a modern frontend framework built on **JSX** and **Signal** primitives, designed to provide a simple, performant, and intuitive solution for building reactive web applications.
|
|
12
13
|
|
|
13
|
-
## Features
|
|
14
|
+
## ✨ Features
|
|
14
15
|
|
|
15
|
-
- Seamlessly integrates with [Signal](https://github.com/tc39/proposal-signals)
|
|
16
|
-
- Developed entirely
|
|
17
|
-
-
|
|
18
|
-
- No hooks
|
|
19
|
-
- Minimal
|
|
16
|
+
- 🔄 **Signal-driven reactivity**: Seamlessly integrates with [TC39 Signal proposal](https://github.com/tc39/proposal-signals)
|
|
17
|
+
- 📝 **TypeScript-first**: Developed entirely in TypeScript with excellent type safety
|
|
18
|
+
- ⚡ **Functional components**: Define components using clean JSX functional syntax
|
|
19
|
+
- 🚫 **No hooks complexity**: Simple and straightforward API without React-style hooks
|
|
20
|
+
- 🪶 **Lightweight**: Minimal bundle size with zero dependencies
|
|
21
|
+
- 🔌 **Extensible**: Plugin system for advanced functionality
|
|
22
|
+
- 🌐 **Universal**: Works in both browser and server environments
|
|
20
23
|
|
|
21
|
-
##
|
|
24
|
+
## 🚀 Quick Start
|
|
22
25
|
|
|
23
|
-
|
|
26
|
+
### Installation
|
|
24
27
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
```shell
|
|
28
|
+
```bash
|
|
28
29
|
npm install airx
|
|
30
|
+
# or
|
|
31
|
+
yarn add airx
|
|
32
|
+
# or
|
|
33
|
+
pnpm add airx
|
|
29
34
|
```
|
|
30
35
|
|
|
31
|
-
|
|
36
|
+
### Basic Usage
|
|
32
37
|
|
|
33
|
-
```
|
|
38
|
+
```tsx
|
|
34
39
|
import * as airx from 'airx'
|
|
35
40
|
|
|
36
|
-
//
|
|
37
|
-
const
|
|
38
|
-
const
|
|
41
|
+
// Create reactive state using Signal
|
|
42
|
+
const count = new Signal.State(0)
|
|
43
|
+
const doubleCount = new Signal.Computed(() => count.get() * 2)
|
|
39
44
|
|
|
40
|
-
function
|
|
41
|
-
const
|
|
45
|
+
function Counter() {
|
|
46
|
+
const localState = new Signal.State(0)
|
|
42
47
|
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
48
|
+
const increment = () => {
|
|
49
|
+
count.set(count.get() + 1)
|
|
50
|
+
localState.set(localState.get() + 1)
|
|
46
51
|
}
|
|
47
52
|
|
|
48
|
-
// Return a
|
|
53
|
+
// Return a render function
|
|
49
54
|
return () => (
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
{
|
|
53
|
-
{
|
|
54
|
-
|
|
55
|
+
<div>
|
|
56
|
+
<h1>Counter App</h1>
|
|
57
|
+
<p>Global count: {count.get()}</p>
|
|
58
|
+
<p>Double count: {doubleCount.get()}</p>
|
|
59
|
+
<p>Local count: {localState.get()}</p>
|
|
60
|
+
<button onClick={increment}>
|
|
61
|
+
Click me!
|
|
62
|
+
</button>
|
|
63
|
+
</div>
|
|
55
64
|
)
|
|
56
65
|
}
|
|
57
66
|
|
|
58
|
-
|
|
59
|
-
app.
|
|
67
|
+
// Create and mount the app
|
|
68
|
+
const app = airx.createApp(<Counter />)
|
|
69
|
+
app.mount(document.getElementById('app'))
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## 📖 Core Concepts
|
|
73
|
+
|
|
74
|
+
### Components
|
|
75
|
+
|
|
76
|
+
Components in Airx are simple functions that return a render function:
|
|
77
|
+
|
|
78
|
+
```tsx
|
|
79
|
+
function MyComponent() {
|
|
80
|
+
const state = new Signal.State('Hello')
|
|
81
|
+
|
|
82
|
+
return () => (
|
|
83
|
+
<div>{state.get()} World!</div>
|
|
84
|
+
)
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### State Management
|
|
89
|
+
|
|
90
|
+
Airx leverages the Signal primitive for reactive state management:
|
|
91
|
+
|
|
92
|
+
```tsx
|
|
93
|
+
// State
|
|
94
|
+
const count = new Signal.State(0)
|
|
95
|
+
|
|
96
|
+
// Computed values
|
|
97
|
+
const isEven = new Signal.Computed(() => count.get() % 2 === 0)
|
|
98
|
+
|
|
99
|
+
// Effects
|
|
100
|
+
const effect = new Signal.Effect(() => {
|
|
101
|
+
console.log('Count changed:', count.get())
|
|
102
|
+
})
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Context & Dependency Injection
|
|
106
|
+
|
|
107
|
+
```tsx
|
|
108
|
+
const ThemeContext = Symbol('theme')
|
|
109
|
+
|
|
110
|
+
function App() {
|
|
111
|
+
// Provide values down the component tree
|
|
112
|
+
airx.provide(ThemeContext, 'dark')
|
|
113
|
+
|
|
114
|
+
return () => <Child />
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function Child() {
|
|
118
|
+
// Inject values from parent components
|
|
119
|
+
const theme = airx.inject(ThemeContext)
|
|
120
|
+
|
|
121
|
+
return () => (
|
|
122
|
+
<div className={`theme-${theme}`}>
|
|
123
|
+
Current theme: {theme}
|
|
124
|
+
</div>
|
|
125
|
+
)
|
|
126
|
+
}
|
|
60
127
|
```
|
|
61
128
|
|
|
62
|
-
|
|
129
|
+
### Lifecycle Hooks
|
|
130
|
+
|
|
131
|
+
```tsx
|
|
132
|
+
function Component() {
|
|
133
|
+
airx.onMounted(() => {
|
|
134
|
+
console.log('Component mounted')
|
|
135
|
+
|
|
136
|
+
// Return cleanup function
|
|
137
|
+
return () => {
|
|
138
|
+
console.log('Component unmounted')
|
|
139
|
+
}
|
|
140
|
+
})
|
|
141
|
+
|
|
142
|
+
airx.onUnmounted(() => {
|
|
143
|
+
console.log('Component will unmount')
|
|
144
|
+
})
|
|
145
|
+
|
|
146
|
+
return () => <div>My Component</div>
|
|
147
|
+
}
|
|
63
148
|
|
|
64
|
-
|
|
149
|
+
## 📚 API Reference
|
|
65
150
|
|
|
66
|
-
|
|
151
|
+
Airx follows a minimal API design philosophy. Here are the core APIs:
|
|
67
152
|
|
|
68
|
-
|
|
153
|
+
### `createApp(element)`
|
|
69
154
|
|
|
70
|
-
|
|
155
|
+
Creates an application instance.
|
|
71
156
|
|
|
72
|
-
```
|
|
73
|
-
|
|
157
|
+
```tsx
|
|
158
|
+
const app = airx.createApp(<App />)
|
|
159
|
+
app.mount(document.getElementById('root'))
|
|
74
160
|
```
|
|
75
161
|
|
|
76
|
-
|
|
162
|
+
### `provide<T>(key, value): ProvideUpdater<T>`
|
|
77
163
|
|
|
78
|
-
|
|
164
|
+
Provides a value down the component tree through context. Must be called synchronously within a component.
|
|
79
165
|
|
|
80
|
-
```
|
|
81
|
-
function
|
|
166
|
+
```tsx
|
|
167
|
+
function Parent() {
|
|
168
|
+
airx.provide('theme', 'dark')
|
|
169
|
+
return () => <Child />
|
|
170
|
+
}
|
|
82
171
|
```
|
|
83
172
|
|
|
84
|
-
|
|
173
|
+
### `inject<T>(key): T | undefined`
|
|
85
174
|
|
|
86
|
-
|
|
175
|
+
Retrieves a provided value from the component tree. Must be called synchronously within a component.
|
|
87
176
|
|
|
88
|
-
```
|
|
177
|
+
```tsx
|
|
178
|
+
function Child() {
|
|
179
|
+
const theme = airx.inject('theme')
|
|
180
|
+
return () => <div>Theme: {theme}</div>
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### `onMounted(listener): void`
|
|
185
|
+
|
|
186
|
+
Registers a callback for when the component is mounted to the DOM.
|
|
187
|
+
|
|
188
|
+
```tsx
|
|
89
189
|
type MountedListener = () => (() => void) | void
|
|
90
|
-
|
|
190
|
+
|
|
191
|
+
airx.onMounted(() => {
|
|
192
|
+
console.log('Mounted!')
|
|
193
|
+
return () => console.log('Cleanup')
|
|
194
|
+
})
|
|
91
195
|
```
|
|
92
196
|
|
|
93
|
-
|
|
197
|
+
### `onUnmounted(listener): void`
|
|
94
198
|
|
|
95
|
-
|
|
199
|
+
Registers a callback for when the component is unmounted from the DOM.
|
|
96
200
|
|
|
97
|
-
```
|
|
201
|
+
```tsx
|
|
98
202
|
type UnmountedListener = () => void
|
|
99
|
-
|
|
203
|
+
|
|
204
|
+
airx.onUnmounted(() => {
|
|
205
|
+
console.log('Unmounted!')
|
|
206
|
+
})
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### `createElement(type, props, ...children)`
|
|
210
|
+
|
|
211
|
+
Creates virtual DOM elements (usually handled by JSX transpiler).
|
|
212
|
+
|
|
213
|
+
### `Fragment`
|
|
214
|
+
|
|
215
|
+
A component for grouping multiple elements without adding extra DOM nodes.
|
|
216
|
+
|
|
217
|
+
```tsx
|
|
218
|
+
function App() {
|
|
219
|
+
return () => (
|
|
220
|
+
<airx.Fragment>
|
|
221
|
+
<div>First</div>
|
|
222
|
+
<div>Second</div>
|
|
223
|
+
</airx.Fragment>
|
|
224
|
+
)
|
|
225
|
+
}
|
|
100
226
|
```
|
|
101
227
|
|
|
102
|
-
|
|
228
|
+
## 🔧 Development
|
|
229
|
+
|
|
230
|
+
### Building from Source
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
# Clone the repository
|
|
234
|
+
git clone https://github.com/airxjs/airx.git
|
|
235
|
+
cd airx
|
|
236
|
+
|
|
237
|
+
# Install dependencies
|
|
238
|
+
npm install
|
|
239
|
+
|
|
240
|
+
# Build the project
|
|
241
|
+
npm run build
|
|
242
|
+
|
|
243
|
+
# Run tests
|
|
244
|
+
npm test
|
|
245
|
+
|
|
246
|
+
# Run tests with UI
|
|
247
|
+
npm run test:ui
|
|
248
|
+
|
|
249
|
+
# Run tests with coverage
|
|
250
|
+
npm run test:coverage
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### Project Structure
|
|
254
|
+
|
|
255
|
+
```text
|
|
256
|
+
source/
|
|
257
|
+
├── app/ # Application creation and management
|
|
258
|
+
├── element/ # Virtual DOM and JSX handling
|
|
259
|
+
├── logger/ # Internal logging utilities
|
|
260
|
+
├── render/ # Rendering engine
|
|
261
|
+
│ ├── basic/ # Core rendering logic
|
|
262
|
+
│ ├── browser/ # Browser-specific rendering
|
|
263
|
+
│ └── server/ # Server-side rendering
|
|
264
|
+
├── signal/ # Signal integration
|
|
265
|
+
├── symbol/ # Internal symbols
|
|
266
|
+
└── types/ # TypeScript type definitions
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
## 🤝 Contributing
|
|
270
|
+
|
|
271
|
+
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
|
|
272
|
+
|
|
273
|
+
### Development Workflow
|
|
274
|
+
|
|
275
|
+
1. Fork the repository
|
|
276
|
+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
277
|
+
3. Make your changes
|
|
278
|
+
4. Add tests for your changes
|
|
279
|
+
5. Ensure all tests pass (`npm test`)
|
|
280
|
+
6. Commit your changes (`git commit -m 'Add amazing feature'`)
|
|
281
|
+
7. Push to the branch (`git push origin feature/amazing-feature`)
|
|
282
|
+
8. Open a Pull Request
|
|
103
283
|
|
|
104
|
-
## License
|
|
284
|
+
## 📄 License
|
|
105
285
|
|
|
106
|
-
This project
|
|
286
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
107
287
|
|
|
108
|
-
##
|
|
288
|
+
## 🙏 Acknowledgments
|
|
109
289
|
|
|
110
|
-
|
|
290
|
+
- Thanks to all contributors and supporters of the Airx project
|
|
291
|
+
- Inspired by the [TC39 Signal proposal](https://github.com/tc39/proposal-signals)
|
|
292
|
+
- Built with ❤️ by the Airx community
|
|
111
293
|
|
|
112
|
-
##
|
|
294
|
+
## 📞 Support
|
|
113
295
|
|
|
114
|
-
|
|
296
|
+
- 📖 [Documentation](https://github.com/airxjs/airx)
|
|
297
|
+
- 🐛 [Issue Tracker](https://github.com/airxjs/airx/issues)
|
|
298
|
+
- 💬 [Discussions](https://github.com/airxjs/airx/discussions)
|
|
115
299
|
|
|
116
300
|
---
|
|
117
301
|
|
|
118
|
-
|
|
302
|
+
Made with ☁️ by the Airx team
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Plugin } from '../render';
|
|
2
|
+
import { AirxComponent, AirxElement } from '../element';
|
|
3
|
+
export interface AirxApp {
|
|
4
|
+
mount: (container: HTMLElement) => AirxApp;
|
|
5
|
+
/** @deprecated WIP */
|
|
6
|
+
plugin: (...plugins: Plugin[]) => AirxApp;
|
|
7
|
+
/** @deprecated WIP */
|
|
8
|
+
renderToHTML: () => Promise<string>;
|
|
9
|
+
}
|
|
10
|
+
export declare function createApp(element: AirxElement<any> | AirxComponent): AirxApp;
|
|
11
|
+
//# sourceMappingURL=app.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../source/app/app.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,MAAM,EAAiB,MAAM,WAAW,CAAA;AAC9E,OAAO,EAAE,aAAa,EAAE,WAAW,EAAiB,MAAM,YAAY,CAAA;AAEtE,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,CAAC,SAAS,EAAE,WAAW,KAAK,OAAO,CAAA;IAE1C,sBAAsB;IACtB,MAAM,EAAE,CAAC,GAAG,OAAO,EAAE,MAAM,EAAE,KAAK,OAAO,CAAA;IACzC,sBAAsB;IACtB,YAAY,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAA;CACpC;AAGD,wBAAgB,SAAS,CAAC,OAAO,EAAE,WAAW,CAAC,GAAG,CAAC,GAAG,aAAa,GAAG,OAAO,CA+B5E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.test.d.ts","sourceRoot":"","sources":["../../source/app/app.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/app/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as symbol from '
|
|
1
|
+
import * as symbol from '../symbol';
|
|
2
2
|
type AirxElementType<P> = string | AirxComponent<P>;
|
|
3
3
|
export type Props = {
|
|
4
4
|
[propKey: string]: unknown;
|
|
@@ -46,3 +46,4 @@ export type AirxComponentContext = AirxComponentLifecycle & {
|
|
|
46
46
|
export declare function component<P = unknown>(comp: AirxComponent<P>): AirxComponent<P>;
|
|
47
47
|
export declare function createErrorRender(error: unknown): AirxComponentRender;
|
|
48
48
|
export {};
|
|
49
|
+
//# sourceMappingURL=element.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../../source/element/element.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,WAAW,CAAA;AAGnC,KAAK,eAAe,CAAC,CAAC,IAAI,MAAM,GAAG,aAAa,CAAC,CAAC,CAAC,CAAA;AAEnD,MAAM,MAAM,KAAK,GAAG;IAAE,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAA;AAElD;;;;;;GAMG;AAEH,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,GAAG;IAClC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,CAAA;IACxB,KAAK,EAAE,KAAK,GAAG,CAAC,CAAA;IAChB,CAAC,MAAM,CAAC,iBAAiB,CAAC,EAAE,IAAI,CAAA;CACjC;AAED,MAAM,MAAM,YAAY,GACpB,IAAI,GACJ,MAAM,GACN,MAAM,GACN,OAAO,GACP,SAAS,GACT,WAAW,GACX,KAAK,CAAC,YAAY,CAAC,GACnB,mBAAmB,CAAA;AAEvB;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,YAAY,CAAA;AACpD,MAAM,MAAM,aAAa,CAAC,CAAC,GAAG,OAAO,IAAI,iBAAiB,CAAC,CAAC,CAAC,CAAA;AAC7D,MAAM,MAAM,iBAAiB,CAAC,CAAC,GAAG,OAAO,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,mBAAmB,CAAA;AAE9E;;GAEG;AAEH,wBAAgB,aAAa,CAAC,CAAC,GAAG,GAAG,EACnC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,EACxB,KAAK,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,GAAG,CAAC,EACrC,GAAG,QAAQ,EAAE,YAAY,EAAE,GAC1B,WAAW,CAAC,CAAC,CAAC,CAiBhB;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,WAAW,CAIvE;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,WAAW,CAAA;CAAE,0BAExD;AAED,MAAM,MAAM,8BAA8B,GAAG,MAAM,IAAI,CAAA;AACvD,MAAM,MAAM,4BAA4B,GAAG,MAAM,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAA;AAEpE,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,CAAC,QAAQ,EAAE,4BAA4B,KAAK,IAAI,CAAA;IAC3D,WAAW,EAAE,CAAC,QAAQ,EAAE,8BAA8B,KAAK,IAAI,CAAA;CAChE;AAED,KAAK,cAAc,CAAC,CAAC,GAAG,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,IAAI,CAAA;AAE1E,MAAM,MAAM,oBAAoB,GAAG,sBAAsB,GAAG;IAC1D,OAAO,EAAE,CAAC,CAAC,GAAG,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,KAAK,cAAc,CAAC,CAAC,CAAC,CAAA;IACnE,MAAM,EAAE,CAAC,CAAC,GAAG,OAAO,EAAE,GAAG,EAAE,OAAO,KAAK,CAAC,GAAG,SAAS,CAAA;CACrD,CAAA;AAED,wBAAgB,SAAS,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAE/E;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,mBAAmB,CAwBrE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"element.test.d.ts","sourceRoot":"","sources":["../../source/element/element.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { Props, AirxElement, AirxComponent, AirxChildren, createElement, AirxComponentRender, ReactiveComponent, Fragment, component, AirxComponentContext, isValidElement, AirxComponentMountedListener, AirxComponentUnmountedListener, createErrorRender } from './element';
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/element/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,WAAW,EACX,aAAa,EACb,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,iBAAiB,EACjB,QAAQ,EACR,SAAS,EACT,oBAAoB,EACpB,cAAc,EACd,4BAA4B,EAC5B,8BAA8B,EAC9B,iBAAiB,EAClB,MAAM,WAAW,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './types';
|
|
2
|
+
export { type Plugin } from './render';
|
|
3
|
+
export { type AirxApp, createApp } from './app';
|
|
4
|
+
export { Fragment, component, createElement, type AirxComponent, type AirxElement, type AirxChildren, type AirxComponentContext } from './element';
|
|
5
|
+
export { inject, provide, onMounted, onUnmounted } from './render';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../source/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,UAAU,CAAA;AACtC,OAAO,EAAE,KAAK,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAE/C,OAAO,EACL,QAAQ,EACR,SAAS,EACT,aAAa,EACb,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,oBAAoB,EAC1B,MAAM,WAAW,CAAA;AAElB,OAAO,EACL,MAAM,EACN,OAAO,EACP,SAAS,EACT,WAAW,EACZ,MAAM,UAAU,CAAA"}
|