sibujs 1.1.0 → 1.2.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.
@@ -582,11 +582,11 @@ function bindChildNode(placeholder, getter) {
582
582
  if (_isDev5) devWarn(`bindChildNode: getter threw: ${err instanceof Error ? err.message : String(err)}`);
583
583
  return;
584
584
  }
585
- for (let i = 0; i < lastNodes.length; i++) {
586
- const node = lastNodes[i];
587
- if (node.parentNode) node.parentNode.removeChild(node);
588
- }
589
585
  if (result == null || typeof result === "boolean") {
586
+ for (let i = 0; i < lastNodes.length; i++) {
587
+ const node = lastNodes[i];
588
+ if (node.parentNode) node.parentNode.removeChild(node);
589
+ }
590
590
  lastNodes.length = 0;
591
591
  return;
592
592
  }
@@ -595,24 +595,46 @@ function bindChildNode(placeholder, getter) {
595
595
  lastNodes.length = 0;
596
596
  return;
597
597
  }
598
- const anchor = placeholder.nextSibling;
599
- let count = 0;
598
+ let newNodes;
600
599
  if (Array.isArray(result)) {
601
- if (lastNodes.length < result.length) lastNodes = new Array(result.length);
600
+ newNodes = [];
602
601
  for (let i = 0; i < result.length; i++) {
603
602
  const item = result[i];
604
603
  if (item == null || typeof item === "boolean") continue;
605
- const node = item instanceof Node ? item : document.createTextNode(String(item));
606
- parent.insertBefore(node, anchor);
607
- lastNodes[count++] = node;
604
+ newNodes.push(item instanceof Node ? item : document.createTextNode(String(item)));
608
605
  }
609
606
  } else {
610
- if (lastNodes.length < 1) lastNodes = [null];
611
607
  const node = result instanceof Node ? result : document.createTextNode(String(result));
612
- parent.insertBefore(node, anchor);
613
- lastNodes[count++] = node;
608
+ newNodes = [node];
609
+ }
610
+ const reused = lastNodes.length > 0 && newNodes.length > 0 ? /* @__PURE__ */ new Set() : void 0;
611
+ if (reused) {
612
+ for (let i = 0; i < newNodes.length; i++) {
613
+ for (let j = 0; j < lastNodes.length; j++) {
614
+ if (newNodes[i] === lastNodes[j]) {
615
+ reused.add(newNodes[i]);
616
+ break;
617
+ }
618
+ }
619
+ }
614
620
  }
615
- lastNodes.length = count;
621
+ for (let i = 0; i < lastNodes.length; i++) {
622
+ const node = lastNodes[i];
623
+ if (reused?.has(node)) continue;
624
+ if (node.parentNode) node.parentNode.removeChild(node);
625
+ }
626
+ const anchor = placeholder.nextSibling;
627
+ for (let i = 0; i < newNodes.length; i++) {
628
+ const node = newNodes[i];
629
+ if (reused?.has(node) && node.parentNode === parent) {
630
+ if (node.nextSibling !== anchor) {
631
+ parent.insertBefore(node, anchor);
632
+ }
633
+ } else {
634
+ parent.insertBefore(node, anchor);
635
+ }
636
+ }
637
+ lastNodes = newNodes;
616
638
  }
617
639
  return track(commit);
618
640
  }
@@ -802,12 +824,18 @@ var tagFactory = (tag, ns) => (first, second) => {
802
824
  // already handled above / below
803
825
  default: {
804
826
  const value = props[key];
805
- if (value == null || value === false) continue;
827
+ if (value == null) continue;
806
828
  if (key[0] === "o" && key[1] === "n") continue;
807
829
  if (typeof value === "function") {
808
830
  registerDisposer(el, bindAttribute(el, key, value));
809
- } else if (value === true) {
810
- el.setAttribute(key, "");
831
+ } else if (typeof value === "boolean") {
832
+ if (key in el && (key === "checked" || key === "disabled" || key === "selected")) {
833
+ el[key] = value;
834
+ } else if (value) {
835
+ el.setAttribute(key, "");
836
+ } else {
837
+ el.removeAttribute(key);
838
+ }
811
839
  } else {
812
840
  const str = String(value);
813
841
  el.setAttribute(key, isUrlAttribute(key) ? sanitizeUrl(str) : str);
package/dist/ecosystem.js CHANGED
@@ -7,9 +7,9 @@ import {
7
7
  mobXAdapter,
8
8
  reduxAdapter,
9
9
  zustandAdapter
10
- } from "./chunk-EVCZO745.js";
10
+ } from "./chunk-OUZZEE4S.js";
11
11
  import "./chunk-K5ZUMYVS.js";
12
- import "./chunk-WADYRCO2.js";
12
+ import "./chunk-B7SWRFUT.js";
13
13
  import "./chunk-23VV7YD3.js";
14
14
  import "./chunk-L6JRBDNS.js";
15
15
  import "./chunk-6SA3QQES.js";
package/dist/extras.cjs CHANGED
@@ -5100,11 +5100,11 @@ function bindChildNode(placeholder, getter) {
5100
5100
  if (_isDev6) devWarn(`bindChildNode: getter threw: ${err instanceof Error ? err.message : String(err)}`);
5101
5101
  return;
5102
5102
  }
5103
- for (let i2 = 0; i2 < lastNodes.length; i2++) {
5104
- const node = lastNodes[i2];
5105
- if (node.parentNode) node.parentNode.removeChild(node);
5106
- }
5107
5103
  if (result == null || typeof result === "boolean") {
5104
+ for (let i2 = 0; i2 < lastNodes.length; i2++) {
5105
+ const node = lastNodes[i2];
5106
+ if (node.parentNode) node.parentNode.removeChild(node);
5107
+ }
5108
5108
  lastNodes.length = 0;
5109
5109
  return;
5110
5110
  }
@@ -5113,24 +5113,46 @@ function bindChildNode(placeholder, getter) {
5113
5113
  lastNodes.length = 0;
5114
5114
  return;
5115
5115
  }
5116
- const anchor = placeholder.nextSibling;
5117
- let count = 0;
5116
+ let newNodes;
5118
5117
  if (Array.isArray(result)) {
5119
- if (lastNodes.length < result.length) lastNodes = new Array(result.length);
5118
+ newNodes = [];
5120
5119
  for (let i2 = 0; i2 < result.length; i2++) {
5121
5120
  const item = result[i2];
5122
5121
  if (item == null || typeof item === "boolean") continue;
5123
- const node = item instanceof Node ? item : document.createTextNode(String(item));
5124
- parent.insertBefore(node, anchor);
5125
- lastNodes[count++] = node;
5122
+ newNodes.push(item instanceof Node ? item : document.createTextNode(String(item)));
5126
5123
  }
5127
5124
  } else {
5128
- if (lastNodes.length < 1) lastNodes = [null];
5129
5125
  const node = result instanceof Node ? result : document.createTextNode(String(result));
5130
- parent.insertBefore(node, anchor);
5131
- lastNodes[count++] = node;
5126
+ newNodes = [node];
5127
+ }
5128
+ const reused = lastNodes.length > 0 && newNodes.length > 0 ? /* @__PURE__ */ new Set() : void 0;
5129
+ if (reused) {
5130
+ for (let i2 = 0; i2 < newNodes.length; i2++) {
5131
+ for (let j = 0; j < lastNodes.length; j++) {
5132
+ if (newNodes[i2] === lastNodes[j]) {
5133
+ reused.add(newNodes[i2]);
5134
+ break;
5135
+ }
5136
+ }
5137
+ }
5138
+ }
5139
+ for (let i2 = 0; i2 < lastNodes.length; i2++) {
5140
+ const node = lastNodes[i2];
5141
+ if (reused?.has(node)) continue;
5142
+ if (node.parentNode) node.parentNode.removeChild(node);
5143
+ }
5144
+ const anchor = placeholder.nextSibling;
5145
+ for (let i2 = 0; i2 < newNodes.length; i2++) {
5146
+ const node = newNodes[i2];
5147
+ if (reused?.has(node) && node.parentNode === parent) {
5148
+ if (node.nextSibling !== anchor) {
5149
+ parent.insertBefore(node, anchor);
5150
+ }
5151
+ } else {
5152
+ parent.insertBefore(node, anchor);
5153
+ }
5132
5154
  }
5133
- lastNodes.length = count;
5155
+ lastNodes = newNodes;
5134
5156
  }
5135
5157
  return track(commit);
5136
5158
  }
@@ -5321,12 +5343,18 @@ var tagFactory = (tag, ns) => (first, second) => {
5321
5343
  // already handled above / below
5322
5344
  default: {
5323
5345
  const value = props[key];
5324
- if (value == null || value === false) continue;
5346
+ if (value == null) continue;
5325
5347
  if (key[0] === "o" && key[1] === "n") continue;
5326
5348
  if (typeof value === "function") {
5327
5349
  registerDisposer(el, bindAttribute(el, key, value));
5328
- } else if (value === true) {
5329
- el.setAttribute(key, "");
5350
+ } else if (typeof value === "boolean") {
5351
+ if (key in el && (key === "checked" || key === "disabled" || key === "selected")) {
5352
+ el[key] = value;
5353
+ } else if (value) {
5354
+ el.setAttribute(key, "");
5355
+ } else {
5356
+ el.removeAttribute(key);
5357
+ }
5330
5358
  } else {
5331
5359
  const str = String(value);
5332
5360
  el.setAttribute(key, isUrlAttribute(key) ? sanitizeUrl(str) : str);
package/dist/extras.js CHANGED
@@ -90,7 +90,7 @@ import {
90
90
  wasm,
91
91
  worker,
92
92
  workerFn
93
- } from "./chunk-LA6KQEDU.js";
93
+ } from "./chunk-VMVDTCXB.js";
94
94
  import {
95
95
  FocusTrap,
96
96
  VirtualList,
@@ -261,7 +261,7 @@ import {
261
261
  mobXAdapter,
262
262
  reduxAdapter,
263
263
  zustandAdapter
264
- } from "./chunk-EVCZO745.js";
264
+ } from "./chunk-OUZZEE4S.js";
265
265
  import {
266
266
  createPlugin,
267
267
  inject,
@@ -271,10 +271,10 @@ import {
271
271
  triggerPluginMount,
272
272
  triggerPluginUnmount
273
273
  } from "./chunk-K5ZUMYVS.js";
274
- import "./chunk-NHUC2QWH.js";
274
+ import "./chunk-GCOK2LC3.js";
275
275
  import "./chunk-TNQWPPE6.js";
276
276
  import "./chunk-WR5D4EGH.js";
277
- import "./chunk-WADYRCO2.js";
277
+ import "./chunk-B7SWRFUT.js";
278
278
  import "./chunk-23VV7YD3.js";
279
279
  import "./chunk-L6JRBDNS.js";
280
280
  import "./chunk-6SA3QQES.js";
package/dist/index.cjs CHANGED
@@ -601,11 +601,11 @@ function bindChildNode(placeholder, getter) {
601
601
  if (_isDev4) devWarn(`bindChildNode: getter threw: ${err instanceof Error ? err.message : String(err)}`);
602
602
  return;
603
603
  }
604
- for (let i2 = 0; i2 < lastNodes.length; i2++) {
605
- const node = lastNodes[i2];
606
- if (node.parentNode) node.parentNode.removeChild(node);
607
- }
608
604
  if (result == null || typeof result === "boolean") {
605
+ for (let i2 = 0; i2 < lastNodes.length; i2++) {
606
+ const node = lastNodes[i2];
607
+ if (node.parentNode) node.parentNode.removeChild(node);
608
+ }
609
609
  lastNodes.length = 0;
610
610
  return;
611
611
  }
@@ -614,24 +614,46 @@ function bindChildNode(placeholder, getter) {
614
614
  lastNodes.length = 0;
615
615
  return;
616
616
  }
617
- const anchor = placeholder.nextSibling;
618
- let count = 0;
617
+ let newNodes;
619
618
  if (Array.isArray(result)) {
620
- if (lastNodes.length < result.length) lastNodes = new Array(result.length);
619
+ newNodes = [];
621
620
  for (let i2 = 0; i2 < result.length; i2++) {
622
621
  const item = result[i2];
623
622
  if (item == null || typeof item === "boolean") continue;
624
- const node = item instanceof Node ? item : document.createTextNode(String(item));
625
- parent.insertBefore(node, anchor);
626
- lastNodes[count++] = node;
623
+ newNodes.push(item instanceof Node ? item : document.createTextNode(String(item)));
627
624
  }
628
625
  } else {
629
- if (lastNodes.length < 1) lastNodes = [null];
630
626
  const node = result instanceof Node ? result : document.createTextNode(String(result));
631
- parent.insertBefore(node, anchor);
632
- lastNodes[count++] = node;
627
+ newNodes = [node];
628
+ }
629
+ const reused = lastNodes.length > 0 && newNodes.length > 0 ? /* @__PURE__ */ new Set() : void 0;
630
+ if (reused) {
631
+ for (let i2 = 0; i2 < newNodes.length; i2++) {
632
+ for (let j = 0; j < lastNodes.length; j++) {
633
+ if (newNodes[i2] === lastNodes[j]) {
634
+ reused.add(newNodes[i2]);
635
+ break;
636
+ }
637
+ }
638
+ }
639
+ }
640
+ for (let i2 = 0; i2 < lastNodes.length; i2++) {
641
+ const node = lastNodes[i2];
642
+ if (reused?.has(node)) continue;
643
+ if (node.parentNode) node.parentNode.removeChild(node);
633
644
  }
634
- lastNodes.length = count;
645
+ const anchor = placeholder.nextSibling;
646
+ for (let i2 = 0; i2 < newNodes.length; i2++) {
647
+ const node = newNodes[i2];
648
+ if (reused?.has(node) && node.parentNode === parent) {
649
+ if (node.nextSibling !== anchor) {
650
+ parent.insertBefore(node, anchor);
651
+ }
652
+ } else {
653
+ parent.insertBefore(node, anchor);
654
+ }
655
+ }
656
+ lastNodes = newNodes;
635
657
  }
636
658
  return track(commit);
637
659
  }
@@ -852,12 +874,18 @@ var tagFactory = (tag, ns) => (first, second) => {
852
874
  // already handled above / below
853
875
  default: {
854
876
  const value = props[key];
855
- if (value == null || value === false) continue;
877
+ if (value == null) continue;
856
878
  if (key[0] === "o" && key[1] === "n") continue;
857
879
  if (typeof value === "function") {
858
880
  registerDisposer(el, bindAttribute(el, key, value));
859
- } else if (value === true) {
860
- el.setAttribute(key, "");
881
+ } else if (typeof value === "boolean") {
882
+ if (key in el && (key === "checked" || key === "disabled" || key === "selected")) {
883
+ el[key] = value;
884
+ } else if (value) {
885
+ el.setAttribute(key, "");
886
+ } else {
887
+ el.removeAttribute(key);
888
+ }
861
889
  } else {
862
890
  const str = String(value);
863
891
  el.setAttribute(key, isUrlAttribute(key) ? sanitizeUrl(str) : str);
package/dist/index.js CHANGED
@@ -38,7 +38,7 @@ import {
38
38
  unregisterComponent,
39
39
  when,
40
40
  writable
41
- } from "./chunk-MK4ERFYL.js";
41
+ } from "./chunk-P6W3STU4.js";
42
42
  import {
43
43
  a,
44
44
  abbr,
@@ -176,7 +176,7 @@ import {
176
176
  use,
177
177
  var_,
178
178
  video
179
- } from "./chunk-NHUC2QWH.js";
179
+ } from "./chunk-GCOK2LC3.js";
180
180
  import {
181
181
  watch
182
182
  } from "./chunk-TNQWPPE6.js";
@@ -189,7 +189,7 @@ import {
189
189
  dispose,
190
190
  registerDisposer,
191
191
  tagFactory
192
- } from "./chunk-WADYRCO2.js";
192
+ } from "./chunk-B7SWRFUT.js";
193
193
  import {
194
194
  bindDynamic
195
195
  } from "./chunk-23VV7YD3.js";
package/dist/plugins.cjs CHANGED
@@ -699,11 +699,11 @@ function bindChildNode(placeholder, getter) {
699
699
  if (_isDev4) devWarn(`bindChildNode: getter threw: ${err instanceof Error ? err.message : String(err)}`);
700
700
  return;
701
701
  }
702
- for (let i2 = 0; i2 < lastNodes.length; i2++) {
703
- const node = lastNodes[i2];
704
- if (node.parentNode) node.parentNode.removeChild(node);
705
- }
706
702
  if (result == null || typeof result === "boolean") {
703
+ for (let i2 = 0; i2 < lastNodes.length; i2++) {
704
+ const node = lastNodes[i2];
705
+ if (node.parentNode) node.parentNode.removeChild(node);
706
+ }
707
707
  lastNodes.length = 0;
708
708
  return;
709
709
  }
@@ -712,24 +712,46 @@ function bindChildNode(placeholder, getter) {
712
712
  lastNodes.length = 0;
713
713
  return;
714
714
  }
715
- const anchor = placeholder.nextSibling;
716
- let count = 0;
715
+ let newNodes;
717
716
  if (Array.isArray(result)) {
718
- if (lastNodes.length < result.length) lastNodes = new Array(result.length);
717
+ newNodes = [];
719
718
  for (let i2 = 0; i2 < result.length; i2++) {
720
719
  const item = result[i2];
721
720
  if (item == null || typeof item === "boolean") continue;
722
- const node = item instanceof Node ? item : document.createTextNode(String(item));
723
- parent.insertBefore(node, anchor);
724
- lastNodes[count++] = node;
721
+ newNodes.push(item instanceof Node ? item : document.createTextNode(String(item)));
725
722
  }
726
723
  } else {
727
- if (lastNodes.length < 1) lastNodes = [null];
728
724
  const node = result instanceof Node ? result : document.createTextNode(String(result));
729
- parent.insertBefore(node, anchor);
730
- lastNodes[count++] = node;
725
+ newNodes = [node];
726
+ }
727
+ const reused = lastNodes.length > 0 && newNodes.length > 0 ? /* @__PURE__ */ new Set() : void 0;
728
+ if (reused) {
729
+ for (let i2 = 0; i2 < newNodes.length; i2++) {
730
+ for (let j = 0; j < lastNodes.length; j++) {
731
+ if (newNodes[i2] === lastNodes[j]) {
732
+ reused.add(newNodes[i2]);
733
+ break;
734
+ }
735
+ }
736
+ }
731
737
  }
732
- lastNodes.length = count;
738
+ for (let i2 = 0; i2 < lastNodes.length; i2++) {
739
+ const node = lastNodes[i2];
740
+ if (reused?.has(node)) continue;
741
+ if (node.parentNode) node.parentNode.removeChild(node);
742
+ }
743
+ const anchor = placeholder.nextSibling;
744
+ for (let i2 = 0; i2 < newNodes.length; i2++) {
745
+ const node = newNodes[i2];
746
+ if (reused?.has(node) && node.parentNode === parent) {
747
+ if (node.nextSibling !== anchor) {
748
+ parent.insertBefore(node, anchor);
749
+ }
750
+ } else {
751
+ parent.insertBefore(node, anchor);
752
+ }
753
+ }
754
+ lastNodes = newNodes;
733
755
  }
734
756
  return track(commit);
735
757
  }
@@ -942,12 +964,18 @@ var tagFactory = (tag, ns) => (first, second) => {
942
964
  // already handled above / below
943
965
  default: {
944
966
  const value = props[key];
945
- if (value == null || value === false) continue;
967
+ if (value == null) continue;
946
968
  if (key[0] === "o" && key[1] === "n") continue;
947
969
  if (typeof value === "function") {
948
970
  registerDisposer(el, bindAttribute(el, key, value));
949
- } else if (value === true) {
950
- el.setAttribute(key, "");
971
+ } else if (typeof value === "boolean") {
972
+ if (key in el && (key === "checked" || key === "disabled" || key === "selected")) {
973
+ el[key] = value;
974
+ } else if (value) {
975
+ el.setAttribute(key, "");
976
+ } else {
977
+ el.removeAttribute(key);
978
+ }
951
979
  } else {
952
980
  const str = String(value);
953
981
  el.setAttribute(key, isUrlAttribute(key) ? sanitizeUrl(str) : str);
package/dist/plugins.js CHANGED
@@ -33,11 +33,11 @@ import {
33
33
  } from "./chunk-K5ZUMYVS.js";
34
34
  import {
35
35
  span
36
- } from "./chunk-NHUC2QWH.js";
36
+ } from "./chunk-GCOK2LC3.js";
37
37
  import {
38
38
  dispose,
39
39
  registerDisposer
40
- } from "./chunk-WADYRCO2.js";
40
+ } from "./chunk-B7SWRFUT.js";
41
41
  import "./chunk-23VV7YD3.js";
42
42
  import {
43
43
  effect
package/dist/ssr.cjs CHANGED
@@ -1000,11 +1000,11 @@ function bindChildNode(placeholder, getter) {
1000
1000
  if (_isDev6) devWarn(`bindChildNode: getter threw: ${err instanceof Error ? err.message : String(err)}`);
1001
1001
  return;
1002
1002
  }
1003
- for (let i2 = 0; i2 < lastNodes.length; i2++) {
1004
- const node = lastNodes[i2];
1005
- if (node.parentNode) node.parentNode.removeChild(node);
1006
- }
1007
1003
  if (result == null || typeof result === "boolean") {
1004
+ for (let i2 = 0; i2 < lastNodes.length; i2++) {
1005
+ const node = lastNodes[i2];
1006
+ if (node.parentNode) node.parentNode.removeChild(node);
1007
+ }
1008
1008
  lastNodes.length = 0;
1009
1009
  return;
1010
1010
  }
@@ -1013,24 +1013,46 @@ function bindChildNode(placeholder, getter) {
1013
1013
  lastNodes.length = 0;
1014
1014
  return;
1015
1015
  }
1016
- const anchor = placeholder.nextSibling;
1017
- let count = 0;
1016
+ let newNodes;
1018
1017
  if (Array.isArray(result)) {
1019
- if (lastNodes.length < result.length) lastNodes = new Array(result.length);
1018
+ newNodes = [];
1020
1019
  for (let i2 = 0; i2 < result.length; i2++) {
1021
1020
  const item = result[i2];
1022
1021
  if (item == null || typeof item === "boolean") continue;
1023
- const node = item instanceof Node ? item : document.createTextNode(String(item));
1024
- parent.insertBefore(node, anchor);
1025
- lastNodes[count++] = node;
1022
+ newNodes.push(item instanceof Node ? item : document.createTextNode(String(item)));
1026
1023
  }
1027
1024
  } else {
1028
- if (lastNodes.length < 1) lastNodes = [null];
1029
1025
  const node = result instanceof Node ? result : document.createTextNode(String(result));
1030
- parent.insertBefore(node, anchor);
1031
- lastNodes[count++] = node;
1026
+ newNodes = [node];
1027
+ }
1028
+ const reused = lastNodes.length > 0 && newNodes.length > 0 ? /* @__PURE__ */ new Set() : void 0;
1029
+ if (reused) {
1030
+ for (let i2 = 0; i2 < newNodes.length; i2++) {
1031
+ for (let j = 0; j < lastNodes.length; j++) {
1032
+ if (newNodes[i2] === lastNodes[j]) {
1033
+ reused.add(newNodes[i2]);
1034
+ break;
1035
+ }
1036
+ }
1037
+ }
1032
1038
  }
1033
- lastNodes.length = count;
1039
+ for (let i2 = 0; i2 < lastNodes.length; i2++) {
1040
+ const node = lastNodes[i2];
1041
+ if (reused?.has(node)) continue;
1042
+ if (node.parentNode) node.parentNode.removeChild(node);
1043
+ }
1044
+ const anchor = placeholder.nextSibling;
1045
+ for (let i2 = 0; i2 < newNodes.length; i2++) {
1046
+ const node = newNodes[i2];
1047
+ if (reused?.has(node) && node.parentNode === parent) {
1048
+ if (node.nextSibling !== anchor) {
1049
+ parent.insertBefore(node, anchor);
1050
+ }
1051
+ } else {
1052
+ parent.insertBefore(node, anchor);
1053
+ }
1054
+ }
1055
+ lastNodes = newNodes;
1034
1056
  }
1035
1057
  return track(commit);
1036
1058
  }
@@ -1221,12 +1243,18 @@ var tagFactory = (tag, ns) => (first, second) => {
1221
1243
  // already handled above / below
1222
1244
  default: {
1223
1245
  const value = props[key];
1224
- if (value == null || value === false) continue;
1246
+ if (value == null) continue;
1225
1247
  if (key[0] === "o" && key[1] === "n") continue;
1226
1248
  if (typeof value === "function") {
1227
1249
  registerDisposer(el, bindAttribute(el, key, value));
1228
- } else if (value === true) {
1229
- el.setAttribute(key, "");
1250
+ } else if (typeof value === "boolean") {
1251
+ if (key in el && (key === "checked" || key === "disabled" || key === "selected")) {
1252
+ el[key] = value;
1253
+ } else if (value) {
1254
+ el.setAttribute(key, "");
1255
+ } else {
1256
+ el.removeAttribute(key);
1257
+ }
1230
1258
  } else {
1231
1259
  const str = String(value);
1232
1260
  el.setAttribute(key, isUrlAttribute(key) ? sanitizeUrl(str) : str);
package/dist/ssr.js CHANGED
@@ -22,7 +22,7 @@ import {
22
22
  wasm,
23
23
  worker,
24
24
  workerFn
25
- } from "./chunk-LA6KQEDU.js";
25
+ } from "./chunk-VMVDTCXB.js";
26
26
  import {
27
27
  collectStream,
28
28
  deserializeState,
@@ -41,8 +41,8 @@ import {
41
41
  suspenseSwapScript,
42
42
  trustHTML
43
43
  } from "./chunk-WUHJISPP.js";
44
- import "./chunk-NHUC2QWH.js";
45
- import "./chunk-WADYRCO2.js";
44
+ import "./chunk-GCOK2LC3.js";
45
+ import "./chunk-B7SWRFUT.js";
46
46
  import "./chunk-23VV7YD3.js";
47
47
  import "./chunk-6SA3QQES.js";
48
48
  import "./chunk-CHJ27IGK.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sibujs",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "A lightweight, function-based frontend framework that combines the best of React, Svelte, and Vue — with zero VDOM and maximum simplicity. Designed for developers who want fine-grained reactivity and full control without compilation or magic.",
5
5
  "keywords": [
6
6
  "frontend",