hyperapp-is 0.1.5 → 0.1.7
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 +1332 -1
- package/dist/hyperapp-is/animation/easing.js +1 -1
- package/dist/hyperapp-is/animation/index.js +1 -0
- package/dist/hyperapp-is/animation/properties.d.ts +2 -6
- package/dist/hyperapp-is/animation/properties.js +1 -1
- package/dist/hyperapp-is/animation/raf.d.ts +7 -12
- package/dist/hyperapp-is/animation/raf.js +3 -3
- package/dist/hyperapp-is/animationView/carousel.d.ts +17 -18
- package/dist/hyperapp-is/animationView/carousel.js +14 -16
- package/dist/hyperapp-is/animationView/index.js +1 -0
- package/dist/hyperapp-is/core/component.d.ts +7 -6
- package/dist/hyperapp-is/core/component.js +4 -4
- package/dist/hyperapp-is/core/index.d.ts +4 -0
- package/dist/hyperapp-is/core/index.js +2 -0
- package/dist/hyperapp-is/core/navigator.d.ts +74 -0
- package/dist/hyperapp-is/core/navigator.js +195 -0
- package/dist/hyperapp-is/core/state.d.ts +22 -17
- package/dist/hyperapp-is/core/state.js +8 -8
- package/dist/hyperapp-is/dom/index.d.ts +1 -1
- package/dist/hyperapp-is/dom/index.js +2 -1
- package/dist/hyperapp-is/dom/utils.d.ts +0 -19
- package/dist/hyperapp-is/dom/utils.js +1 -85
- package/dist/hyperapp-is/index.d.ts +14 -7
- package/dist/hyperapp-is/index.js +9 -5
- package/package.json +4 -1
- package/README.dev.md +0 -1254
- package/README.npm.md +0 -107
package/README.npm.md
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
# hyperapp-is
|
|
2
|
-
|
|
3
|
-
Lightweight. Declarative. Composable.
|
|
4
|
-
|
|
5
|
-
Reusable component foundation library for Hyperapp v2.
|
|
6
|
-
|
|
7
|
-
State-structure independent design + RAF-based animation system.
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Features
|
|
12
|
-
|
|
13
|
-
- State-path based reusable component design
|
|
14
|
-
- Local state helpers
|
|
15
|
-
`getLocalState`, `setLocalState`, `createLocalKey`
|
|
16
|
-
- Action composition utility
|
|
17
|
-
`concatAction`
|
|
18
|
-
- Class / props utilities
|
|
19
|
-
`getClassList`, `deleteKeys`
|
|
20
|
-
- requestAnimationFrame task system
|
|
21
|
-
`RAFTask`, `subscription_RAFManager`
|
|
22
|
-
- Built-in animated Carousel component
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## Installation
|
|
27
|
-
|
|
28
|
-
``` bash
|
|
29
|
-
npm install hyperapp-is
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
Peer dependencies:
|
|
33
|
-
|
|
34
|
-
- hyperapp v2
|
|
35
|
-
- hyperapp-jsx-pragma (when using JSX)
|
|
36
|
-
|
|
37
|
-
---
|
|
38
|
-
|
|
39
|
-
## Basic Usage (Carousel Example)
|
|
40
|
-
|
|
41
|
-
``` ts
|
|
42
|
-
import { app } from "hyperapp"
|
|
43
|
-
import h from "hyperapp-jsx-pragma"
|
|
44
|
-
import {
|
|
45
|
-
RAFTask, subscription_RAFManager,
|
|
46
|
-
Carousel, effect_InitCarousel
|
|
47
|
-
} from "hyperapp-is"
|
|
48
|
-
|
|
49
|
-
interface State {
|
|
50
|
-
tasks: RAFTask<State>[]
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
const initState: State = {
|
|
54
|
-
tasks: []
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
app({
|
|
58
|
-
node: document.getElementById("app") as HTMLElement,
|
|
59
|
-
init: [initState, effect_InitCarousel(["tasks"], {
|
|
60
|
-
id : "carousel",
|
|
61
|
-
duration: 2000,
|
|
62
|
-
delay : 1000,
|
|
63
|
-
step : 1
|
|
64
|
-
})],
|
|
65
|
-
|
|
66
|
-
subscriptions: (state) => [
|
|
67
|
-
subscription_RAFManager(state, ["tasks"])
|
|
68
|
-
],
|
|
69
|
-
|
|
70
|
-
view: (state) => (<Carousel
|
|
71
|
-
state = { state }
|
|
72
|
-
id = "carousel"
|
|
73
|
-
keyNames = { ["tasks"] }
|
|
74
|
-
>
|
|
75
|
-
<div>Slide 1</div>
|
|
76
|
-
<div>Slide 2</div>
|
|
77
|
-
<div>Slide 3</div>
|
|
78
|
-
</Carousel>)
|
|
79
|
-
})
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
---
|
|
83
|
-
|
|
84
|
-
## Concept
|
|
85
|
-
|
|
86
|
-
hyperapp-is allows components to:
|
|
87
|
-
|
|
88
|
-
- Remain independent from root state structure
|
|
89
|
-
- Store internal state without polluting user state
|
|
90
|
-
- Compose actions safely
|
|
91
|
-
- Manage animations declaratively via RAFTask
|
|
92
|
-
|
|
93
|
-
Designed for building reusable UI components on top of Hyperapp.
|
|
94
|
-
|
|
95
|
-
---
|
|
96
|
-
|
|
97
|
-
## Documentation
|
|
98
|
-
|
|
99
|
-
Full documentation and detailed design notes are available on GitHub:
|
|
100
|
-
|
|
101
|
-
https://github.com/is4416/hyperapp-is
|
|
102
|
-
|
|
103
|
-
---
|
|
104
|
-
|
|
105
|
-
## License
|
|
106
|
-
|
|
107
|
-
MIT
|