solid-js 1.7.5 → 1.7.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/solid.js CHANGED
@@ -269,7 +269,7 @@ function createResource(pSource, pFetcher, pOptions) {
269
269
  function loadEnd(p, v, error, key) {
270
270
  if (pr === p) {
271
271
  pr = null;
272
- resolved = true;
272
+ key !== undefined && (resolved = true);
273
273
  if ((p === initP || v === initP) && options.onHydrated) queueMicrotask(() => options.onHydrated(key, {
274
274
  value: v
275
275
  }));
@@ -288,7 +288,7 @@ function createResource(pSource, pFetcher, pOptions) {
288
288
  function completeLoad(v, err) {
289
289
  runUpdates(() => {
290
290
  if (err === undefined) setValue(() => v);
291
- setState(err !== undefined ? "errored" : "ready");
291
+ setState(err !== undefined ? "errored" : resolved ? "ready" : "unresolved");
292
292
  setError(err);
293
293
  for (const c of contexts.keys()) c.decrement();
294
294
  contexts.clear();
@@ -915,19 +915,26 @@ function castError(err) {
915
915
  cause: err
916
916
  });
917
917
  }
918
- function runErrors(fns, err) {
919
- for (const f of fns) f(err);
920
- }
921
- function handleError(err) {
922
- const fns = ERROR && lookup(Owner, ERROR);
923
- if (!fns) throw err;
918
+ function handleError(err, owner = Owner) {
919
+ const fns = ERROR && lookup(owner, ERROR);
924
920
  const error = castError(err);
921
+ if (!fns) throw error;
925
922
  if (Effects) Effects.push({
926
923
  fn() {
927
- runErrors(fns, error);
924
+ try {
925
+ for (const f of fns) f(error);
926
+ } catch (e) {
927
+ handleError(e, owner?.owner || null);
928
+ }
928
929
  },
929
930
  state: STALE
930
- });else runErrors(fns, error);
931
+ });else {
932
+ try {
933
+ for (const f of fns) f(error);
934
+ } catch (e) {
935
+ handleError(e, owner?.owner || null);
936
+ }
937
+ }
931
938
  }
932
939
  function lookup(owner, key) {
933
940
  return owner ? owner.context && owner.context[key] !== undefined ? owner.context[key] : lookup(owner.owner, key) : undefined;
@@ -1218,6 +1225,12 @@ const propTraps = {
1218
1225
  function resolveSource(s) {
1219
1226
  return !(s = typeof s === "function" ? s() : s) ? {} : s;
1220
1227
  }
1228
+ function resolveSources() {
1229
+ for (let i = 0, length = this.length; i < length; ++i) {
1230
+ const v = this[i]();
1231
+ if (v !== undefined) return v;
1232
+ }
1233
+ }
1221
1234
  function mergeProps(...sources) {
1222
1235
  let proxy = false;
1223
1236
  for (let i = 0; i < sources.length; i++) {
@@ -1247,28 +1260,45 @@ function mergeProps(...sources) {
1247
1260
  }, propTraps);
1248
1261
  }
1249
1262
  const target = {};
1263
+ const sourcesMap = {};
1264
+ const defined = new Set();
1250
1265
  for (let i = sources.length - 1; i >= 0; i--) {
1251
- if (sources[i]) {
1252
- const descriptors = Object.getOwnPropertyDescriptors(sources[i]);
1253
- for (const key in descriptors) {
1254
- if (key in target) continue;
1255
- Object.defineProperty(target, key, {
1256
- enumerable: true,
1257
- get() {
1258
- for (let i = sources.length - 1; i >= 0; i--) {
1259
- const v = (sources[i] || {})[key];
1260
- if (v !== undefined) return v;
1261
- }
1266
+ const source = sources[i];
1267
+ if (!source) continue;
1268
+ const sourceKeys = Object.getOwnPropertyNames(source);
1269
+ for (let i = 0, length = sourceKeys.length; i < length; i++) {
1270
+ const key = sourceKeys[i];
1271
+ if (key === "__proto__" || key === "constructor") continue;
1272
+ const desc = Object.getOwnPropertyDescriptor(source, key);
1273
+ if (!defined.has(key)) {
1274
+ if (desc.get) {
1275
+ defined.add(key);
1276
+ Object.defineProperty(target, key, {
1277
+ enumerable: true,
1278
+ configurable: true,
1279
+ get: resolveSources.bind(sourcesMap[key] = [desc.get.bind(source)])
1280
+ });
1281
+ } else {
1282
+ if (desc.value !== undefined) defined.add(key);
1283
+ target[key] = desc.value;
1284
+ }
1285
+ } else {
1286
+ const sources = sourcesMap[key];
1287
+ if (sources) {
1288
+ if (desc.get) {
1289
+ sources.push(desc.get.bind(source));
1290
+ } else if (desc.value !== undefined) {
1291
+ sources.push(() => desc.value);
1262
1292
  }
1263
- });
1293
+ } else if (target[key] === undefined) target[key] = desc.value;
1264
1294
  }
1265
1295
  }
1266
1296
  }
1267
1297
  return target;
1268
1298
  }
1269
1299
  function splitProps(props, ...keys) {
1270
- const blocked = new Set(keys.length > 1 ? keys.flat() : keys[0]);
1271
1300
  if ($PROXY in props) {
1301
+ const blocked = new Set(keys.length > 1 ? keys.flat() : keys[0]);
1272
1302
  const res = keys.map(k => {
1273
1303
  return new Proxy({
1274
1304
  get(property) {
@@ -1295,25 +1325,25 @@ function splitProps(props, ...keys) {
1295
1325
  }, propTraps));
1296
1326
  return res;
1297
1327
  }
1298
- const descriptors = Object.getOwnPropertyDescriptors(props);
1299
- keys.push(Object.keys(descriptors).filter(k => !blocked.has(k)));
1300
- return keys.map(k => {
1301
- const clone = {};
1302
- for (let i = 0; i < k.length; i++) {
1303
- const key = k[i];
1304
- if (!(key in props)) continue;
1305
- Object.defineProperty(clone, key, descriptors[key] ? descriptors[key] : {
1306
- get() {
1307
- return props[key];
1308
- },
1309
- set() {
1310
- return true;
1311
- },
1312
- enumerable: true
1313
- });
1328
+ const otherObject = {};
1329
+ const objects = keys.map(() => ({}));
1330
+ for (const propName of Object.getOwnPropertyNames(props)) {
1331
+ const desc = Object.getOwnPropertyDescriptor(props, propName);
1332
+ const isDefaultDesc = !desc.get && !desc.set && desc.enumerable && desc.writable && desc.configurable;
1333
+ let blocked = false;
1334
+ let objectIndex = 0;
1335
+ for (const k of keys) {
1336
+ if (k.includes(propName)) {
1337
+ blocked = true;
1338
+ isDefaultDesc ? objects[objectIndex][propName] = desc.value : Object.defineProperty(objects[objectIndex], propName, desc);
1339
+ }
1340
+ ++objectIndex;
1314
1341
  }
1315
- return clone;
1316
- });
1342
+ if (!blocked) {
1343
+ isDefaultDesc ? otherObject[propName] = desc.value : Object.defineProperty(otherObject, propName, desc);
1344
+ }
1345
+ }
1346
+ return [...objects, otherObject];
1317
1347
  }
1318
1348
  function lazy(fn) {
1319
1349
  let comp;
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.7.5",
4
+ "version": "1.7.7",
5
5
  "author": "Ryan Carniato",
6
6
  "license": "MIT",
7
7
  "homepage": "https://solidjs.com",
@@ -46,51 +46,37 @@
46
46
  "exports": {
47
47
  ".": {
48
48
  "worker": {
49
- "import": {
50
- "types": "./types/index.d.ts",
51
- "default": "./dist/server.js"
52
- },
49
+ "types": "./types/index.d.ts",
50
+ "import": "./dist/server.js",
53
51
  "require": "./dist/server.cjs"
54
52
  },
55
53
  "browser": {
56
54
  "development": {
57
- "import": {
58
- "types": "./types/index.d.ts",
59
- "default": "./dist/dev.js"
60
- },
61
- "require": "./dist/dev.cjs"
62
- },
63
- "import": {
64
55
  "types": "./types/index.d.ts",
65
- "default": "./dist/solid.js"
56
+ "import": "./dist/dev.js",
57
+ "require": "./dist/dev.cjs"
66
58
  },
59
+ "types": "./types/index.d.ts",
60
+ "import": "./dist/solid.js",
67
61
  "require": "./dist/solid.cjs"
68
62
  },
69
63
  "deno": {
70
- "import": {
71
- "types": "./types/index.d.ts",
72
- "default": "./dist/server.js"
73
- },
64
+ "types": "./types/index.d.ts",
65
+ "import": "./dist/server.js",
74
66
  "require": "./dist/server.cjs"
75
67
  },
76
68
  "node": {
77
- "import": {
78
- "types": "./types/index.d.ts",
79
- "default": "./dist/server.js"
80
- },
69
+ "types": "./types/index.d.ts",
70
+ "import": "./dist/server.js",
81
71
  "require": "./dist/server.cjs"
82
72
  },
83
73
  "development": {
84
- "import": {
85
- "types": "./types/index.d.ts",
86
- "default": "./dist/dev.js"
87
- },
88
- "require": "./dist/dev.cjs"
89
- },
90
- "import": {
91
74
  "types": "./types/index.d.ts",
92
- "default": "./dist/solid.js"
75
+ "import": "./dist/dev.js",
76
+ "require": "./dist/dev.cjs"
93
77
  },
78
+ "types": "./types/index.d.ts",
79
+ "import": "./dist/solid.js",
94
80
  "require": "./dist/solid.cjs"
95
81
  },
96
82
  "./dist/*": "./dist/*",
@@ -104,146 +90,106 @@
104
90
  },
105
91
  "./store": {
106
92
  "worker": {
107
- "import": {
108
- "types": "./store/types/index.d.ts",
109
- "default": "./store/dist/server.js"
110
- },
93
+ "types": "./store/types/index.d.ts",
94
+ "import": "./store/dist/server.js",
111
95
  "require": "./store/dist/server.cjs"
112
96
  },
113
97
  "browser": {
114
98
  "development": {
115
- "import": {
116
- "types": "./store/types/index.d.ts",
117
- "default": "./store/dist/dev.js"
118
- },
119
- "require": "./store/dist/dev.cjs"
120
- },
121
- "import": {
122
99
  "types": "./store/types/index.d.ts",
123
- "default": "./store/dist/store.js"
100
+ "import": "./store/dist/dev.js",
101
+ "require": "./store/dist/dev.cjs"
124
102
  },
103
+ "types": "./store/types/index.d.ts",
104
+ "import": "./store/dist/store.js",
125
105
  "require": "./store/dist/store.cjs"
126
106
  },
127
107
  "deno": {
128
- "import": {
129
- "types": "./store/types/index.d.ts",
130
- "default": "./store/dist/server.js"
131
- },
108
+ "types": "./store/types/index.d.ts",
109
+ "import": "./store/dist/server.js",
132
110
  "require": "./store/dist/server.cjs"
133
111
  },
134
112
  "node": {
135
- "import": {
136
- "types": "./store/types/index.d.ts",
137
- "default": "./store/dist/server.js"
138
- },
113
+ "types": "./store/types/index.d.ts",
114
+ "import": "./store/dist/server.js",
139
115
  "require": "./store/dist/server.cjs"
140
116
  },
141
117
  "development": {
142
- "import": {
143
- "types": "./store/types/index.d.ts",
144
- "default": "./store/dist/dev.js"
145
- },
146
- "require": "./store/dist/dev.cjs"
147
- },
148
- "import": {
149
118
  "types": "./store/types/index.d.ts",
150
- "default": "./store/dist/store.js"
119
+ "import": "./store/dist/dev.js",
120
+ "require": "./store/dist/dev.cjs"
151
121
  },
122
+ "types": "./store/types/index.d.ts",
123
+ "import": "./store/dist/store.js",
152
124
  "require": "./store/dist/store.cjs"
153
125
  },
154
126
  "./store/dist/*": "./store/dist/*",
155
127
  "./web": {
156
128
  "worker": {
157
- "import": {
158
- "types": "./web/types/index.d.ts",
159
- "default": "./web/dist/server.js"
160
- },
129
+ "types": "./web/types/index.d.ts",
130
+ "import": "./web/dist/server.js",
161
131
  "require": "./web/dist/server.cjs"
162
132
  },
163
133
  "browser": {
164
134
  "development": {
165
- "import": {
166
- "types": "./web/types/index.d.ts",
167
- "default": "./web/dist/dev.js"
168
- },
169
- "require": "./web/dist/dev.cjs"
170
- },
171
- "import": {
172
135
  "types": "./web/types/index.d.ts",
173
- "default": "./web/dist/web.js"
136
+ "import": "./web/dist/dev.js",
137
+ "require": "./web/dist/dev.cjs"
174
138
  },
139
+ "types": "./web/types/index.d.ts",
140
+ "import": "./web/dist/web.js",
175
141
  "require": "./web/dist/web.cjs"
176
142
  },
177
143
  "deno": {
178
- "import": {
179
- "types": "./web/types/index.d.ts",
180
- "default": "./web/dist/server.js"
181
- },
144
+ "types": "./web/types/index.d.ts",
145
+ "import": "./web/dist/server.js",
182
146
  "require": "./web/dist/server.cjs"
183
147
  },
184
148
  "node": {
185
- "import": {
186
- "types": "./web/types/index.d.ts",
187
- "default": "./web/dist/server.js"
188
- },
149
+ "types": "./web/types/index.d.ts",
150
+ "import": "./web/dist/server.js",
189
151
  "require": "./web/dist/server.cjs"
190
152
  },
191
153
  "development": {
192
- "import": {
193
- "types": "./web/types/index.d.ts",
194
- "default": "./web/dist/dev.js"
195
- },
196
- "require": "./web/dist/dev.cjs"
197
- },
198
- "import": {
199
154
  "types": "./web/types/index.d.ts",
200
- "default": "./web/dist/web.js"
155
+ "import": "./web/dist/dev.js",
156
+ "require": "./web/dist/dev.cjs"
201
157
  },
158
+ "types": "./web/types/index.d.ts",
159
+ "import": "./web/dist/web.js",
202
160
  "require": "./web/dist/web.cjs"
203
161
  },
204
162
  "./web/dist/*": "./web/dist/*",
205
163
  "./universal": {
206
164
  "development": {
207
- "import": {
208
- "types": "./universal/types/index.d.ts",
209
- "default": "./universal/dist/dev.js"
210
- },
211
- "require": "./universal/dist/dev.cjs"
212
- },
213
- "import": {
214
165
  "types": "./universal/types/index.d.ts",
215
- "default": "./universal/dist/universal.js"
166
+ "import": "./universal/dist/dev.js",
167
+ "require": "./universal/dist/dev.cjs"
216
168
  },
169
+ "types": "./universal/types/index.d.ts",
170
+ "import": "./universal/dist/universal.js",
217
171
  "require": "./universal/dist/universal.cjs"
218
172
  },
219
173
  "./universal/dist/*": "./universal/dist/*",
220
174
  "./h": {
221
- "import": {
222
- "types": "./h/types/index.d.ts",
223
- "default": "./h/dist/h.js"
224
- },
175
+ "types": "./h/types/index.d.ts",
176
+ "import": "./h/dist/h.js",
225
177
  "require": "./h/dist/h.cjs"
226
178
  },
227
179
  "./h/jsx-runtime": {
228
- "import": {
229
- "types": "./h/jsx-runtime/types/index.d.ts",
230
- "default": "./h/jsx-runtime/dist/jsx.js"
231
- },
180
+ "types": "./h/jsx-runtime/types/index.d.ts",
181
+ "import": "./h/jsx-runtime/dist/jsx.js",
232
182
  "require": "./h/jsx-runtime/dist/jsx.cjs"
233
183
  },
234
184
  "./h/jsx-dev-runtime": {
235
- "import": {
236
- "types": "./h/jsx-runtime/types/index.d.ts",
237
- "default": "./h/jsx-runtime/dist/jsx.js"
238
- },
185
+ "types": "./h/jsx-runtime/types/index.d.ts",
186
+ "import": "./h/jsx-runtime/dist/jsx.js",
239
187
  "require": "./h/jsx-runtime/dist/jsx.cjs"
240
188
  },
241
189
  "./h/dist/*": "./h/dist/*",
242
190
  "./html": {
243
- "import": {
244
- "types": "./html/types/index.d.ts",
245
- "default": "./html/dist/html.js"
246
- },
191
+ "types": "./html/types/index.d.ts",
192
+ "import": "./html/dist/html.js",
247
193
  "require": "./html/dist/html.cjs"
248
194
  },
249
195
  "./html/dist/*": "./html/dist/*",
package/store/dist/dev.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $PROXY, DEV as DEV$1, $TRACK, getListener, batch, createSignal } from 'solid-js';
1
+ import { DEV as DEV$1, $PROXY, $TRACK, getListener, batch, createSignal } from 'solid-js';
2
2
 
3
3
  const $RAW = Symbol("store-raw"),
4
4
  $NODE = Symbol("store-node");
@@ -13,51 +13,37 @@
13
13
  "exports": {
14
14
  ".": {
15
15
  "worker": {
16
- "import": {
17
- "types": "./types/index.d.ts",
18
- "default": "./dist/server.js"
19
- },
16
+ "types": "./types/index.d.ts",
17
+ "import": "./dist/server.js",
20
18
  "require": "./dist/server.cjs"
21
19
  },
22
20
  "browser": {
23
21
  "development": {
24
- "import": {
25
- "types": "./types/index.d.ts",
26
- "default": "./dist/dev.js"
27
- },
28
- "require": "./dist/dev.cjs"
29
- },
30
- "import": {
31
22
  "types": "./types/index.d.ts",
32
- "default": "./dist/store.js"
23
+ "import": "./dist/dev.js",
24
+ "require": "./dist/dev.cjs"
33
25
  },
26
+ "types": "./types/index.d.ts",
27
+ "import": "./dist/store.js",
34
28
  "require": "./dist/store.cjs"
35
29
  },
36
30
  "deno": {
37
- "import": {
38
- "types": "./types/index.d.ts",
39
- "default": "./dist/server.js"
40
- },
31
+ "types": "./types/index.d.ts",
32
+ "import": "./dist/server.js",
41
33
  "require": "./dist/server.cjs"
42
34
  },
43
35
  "node": {
44
- "import": {
45
- "types": "./types/index.d.ts",
46
- "default": "./dist/server.js"
47
- },
36
+ "types": "./types/index.d.ts",
37
+ "import": "./dist/server.js",
48
38
  "require": "./dist/server.cjs"
49
39
  },
50
40
  "development": {
51
- "import": {
52
- "types": "./types/index.d.ts",
53
- "default": "./dist/dev.js"
54
- },
55
- "require": "./dist/dev.cjs"
56
- },
57
- "import": {
58
41
  "types": "./types/index.d.ts",
59
- "default": "./dist/store.js"
42
+ "import": "./dist/dev.js",
43
+ "require": "./dist/dev.cjs"
60
44
  },
45
+ "types": "./types/index.d.ts",
46
+ "import": "./dist/store.js",
61
47
  "require": "./dist/store.cjs"
62
48
  }
63
49
  }
package/types/jsx.d.ts CHANGED
@@ -283,7 +283,10 @@ export namespace JSX {
283
283
  onTouchEnd?: EventHandlerUnion<T, TouchEvent>;
284
284
  onTouchMove?: EventHandlerUnion<T, TouchEvent>;
285
285
  onTouchStart?: EventHandlerUnion<T, TouchEvent>;
286
+ onTransitionStart?: EventHandlerUnion<T, TransitionEvent>;
286
287
  onTransitionEnd?: EventHandlerUnion<T, TransitionEvent>;
288
+ onTransitionRun?: EventHandlerUnion<T, TransitionEvent>;
289
+ onTransitionCancel?: EventHandlerUnion<T, TransitionEvent>;
287
290
  onVolumeChange?: EventHandlerUnion<T, Event>;
288
291
  onWaiting?: EventHandlerUnion<T, Event>;
289
292
  onWheel?: EventHandlerUnion<T, WheelEvent>;
@@ -366,7 +369,10 @@ export namespace JSX {
366
369
  ontouchend?: EventHandlerUnion<T, TouchEvent>;
367
370
  ontouchmove?: EventHandlerUnion<T, TouchEvent>;
368
371
  ontouchstart?: EventHandlerUnion<T, TouchEvent>;
372
+ ontransitionstart?: EventHandlerUnion<T, TransitionEvent>;
369
373
  ontransitionend?: EventHandlerUnion<T, TransitionEvent>;
374
+ ontransitionrun?: EventHandlerUnion<T, TransitionEvent>;
375
+ ontransitioncancel?: EventHandlerUnion<T, TransitionEvent>;
370
376
  onvolumechange?: EventHandlerUnion<T, Event>;
371
377
  onwaiting?: EventHandlerUnion<T, Event>;
372
378
  onwheel?: EventHandlerUnion<T, WheelEvent>;
@@ -705,7 +711,7 @@ export namespace JSX {
705
711
  contenteditable?: boolean | "inherit";
706
712
  contextmenu?: string;
707
713
  dir?: HTMLDir;
708
- draggable?: boolean;
714
+ draggable?: boolean | "false" | "true";
709
715
  hidden?: boolean | "hidden" | "until-found";
710
716
  id?: string;
711
717
  inert?: boolean;
@@ -366,7 +366,7 @@ export type EqualityCheckerFunction<T, U> = (a: U, b: T) => boolean;
366
366
  *
367
367
  * @description https://www.solidjs.com/docs/latest/api#createselector
368
368
  */
369
- export declare function createSelector<T, U>(source: Accessor<T>, fn?: EqualityCheckerFunction<T, U>, options?: BaseOptions): (key: U) => boolean;
369
+ export declare function createSelector<T, U = T>(source: Accessor<T>, fn?: EqualityCheckerFunction<T, U>, options?: BaseOptions): (key: U) => boolean;
370
370
  /**
371
371
  * Holds changes inside the block before the reactive context is updated
372
372
  * @param fn wraps the reactive updates that should be batched
@@ -38,7 +38,7 @@ export declare function cleanNode(node: Owner): void;
38
38
  export declare function catchError<T>(fn: () => T, handler: (err: Error) => void): T | undefined;
39
39
  /**
40
40
  * @deprecated since version 1.7.0 and will be removed in next major - use catchError instead
41
- */
41
+ */
42
42
  export declare function onError(fn: (err: Error) => void): void;
43
43
  export declare function getListener(): null;
44
44
  export interface Context<T> {
@@ -8,16 +8,12 @@
8
8
  "exports": {
9
9
  ".": {
10
10
  "development": {
11
- "import": {
12
- "types": "./types/index.d.ts",
13
- "default": "./dist/dev.js"
14
- },
15
- "require": "./dist/dev.cjs"
16
- },
17
- "import": {
18
11
  "types": "./types/index.d.ts",
19
- "default": "./dist/universal.js"
12
+ "import": "./dist/dev.js",
13
+ "require": "./dist/dev.cjs"
20
14
  },
15
+ "types": "./types/index.d.ts",
16
+ "import": "./dist/universal.js",
21
17
  "require": "./dist/universal.cjs"
22
18
  }
23
19
  }
package/web/dist/dev.cjs CHANGED
@@ -126,7 +126,7 @@ function template(html, isCE, isSVG) {
126
126
  t.innerHTML = html;
127
127
  return isSVG ? t.content.firstChild.firstChild : t.content.firstChild;
128
128
  };
129
- const fn = isCE ? () => (node || (node = create())).cloneNode(true) : () => solidJs.untrack(() => document.importNode(node || (node = create()), true));
129
+ const fn = isCE ? () => solidJs.untrack(() => document.importNode(node || (node = create()), true)) : () => (node || (node = create())).cloneNode(true);
130
130
  fn.cloneNode = fn;
131
131
  return fn;
132
132
  }
@@ -576,12 +576,12 @@ function Portal(props) {
576
576
  let hydrating = !!solidJs.sharedConfig.context;
577
577
  solidJs.createEffect(() => {
578
578
  if (hydrating) solidJs.getOwner().user = hydrating = false;
579
- content || (content = solidJs.runWithOwner(owner, () => props.children));
579
+ content || (content = solidJs.runWithOwner(owner, () => solidJs.createMemo(() => props.children)));
580
580
  const el = mount();
581
581
  if (el instanceof HTMLHeadElement) {
582
582
  const [clean, setClean] = solidJs.createSignal(false);
583
583
  const cleanup = () => setClean(true);
584
- solidJs.createRoot(dispose => insert(el, () => !clean() ? content : dispose(), null));
584
+ solidJs.createRoot(dispose => insert(el, () => !clean() ? content() : dispose(), null));
585
585
  solidJs.onCleanup(cleanup);
586
586
  } else {
587
587
  const container = createElement(props.isSVG ? "g" : "div", props.isSVG),
package/web/dist/dev.js CHANGED
@@ -1,4 +1,4 @@
1
- import { createRoot, createRenderEffect, sharedConfig, untrack, enableHydration, getOwner, createEffect, runWithOwner, createSignal, onCleanup, splitProps, createMemo, $DEVCOMP } from 'solid-js';
1
+ import { createRoot, createRenderEffect, sharedConfig, untrack, enableHydration, getOwner, createEffect, runWithOwner, createMemo, createSignal, onCleanup, splitProps, $DEVCOMP } from 'solid-js';
2
2
  export { ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, createComponent, createRenderEffect as effect, getOwner, createMemo as memo, mergeProps, untrack } from 'solid-js';
3
3
 
4
4
  const booleans = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"];
@@ -125,7 +125,7 @@ function template(html, isCE, isSVG) {
125
125
  t.innerHTML = html;
126
126
  return isSVG ? t.content.firstChild.firstChild : t.content.firstChild;
127
127
  };
128
- const fn = isCE ? () => (node || (node = create())).cloneNode(true) : () => untrack(() => document.importNode(node || (node = create()), true));
128
+ const fn = isCE ? () => untrack(() => document.importNode(node || (node = create()), true)) : () => (node || (node = create())).cloneNode(true);
129
129
  fn.cloneNode = fn;
130
130
  return fn;
131
131
  }
@@ -575,12 +575,12 @@ function Portal(props) {
575
575
  let hydrating = !!sharedConfig.context;
576
576
  createEffect(() => {
577
577
  if (hydrating) getOwner().user = hydrating = false;
578
- content || (content = runWithOwner(owner, () => props.children));
578
+ content || (content = runWithOwner(owner, () => createMemo(() => props.children)));
579
579
  const el = mount();
580
580
  if (el instanceof HTMLHeadElement) {
581
581
  const [clean, setClean] = createSignal(false);
582
582
  const cleanup = () => setClean(true);
583
- createRoot(dispose => insert(el, () => !clean() ? content : dispose(), null));
583
+ createRoot(dispose => insert(el, () => !clean() ? content() : dispose(), null));
584
584
  onCleanup(cleanup);
585
585
  } else {
586
586
  const container = createElement(props.isSVG ? "g" : "div", props.isSVG),
@@ -5,7 +5,6 @@ var seroval = require('seroval');
5
5
 
6
6
  const booleans = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"];
7
7
  const BooleanAttributes = /*#__PURE__*/new Set(booleans);
8
- /*#__PURE__*/new Set(["className", "value", "readOnly", "formNoValidate", "isMap", "noModule", "playsInline", ...booleans]);
9
8
  const ChildProperties = /*#__PURE__*/new Set(["innerHTML", "textContent", "innerText", "children"]);
10
9
  const Aliases = /*#__PURE__*/Object.assign(Object.create(null), {
11
10
  className: "class",
@@ -4,7 +4,6 @@ import { serialize, Feature } from 'seroval';
4
4
 
5
5
  const booleans = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"];
6
6
  const BooleanAttributes = /*#__PURE__*/new Set(booleans);
7
- /*#__PURE__*/new Set(["className", "value", "readOnly", "formNoValidate", "isMap", "noModule", "playsInline", ...booleans]);
8
7
  const ChildProperties = /*#__PURE__*/new Set(["innerHTML", "textContent", "innerText", "children"]);
9
8
  const Aliases = /*#__PURE__*/Object.assign(Object.create(null), {
10
9
  className: "class",