solid-js 1.4.0-beta.2 → 1.4.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/dev.cjs CHANGED
@@ -273,9 +273,9 @@ function createResource(source, fetcher, options) {
273
273
  if (pr === p) {
274
274
  pr = null;
275
275
  resolved = true;
276
- if (initP && p === initP && options.onHydrated) options.onHydrated(key, {
276
+ if (initP && (p === initP || v === initP) && options.onHydrated) queueMicrotask(() => options.onHydrated(key, {
277
277
  value: v
278
- });
278
+ }));
279
279
  initP = null;
280
280
  setError(err = e);
281
281
  if (Transition && p && loadedUnderTransition) {
package/dist/dev.js CHANGED
@@ -269,9 +269,9 @@ function createResource(source, fetcher, options) {
269
269
  if (pr === p) {
270
270
  pr = null;
271
271
  resolved = true;
272
- if (initP && p === initP && options.onHydrated) options.onHydrated(key, {
272
+ if (initP && (p === initP || v === initP) && options.onHydrated) queueMicrotask(() => options.onHydrated(key, {
273
273
  value: v
274
- });
274
+ }));
275
275
  initP = null;
276
276
  setError(err = e);
277
277
  if (Transition && p && loadedUnderTransition) {
package/dist/solid.cjs CHANGED
@@ -270,9 +270,9 @@ function createResource(source, fetcher, options) {
270
270
  if (pr === p) {
271
271
  pr = null;
272
272
  resolved = true;
273
- if (initP && p === initP && options.onHydrated) options.onHydrated(key, {
273
+ if (initP && (p === initP || v === initP) && options.onHydrated) queueMicrotask(() => options.onHydrated(key, {
274
274
  value: v
275
- });
275
+ }));
276
276
  initP = null;
277
277
  setError(err = e);
278
278
  if (Transition && p && loadedUnderTransition) {
package/dist/solid.js CHANGED
@@ -266,9 +266,9 @@ function createResource(source, fetcher, options) {
266
266
  if (pr === p) {
267
267
  pr = null;
268
268
  resolved = true;
269
- if (initP && p === initP && options.onHydrated) options.onHydrated(key, {
269
+ if (initP && (p === initP || v === initP) && options.onHydrated) queueMicrotask(() => options.onHydrated(key, {
270
270
  value: v
271
- });
271
+ }));
272
272
  initP = null;
273
273
  setError(err = e);
274
274
  if (Transition && p && loadedUnderTransition) {
@@ -0,0 +1,27 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var h = require('solid-js/h');
6
+
7
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
+
9
+ var h__default = /*#__PURE__*/_interopDefaultLegacy(h);
10
+
11
+ function Fragment(props) {
12
+ return props.children;
13
+ }
14
+
15
+ Object.defineProperty(exports, 'jsx', {
16
+ enumerable: true,
17
+ get: function () { return h__default["default"]; }
18
+ });
19
+ Object.defineProperty(exports, 'jsxDEV', {
20
+ enumerable: true,
21
+ get: function () { return h__default["default"]; }
22
+ });
23
+ Object.defineProperty(exports, 'jsxs', {
24
+ enumerable: true,
25
+ get: function () { return h__default["default"]; }
26
+ });
27
+ exports.Fragment = Fragment;
@@ -0,0 +1,7 @@
1
+ export { default as jsx, default as jsxDEV, default as jsxs } from 'solid-js/h';
2
+
3
+ function Fragment(props) {
4
+ return props.children;
5
+ }
6
+
7
+ export { Fragment };
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "solid-js/jsx-runtime",
3
+ "main": "./dist/jsx.cjs",
4
+ "module": "./dist/jsx.js",
5
+ "types": "./types/index.d.ts",
6
+ "type": "module",
7
+ "sideEffects": false
8
+ }
@@ -0,0 +1,7 @@
1
+ import h from "solid-js/h";
2
+ export type { JSX } from "solid-js";
3
+ import type { JSX } from "solid-js";
4
+ declare function Fragment(props: {
5
+ children: JSX.Element;
6
+ }): JSX.Element;
7
+ export { h as jsx, h as jsxs, h as jsxDEV, Fragment };
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.4.0-beta.2",
4
+ "version": "1.4.0-beta.3",
5
5
  "author": "Ryan Carniato",
6
6
  "license": "MIT",
7
7
  "homepage": "https://solidjs.com",
@@ -32,7 +32,8 @@
32
32
  "universal/dist",
33
33
  "universal/types",
34
34
  "types",
35
- "jsx-runtime.d.ts"
35
+ "jsx-runtime/dist",
36
+ "jsx-runtime/types"
36
37
  ],
37
38
  "exports": {
38
39
  ".": {
@@ -116,7 +117,11 @@
116
117
  "import": "./html/dist/html.js",
117
118
  "require": "./html/dist/html.cjs"
118
119
  },
119
- "./html/dist/*": "./html/dist/*"
120
+ "./html/dist/*": "./html/dist/*",
121
+ "./jsx-runtime": {
122
+ "import": "./html/dist/jsx.js",
123
+ "require": "./html/dist/jsx.cjs"
124
+ }
120
125
  },
121
126
  "scripts": {
122
127
  "prebuild": "npm run clean",
@@ -129,6 +134,7 @@
129
134
  "build:types-web": "tsc --project ./web/tsconfig.build.json && tsconfig-replace-paths --project ./web/tsconfig.types.json",
130
135
  "build:types-html": "tsc --project ./html/tsconfig.json",
131
136
  "build:types-h": "tsc --project ./h/tsconfig.json",
137
+ "build:types-jsx": "tsc --project ./jsx-runtime/tsconfig.json",
132
138
  "build:types-universal": "tsc --project ./universal/tsconfig.json",
133
139
  "bench": "node --allow-natives-syntax bench/bench.cjs",
134
140
  "test": "jest && npm run test:types",
@@ -144,5 +150,5 @@
144
150
  "compiler",
145
151
  "performance"
146
152
  ],
147
- "gitHead": "40902779866f8006cc5460c6ff82dbadf85d3f0f"
153
+ "gitHead": "0919e999b84569a9d1d3b5cf4948f34952960784"
148
154
  }
package/jsx-runtime.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from "./types/jsx"