solid-js 1.2.2 → 1.3.0-beta.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.
package/dist/solid.cjs CHANGED
@@ -184,18 +184,21 @@ function createSignal(value, options) {
184
184
  pending: NOTPENDING,
185
185
  comparator: options.equals || undefined
186
186
  };
187
- return [readSignal.bind(s), value => {
187
+ const setter = value => {
188
188
  if (typeof value === "function") {
189
189
  if (Transition && Transition.running && Transition.sources.has(s)) value = value(s.pending !== NOTPENDING ? s.pending : s.tValue);else value = value(s.pending !== NOTPENDING ? s.pending : s.value);
190
190
  }
191
191
  return writeSignal(s, value);
192
- }];
192
+ };
193
+ return [readSignal.bind(s), setter];
193
194
  }
194
195
  function createComputed(fn, value, options) {
195
- updateComputation(createComputation(fn, value, true, STALE));
196
+ const c = createComputation(fn, value, true, STALE);
197
+ if (Scheduler && Transition && Transition.running) Updates.push(c);else updateComputation(c);
196
198
  }
197
199
  function createRenderEffect(fn, value, options) {
198
- updateComputation(createComputation(fn, value, false, STALE));
200
+ const c = createComputation(fn, value, false, STALE);
201
+ if (Scheduler && Transition && Transition.running) Updates.push(c);else updateComputation(c);
199
202
  }
200
203
  function createEffect(fn, value, options) {
201
204
  runEffects = runUserEffects;
@@ -212,7 +215,10 @@ function createMemo(fn, value, options) {
212
215
  c.observers = null;
213
216
  c.observerSlots = null;
214
217
  c.comparator = options.equals || undefined;
215
- updateComputation(c);
218
+ if (Scheduler && Transition && Transition.running) {
219
+ c.tState = STALE;
220
+ Updates.push(c);
221
+ } else updateComputation(c);
216
222
  return readSignal.bind(c);
217
223
  }
218
224
  function createResource(source, fetcher, options) {
@@ -241,12 +247,7 @@ function createResource(source, fetcher, options) {
241
247
  dynamic = typeof source === "function";
242
248
  if (sharedConfig.context) {
243
249
  id = `${sharedConfig.context.id}${sharedConfig.context.count++}`;
244
- if (sharedConfig.context.loadResource) {
245
- initP = sharedConfig.context.loadResource(id);
246
- } else if (sharedConfig.resources && id && id in sharedConfig.resources) {
247
- initP = sharedConfig.resources[id];
248
- delete sharedConfig.resources[id];
249
- }
250
+ if (sharedConfig.load) initP = sharedConfig.load(id);
250
251
  }
251
252
  function loadEnd(p, v, e) {
252
253
  if (pr === p) {
@@ -401,7 +402,8 @@ function untrack(fn) {
401
402
  Listener = listener;
402
403
  return result;
403
404
  }
404
- function on(deps, fn, options) {
405
+ function on(deps, fn,
406
+ options) {
405
407
  const isArray = Array.isArray(deps);
406
408
  let prevInput;
407
409
  let defer = options && options.defer;
@@ -1131,6 +1133,9 @@ function splitProps(props, ...keys) {
1131
1133
  Object.defineProperty(clone, key, descriptors[key] ? descriptors[key] : {
1132
1134
  get() {
1133
1135
  return props[key];
1136
+ },
1137
+ set() {
1138
+ return true;
1134
1139
  }
1135
1140
  });
1136
1141
  }
@@ -1153,7 +1158,7 @@ function lazy(fn) {
1153
1158
  let comp;
1154
1159
  const wrap = props => {
1155
1160
  const ctx = sharedConfig.context;
1156
- if (ctx && sharedConfig.resources) {
1161
+ if (ctx) {
1157
1162
  ctx.count++;
1158
1163
  const [s, set] = createSignal();
1159
1164
  fn().then(mod => {
@@ -1226,7 +1231,7 @@ function Switch(props) {
1226
1231
  }
1227
1232
  return [-1];
1228
1233
  }, undefined, {
1229
- equals: (a, b) => a && a[0] === b[0] && (strictEqual ? a[1] === b[1] : !a[1] === !b[1]) && a[2] === b[2]
1234
+ equals: (a, b) => a[0] === b[0] && (strictEqual ? a[1] === b[1] : !a[1] === !b[1]) && a[2] === b[2]
1230
1235
  });
1231
1236
  return createMemo(() => {
1232
1237
  const [index, when, cond] = evalConditions();
@@ -1320,7 +1325,10 @@ function SuspenseList(props) {
1320
1325
  function Suspense(props) {
1321
1326
  let counter = 0,
1322
1327
  showContent,
1323
- showFallback;
1328
+ showFallback,
1329
+ ctx,
1330
+ waitingHydration,
1331
+ flicker;
1324
1332
  const [inFallback, setFallback] = createSignal(false),
1325
1333
  SuspenseContext = getSuspenseContext(),
1326
1334
  store = {
@@ -1333,30 +1341,62 @@ function Suspense(props) {
1333
1341
  inFallback,
1334
1342
  effects: [],
1335
1343
  resolved: false
1336
- };
1344
+ },
1345
+ owner = getOwner();
1346
+ if (sharedConfig.context && sharedConfig.load) {
1347
+ const key = sharedConfig.context.id + sharedConfig.context.count;
1348
+ const p = sharedConfig.load(key);
1349
+ if (p) {
1350
+ const [s, set] = createSignal(undefined, {
1351
+ equals: false
1352
+ });
1353
+ flicker = s;
1354
+ p.then(() => {
1355
+ sharedConfig.gather(key);
1356
+ waitingHydration = true;
1357
+ setHydrateContext(ctx);
1358
+ set();
1359
+ setHydrateContext(undefined);
1360
+ waitingHydration = false;
1361
+ });
1362
+ }
1363
+ }
1337
1364
  const listContext = useContext(SuspenseListContext);
1338
1365
  if (listContext) [showContent, showFallback] = listContext.register(store.inFallback);
1366
+ let dispose;
1367
+ onCleanup(() => dispose && dispose());
1339
1368
  return createComponent(SuspenseContext.Provider, {
1340
1369
  value: store,
1341
1370
  get children() {
1342
- const rendered = untrack(() => props.children);
1343
1371
  return createMemo(() => {
1344
- const inFallback = store.inFallback(),
1345
- visibleContent = showContent ? showContent() : true,
1346
- visibleFallback = showFallback ? showFallback() : true;
1347
- if (!inFallback && visibleContent) {
1348
- store.resolved = true;
1349
- resumeEffects(store.effects);
1350
- return rendered;
1372
+ if (flicker) {
1373
+ ctx = sharedConfig.context;
1374
+ flicker();
1375
+ return flicker = undefined;
1351
1376
  }
1352
- if (!visibleFallback) return;
1353
- return props.fallback;
1377
+ const rendered = untrack(() => props.children);
1378
+ return createMemo(() => {
1379
+ const inFallback = store.inFallback(),
1380
+ visibleContent = showContent ? showContent() : true,
1381
+ visibleFallback = showFallback ? showFallback() : true;
1382
+ dispose && dispose();
1383
+ if ((!inFallback || waitingHydration) && visibleContent) {
1384
+ store.resolved = true;
1385
+ resumeEffects(store.effects);
1386
+ return rendered;
1387
+ }
1388
+ if (!visibleFallback) return;
1389
+ return createRoot(disposer => {
1390
+ dispose = disposer;
1391
+ if (sharedConfig.context) sharedConfig.context.count = 0;
1392
+ return props.fallback;
1393
+ }, owner);
1394
+ });
1354
1395
  });
1355
1396
  }
1356
1397
  });
1357
1398
  }
1358
1399
 
1359
- function awaitSuspense() {}
1360
1400
  let DEV;
1361
1401
 
1362
1402
  exports.$PROXY = $PROXY;
@@ -1369,7 +1409,6 @@ exports.Show = Show;
1369
1409
  exports.Suspense = Suspense;
1370
1410
  exports.SuspenseList = SuspenseList;
1371
1411
  exports.Switch = Switch;
1372
- exports.awaitSuspense = awaitSuspense;
1373
1412
  exports.batch = batch;
1374
1413
  exports.cancelCallback = cancelCallback;
1375
1414
  exports.children = children;
package/dist/solid.js CHANGED
@@ -180,18 +180,21 @@ function createSignal(value, options) {
180
180
  pending: NOTPENDING,
181
181
  comparator: options.equals || undefined
182
182
  };
183
- return [readSignal.bind(s), value => {
183
+ const setter = value => {
184
184
  if (typeof value === "function") {
185
185
  if (Transition && Transition.running && Transition.sources.has(s)) value = value(s.pending !== NOTPENDING ? s.pending : s.tValue);else value = value(s.pending !== NOTPENDING ? s.pending : s.value);
186
186
  }
187
187
  return writeSignal(s, value);
188
- }];
188
+ };
189
+ return [readSignal.bind(s), setter];
189
190
  }
190
191
  function createComputed(fn, value, options) {
191
- updateComputation(createComputation(fn, value, true, STALE));
192
+ const c = createComputation(fn, value, true, STALE);
193
+ if (Scheduler && Transition && Transition.running) Updates.push(c);else updateComputation(c);
192
194
  }
193
195
  function createRenderEffect(fn, value, options) {
194
- updateComputation(createComputation(fn, value, false, STALE));
196
+ const c = createComputation(fn, value, false, STALE);
197
+ if (Scheduler && Transition && Transition.running) Updates.push(c);else updateComputation(c);
195
198
  }
196
199
  function createEffect(fn, value, options) {
197
200
  runEffects = runUserEffects;
@@ -208,7 +211,10 @@ function createMemo(fn, value, options) {
208
211
  c.observers = null;
209
212
  c.observerSlots = null;
210
213
  c.comparator = options.equals || undefined;
211
- updateComputation(c);
214
+ if (Scheduler && Transition && Transition.running) {
215
+ c.tState = STALE;
216
+ Updates.push(c);
217
+ } else updateComputation(c);
212
218
  return readSignal.bind(c);
213
219
  }
214
220
  function createResource(source, fetcher, options) {
@@ -237,12 +243,7 @@ function createResource(source, fetcher, options) {
237
243
  dynamic = typeof source === "function";
238
244
  if (sharedConfig.context) {
239
245
  id = `${sharedConfig.context.id}${sharedConfig.context.count++}`;
240
- if (sharedConfig.context.loadResource) {
241
- initP = sharedConfig.context.loadResource(id);
242
- } else if (sharedConfig.resources && id && id in sharedConfig.resources) {
243
- initP = sharedConfig.resources[id];
244
- delete sharedConfig.resources[id];
245
- }
246
+ if (sharedConfig.load) initP = sharedConfig.load(id);
246
247
  }
247
248
  function loadEnd(p, v, e) {
248
249
  if (pr === p) {
@@ -397,7 +398,8 @@ function untrack(fn) {
397
398
  Listener = listener;
398
399
  return result;
399
400
  }
400
- function on(deps, fn, options) {
401
+ function on(deps, fn,
402
+ options) {
401
403
  const isArray = Array.isArray(deps);
402
404
  let prevInput;
403
405
  let defer = options && options.defer;
@@ -1127,6 +1129,9 @@ function splitProps(props, ...keys) {
1127
1129
  Object.defineProperty(clone, key, descriptors[key] ? descriptors[key] : {
1128
1130
  get() {
1129
1131
  return props[key];
1132
+ },
1133
+ set() {
1134
+ return true;
1130
1135
  }
1131
1136
  });
1132
1137
  }
@@ -1149,7 +1154,7 @@ function lazy(fn) {
1149
1154
  let comp;
1150
1155
  const wrap = props => {
1151
1156
  const ctx = sharedConfig.context;
1152
- if (ctx && sharedConfig.resources) {
1157
+ if (ctx) {
1153
1158
  ctx.count++;
1154
1159
  const [s, set] = createSignal();
1155
1160
  fn().then(mod => {
@@ -1222,7 +1227,7 @@ function Switch(props) {
1222
1227
  }
1223
1228
  return [-1];
1224
1229
  }, undefined, {
1225
- equals: (a, b) => a && a[0] === b[0] && (strictEqual ? a[1] === b[1] : !a[1] === !b[1]) && a[2] === b[2]
1230
+ equals: (a, b) => a[0] === b[0] && (strictEqual ? a[1] === b[1] : !a[1] === !b[1]) && a[2] === b[2]
1226
1231
  });
1227
1232
  return createMemo(() => {
1228
1233
  const [index, when, cond] = evalConditions();
@@ -1316,7 +1321,10 @@ function SuspenseList(props) {
1316
1321
  function Suspense(props) {
1317
1322
  let counter = 0,
1318
1323
  showContent,
1319
- showFallback;
1324
+ showFallback,
1325
+ ctx,
1326
+ waitingHydration,
1327
+ flicker;
1320
1328
  const [inFallback, setFallback] = createSignal(false),
1321
1329
  SuspenseContext = getSuspenseContext(),
1322
1330
  store = {
@@ -1329,30 +1337,62 @@ function Suspense(props) {
1329
1337
  inFallback,
1330
1338
  effects: [],
1331
1339
  resolved: false
1332
- };
1340
+ },
1341
+ owner = getOwner();
1342
+ if (sharedConfig.context && sharedConfig.load) {
1343
+ const key = sharedConfig.context.id + sharedConfig.context.count;
1344
+ const p = sharedConfig.load(key);
1345
+ if (p) {
1346
+ const [s, set] = createSignal(undefined, {
1347
+ equals: false
1348
+ });
1349
+ flicker = s;
1350
+ p.then(() => {
1351
+ sharedConfig.gather(key);
1352
+ waitingHydration = true;
1353
+ setHydrateContext(ctx);
1354
+ set();
1355
+ setHydrateContext(undefined);
1356
+ waitingHydration = false;
1357
+ });
1358
+ }
1359
+ }
1333
1360
  const listContext = useContext(SuspenseListContext);
1334
1361
  if (listContext) [showContent, showFallback] = listContext.register(store.inFallback);
1362
+ let dispose;
1363
+ onCleanup(() => dispose && dispose());
1335
1364
  return createComponent(SuspenseContext.Provider, {
1336
1365
  value: store,
1337
1366
  get children() {
1338
- const rendered = untrack(() => props.children);
1339
1367
  return createMemo(() => {
1340
- const inFallback = store.inFallback(),
1341
- visibleContent = showContent ? showContent() : true,
1342
- visibleFallback = showFallback ? showFallback() : true;
1343
- if (!inFallback && visibleContent) {
1344
- store.resolved = true;
1345
- resumeEffects(store.effects);
1346
- return rendered;
1368
+ if (flicker) {
1369
+ ctx = sharedConfig.context;
1370
+ flicker();
1371
+ return flicker = undefined;
1347
1372
  }
1348
- if (!visibleFallback) return;
1349
- return props.fallback;
1373
+ const rendered = untrack(() => props.children);
1374
+ return createMemo(() => {
1375
+ const inFallback = store.inFallback(),
1376
+ visibleContent = showContent ? showContent() : true,
1377
+ visibleFallback = showFallback ? showFallback() : true;
1378
+ dispose && dispose();
1379
+ if ((!inFallback || waitingHydration) && visibleContent) {
1380
+ store.resolved = true;
1381
+ resumeEffects(store.effects);
1382
+ return rendered;
1383
+ }
1384
+ if (!visibleFallback) return;
1385
+ return createRoot(disposer => {
1386
+ dispose = disposer;
1387
+ if (sharedConfig.context) sharedConfig.context.count = 0;
1388
+ return props.fallback;
1389
+ }, owner);
1390
+ });
1350
1391
  });
1351
1392
  }
1352
1393
  });
1353
1394
  }
1354
1395
 
1355
- function awaitSuspense() {}
1356
1396
  let DEV;
1357
1397
 
1358
- export { $PROXY, DEV, ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, awaitSuspense, batch, cancelCallback, children, createComponent, createComputed, createContext, createDeferred, createEffect, createMemo, createRenderEffect, createResource, createRoot, createSelector, createSignal, createUniqueId, enableScheduling, equalFn, from, getListener, getOwner, indexArray, lazy, mapArray, mergeProps, observable, on, onCleanup, onError, onMount, requestCallback, runWithOwner, sharedConfig, splitProps, startTransition, untrack, useContext, useTransition };
1398
+ export { $PROXY, DEV, ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, batch, cancelCallback, children, createComponent, createComputed, createContext, createDeferred, createEffect, createMemo, createRenderEffect, createResource, createRoot, createSelector, createSignal, createUniqueId, enableScheduling, equalFn, from, getListener, getOwner, indexArray, lazy, mapArray, mergeProps, observable, on, onCleanup, onError, onMount, requestCallback, runWithOwner, sharedConfig, splitProps, startTransition, untrack, useContext, useTransition };
@@ -358,7 +358,8 @@ function createHTML(r, {
358
358
  childOptions = Object.assign({}, options, {
359
359
  first: true,
360
360
  decl: [],
361
- exprs: []
361
+ exprs: [],
362
+ parent: false
362
363
  });
363
364
  parseNode(children, childOptions);
364
365
  props.push(`children: () => { ${childOptions.exprs.join(";\n")}}`);
@@ -399,8 +400,8 @@ function createHTML(r, {
399
400
  decl: [],
400
401
  exprs: []
401
402
  });
402
- parseNode(child, childOptions);
403
403
  options.templateNodes.push([child]);
404
+ parseNode(child, childOptions);
404
405
  parts.push(`function() { ${childOptions.decl.join(",\n") + ";\n" + childOptions.exprs.join(";\n") + `;\nreturn _$el${id};\n`}}()`);
405
406
  options.counter = childOptions.counter;
406
407
  options.templateId = childOptions.templateId;
package/html/dist/html.js CHANGED
@@ -356,7 +356,8 @@ function createHTML(r, {
356
356
  childOptions = Object.assign({}, options, {
357
357
  first: true,
358
358
  decl: [],
359
- exprs: []
359
+ exprs: [],
360
+ parent: false
360
361
  });
361
362
  parseNode(children, childOptions);
362
363
  props.push(`children: () => { ${childOptions.exprs.join(";\n")}}`);
@@ -397,8 +398,8 @@ function createHTML(r, {
397
398
  decl: [],
398
399
  exprs: []
399
400
  });
400
- parseNode(child, childOptions);
401
401
  options.templateNodes.push([child]);
402
+ parseNode(child, childOptions);
402
403
  parts.push(`function() { ${childOptions.decl.join(",\n") + ";\n" + childOptions.exprs.join(";\n") + `;\nreturn _$el${id};\n`}}()`);
403
404
  options.counter = childOptions.counter;
404
405
  options.templateId = childOptions.templateId;
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.2.2",
4
+ "version": "1.3.0-beta.0",
5
5
  "author": "Ryan Carniato",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/solidjs/solid#readme",
@@ -132,5 +132,5 @@
132
132
  "compiler",
133
133
  "performance"
134
134
  ],
135
- "gitHead": "116e636553b34a7bf9fc5d87402d0077d7f16e59"
135
+ "gitHead": "4efd2be2d5180db0a4875c7c05d8fb4cd9bf44f3"
136
136
  }
@@ -31,7 +31,7 @@ function wrap$1(value, name) {
31
31
  return p;
32
32
  }
33
33
  function isWrappable(obj) {
34
- return obj != null && typeof obj === "object" && (!obj.__proto__ || obj.__proto__ === Object.prototype || Array.isArray(obj));
34
+ return obj != null && typeof obj === "object" && (obj[solidJs.$PROXY] || !obj.__proto__ || obj.__proto__ === Object.prototype || Array.isArray(obj));
35
35
  }
36
36
  function unwrap(item, set = new Set()) {
37
37
  let result, unwrapped, v, prop;
@@ -65,7 +65,7 @@ function getDataNodes(target) {
65
65
  }
66
66
  function proxyDescriptor(target, property) {
67
67
  const desc = Reflect.getOwnPropertyDescriptor(target, property);
68
- if (!desc || desc.get || property === solidJs.$PROXY || property === $NODE || property === $NAME) return desc;
68
+ if (!desc || desc.get || !desc.configurable || property === solidJs.$PROXY || property === $NODE || property === $NAME) return desc;
69
69
  delete desc.value;
70
70
  delete desc.writable;
71
71
  desc.get = () => target[solidJs.$PROXY][property];
package/store/dist/dev.js CHANGED
@@ -1,4 +1,4 @@
1
- import { DEV, $PROXY, getListener, batch, createSignal } from 'solid-js';
1
+ import { $PROXY, DEV, getListener, batch, createSignal } from 'solid-js';
2
2
 
3
3
  const $RAW = Symbol("store-raw"),
4
4
  $NODE = Symbol("store-node"),
@@ -27,7 +27,7 @@ function wrap$1(value, name) {
27
27
  return p;
28
28
  }
29
29
  function isWrappable(obj) {
30
- return obj != null && typeof obj === "object" && (!obj.__proto__ || obj.__proto__ === Object.prototype || Array.isArray(obj));
30
+ return obj != null && typeof obj === "object" && (obj[$PROXY] || !obj.__proto__ || obj.__proto__ === Object.prototype || Array.isArray(obj));
31
31
  }
32
32
  function unwrap(item, set = new Set()) {
33
33
  let result, unwrapped, v, prop;
@@ -61,7 +61,7 @@ function getDataNodes(target) {
61
61
  }
62
62
  function proxyDescriptor(target, property) {
63
63
  const desc = Reflect.getOwnPropertyDescriptor(target, property);
64
- if (!desc || desc.get || property === $PROXY || property === $NODE || property === $NAME) return desc;
64
+ if (!desc || desc.get || !desc.configurable || property === $PROXY || property === $NODE || property === $NAME) return desc;
65
65
  delete desc.value;
66
66
  delete desc.writable;
67
67
  desc.get = () => target[$PROXY][property];
@@ -28,7 +28,7 @@ function wrap$1(value, name) {
28
28
  return p;
29
29
  }
30
30
  function isWrappable(obj) {
31
- return obj != null && typeof obj === "object" && (!obj.__proto__ || obj.__proto__ === Object.prototype || Array.isArray(obj));
31
+ return obj != null && typeof obj === "object" && (obj[solidJs.$PROXY] || !obj.__proto__ || obj.__proto__ === Object.prototype || Array.isArray(obj));
32
32
  }
33
33
  function unwrap(item, set = new Set()) {
34
34
  let result, unwrapped, v, prop;
@@ -62,7 +62,7 @@ function getDataNodes(target) {
62
62
  }
63
63
  function proxyDescriptor(target, property) {
64
64
  const desc = Reflect.getOwnPropertyDescriptor(target, property);
65
- if (!desc || desc.get || property === solidJs.$PROXY || property === $NODE || property === $NAME) return desc;
65
+ if (!desc || desc.get || !desc.configurable || property === solidJs.$PROXY || property === $NODE || property === $NAME) return desc;
66
66
  delete desc.value;
67
67
  delete desc.writable;
68
68
  desc.get = () => target[solidJs.$PROXY][property];
@@ -24,7 +24,7 @@ function wrap$1(value, name) {
24
24
  return p;
25
25
  }
26
26
  function isWrappable(obj) {
27
- return obj != null && typeof obj === "object" && (!obj.__proto__ || obj.__proto__ === Object.prototype || Array.isArray(obj));
27
+ return obj != null && typeof obj === "object" && (obj[$PROXY] || !obj.__proto__ || obj.__proto__ === Object.prototype || Array.isArray(obj));
28
28
  }
29
29
  function unwrap(item, set = new Set()) {
30
30
  let result, unwrapped, v, prop;
@@ -58,7 +58,7 @@ function getDataNodes(target) {
58
58
  }
59
59
  function proxyDescriptor(target, property) {
60
60
  const desc = Reflect.getOwnPropertyDescriptor(target, property);
61
- if (!desc || desc.get || property === $PROXY || property === $NODE || property === $NAME) return desc;
61
+ if (!desc || desc.get || !desc.configurable || property === $PROXY || property === $NODE || property === $NAME) return desc;
62
62
  delete desc.value;
63
63
  delete desc.writable;
64
64
  desc.get = () => target[$PROXY][property];
@@ -33,7 +33,7 @@ export declare type Store<T> = {
33
33
  } & {
34
34
  [$RAW]?: T;
35
35
  } & AddSymbolToPrimitive<T> & AddSymbolIterator<T> & AddSymbolToStringTag<T> & AddCallable<T>;
36
- export declare function isWrappable(obj: any): boolean;
36
+ export declare function isWrappable(obj: any): any;
37
37
  export declare function unwrap<T extends StoreNode>(item: any, set?: Set<unknown>): T;
38
38
  export declare function getDataNodes(target: StoreNode): any;
39
39
  export declare function proxyDescriptor(target: StoreNode, property: string | number | symbol): PropertyDescriptor | undefined;
package/types/index.d.ts CHANGED
@@ -7,7 +7,6 @@ export * from "./render";
7
7
  import type { JSX } from "./jsx";
8
8
  declare type JSXElement = JSX.Element;
9
9
  export type { JSXElement, JSX };
10
- export declare function awaitSuspense(): void;
11
10
  import { writeSignal, serializeGraph, registerGraph, hashValue } from "./reactive/signal";
12
11
  declare let DEV: {
13
12
  writeSignal: typeof writeSignal;
package/types/jsx.d.ts CHANGED
@@ -92,6 +92,7 @@ export namespace JSX {
92
92
  onFocusIn?: EventHandlerUnion<T, FocusEvent>;
93
93
  onBlur?: EventHandlerUnion<T, FocusEvent>;
94
94
  onChange?: EventHandlerUnion<T, Event>;
95
+ onInvalid?: EventHandlerUnion<T, Event>;
95
96
  onInput?: EventHandlerUnion<T, InputEvent>;
96
97
  onBeforeInput?: EventHandlerUnion<T, InputEvent>;
97
98
  onReset?: EventHandlerUnion<T, Event>;
@@ -180,6 +181,7 @@ export namespace JSX {
180
181
  onfocusin?: EventHandlerUnion<T, FocusEvent>;
181
182
  onblur?: EventHandlerUnion<T, FocusEvent>;
182
183
  onchange?: EventHandlerUnion<T, Event>;
184
+ oninvalid?: EventHandlerUnion<T, Event>;
183
185
  oninput?: EventHandlerUnion<T, InputEvent>;
184
186
  onbeforeinput?: EventHandlerUnion<T, InputEvent>;
185
187
  onreset?: EventHandlerUnion<T, Event>;