├── .gitignore
├── .prettierrc
├── CHANGELOG.md
├── README.md
├── package.json
├── playground
├── index.html
├── index.tsx
├── package.json
├── pnpm-lock.yaml
└── vite.config.ts
├── pnpm-lock.yaml
├── rollup.config.js
├── src
├── createApp.tsx
├── createGlobalSignal.tsx
├── createGlobalState.tsx
├── createStore.tsx
└── index.tsx
└── tsconfig.json
/.gitignore:
--------------------------------------------------------------------------------
1 | dist
2 | node_modules
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "semi": true,
3 | "tabWidth": 2,
4 | "useTabs": false,
5 | "printWidth": 100,
6 | "singleQuote": true,
7 | "trailingComma": "all",
8 | "htmlWhitespaceSensitivity": "ignore"
9 | }
10 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
3 |
4 | ## 0.8.0-rc.0 (2021-06-25)
5 |
6 | ### Changed
7 |
8 | - ⬆️ Update dependencies (to RC) [[65445e5](https://github.com/amoutonbrady/solid-utils/commit/65445e5c75ca7e6ee0768d613549599ed4a78e31)]
9 |
10 | ### Miscellaneous
11 |
12 | - Merge pull request [#1](https://github.com/amoutonbrady/solid-utils/issues/1) from davedbase/master [[b65b755](https://github.com/amoutonbrady/solid-utils/commit/b65b75525982a966ac4919be2f752199a9dccd98)]
13 | - Oops forgot to bump Solid version [[f678e96](https://github.com/amoutonbrady/solid-utils/commit/f678e96b87a4721fb1cb2233e0765f7503ba7d08)]
14 | - Remove the silly lock file [[bbef783](https://github.com/amoutonbrady/solid-utils/commit/bbef7835f8855d326cf916f8aaf595b11af644ba)]
15 | - Changed createState to createStore [[7478559](https://github.com/amoutonbrady/solid-utils/commit/74785593b5a3c498fdd5f65a1735f42b4e23de01)]
16 |
17 |
18 |
19 | ## 0.7.0 (2021-04-10)
20 |
21 | ### Changed
22 |
23 | - ⬆️ Update dependencies [[9205685](https://github.com/amoutonbrady/solid-utils/commit/9205685c8307b719d1c4515d256ed9dde37fa29e)]
24 |
25 | ### Miscellaneous
26 |
27 | - 📝 Update changelog [[44245a7](https://github.com/amoutonbrady/solid-utils/commit/44245a78bc196e281a95c6fc84ae05cdbca16385)]
28 |
29 |
30 |
31 | ## 0.6.1 (2021-04-09)
32 |
33 | ### Fixed
34 |
35 | - 🐛 Fix peerDependencies range [[22fa5de](https://github.com/amoutonbrady/solid-utils/commit/22fa5deda33331617c3ed38db5f94cf0e72a0518)]
36 |
37 | ### Miscellaneous
38 |
39 | - 📝 Update changelog [[4db59e4](https://github.com/amoutonbrady/solid-utils/commit/4db59e4510a706ec2a30b6063b0be9c62caf4d65)]
40 |
41 |
42 |
43 | ## 0.6.0 (2021-04-09)
44 |
45 | ### Changed
46 |
47 | - ⬆️ Update dependencies [[c6b12f3](https://github.com/amoutonbrady/solid-utils/commit/c6b12f3cf24f872e6c84320b833323e6e3ea39ba)]
48 |
49 | ### Miscellaneous
50 |
51 | - 📝 Update changelog [[e09ab1d](https://github.com/amoutonbrady/solid-utils/commit/e09ab1d3c0d579903fc0a94fdbad120f96ce2779)]
52 |
53 |
54 |
55 | ## 0.5.0 (2021-03-20)
56 |
57 | ### Added
58 |
59 | - ✨ Move to rollup-preset-solid [[3ba165a](https://github.com/amoutonbrady/solid-utils/commit/3ba165a2ed7463c0343f9323220bf40a71cff669)]
60 |
61 |
62 |
63 | ## 0.4.1 (2021-02-09)
64 |
65 | ### Changed
66 |
67 | - ⬆️ Update dependencies [[9e4da75](https://github.com/amoutonbrady/solid-utils/commit/9e4da757324df8b16eca4b25b348cf35dbe56f19)]
68 |
69 | ### Miscellaneous
70 |
71 | - 📝 Update changelog [[52a08a5](https://github.com/amoutonbrady/solid-utils/commit/52a08a55baa61a873fb4c7fd45940865b5718684)]
72 |
73 |
74 |
75 | ## 0.4.0 (2021-02-04)
76 |
77 | ### Changed
78 |
79 | - ♻️ Align with solid 0.24.x changes [[7a5c6a0](https://github.com/amoutonbrady/solid-utils/commit/7a5c6a0e5dbad0d907c34257e447a14289219c21)]
80 | - ⬆️ Update vite to latest plugin [[448a1d2](https://github.com/amoutonbrady/solid-utils/commit/448a1d29a8578f4709d62f9e9ed8648acdd3290f)]
81 | - ⬆️ Update playground dependencies [[e6d8798](https://github.com/amoutonbrady/solid-utils/commit/e6d8798016c619d4f25a415eb71fe3dab6120148)]
82 | - ⬆️ Update dependencies [[84faf94](https://github.com/amoutonbrady/solid-utils/commit/84faf945cccf7f09feffb68f621461a8d776cf3e)]
83 |
84 | ### Miscellaneous
85 |
86 | - 📦 Updating changelog [[f89cdbf](https://github.com/amoutonbrady/solid-utils/commit/f89cdbf6ef551015fa6bb4475d604c738c493ce8)]
87 |
88 |
89 |
90 | ## 0.3.1 (2021-02-03)
91 |
92 | ### Added
93 |
94 | - ✨ Adding changelog [[2ec94c4](https://github.com/amoutonbrady/solid-utils/commit/2ec94c4952e1054ad13ff1ef8b3f46eeeef44c85)]
95 |
96 | ### Fixed
97 |
98 | - 🐛 Fixing package.json mapping export error [[e1dda0d](https://github.com/amoutonbrady/solid-utils/commit/e1dda0d8cd588d4fcb58d32d8e9b5e7dffb06348)]
99 |
100 |
101 |
102 | ## 0.3.0 (2021-02-02)
103 |
104 | ### Changed
105 |
106 | - ⬆️ Update playground dependencies [[2668a34](https://github.com/amoutonbrady/solid-utils/commit/2668a3469bab50053619d1ce3892d260f1cdffd4)]
107 | - ⬆️ Update dependencies [[56d7c79](https://github.com/amoutonbrady/solid-utils/commit/56d7c79706b473d6b05d6590c645311aecf28aeb)]
108 |
109 | ### Removed
110 |
111 | - 🔥 Remove unused imports [[fa0b2c3](https://github.com/amoutonbrady/solid-utils/commit/fa0b2c3f03862fd06b2d0a8a45e4692e18152204)]
112 |
113 | ### Fixed
114 |
115 | - 🐛 Fix bug with createApp providers [[faf6d94](https://github.com/amoutonbrady/solid-utils/commit/faf6d94cb83ef8025929ce8801ce3db22c0b3415)]
116 |
117 |
118 |
119 | ## 0.2.1 (2021-01-23)
120 |
121 | ### Fixed
122 |
123 | - 🐛 Fix major issue with provider orders in `createApp` util [[8ad4696](https://github.com/amoutonbrady/solid-utils/commit/8ad46960d4456759b7249ec446a75195c838f388)]
124 |
125 |
126 |
127 | ## 0.2.0 (2021-01-10)
128 |
129 | ### Added
130 |
131 | - ✨ Adding globalState & globalSignal [[b7ba161](https://github.com/amoutonbrady/solid-utils/commit/b7ba161bd9d054142b6339fcca3b643a7c98c1ef)]
132 | - ➕ Adding bundle analyzer [[4088a94](https://github.com/amoutonbrady/solid-utils/commit/4088a94eb09917a4a3f49268b65842765bd40460)]
133 |
134 | ### Changed
135 |
136 | - 🔧 Fix file type on `source` [[3020042](https://github.com/amoutonbrady/solid-utils/commit/302004247f1054ad3cc27ccf6a1ed9071dbbeb2e)]
137 | - ⬆️ Update dependencies [[9e8a289](https://github.com/amoutonbrady/solid-utils/commit/9e8a2890f6ce8b826e2152eb0c95f8ef02ca84c9)]
138 | - 🔧 Export source as JSX [[faea373](https://github.com/amoutonbrady/solid-utils/commit/faea373e91187221ca4c01e94f6826b934afed56)]
139 |
140 | ### Removed
141 |
142 | - 🔥 Remove useless file [[c999625](https://github.com/amoutonbrady/solid-utils/commit/c99962560b7c4f843086b670226caddc3698da77)]
143 |
144 | ### Miscellaneous
145 |
146 | - 📝 Wrote documentation for createGlobalSignal and createGlobalState [[417f8f5](https://github.com/amoutonbrady/solid-utils/commit/417f8f54af989d602ad639b7658ad2be047ded85)]
147 |
148 |
149 |
150 | ## 0.1.9 (2021-01-05)
151 |
152 | ### Fixed
153 |
154 | - 🐛 Fix regression [[0c78a3a](https://github.com/amoutonbrady/solid-utils/commit/0c78a3aa49d2ad2b8a9c39a573599dd343bec720)]
155 |
156 |
157 |
158 | ## 0.1.8 (2021-01-05)
159 |
160 | ### Added
161 |
162 | - ✨ Adding playground to test [[5b80740](https://github.com/amoutonbrady/solid-utils/commit/5b8074034556fe686bdda8406ec1446d634e4252)]
163 |
164 | ### Fixed
165 |
166 | - 🐛 Fix various issues [[55c065f](https://github.com/amoutonbrady/solid-utils/commit/55c065fb6f20bb735b4fba320168e270757ee0d2)]
167 |
168 |
169 |
170 | ## 0.1.5 (2021-01-03)
171 |
172 | ### Added
173 |
174 | - ✨ Fixing and adding effects [[367f973](https://github.com/amoutonbrady/solid-utils/commit/367f9734cccebe1bfbc6a39fe07b4d66840512f0)]
175 |
176 | ### Changed
177 |
178 | - ⚡ Improve createApp performances [[3670bd5](https://github.com/amoutonbrady/solid-utils/commit/3670bd5fab5a1cdc7579c466c9cbfb4f5c0dabbd)]
179 |
180 |
181 |
182 | ## 0.1.1 (2021-01-02)
183 |
184 | ### Fixed
185 |
186 | - 🐛 Attempt to fix bug [[65bc9ec](https://github.com/amoutonbrady/solid-utils/commit/65bc9ec9227f821ec92f00c3db9fa587e3c1bfb2)]
187 | - ✏️ Fix minor typo in readme [[7457ea7](https://github.com/amoutonbrady/solid-utils/commit/7457ea77373910015b2a7e177be7744855054bd5)]
188 |
189 |
190 |
191 | ## 0.1.0 (2020-12-29)
192 |
193 | ### Changed
194 |
195 | - ♻️ Reworked the createState signature [[38b8bb3](https://github.com/amoutonbrady/solid-utils/commit/38b8bb3e6f5e4260e2edc685652fd8043eb8fa90)]
196 |
197 |
198 |
199 | ## 0.0.7 (2020-12-29)
200 |
201 | ### Fixed
202 |
203 | - 🐛 Replace susepense by show to fix data loading issue [[8780723](https://github.com/amoutonbrady/solid-utils/commit/8780723f4e86e7cf53feadabf948b4dacaa4ad58)]
204 |
205 | ### Miscellaneous
206 |
207 | - 📝 Update readme [[45a4aa6](https://github.com/amoutonbrady/solid-utils/commit/45a4aa6568f591beb4dabaf33c10f2eaf9765869)]
208 |
209 |
210 |
211 | ## 0.0.6 (2020-12-29)
212 |
213 | ### Added
214 |
215 | - ✨ Adding async function for state definition [[a38616f](https://github.com/amoutonbrady/solid-utils/commit/a38616f138d4f269f644525a22f3ff3ed7c14e78)]
216 |
217 | ### Changed
218 |
219 | - ⬆️ Update dependencies [[6cbfa89](https://github.com/amoutonbrady/solid-utils/commit/6cbfa89d683548d2bb946310c8e79417b24cbad9)]
220 |
221 |
222 |
223 | ## 0.0.5 (2020-12-24)
224 |
225 | ### Miscellaneous
226 |
227 | - 🏷️ Infer types for `.use` props [[d103e89](https://github.com/amoutonbrady/solid-utils/commit/d103e89eba74e8084a6d4b88757da25d7ff2b4d9)]
228 | - 📝 Adding extra information and fixed examples [[e8afcbe](https://github.com/amoutonbrady/solid-utils/commit/e8afcbe9e2ba76af8894be4833be56b81b5c7602)]
229 |
230 |
231 |
232 | ## 0.0.4 (2020-12-24)
233 |
234 | ### Added
235 |
236 | - ✨ Adding chainable createApp [[5114fff](https://github.com/amoutonbrady/solid-utils/commit/5114fffc885be298305ed4f6d0d19f194936a2b3)]
237 |
238 | ### Fixed
239 |
240 | - 🐛 Fix wrong props passed to the store function [[60d219f](https://github.com/amoutonbrady/solid-utils/commit/60d219f611039857ca05f6f7693e1ceec007c196)]
241 |
242 |
243 |
244 | ## 0.0.3 (2020-12-20)
245 |
246 | ### Miscellaneous
247 |
248 | - 🏷️ Can typescript be a worst language? [[39e087e](https://github.com/amoutonbrady/solid-utils/commit/39e087ec538e877866111eec97a500963fcffd2e)]
249 | - 🏷️ The thing typescript makes you do to get proper types [[e30c6da](https://github.com/amoutonbrady/solid-utils/commit/e30c6da7f45d6f1350af1095cbbe653e79993415)]
250 |
251 |
252 |
253 | ## 0.0.2 (2020-12-20)
254 |
255 | ### Added
256 |
257 | - ✨ Adding props capability to createStore [[3339e8c](https://github.com/amoutonbrady/solid-utils/commit/3339e8c26849080ab761d06c232c91e6eb9b7d82)]
258 |
259 | ### Miscellaneous
260 |
261 | - 📝 Adding demo to README [[4cc84b1](https://github.com/amoutonbrady/solid-utils/commit/4cc84b1e6438c95b63b83ab84ff56d0dfca0c918)]
262 | - 📝 Improving README [[10c70f3](https://github.com/amoutonbrady/solid-utils/commit/10c70f3417ea48a9953995194c519241caff5b4e)]
263 |
264 |
265 |
266 | ## 0.0.1 (2020-12-20)
267 |
268 | ### Added
269 |
270 | - 🎉 Initial commit [[204db0d](https://github.com/amoutonbrady/solid-utils/commit/204db0dccd385bca7b4a1c9b682d5cf552e36c9b)]
271 |
272 |
273 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | > This package is archived and deprecated. Everything I wanted to do with this package has been done 10x better in the [solid-primitives packages](https://github.com/solidjs-community/solid-primitives).
2 | >
3 | > If you want to use the `solid-utils` package on NPM, feel free to poke me on twitter or sonmething.
4 |
5 | # solid-utils
6 |
7 | The ultimate companion of all your [solid-js](https://github.com/ryansolid/solid) applications.
8 |
9 | [Live demo](https://codesandbox.io/s/solid-utils-wo5w3)
10 |
11 | ## Table of content
12 |
13 | - [solid-utils](#solid-utils)
14 | - [Table of content](#table-of-content)
15 | - [Features](#features)
16 | - [Installation](#installation)
17 | - [Usage](#usage)
18 | - [createGlobalState](#createglobalstate)
19 | - [Basic usage](#basic-usage)
20 | - [createGlobalSignal](#createglobalsignal)
21 | - [Basic usage](#basic-usage-1)
22 | - [createApp](#createapp)
23 | - [Basic usage](#basic-usage-2)
24 | - [With providers](#with-providers)
25 | - [With disposable app](#with-disposable-app)
26 | - [createStore](#createstore)
27 | - [Basic usage](#basic-usage-3)
28 | - [With default props](#with-default-props)
29 | - [With async default props](#with-async-default-props)
30 | - [With props](#with-props)
31 |
32 | ## Features
33 |
34 | * [x] Tiny in size
35 | * [x] Tree shakeable
36 | * [x] Typescript ready
37 | * [x] Growing and maturing
38 | * [x] Used in various projects (mostly pet project)
39 | * [x] Integrate 100% of [Skypack package best practices](https://docs.skypack.dev/package-authors/package-checks)
40 | * [x] ES Module, Common JS & source export (solid specific) ready
41 |
42 | * [ ] Doesn't entirely support SSR just yet
43 | * [ ] Untested (programmatically) - Mostly because I didn't find a proper solution yet
44 | ## Installation
45 |
46 | ```bash
47 | # npm
48 | $ npm i solid-utils
49 |
50 | # pnpm
51 | $ pnpm add solid-utils
52 |
53 | # yarn
54 | $ yarn add solid-utils
55 | ```
56 |
57 | ## Usage
58 |
59 | You can find examples that outline all the utilities in the [playground](./playground/index.tsx) file.
60 |
61 | ### createGlobalState
62 |
63 | A wrapper around `createStore` that allows you to declare it at the global level.
64 | This essentially work by being managed in its own reactive context, removing the needs to be within your application.
65 |
66 | Although this can be useful and seem to be the better approach, there's a reason this wasn't part of core.
67 | This should act as an escape hatch for those who migrate from more permissive libraries such as `react`, `vue` or `svelte`.
68 |
69 | This accept the exact same parameters than `createStore` from `solid-js`.
70 |
71 | #### Basic usage
72 |
73 | ```tsx
74 | import { createGlobalState } from 'solid-utils';
75 |
76 | const [state, setState] = createGlobalState({ count: 0 })
77 |
78 | const Counter = () => setState('count', c => c + 1)}>{state.count}
79 |
80 | const App = () => {
81 | return <>
82 |
83 |
84 |
85 | The current value of count is: {state.count}
86 | I can increment setState('count', c => c + 1)}>here
87 | or within my `Counter` component.
88 |
89 | >
90 | }
91 |
92 | render(App, document.getElementById('app'))
93 | ```
94 |
95 | ### createGlobalSignal
96 |
97 | A wrapper around `createSignal` that allows you to declare it at the global level.
98 | This essentially work by being managed in its own reactive context, removing the needs to be within your application.
99 |
100 | Although this can be useful and seem to be the better approach, there's a reason this wasn't part of core.
101 | This should act as an escape hatch for those who migrate from more permissive libraries such as `react`, `vue` or `svelte`.
102 |
103 | This accept the exact same parameters than `createSignal` from `solid-js`.
104 |
105 | #### Basic usage
106 |
107 | ```tsx
108 | import { createGlobalSignal } from 'solid-utils';
109 |
110 | const [count, setCount] = createGlobalSignal(0)
111 |
112 | const Counter = () => setCount(count() + 1)}>{count()}
113 |
114 | const App = () => {
115 | return <>
116 |
117 |
118 |
119 | The current value of count is: {count()}
120 | I can increment setCount(count() + 1)}>here
121 | or within my `Counter` component.
122 |
123 | >
124 | }
125 |
126 | render(App, document.getElementById('app'))
127 | ```
128 |
129 | ### createApp
130 |
131 | A Vue 3 inspired app mounting bootstrapper that helps manage large list of global providers
132 |
133 | #### Basic usage
134 |
135 | ```tsx
136 | import { createApp } from 'solid-utils'
137 |
138 | const App = () => Hello world!
139 |
140 | createApp(App).mount('#app')
141 | ```
142 |
143 | #### With providers
144 |
145 | ```tsx
146 | const app = createApp(App)
147 |
148 | app.use(RouterProvider)
149 | app.use(I18nProvider, { dict })
150 | app.use(GlobalStoreProvider)
151 |
152 | app.mount('#app')
153 |
154 | // [new in 0.0.4] - Those are also chainable
155 | createApp(App)
156 | .use(RouterProvider)
157 | .use(I18nProvider, { dict })
158 | .use(GlobalStoreProvider)
159 | .mount('#app')
160 | ```
161 |
162 | into something like that:
163 |
164 | ```tsx
165 | render(
166 |
167 |
168 |
169 |
170 |
171 |
172 | ,
173 | document.querySelector('#app')
174 | )
175 | ```
176 |
177 | #### With disposable app
178 |
179 | Can be useful in tests or HMR
180 |
181 | ```tsx
182 | const dispose = createApp(App).mount('#app')
183 |
184 | if (module.hot) {
185 | module.hot.accept()
186 | module.hot.dispose(dispose)
187 | }
188 | ```
189 |
190 | ### createStore
191 |
192 | A small utility that helps generate Provider & associated hook
193 |
194 | #### Basic usage
195 |
196 | ```tsx
197 | const [Provider, useProvider] = createStore({
198 | state: () => ({ count: 0, first: 'Alexandre' }),
199 |
200 | actions: (set, get) => ({
201 | increment(by = 1) {
202 | set('count', count => count + 1)
203 | },
204 | dynamicFullName(last) {
205 | return `${get.first} ${last} ${get.count}`;
206 | }
207 | })
208 | })
209 |
210 | const Counter = () => {
211 | const [state, { increment, dynamicFullName }] = useProvider()
212 |
213 | // The count here will be synced between the two because it's global
214 | return <>
215 | {state.count}
216 | {dynamicFullName('Mouton-Brady')}
217 | >
218 | }
219 |
220 | render(
221 | () =>
222 |
223 |
224 |
225 | ,
226 | document.getElementById('app'),
227 | )
228 | ```
229 |
230 | #### With default props
231 |
232 | ```tsx
233 | const [Provider, useProvider] = createStore({
234 | state: (props) => ({ count: props.count, first: 'Alexandre' }),
235 |
236 | actions: (set, get) => ({
237 | increment(by = 1) {
238 | set('count', count => count + 1)
239 | },
240 | dynamicFullName(last) {
241 | return `${get.first} ${last} ${get.count}`;
242 | }
243 | })
244 |
245 | props: { count: 1 }, // This will auto type the props above and the component props
246 | })
247 |
248 | const Counter = () => {
249 | const [state, { increment, dynamicFullName }] = useProvider()
250 |
251 | // The count here will be synced between the two because it's global
252 | return <>
253 | {state.count}
254 | {dynamicFullName('Mouton-Brady')}
255 | >
256 | }
257 |
258 | render(
259 | () => (
260 | // This `count` will be auto typed
261 |
262 |
263 |
264 | ,
265 | document.getElementById('app'),
266 | )
267 | )
268 | ```
269 |
270 | #### With async default props
271 |
272 | ```tsx
273 | const [Provider, useProvider] = createStore({
274 | props: { url: 'https://get-counter.com/json' }, // This will auto type the props above and the component props
275 |
276 | state: async (props) => {
277 | const count = await fetch(props.url).then(r => r.json())
278 |
279 | return { count, first: 'Alexandre' },
280 | },
281 |
282 | actions: (set, get) => ({
283 | increment(by = 1) {
284 | set('count', count => count + 1)
285 | },
286 | dynamicFullName(last) {
287 | return `${get.first} ${last} ${get.count}`;
288 | }
289 | }),
290 | })
291 |
292 | const Counter = () => {
293 | const [state, { increment, dynamicFullName }] = useProvider()
294 |
295 | // The count here will be synced between the two because it's global
296 | return <>
297 | {state.count}
298 | {dynamicFullName('Mouton-Brady')}
299 | >
300 | }
301 |
302 | render(
303 | () => (
304 | // This `count` will be auto typed
305 | Loading...}>
306 |
307 |
308 | ,
309 | document.getElementById('app'),
310 | )
311 | )
312 | ```
313 |
314 | #### With props
315 |
316 | Not setting the third parameters prevent typescript to infer the proper types for the props interface in the first function and the `` component returned by the `createStore`.
317 |
318 | If any Typescript ninja come accross this I'd be more than happy to know the right way to do that...
319 |
320 | ```tsx
321 | const [Provider, useProvider] = createStore<{ count: number }>({
322 | state: (props) => ({ count: props.count, first: 'Alexandre' }),
323 |
324 | actions: (set, get) => ({
325 | increment(by = 1) {
326 | set('count', count => count + 1)
327 | },
328 | dynamicFullName(last) {
329 | return `${get.first} ${last} ${get.count}`;
330 | }
331 | })
332 | })
333 |
334 | const Counter = () => {
335 | const [state, { increment, dynamicFullName }] = useProvider()
336 |
337 | // The count here will be synced between the two because it's global
338 | return <>
339 | {state.count}
340 | {dynamicFullName('Mouton-Brady')}
341 | >
342 | }
343 |
344 | render(
345 | () => (
346 | // This `count` props won't be typed...
347 |
348 |
349 |
350 | ,
351 | document.getElementById('app')
352 | ),
353 | )
354 | ```
355 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "solid-utils",
3 | "version": "0.8.1",
4 | "description": "Your best companion for any solid project",
5 | "main": "./dist/cjs/index.js",
6 | "module": "./dist/esm/index.js",
7 | "exports": {
8 | ".": {
9 | "solid": "./dist/source/index.jsx",
10 | "import": "./dist/esm/index.js",
11 | "browser": "./dist/esm/index.js"
12 | }
13 | },
14 | "types": "./dist/types/index.d.ts",
15 | "repository": {
16 | "type": "git",
17 | "url": "https://github.com/amoutonbrady/solid-utils"
18 | },
19 | "scripts": {
20 | "build": "rollup -c",
21 | "format": "prettier -w \"**/*.{js,ts,tsx,json}\"",
22 | "check": "pnpx @skypack/package-check",
23 | "prepublishOnly": "pnpm check && pnpm build",
24 | "changelog": "pnpx gitmoji-changelog"
25 | },
26 | "files": [
27 | "dist"
28 | ],
29 | "keywords": [
30 | "solid-js",
31 | "utils",
32 | "companion"
33 | ],
34 | "author": "Alexandre Mouton-Brady",
35 | "license": "MIT",
36 | "devDependencies": {
37 | "babel-preset-solid": "^1.0.0",
38 | "prettier": "^2.3.2",
39 | "rollup": "^2.52.3",
40 | "rollup-preset-solid": "^0.3.0",
41 | "solid-js": "^1.0.0"
42 | },
43 | "peerDependencies": {
44 | "solid-js": ">= 1.0"
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/playground/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/playground/index.tsx:
--------------------------------------------------------------------------------
1 | import { createApp, createStore, createGlobalState, createGlobalSignal } from 'solid-utils';
2 |
3 | import { Router, Route } from 'solid-app-router';
4 | import { Meta, MetaProvider, Title } from 'solid-meta';
5 |
6 | const [globalState, setGlobalState] = createGlobalState({ name: 'Alexandre' });
7 | const [globalSignal, setGlobalSignal] = createGlobalSignal(20);
8 |
9 | const [Provider, useProvider] = createStore({
10 | state: (props) => ({ count: props.count }),
11 | actions: (set) => ({
12 | inc: () => set('count', (c) => c + 1),
13 | }),
14 | effects: (_set, get) => [() => console.log(get.count)],
15 | props: { count: 0 },
16 | });
17 |
18 | const Name = () => Watch me also change name here: {globalState.name} ;
19 |
20 | const Hoooome = () => {
21 | const [state, actions] = useProvider();
22 |
23 | return (
24 | <>
25 | Hello world!
26 |
27 |
28 | My name is: {globalState.name} and I'm: {globalSignal()}
29 |
30 |
31 |
32 |
33 | {
35 | setGlobalState('name', (name) => (name === 'Alexandre' ? 'Alex' : 'Alexandre'));
36 | setGlobalSignal(globalSignal() === 20 ? 22 : 20);
37 | }}
38 | >
39 | Toggle name between 'Alex' and 'Alexandre' and my age between '22' and '20'
40 |
41 |
42 |
43 |
44 |
45 | Count from provider:{state.count} (open the console to see the effect)
46 |
47 | >
48 | );
49 | };
50 |
51 | const App = () => (
52 | <>
53 |
54 |
55 | >
56 | );
57 |
58 | const routes = [
59 | {
60 | component: Hoooome,
61 | path: '/',
62 | },
63 | ];
64 |
65 | createApp(App, {}).use(MetaProvider).use(Router, { routes }).use(Provider).mount('#app');
66 |
--------------------------------------------------------------------------------
/playground/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "playground",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "dev": "vite",
8 | "build": "vite build"
9 | },
10 | "keywords": [],
11 | "author": "Alexandre Mouton-Brady",
12 | "license": "ISC",
13 | "devDependencies": {
14 | "babel-preset-solid": "^1.0.0",
15 | "vite": "^2.3.8",
16 | "vite-plugin-solid": "^2.0.0-rc.3"
17 | },
18 | "dependencies": {
19 | "solid-app-router": "^0.0.50-rc.0",
20 | "solid-js": "^1.0.0",
21 | "solid-meta": "^0.27.0",
22 | "solid-utils": "link:.."
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/playground/pnpm-lock.yaml:
--------------------------------------------------------------------------------
1 | lockfileVersion: 5.3
2 |
3 | specifiers:
4 | babel-preset-solid: ^1.0.0
5 | solid-app-router: ^0.0.50-rc.0
6 | solid-js: ^1.0.0
7 | solid-meta: ^0.27.0
8 | solid-utils: link:..
9 | vite: ^2.3.8
10 | vite-plugin-solid: ^2.0.0-rc.3
11 |
12 | dependencies:
13 | solid-app-router: 0.0.50-rc.0_solid-js@1.0.0
14 | solid-js: 1.0.0
15 | solid-meta: 0.27.0_solid-js@1.0.0
16 | solid-utils: link:..
17 |
18 | devDependencies:
19 | babel-preset-solid: 1.0.0
20 | vite: 2.3.8
21 | vite-plugin-solid: 2.0.0-rc.3
22 |
23 | packages:
24 |
25 | /@babel/code-frame/7.14.5:
26 | resolution: {integrity: sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==}
27 | engines: {node: '>=6.9.0'}
28 | dependencies:
29 | '@babel/highlight': 7.14.5
30 | dev: true
31 |
32 | /@babel/compat-data/7.14.7:
33 | resolution: {integrity: sha512-nS6dZaISCXJ3+518CWiBfEr//gHyMO02uDxBkXTKZDN5POruCnOZ1N4YBRZDCabwF8nZMWBpRxIicmXtBs+fvw==}
34 | engines: {node: '>=6.9.0'}
35 | dev: true
36 |
37 | /@babel/core/7.14.6:
38 | resolution: {integrity: sha512-gJnOEWSqTk96qG5BoIrl5bVtc23DCycmIePPYnamY9RboYdI4nFy5vAQMSl81O5K/W0sLDWfGysnOECC+KUUCA==}
39 | engines: {node: '>=6.9.0'}
40 | dependencies:
41 | '@babel/code-frame': 7.14.5
42 | '@babel/generator': 7.14.5
43 | '@babel/helper-compilation-targets': 7.14.5_@babel+core@7.14.6
44 | '@babel/helper-module-transforms': 7.14.5
45 | '@babel/helpers': 7.14.6
46 | '@babel/parser': 7.14.7
47 | '@babel/template': 7.14.5
48 | '@babel/traverse': 7.14.7
49 | '@babel/types': 7.14.5
50 | convert-source-map: 1.8.0
51 | debug: 4.3.1
52 | gensync: 1.0.0-beta.2
53 | json5: 2.2.0
54 | semver: 6.3.0
55 | source-map: 0.5.7
56 | transitivePeerDependencies:
57 | - supports-color
58 | dev: true
59 |
60 | /@babel/generator/7.14.5:
61 | resolution: {integrity: sha512-y3rlP+/G25OIX3mYKKIOlQRcqj7YgrvHxOLbVmyLJ9bPmi5ttvUmpydVjcFjZphOktWuA7ovbx91ECloWTfjIA==}
62 | engines: {node: '>=6.9.0'}
63 | dependencies:
64 | '@babel/types': 7.14.5
65 | jsesc: 2.5.2
66 | source-map: 0.5.7
67 | dev: true
68 |
69 | /@babel/helper-annotate-as-pure/7.14.5:
70 | resolution: {integrity: sha512-EivH9EgBIb+G8ij1B2jAwSH36WnGvkQSEC6CkX/6v6ZFlw5fVOHvsgGF4uiEHO2GzMvunZb6tDLQEQSdrdocrA==}
71 | engines: {node: '>=6.9.0'}
72 | dependencies:
73 | '@babel/types': 7.14.5
74 | dev: true
75 |
76 | /@babel/helper-compilation-targets/7.14.5_@babel+core@7.14.6:
77 | resolution: {integrity: sha512-v+QtZqXEiOnpO6EYvlImB6zCD2Lel06RzOPzmkz/D/XgQiUu3C/Jb1LOqSt/AIA34TYi/Q+KlT8vTQrgdxkbLw==}
78 | engines: {node: '>=6.9.0'}
79 | peerDependencies:
80 | '@babel/core': ^7.0.0
81 | dependencies:
82 | '@babel/compat-data': 7.14.7
83 | '@babel/core': 7.14.6
84 | '@babel/helper-validator-option': 7.14.5
85 | browserslist: 4.16.6
86 | semver: 6.3.0
87 | dev: true
88 |
89 | /@babel/helper-create-class-features-plugin/7.14.6_@babel+core@7.14.6:
90 | resolution: {integrity: sha512-Z6gsfGofTxH/+LQXqYEK45kxmcensbzmk/oi8DmaQytlQCgqNZt9XQF8iqlI/SeXWVjaMNxvYvzaYw+kh42mDg==}
91 | engines: {node: '>=6.9.0'}
92 | peerDependencies:
93 | '@babel/core': ^7.0.0
94 | dependencies:
95 | '@babel/core': 7.14.6
96 | '@babel/helper-annotate-as-pure': 7.14.5
97 | '@babel/helper-function-name': 7.14.5
98 | '@babel/helper-member-expression-to-functions': 7.14.7
99 | '@babel/helper-optimise-call-expression': 7.14.5
100 | '@babel/helper-replace-supers': 7.14.5
101 | '@babel/helper-split-export-declaration': 7.14.5
102 | transitivePeerDependencies:
103 | - supports-color
104 | dev: true
105 |
106 | /@babel/helper-function-name/7.14.5:
107 | resolution: {integrity: sha512-Gjna0AsXWfFvrAuX+VKcN/aNNWonizBj39yGwUzVDVTlMYJMK2Wp6xdpy72mfArFq5uK+NOuexfzZlzI1z9+AQ==}
108 | engines: {node: '>=6.9.0'}
109 | dependencies:
110 | '@babel/helper-get-function-arity': 7.14.5
111 | '@babel/template': 7.14.5
112 | '@babel/types': 7.14.5
113 | dev: true
114 |
115 | /@babel/helper-get-function-arity/7.14.5:
116 | resolution: {integrity: sha512-I1Db4Shst5lewOM4V+ZKJzQ0JGGaZ6VY1jYvMghRjqs6DWgxLCIyFt30GlnKkfUeFLpJt2vzbMVEXVSXlIFYUg==}
117 | engines: {node: '>=6.9.0'}
118 | dependencies:
119 | '@babel/types': 7.14.5
120 | dev: true
121 |
122 | /@babel/helper-hoist-variables/7.14.5:
123 | resolution: {integrity: sha512-R1PXiz31Uc0Vxy4OEOm07x0oSjKAdPPCh3tPivn/Eo8cvz6gveAeuyUUPB21Hoiif0uoPQSSdhIPS3352nvdyQ==}
124 | engines: {node: '>=6.9.0'}
125 | dependencies:
126 | '@babel/types': 7.14.5
127 | dev: true
128 |
129 | /@babel/helper-member-expression-to-functions/7.14.7:
130 | resolution: {integrity: sha512-TMUt4xKxJn6ccjcOW7c4hlwyJArizskAhoSTOCkA0uZ+KghIaci0Qg9R043kUMWI9mtQfgny+NQ5QATnZ+paaA==}
131 | engines: {node: '>=6.9.0'}
132 | dependencies:
133 | '@babel/types': 7.14.5
134 | dev: true
135 |
136 | /@babel/helper-module-imports/7.14.5:
137 | resolution: {integrity: sha512-SwrNHu5QWS84XlHwGYPDtCxcA0hrSlL2yhWYLgeOc0w7ccOl2qv4s/nARI0aYZW+bSwAL5CukeXA47B/1NKcnQ==}
138 | engines: {node: '>=6.9.0'}
139 | dependencies:
140 | '@babel/types': 7.14.5
141 | dev: true
142 |
143 | /@babel/helper-module-transforms/7.14.5:
144 | resolution: {integrity: sha512-iXpX4KW8LVODuAieD7MzhNjmM6dzYY5tfRqT+R9HDXWl0jPn/djKmA+G9s/2C2T9zggw5tK1QNqZ70USfedOwA==}
145 | engines: {node: '>=6.9.0'}
146 | dependencies:
147 | '@babel/helper-module-imports': 7.14.5
148 | '@babel/helper-replace-supers': 7.14.5
149 | '@babel/helper-simple-access': 7.14.5
150 | '@babel/helper-split-export-declaration': 7.14.5
151 | '@babel/helper-validator-identifier': 7.14.5
152 | '@babel/template': 7.14.5
153 | '@babel/traverse': 7.14.7
154 | '@babel/types': 7.14.5
155 | transitivePeerDependencies:
156 | - supports-color
157 | dev: true
158 |
159 | /@babel/helper-optimise-call-expression/7.14.5:
160 | resolution: {integrity: sha512-IqiLIrODUOdnPU9/F8ib1Fx2ohlgDhxnIDU7OEVi+kAbEZcyiF7BLU8W6PfvPi9LzztjS7kcbzbmL7oG8kD6VA==}
161 | engines: {node: '>=6.9.0'}
162 | dependencies:
163 | '@babel/types': 7.14.5
164 | dev: true
165 |
166 | /@babel/helper-plugin-utils/7.14.5:
167 | resolution: {integrity: sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==}
168 | engines: {node: '>=6.9.0'}
169 | dev: true
170 |
171 | /@babel/helper-replace-supers/7.14.5:
172 | resolution: {integrity: sha512-3i1Qe9/8x/hCHINujn+iuHy+mMRLoc77b2nI9TB0zjH1hvn9qGlXjWlggdwUcju36PkPCy/lpM7LLUdcTyH4Ow==}
173 | engines: {node: '>=6.9.0'}
174 | dependencies:
175 | '@babel/helper-member-expression-to-functions': 7.14.7
176 | '@babel/helper-optimise-call-expression': 7.14.5
177 | '@babel/traverse': 7.14.7
178 | '@babel/types': 7.14.5
179 | transitivePeerDependencies:
180 | - supports-color
181 | dev: true
182 |
183 | /@babel/helper-simple-access/7.14.5:
184 | resolution: {integrity: sha512-nfBN9xvmCt6nrMZjfhkl7i0oTV3yxR4/FztsbOASyTvVcoYd0TRHh7eMLdlEcCqobydC0LAF3LtC92Iwxo0wyw==}
185 | engines: {node: '>=6.9.0'}
186 | dependencies:
187 | '@babel/types': 7.14.5
188 | dev: true
189 |
190 | /@babel/helper-split-export-declaration/7.14.5:
191 | resolution: {integrity: sha512-hprxVPu6e5Kdp2puZUmvOGjaLv9TCe58E/Fl6hRq4YiVQxIcNvuq6uTM2r1mT/oPskuS9CgR+I94sqAYv0NGKA==}
192 | engines: {node: '>=6.9.0'}
193 | dependencies:
194 | '@babel/types': 7.14.5
195 | dev: true
196 |
197 | /@babel/helper-validator-identifier/7.14.5:
198 | resolution: {integrity: sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==}
199 | engines: {node: '>=6.9.0'}
200 | dev: true
201 |
202 | /@babel/helper-validator-option/7.14.5:
203 | resolution: {integrity: sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow==}
204 | engines: {node: '>=6.9.0'}
205 | dev: true
206 |
207 | /@babel/helpers/7.14.6:
208 | resolution: {integrity: sha512-yesp1ENQBiLI+iYHSJdoZKUtRpfTlL1grDIX9NRlAVppljLw/4tTyYupIB7uIYmC3stW/imAv8EqaKaS/ibmeA==}
209 | engines: {node: '>=6.9.0'}
210 | dependencies:
211 | '@babel/template': 7.14.5
212 | '@babel/traverse': 7.14.7
213 | '@babel/types': 7.14.5
214 | transitivePeerDependencies:
215 | - supports-color
216 | dev: true
217 |
218 | /@babel/highlight/7.14.5:
219 | resolution: {integrity: sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==}
220 | engines: {node: '>=6.9.0'}
221 | dependencies:
222 | '@babel/helper-validator-identifier': 7.14.5
223 | chalk: 2.4.2
224 | js-tokens: 4.0.0
225 | dev: true
226 |
227 | /@babel/parser/7.14.7:
228 | resolution: {integrity: sha512-X67Z5y+VBJuHB/RjwECp8kSl5uYi0BvRbNeWqkaJCVh+LiTPl19WBUfG627psSgp9rSf6ojuXghQM3ha6qHHdA==}
229 | engines: {node: '>=6.0.0'}
230 | hasBin: true
231 | dev: true
232 |
233 | /@babel/plugin-syntax-jsx/7.14.5:
234 | resolution: {integrity: sha512-ohuFIsOMXJnbOMRfX7/w7LocdR6R7whhuRD4ax8IipLcLPlZGJKkBxgHp++U4N/vKyU16/YDQr2f5seajD3jIw==}
235 | engines: {node: '>=6.9.0'}
236 | peerDependencies:
237 | '@babel/core': ^7.0.0-0
238 | dependencies:
239 | '@babel/helper-plugin-utils': 7.14.5
240 | dev: true
241 |
242 | /@babel/plugin-syntax-jsx/7.14.5_@babel+core@7.14.6:
243 | resolution: {integrity: sha512-ohuFIsOMXJnbOMRfX7/w7LocdR6R7whhuRD4ax8IipLcLPlZGJKkBxgHp++U4N/vKyU16/YDQr2f5seajD3jIw==}
244 | engines: {node: '>=6.9.0'}
245 | peerDependencies:
246 | '@babel/core': ^7.0.0-0
247 | dependencies:
248 | '@babel/core': 7.14.6
249 | '@babel/helper-plugin-utils': 7.14.5
250 | dev: true
251 |
252 | /@babel/plugin-syntax-typescript/7.14.5_@babel+core@7.14.6:
253 | resolution: {integrity: sha512-u6OXzDaIXjEstBRRoBCQ/uKQKlbuaeE5in0RvWdA4pN6AhqxTIwUsnHPU1CFZA/amYObMsuWhYfRl3Ch90HD0Q==}
254 | engines: {node: '>=6.9.0'}
255 | peerDependencies:
256 | '@babel/core': ^7.0.0-0
257 | dependencies:
258 | '@babel/core': 7.14.6
259 | '@babel/helper-plugin-utils': 7.14.5
260 | dev: true
261 |
262 | /@babel/plugin-transform-typescript/7.14.6_@babel+core@7.14.6:
263 | resolution: {integrity: sha512-XlTdBq7Awr4FYIzqhmYY80WN0V0azF74DMPyFqVHBvf81ZUgc4X7ZOpx6O8eLDK6iM5cCQzeyJw0ynTaefixRA==}
264 | engines: {node: '>=6.9.0'}
265 | peerDependencies:
266 | '@babel/core': ^7.0.0-0
267 | dependencies:
268 | '@babel/core': 7.14.6
269 | '@babel/helper-create-class-features-plugin': 7.14.6_@babel+core@7.14.6
270 | '@babel/helper-plugin-utils': 7.14.5
271 | '@babel/plugin-syntax-typescript': 7.14.5_@babel+core@7.14.6
272 | transitivePeerDependencies:
273 | - supports-color
274 | dev: true
275 |
276 | /@babel/preset-typescript/7.14.5_@babel+core@7.14.6:
277 | resolution: {integrity: sha512-u4zO6CdbRKbS9TypMqrlGH7sd2TAJppZwn3c/ZRLeO/wGsbddxgbPDUZVNrie3JWYLQ9vpineKlsrWFvO6Pwkw==}
278 | engines: {node: '>=6.9.0'}
279 | peerDependencies:
280 | '@babel/core': ^7.0.0-0
281 | dependencies:
282 | '@babel/core': 7.14.6
283 | '@babel/helper-plugin-utils': 7.14.5
284 | '@babel/helper-validator-option': 7.14.5
285 | '@babel/plugin-transform-typescript': 7.14.6_@babel+core@7.14.6
286 | transitivePeerDependencies:
287 | - supports-color
288 | dev: true
289 |
290 | /@babel/template/7.14.5:
291 | resolution: {integrity: sha512-6Z3Po85sfxRGachLULUhOmvAaOo7xCvqGQtxINai2mEGPFm6pQ4z5QInFnUrRpfoSV60BnjyF5F3c+15fxFV1g==}
292 | engines: {node: '>=6.9.0'}
293 | dependencies:
294 | '@babel/code-frame': 7.14.5
295 | '@babel/parser': 7.14.7
296 | '@babel/types': 7.14.5
297 | dev: true
298 |
299 | /@babel/traverse/7.14.7:
300 | resolution: {integrity: sha512-9vDr5NzHu27wgwejuKL7kIOm4bwEtaPQ4Z6cpCmjSuaRqpH/7xc4qcGEscwMqlkwgcXl6MvqoAjZkQ24uSdIZQ==}
301 | engines: {node: '>=6.9.0'}
302 | dependencies:
303 | '@babel/code-frame': 7.14.5
304 | '@babel/generator': 7.14.5
305 | '@babel/helper-function-name': 7.14.5
306 | '@babel/helper-hoist-variables': 7.14.5
307 | '@babel/helper-split-export-declaration': 7.14.5
308 | '@babel/parser': 7.14.7
309 | '@babel/types': 7.14.5
310 | debug: 4.3.1
311 | globals: 11.12.0
312 | transitivePeerDependencies:
313 | - supports-color
314 | dev: true
315 |
316 | /@babel/types/7.14.5:
317 | resolution: {integrity: sha512-M/NzBpEL95I5Hh4dwhin5JlE7EzO5PHMAuzjxss3tiOBD46KfQvVedN/3jEPZvdRvtsK2222XfdHogNIttFgcg==}
318 | engines: {node: '>=6.9.0'}
319 | dependencies:
320 | '@babel/helper-validator-identifier': 7.14.5
321 | to-fast-properties: 2.0.0
322 | dev: true
323 |
324 | /ansi-styles/3.2.1:
325 | resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==}
326 | engines: {node: '>=4'}
327 | dependencies:
328 | color-convert: 1.9.3
329 | dev: true
330 |
331 | /babel-plugin-jsx-dom-expressions/0.28.9_@babel+core@7.14.6:
332 | resolution: {integrity: sha512-WnHiSirT1boeD3OuYR+v/iFiFcnTisoPsdIwZnSe53+q/nxJfDg5KQkI0/mHJrAQHYeB0eI6aS/TCdIylDmxvg==}
333 | dependencies:
334 | '@babel/helper-module-imports': 7.14.5
335 | '@babel/plugin-syntax-jsx': 7.14.5_@babel+core@7.14.6
336 | '@babel/types': 7.14.5
337 | transitivePeerDependencies:
338 | - '@babel/core'
339 | dev: true
340 |
341 | /babel-plugin-jsx-dom-expressions/0.29.0:
342 | resolution: {integrity: sha512-p0uI9OpgRAGvym3LLzIMMaH+ZpW0khi0JwbnZ7cARE9nOBw1dVjrtGNGt8KyYzfIg0o9nkaYZ+Jaja8SgMy3/A==}
343 | dependencies:
344 | '@babel/helper-module-imports': 7.14.5
345 | '@babel/plugin-syntax-jsx': 7.14.5
346 | '@babel/types': 7.14.5
347 | transitivePeerDependencies:
348 | - '@babel/core'
349 | dev: true
350 |
351 | /babel-preset-solid/1.0.0:
352 | resolution: {integrity: sha512-fXWDS+5Mh2PgjFvIEpfztMHORd1MutUsnpLYEl40HvwbdiM8zYaLxkHlSdAoRJ8B8HuWvEjBt8y9jzChq+SRAg==}
353 | dependencies:
354 | babel-plugin-jsx-dom-expressions: 0.29.0
355 | transitivePeerDependencies:
356 | - '@babel/core'
357 | dev: true
358 |
359 | /babel-preset-solid/1.0.0-rc.9_@babel+core@7.14.6:
360 | resolution: {integrity: sha512-S3C5TdcDxH+QjaJPcBCrA1ttJrLgYdTDdDmQLyFv+gGQX4OBSyRb8MjTAQAJ8S1lFQ75ZSnyHkTzD4LzkPQKwA==}
361 | dependencies:
362 | babel-plugin-jsx-dom-expressions: 0.28.9_@babel+core@7.14.6
363 | transitivePeerDependencies:
364 | - '@babel/core'
365 | dev: true
366 |
367 | /browserslist/4.16.6:
368 | resolution: {integrity: sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==}
369 | engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
370 | hasBin: true
371 | dependencies:
372 | caniuse-lite: 1.0.30001239
373 | colorette: 1.2.2
374 | electron-to-chromium: 1.3.758
375 | escalade: 3.1.1
376 | node-releases: 1.1.73
377 | dev: true
378 |
379 | /caniuse-lite/1.0.30001239:
380 | resolution: {integrity: sha512-cyBkXJDMeI4wthy8xJ2FvDU6+0dtcZSJW3voUF8+e9f1bBeuvyZfc3PNbkOETyhbR+dGCPzn9E7MA3iwzusOhQ==}
381 | dev: true
382 |
383 | /chalk/2.4.2:
384 | resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==}
385 | engines: {node: '>=4'}
386 | dependencies:
387 | ansi-styles: 3.2.1
388 | escape-string-regexp: 1.0.5
389 | supports-color: 5.5.0
390 | dev: true
391 |
392 | /color-convert/1.9.3:
393 | resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==}
394 | dependencies:
395 | color-name: 1.1.3
396 | dev: true
397 |
398 | /color-name/1.1.3:
399 | resolution: {integrity: sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=}
400 | dev: true
401 |
402 | /colorette/1.2.2:
403 | resolution: {integrity: sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==}
404 | dev: true
405 |
406 | /convert-source-map/1.8.0:
407 | resolution: {integrity: sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==}
408 | dependencies:
409 | safe-buffer: 5.1.2
410 | dev: true
411 |
412 | /debug/4.3.1:
413 | resolution: {integrity: sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==}
414 | engines: {node: '>=6.0'}
415 | peerDependencies:
416 | supports-color: '*'
417 | peerDependenciesMeta:
418 | supports-color:
419 | optional: true
420 | dependencies:
421 | ms: 2.1.2
422 | dev: true
423 |
424 | /electron-to-chromium/1.3.758:
425 | resolution: {integrity: sha512-StYtiDbgZdjcck3OLwsVVVif7QDuD5m5v2gF+XpETp5lHa7X0y3129YBlYaHRPyj1fep1oAaC6i//gAdp+rhbw==}
426 | dev: true
427 |
428 | /esbuild/0.12.9:
429 | resolution: {integrity: sha512-MWRhAbMOJ9RJygCrt778rz/qNYgA4ZVj6aXnNPxFjs7PmIpb0fuB9Gmg5uWrr6n++XKwwm/RmSz6RR5JL2Ocsw==}
430 | hasBin: true
431 | requiresBuild: true
432 | dev: true
433 |
434 | /escalade/3.1.1:
435 | resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==}
436 | engines: {node: '>=6'}
437 | dev: true
438 |
439 | /escape-string-regexp/1.0.5:
440 | resolution: {integrity: sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=}
441 | engines: {node: '>=0.8.0'}
442 | dev: true
443 |
444 | /fsevents/2.3.2:
445 | resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==}
446 | engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
447 | os: [darwin]
448 | dev: true
449 | optional: true
450 |
451 | /function-bind/1.1.1:
452 | resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==}
453 | dev: true
454 |
455 | /gensync/1.0.0-beta.2:
456 | resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==}
457 | engines: {node: '>=6.9.0'}
458 | dev: true
459 |
460 | /globals/11.12.0:
461 | resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==}
462 | engines: {node: '>=4'}
463 | dev: true
464 |
465 | /has-flag/3.0.0:
466 | resolution: {integrity: sha1-tdRU3CGZriJWmfNGfloH87lVuv0=}
467 | engines: {node: '>=4'}
468 | dev: true
469 |
470 | /has/1.0.3:
471 | resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==}
472 | engines: {node: '>= 0.4.0'}
473 | dependencies:
474 | function-bind: 1.1.1
475 | dev: true
476 |
477 | /is-core-module/2.4.0:
478 | resolution: {integrity: sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A==}
479 | dependencies:
480 | has: 1.0.3
481 | dev: true
482 |
483 | /is-what/3.14.1:
484 | resolution: {integrity: sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==}
485 | dev: true
486 |
487 | /js-tokens/4.0.0:
488 | resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}
489 | dev: true
490 |
491 | /jsesc/2.5.2:
492 | resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==}
493 | engines: {node: '>=4'}
494 | hasBin: true
495 | dev: true
496 |
497 | /json5/2.2.0:
498 | resolution: {integrity: sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==}
499 | engines: {node: '>=6'}
500 | hasBin: true
501 | dependencies:
502 | minimist: 1.2.5
503 | dev: true
504 |
505 | /merge-anything/4.0.1:
506 | resolution: {integrity: sha512-KsFjBYc3juDoHz9Vzd5fte1nqp06H8SQ+yU344Dd0ZunwSgtltnC0kgKds8cbocJGyViLcBQuHkitbDXAqW+LQ==}
507 | dependencies:
508 | is-what: 3.14.1
509 | ts-toolbelt: 9.6.0
510 | dev: true
511 |
512 | /minimist/1.2.5:
513 | resolution: {integrity: sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==}
514 | dev: true
515 |
516 | /ms/2.1.2:
517 | resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==}
518 | dev: true
519 |
520 | /nanoid/3.1.23:
521 | resolution: {integrity: sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw==}
522 | engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
523 | hasBin: true
524 | dev: true
525 |
526 | /node-releases/1.1.73:
527 | resolution: {integrity: sha512-uW7fodD6pyW2FZNZnp/Z3hvWKeEW1Y8R1+1CnErE8cXFXzl5blBOoVB41CvMer6P6Q0S5FXDwcHgFd1Wj0U9zg==}
528 | dev: true
529 |
530 | /path-parse/1.0.7:
531 | resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==}
532 | dev: true
533 |
534 | /postcss/8.3.5:
535 | resolution: {integrity: sha512-NxTuJocUhYGsMiMFHDUkmjSKT3EdH4/WbGF6GCi1NDGk+vbcUTun4fpbOqaPtD8IIsztA2ilZm2DhYCuyN58gA==}
536 | engines: {node: ^10 || ^12 || >=14}
537 | dependencies:
538 | colorette: 1.2.2
539 | nanoid: 3.1.23
540 | source-map-js: 0.6.2
541 | dev: true
542 |
543 | /resolve/1.20.0:
544 | resolution: {integrity: sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==}
545 | dependencies:
546 | is-core-module: 2.4.0
547 | path-parse: 1.0.7
548 | dev: true
549 |
550 | /rollup/2.52.3:
551 | resolution: {integrity: sha512-QF3Sju8Kl2z0osI4unyOLyUudyhOMK6G0AeqJWgfiyigqLAlnNrfBcDWDx+f1cqn+JU2iIYVkDrgQ6/KtwEfrg==}
552 | engines: {node: '>=10.0.0'}
553 | hasBin: true
554 | optionalDependencies:
555 | fsevents: 2.3.2
556 | dev: true
557 |
558 | /safe-buffer/5.1.2:
559 | resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==}
560 | dev: true
561 |
562 | /semver/6.3.0:
563 | resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==}
564 | hasBin: true
565 | dev: true
566 |
567 | /solid-app-router/0.0.50-rc.0_solid-js@1.0.0:
568 | resolution: {integrity: sha512-KH9SYQ2EvACxwqp2j7XaZ6rOE8z0GbQpmew7tEhUiJcY8vl0BR2ZQm+MBP3gGmcm+MObsYTZ2cPl8FBaxcp86g==}
569 | peerDependencies:
570 | solid-js: '*'
571 | dependencies:
572 | solid-js: 1.0.0
573 | dev: false
574 |
575 | /solid-js/1.0.0:
576 | resolution: {integrity: sha512-5huTDVyMqZSjg5Sa4mwl15feK4il1cE68n4weL5NYGC8lX2wiDlcHhBdSB8trKgaJ50Q9/pwtLrQngFaDC+5Tw==}
577 | dev: false
578 |
579 | /solid-js/1.0.0-rc.9:
580 | resolution: {integrity: sha512-bhSihGFDn0Bh06shr+Qy6pb5Mrx571BnTGn0TNcYG34CU5lwFwe3czpHvmZzMXcnBv8dF+BkM+xWDyKtRq9z8Q==}
581 | dev: true
582 |
583 | /solid-meta/0.27.0_solid-js@1.0.0:
584 | resolution: {integrity: sha512-DudhektuDc35HgLznHLKD1s5CFGLqT65LXvJyHGarrKZN2CV57qatlwIvhG4R0Pc8sUx+8W9Cn056bFrF4v5qg==}
585 | peerDependencies:
586 | solid-js: ^1.0.0
587 | dependencies:
588 | solid-js: 1.0.0
589 | dev: false
590 |
591 | /solid-refresh/0.2.0-rc.0_solid-js@1.0.0-rc.9:
592 | resolution: {integrity: sha512-GbhouwMFCQ0HZAcM65q9vnRrNBlOlhDilPsNwC8lN8DcYOpCx54LZZWG23O3pttSGISl62Xm/qC4X0dJcpUr/Q==}
593 | peerDependencies:
594 | solid-js: '*'
595 | dependencies:
596 | solid-js: 1.0.0-rc.9
597 | dev: true
598 |
599 | /source-map-js/0.6.2:
600 | resolution: {integrity: sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug==}
601 | engines: {node: '>=0.10.0'}
602 | dev: true
603 |
604 | /source-map/0.5.7:
605 | resolution: {integrity: sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=}
606 | engines: {node: '>=0.10.0'}
607 | dev: true
608 |
609 | /supports-color/5.5.0:
610 | resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==}
611 | engines: {node: '>=4'}
612 | dependencies:
613 | has-flag: 3.0.0
614 | dev: true
615 |
616 | /to-fast-properties/2.0.0:
617 | resolution: {integrity: sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=}
618 | engines: {node: '>=4'}
619 | dev: true
620 |
621 | /ts-toolbelt/9.6.0:
622 | resolution: {integrity: sha512-nsZd8ZeNUzukXPlJmTBwUAuABDe/9qtVDelJeT/qW0ow3ZS3BsQJtNkan1802aM9Uf68/Y8ljw86Hu0h5IUW3w==}
623 | dev: true
624 |
625 | /vite-plugin-solid/2.0.0-rc.3:
626 | resolution: {integrity: sha512-L8nUkx916Dzt7Rm72JDW2j/RG/wn8eiGFfNKsTeQFc0PQ+wCjQO7IFGDrhDw+ZJ1FyBH0KpLjScjGwV3fJolZQ==}
627 | dependencies:
628 | '@babel/core': 7.14.6
629 | '@babel/preset-typescript': 7.14.5_@babel+core@7.14.6
630 | babel-preset-solid: 1.0.0-rc.9_@babel+core@7.14.6
631 | merge-anything: 4.0.1
632 | solid-js: 1.0.0-rc.9
633 | solid-refresh: 0.2.0-rc.0_solid-js@1.0.0-rc.9
634 | vite: 2.3.8
635 | transitivePeerDependencies:
636 | - supports-color
637 | dev: true
638 |
639 | /vite/2.3.8:
640 | resolution: {integrity: sha512-QiEx+iqNnJntSgSF2fWRQvRey9pORIrtNJzNyBJXwc+BdzWs83FQolX84cTBo393cfhObrtWa6180dAa4NLDiQ==}
641 | engines: {node: '>=12.0.0'}
642 | hasBin: true
643 | dependencies:
644 | esbuild: 0.12.9
645 | postcss: 8.3.5
646 | resolve: 1.20.0
647 | rollup: 2.52.3
648 | optionalDependencies:
649 | fsevents: 2.3.2
650 | dev: true
651 |
--------------------------------------------------------------------------------
/playground/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite';
2 | import solid from 'vite-plugin-solid';
3 |
4 | export default defineConfig({
5 | plugins: [solid()],
6 | build: {
7 | polyfillDynamicImport: false,
8 | target: 'esnext',
9 | },
10 | });
11 |
--------------------------------------------------------------------------------
/pnpm-lock.yaml:
--------------------------------------------------------------------------------
1 | lockfileVersion: 5.3
2 |
3 | specifiers:
4 | babel-preset-solid: ^1.0.0
5 | prettier: ^2.3.2
6 | rollup: ^2.52.3
7 | rollup-preset-solid: ^0.3.0
8 | solid-js: ^1.0.0
9 |
10 | devDependencies:
11 | babel-preset-solid: 1.0.0
12 | prettier: 2.3.2
13 | rollup: 2.52.3
14 | rollup-preset-solid: 0.3.0
15 | solid-js: 1.0.0
16 |
17 | packages:
18 |
19 | /@babel/code-frame/7.12.13:
20 | resolution: {integrity: sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==}
21 | dependencies:
22 | '@babel/highlight': 7.13.10
23 | dev: true
24 |
25 | /@babel/compat-data/7.13.15:
26 | resolution: {integrity: sha512-ltnibHKR1VnrU4ymHyQ/CXtNXI6yZC0oJThyW78Hft8XndANwi+9H+UIklBDraIjFEJzw8wmcM427oDd9KS5wA==}
27 | dev: true
28 |
29 | /@babel/core/7.13.15:
30 | resolution: {integrity: sha512-6GXmNYeNjS2Uz+uls5jalOemgIhnTMeaXo+yBUA72kC2uX/8VW6XyhVIo2L8/q0goKQA3EVKx0KOQpVKSeWadQ==}
31 | engines: {node: '>=6.9.0'}
32 | dependencies:
33 | '@babel/code-frame': 7.12.13
34 | '@babel/generator': 7.13.9
35 | '@babel/helper-compilation-targets': 7.13.13_@babel+core@7.13.15
36 | '@babel/helper-module-transforms': 7.13.14
37 | '@babel/helpers': 7.13.10
38 | '@babel/parser': 7.13.15
39 | '@babel/template': 7.12.13
40 | '@babel/traverse': 7.13.15
41 | '@babel/types': 7.13.14
42 | convert-source-map: 1.7.0
43 | debug: 4.3.1
44 | gensync: 1.0.0-beta.2
45 | json5: 2.2.0
46 | semver: 6.3.0
47 | source-map: 0.5.7
48 | transitivePeerDependencies:
49 | - supports-color
50 | dev: true
51 |
52 | /@babel/generator/7.13.9:
53 | resolution: {integrity: sha512-mHOOmY0Axl/JCTkxTU6Lf5sWOg/v8nUa+Xkt4zMTftX0wqmb6Sh7J8gvcehBw7q0AhrhAR+FDacKjCZ2X8K+Sw==}
54 | dependencies:
55 | '@babel/types': 7.13.14
56 | jsesc: 2.5.2
57 | source-map: 0.5.7
58 | dev: true
59 |
60 | /@babel/helper-compilation-targets/7.13.13_@babel+core@7.13.15:
61 | resolution: {integrity: sha512-q1kcdHNZehBwD9jYPh3WyXcsFERi39X4I59I3NadciWtNDyZ6x+GboOxncFK0kXlKIv6BJm5acncehXWUjWQMQ==}
62 | peerDependencies:
63 | '@babel/core': ^7.0.0
64 | dependencies:
65 | '@babel/compat-data': 7.13.15
66 | '@babel/core': 7.13.15
67 | '@babel/helper-validator-option': 7.12.17
68 | browserslist: 4.16.3
69 | semver: 6.3.0
70 | dev: true
71 |
72 | /@babel/helper-create-class-features-plugin/7.13.11_@babel+core@7.13.15:
73 | resolution: {integrity: sha512-ays0I7XYq9xbjCSvT+EvysLgfc3tOkwCULHjrnscGT3A9qD4sk3wXnJ3of0MAWsWGjdinFvajHU2smYuqXKMrw==}
74 | peerDependencies:
75 | '@babel/core': ^7.0.0
76 | dependencies:
77 | '@babel/core': 7.13.15
78 | '@babel/helper-function-name': 7.12.13
79 | '@babel/helper-member-expression-to-functions': 7.13.12
80 | '@babel/helper-optimise-call-expression': 7.12.13
81 | '@babel/helper-replace-supers': 7.13.12
82 | '@babel/helper-split-export-declaration': 7.12.13
83 | transitivePeerDependencies:
84 | - supports-color
85 | dev: true
86 |
87 | /@babel/helper-function-name/7.12.13:
88 | resolution: {integrity: sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==}
89 | dependencies:
90 | '@babel/helper-get-function-arity': 7.12.13
91 | '@babel/template': 7.12.13
92 | '@babel/types': 7.13.14
93 | dev: true
94 |
95 | /@babel/helper-get-function-arity/7.12.13:
96 | resolution: {integrity: sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg==}
97 | dependencies:
98 | '@babel/types': 7.13.14
99 | dev: true
100 |
101 | /@babel/helper-member-expression-to-functions/7.13.12:
102 | resolution: {integrity: sha512-48ql1CLL59aKbU94Y88Xgb2VFy7a95ykGRbJJaaVv+LX5U8wFpLfiGXJJGUozsmA1oEh/o5Bp60Voq7ACyA/Sw==}
103 | dependencies:
104 | '@babel/types': 7.13.14
105 | dev: true
106 |
107 | /@babel/helper-module-imports/7.13.12:
108 | resolution: {integrity: sha512-4cVvR2/1B693IuOvSI20xqqa/+bl7lqAMR59R4iu39R9aOX8/JoYY1sFaNvUMyMBGnHdwvJgUrzNLoUZxXypxA==}
109 | dependencies:
110 | '@babel/types': 7.13.14
111 | dev: true
112 |
113 | /@babel/helper-module-imports/7.14.5:
114 | resolution: {integrity: sha512-SwrNHu5QWS84XlHwGYPDtCxcA0hrSlL2yhWYLgeOc0w7ccOl2qv4s/nARI0aYZW+bSwAL5CukeXA47B/1NKcnQ==}
115 | engines: {node: '>=6.9.0'}
116 | dependencies:
117 | '@babel/types': 7.14.5
118 | dev: true
119 |
120 | /@babel/helper-module-transforms/7.13.14:
121 | resolution: {integrity: sha512-QuU/OJ0iAOSIatyVZmfqB0lbkVP0kDRiKj34xy+QNsnVZi/PA6BoSoreeqnxxa9EHFAIL0R9XOaAR/G9WlIy5g==}
122 | dependencies:
123 | '@babel/helper-module-imports': 7.13.12
124 | '@babel/helper-replace-supers': 7.13.12
125 | '@babel/helper-simple-access': 7.13.12
126 | '@babel/helper-split-export-declaration': 7.12.13
127 | '@babel/helper-validator-identifier': 7.12.11
128 | '@babel/template': 7.12.13
129 | '@babel/traverse': 7.13.15
130 | '@babel/types': 7.13.14
131 | transitivePeerDependencies:
132 | - supports-color
133 | dev: true
134 |
135 | /@babel/helper-optimise-call-expression/7.12.13:
136 | resolution: {integrity: sha512-BdWQhoVJkp6nVjB7nkFWcn43dkprYauqtk++Py2eaf/GRDFm5BxRqEIZCiHlZUGAVmtwKcsVL1dC68WmzeFmiA==}
137 | dependencies:
138 | '@babel/types': 7.13.14
139 | dev: true
140 |
141 | /@babel/helper-plugin-utils/7.13.0:
142 | resolution: {integrity: sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ==}
143 | dev: true
144 |
145 | /@babel/helper-plugin-utils/7.14.5:
146 | resolution: {integrity: sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==}
147 | engines: {node: '>=6.9.0'}
148 | dev: true
149 |
150 | /@babel/helper-replace-supers/7.13.12:
151 | resolution: {integrity: sha512-Gz1eiX+4yDO8mT+heB94aLVNCL+rbuT2xy4YfyNqu8F+OI6vMvJK891qGBTqL9Uc8wxEvRW92Id6G7sDen3fFw==}
152 | dependencies:
153 | '@babel/helper-member-expression-to-functions': 7.13.12
154 | '@babel/helper-optimise-call-expression': 7.12.13
155 | '@babel/traverse': 7.13.15
156 | '@babel/types': 7.13.14
157 | transitivePeerDependencies:
158 | - supports-color
159 | dev: true
160 |
161 | /@babel/helper-simple-access/7.13.12:
162 | resolution: {integrity: sha512-7FEjbrx5SL9cWvXioDbnlYTppcZGuCY6ow3/D5vMggb2Ywgu4dMrpTJX0JdQAIcRRUElOIxF3yEooa9gUb9ZbA==}
163 | dependencies:
164 | '@babel/types': 7.13.14
165 | dev: true
166 |
167 | /@babel/helper-split-export-declaration/7.12.13:
168 | resolution: {integrity: sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg==}
169 | dependencies:
170 | '@babel/types': 7.13.14
171 | dev: true
172 |
173 | /@babel/helper-validator-identifier/7.12.11:
174 | resolution: {integrity: sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==}
175 | dev: true
176 |
177 | /@babel/helper-validator-identifier/7.14.5:
178 | resolution: {integrity: sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==}
179 | engines: {node: '>=6.9.0'}
180 | dev: true
181 |
182 | /@babel/helper-validator-option/7.12.17:
183 | resolution: {integrity: sha512-TopkMDmLzq8ngChwRlyjR6raKD6gMSae4JdYDB8bByKreQgG0RBTuKe9LRxW3wFtUnjxOPRKBDwEH6Mg5KeDfw==}
184 | dev: true
185 |
186 | /@babel/helpers/7.13.10:
187 | resolution: {integrity: sha512-4VO883+MWPDUVRF3PhiLBUFHoX/bsLTGFpFK/HqvvfBZz2D57u9XzPVNFVBTc0PW/CWR9BXTOKt8NF4DInUHcQ==}
188 | dependencies:
189 | '@babel/template': 7.12.13
190 | '@babel/traverse': 7.13.15
191 | '@babel/types': 7.13.14
192 | transitivePeerDependencies:
193 | - supports-color
194 | dev: true
195 |
196 | /@babel/highlight/7.13.10:
197 | resolution: {integrity: sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==}
198 | dependencies:
199 | '@babel/helper-validator-identifier': 7.12.11
200 | chalk: 2.4.2
201 | js-tokens: 4.0.0
202 | dev: true
203 |
204 | /@babel/parser/7.13.15:
205 | resolution: {integrity: sha512-b9COtcAlVEQljy/9fbcMHpG+UIW9ReF+gpaxDHTlZd0c6/UU9ng8zdySAW9sRTzpvcdCHn6bUcbuYUgGzLAWVQ==}
206 | engines: {node: '>=6.0.0'}
207 | hasBin: true
208 | dev: true
209 |
210 | /@babel/plugin-syntax-jsx/7.12.13_@babel+core@7.13.15:
211 | resolution: {integrity: sha512-d4HM23Q1K7oq/SLNmG6mRt85l2csmQ0cHRaxRXjKW0YFdEXqlZ5kzFQKH5Uc3rDJECgu+yCRgPkG04Mm98R/1g==}
212 | peerDependencies:
213 | '@babel/core': ^7.0.0-0
214 | dependencies:
215 | '@babel/core': 7.13.15
216 | '@babel/helper-plugin-utils': 7.13.0
217 | dev: true
218 |
219 | /@babel/plugin-syntax-jsx/7.14.5:
220 | resolution: {integrity: sha512-ohuFIsOMXJnbOMRfX7/w7LocdR6R7whhuRD4ax8IipLcLPlZGJKkBxgHp++U4N/vKyU16/YDQr2f5seajD3jIw==}
221 | engines: {node: '>=6.9.0'}
222 | peerDependencies:
223 | '@babel/core': ^7.0.0-0
224 | dependencies:
225 | '@babel/helper-plugin-utils': 7.14.5
226 | dev: true
227 |
228 | /@babel/plugin-syntax-typescript/7.12.13_@babel+core@7.13.15:
229 | resolution: {integrity: sha512-cHP3u1JiUiG2LFDKbXnwVad81GvfyIOmCD6HIEId6ojrY0Drfy2q1jw7BwN7dE84+kTnBjLkXoL3IEy/3JPu2w==}
230 | peerDependencies:
231 | '@babel/core': ^7.0.0-0
232 | dependencies:
233 | '@babel/core': 7.13.15
234 | '@babel/helper-plugin-utils': 7.13.0
235 | dev: true
236 |
237 | /@babel/plugin-transform-typescript/7.13.0_@babel+core@7.13.15:
238 | resolution: {integrity: sha512-elQEwluzaU8R8dbVuW2Q2Y8Nznf7hnjM7+DSCd14Lo5fF63C9qNLbwZYbmZrtV9/ySpSUpkRpQXvJb6xyu4hCQ==}
239 | peerDependencies:
240 | '@babel/core': ^7.0.0-0
241 | dependencies:
242 | '@babel/core': 7.13.15
243 | '@babel/helper-create-class-features-plugin': 7.13.11_@babel+core@7.13.15
244 | '@babel/helper-plugin-utils': 7.13.0
245 | '@babel/plugin-syntax-typescript': 7.12.13_@babel+core@7.13.15
246 | transitivePeerDependencies:
247 | - supports-color
248 | dev: true
249 |
250 | /@babel/preset-typescript/7.13.0_@babel+core@7.13.15:
251 | resolution: {integrity: sha512-LXJwxrHy0N3f6gIJlYbLta1D9BDtHpQeqwzM0LIfjDlr6UE/D5Mc7W4iDiQzaE+ks0sTjT26ArcHWnJVt0QiHw==}
252 | peerDependencies:
253 | '@babel/core': ^7.0.0-0
254 | dependencies:
255 | '@babel/core': 7.13.15
256 | '@babel/helper-plugin-utils': 7.13.0
257 | '@babel/helper-validator-option': 7.12.17
258 | '@babel/plugin-transform-typescript': 7.13.0_@babel+core@7.13.15
259 | transitivePeerDependencies:
260 | - supports-color
261 | dev: true
262 |
263 | /@babel/template/7.12.13:
264 | resolution: {integrity: sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA==}
265 | dependencies:
266 | '@babel/code-frame': 7.12.13
267 | '@babel/parser': 7.13.15
268 | '@babel/types': 7.13.14
269 | dev: true
270 |
271 | /@babel/traverse/7.13.15:
272 | resolution: {integrity: sha512-/mpZMNvj6bce59Qzl09fHEs8Bt8NnpEDQYleHUPZQ3wXUMvXi+HJPLars68oAbmp839fGoOkv2pSL2z9ajCIaQ==}
273 | dependencies:
274 | '@babel/code-frame': 7.12.13
275 | '@babel/generator': 7.13.9
276 | '@babel/helper-function-name': 7.12.13
277 | '@babel/helper-split-export-declaration': 7.12.13
278 | '@babel/parser': 7.13.15
279 | '@babel/types': 7.13.14
280 | debug: 4.3.1
281 | globals: 11.12.0
282 | transitivePeerDependencies:
283 | - supports-color
284 | dev: true
285 |
286 | /@babel/types/7.13.14:
287 | resolution: {integrity: sha512-A2aa3QTkWoyqsZZFl56MLUsfmh7O0gN41IPvXAE/++8ojpbz12SszD7JEGYVdn4f9Kt4amIei07swF1h4AqmmQ==}
288 | dependencies:
289 | '@babel/helper-validator-identifier': 7.12.11
290 | lodash: 4.17.21
291 | to-fast-properties: 2.0.0
292 | dev: true
293 |
294 | /@babel/types/7.14.5:
295 | resolution: {integrity: sha512-M/NzBpEL95I5Hh4dwhin5JlE7EzO5PHMAuzjxss3tiOBD46KfQvVedN/3jEPZvdRvtsK2222XfdHogNIttFgcg==}
296 | engines: {node: '>=6.9.0'}
297 | dependencies:
298 | '@babel/helper-validator-identifier': 7.14.5
299 | to-fast-properties: 2.0.0
300 | dev: true
301 |
302 | /@rollup/plugin-babel/5.3.0_00676c3c35a42c3b52b7e4972e8f6849:
303 | resolution: {integrity: sha512-9uIC8HZOnVLrLHxayq/PTzw+uS25E14KPUBh5ktF+18Mjo5yK0ToMMx6epY0uEgkjwJw0aBW4x2horYXh8juWw==}
304 | engines: {node: '>= 10.0.0'}
305 | peerDependencies:
306 | '@babel/core': ^7.0.0
307 | '@types/babel__core': ^7.1.9
308 | rollup: ^1.20.0||^2.0.0
309 | peerDependenciesMeta:
310 | '@types/babel__core':
311 | optional: true
312 | dependencies:
313 | '@babel/core': 7.13.15
314 | '@babel/helper-module-imports': 7.13.12
315 | '@rollup/pluginutils': 3.1.0_rollup@2.45.1
316 | rollup: 2.45.1
317 | dev: true
318 |
319 | /@rollup/plugin-node-resolve/11.2.1_rollup@2.45.1:
320 | resolution: {integrity: sha512-yc2n43jcqVyGE2sqV5/YCmocy9ArjVAP/BeXyTtADTBBX6V0e5UMqwO8CdQ0kzjb6zu5P1qMzsScCMRvE9OlVg==}
321 | engines: {node: '>= 10.0.0'}
322 | peerDependencies:
323 | rollup: ^1.20.0||^2.0.0
324 | dependencies:
325 | '@rollup/pluginutils': 3.1.0_rollup@2.45.1
326 | '@types/resolve': 1.17.1
327 | builtin-modules: 3.2.0
328 | deepmerge: 4.2.2
329 | is-module: 1.0.0
330 | resolve: 1.20.0
331 | rollup: 2.45.1
332 | dev: true
333 |
334 | /@rollup/pluginutils/3.1.0_rollup@2.45.1:
335 | resolution: {integrity: sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==}
336 | engines: {node: '>= 8.0.0'}
337 | peerDependencies:
338 | rollup: ^1.20.0||^2.0.0
339 | dependencies:
340 | '@types/estree': 0.0.39
341 | estree-walker: 1.0.1
342 | picomatch: 2.2.3
343 | rollup: 2.45.1
344 | dev: true
345 |
346 | /@types/estree/0.0.39:
347 | resolution: {integrity: sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==}
348 | dev: true
349 |
350 | /@types/node/14.14.37:
351 | resolution: {integrity: sha512-XYmBiy+ohOR4Lh5jE379fV2IU+6Jn4g5qASinhitfyO71b/sCo6MKsMLF5tc7Zf2CE8hViVQyYSobJNke8OvUw==}
352 | dev: true
353 |
354 | /@types/resolve/1.17.1:
355 | resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==}
356 | dependencies:
357 | '@types/node': 14.14.37
358 | dev: true
359 |
360 | /ansi-styles/3.2.1:
361 | resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==}
362 | engines: {node: '>=4'}
363 | dependencies:
364 | color-convert: 1.9.3
365 | dev: true
366 |
367 | /babel-plugin-jsx-dom-expressions/0.25.16_@babel+core@7.13.15:
368 | resolution: {integrity: sha512-yvfjb0xeVVzWCbFkrr3Yx/cJBLh5izv9JuMLXu2u9GX1+oWvdg6CKRs62ZFUKHLeRu7lJKMdW0GIXXNJigRdFw==}
369 | dependencies:
370 | '@babel/helper-module-imports': 7.13.12
371 | '@babel/plugin-syntax-jsx': 7.12.13_@babel+core@7.13.15
372 | '@babel/types': 7.13.14
373 | transitivePeerDependencies:
374 | - '@babel/core'
375 | dev: true
376 |
377 | /babel-plugin-jsx-dom-expressions/0.29.0:
378 | resolution: {integrity: sha512-p0uI9OpgRAGvym3LLzIMMaH+ZpW0khi0JwbnZ7cARE9nOBw1dVjrtGNGt8KyYzfIg0o9nkaYZ+Jaja8SgMy3/A==}
379 | dependencies:
380 | '@babel/helper-module-imports': 7.14.5
381 | '@babel/plugin-syntax-jsx': 7.14.5
382 | '@babel/types': 7.14.5
383 | transitivePeerDependencies:
384 | - '@babel/core'
385 | dev: true
386 |
387 | /babel-preset-solid/0.24.16_@babel+core@7.13.15:
388 | resolution: {integrity: sha512-NvKxmPStRTNNwK5mIZCfvB0GNZVqgUy6/nGVNVaISvkxwv8gZSSQNHMtdmCXINZ9I89aoISlMae4bkkHOXVxTg==}
389 | dependencies:
390 | babel-plugin-jsx-dom-expressions: 0.25.16_@babel+core@7.13.15
391 | transitivePeerDependencies:
392 | - '@babel/core'
393 | dev: true
394 |
395 | /babel-preset-solid/1.0.0:
396 | resolution: {integrity: sha512-fXWDS+5Mh2PgjFvIEpfztMHORd1MutUsnpLYEl40HvwbdiM8zYaLxkHlSdAoRJ8B8HuWvEjBt8y9jzChq+SRAg==}
397 | dependencies:
398 | babel-plugin-jsx-dom-expressions: 0.29.0
399 | transitivePeerDependencies:
400 | - '@babel/core'
401 | dev: true
402 |
403 | /browserslist/4.16.3:
404 | resolution: {integrity: sha512-vIyhWmIkULaq04Gt93txdh+j02yX/JzlyhLYbV3YQCn/zvES3JnY7TifHHvvr1w5hTDluNKMkV05cs4vy8Q7sw==}
405 | engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
406 | hasBin: true
407 | dependencies:
408 | caniuse-lite: 1.0.30001208
409 | colorette: 1.2.2
410 | electron-to-chromium: 1.3.712
411 | escalade: 3.1.1
412 | node-releases: 1.1.71
413 | dev: true
414 |
415 | /buffer-from/1.1.1:
416 | resolution: {integrity: sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==}
417 | dev: true
418 |
419 | /builtin-modules/3.2.0:
420 | resolution: {integrity: sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==}
421 | engines: {node: '>=6'}
422 | dev: true
423 |
424 | /caniuse-lite/1.0.30001208:
425 | resolution: {integrity: sha512-OE5UE4+nBOro8Dyvv0lfx+SRtfVIOM9uhKqFmJeUbGriqhhStgp1A0OyBpgy3OUF8AhYCT+PVwPC1gMl2ZcQMA==}
426 | dev: true
427 |
428 | /chalk/2.4.2:
429 | resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==}
430 | engines: {node: '>=4'}
431 | dependencies:
432 | ansi-styles: 3.2.1
433 | escape-string-regexp: 1.0.5
434 | supports-color: 5.5.0
435 | dev: true
436 |
437 | /color-convert/1.9.3:
438 | resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==}
439 | dependencies:
440 | color-name: 1.1.3
441 | dev: true
442 |
443 | /color-name/1.1.3:
444 | resolution: {integrity: sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=}
445 | dev: true
446 |
447 | /colorette/1.2.2:
448 | resolution: {integrity: sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==}
449 | dev: true
450 |
451 | /commander/2.20.3:
452 | resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==}
453 | dev: true
454 |
455 | /convert-source-map/1.7.0:
456 | resolution: {integrity: sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==}
457 | dependencies:
458 | safe-buffer: 5.1.2
459 | dev: true
460 |
461 | /debug/4.3.1:
462 | resolution: {integrity: sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==}
463 | engines: {node: '>=6.0'}
464 | peerDependencies:
465 | supports-color: '*'
466 | peerDependenciesMeta:
467 | supports-color:
468 | optional: true
469 | dependencies:
470 | ms: 2.1.2
471 | dev: true
472 |
473 | /deepmerge/4.2.2:
474 | resolution: {integrity: sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==}
475 | engines: {node: '>=0.10.0'}
476 | dev: true
477 |
478 | /electron-to-chromium/1.3.712:
479 | resolution: {integrity: sha512-3kRVibBeCM4vsgoHHGKHmPocLqtFAGTrebXxxtgKs87hNUzXrX2NuS3jnBys7IozCnw7viQlozxKkmty2KNfrw==}
480 | dev: true
481 |
482 | /esbuild/0.9.7:
483 | resolution: {integrity: sha512-VtUf6aQ89VTmMLKrWHYG50uByMF4JQlVysb8dmg6cOgW8JnFCipmz7p+HNBl+RR3LLCuBxFGVauAe2wfnF9bLg==}
484 | hasBin: true
485 | requiresBuild: true
486 | dev: true
487 |
488 | /escalade/3.1.1:
489 | resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==}
490 | engines: {node: '>=6'}
491 | dev: true
492 |
493 | /escape-string-regexp/1.0.5:
494 | resolution: {integrity: sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=}
495 | engines: {node: '>=0.8.0'}
496 | dev: true
497 |
498 | /estree-walker/1.0.1:
499 | resolution: {integrity: sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==}
500 | dev: true
501 |
502 | /fsevents/2.3.2:
503 | resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==}
504 | engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
505 | os: [darwin]
506 | dev: true
507 | optional: true
508 |
509 | /function-bind/1.1.1:
510 | resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==}
511 | dev: true
512 |
513 | /gensync/1.0.0-beta.2:
514 | resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==}
515 | engines: {node: '>=6.9.0'}
516 | dev: true
517 |
518 | /globals/11.12.0:
519 | resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==}
520 | engines: {node: '>=4'}
521 | dev: true
522 |
523 | /has-flag/3.0.0:
524 | resolution: {integrity: sha1-tdRU3CGZriJWmfNGfloH87lVuv0=}
525 | engines: {node: '>=4'}
526 | dev: true
527 |
528 | /has-flag/4.0.0:
529 | resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==}
530 | engines: {node: '>=8'}
531 | dev: true
532 |
533 | /has/1.0.3:
534 | resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==}
535 | engines: {node: '>= 0.4.0'}
536 | dependencies:
537 | function-bind: 1.1.1
538 | dev: true
539 |
540 | /is-core-module/2.2.0:
541 | resolution: {integrity: sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==}
542 | dependencies:
543 | has: 1.0.3
544 | dev: true
545 |
546 | /is-module/1.0.0:
547 | resolution: {integrity: sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=}
548 | dev: true
549 |
550 | /is-what/3.14.1:
551 | resolution: {integrity: sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==}
552 | dev: true
553 |
554 | /jest-worker/26.6.2:
555 | resolution: {integrity: sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==}
556 | engines: {node: '>= 10.13.0'}
557 | dependencies:
558 | '@types/node': 14.14.37
559 | merge-stream: 2.0.0
560 | supports-color: 7.2.0
561 | dev: true
562 |
563 | /js-tokens/4.0.0:
564 | resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}
565 | dev: true
566 |
567 | /jsesc/2.5.2:
568 | resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==}
569 | engines: {node: '>=4'}
570 | hasBin: true
571 | dev: true
572 |
573 | /json5/2.2.0:
574 | resolution: {integrity: sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==}
575 | engines: {node: '>=6'}
576 | hasBin: true
577 | dependencies:
578 | minimist: 1.2.5
579 | dev: true
580 |
581 | /lodash/4.17.21:
582 | resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==}
583 | dev: true
584 |
585 | /merge-anything/4.0.1:
586 | resolution: {integrity: sha512-KsFjBYc3juDoHz9Vzd5fte1nqp06H8SQ+yU344Dd0ZunwSgtltnC0kgKds8cbocJGyViLcBQuHkitbDXAqW+LQ==}
587 | dependencies:
588 | is-what: 3.14.1
589 | ts-toolbelt: 9.6.0
590 | dev: true
591 |
592 | /merge-stream/2.0.0:
593 | resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==}
594 | dev: true
595 |
596 | /minimist/1.2.5:
597 | resolution: {integrity: sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==}
598 | dev: true
599 |
600 | /ms/2.1.2:
601 | resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==}
602 | dev: true
603 |
604 | /node-releases/1.1.71:
605 | resolution: {integrity: sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==}
606 | dev: true
607 |
608 | /path-parse/1.0.6:
609 | resolution: {integrity: sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==}
610 | dev: true
611 |
612 | /picomatch/2.2.3:
613 | resolution: {integrity: sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==}
614 | engines: {node: '>=8.6'}
615 | dev: true
616 |
617 | /prettier/2.3.2:
618 | resolution: {integrity: sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ==}
619 | engines: {node: '>=10.13.0'}
620 | hasBin: true
621 | dev: true
622 |
623 | /randombytes/2.1.0:
624 | resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==}
625 | dependencies:
626 | safe-buffer: 5.2.1
627 | dev: true
628 |
629 | /resolve/1.20.0:
630 | resolution: {integrity: sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==}
631 | dependencies:
632 | is-core-module: 2.2.0
633 | path-parse: 1.0.6
634 | dev: true
635 |
636 | /rollup-plugin-terser/7.0.2_rollup@2.45.1:
637 | resolution: {integrity: sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==}
638 | peerDependencies:
639 | rollup: ^2.0.0
640 | dependencies:
641 | '@babel/code-frame': 7.12.13
642 | jest-worker: 26.6.2
643 | rollup: 2.45.1
644 | serialize-javascript: 4.0.0
645 | terser: 5.6.1
646 | dev: true
647 |
648 | /rollup-preset-solid/0.3.0:
649 | resolution: {integrity: sha512-xlxfzpff5+r3nLwQFQqgjlG+a8VQBiXnQuw4rMviiip9E52s/K8YinkxdkEj1tXIuw6fA+YHTenlu71KdnqRWA==}
650 | dependencies:
651 | '@babel/core': 7.13.15
652 | '@babel/preset-typescript': 7.13.0_@babel+core@7.13.15
653 | '@rollup/plugin-babel': 5.3.0_00676c3c35a42c3b52b7e4972e8f6849
654 | '@rollup/plugin-node-resolve': 11.2.1_rollup@2.45.1
655 | babel-preset-solid: 0.24.16_@babel+core@7.13.15
656 | colorette: 1.2.2
657 | esbuild: 0.9.7
658 | merge-anything: 4.0.1
659 | rollup: 2.45.1
660 | rollup-plugin-terser: 7.0.2_rollup@2.45.1
661 | typescript: 4.2.4
662 | transitivePeerDependencies:
663 | - '@types/babel__core'
664 | - supports-color
665 | dev: true
666 |
667 | /rollup/2.45.1:
668 | resolution: {integrity: sha512-vPD+JoDj3CY8k6m1bLcAFttXMe78P4CMxoau0iLVS60+S9kLsv2379xaGy4NgYWu+h2WTlucpoLPAoUoixFBag==}
669 | engines: {node: '>=10.0.0'}
670 | hasBin: true
671 | optionalDependencies:
672 | fsevents: 2.3.2
673 | dev: true
674 |
675 | /rollup/2.52.3:
676 | resolution: {integrity: sha512-QF3Sju8Kl2z0osI4unyOLyUudyhOMK6G0AeqJWgfiyigqLAlnNrfBcDWDx+f1cqn+JU2iIYVkDrgQ6/KtwEfrg==}
677 | engines: {node: '>=10.0.0'}
678 | hasBin: true
679 | optionalDependencies:
680 | fsevents: 2.3.2
681 | dev: true
682 |
683 | /safe-buffer/5.1.2:
684 | resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==}
685 | dev: true
686 |
687 | /safe-buffer/5.2.1:
688 | resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
689 | dev: true
690 |
691 | /semver/6.3.0:
692 | resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==}
693 | hasBin: true
694 | dev: true
695 |
696 | /serialize-javascript/4.0.0:
697 | resolution: {integrity: sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==}
698 | dependencies:
699 | randombytes: 2.1.0
700 | dev: true
701 |
702 | /solid-js/1.0.0:
703 | resolution: {integrity: sha512-5huTDVyMqZSjg5Sa4mwl15feK4il1cE68n4weL5NYGC8lX2wiDlcHhBdSB8trKgaJ50Q9/pwtLrQngFaDC+5Tw==}
704 | dev: true
705 |
706 | /source-map-support/0.5.19:
707 | resolution: {integrity: sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==}
708 | dependencies:
709 | buffer-from: 1.1.1
710 | source-map: 0.6.1
711 | dev: true
712 |
713 | /source-map/0.5.7:
714 | resolution: {integrity: sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=}
715 | engines: {node: '>=0.10.0'}
716 | dev: true
717 |
718 | /source-map/0.6.1:
719 | resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==}
720 | engines: {node: '>=0.10.0'}
721 | dev: true
722 |
723 | /source-map/0.7.3:
724 | resolution: {integrity: sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==}
725 | engines: {node: '>= 8'}
726 | dev: true
727 |
728 | /supports-color/5.5.0:
729 | resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==}
730 | engines: {node: '>=4'}
731 | dependencies:
732 | has-flag: 3.0.0
733 | dev: true
734 |
735 | /supports-color/7.2.0:
736 | resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==}
737 | engines: {node: '>=8'}
738 | dependencies:
739 | has-flag: 4.0.0
740 | dev: true
741 |
742 | /terser/5.6.1:
743 | resolution: {integrity: sha512-yv9YLFQQ+3ZqgWCUk+pvNJwgUTdlIxUk1WTN+RnaFJe2L7ipG2csPT0ra2XRm7Cs8cxN7QXmK1rFzEwYEQkzXw==}
744 | engines: {node: '>=10'}
745 | hasBin: true
746 | dependencies:
747 | commander: 2.20.3
748 | source-map: 0.7.3
749 | source-map-support: 0.5.19
750 | dev: true
751 |
752 | /to-fast-properties/2.0.0:
753 | resolution: {integrity: sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=}
754 | engines: {node: '>=4'}
755 | dev: true
756 |
757 | /ts-toolbelt/9.6.0:
758 | resolution: {integrity: sha512-nsZd8ZeNUzukXPlJmTBwUAuABDe/9qtVDelJeT/qW0ow3ZS3BsQJtNkan1802aM9Uf68/Y8ljw86Hu0h5IUW3w==}
759 | dev: true
760 |
761 | /typescript/4.2.4:
762 | resolution: {integrity: sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==}
763 | engines: {node: '>=4.2.0'}
764 | hasBin: true
765 | dev: true
766 |
--------------------------------------------------------------------------------
/rollup.config.js:
--------------------------------------------------------------------------------
1 | import withSolid from 'rollup-preset-solid';
2 |
3 | export default withSolid({ input: 'src/index.tsx' });
4 |
--------------------------------------------------------------------------------
/src/createApp.tsx:
--------------------------------------------------------------------------------
1 | import type { Component, JSX } from 'solid-js';
2 | import { createComponent as component, render } from 'solid-js/web';
3 |
4 | interface App {
5 | /**
6 | * Add a Provider to the app. The list of provider will be merged
7 | * at mount time.
8 | *
9 | * @param provider {Component} - The provider to add to the list
10 | * @param opts {Record} - The optional options
11 | */
12 | use(provider: Component, options?: Props): App;
13 |
14 | /**
15 | * It first merges all the Providers and then uses the `render` function
16 | * to mount the application.
17 | *
18 | * @param dom {HTMLElement | string} - The element to mount your app on
19 | */
20 | mount(domElement: HTMLElement | string): ReturnType;
21 | }
22 |
23 | interface Provider {
24 | provider: Component;
25 | opts?: Record;
26 | }
27 |
28 | interface MergeParams {
29 | app: (props?: Record) => JSX.Element;
30 | props: Record;
31 | providers: Provider[];
32 | }
33 |
34 | /**
35 | * This utils function automatically merge the provider in the order they
36 | * were provided. It turns the following calls:
37 | *
38 | * const app = createApp(App)
39 | *
40 | * app.use(RouterProvider)
41 | * app.use(I18nProvider, { dict })
42 | * app.use(GlobalStoreProvider)
43 | *
44 | * app.mount('#app')
45 | *
46 | * into something like that:
47 | *
48 | * render(
49 | *
50 | *
51 | *
52 | *
53 | *
54 | *
55 | * ,
56 | * document.querySelector('#app')
57 | * )
58 | */
59 | function mergeProviders({ app, props = {}, providers }: MergeParams) {
60 | return providers.reduceRight(
61 | (application, { provider, opts = {} }) => () =>
62 | component(provider, {
63 | ...opts,
64 |
65 | get children() {
66 | return application();
67 | },
68 | }),
69 | () => component(app, props),
70 | );
71 | }
72 |
73 | export function createApp(app: (props?: AppProps) => JSX.Element, props?: AppProps) {
74 | const providers: Provider[] = [];
75 |
76 | const _app: App = {
77 | use(provider, opts = {} as any) {
78 | providers.push({ provider, opts });
79 | return _app;
80 | },
81 |
82 | mount(dom) {
83 | const application = mergeProviders({ app, props, providers });
84 | const root = typeof dom === 'string' ? document.querySelector(dom) : dom;
85 | return render(application, root);
86 | },
87 | };
88 |
89 | return _app;
90 | }
91 |
--------------------------------------------------------------------------------
/src/createGlobalSignal.tsx:
--------------------------------------------------------------------------------
1 | import { createRoot, createSignal } from 'solid-js';
2 |
3 | interface Options {
4 | name?: string;
5 | internal?: boolean;
6 | }
7 |
8 | type AreEqual = boolean | ((prev: TState, next: TState) => boolean);
9 |
10 | /**
11 | * This function is meant to create a global signal registered in its
12 | * own reactive context, essentially allowing the creation outside of
13 | * your solid application.
14 | *
15 | * @param value - Object state to make reactive
16 | * @param areEqual - Comparator method
17 | * @param options - See [official doc](https://github.com/ryansolid/solid/blob/master/documentation/api.md#createsignalinitialvalue-boolean--comparatorfn-getvaluefn-setvaluefn)
18 | */
19 | export function createGlobalSignal(
20 | value: TState,
21 | areEqual?: AreEqual,
22 | options?: Options,
23 | ) {
24 | let globalSignal: [() => TState, (value: TState) => TState];
25 |
26 | createRoot(() => {
27 | globalSignal = createSignal(value, areEqual, options);
28 | });
29 |
30 | return globalSignal;
31 | }
32 |
--------------------------------------------------------------------------------
/src/createGlobalState.tsx:
--------------------------------------------------------------------------------
1 | import { createRoot } from 'solid-js';
2 | import { createStore, SetStoreFunction, Store } from 'solid-js/store';
3 |
4 | interface Options {
5 | name?: string;
6 | }
7 |
8 | /**
9 | * This function is meant to create a global state registered in its
10 | * own reactive context, essentially allowing the creation outside of
11 | * your solid application.
12 | *
13 | * @param state - Object state to make reactive
14 | * @param options - See [official doc](https://github.com/ryansolid/solid/blob/master/documentation/api.md#createstateinitvalue-state-setstate)
15 | */
16 | export function createGlobalState(state: TState, options?: Options) {
17 | let globalState: [Store, SetStoreFunction];
18 |
19 | createRoot(() => {
20 | globalState = createStore(state, options);
21 | });
22 |
23 | return globalState;
24 | }
25 |
--------------------------------------------------------------------------------
/src/createStore.tsx:
--------------------------------------------------------------------------------
1 | import type { Component } from 'solid-js';
2 | import {
3 | createContext,
4 | useContext,
5 | splitProps,
6 | mergeProps,
7 | createSignal,
8 | createComputed,
9 | } from 'solid-js';
10 | import {
11 | createStore as createState,
12 | SetStoreFunction as SetStateFunction,
13 | Store as State,
14 | } from 'solid-js/store';
15 | import { Show } from 'solid-js/web';
16 |
17 | type BaseObject = Record;
18 |
19 | type Effect = () => unknown | Promise;
20 |
21 | type GenerateStore = (options: {
22 | state: (props: Props) => Promise | Store;
23 | actions?: (set: SetStateFunction, get: State, props: Props) => Actions;
24 | effects?: (set: SetStateFunction, get: State, props: Props) => Effect[];
25 | props?: Props;
26 | }) => Promise<
27 | readonly [
28 | State,
29 | Actions & {
30 | readonly set: SetStateFunction;
31 | },
32 | ]
33 | >;
34 |
35 | interface StateFn {
36 | (props: Props): StateResult | Promise;
37 | }
38 |
39 | // https://stackoverflow.com/questions/48011353/how-to-unwrap-type-of-a-promise/49889856
40 | type ThenArg = T extends PromiseLike ? U : T;
41 |
42 | /**
43 | * Default Loader when the store is computing the initial state
44 | */
45 | const DefaultLoader: Component = () => Loading...
;
46 |
47 | const generateStore: GenerateStore = async ({ state, actions, effects, props }) => {
48 | const finalStore = await state(props);
49 | const [get, set] = createState(finalStore);
50 | const finalActions = actions ? actions(set, get, props) : {};
51 |
52 | if (effects) {
53 | for (const effect of effects(set, get, props)) {
54 | createComputed(effect);
55 | }
56 | }
57 |
58 | return [get, { ...finalActions, set }] as const;
59 | };
60 |
61 | /**
62 | * @param options - A function An object describing your store
63 | * @returns [Provider, useProvider] - A tuple Provider/useProvider
64 | *
65 | * @example
66 | * ```tsx
67 | * const [Provider, useProvider] = createStore({
68 | * state: () => ({ count: 0 }),
69 | *
70 | * actions: (set) => ({
71 | * increment = (by = 1) => set('count', c => c + by)
72 | * })
73 | * })
74 | *
75 | * const App = () => {
76 | * const [store, { increment }] = useStore()
77 | *
78 | * return {store.count}
79 | * }
80 | *
81 | * const app = createApp(App)
82 | * app.use(Provider)
83 | * app.mount('#app')
84 | * ```
85 | */
86 | export function createStore<
87 | Store extends BaseObject,
88 | Actions extends BaseObject,
89 | Props extends BaseObject
90 | >({
91 | state,
92 | actions,
93 | props,
94 | effects,
95 | }: {
96 | state: StateFn;
97 | actions?: ReturnType> extends Promise
98 | ? (
99 | set: SetStateFunction>>,
100 | get: State>>,
101 | props: Props,
102 | ) => Actions
103 | : (set: SetStateFunction, get: State, props: Props) => Actions;
104 | props?: Props;
105 | effects?: ReturnType> extends Promise
106 | ? (
107 | set: SetStateFunction>>,
108 | get: State>>,
109 | props: Props,
110 | ) => Effect[]
111 | : (set: SetStateFunction, get: State, props: Props) => Effect[];
112 | }) {
113 | type Return = readonly [
114 | State,
115 | Readonly & {
116 | readonly set: SetStateFunction;
117 | },
118 | ];
119 |
120 | const Context = createContext();
121 |
122 | const Provider: Component> = (providerProps) => {
123 | const finalProps = mergeProps(props || {}, providerProps);
124 | const [internal, external] = splitProps(finalProps, ['children']);
125 | const [value, setValue] = createSignal();
126 |
127 | generateStore({
128 | state,
129 | actions,
130 | effects,
131 | props: (external as unknown) as Props,
132 | }).then((value: Return) => setValue(value));
133 |
134 | return (
135 | // FIXME: This will break async SSR
136 |
137 | {internal.children}
138 |
139 | );
140 | };
141 |
142 | return [Provider, () => useContext(Context)] as const;
143 | }
144 |
--------------------------------------------------------------------------------
/src/index.tsx:
--------------------------------------------------------------------------------
1 | export { createApp } from './createApp';
2 | export { createStore } from './createStore';
3 | export { createGlobalSignal } from './createGlobalSignal';
4 | export { createGlobalState } from './createGlobalState';
5 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "jsx": "preserve",
4 | "jsxImportSource": "solid-js",
5 | "target": "ESNext",
6 | "module": "ESNext",
7 | "moduleResolution": "node"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------