what-framework 0.1.0 → 0.1.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/package.json +7 -2
- package/src/index.js +2 -142
- package/src/router.js +1 -15
- package/src/server.js +4 -19
- package/src/testing.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "what-framework",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "The closest framework to vanilla JS — signals, components, islands, SSR",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -52,5 +52,10 @@
|
|
|
52
52
|
"bugs": {
|
|
53
53
|
"url": "https://github.com/aspect/what-fw/issues"
|
|
54
54
|
},
|
|
55
|
-
"homepage": "https://github.com/aspect/what-fw#readme"
|
|
55
|
+
"homepage": "https://github.com/aspect/what-fw#readme",
|
|
56
|
+
"dependencies": {
|
|
57
|
+
"what-core": "^0.1.0",
|
|
58
|
+
"what-router": "^0.1.0",
|
|
59
|
+
"what-server": "^0.2.0"
|
|
60
|
+
}
|
|
56
61
|
}
|
package/src/index.js
CHANGED
|
@@ -1,144 +1,4 @@
|
|
|
1
1
|
// What Framework - The closest framework to vanilla JS
|
|
2
|
-
// Main entry point - exports everything from core
|
|
2
|
+
// Main entry point - re-exports everything from core
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
export {
|
|
6
|
-
signal,
|
|
7
|
-
computed,
|
|
8
|
-
effect,
|
|
9
|
-
batch,
|
|
10
|
-
untrack,
|
|
11
|
-
} from '../../core/src/reactive.js';
|
|
12
|
-
|
|
13
|
-
// Virtual DOM
|
|
14
|
-
export {
|
|
15
|
-
h,
|
|
16
|
-
Fragment,
|
|
17
|
-
jsx,
|
|
18
|
-
jsxs,
|
|
19
|
-
jsxDEV,
|
|
20
|
-
} from '../../core/src/h.js';
|
|
21
|
-
|
|
22
|
-
// DOM operations
|
|
23
|
-
export {
|
|
24
|
-
mount,
|
|
25
|
-
hydrate,
|
|
26
|
-
render,
|
|
27
|
-
createPortal,
|
|
28
|
-
} from '../../core/src/dom.js';
|
|
29
|
-
|
|
30
|
-
// Hooks
|
|
31
|
-
export {
|
|
32
|
-
useState,
|
|
33
|
-
useSignal,
|
|
34
|
-
useEffect,
|
|
35
|
-
useMemo,
|
|
36
|
-
useCallback,
|
|
37
|
-
useRef,
|
|
38
|
-
useReducer,
|
|
39
|
-
useContext,
|
|
40
|
-
createContext,
|
|
41
|
-
} from '../../core/src/hooks.js';
|
|
42
|
-
|
|
43
|
-
// Components
|
|
44
|
-
export {
|
|
45
|
-
lazy,
|
|
46
|
-
Suspense,
|
|
47
|
-
ErrorBoundary,
|
|
48
|
-
} from '../../core/src/components.js';
|
|
49
|
-
|
|
50
|
-
// Store
|
|
51
|
-
export {
|
|
52
|
-
createStore,
|
|
53
|
-
} from '../../core/src/store.js';
|
|
54
|
-
|
|
55
|
-
// Helpers
|
|
56
|
-
export {
|
|
57
|
-
show,
|
|
58
|
-
each,
|
|
59
|
-
cls,
|
|
60
|
-
createPersisted,
|
|
61
|
-
} from '../../core/src/helpers.js';
|
|
62
|
-
|
|
63
|
-
// Head management
|
|
64
|
-
export {
|
|
65
|
-
Head,
|
|
66
|
-
useHead,
|
|
67
|
-
} from '../../core/src/head.js';
|
|
68
|
-
|
|
69
|
-
// Animation
|
|
70
|
-
export {
|
|
71
|
-
spring,
|
|
72
|
-
tween,
|
|
73
|
-
easings,
|
|
74
|
-
useGesture,
|
|
75
|
-
createTransitionClasses,
|
|
76
|
-
} from '../../core/src/animation.js';
|
|
77
|
-
|
|
78
|
-
// Accessibility
|
|
79
|
-
export {
|
|
80
|
-
useFocusTrap,
|
|
81
|
-
useAriaLive,
|
|
82
|
-
announce,
|
|
83
|
-
clearAnnouncements,
|
|
84
|
-
useId,
|
|
85
|
-
useIds,
|
|
86
|
-
ariaLive,
|
|
87
|
-
Keys,
|
|
88
|
-
onKey,
|
|
89
|
-
onKeys,
|
|
90
|
-
trapFocus,
|
|
91
|
-
releaseFocus,
|
|
92
|
-
getFocusableElements,
|
|
93
|
-
getFirstFocusable,
|
|
94
|
-
getLastFocusable,
|
|
95
|
-
focusFirst,
|
|
96
|
-
focusLast,
|
|
97
|
-
wrapFocus,
|
|
98
|
-
} from '../../core/src/a11y.js';
|
|
99
|
-
|
|
100
|
-
// Skeleton loaders
|
|
101
|
-
export {
|
|
102
|
-
Skeleton,
|
|
103
|
-
SkeletonText,
|
|
104
|
-
SkeletonCircle,
|
|
105
|
-
SkeletonCard,
|
|
106
|
-
SkeletonAvatar,
|
|
107
|
-
SkeletonButton,
|
|
108
|
-
SkeletonInput,
|
|
109
|
-
SkeletonImage,
|
|
110
|
-
Spinner,
|
|
111
|
-
} from '../../core/src/skeleton.js';
|
|
112
|
-
|
|
113
|
-
// Data fetching
|
|
114
|
-
export {
|
|
115
|
-
useFetch,
|
|
116
|
-
useSWR,
|
|
117
|
-
useQuery,
|
|
118
|
-
useInfiniteQuery,
|
|
119
|
-
useMutation,
|
|
120
|
-
cache,
|
|
121
|
-
prefetch,
|
|
122
|
-
} from '../../core/src/data.js';
|
|
123
|
-
|
|
124
|
-
// Forms
|
|
125
|
-
export {
|
|
126
|
-
useForm,
|
|
127
|
-
useField,
|
|
128
|
-
useFieldArray,
|
|
129
|
-
rules,
|
|
130
|
-
simpleResolver,
|
|
131
|
-
zodResolver,
|
|
132
|
-
yupResolver,
|
|
133
|
-
} from '../../core/src/form.js';
|
|
134
|
-
|
|
135
|
-
// Scheduler
|
|
136
|
-
export {
|
|
137
|
-
raf,
|
|
138
|
-
cancelRaf,
|
|
139
|
-
onIdle,
|
|
140
|
-
cancelIdle,
|
|
141
|
-
nextTick,
|
|
142
|
-
scheduleTask,
|
|
143
|
-
TaskPriority,
|
|
144
|
-
} from '../../core/src/scheduler.js';
|
|
4
|
+
export * from 'what-core';
|
package/src/router.js
CHANGED
|
@@ -1,18 +1,4 @@
|
|
|
1
1
|
// What Framework - Router
|
|
2
2
|
// Re-exports from router package
|
|
3
3
|
|
|
4
|
-
export
|
|
5
|
-
Router,
|
|
6
|
-
Link,
|
|
7
|
-
NavLink,
|
|
8
|
-
navigate,
|
|
9
|
-
redirect,
|
|
10
|
-
useRoute,
|
|
11
|
-
useParams,
|
|
12
|
-
useSearch,
|
|
13
|
-
useNavigate,
|
|
14
|
-
defineRoutes,
|
|
15
|
-
prefetchRoute,
|
|
16
|
-
beforeNavigate,
|
|
17
|
-
afterNavigate,
|
|
18
|
-
} from '../../router/src/index.js';
|
|
4
|
+
export * from 'what-router';
|
package/src/server.js
CHANGED
|
@@ -1,21 +1,6 @@
|
|
|
1
1
|
// What Framework - Server
|
|
2
|
-
// Re-exports from server package (SSR, islands, streaming)
|
|
2
|
+
// Re-exports from server package (SSR, islands, streaming, actions)
|
|
3
3
|
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
renderPage,
|
|
8
|
-
definePage,
|
|
9
|
-
} from '../../server/src/index.js';
|
|
10
|
-
|
|
11
|
-
export {
|
|
12
|
-
island,
|
|
13
|
-
Island,
|
|
14
|
-
hydrateIslands,
|
|
15
|
-
IslandModes,
|
|
16
|
-
} from '../../server/src/islands.js';
|
|
17
|
-
|
|
18
|
-
export {
|
|
19
|
-
createAction,
|
|
20
|
-
useAction,
|
|
21
|
-
} from '../../server/src/actions.js';
|
|
4
|
+
export * from 'what-server';
|
|
5
|
+
export * from 'what-server/islands';
|
|
6
|
+
export * from 'what-server/actions';
|
package/src/testing.js
CHANGED