solid-js 1.9.3 → 2.0.0-experimental.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/dev.cjs +213 -1603
  2. package/dist/dev.js +159 -1749
  3. package/dist/server.cjs +88 -11
  4. package/dist/server.js +91 -11
  5. package/dist/solid.cjs +196 -1558
  6. package/dist/solid.js +139 -1682
  7. package/package.json +8 -154
  8. package/types/{render → client}/component.d.ts +0 -61
  9. package/types/client/core.d.ts +75 -0
  10. package/types/client/flow.d.ts +114 -0
  11. package/types/{render → client}/hydration.d.ts +0 -2
  12. package/types/{reactive → client}/observable.d.ts +1 -1
  13. package/types/index.d.ts +44 -55
  14. package/types/jsx.d.ts +1944 -174
  15. package/types/server/index.d.ts +1 -1
  16. package/types/server/reactive.d.ts +6 -1
  17. package/types/server/store.d.ts +6 -0
  18. package/h/dist/h.cjs +0 -115
  19. package/h/dist/h.js +0 -144
  20. package/h/jsx-dev-runtime/package.json +0 -8
  21. package/h/jsx-runtime/dist/jsx.cjs +0 -15
  22. package/h/jsx-runtime/dist/jsx.js +0 -10
  23. package/h/jsx-runtime/package.json +0 -8
  24. package/h/jsx-runtime/types/index.d.ts +0 -14
  25. package/h/jsx-runtime/types/jsx.d.ts +0 -2276
  26. package/h/package.json +0 -8
  27. package/h/types/hyperscript.d.ts +0 -20
  28. package/h/types/index.d.ts +0 -3
  29. package/html/dist/html.cjs +0 -583
  30. package/html/dist/html.js +0 -706
  31. package/html/package.json +0 -8
  32. package/html/types/index.d.ts +0 -3
  33. package/html/types/lit.d.ts +0 -60
  34. package/store/dist/dev.cjs +0 -454
  35. package/store/dist/dev.js +0 -525
  36. package/store/dist/server.cjs +0 -126
  37. package/store/dist/server.js +0 -126
  38. package/store/dist/store.cjs +0 -434
  39. package/store/dist/store.js +0 -499
  40. package/store/package.json +0 -46
  41. package/store/types/index.d.ts +0 -26
  42. package/store/types/modifiers.d.ts +0 -9
  43. package/store/types/mutable.d.ts +0 -8
  44. package/store/types/server.d.ts +0 -37
  45. package/store/types/store.d.ts +0 -263
  46. package/types/reactive/array.d.ts +0 -52
  47. package/types/reactive/scheduler.d.ts +0 -13
  48. package/types/reactive/signal.d.ts +0 -664
  49. package/types/render/Suspense.d.ts +0 -26
  50. package/types/render/flow.d.ts +0 -130
  51. package/types/render/index.d.ts +0 -4
  52. package/universal/dist/dev.cjs +0 -243
  53. package/universal/dist/dev.js +0 -257
  54. package/universal/dist/universal.cjs +0 -243
  55. package/universal/dist/universal.js +0 -257
  56. package/universal/package.json +0 -20
  57. package/universal/types/index.d.ts +0 -4
  58. package/universal/types/universal.d.ts +0 -29
  59. package/web/dist/dev.cjs +0 -804
  60. package/web/dist/dev.js +0 -1241
  61. package/web/dist/server.cjs +0 -793
  62. package/web/dist/server.js +0 -1214
  63. package/web/dist/web.cjs +0 -793
  64. package/web/dist/web.js +0 -1220
  65. package/web/package.json +0 -46
  66. package/web/storage/dist/storage.cjs +0 -12
  67. package/web/storage/dist/storage.js +0 -10
  68. package/web/storage/package.json +0 -15
  69. package/web/storage/types/index.d.ts +0 -2
  70. package/web/storage/types/index.js +0 -13
  71. package/web/types/client.d.ts +0 -79
  72. package/web/types/core.d.ts +0 -10
  73. package/web/types/index.d.ts +0 -54
  74. package/web/types/jsx.d.ts +0 -1
  75. package/web/types/server-mock.d.ts +0 -80
  76. package/web/types/server.d.ts +0 -177
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "solid-js",
3
3
  "description": "A declarative JavaScript library for building user interfaces.",
4
- "version": "1.9.3",
4
+ "version": "2.0.0-experimental.0",
5
5
  "author": "Ryan Carniato",
6
6
  "license": "MIT",
7
7
  "homepage": "https://solidjs.com",
@@ -17,30 +17,9 @@
17
17
  "type": "module",
18
18
  "files": [
19
19
  "dist",
20
- "store/dist",
21
- "store/types",
22
- "store/package.json",
23
- "web/dist",
24
- "web/types",
25
- "web/package.json",
26
- "web/storage/dist",
27
- "web/storage/types",
28
- "web/storage/package.json",
29
- "h/dist",
30
- "h/types",
31
- "h/package.json",
32
- "h/jsx-runtime/dist",
33
- "h/jsx-runtime/types",
34
- "h/jsx-runtime/package.json",
35
- "h/jsx-dev-runtime/package.json",
36
- "html/dist",
37
- "html/types",
38
- "html/package.json",
39
- "universal/dist",
40
- "universal/types",
41
- "universal/package.json",
42
20
  "types",
43
- "jsx-runtime.d.ts"
21
+ "jsx-runtime.d.ts",
22
+ "package.json"
44
23
  ],
45
24
  "exports": {
46
25
  ".": {
@@ -88,120 +67,6 @@
88
67
  "types": "./types/jsx.d.ts",
89
68
  "default": "./dist/solid.js"
90
69
  },
91
- "./store": {
92
- "worker": {
93
- "types": "./store/types/index.d.ts",
94
- "import": "./store/dist/server.js",
95
- "require": "./store/dist/server.cjs"
96
- },
97
- "browser": {
98
- "development": {
99
- "types": "./store/types/index.d.ts",
100
- "import": "./store/dist/dev.js",
101
- "require": "./store/dist/dev.cjs"
102
- },
103
- "types": "./store/types/index.d.ts",
104
- "import": "./store/dist/store.js",
105
- "require": "./store/dist/store.cjs"
106
- },
107
- "deno": {
108
- "types": "./store/types/index.d.ts",
109
- "import": "./store/dist/server.js",
110
- "require": "./store/dist/server.cjs"
111
- },
112
- "node": {
113
- "types": "./store/types/index.d.ts",
114
- "import": "./store/dist/server.js",
115
- "require": "./store/dist/server.cjs"
116
- },
117
- "development": {
118
- "types": "./store/types/index.d.ts",
119
- "import": "./store/dist/dev.js",
120
- "require": "./store/dist/dev.cjs"
121
- },
122
- "types": "./store/types/index.d.ts",
123
- "import": "./store/dist/store.js",
124
- "require": "./store/dist/store.cjs"
125
- },
126
- "./store/dist/*": "./store/dist/*",
127
- "./store/types/*": "./store/types/*",
128
- "./web": {
129
- "worker": {
130
- "types": "./web/types/index.d.ts",
131
- "import": "./web/dist/server.js",
132
- "require": "./web/dist/server.cjs"
133
- },
134
- "browser": {
135
- "development": {
136
- "types": "./web/types/index.d.ts",
137
- "import": "./web/dist/dev.js",
138
- "require": "./web/dist/dev.cjs"
139
- },
140
- "types": "./web/types/index.d.ts",
141
- "import": "./web/dist/web.js",
142
- "require": "./web/dist/web.cjs"
143
- },
144
- "deno": {
145
- "types": "./web/types/index.d.ts",
146
- "import": "./web/dist/server.js",
147
- "require": "./web/dist/server.cjs"
148
- },
149
- "node": {
150
- "types": "./web/types/index.d.ts",
151
- "import": "./web/dist/server.js",
152
- "require": "./web/dist/server.cjs"
153
- },
154
- "development": {
155
- "types": "./web/types/index.d.ts",
156
- "import": "./web/dist/dev.js",
157
- "require": "./web/dist/dev.cjs"
158
- },
159
- "types": "./web/types/index.d.ts",
160
- "import": "./web/dist/web.js",
161
- "require": "./web/dist/web.cjs"
162
- },
163
- "./web/storage": {
164
- "types": "./web/storage/types/index.d.ts",
165
- "import": "./web/storage/dist/storage.js",
166
- "require": "./web/storage/dist/storage.cjs"
167
- },
168
- "./web/dist/*": "./web/dist/*",
169
- "./web/types/*": "./web/types/*",
170
- "./universal": {
171
- "development": {
172
- "types": "./universal/types/index.d.ts",
173
- "import": "./universal/dist/dev.js",
174
- "require": "./universal/dist/dev.cjs"
175
- },
176
- "types": "./universal/types/index.d.ts",
177
- "import": "./universal/dist/universal.js",
178
- "require": "./universal/dist/universal.cjs"
179
- },
180
- "./universal/dist/*": "./universal/dist/*",
181
- "./universal/types/*": "./universal/types/*",
182
- "./h": {
183
- "types": "./h/types/index.d.ts",
184
- "import": "./h/dist/h.js",
185
- "require": "./h/dist/h.cjs"
186
- },
187
- "./h/jsx-runtime": {
188
- "types": "./h/jsx-runtime/types/index.d.ts",
189
- "import": "./h/jsx-runtime/dist/jsx.js",
190
- "require": "./h/jsx-runtime/dist/jsx.cjs"
191
- },
192
- "./h/jsx-dev-runtime": {
193
- "types": "./h/jsx-runtime/types/index.d.ts",
194
- "import": "./h/jsx-runtime/dist/jsx.js",
195
- "require": "./h/jsx-runtime/dist/jsx.cjs"
196
- },
197
- "./h/dist/*": "./h/dist/*",
198
- "./h/types/*": "./h/types/*",
199
- "./html": {
200
- "types": "./html/types/index.d.ts",
201
- "import": "./html/dist/html.js",
202
- "require": "./html/dist/html.cjs"
203
- },
204
- "./html/dist/*": "./html/dist/*",
205
70
  "./package.json": "./package.json"
206
71
  },
207
72
  "keywords": [
@@ -214,28 +79,17 @@
214
79
  "performance"
215
80
  ],
216
81
  "dependencies": {
217
- "csstype": "^3.1.0",
218
- "seroval": "^1.1.0",
219
- "seroval-plugins": "^1.1.0"
82
+ "@solidjs/signals": "^0.0.10",
83
+ "csstype": "^3.1.0"
220
84
  },
221
85
  "scripts": {
222
86
  "build": "npm-run-all -nl build:*",
223
- "build:clean": "rimraf dist/ coverage/ store/dist/ web/dist/ h/dist/ h/jsx-runtime/dist html/dist/",
87
+ "build:clean": "rimraf dist/ coverage/",
224
88
  "build:js": "rollup -c",
225
89
  "types": "npm-run-all -nl types:*",
226
- "types:clean": "rimraf types/ store/types/ web/types/ h/types/ h/jsx-runtime/types html/types/",
227
- "types:copy": "ncp ../../node_modules/dom-expressions/src/jsx.d.ts ./src/jsx.d.ts && ncp ../../node_modules/dom-expressions/src/jsx-h.d.ts ./h/jsx-runtime/src/jsx.d.ts",
90
+ "types:clean": "rimraf types/",
91
+ "types:copy": "ncp ../../node_modules/dom-expressions/src/jsx.d.ts ./src/jsx.d.ts",
228
92
  "types:src": "tsc --project ./tsconfig.build.json && ncp ../../node_modules/dom-expressions/src/jsx.d.ts ./types/jsx.d.ts",
229
- "types:web": "tsc --project ./web/tsconfig.build.json",
230
- "types:web-storage": "tsc --project ./web/storage/tsconfig.build.json",
231
- "types:copy-web": "ncp ../../node_modules/dom-expressions/src/client.d.ts ./web/types/client.d.ts && ncp ../../node_modules/dom-expressions/src/server.d.ts ./web/types/server.d.ts",
232
- "types:store": "tsc --project ./store/tsconfig.build.json",
233
- "types:html": "tsc --project ./html/tsconfig.json && ncp ../../node_modules/lit-dom-expressions/types/index.d.ts ./html/types/lit.d.ts",
234
- "types:h": "tsc --project ./h/tsconfig.json && ncp ../../node_modules/hyper-dom-expressions/types/index.d.ts ./h/types/hyperscript.d.ts",
235
- "types:jsx": "rimraf ./h/jsx-runtime/types && tsc --project ./h/jsx-runtime/tsconfig.json && ncp ../../node_modules/dom-expressions/src/jsx-h.d.ts ./h/jsx-runtime/types/jsx.d.ts",
236
- "types:universal": "tsc --project ./universal/tsconfig.json && ncp ../../node_modules/dom-expressions/src/universal.d.ts ./universal/types/universal.d.ts",
237
- "bench": "node --allow-natives-syntax bench/bench.cjs",
238
- "link": "symlink-dir . node_modules/solid-js",
239
93
  "test": "vitest run",
240
94
  "coverage": "vitest run --coverage",
241
95
  "test-types": "tsc --project tsconfig.test.json"
@@ -51,8 +51,6 @@ export type FlowProps<P extends Record<string, any> = {}, C = JSX.Element> = P &
51
51
  export type FlowComponent<P extends Record<string, any> = {}, C = JSX.Element> = Component<
52
52
  FlowProps<P, C>
53
53
  >;
54
- /** @deprecated: use `ParentProps` instead */
55
- export type PropsWithChildren<P extends Record<string, any> = {}> = ParentProps<P>;
56
54
  export type ValidComponent = keyof JSX.IntrinsicElements | Component<any> | (string & {});
57
55
  /**
58
56
  * Takes the props of the passed component and returns its type
@@ -76,64 +74,6 @@ export declare function createComponent<T extends Record<string, any>>(
76
74
  Comp: Component<T>,
77
75
  props: T
78
76
  ): JSX.Element;
79
- type DistributeOverride<T, F> = T extends undefined ? F : T;
80
- type Override<T, U> = T extends any
81
- ? U extends any
82
- ? {
83
- [K in keyof T]: K extends keyof U ? DistributeOverride<U[K], T[K]> : T[K];
84
- } & {
85
- [K in keyof U]: K extends keyof T ? DistributeOverride<U[K], T[K]> : U[K];
86
- }
87
- : T & U
88
- : T & U;
89
- type OverrideSpread<T, U> = T extends any
90
- ? {
91
- [K in keyof ({
92
- [K in keyof T]: any;
93
- } & {
94
- [K in keyof U]?: any;
95
- } & {
96
- [K in U extends any ? keyof U : keyof U]?: any;
97
- })]: K extends keyof T
98
- ? Exclude<U extends any ? U[K & keyof U] : never, undefined> | T[K]
99
- : U extends any
100
- ? U[K & keyof U]
101
- : never;
102
- }
103
- : T & U;
104
- type Simplify<T> = T extends any
105
- ? {
106
- [K in keyof T]: T[K];
107
- }
108
- : T;
109
- type _MergeProps<T extends unknown[], Curr = {}> = T extends [
110
- infer Next | (() => infer Next),
111
- ...infer Rest
112
- ]
113
- ? _MergeProps<Rest, Override<Curr, Next>>
114
- : T extends [...infer Rest, infer Next | (() => infer Next)]
115
- ? Override<_MergeProps<Rest, Curr>, Next>
116
- : T extends []
117
- ? Curr
118
- : T extends (infer I | (() => infer I))[]
119
- ? OverrideSpread<Curr, I>
120
- : Curr;
121
- export type MergeProps<T extends unknown[]> = Simplify<_MergeProps<T>>;
122
- export declare function mergeProps<T extends unknown[]>(...sources: T): MergeProps<T>;
123
- export type SplitProps<T, K extends (readonly (keyof T)[])[]> = [
124
- ...{
125
- [P in keyof K]: P extends `${number}`
126
- ? Pick<T, Extract<K[P], readonly (keyof T)[]>[number]>
127
- : never;
128
- },
129
- {
130
- [P in keyof T as Exclude<P, K[number][number]>]: T[P];
131
- }
132
- ];
133
- export declare function splitProps<
134
- T extends Record<any, any>,
135
- K extends [readonly (keyof T)[], ...(readonly (keyof T)[])[]]
136
- >(props: T, ...keys: K): SplitProps<T, K>;
137
77
  export declare function lazy<T extends Component<any>>(
138
78
  fn: () => Promise<{
139
79
  default: T;
@@ -144,4 +84,3 @@ export declare function lazy<T extends Component<any>>(
144
84
  }>;
145
85
  };
146
86
  export declare function createUniqueId(): string;
147
- export {};
@@ -0,0 +1,75 @@
1
+ import type { Accessor, Owner, EffectOptions } from "@solidjs/signals";
2
+ import type { JSX } from "../jsx.js";
3
+ import { FlowComponent } from "./component.js";
4
+ export declare const IS_DEV: string | boolean;
5
+ export declare const $DEVCOMP: unique symbol;
6
+ /**
7
+ * Runs an effect only after initial render on mount
8
+ * @param fn an effect that should run only once on mount
9
+ *
10
+ * @description https://docs.solidjs.com/reference/lifecycle/on-mount
11
+ */
12
+ export declare function onMount(fn: () => void): void;
13
+ export type NoInfer<T extends any> = [T][T extends any ? 0 : never];
14
+ export type ContextProviderComponent<T> = FlowComponent<{
15
+ value: T;
16
+ }>;
17
+ export interface Context<T> extends ContextProviderComponent<T> {
18
+ id: symbol;
19
+ defaultValue: T;
20
+ }
21
+ /**
22
+ * Creates a Context to handle a state scoped for the children of a component
23
+ * ```typescript
24
+ * interface Context<T> {
25
+ * id: symbol;
26
+ * Provider: FlowComponent<{ value: T }>;
27
+ * defaultValue: T;
28
+ * }
29
+ * export function createContext<T>(
30
+ * defaultValue?: T,
31
+ * options?: { name?: string }
32
+ * ): Context<T | undefined>;
33
+ * ```
34
+ * @param defaultValue optional default to inject into context
35
+ * @param options allows to set a name in dev mode for debugging purposes
36
+ * @returns The context that contains the Provider Component and that can be used with `useContext`
37
+ *
38
+ * @description https://docs.solidjs.com/reference/component-apis/create-context
39
+ */
40
+ export declare function createContext<T>(
41
+ defaultValue?: undefined,
42
+ options?: EffectOptions
43
+ ): Context<T | undefined>;
44
+ export declare function createContext<T>(defaultValue: T, options?: EffectOptions): Context<T>;
45
+ /**
46
+ * Uses a context to receive a scoped state from a parent's Context.Provider
47
+ *
48
+ * @param context Context object made by `createContext`
49
+ * @returns the current or `defaultValue`, if present
50
+ *
51
+ * @description https://docs.solidjs.com/reference/component-apis/use-context
52
+ */
53
+ export declare function useContext<T>(context: Context<T>): T;
54
+ export type ResolvedJSXElement = Exclude<JSX.Element, JSX.ArrayElement>;
55
+ export type ResolvedChildren = ResolvedJSXElement | ResolvedJSXElement[];
56
+ export type ChildrenReturn = Accessor<ResolvedChildren> & {
57
+ toArray: () => ResolvedJSXElement[];
58
+ };
59
+ /**
60
+ * Resolves child elements to help interact with children
61
+ *
62
+ * @param fn an accessor for the children
63
+ * @returns a accessor of the same children, but resolved
64
+ *
65
+ * @description https://docs.solidjs.com/reference/component-apis/children
66
+ */
67
+ export declare function children(fn: Accessor<JSX.Element>): ChildrenReturn;
68
+ export declare function devComponent<P, V>(Comp: (props: P) => V, props: P): V;
69
+ interface SourceMapValue {
70
+ value: unknown;
71
+ name?: string;
72
+ graph?: Owner;
73
+ }
74
+ export declare function registerGraph(value: SourceMapValue): void;
75
+ export {};
@@ -0,0 +1,114 @@
1
+ import type { Accessor } from "@solidjs/signals";
2
+ import type { JSX } from "../jsx.js";
3
+ /**
4
+ * Creates a list of elements from a list
5
+ *
6
+ * it receives a map function as its child that receives list element and index accessors and returns a JSX-Element; if the list is empty, an optional fallback is returned:
7
+ * ```typescript
8
+ * <For each={items} fallback={<div>No items</div>}>
9
+ * {(item, index) => <div data-index={index()}>{item()}</div>}
10
+ * </For>
11
+ * ```
12
+ *
13
+ * @description https://docs.solidjs.com/reference/components/for
14
+ */
15
+ export declare function For<T extends readonly any[], U extends JSX.Element>(props: {
16
+ each: T | undefined | null | false;
17
+ fallback?: JSX.Element;
18
+ keyed?: boolean | ((item: T) => any);
19
+ children: (item: Accessor<T[number]>, index: Accessor<number>) => U;
20
+ }): JSX.Element;
21
+ /**
22
+ * Creates a list elements from a count
23
+ *
24
+ * it receives a map function as its child that receives the index and returns a JSX-Element; if the list is empty, an optional fallback is returned:
25
+ * ```typescript
26
+ * <Repeat count={items.length} fallback={<div>No items</div>}>
27
+ * {(index) => <div data-index={index}>{items[index]}</div>}
28
+ * </Repeat>
29
+ * ```
30
+ *
31
+ * @description https://docs.solidjs.com/reference/components/repeat
32
+ */
33
+ export declare function Repeat<T extends JSX.Element>(props: {
34
+ count: number;
35
+ fallback?: JSX.Element;
36
+ children: ((index: number) => T) | T;
37
+ }): JSX.Element;
38
+ /**
39
+ * Conditionally render its children or an optional fallback component
40
+ * @description https://docs.solidjs.com/reference/components/show
41
+ */
42
+ export declare function Show<T>(props: {
43
+ when: T | undefined | null | false;
44
+ keyed?: boolean;
45
+ fallback?: JSX.Element;
46
+ children: JSX.Element | ((item: Accessor<NonNullable<T>>) => JSX.Element);
47
+ }): JSX.Element;
48
+ /**
49
+ * Switches between content based on mutually exclusive conditions
50
+ * ```typescript
51
+ * <Switch fallback={<FourOhFour />}>
52
+ * <Match when={state.route === 'home'}>
53
+ * <Home />
54
+ * </Match>
55
+ * <Match when={state.route === 'settings'}>
56
+ * <Settings />
57
+ * </Match>
58
+ * </Switch>
59
+ * ```
60
+ * @description https://docs.solidjs.com/reference/components/switch-and-match
61
+ */
62
+ export declare function Switch(props: {
63
+ fallback?: JSX.Element;
64
+ children: JSX.Element;
65
+ }): JSX.Element;
66
+ export type MatchProps<T> = {
67
+ when: T | undefined | null | false;
68
+ keyed?: boolean;
69
+ children: JSX.Element | ((item: Accessor<NonNullable<T>>) => JSX.Element);
70
+ };
71
+ /**
72
+ * Selects a content based on condition when inside a `<Switch>` control flow
73
+ * ```typescript
74
+ * <Match when={condition()}>
75
+ * <Content/>
76
+ * </Match>
77
+ * ```
78
+ * @description https://docs.solidjs.com/reference/components/switch-and-match
79
+ */
80
+ export declare function Match<T>(props: MatchProps<T>): JSX.Element;
81
+ /**
82
+ * Catches uncaught errors inside components and renders a fallback content
83
+ *
84
+ * Also supports a callback form that passes the error and a reset function:
85
+ * ```typescript
86
+ * <ErrorBoundary fallback={
87
+ * (err, reset) => <div onClick={reset}>Error: {err.toString()}</div>
88
+ * }>
89
+ * <MyComp />
90
+ * </ErrorBoundary>
91
+ * ```
92
+ * Errors thrown from the fallback can be caught by a parent ErrorBoundary
93
+ *
94
+ * @description https://docs.solidjs.com/reference/components/error-boundary
95
+ */
96
+ export declare function ErrorBoundary(props: {
97
+ fallback: JSX.Element | ((err: any, reset: () => void) => JSX.Element);
98
+ children: JSX.Element;
99
+ }): JSX.Element;
100
+ /**
101
+ * Tracks all resources inside a component and renders a fallback until they are all resolved
102
+ * ```typescript
103
+ * const AsyncComponent = lazy(() => import('./component'));
104
+ *
105
+ * <Suspense fallback={<LoadingIndicator />}>
106
+ * <AsyncComponent />
107
+ * </Suspense>
108
+ * ```
109
+ * @description https://docs.solidjs.com/reference/components/suspense
110
+ */
111
+ export declare function Suspense(props: {
112
+ fallback?: JSX.Element;
113
+ children: JSX.Element;
114
+ }): JSX.Element;
@@ -1,4 +1,3 @@
1
- import { Computation } from "../reactive/signal.js";
2
1
  export type HydrationContext = {
3
2
  id: string;
4
3
  count: number;
@@ -14,7 +13,6 @@ type SharedConfig = {
14
13
  registry?: Map<string, Element>;
15
14
  done?: boolean;
16
15
  count?: number;
17
- effects?: Computation<any, any>[];
18
16
  getContextId(): string;
19
17
  getNextContextId(): string;
20
18
  };
@@ -1,4 +1,4 @@
1
- import { Accessor, Setter } from "./signal.js";
1
+ import { Accessor, Setter } from "@solidjs/signals";
2
2
  declare global {
3
3
  interface SymbolConstructor {
4
4
  readonly observable: symbol;
package/types/index.d.ts CHANGED
@@ -1,84 +1,73 @@
1
1
  export {
2
- $DEVCOMP,
3
2
  $PROXY,
4
3
  $TRACK,
5
- batch,
4
+ $RAW,
6
5
  catchError,
7
- children,
8
- createComputed,
9
- createContext,
10
- createDeferred,
6
+ createAsync,
11
7
  createEffect,
12
8
  createMemo,
9
+ createProjection,
13
10
  createReaction,
14
11
  createRenderEffect,
15
- createResource,
16
12
  createRoot,
17
- createSelector,
18
13
  createSignal,
19
- enableExternalSource,
20
- enableScheduling,
21
- equalFn,
22
- getListener,
14
+ createStore,
15
+ flatten,
16
+ flushSync,
17
+ getObserver,
23
18
  getOwner,
24
- on,
19
+ isEqual,
20
+ isStale,
21
+ isWrappable,
22
+ latest,
23
+ mapArray,
24
+ merge,
25
+ omit,
25
26
  onCleanup,
26
- onError,
27
- onMount,
27
+ reconcile,
28
+ repeat,
29
+ resolve,
28
30
  runWithOwner,
29
- startTransition,
30
31
  untrack,
31
- useContext,
32
- useTransition
33
- } from "./reactive/signal.js";
32
+ unwrap
33
+ } from "@solidjs/signals";
34
34
  export type {
35
35
  Accessor,
36
- AccessorArray,
37
- ChildrenReturn,
38
- Context,
39
- ContextProviderComponent,
36
+ ComputeFunction,
40
37
  EffectFunction,
41
38
  EffectOptions,
42
- InitializedResource,
43
- InitializedResourceOptions,
44
- InitializedResourceReturn,
45
- MemoOptions,
39
+ Merge,
46
40
  NoInfer,
47
- OnEffectFunction,
48
- OnOptions,
41
+ NotWrappable,
42
+ Omit,
49
43
  Owner,
50
- ResolvedChildren,
51
- ResolvedJSXElement,
52
- Resource,
53
- ResourceActions,
54
- ResourceFetcher,
55
- ResourceFetcherInfo,
56
- ResourceOptions,
57
- ResourceReturn,
58
- ResourceSource,
59
- ReturnTypes,
60
- Setter,
61
44
  Signal,
62
- SignalOptions
63
- } from "./reactive/signal.js";
64
- export * from "./reactive/observable.js";
65
- export * from "./reactive/scheduler.js";
66
- export * from "./reactive/array.js";
67
- export * from "./render/index.js";
45
+ SignalOptions,
46
+ Setter,
47
+ Store,
48
+ SolidStore,
49
+ StoreNode,
50
+ StoreSetter
51
+ } from "@solidjs/signals";
52
+ export { $DEVCOMP, children, createContext, onMount, useContext } from "./client/core.js";
53
+ export type {
54
+ ChildrenReturn,
55
+ Context,
56
+ ContextProviderComponent,
57
+ ResolvedChildren,
58
+ ResolvedJSXElement
59
+ } from "./client/core.js";
60
+ export * from "./client/observable.js";
61
+ export * from "./client/component.js";
62
+ export * from "./client/flow.js";
63
+ export { sharedConfig } from "./client/hydration.js";
68
64
  import type { JSX } from "./jsx.js";
69
65
  type JSXElement = JSX.Element;
70
66
  export type { JSXElement, JSX };
71
- import { registerGraph, writeSignal } from "./reactive/signal.js";
67
+ import { registerGraph } from "./client/core.js";
72
68
  export declare const DEV:
73
69
  | {
74
- readonly hooks: {
75
- afterUpdate: (() => void) | null;
76
- afterCreateOwner: ((owner: import("./reactive/signal.js").Owner) => void) | null;
77
- afterCreateSignal:
78
- | ((signal: import("./reactive/signal.js").SignalState<any>) => void)
79
- | null;
80
- };
81
- readonly writeSignal: typeof writeSignal;
70
+ readonly hooks: {};
82
71
  readonly registerGraph: typeof registerGraph;
83
72
  }
84
73
  | undefined;