solid-js 1.8.7 → 1.8.9

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
@@ -152,7 +152,7 @@ const NO_INIT = {};
152
152
  var Owner = null;
153
153
  let Transition = null;
154
154
  let Scheduler = null;
155
- let ExternalSourceFactory = null;
155
+ let ExternalSourceConfig = null;
156
156
  let Listener = null;
157
157
  let Updates = null;
158
158
  let Effects = null;
@@ -438,10 +438,11 @@ function batch(fn) {
438
438
  return runUpdates(fn, false);
439
439
  }
440
440
  function untrack(fn) {
441
- if (Listener === null) return fn();
441
+ if (!ExternalSourceConfig && Listener === null) return fn();
442
442
  const listener = Listener;
443
443
  Listener = null;
444
444
  try {
445
+ if (ExternalSourceConfig) return ExternalSourceConfig.untrack(fn);
445
446
  return fn();
446
447
  } finally {
447
448
  Listener = listener;
@@ -594,22 +595,31 @@ let SuspenseContext;
594
595
  function getSuspenseContext() {
595
596
  return SuspenseContext || (SuspenseContext = createContext());
596
597
  }
597
- function enableExternalSource(factory) {
598
- if (ExternalSourceFactory) {
599
- const oldFactory = ExternalSourceFactory;
600
- ExternalSourceFactory = (fn, trigger) => {
601
- const oldSource = oldFactory(fn, trigger);
602
- const source = factory(x => oldSource.track(x), trigger);
603
- return {
604
- track: x => source.track(x),
605
- dispose() {
606
- source.dispose();
607
- oldSource.dispose();
608
- }
609
- };
598
+ function enableExternalSource(factory, untrack = fn => fn()) {
599
+ if (ExternalSourceConfig) {
600
+ const {
601
+ factory: oldFactory,
602
+ untrack: oldUntrack
603
+ } = ExternalSourceConfig;
604
+ ExternalSourceConfig = {
605
+ factory: (fn, trigger) => {
606
+ const oldSource = oldFactory(fn, trigger);
607
+ const source = factory(x => oldSource.track(x), trigger);
608
+ return {
609
+ track: x => source.track(x),
610
+ dispose() {
611
+ source.dispose();
612
+ oldSource.dispose();
613
+ }
614
+ };
615
+ },
616
+ untrack: fn => oldUntrack(() => untrack(fn))
610
617
  };
611
618
  } else {
612
- ExternalSourceFactory = factory;
619
+ ExternalSourceConfig = {
620
+ factory,
621
+ untrack
622
+ };
613
623
  }
614
624
  }
615
625
  function readSignal() {
@@ -752,14 +762,14 @@ function createComputation(fn, init, pure, state = STALE, options) {
752
762
  }
753
763
  }
754
764
  if (options && options.name) c.name = options.name;
755
- if (ExternalSourceFactory) {
765
+ if (ExternalSourceConfig && c.fn) {
756
766
  const [track, trigger] = createSignal(undefined, {
757
767
  equals: false
758
768
  });
759
- const ordinary = ExternalSourceFactory(c.fn, trigger);
769
+ const ordinary = ExternalSourceConfig.factory(c.fn, trigger);
760
770
  onCleanup(() => ordinary.dispose());
761
771
  const triggerInTransition = () => startTransition(trigger).then(() => inTransition.dispose());
762
- const inTransition = ExternalSourceFactory(c.fn, triggerInTransition);
772
+ const inTransition = ExternalSourceConfig.factory(c.fn, triggerInTransition);
763
773
  c.fn = x => {
764
774
  track();
765
775
  return Transition && Transition.running ? inTransition.track(x) : ordinary.track(x);
@@ -1340,41 +1350,37 @@ function mergeProps(...sources) {
1340
1350
  }
1341
1351
  }, propTraps);
1342
1352
  }
1343
- const target = {};
1344
1353
  const sourcesMap = {};
1345
- const defined = new Set();
1354
+ const defined = Object.create(null);
1346
1355
  for (let i = sources.length - 1; i >= 0; i--) {
1347
1356
  const source = sources[i];
1348
1357
  if (!source) continue;
1349
1358
  const sourceKeys = Object.getOwnPropertyNames(source);
1350
- for (let i = 0, length = sourceKeys.length; i < length; i++) {
1359
+ for (let i = sourceKeys.length - 1; i >= 0; i--) {
1351
1360
  const key = sourceKeys[i];
1352
1361
  if (key === "__proto__" || key === "constructor") continue;
1353
1362
  const desc = Object.getOwnPropertyDescriptor(source, key);
1354
- if (!defined.has(key)) {
1355
- if (desc.get) {
1356
- defined.add(key);
1357
- Object.defineProperty(target, key, {
1358
- enumerable: true,
1359
- configurable: true,
1360
- get: resolveSources.bind(sourcesMap[key] = [desc.get.bind(source)])
1361
- });
1362
- } else {
1363
- if (desc.value !== undefined) defined.add(key);
1364
- target[key] = desc.value;
1365
- }
1363
+ if (!defined[key]) {
1364
+ defined[key] = desc.get ? {
1365
+ enumerable: true,
1366
+ configurable: true,
1367
+ get: resolveSources.bind(sourcesMap[key] = [desc.get.bind(source)])
1368
+ } : desc.value !== undefined ? desc : undefined;
1366
1369
  } else {
1367
1370
  const sources = sourcesMap[key];
1368
1371
  if (sources) {
1369
- if (desc.get) {
1370
- sources.push(desc.get.bind(source));
1371
- } else if (desc.value !== undefined) {
1372
- sources.push(() => desc.value);
1373
- }
1374
- } else if (target[key] === undefined) target[key] = desc.value;
1372
+ if (desc.get) sources.push(desc.get.bind(source));else if (desc.value !== undefined) sources.push(() => desc.value);
1373
+ }
1375
1374
  }
1376
1375
  }
1377
1376
  }
1377
+ const target = {};
1378
+ const definedKeys = Object.keys(defined);
1379
+ for (let i = definedKeys.length - 1; i >= 0; i--) {
1380
+ const key = definedKeys[i],
1381
+ desc = defined[key];
1382
+ if (desc && desc.get) Object.defineProperty(target, key, desc);else target[key] = desc ? desc.value : undefined;
1383
+ }
1378
1384
  return target;
1379
1385
  }
1380
1386
  function splitProps(props, ...keys) {
@@ -1508,7 +1514,7 @@ function Show(props) {
1508
1514
  }
1509
1515
  function Switch(props) {
1510
1516
  let keyed = false;
1511
- const equals = (a, b) => a[0] === b[0] && (keyed ? a[1] === b[1] : !a[1] === !b[1]) && a[2] === b[2];
1517
+ const equals = (a, b) => (keyed ? a[1] === b[1] : !a[1] === !b[1]) && a[2] === b[2];
1512
1518
  const conditions = children(() => props.children),
1513
1519
  evalConditions = createMemo(() => {
1514
1520
  let conds = conditions();
package/dist/dev.js CHANGED
@@ -152,7 +152,7 @@ const NO_INIT = {};
152
152
  var Owner = null;
153
153
  let Transition = null;
154
154
  let Scheduler = null;
155
- let ExternalSourceFactory = null;
155
+ let ExternalSourceConfig = null;
156
156
  let Listener = null;
157
157
  let Updates = null;
158
158
  let Effects = null;
@@ -497,10 +497,11 @@ function batch(fn) {
497
497
  return runUpdates(fn, false);
498
498
  }
499
499
  function untrack(fn) {
500
- if (Listener === null) return fn();
500
+ if (!ExternalSourceConfig && Listener === null) return fn();
501
501
  const listener = Listener;
502
502
  Listener = null;
503
503
  try {
504
+ if (ExternalSourceConfig) return ExternalSourceConfig.untrack(fn);
504
505
  return fn();
505
506
  } finally {
506
507
  Listener = listener;
@@ -667,22 +668,28 @@ let SuspenseContext;
667
668
  function getSuspenseContext() {
668
669
  return SuspenseContext || (SuspenseContext = createContext());
669
670
  }
670
- function enableExternalSource(factory) {
671
- if (ExternalSourceFactory) {
672
- const oldFactory = ExternalSourceFactory;
673
- ExternalSourceFactory = (fn, trigger) => {
674
- const oldSource = oldFactory(fn, trigger);
675
- const source = factory(x => oldSource.track(x), trigger);
676
- return {
677
- track: x => source.track(x),
678
- dispose() {
679
- source.dispose();
680
- oldSource.dispose();
681
- }
682
- };
671
+ function enableExternalSource(factory, untrack = fn => fn()) {
672
+ if (ExternalSourceConfig) {
673
+ const { factory: oldFactory, untrack: oldUntrack } = ExternalSourceConfig;
674
+ ExternalSourceConfig = {
675
+ factory: (fn, trigger) => {
676
+ const oldSource = oldFactory(fn, trigger);
677
+ const source = factory(x => oldSource.track(x), trigger);
678
+ return {
679
+ track: x => source.track(x),
680
+ dispose() {
681
+ source.dispose();
682
+ oldSource.dispose();
683
+ }
684
+ };
685
+ },
686
+ untrack: fn => oldUntrack(() => untrack(fn))
683
687
  };
684
688
  } else {
685
- ExternalSourceFactory = factory;
689
+ ExternalSourceConfig = {
690
+ factory,
691
+ untrack
692
+ };
686
693
  }
687
694
  }
688
695
  function readSignal() {
@@ -837,14 +844,14 @@ function createComputation(fn, init, pure, state = STALE, options) {
837
844
  }
838
845
  }
839
846
  if (options && options.name) c.name = options.name;
840
- if (ExternalSourceFactory) {
847
+ if (ExternalSourceConfig && c.fn) {
841
848
  const [track, trigger] = createSignal(undefined, {
842
849
  equals: false
843
850
  });
844
- const ordinary = ExternalSourceFactory(c.fn, trigger);
851
+ const ordinary = ExternalSourceConfig.factory(c.fn, trigger);
845
852
  onCleanup(() => ordinary.dispose());
846
853
  const triggerInTransition = () => startTransition(trigger).then(() => inTransition.dispose());
847
- const inTransition = ExternalSourceFactory(c.fn, triggerInTransition);
854
+ const inTransition = ExternalSourceConfig.factory(c.fn, triggerInTransition);
848
855
  c.fn = x => {
849
856
  track();
850
857
  return Transition && Transition.running ? inTransition.track(x) : ordinary.track(x);
@@ -1455,41 +1462,43 @@ function mergeProps(...sources) {
1455
1462
  propTraps
1456
1463
  );
1457
1464
  }
1458
- const target = {};
1459
1465
  const sourcesMap = {};
1460
- const defined = new Set();
1466
+ const defined = Object.create(null);
1461
1467
  for (let i = sources.length - 1; i >= 0; i--) {
1462
1468
  const source = sources[i];
1463
1469
  if (!source) continue;
1464
1470
  const sourceKeys = Object.getOwnPropertyNames(source);
1465
- for (let i = 0, length = sourceKeys.length; i < length; i++) {
1471
+ for (let i = sourceKeys.length - 1; i >= 0; i--) {
1466
1472
  const key = sourceKeys[i];
1467
1473
  if (key === "__proto__" || key === "constructor") continue;
1468
1474
  const desc = Object.getOwnPropertyDescriptor(source, key);
1469
- if (!defined.has(key)) {
1470
- if (desc.get) {
1471
- defined.add(key);
1472
- Object.defineProperty(target, key, {
1473
- enumerable: true,
1474
- configurable: true,
1475
- get: resolveSources.bind((sourcesMap[key] = [desc.get.bind(source)]))
1476
- });
1477
- } else {
1478
- if (desc.value !== undefined) defined.add(key);
1479
- target[key] = desc.value;
1480
- }
1475
+ if (!defined[key]) {
1476
+ defined[key] = desc.get
1477
+ ? {
1478
+ enumerable: true,
1479
+ configurable: true,
1480
+ get: resolveSources.bind((sourcesMap[key] = [desc.get.bind(source)]))
1481
+ }
1482
+ : desc.value !== undefined
1483
+ ? desc
1484
+ : undefined;
1481
1485
  } else {
1482
1486
  const sources = sourcesMap[key];
1483
1487
  if (sources) {
1484
- if (desc.get) {
1485
- sources.push(desc.get.bind(source));
1486
- } else if (desc.value !== undefined) {
1487
- sources.push(() => desc.value);
1488
- }
1489
- } else if (target[key] === undefined) target[key] = desc.value;
1488
+ if (desc.get) sources.push(desc.get.bind(source));
1489
+ else if (desc.value !== undefined) sources.push(() => desc.value);
1490
+ }
1490
1491
  }
1491
1492
  }
1492
1493
  }
1494
+ const target = {};
1495
+ const definedKeys = Object.keys(defined);
1496
+ for (let i = definedKeys.length - 1; i >= 0; i--) {
1497
+ const key = definedKeys[i],
1498
+ desc = defined[key];
1499
+ if (desc && desc.get) Object.defineProperty(target, key, desc);
1500
+ else target[key] = desc ? desc.value : undefined;
1501
+ }
1493
1502
  return target;
1494
1503
  }
1495
1504
  function splitProps(props, ...keys) {
@@ -1662,8 +1671,7 @@ function Show(props) {
1662
1671
  }
1663
1672
  function Switch(props) {
1664
1673
  let keyed = false;
1665
- const equals = (a, b) =>
1666
- a[0] === b[0] && (keyed ? a[1] === b[1] : !a[1] === !b[1]) && a[2] === b[2];
1674
+ const equals = (a, b) => (keyed ? a[1] === b[1] : !a[1] === !b[1]) && a[2] === b[2];
1667
1675
  const conditions = children(() => props.children),
1668
1676
  evalConditions = createMemo(
1669
1677
  () => {
package/dist/solid.cjs CHANGED
@@ -152,7 +152,7 @@ const NO_INIT = {};
152
152
  var Owner = null;
153
153
  let Transition = null;
154
154
  let Scheduler = null;
155
- let ExternalSourceFactory = null;
155
+ let ExternalSourceConfig = null;
156
156
  let Listener = null;
157
157
  let Updates = null;
158
158
  let Effects = null;
@@ -420,10 +420,11 @@ function batch(fn) {
420
420
  return runUpdates(fn, false);
421
421
  }
422
422
  function untrack(fn) {
423
- if (Listener === null) return fn();
423
+ if (!ExternalSourceConfig && Listener === null) return fn();
424
424
  const listener = Listener;
425
425
  Listener = null;
426
426
  try {
427
+ if (ExternalSourceConfig) return ExternalSourceConfig.untrack(fn);
427
428
  return fn();
428
429
  } finally {
429
430
  Listener = listener;
@@ -554,22 +555,31 @@ let SuspenseContext;
554
555
  function getSuspenseContext() {
555
556
  return SuspenseContext || (SuspenseContext = createContext());
556
557
  }
557
- function enableExternalSource(factory) {
558
- if (ExternalSourceFactory) {
559
- const oldFactory = ExternalSourceFactory;
560
- ExternalSourceFactory = (fn, trigger) => {
561
- const oldSource = oldFactory(fn, trigger);
562
- const source = factory(x => oldSource.track(x), trigger);
563
- return {
564
- track: x => source.track(x),
565
- dispose() {
566
- source.dispose();
567
- oldSource.dispose();
568
- }
569
- };
558
+ function enableExternalSource(factory, untrack = fn => fn()) {
559
+ if (ExternalSourceConfig) {
560
+ const {
561
+ factory: oldFactory,
562
+ untrack: oldUntrack
563
+ } = ExternalSourceConfig;
564
+ ExternalSourceConfig = {
565
+ factory: (fn, trigger) => {
566
+ const oldSource = oldFactory(fn, trigger);
567
+ const source = factory(x => oldSource.track(x), trigger);
568
+ return {
569
+ track: x => source.track(x),
570
+ dispose() {
571
+ source.dispose();
572
+ oldSource.dispose();
573
+ }
574
+ };
575
+ },
576
+ untrack: fn => oldUntrack(() => untrack(fn))
570
577
  };
571
578
  } else {
572
- ExternalSourceFactory = factory;
579
+ ExternalSourceConfig = {
580
+ factory,
581
+ untrack
582
+ };
573
583
  }
574
584
  }
575
585
  function readSignal() {
@@ -711,14 +721,14 @@ function createComputation(fn, init, pure, state = STALE, options) {
711
721
  if (!Owner.owned) Owner.owned = [c];else Owner.owned.push(c);
712
722
  }
713
723
  }
714
- if (ExternalSourceFactory) {
724
+ if (ExternalSourceConfig && c.fn) {
715
725
  const [track, trigger] = createSignal(undefined, {
716
726
  equals: false
717
727
  });
718
- const ordinary = ExternalSourceFactory(c.fn, trigger);
728
+ const ordinary = ExternalSourceConfig.factory(c.fn, trigger);
719
729
  onCleanup(() => ordinary.dispose());
720
730
  const triggerInTransition = () => startTransition(trigger).then(() => inTransition.dispose());
721
- const inTransition = ExternalSourceFactory(c.fn, triggerInTransition);
731
+ const inTransition = ExternalSourceConfig.factory(c.fn, triggerInTransition);
722
732
  c.fn = x => {
723
733
  track();
724
734
  return Transition && Transition.running ? inTransition.track(x) : ordinary.track(x);
@@ -1293,41 +1303,37 @@ function mergeProps(...sources) {
1293
1303
  }
1294
1304
  }, propTraps);
1295
1305
  }
1296
- const target = {};
1297
1306
  const sourcesMap = {};
1298
- const defined = new Set();
1307
+ const defined = Object.create(null);
1299
1308
  for (let i = sources.length - 1; i >= 0; i--) {
1300
1309
  const source = sources[i];
1301
1310
  if (!source) continue;
1302
1311
  const sourceKeys = Object.getOwnPropertyNames(source);
1303
- for (let i = 0, length = sourceKeys.length; i < length; i++) {
1312
+ for (let i = sourceKeys.length - 1; i >= 0; i--) {
1304
1313
  const key = sourceKeys[i];
1305
1314
  if (key === "__proto__" || key === "constructor") continue;
1306
1315
  const desc = Object.getOwnPropertyDescriptor(source, key);
1307
- if (!defined.has(key)) {
1308
- if (desc.get) {
1309
- defined.add(key);
1310
- Object.defineProperty(target, key, {
1311
- enumerable: true,
1312
- configurable: true,
1313
- get: resolveSources.bind(sourcesMap[key] = [desc.get.bind(source)])
1314
- });
1315
- } else {
1316
- if (desc.value !== undefined) defined.add(key);
1317
- target[key] = desc.value;
1318
- }
1316
+ if (!defined[key]) {
1317
+ defined[key] = desc.get ? {
1318
+ enumerable: true,
1319
+ configurable: true,
1320
+ get: resolveSources.bind(sourcesMap[key] = [desc.get.bind(source)])
1321
+ } : desc.value !== undefined ? desc : undefined;
1319
1322
  } else {
1320
1323
  const sources = sourcesMap[key];
1321
1324
  if (sources) {
1322
- if (desc.get) {
1323
- sources.push(desc.get.bind(source));
1324
- } else if (desc.value !== undefined) {
1325
- sources.push(() => desc.value);
1326
- }
1327
- } else if (target[key] === undefined) target[key] = desc.value;
1325
+ if (desc.get) sources.push(desc.get.bind(source));else if (desc.value !== undefined) sources.push(() => desc.value);
1326
+ }
1328
1327
  }
1329
1328
  }
1330
1329
  }
1330
+ const target = {};
1331
+ const definedKeys = Object.keys(defined);
1332
+ for (let i = definedKeys.length - 1; i >= 0; i--) {
1333
+ const key = definedKeys[i],
1334
+ desc = defined[key];
1335
+ if (desc && desc.get) Object.defineProperty(target, key, desc);else target[key] = desc ? desc.value : undefined;
1336
+ }
1331
1337
  return target;
1332
1338
  }
1333
1339
  function splitProps(props, ...keys) {
@@ -1452,7 +1458,7 @@ function Show(props) {
1452
1458
  }
1453
1459
  function Switch(props) {
1454
1460
  let keyed = false;
1455
- const equals = (a, b) => a[0] === b[0] && (keyed ? a[1] === b[1] : !a[1] === !b[1]) && a[2] === b[2];
1461
+ const equals = (a, b) => (keyed ? a[1] === b[1] : !a[1] === !b[1]) && a[2] === b[2];
1456
1462
  const conditions = children(() => props.children),
1457
1463
  evalConditions = createMemo(() => {
1458
1464
  let conds = conditions();
package/dist/solid.js CHANGED
@@ -152,7 +152,7 @@ const NO_INIT = {};
152
152
  var Owner = null;
153
153
  let Transition = null;
154
154
  let Scheduler = null;
155
- let ExternalSourceFactory = null;
155
+ let ExternalSourceConfig = null;
156
156
  let Listener = null;
157
157
  let Updates = null;
158
158
  let Effects = null;
@@ -474,10 +474,11 @@ function batch(fn) {
474
474
  return runUpdates(fn, false);
475
475
  }
476
476
  function untrack(fn) {
477
- if (Listener === null) return fn();
477
+ if (!ExternalSourceConfig && Listener === null) return fn();
478
478
  const listener = Listener;
479
479
  Listener = null;
480
480
  try {
481
+ if (ExternalSourceConfig) return ExternalSourceConfig.untrack(fn);
481
482
  return fn();
482
483
  } finally {
483
484
  Listener = listener;
@@ -614,22 +615,28 @@ let SuspenseContext;
614
615
  function getSuspenseContext() {
615
616
  return SuspenseContext || (SuspenseContext = createContext());
616
617
  }
617
- function enableExternalSource(factory) {
618
- if (ExternalSourceFactory) {
619
- const oldFactory = ExternalSourceFactory;
620
- ExternalSourceFactory = (fn, trigger) => {
621
- const oldSource = oldFactory(fn, trigger);
622
- const source = factory(x => oldSource.track(x), trigger);
623
- return {
624
- track: x => source.track(x),
625
- dispose() {
626
- source.dispose();
627
- oldSource.dispose();
628
- }
629
- };
618
+ function enableExternalSource(factory, untrack = fn => fn()) {
619
+ if (ExternalSourceConfig) {
620
+ const { factory: oldFactory, untrack: oldUntrack } = ExternalSourceConfig;
621
+ ExternalSourceConfig = {
622
+ factory: (fn, trigger) => {
623
+ const oldSource = oldFactory(fn, trigger);
624
+ const source = factory(x => oldSource.track(x), trigger);
625
+ return {
626
+ track: x => source.track(x),
627
+ dispose() {
628
+ source.dispose();
629
+ oldSource.dispose();
630
+ }
631
+ };
632
+ },
633
+ untrack: fn => oldUntrack(() => untrack(fn))
630
634
  };
631
635
  } else {
632
- ExternalSourceFactory = factory;
636
+ ExternalSourceConfig = {
637
+ factory,
638
+ untrack
639
+ };
633
640
  }
634
641
  }
635
642
  function readSignal() {
@@ -782,14 +789,14 @@ function createComputation(fn, init, pure, state = STALE, options) {
782
789
  else Owner.owned.push(c);
783
790
  }
784
791
  }
785
- if (ExternalSourceFactory) {
792
+ if (ExternalSourceConfig && c.fn) {
786
793
  const [track, trigger] = createSignal(undefined, {
787
794
  equals: false
788
795
  });
789
- const ordinary = ExternalSourceFactory(c.fn, trigger);
796
+ const ordinary = ExternalSourceConfig.factory(c.fn, trigger);
790
797
  onCleanup(() => ordinary.dispose());
791
798
  const triggerInTransition = () => startTransition(trigger).then(() => inTransition.dispose());
792
- const inTransition = ExternalSourceFactory(c.fn, triggerInTransition);
799
+ const inTransition = ExternalSourceConfig.factory(c.fn, triggerInTransition);
793
800
  c.fn = x => {
794
801
  track();
795
802
  return Transition && Transition.running ? inTransition.track(x) : ordinary.track(x);
@@ -1391,41 +1398,43 @@ function mergeProps(...sources) {
1391
1398
  propTraps
1392
1399
  );
1393
1400
  }
1394
- const target = {};
1395
1401
  const sourcesMap = {};
1396
- const defined = new Set();
1402
+ const defined = Object.create(null);
1397
1403
  for (let i = sources.length - 1; i >= 0; i--) {
1398
1404
  const source = sources[i];
1399
1405
  if (!source) continue;
1400
1406
  const sourceKeys = Object.getOwnPropertyNames(source);
1401
- for (let i = 0, length = sourceKeys.length; i < length; i++) {
1407
+ for (let i = sourceKeys.length - 1; i >= 0; i--) {
1402
1408
  const key = sourceKeys[i];
1403
1409
  if (key === "__proto__" || key === "constructor") continue;
1404
1410
  const desc = Object.getOwnPropertyDescriptor(source, key);
1405
- if (!defined.has(key)) {
1406
- if (desc.get) {
1407
- defined.add(key);
1408
- Object.defineProperty(target, key, {
1409
- enumerable: true,
1410
- configurable: true,
1411
- get: resolveSources.bind((sourcesMap[key] = [desc.get.bind(source)]))
1412
- });
1413
- } else {
1414
- if (desc.value !== undefined) defined.add(key);
1415
- target[key] = desc.value;
1416
- }
1411
+ if (!defined[key]) {
1412
+ defined[key] = desc.get
1413
+ ? {
1414
+ enumerable: true,
1415
+ configurable: true,
1416
+ get: resolveSources.bind((sourcesMap[key] = [desc.get.bind(source)]))
1417
+ }
1418
+ : desc.value !== undefined
1419
+ ? desc
1420
+ : undefined;
1417
1421
  } else {
1418
1422
  const sources = sourcesMap[key];
1419
1423
  if (sources) {
1420
- if (desc.get) {
1421
- sources.push(desc.get.bind(source));
1422
- } else if (desc.value !== undefined) {
1423
- sources.push(() => desc.value);
1424
- }
1425
- } else if (target[key] === undefined) target[key] = desc.value;
1424
+ if (desc.get) sources.push(desc.get.bind(source));
1425
+ else if (desc.value !== undefined) sources.push(() => desc.value);
1426
+ }
1426
1427
  }
1427
1428
  }
1428
1429
  }
1430
+ const target = {};
1431
+ const definedKeys = Object.keys(defined);
1432
+ for (let i = definedKeys.length - 1; i >= 0; i--) {
1433
+ const key = definedKeys[i],
1434
+ desc = defined[key];
1435
+ if (desc && desc.get) Object.defineProperty(target, key, desc);
1436
+ else target[key] = desc ? desc.value : undefined;
1437
+ }
1429
1438
  return target;
1430
1439
  }
1431
1440
  function splitProps(props, ...keys) {
@@ -1579,8 +1588,7 @@ function Show(props) {
1579
1588
  }
1580
1589
  function Switch(props) {
1581
1590
  let keyed = false;
1582
- const equals = (a, b) =>
1583
- a[0] === b[0] && (keyed ? a[1] === b[1] : !a[1] === !b[1]) && a[2] === b[2];
1591
+ const equals = (a, b) => (keyed ? a[1] === b[1] : !a[1] === !b[1]) && a[2] === b[2];
1584
1592
  const conditions = children(() => props.children),
1585
1593
  evalConditions = createMemo(
1586
1594
  () => {
@@ -656,6 +656,7 @@ export namespace JSX {
656
656
  about?: FunctionMaybe<string>;
657
657
  datatype?: FunctionMaybe<string>;
658
658
  inlist?: FunctionMaybe<any>;
659
+ popover?: FunctionMaybe<boolean | "manual" | "auto">;
659
660
  prefix?: FunctionMaybe<string>;
660
661
  property?: FunctionMaybe<string>;
661
662
  resource?: FunctionMaybe<string>;
@@ -730,6 +731,8 @@ export namespace JSX {
730
731
  formmethod?: FunctionMaybe<HTMLFormMethod>;
731
732
  formnovalidate?: FunctionMaybe<boolean>;
732
733
  formtarget?: FunctionMaybe<string>;
734
+ popovertarget?: FunctionMaybe<string>;
735
+ popovertargetaction?: FunctionMaybe<"hide" | "show" | "toggle">;
733
736
  name?: FunctionMaybe<string>;
734
737
  type?: FunctionMaybe<"submit" | "reset" | "button">;
735
738
  value?: FunctionMaybe<string>;
@@ -738,6 +741,8 @@ export namespace JSX {
738
741
  formMethod?: FunctionMaybe<HTMLFormMethod>;
739
742
  formNoValidate?: FunctionMaybe<boolean>;
740
743
  formTarget?: FunctionMaybe<string>;
744
+ popoverTarget?: FunctionMaybe<string>;
745
+ popoverTargetAction?: FunctionMaybe<"hide" | "show" | "toggle">;
741
746
  }
742
747
  interface CanvasHTMLAttributes<T> extends HTMLAttributes<T> {
743
748
  width?: FunctionMaybe<number | string>;
@@ -1828,7 +1833,16 @@ export namespace JSX {
1828
1833
  NewViewportSVGAttributes<T>,
1829
1834
  ExternalResourceSVGAttributes,
1830
1835
  StylableSVGAttributes,
1831
- FitToViewBoxSVGAttributes {}
1836
+ FitToViewBoxSVGAttributes {
1837
+ width?: FunctionMaybe<number | string>;
1838
+ height?: FunctionMaybe<number | string>;
1839
+ preserveAspectRatio?: FunctionMaybe<SVGPreserveAspectRatio>;
1840
+ refX?: FunctionMaybe<number | string>;
1841
+ refY?: FunctionMaybe<number | string>;
1842
+ viewBox?: FunctionMaybe<string>;
1843
+ x?: FunctionMaybe<number | string>;
1844
+ y?: FunctionMaybe<number | string>;
1845
+ }
1832
1846
  interface TextSVGAttributes<T>
1833
1847
  extends TextContentElementSVGAttributes<T>,
1834
1848
  GraphicsElementSVGAttributes<T>,
@@ -1981,7 +1995,8 @@ export namespace JSX {
1981
1995
  ruby: HTMLAttributes<HTMLElement>;
1982
1996
  s: HTMLAttributes<HTMLElement>;
1983
1997
  samp: HTMLAttributes<HTMLElement>;
1984
- script: ScriptHTMLAttributes<HTMLElement>;
1998
+ script: ScriptHTMLAttributes<HTMLScriptElement>;
1999
+ search: HTMLAttributes<HTMLElement>;
1985
2000
  section: HTMLAttributes<HTMLElement>;
1986
2001
  select: SelectHTMLAttributes<HTMLSelectElement>;
1987
2002
  slot: HTMLSlotElementAttributes;
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.8.7",
4
+ "version": "1.8.9",
5
5
  "author": "Ryan Carniato",
6
6
  "license": "MIT",
7
7
  "homepage": "https://solidjs.com",
@@ -215,7 +215,8 @@
215
215
  ],
216
216
  "dependencies": {
217
217
  "csstype": "^3.1.0",
218
- "seroval": "^0.15.1"
218
+ "seroval": "^1.0.3",
219
+ "seroval-plugins": "^1.0.3"
219
220
  },
220
221
  "scripts": {
221
222
  "build": "npm-run-all -nl build:*",
@@ -318,11 +318,12 @@ const $ROOT = Symbol("store-root");
318
318
  function applyState(target, parent, property, merge, key) {
319
319
  const previous = parent[property];
320
320
  if (target === previous) return;
321
- if (property !== $ROOT && (!isWrappable(target) || !isWrappable(previous) || key && target[key] !== previous[key])) {
321
+ const isArray = Array.isArray(target);
322
+ if (property !== $ROOT && (!isWrappable(target) || !isWrappable(previous) || isArray !== Array.isArray(previous) || key && target[key] !== previous[key])) {
322
323
  setProperty(parent, property, target);
323
324
  return;
324
325
  }
325
- if (Array.isArray(target)) {
326
+ if (isArray) {
326
327
  if (target.length && previous.length && (!merge || key && target[0] && target[0][key] != null)) {
327
328
  let i, j, start, end, newEnd, item, newIndicesNext, keyVal;
328
329
  for (start = 0, end = Math.min(previous.length, target.length); start < end && (previous[start] === target[start] || key && previous[start] && target[start] && previous[start][key] === target[start][key]); start++) {
package/store/dist/dev.js CHANGED
@@ -362,14 +362,18 @@ const $ROOT = Symbol("store-root");
362
362
  function applyState(target, parent, property, merge, key) {
363
363
  const previous = parent[property];
364
364
  if (target === previous) return;
365
+ const isArray = Array.isArray(target);
365
366
  if (
366
367
  property !== $ROOT &&
367
- (!isWrappable(target) || !isWrappable(previous) || (key && target[key] !== previous[key]))
368
+ (!isWrappable(target) ||
369
+ !isWrappable(previous) ||
370
+ isArray !== Array.isArray(previous) ||
371
+ (key && target[key] !== previous[key]))
368
372
  ) {
369
373
  setProperty(parent, property, target);
370
374
  return;
371
375
  }
372
- if (Array.isArray(target)) {
376
+ if (isArray) {
373
377
  if (
374
378
  target.length &&
375
379
  previous.length &&
@@ -302,11 +302,12 @@ const $ROOT = Symbol("store-root");
302
302
  function applyState(target, parent, property, merge, key) {
303
303
  const previous = parent[property];
304
304
  if (target === previous) return;
305
- if (property !== $ROOT && (!isWrappable(target) || !isWrappable(previous) || key && target[key] !== previous[key])) {
305
+ const isArray = Array.isArray(target);
306
+ if (property !== $ROOT && (!isWrappable(target) || !isWrappable(previous) || isArray !== Array.isArray(previous) || key && target[key] !== previous[key])) {
306
307
  setProperty(parent, property, target);
307
308
  return;
308
309
  }
309
- if (Array.isArray(target)) {
310
+ if (isArray) {
310
311
  if (target.length && previous.length && (!merge || key && target[0] && target[0][key] != null)) {
311
312
  let i, j, start, end, newEnd, item, newIndicesNext, keyVal;
312
313
  for (start = 0, end = Math.min(previous.length, target.length); start < end && (previous[start] === target[start] || key && previous[start] && target[start] && previous[start][key] === target[start][key]); start++) {
@@ -340,14 +340,18 @@ const $ROOT = Symbol("store-root");
340
340
  function applyState(target, parent, property, merge, key) {
341
341
  const previous = parent[property];
342
342
  if (target === previous) return;
343
+ const isArray = Array.isArray(target);
343
344
  if (
344
345
  property !== $ROOT &&
345
- (!isWrappable(target) || !isWrappable(previous) || (key && target[key] !== previous[key]))
346
+ (!isWrappable(target) ||
347
+ !isWrappable(previous) ||
348
+ isArray !== Array.isArray(previous) ||
349
+ (key && target[key] !== previous[key]))
346
350
  ) {
347
351
  setProperty(parent, property, target);
348
352
  return;
349
353
  }
350
- if (Array.isArray(target)) {
354
+ if (isArray) {
351
355
  if (
352
356
  target.length &&
353
357
  previous.length &&
package/types/jsx.d.ts CHANGED
@@ -732,6 +732,7 @@ export namespace JSX {
732
732
  about?: string;
733
733
  datatype?: string;
734
734
  inlist?: any;
735
+ popover?: boolean | "manual" | "auto";
735
736
  prefix?: string;
736
737
  property?: string;
737
738
  resource?: string;
@@ -802,6 +803,8 @@ export namespace JSX {
802
803
  formmethod?: HTMLFormMethod;
803
804
  formnovalidate?: boolean;
804
805
  formtarget?: string;
806
+ popovertarget?: string;
807
+ popovertargetaction?: "hide" | "show" | "toggle";
805
808
  name?: string;
806
809
  type?: "submit" | "reset" | "button";
807
810
  value?: string;
@@ -810,6 +813,8 @@ export namespace JSX {
810
813
  formMethod?: HTMLFormMethod;
811
814
  formNoValidate?: boolean;
812
815
  formTarget?: string;
816
+ popoverTarget?: string;
817
+ popoverTargetAction?: "hide" | "show" | "toggle";
813
818
  }
814
819
  interface CanvasHTMLAttributes<T> extends HTMLAttributes<T> {
815
820
  width?: number | string;
@@ -1905,7 +1910,16 @@ export namespace JSX {
1905
1910
  NewViewportSVGAttributes<T>,
1906
1911
  ExternalResourceSVGAttributes,
1907
1912
  StylableSVGAttributes,
1908
- FitToViewBoxSVGAttributes {}
1913
+ FitToViewBoxSVGAttributes {
1914
+ width?: number | string;
1915
+ height?: number | string;
1916
+ preserveAspectRatio?: SVGPreserveAspectRatio;
1917
+ refX?: number | string;
1918
+ refY?: number | string;
1919
+ viewBox?: string;
1920
+ x?: number | string;
1921
+ y?: number | string;
1922
+ }
1909
1923
  interface TextSVGAttributes<T>
1910
1924
  extends TextContentElementSVGAttributes<T>,
1911
1925
  GraphicsElementSVGAttributes<T>,
@@ -2058,7 +2072,8 @@ export namespace JSX {
2058
2072
  ruby: HTMLAttributes<HTMLElement>;
2059
2073
  s: HTMLAttributes<HTMLElement>;
2060
2074
  samp: HTMLAttributes<HTMLElement>;
2061
- script: ScriptHTMLAttributes<HTMLElement>;
2075
+ script: ScriptHTMLAttributes<HTMLScriptElement>;
2076
+ search: HTMLAttributes<HTMLElement>;
2062
2077
  section: HTMLAttributes<HTMLElement>;
2063
2078
  select: SelectHTMLAttributes<HTMLSelectElement>;
2064
2079
  slot: HTMLSlotElementAttributes;
@@ -30,7 +30,6 @@ export declare const $TRACK: unique symbol;
30
30
  export declare const $DEVCOMP: unique symbol;
31
31
  export declare var Owner: Owner | null;
32
32
  export declare let Transition: TransitionState | null;
33
- declare let ExternalSourceFactory: ExternalSourceFactory | null;
34
33
  /** Object storing callbacks for debugging during development */
35
34
  export declare const DevHooks: {
36
35
  afterUpdate: (() => void) | null;
@@ -639,7 +638,10 @@ type SuspenseContext = Context<SuspenseContextType | undefined> & {
639
638
  };
640
639
  declare let SuspenseContext: SuspenseContext;
641
640
  export declare function getSuspenseContext(): SuspenseContext;
642
- export declare function enableExternalSource(factory: ExternalSourceFactory): void;
641
+ export declare function enableExternalSource(
642
+ factory: ExternalSourceFactory,
643
+ untrack?: <V>(fn: () => V) => V
644
+ ): void;
643
645
  export declare function readSignal(this: SignalState<any> | Memo<any>): any;
644
646
  export declare function writeSignal(
645
647
  node: SignalState<any> | Memo<any>,
@@ -121,7 +121,9 @@ export type SplitProps<T, K extends (readonly (keyof T)[])[]> = [
121
121
  ? Pick<T, Extract<K[P], readonly (keyof T)[]>[number]>
122
122
  : never;
123
123
  },
124
- Omit<T, K[number][number]>
124
+ {
125
+ [P in keyof T as Exclude<P, K[number][number]>]: T[P];
126
+ }
125
127
  ];
126
128
  export declare function splitProps<
127
129
  T extends Record<any, any>,
package/web/dist/dev.cjs CHANGED
@@ -335,7 +335,7 @@ function assignProp(node, prop, value, prev, isSVG, skipRef) {
335
335
  let isCE, isProp, isChildProp, propAlias, forceProp;
336
336
  if (prop === "style") return style(node, value, prev);
337
337
  if (prop === "classList") return classList(node, value, prev);
338
- if (value === prev) return prev;
338
+ if (value === prev && (prop !== "value" || prop !== "checked")) return prev;
339
339
  if (prop === "ref") {
340
340
  if (!skipRef) value(node);
341
341
  } else if (prop.slice(0, 3) === "on:") {
package/web/dist/dev.js CHANGED
@@ -791,7 +791,7 @@ function assignProp(node, prop, value, prev, isSVG, skipRef) {
791
791
  let isCE, isProp, isChildProp, propAlias, forceProp;
792
792
  if (prop === "style") return style(node, value, prev);
793
793
  if (prop === "classList") return classList(node, value, prev);
794
- if (value === prev) return prev;
794
+ if (value === prev && (prop !== "value" || prop !== "checked")) return prev;
795
795
  if (prop === "ref") {
796
796
  if (!skipRef) value(node);
797
797
  } else if (prop.slice(0, 3) === "on:") {
@@ -2,6 +2,7 @@
2
2
 
3
3
  var solidJs = require('solid-js');
4
4
  var seroval = require('seroval');
5
+ var web = require('seroval-plugins/web');
5
6
 
6
7
  const booleans = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "inert", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"];
7
8
  const BooleanAttributes = /*#__PURE__*/new Set(booleans);
@@ -23,6 +24,9 @@ function createSerializer({
23
24
  }) {
24
25
  return new seroval.Serializer({
25
26
  scopeId,
27
+ plugins: [
28
+ web.CustomEventPlugin, web.DOMExceptionPlugin, web.EventPlugin,
29
+ web.FormDataPlugin, web.HeadersPlugin, web.ReadableStreamPlugin, web.RequestPlugin, web.ResponsePlugin, web.URLSearchParamsPlugin, web.URLPlugin],
26
30
  globalIdentifier: GLOBAL_IDENTIFIER,
27
31
  disabledFeatures: ES2017FLAG,
28
32
  onData,
@@ -262,35 +266,39 @@ function renderToStream(code, options = {}) {
262
266
  },
263
267
  pipe(w) {
264
268
  allSettled(blockingPromises).then(() => {
265
- doShell();
266
- buffer = writable = w;
267
- buffer.write(tmp);
268
- firstFlushed = true;
269
- if (completed) writable.end();else setTimeout(flushEnd);
269
+ setTimeout(() => {
270
+ doShell();
271
+ buffer = writable = w;
272
+ buffer.write(tmp);
273
+ firstFlushed = true;
274
+ if (completed) writable.end();else queue(flushEnd);
275
+ });
270
276
  });
271
277
  },
272
278
  pipeTo(w) {
273
279
  return allSettled(blockingPromises).then(() => {
274
- doShell();
275
- const encoder = new TextEncoder();
276
- const writer = w.getWriter();
277
280
  let resolve;
278
281
  const p = new Promise(r => resolve = r);
279
- writable = {
280
- end() {
281
- writer.releaseLock();
282
- w.close();
283
- resolve();
284
- }
285
- };
286
- buffer = {
287
- write(payload) {
288
- writer.write(encoder.encode(payload));
289
- }
290
- };
291
- buffer.write(tmp);
292
- firstFlushed = true;
293
- if (completed) writable.end();else setTimeout(flushEnd);
282
+ setTimeout(() => {
283
+ doShell();
284
+ const encoder = new TextEncoder();
285
+ const writer = w.getWriter();
286
+ writable = {
287
+ end() {
288
+ writer.releaseLock();
289
+ w.close();
290
+ resolve();
291
+ }
292
+ };
293
+ buffer = {
294
+ write(payload) {
295
+ writer.write(encoder.encode(payload));
296
+ }
297
+ };
298
+ buffer.write(tmp);
299
+ firstFlushed = true;
300
+ if (completed) writable.end();else queue(flushEnd);
301
+ });
294
302
  return p;
295
303
  });
296
304
  }
@@ -334,7 +342,7 @@ function ssrClassList(value) {
334
342
  }
335
343
  function ssrStyle(value) {
336
344
  if (!value) return "";
337
- if (typeof value === "string") return value;
345
+ if (typeof value === "string") return escape(value, true);
338
346
  let result = "";
339
347
  const k = Object.keys(value);
340
348
  for (let i = 0; i < k.length; i++) {
@@ -530,7 +538,7 @@ function replacePlaceholder(html, key, value) {
530
538
  }
531
539
  const RequestContext = Symbol();
532
540
  function getRequestEvent() {
533
- return globalThis[RequestContext] ? globalThis[RequestContext].getStore() : undefined;
541
+ return globalThis[RequestContext] ? globalThis[RequestContext].getStore() || solidJs.sharedConfig.context && solidJs.sharedConfig.context.event || console.log("RequestEvent is missing. This is most likely due to accessing `getRequestEvent` non-managed async scope in a partially polyfilled environment. Try moving it above all `await` calls.") : undefined;
534
542
  }
535
543
  function Assets(props) {
536
544
  useAssets(() => props.children);
@@ -12,6 +12,18 @@ export {
12
12
  mergeProps
13
13
  } from "solid-js";
14
14
  import { Feature, Serializer, getCrossReferenceHeader } from "seroval";
15
+ import {
16
+ CustomEventPlugin,
17
+ DOMExceptionPlugin,
18
+ EventPlugin,
19
+ FormDataPlugin,
20
+ HeadersPlugin,
21
+ ReadableStreamPlugin,
22
+ RequestPlugin,
23
+ ResponsePlugin,
24
+ URLSearchParamsPlugin,
25
+ URLPlugin
26
+ } from "seroval-plugins/web";
15
27
 
16
28
  const booleans = [
17
29
  "allowfullscreen",
@@ -57,6 +69,18 @@ const GLOBAL_IDENTIFIER = "_$HY.r";
57
69
  function createSerializer({ onData, onDone, scopeId, onError }) {
58
70
  return new Serializer({
59
71
  scopeId,
72
+ plugins: [
73
+ CustomEventPlugin,
74
+ DOMExceptionPlugin,
75
+ EventPlugin,
76
+ FormDataPlugin,
77
+ HeadersPlugin,
78
+ ReadableStreamPlugin,
79
+ RequestPlugin,
80
+ ResponsePlugin,
81
+ URLSearchParamsPlugin,
82
+ URLPlugin
83
+ ],
60
84
  globalIdentifier: GLOBAL_IDENTIFIER,
61
85
  disabledFeatures: ES2017FLAG,
62
86
  onData,
@@ -292,37 +316,41 @@ function renderToStream(code, options = {}) {
292
316
  },
293
317
  pipe(w) {
294
318
  allSettled(blockingPromises).then(() => {
295
- doShell();
296
- buffer = writable = w;
297
- buffer.write(tmp);
298
- firstFlushed = true;
299
- if (completed) writable.end();
300
- else setTimeout(flushEnd);
319
+ setTimeout(() => {
320
+ doShell();
321
+ buffer = writable = w;
322
+ buffer.write(tmp);
323
+ firstFlushed = true;
324
+ if (completed) writable.end();
325
+ else queue(flushEnd);
326
+ });
301
327
  });
302
328
  },
303
329
  pipeTo(w) {
304
330
  return allSettled(blockingPromises).then(() => {
305
- doShell();
306
- const encoder = new TextEncoder();
307
- const writer = w.getWriter();
308
331
  let resolve;
309
332
  const p = new Promise(r => (resolve = r));
310
- writable = {
311
- end() {
312
- writer.releaseLock();
313
- w.close();
314
- resolve();
315
- }
316
- };
317
- buffer = {
318
- write(payload) {
319
- writer.write(encoder.encode(payload));
320
- }
321
- };
322
- buffer.write(tmp);
323
- firstFlushed = true;
324
- if (completed) writable.end();
325
- else setTimeout(flushEnd);
333
+ setTimeout(() => {
334
+ doShell();
335
+ const encoder = new TextEncoder();
336
+ const writer = w.getWriter();
337
+ writable = {
338
+ end() {
339
+ writer.releaseLock();
340
+ w.close();
341
+ resolve();
342
+ }
343
+ };
344
+ buffer = {
345
+ write(payload) {
346
+ writer.write(encoder.encode(payload));
347
+ }
348
+ };
349
+ buffer.write(tmp);
350
+ firstFlushed = true;
351
+ if (completed) writable.end();
352
+ else queue(flushEnd);
353
+ });
326
354
  return p;
327
355
  });
328
356
  }
@@ -366,7 +394,7 @@ function ssrClassList(value) {
366
394
  }
367
395
  function ssrStyle(value) {
368
396
  if (!value) return "";
369
- if (typeof value === "string") return value;
397
+ if (typeof value === "string") return escape(value, true);
370
398
  let result = "";
371
399
  const k = Object.keys(value);
372
400
  for (let i = 0; i < k.length; i++) {
@@ -571,7 +599,13 @@ function replacePlaceholder(html, key, value) {
571
599
  }
572
600
  const RequestContext = Symbol();
573
601
  function getRequestEvent() {
574
- return globalThis[RequestContext] ? globalThis[RequestContext].getStore() : undefined;
602
+ return globalThis[RequestContext]
603
+ ? globalThis[RequestContext].getStore() ||
604
+ (sharedConfig.context && sharedConfig.context.event) ||
605
+ console.log(
606
+ "RequestEvent is missing. This is most likely due to accessing `getRequestEvent` non-managed async scope in a partially polyfilled environment. Try moving it above all `await` calls."
607
+ )
608
+ : undefined;
575
609
  }
576
610
  function Assets(props) {
577
611
  useAssets(() => props.children);
package/web/dist/web.cjs CHANGED
@@ -333,7 +333,7 @@ function assignProp(node, prop, value, prev, isSVG, skipRef) {
333
333
  let isCE, isProp, isChildProp, propAlias, forceProp;
334
334
  if (prop === "style") return style(node, value, prev);
335
335
  if (prop === "classList") return classList(node, value, prev);
336
- if (value === prev) return prev;
336
+ if (value === prev && (prop !== "value" || prop !== "checked")) return prev;
337
337
  if (prop === "ref") {
338
338
  if (!skipRef) value(node);
339
339
  } else if (prop.slice(0, 3) === "on:") {
package/web/dist/web.js CHANGED
@@ -784,7 +784,7 @@ function assignProp(node, prop, value, prev, isSVG, skipRef) {
784
784
  let isCE, isProp, isChildProp, propAlias, forceProp;
785
785
  if (prop === "style") return style(node, value, prev);
786
786
  if (prop === "classList") return classList(node, value, prev);
787
- if (value === prev) return prev;
787
+ if (value === prev && (prop !== "value" || prop !== "checked")) return prev;
788
788
  if (prop === "ref") {
789
789
  if (!skipRef) value(node);
790
790
  } else if (prop.slice(0, 3) === "on:") {