sibujs 1.0.2 → 1.0.4
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/LICENSE +21 -21
- package/dist/browser.cjs +18 -0
- package/dist/browser.d.cts +19 -1
- package/dist/browser.d.ts +19 -1
- package/dist/browser.js +5 -1
- package/dist/build.cjs +37 -8
- package/dist/build.js +3 -3
- package/dist/cdn.global.js +4 -4
- package/dist/{chunk-24WSRM54.js → chunk-32ZISOLJ.js} +35 -7
- package/dist/{chunk-ONCYDOK6.js → chunk-4EI4AG32.js} +17 -1
- package/dist/{chunk-MJ4LVHGX.js → chunk-7V26P53V.js} +1 -1
- package/dist/{chunk-7TQKR4PP.js → chunk-AZ3ISID5.js} +4 -0
- package/dist/{chunk-3CRQALYP.js → chunk-DKOHBI74.js} +49 -2
- package/dist/{chunk-6JGMNCD6.js → chunk-EWFVA3TJ.js} +1 -1
- package/dist/{chunk-HS6OOE3Q.js → chunk-G3BOQPVO.js} +1 -1
- package/dist/{chunk-QVKGGB2S.js → chunk-MDVXJWFN.js} +7 -3
- package/dist/{chunk-DZZMIMGL.js → chunk-OF7UZIVB.js} +1 -1
- package/dist/{chunk-N6IZB6KJ.js → chunk-PBHF5WKN.js} +56 -7
- package/dist/{chunk-OHQQWZ7P.js → chunk-QBMDLBU2.js} +10 -4
- package/dist/{customElement-BKQfbSZQ.d.cts → customElement-yz8uyk-0.d.cts} +52 -6
- package/dist/{customElement-BKQfbSZQ.d.ts → customElement-yz8uyk-0.d.ts} +52 -6
- package/dist/data.cjs +10 -4
- package/dist/data.d.cts +2 -0
- package/dist/data.d.ts +2 -0
- package/dist/data.js +1 -1
- package/dist/ecosystem.cjs +7 -3
- package/dist/ecosystem.d.cts +1 -1
- package/dist/ecosystem.d.ts +1 -1
- package/dist/ecosystem.js +2 -2
- package/dist/extras.cjs +146 -16
- package/dist/extras.d.cts +5 -4
- package/dist/extras.d.ts +5 -4
- package/dist/extras.js +19 -11
- package/dist/index.cjs +40 -8
- package/dist/index.d.cts +48 -4
- package/dist/index.d.ts +48 -4
- package/dist/index.js +9 -3
- package/dist/patterns.d.cts +8 -2
- package/dist/patterns.d.ts +8 -2
- package/dist/plugins.cjs +149 -4
- package/dist/plugins.d.cts +39 -3
- package/dist/plugins.d.ts +39 -3
- package/dist/plugins.js +121 -5
- package/dist/{ssr-WKUPVSSK.js → ssr-6GIMY5MX.js} +5 -3
- package/dist/ssr-BA6sxxUd.d.cts +135 -0
- package/dist/ssr-BA6sxxUd.d.ts +135 -0
- package/dist/ssr.cjs +12 -3
- package/dist/ssr.d.cts +3 -113
- package/dist/ssr.d.ts +3 -113
- package/dist/ssr.js +7 -5
- package/dist/{tagFactory-D9e0QGIE.d.cts → tagFactory-Dl8QCLga.d.cts} +2 -2
- package/dist/{tagFactory-D9e0QGIE.d.ts → tagFactory-Dl8QCLga.d.ts} +2 -2
- package/dist/ui.cjs +50 -2
- package/dist/ui.d.cts +1 -1
- package/dist/ui.d.ts +1 -1
- package/dist/ui.js +3 -1
- package/dist/widgets.cjs +56 -7
- package/dist/widgets.d.cts +4 -2
- package/dist/widgets.d.ts +4 -2
- package/dist/widgets.js +1 -1
- package/package.json +139 -139
- package/dist/chunk-27QC4FPL.js +0 -67
- package/dist/chunk-2ABBWCGC.js +0 -65
- package/dist/chunk-2GLUWW3D.js +0 -567
- package/dist/chunk-2HYHL6VW.js +0 -269
- package/dist/chunk-2MUNQYZ7.js +0 -26
- package/dist/chunk-2PFRWZIE.js +0 -65
- package/dist/chunk-2PSPKNUI.js +0 -1711
- package/dist/chunk-2X5NDXNG.js +0 -877
- package/dist/chunk-34TOFKL7.js +0 -1803
- package/dist/chunk-353KB3DI.js +0 -271
- package/dist/chunk-35CDLDX5.js +0 -1758
- package/dist/chunk-36MU4CFV.js +0 -41
- package/dist/chunk-37NSPDPQ.js +0 -284
- package/dist/chunk-3CSF4TOG.js +0 -282
- package/dist/chunk-3FIQOFI6.js +0 -182
- package/dist/chunk-3GHNC2BN.js +0 -28
- package/dist/chunk-3GZTRYSY.js +0 -33
- package/dist/chunk-3HLWWEPU.js +0 -909
- package/dist/chunk-3IVI3J54.js +0 -252
- package/dist/chunk-3KZ72WNW.js +0 -944
- package/dist/chunk-4AU64SQV.js +0 -182
- package/dist/chunk-4MOK7HAR.js +0 -84
- package/dist/chunk-4QK6FBDH.js +0 -1429
- package/dist/chunk-526ENZ77.js +0 -58
- package/dist/chunk-566Z7HXB.js +0 -737
- package/dist/chunk-5CRBB7XP.js +0 -358
- package/dist/chunk-5G67D3IZ.js +0 -168
- package/dist/chunk-5KBEED6D.js +0 -361
- package/dist/chunk-5LJMSKBB.js +0 -26
- package/dist/chunk-5M7LJFWV.js +0 -271
- package/dist/chunk-5NCPAWBE.js +0 -99
- package/dist/chunk-5O2RKXR3.js +0 -1444
- package/dist/chunk-5OCBERWW.js +0 -1094
- package/dist/chunk-5XUAA53E.js +0 -99
- package/dist/chunk-5ZFVYPDG.js +0 -97
- package/dist/chunk-6BCDNGIH.js +0 -1839
- package/dist/chunk-6BDUQJ7K.js +0 -949
- package/dist/chunk-6BTBDO6A.js +0 -633
- package/dist/chunk-6DJQF4Z7.js +0 -33
- package/dist/chunk-6EYXAMBN.js +0 -1857
- package/dist/chunk-6IWEHW57.js +0 -43
- package/dist/chunk-6J6S4NI7.js +0 -398
- package/dist/chunk-6NBHAKHS.js +0 -1997
- package/dist/chunk-6QRLJNXR.js +0 -1425
- package/dist/chunk-6SNF5MZK.js +0 -282
- package/dist/chunk-7FYJUE77.js +0 -282
- package/dist/chunk-7HM5UE5T.js +0 -270
- package/dist/chunk-7JOLTGUH.js +0 -58
- package/dist/chunk-7LS3ITZB.js +0 -567
- package/dist/chunk-7MCWJCQK.js +0 -909
- package/dist/chunk-7RIIFP3E.js +0 -1758
- package/dist/chunk-7UASYN3G.js +0 -254
- package/dist/chunk-7W2WYHDI.js +0 -741
- package/dist/chunk-7XFBKLFB.js +0 -90
- package/dist/chunk-7Y35RDSJ.js +0 -872
- package/dist/chunk-A65GFJBL.js +0 -65
- package/dist/chunk-AD6ZIEDK.js +0 -67
- package/dist/chunk-AIPXZK5O.js +0 -295
- package/dist/chunk-AK5Y72F3.js +0 -1426
- package/dist/chunk-ANRSGGFC.js +0 -725
- package/dist/chunk-APOMMWH4.js +0 -282
- package/dist/chunk-ARZVTWIQ.js +0 -1750
- package/dist/chunk-AWWBM2BI.js +0 -664
- package/dist/chunk-AX5VEQTY.js +0 -58
- package/dist/chunk-AYTXVOW3.js +0 -1708
- package/dist/chunk-B4ASD5VC.js +0 -295
- package/dist/chunk-BG3HMX4C.js +0 -271
- package/dist/chunk-BG4A246G.js +0 -1746
- package/dist/chunk-BNFJJA2L.js +0 -1425
- package/dist/chunk-BPKPBVU5.js +0 -59
- package/dist/chunk-BPKPPSXC.js +0 -282
- package/dist/chunk-BPWKKK7F.js +0 -1711
- package/dist/chunk-BS5EYKCJ.js +0 -26
- package/dist/chunk-BS6ETCJ7.js +0 -949
- package/dist/chunk-BTTBAGD3.js +0 -365
- package/dist/chunk-BWBWJYBK.js +0 -271
- package/dist/chunk-CCKX6YTC.js +0 -1735
- package/dist/chunk-CIF5Z3MP.js +0 -58
- package/dist/chunk-CQNVF2FD.js +0 -282
- package/dist/chunk-CRTHZHU7.js +0 -26
- package/dist/chunk-CSXYU7IO.js +0 -457
- package/dist/chunk-D6JD4FDC.js +0 -26
- package/dist/chunk-DAUTHAYH.js +0 -20
- package/dist/chunk-DB243LB7.js +0 -877
- package/dist/chunk-DEQLPROY.js +0 -1094
- package/dist/chunk-DGUYCZJH.js +0 -654
- package/dist/chunk-DI3Z32TV.js +0 -1780
- package/dist/chunk-DKGHW6MX.js +0 -90
- package/dist/chunk-DKXVN442.js +0 -90
- package/dist/chunk-DLWLJZB3.js +0 -712
- package/dist/chunk-DNTTC4V5.js +0 -1803
- package/dist/chunk-DTCOOBMX.js +0 -725
- package/dist/chunk-DWQQ2GZK.js +0 -1787
- package/dist/chunk-E5SMAKQQ.js +0 -336
- package/dist/chunk-E6BNBVMK.js +0 -457
- package/dist/chunk-E7NGA7X2.js +0 -59
- package/dist/chunk-EEPPJKAE.js +0 -443
- package/dist/chunk-EGZGFIXV.js +0 -90
- package/dist/chunk-EJMSUPXQ.js +0 -346
- package/dist/chunk-EJMYGAGQ.js +0 -717
- package/dist/chunk-EL6Z5MDY.js +0 -55
- package/dist/chunk-EP7VRLEB.js +0 -41
- package/dist/chunk-EQACK65C.js +0 -63
- package/dist/chunk-ESPA7SCH.js +0 -567
- package/dist/chunk-ETMEC6FH.js +0 -99
- package/dist/chunk-EUFENPGJ.js +0 -290
- package/dist/chunk-EZ2WHYVL.js +0 -65
- package/dist/chunk-EZRVMSZK.js +0 -67
- package/dist/chunk-F25CZRUH.js +0 -282
- package/dist/chunk-F2TRGINX.js +0 -254
- package/dist/chunk-F4IYF3YU.js +0 -266
- package/dist/chunk-F5JCIH3Q.js +0 -642
- package/dist/chunk-FBNDOAHU.js +0 -54
- package/dist/chunk-FDRU7W6W.js +0 -365
- package/dist/chunk-FDW3E54J.js +0 -1767
- package/dist/chunk-FEPU4KL6.js +0 -63
- package/dist/chunk-FGK3JKMN.js +0 -909
- package/dist/chunk-FQWPKSTD.js +0 -1437
- package/dist/chunk-FWHVLMCI.js +0 -26
- package/dist/chunk-FYIGTFXO.js +0 -712
- package/dist/chunk-G4AX3DQ4.js +0 -54
- package/dist/chunk-GBEYQRO2.js +0 -303
- package/dist/chunk-GBLES3NK.js +0 -248
- package/dist/chunk-GQVGUQW6.js +0 -1436
- package/dist/chunk-GVDEIJ3G.js +0 -291
- package/dist/chunk-GXIM4TC3.js +0 -346
- package/dist/chunk-GY5AAP4H.js +0 -316
- package/dist/chunk-HCV2T76T.js +0 -457
- package/dist/chunk-HCWPQCZP.js +0 -279
- package/dist/chunk-HFHOFG6W.js +0 -282
- package/dist/chunk-HGKEBAW3.js +0 -63
- package/dist/chunk-HJNW3HLI.js +0 -255
- package/dist/chunk-HKUNBYN6.js +0 -949
- package/dist/chunk-HRIIH4JX.js +0 -712
- package/dist/chunk-HS7ZKVPR.js +0 -182
- package/dist/chunk-HXDVV7HZ.js +0 -909
- package/dist/chunk-HZWNWUPJ.js +0 -466
- package/dist/chunk-I6EZTMPB.js +0 -949
- package/dist/chunk-IB23VMO3.js +0 -1746
- package/dist/chunk-IC4K4EOD.js +0 -26
- package/dist/chunk-IEMZ7RTT.js +0 -99
- package/dist/chunk-IJU6TOZ6.js +0 -65
- package/dist/chunk-IK3NFZOA.js +0 -466
- package/dist/chunk-IPGRSN42.js +0 -1750
- package/dist/chunk-IVMOK2QN.js +0 -1750
- package/dist/chunk-J7PD6L4B.js +0 -1767
- package/dist/chunk-JCLGQO7T.js +0 -443
- package/dist/chunk-JDXL7KDB.js +0 -1436
- package/dist/chunk-JIIFW636.js +0 -270
- package/dist/chunk-JLOASJXU.js +0 -654
- package/dist/chunk-JRWAHOMS.js +0 -41
- package/dist/chunk-JWGEEH7H.js +0 -944
- package/dist/chunk-K2BESAG7.js +0 -1688
- package/dist/chunk-K2U5YGF4.js +0 -877
- package/dist/chunk-K45FQ4Y4.js +0 -175
- package/dist/chunk-K7BPE427.js +0 -1432
- package/dist/chunk-K7JUDY3C.js +0 -364
- package/dist/chunk-KALKXPC3.js +0 -297
- package/dist/chunk-KKUV25KB.js +0 -361
- package/dist/chunk-KKV3DOAW.js +0 -466
- package/dist/chunk-KL3266RS.js +0 -26
- package/dist/chunk-KNN4P7DZ.js +0 -84
- package/dist/chunk-KP2DZH5Q.js +0 -254
- package/dist/chunk-KZHAJSQR.js +0 -1636
- package/dist/chunk-L36YN45V.js +0 -949
- package/dist/chunk-L5IBT37O.js +0 -263
- package/dist/chunk-LAX5H35R.js +0 -90
- package/dist/chunk-LBKGHMQV.js +0 -1750
- package/dist/chunk-LBTEPL7A.js +0 -1731
- package/dist/chunk-LEBBPTDB.js +0 -1444
- package/dist/chunk-LHI25KS2.js +0 -654
- package/dist/chunk-LHNJSLC6.js +0 -297
- package/dist/chunk-LLH63WVQ.js +0 -98
- package/dist/chunk-LWNJN3IW.js +0 -295
- package/dist/chunk-LWVR2C4G.js +0 -1711
- package/dist/chunk-M3MDTVV2.js +0 -896
- package/dist/chunk-M3QSBCXC.js +0 -52
- package/dist/chunk-M3ZKZQNY.js +0 -282
- package/dist/chunk-M5GNLDEO.js +0 -303
- package/dist/chunk-MBINISSE.js +0 -35
- package/dist/chunk-MFHVGKET.js +0 -267
- package/dist/chunk-MGWSG3PM.js +0 -358
- package/dist/chunk-MGYRVG2A.js +0 -282
- package/dist/chunk-MJNB47HB.js +0 -19
- package/dist/chunk-MLN3JZ2E.js +0 -398
- package/dist/chunk-MM46JVR2.js +0 -359
- package/dist/chunk-MQWTY3JY.js +0 -944
- package/dist/chunk-MWE3PK5S.js +0 -551
- package/dist/chunk-MXR7LXGC.js +0 -1084
- package/dist/chunk-MZZOQHNI.js +0 -642
- package/dist/chunk-N6BRVUAP.js +0 -1805
- package/dist/chunk-N7UVR6SG.js +0 -877
- package/dist/chunk-NIHWGZS4.js +0 -1426
- package/dist/chunk-NMTRH4Q3.js +0 -97
- package/dist/chunk-NSVVHQK5.js +0 -41
- package/dist/chunk-NVI2WE7D.js +0 -443
- package/dist/chunk-NZNNXPEE.js +0 -56
- package/dist/chunk-O7QBO3PH.js +0 -58
- package/dist/chunk-OAUPQBO2.js +0 -270
- package/dist/chunk-OB2LMD7C.js +0 -297
- package/dist/chunk-OEGAHDEU.js +0 -1094
- package/dist/chunk-OHEYBWQU.js +0 -58
- package/dist/chunk-OI5B74HF.js +0 -26
- package/dist/chunk-OI6OXUHJ.js +0 -443
- package/dist/chunk-ONOO74UN.js +0 -361
- package/dist/chunk-OWLQ4HZI.js +0 -282
- package/dist/chunk-OX2VMRMV.js +0 -633
- package/dist/chunk-OXYMB6VB.js +0 -466
- package/dist/chunk-OZS4YOOP.js +0 -59
- package/dist/chunk-P4FYE5TX.js +0 -866
- package/dist/chunk-P5KFWM4H.js +0 -98
- package/dist/chunk-PLFQZ7SS.js +0 -90
- package/dist/chunk-PMVU6BI4.js +0 -1847
- package/dist/chunk-PPNH4Y6U.js +0 -282
- package/dist/chunk-PUMLE7RJ.js +0 -1711
- package/dist/chunk-Q4MFANBF.js +0 -282
- package/dist/chunk-Q54YZ4X3.js +0 -26
- package/dist/chunk-Q6XACQW3.js +0 -1847
- package/dist/chunk-QI6ZDDUR.js +0 -35
- package/dist/chunk-QJ5KLY2S.js +0 -1821
- package/dist/chunk-QLEKZMMU.js +0 -282
- package/dist/chunk-QLNWSBWK.js +0 -567
- package/dist/chunk-QQS7BSPA.js +0 -26
- package/dist/chunk-QUGIYF3F.js +0 -712
- package/dist/chunk-QYSW3K7A.js +0 -282
- package/dist/chunk-QZWTKX5K.js +0 -321
- package/dist/chunk-RGGNGVO3.js +0 -98
- package/dist/chunk-RKJDRVV6.js +0 -443
- package/dist/chunk-RUAJTILD.js +0 -26
- package/dist/chunk-S5BHU353.js +0 -43
- package/dist/chunk-S6YEHFC7.js +0 -654
- package/dist/chunk-SHQUSFH7.js +0 -1426
- package/dist/chunk-SMB4DBMD.js +0 -182
- package/dist/chunk-SNYHQP3D.js +0 -743
- package/dist/chunk-SR2DPCTT.js +0 -1803
- package/dist/chunk-SU63HSUU.js +0 -58
- package/dist/chunk-SXXKZJI2.js +0 -303
- package/dist/chunk-T24L3TBF.js +0 -1717
- package/dist/chunk-T2SPHHYU.js +0 -365
- package/dist/chunk-TAQNSOKT.js +0 -692
- package/dist/chunk-TBA46SVX.js +0 -1805
- package/dist/chunk-TCWKKKPP.js +0 -90
- package/dist/chunk-TDNY4SUA.js +0 -41
- package/dist/chunk-TK4P3V5G.js +0 -56
- package/dist/chunk-TNNF56IQ.js +0 -1750
- package/dist/chunk-TR7E6LYX.js +0 -457
- package/dist/chunk-TVV4JK5G.js +0 -282
- package/dist/chunk-UATXXETW.js +0 -278
- package/dist/chunk-UHFUQWST.js +0 -65
- package/dist/chunk-UKDBQVM3.js +0 -346
- package/dist/chunk-URWUFH45.js +0 -98
- package/dist/chunk-USPT25TC.js +0 -365
- package/dist/chunk-UUSIH3XH.js +0 -1429
- package/dist/chunk-UXDIPRCG.js +0 -26
- package/dist/chunk-UYFNXLKR.js +0 -1436
- package/dist/chunk-UZZFP2EE.js +0 -35
- package/dist/chunk-V4G5Y6YM.js +0 -1094
- package/dist/chunk-V6F7KUWD.js +0 -270
- package/dist/chunk-V6P4LDAV.js +0 -65
- package/dist/chunk-VAA4FG3Z.js +0 -365
- package/dist/chunk-VCZLXRMR.js +0 -254
- package/dist/chunk-VDHXSSBT.js +0 -1426
- package/dist/chunk-VI4KRBSU.js +0 -291
- package/dist/chunk-VM4QMKVK.js +0 -254
- package/dist/chunk-VUXB655T.js +0 -1999
- package/dist/chunk-VWGYKYL2.js +0 -737
- package/dist/chunk-VX2OFBJN.js +0 -1426
- package/dist/chunk-VXVIE6DG.js +0 -84
- package/dist/chunk-W3QH7BF5.js +0 -282
- package/dist/chunk-W4OH7HG4.js +0 -40
- package/dist/chunk-WBVJX4GZ.js +0 -98
- package/dist/chunk-WDU2ZV4I.js +0 -1426
- package/dist/chunk-WGCQNOEQ.js +0 -712
- package/dist/chunk-WZQNHS4J.js +0 -52
- package/dist/chunk-X6VUCICU.js +0 -457
- package/dist/chunk-XAY7FM7Y.js +0 -618
- package/dist/chunk-XFW7B23S.js +0 -282
- package/dist/chunk-XJ3MNGY5.js +0 -58
- package/dist/chunk-XJZ5Z2CM.js +0 -642
- package/dist/chunk-XKVFQTJJ.js +0 -254
- package/dist/chunk-XRLFASCY.js +0 -22
- package/dist/chunk-XZGY5ZJ4.js +0 -35
- package/dist/chunk-Y745CBVB.js +0 -944
- package/dist/chunk-YLBJSXYY.js +0 -944
- package/dist/chunk-YQJIKVPZ.js +0 -1429
- package/dist/chunk-YRM2VCZF.js +0 -457
- package/dist/chunk-YS33KBVJ.js +0 -944
- package/dist/chunk-Z27DZPDG.js +0 -41
- package/dist/chunk-Z6GZHJW5.js +0 -877
- package/dist/chunk-ZXQ5NAEN.js +0 -32
- package/dist/contracts-B552GopR.d.cts +0 -245
- package/dist/contracts-B552GopR.d.ts +0 -245
- package/dist/contracts-Bg1ECISC.d.cts +0 -245
- package/dist/contracts-Bg1ECISC.d.ts +0 -245
- package/dist/contracts-CMriKJ6P.d.cts +0 -245
- package/dist/contracts-CMriKJ6P.d.ts +0 -245
- package/dist/src/components/ErrorBoundary.d.ts +0 -15
- package/dist/src/components/ErrorBoundary.js +0 -119
- package/dist/src/core/catch.d.ts +0 -11
- package/dist/src/core/catch.js +0 -28
- package/dist/src/core/each.d.ts +0 -13
- package/dist/src/core/each.js +0 -68
- package/dist/src/core/for.d.ts +0 -12
- package/dist/src/core/for.js +0 -67
- package/dist/src/core/html.d.ts +0 -137
- package/dist/src/core/html.js +0 -155
- package/dist/src/core/htmlIf.d.ts +0 -11
- package/dist/src/core/htmlIf.js +0 -18
- package/dist/src/core/lazy.d.ts +0 -7
- package/dist/src/core/lazy.js +0 -16
- package/dist/src/core/mount.d.ts +0 -7
- package/dist/src/core/mount.js +0 -12
- package/dist/src/core/slots.d.ts +0 -3
- package/dist/src/core/slots.js +0 -3
- package/dist/src/core/suspense.d.ts +0 -10
- package/dist/src/core/suspense.js +0 -33
- package/dist/src/core/tagFactory.d.ts +0 -13
- package/dist/src/core/tagFactory.js +0 -86
- package/dist/src/core/test.d.ts +0 -11
- package/dist/src/core/test.js +0 -28
- package/dist/src/core/types.d.ts +0 -2
- package/dist/src/core/types.js +0 -1
- package/dist/src/core/useComputed.d.ts +0 -6
- package/dist/src/core/useComputed.js +0 -30
- package/dist/src/core/useEffect.d.ts +0 -6
- package/dist/src/core/useEffect.js +0 -23
- package/dist/src/core/useState.d.ts +0 -10
- package/dist/src/core/useState.js +0 -34
- package/dist/src/core/useStore.d.ts +0 -19
- package/dist/src/core/useStore.js +0 -53
- package/dist/src/core/useWatch.d.ts +0 -8
- package/dist/src/core/useWatch.js +0 -23
- package/dist/src/plugins/i18n.d.ts +0 -6
- package/dist/src/plugins/i18n.js +0 -16
- package/dist/src/plugins/router.d.ts +0 -188
- package/dist/src/plugins/router.js +0 -1178
- package/dist/src/reactivity/bindAttribute.d.ts +0 -5
- package/dist/src/reactivity/bindAttribute.js +0 -31
- package/dist/src/reactivity/bindChildNode.d.ts +0 -10
- package/dist/src/reactivity/bindChildNode.js +0 -46
- package/dist/src/reactivity/bindTextNode.d.ts +0 -10
- package/dist/src/reactivity/bindTextNode.js +0 -27
- package/dist/src/reactivity/signal.d.ts +0 -3
- package/dist/src/reactivity/signal.js +0 -1
- package/dist/src/reactivity/track.d.ts +0 -18
- package/dist/src/reactivity/track.js +0 -73
- package/dist/src/reactivity/useComputed.d.ts +0 -6
- package/dist/src/reactivity/useComputed.js +0 -30
- package/dist/src/reactivity/useEffect.d.ts +0 -6
- package/dist/src/reactivity/useEffect.js +0 -23
- package/dist/src/reactivity/useState.d.ts +0 -10
- package/dist/src/reactivity/useState.js +0 -34
- package/dist/src/reactivity/useStore.d.ts +0 -19
- package/dist/src/reactivity/useStore.js +0 -53
- package/dist/src/reactivity/useWatch.d.ts +0 -8
- package/dist/src/reactivity/useWatch.js +0 -23
- package/dist/src/utils/sanitize.d.ts +0 -1
- package/dist/src/utils/sanitize.js +0 -8
- package/dist/ssr-27FOM46T.js +0 -35
- package/dist/ssr-GEOEYQV7.js +0 -35
- package/dist/ssr-GFUTTSJD.js +0 -22
- package/dist/ssr-K7DCR6BZ.js +0 -35
- package/dist/ssr-NFAIHWJJ.js +0 -35
- package/dist/ssr-O6LFMRFP.js +0 -35
- package/dist/ssr-QZEVGMMK.js +0 -35
- package/dist/ssr-SGVBCAGC.js +0 -35
- package/dist/ssr-UB2IXCYX.js +0 -35
- package/dist/ssr-XBZQNV4O.js +0 -22
- package/dist/ssr-Y76FSXDU.js +0 -35
- package/dist/ssr-YQJ4AYBD.js +0 -35
- package/dist/tagFactory-BDN7gDEp.d.cts +0 -21
- package/dist/tagFactory-BDN7gDEp.d.ts +0 -21
- package/dist/tagFactory-CZPO4RXF.d.cts +0 -34
- package/dist/tagFactory-CZPO4RXF.d.ts +0 -34
- package/dist/tagFactory-CgImPVMY.d.cts +0 -22
- package/dist/tagFactory-CgImPVMY.d.ts +0 -22
- package/dist/tagFactory-Cw1iv5if.d.cts +0 -22
- package/dist/tagFactory-Cw1iv5if.d.ts +0 -22
- package/dist/tagFactory-DeAXq9ef.d.cts +0 -30
- package/dist/tagFactory-DeAXq9ef.d.ts +0 -30
- package/dist/tagFactory-SkY0a7L1.d.cts +0 -22
- package/dist/tagFactory-SkY0a7L1.d.ts +0 -22
|
@@ -135,7 +135,7 @@ import {
|
|
|
135
135
|
use,
|
|
136
136
|
var_,
|
|
137
137
|
video
|
|
138
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-EWFVA3TJ.js";
|
|
139
139
|
import {
|
|
140
140
|
watch
|
|
141
141
|
} from "./chunk-CZUGLNJS.js";
|
|
@@ -149,7 +149,7 @@ import {
|
|
|
149
149
|
dispose,
|
|
150
150
|
registerDisposer,
|
|
151
151
|
tagFactory
|
|
152
|
-
} from "./chunk-
|
|
152
|
+
} from "./chunk-MDVXJWFN.js";
|
|
153
153
|
import {
|
|
154
154
|
bindAttribute,
|
|
155
155
|
bindDynamic,
|
|
@@ -208,6 +208,7 @@ __export(index_exports, {
|
|
|
208
208
|
article: () => article,
|
|
209
209
|
aside: () => aside,
|
|
210
210
|
audio: () => audio,
|
|
211
|
+
autoResize: () => autoResize,
|
|
211
212
|
b: () => b,
|
|
212
213
|
base: () => base,
|
|
213
214
|
batch: () => batch,
|
|
@@ -232,6 +233,7 @@ __export(index_exports, {
|
|
|
232
233
|
col: () => col,
|
|
233
234
|
colgroup: () => colgroup,
|
|
234
235
|
context: () => context,
|
|
236
|
+
copyOnClick: () => copyOnClick,
|
|
235
237
|
customElement: () => customElement,
|
|
236
238
|
data: () => data,
|
|
237
239
|
datalist: () => datalist,
|
|
@@ -309,6 +311,7 @@ __export(index_exports, {
|
|
|
309
311
|
object: () => object,
|
|
310
312
|
ol: () => ol,
|
|
311
313
|
on: () => on,
|
|
314
|
+
onCleanup: () => onCleanup,
|
|
312
315
|
onMount: () => onMount,
|
|
313
316
|
onUnmount: () => onUnmount,
|
|
314
317
|
optgroup: () => optgroup,
|
|
@@ -644,11 +647,11 @@ function executeElement(tmpl, values) {
|
|
|
644
647
|
const item = val[j];
|
|
645
648
|
if (item instanceof Node) {
|
|
646
649
|
el.appendChild(item);
|
|
647
|
-
} else if (item != null) {
|
|
650
|
+
} else if (item != null && typeof item !== "boolean") {
|
|
648
651
|
el.appendChild(document.createTextNode(String(item)));
|
|
649
652
|
}
|
|
650
653
|
}
|
|
651
|
-
} else if (val != null) {
|
|
654
|
+
} else if (val != null && typeof val !== "boolean") {
|
|
652
655
|
el.appendChild(document.createTextNode(String(val)));
|
|
653
656
|
}
|
|
654
657
|
break;
|
|
@@ -689,11 +692,11 @@ function html(strings, ...values) {
|
|
|
689
692
|
const item = val[j];
|
|
690
693
|
if (item instanceof Node) {
|
|
691
694
|
wrapper.appendChild(item);
|
|
692
|
-
} else if (item != null) {
|
|
695
|
+
} else if (item != null && typeof item !== "boolean") {
|
|
693
696
|
wrapper.appendChild(document.createTextNode(String(item)));
|
|
694
697
|
}
|
|
695
698
|
}
|
|
696
|
-
} else if (val != null) {
|
|
699
|
+
} else if (val != null && typeof val !== "boolean") {
|
|
697
700
|
wrapper.appendChild(document.createTextNode(String(val)));
|
|
698
701
|
}
|
|
699
702
|
break;
|
|
@@ -919,9 +922,10 @@ function each(getArray, render, options) {
|
|
|
919
922
|
function Fragment(nodes) {
|
|
920
923
|
const frag = document.createDocumentFragment();
|
|
921
924
|
for (const child of nodes) {
|
|
922
|
-
if (child == null) continue;
|
|
925
|
+
if (child == null || typeof child === "boolean") continue;
|
|
923
926
|
if (Array.isArray(child)) {
|
|
924
927
|
for (const nested of child) {
|
|
928
|
+
if (nested == null || typeof nested === "boolean") continue;
|
|
925
929
|
frag.appendChild(resolveChild(nested));
|
|
926
930
|
}
|
|
927
931
|
} else {
|
|
@@ -1187,6 +1191,24 @@ var longPress = (element, options) => {
|
|
|
1187
1191
|
element.removeEventListener("pointerleave", cancel);
|
|
1188
1192
|
};
|
|
1189
1193
|
};
|
|
1194
|
+
var copyOnClick = (element, getText) => {
|
|
1195
|
+
const handler = () => {
|
|
1196
|
+
const text2 = typeof getText === "function" ? getText() : element.textContent ?? "";
|
|
1197
|
+
navigator.clipboard.writeText(text2);
|
|
1198
|
+
};
|
|
1199
|
+
element.addEventListener("click", handler);
|
|
1200
|
+
return () => element.removeEventListener("click", handler);
|
|
1201
|
+
};
|
|
1202
|
+
var autoResize = (element) => {
|
|
1203
|
+
const resize = () => {
|
|
1204
|
+
element.style.overflow = "hidden";
|
|
1205
|
+
element.style.height = "auto";
|
|
1206
|
+
element.style.height = `${element.scrollHeight}px`;
|
|
1207
|
+
};
|
|
1208
|
+
resize();
|
|
1209
|
+
element.addEventListener("input", resize);
|
|
1210
|
+
return () => element.removeEventListener("input", resize);
|
|
1211
|
+
};
|
|
1190
1212
|
var trapFocus = (element) => {
|
|
1191
1213
|
const focusable = 'a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])';
|
|
1192
1214
|
const handler = (e) => {
|
|
@@ -1636,6 +1658,9 @@ function onUnmount(callback, element) {
|
|
|
1636
1658
|
}, element);
|
|
1637
1659
|
}
|
|
1638
1660
|
}
|
|
1661
|
+
function onCleanup(callback, element) {
|
|
1662
|
+
registerDisposer(element, callback);
|
|
1663
|
+
}
|
|
1639
1664
|
|
|
1640
1665
|
// src/core/rendering/lazy.ts
|
|
1641
1666
|
function lazy(importFn) {
|
|
@@ -1979,6 +2004,8 @@ export {
|
|
|
1979
2004
|
action,
|
|
1980
2005
|
clickOutside,
|
|
1981
2006
|
longPress,
|
|
2007
|
+
copyOnClick,
|
|
2008
|
+
autoResize,
|
|
1982
2009
|
trapFocus,
|
|
1983
2010
|
catchError,
|
|
1984
2011
|
catchErrorAsync,
|
|
@@ -1994,6 +2021,7 @@ export {
|
|
|
1994
2021
|
writable,
|
|
1995
2022
|
onMount,
|
|
1996
2023
|
onUnmount,
|
|
2024
|
+
onCleanup,
|
|
1997
2025
|
lazy,
|
|
1998
2026
|
Suspense,
|
|
1999
2027
|
ErrorBoundary,
|
|
@@ -449,6 +449,20 @@ function colorScheme() {
|
|
|
449
449
|
return { scheme, dispose };
|
|
450
450
|
}
|
|
451
451
|
|
|
452
|
+
// src/browser/format.ts
|
|
453
|
+
function formatNumber(value, options) {
|
|
454
|
+
const { locale, ...formatOptions } = options ?? {};
|
|
455
|
+
return new Intl.NumberFormat(locale, formatOptions).format(value);
|
|
456
|
+
}
|
|
457
|
+
function formatCurrency(value, currency, options) {
|
|
458
|
+
const { locale, ...formatOptions } = options ?? {};
|
|
459
|
+
return new Intl.NumberFormat(locale, {
|
|
460
|
+
style: "currency",
|
|
461
|
+
currency,
|
|
462
|
+
...formatOptions
|
|
463
|
+
}).format(value);
|
|
464
|
+
}
|
|
465
|
+
|
|
452
466
|
export {
|
|
453
467
|
media,
|
|
454
468
|
resize,
|
|
@@ -462,5 +476,7 @@ export {
|
|
|
462
476
|
draggable,
|
|
463
477
|
dropZone,
|
|
464
478
|
title,
|
|
465
|
-
colorScheme
|
|
479
|
+
colorScheme,
|
|
480
|
+
formatNumber,
|
|
481
|
+
formatCurrency
|
|
466
482
|
};
|
|
@@ -81,6 +81,9 @@ function hydrateNode(serverNode, clientNode) {
|
|
|
81
81
|
hydrateNode(serverChildren[i], clientChildren[i]);
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
+
function trustHTML(html) {
|
|
85
|
+
return html;
|
|
86
|
+
}
|
|
84
87
|
function renderToDocument(component, options = {}) {
|
|
85
88
|
let content;
|
|
86
89
|
try {
|
|
@@ -278,6 +281,7 @@ function escapeAttr(str) {
|
|
|
278
281
|
export {
|
|
279
282
|
renderToString,
|
|
280
283
|
hydrate,
|
|
284
|
+
trustHTML,
|
|
281
285
|
renderToDocument,
|
|
282
286
|
renderToStream,
|
|
283
287
|
collectStream,
|
|
@@ -67,6 +67,34 @@ function max(maxVal, message) {
|
|
|
67
67
|
function custom(fn, message) {
|
|
68
68
|
return (value) => fn(value) ? null : message;
|
|
69
69
|
}
|
|
70
|
+
function bindField(field, extras) {
|
|
71
|
+
const fieldOn = {
|
|
72
|
+
input: (e) => {
|
|
73
|
+
const target = e.target;
|
|
74
|
+
if (target.type === "checkbox") {
|
|
75
|
+
field.set(target.checked);
|
|
76
|
+
} else {
|
|
77
|
+
field.set(target.value);
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
change: (e) => {
|
|
81
|
+
const target = e.target;
|
|
82
|
+
if ("checked" in target && target.type === "checkbox") {
|
|
83
|
+
field.set(target.checked);
|
|
84
|
+
} else {
|
|
85
|
+
field.set(target.value);
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
blur: () => field.touch()
|
|
89
|
+
};
|
|
90
|
+
const { on: extraOn, value: _ignoreValue, ...restExtras } = extras ?? {};
|
|
91
|
+
const mergedOn = extraOn && typeof extraOn === "object" ? { ...fieldOn, ...extraOn } : fieldOn;
|
|
92
|
+
return {
|
|
93
|
+
value: field.value,
|
|
94
|
+
on: mergedOn,
|
|
95
|
+
...restExtras
|
|
96
|
+
};
|
|
97
|
+
}
|
|
70
98
|
function form(config) {
|
|
71
99
|
const fieldEntries = Object.entries(config);
|
|
72
100
|
const fieldMap = {};
|
|
@@ -445,10 +473,19 @@ function announce(message, priority = "polite") {
|
|
|
445
473
|
|
|
446
474
|
// src/ui/scopedStyle.ts
|
|
447
475
|
var scopeCounter = 0;
|
|
476
|
+
function sanitizeCSS(css) {
|
|
477
|
+
let sanitized = css.replace(/@import\s+[^;]+;/gi, "/* @import removed */");
|
|
478
|
+
sanitized = sanitized.replace(/url\s*\(\s*(?:"[^"]*"|'[^']*'|[^)]*)\s*\)/gi, "/* url() removed */");
|
|
479
|
+
sanitized = sanitized.replace(/expression\s*\(\s*(?:"[^"]*"|'[^']*'|[^)]*)\s*\)/gi, "/* expression() removed */");
|
|
480
|
+
sanitized = sanitized.replace(/-moz-binding\s*:[^;]+;/gi, "/* -moz-binding removed */");
|
|
481
|
+
sanitized = sanitized.replace(/behavior\s*:[^;]+;/gi, "/* behavior removed */");
|
|
482
|
+
return sanitized;
|
|
483
|
+
}
|
|
448
484
|
function scopedStyle(css) {
|
|
449
485
|
const id = `sibu-s${scopeCounter++}`;
|
|
450
486
|
const attr = `data-${id}`;
|
|
451
|
-
const
|
|
487
|
+
const safeCss = sanitizeCSS(css);
|
|
488
|
+
const scopedCSS = safeCss.replace(/([^\r\n,{}]+)(,(?=[^}]*{)|\s*{)/g, (match, selector, delimiter) => {
|
|
452
489
|
const trimmed = selector.trim();
|
|
453
490
|
if (trimmed.startsWith("@") || trimmed.startsWith("from") || trimmed.startsWith("to") || /^\d+%$/.test(trimmed)) {
|
|
454
491
|
return match;
|
|
@@ -626,7 +663,16 @@ function toast(options) {
|
|
|
626
663
|
timers.delete(id);
|
|
627
664
|
}
|
|
628
665
|
}
|
|
629
|
-
return {
|
|
666
|
+
return {
|
|
667
|
+
toasts,
|
|
668
|
+
show,
|
|
669
|
+
info: (message) => show(message, "info"),
|
|
670
|
+
success: (message) => show(message, "success"),
|
|
671
|
+
error: (message) => show(message, "error"),
|
|
672
|
+
warning: (message) => show(message, "warning"),
|
|
673
|
+
dismiss,
|
|
674
|
+
dismissAll
|
|
675
|
+
};
|
|
630
676
|
}
|
|
631
677
|
|
|
632
678
|
// src/ui/infiniteScroll.ts
|
|
@@ -845,6 +891,7 @@ export {
|
|
|
845
891
|
min,
|
|
846
892
|
max,
|
|
847
893
|
custom,
|
|
894
|
+
bindField,
|
|
848
895
|
form,
|
|
849
896
|
VirtualList,
|
|
850
897
|
intersection,
|
|
@@ -72,7 +72,7 @@ function bindChildNode(placeholder, getter) {
|
|
|
72
72
|
const node = lastNodes[i];
|
|
73
73
|
if (node.parentNode) node.parentNode.removeChild(node);
|
|
74
74
|
}
|
|
75
|
-
if (result == null) {
|
|
75
|
+
if (result == null || typeof result === "boolean") {
|
|
76
76
|
lastNodes.length = 0;
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
@@ -87,6 +87,7 @@ function bindChildNode(placeholder, getter) {
|
|
|
87
87
|
if (lastNodes.length < result.length) lastNodes = new Array(result.length);
|
|
88
88
|
for (let i = 0; i < result.length; i++) {
|
|
89
89
|
const item = result[i];
|
|
90
|
+
if (item == null || typeof item === "boolean") continue;
|
|
90
91
|
const node = item instanceof Node ? item : document.createTextNode(String(item));
|
|
91
92
|
parent.insertBefore(node, anchor);
|
|
92
93
|
lastNodes[count++] = node;
|
|
@@ -187,6 +188,9 @@ function appendChildren(el, nodes) {
|
|
|
187
188
|
el.textContent = String(nodes);
|
|
188
189
|
return;
|
|
189
190
|
}
|
|
191
|
+
if (typeof nodes === "boolean" || nodes == null) {
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
190
194
|
if (typeof nodes === "function") {
|
|
191
195
|
const ph = document.createComment("");
|
|
192
196
|
el.appendChild(ph);
|
|
@@ -215,11 +219,11 @@ function appendChildren(el, nodes) {
|
|
|
215
219
|
registerDisposer(el, bindChildNode(ph, inner));
|
|
216
220
|
} else if (inner instanceof Node) {
|
|
217
221
|
el.appendChild(inner);
|
|
218
|
-
} else if (inner != null) {
|
|
222
|
+
} else if (inner != null && typeof inner !== "boolean") {
|
|
219
223
|
el.appendChild(document.createTextNode(String(inner)));
|
|
220
224
|
}
|
|
221
225
|
}
|
|
222
|
-
} else if (c != null) {
|
|
226
|
+
} else if (c != null && typeof c !== "boolean") {
|
|
223
227
|
el.appendChild(document.createTextNode(String(c)));
|
|
224
228
|
}
|
|
225
229
|
}
|
|
@@ -409,26 +409,75 @@ function fileUpload(options) {
|
|
|
409
409
|
function contentEditable() {
|
|
410
410
|
const [content, setContent] = signal("");
|
|
411
411
|
const [isFocused, setFocused] = signal(false);
|
|
412
|
-
function
|
|
413
|
-
if (typeof
|
|
414
|
-
|
|
412
|
+
function wrapSelection(tagName) {
|
|
413
|
+
if (typeof window === "undefined") return;
|
|
414
|
+
const selection = window.getSelection();
|
|
415
|
+
if (!selection || selection.rangeCount === 0 || selection.isCollapsed) return;
|
|
416
|
+
const range = selection.getRangeAt(0);
|
|
417
|
+
const ancestor = range.commonAncestorContainer;
|
|
418
|
+
const existingWrap = findAncestorByTag(
|
|
419
|
+
ancestor instanceof HTMLElement ? ancestor : ancestor.parentElement,
|
|
420
|
+
tagName
|
|
421
|
+
);
|
|
422
|
+
let targetNode = null;
|
|
423
|
+
if (existingWrap) {
|
|
424
|
+
const parent = existingWrap.parentNode;
|
|
425
|
+
if (parent) {
|
|
426
|
+
const firstChild = existingWrap.firstChild;
|
|
427
|
+
const lastChild = existingWrap.lastChild;
|
|
428
|
+
while (existingWrap.firstChild) {
|
|
429
|
+
parent.insertBefore(existingWrap.firstChild, existingWrap);
|
|
430
|
+
}
|
|
431
|
+
parent.removeChild(existingWrap);
|
|
432
|
+
if (firstChild && lastChild) {
|
|
433
|
+
const newRange = document.createRange();
|
|
434
|
+
newRange.setStartBefore(firstChild);
|
|
435
|
+
newRange.setEndAfter(lastChild);
|
|
436
|
+
selection.removeAllRanges();
|
|
437
|
+
selection.addRange(newRange);
|
|
438
|
+
return;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
} else {
|
|
442
|
+
const wrapper = document.createElement(tagName);
|
|
443
|
+
try {
|
|
444
|
+
range.surroundContents(wrapper);
|
|
445
|
+
} catch {
|
|
446
|
+
const fragment = range.extractContents();
|
|
447
|
+
wrapper.appendChild(fragment);
|
|
448
|
+
range.insertNode(wrapper);
|
|
449
|
+
}
|
|
450
|
+
targetNode = wrapper;
|
|
451
|
+
}
|
|
452
|
+
if (targetNode) {
|
|
453
|
+
selection.removeAllRanges();
|
|
454
|
+
const newRange = document.createRange();
|
|
455
|
+
newRange.selectNodeContents(targetNode);
|
|
456
|
+
selection.addRange(newRange);
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
function findAncestorByTag(el, tagName) {
|
|
460
|
+
const upper = tagName.toUpperCase();
|
|
461
|
+
while (el) {
|
|
462
|
+
if (el.tagName === upper) return el;
|
|
463
|
+
el = el.parentElement;
|
|
415
464
|
}
|
|
465
|
+
return null;
|
|
416
466
|
}
|
|
417
467
|
function bold() {
|
|
418
|
-
|
|
468
|
+
wrapSelection("strong");
|
|
419
469
|
}
|
|
420
470
|
function italic() {
|
|
421
|
-
|
|
471
|
+
wrapSelection("em");
|
|
422
472
|
}
|
|
423
473
|
function underline() {
|
|
424
|
-
|
|
474
|
+
wrapSelection("u");
|
|
425
475
|
}
|
|
426
476
|
return {
|
|
427
477
|
content,
|
|
428
478
|
setContent,
|
|
429
479
|
isFocused,
|
|
430
480
|
setFocused,
|
|
431
|
-
execCommand,
|
|
432
481
|
bold,
|
|
433
482
|
italic,
|
|
434
483
|
underline
|
|
@@ -96,7 +96,8 @@ function query(key, fetcher, options = {}) {
|
|
|
96
96
|
refetchOnReconnect = false,
|
|
97
97
|
onSuccess,
|
|
98
98
|
onError,
|
|
99
|
-
onSettled
|
|
99
|
+
onSettled,
|
|
100
|
+
select
|
|
100
101
|
} = options;
|
|
101
102
|
const resolveKey = typeof key === "function" ? key : () => key;
|
|
102
103
|
const [data, setData] = signal(initialData);
|
|
@@ -146,8 +147,9 @@ function query(key, fetcher, options = {}) {
|
|
|
146
147
|
entry.data = result;
|
|
147
148
|
entry.dataUpdatedAt = Date.now();
|
|
148
149
|
entry.error = void 0;
|
|
150
|
+
const selected = select ? select(result) : result;
|
|
149
151
|
batch(() => {
|
|
150
|
-
setData(
|
|
152
|
+
setData(selected);
|
|
151
153
|
setIsFetching(false);
|
|
152
154
|
setError(void 0);
|
|
153
155
|
});
|
|
@@ -180,8 +182,10 @@ function query(key, fetcher, options = {}) {
|
|
|
180
182
|
});
|
|
181
183
|
return;
|
|
182
184
|
}
|
|
185
|
+
const raw = entry.data;
|
|
186
|
+
const selected = raw !== void 0 && select ? select(raw) : raw;
|
|
183
187
|
batch(() => {
|
|
184
|
-
setData(
|
|
188
|
+
setData(selected);
|
|
185
189
|
setError(entry.error);
|
|
186
190
|
if (!entry.promise) setIsFetching(false);
|
|
187
191
|
});
|
|
@@ -210,8 +214,10 @@ function query(key, fetcher, options = {}) {
|
|
|
210
214
|
entry.listeners.add(onCacheUpdate);
|
|
211
215
|
entry.refetchers.add(doFetch);
|
|
212
216
|
if (entry.data !== void 0) {
|
|
217
|
+
const raw = entry.data;
|
|
218
|
+
const selected = select ? select(raw) : raw;
|
|
213
219
|
batch(() => {
|
|
214
|
-
setData(
|
|
220
|
+
setData(selected);
|
|
215
221
|
setError(entry.error);
|
|
216
222
|
});
|
|
217
223
|
}
|
|
@@ -35,6 +35,39 @@ declare function email(message?: string): ValidatorFn<string>;
|
|
|
35
35
|
declare function min(minVal: number, message?: string): ValidatorFn<number>;
|
|
36
36
|
declare function max(maxVal: number, message?: string): ValidatorFn<number>;
|
|
37
37
|
declare function custom<T>(fn: (value: T) => boolean, message: string): ValidatorFn<T>;
|
|
38
|
+
/**
|
|
39
|
+
* Props returned by bindField, ready to spread into an input tag factory.
|
|
40
|
+
*/
|
|
41
|
+
interface BoundFieldProps {
|
|
42
|
+
value: () => unknown;
|
|
43
|
+
on: {
|
|
44
|
+
input: (e: Event) => void;
|
|
45
|
+
change: (e: Event) => void;
|
|
46
|
+
blur: () => void;
|
|
47
|
+
};
|
|
48
|
+
[attr: string]: unknown;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Bind a FormField to an input element, eliminating the value/input/blur boilerplate.
|
|
52
|
+
*
|
|
53
|
+
* Works with text inputs (`input` event) and selects/checkboxes (`change` event).
|
|
54
|
+
*
|
|
55
|
+
* @param field A FormField from form().fields
|
|
56
|
+
* @param extras Additional props to merge (placeholder, class, disabled, etc.)
|
|
57
|
+
* @returns Props object ready to pass directly to a tag factory
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* const f = form({ email: { initial: "", validators: [required(), email()] } });
|
|
62
|
+
*
|
|
63
|
+
* // Before — verbose
|
|
64
|
+
* input({ value: f.fields.email.value(), on: { input: e => f.fields.email.set(e.target.value), blur: () => f.fields.email.touch() } })
|
|
65
|
+
*
|
|
66
|
+
* // After — one-liner
|
|
67
|
+
* input(bindField(f.fields.email, { type: "email", placeholder: "Email" }))
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
declare function bindField<T>(field: FormField<T>, extras?: Record<string, unknown>): BoundFieldProps;
|
|
38
71
|
declare function form<T extends Record<string, unknown>>(config: FormConfig<T>): FormReturn<T>;
|
|
39
72
|
|
|
40
73
|
interface VirtualListProps<T> {
|
|
@@ -135,6 +168,10 @@ declare function announce(message: string, priority?: "polite" | "assertive"): v
|
|
|
135
168
|
* scopedStyle creates component-scoped CSS by generating a unique scope ID
|
|
136
169
|
* and prefixing all selectors.
|
|
137
170
|
* Returns the scope attribute name and injects the CSS into the document.
|
|
171
|
+
*
|
|
172
|
+
* CSS is sanitized to remove dangerous patterns (`url()`, `@import`,
|
|
173
|
+
* `expression()`, `-moz-binding`, `behavior`). If you need `url()` for
|
|
174
|
+
* background images, use inline styles via the `style` prop instead.
|
|
138
175
|
*/
|
|
139
176
|
declare function scopedStyle(css: string): {
|
|
140
177
|
scope: string;
|
|
@@ -188,15 +225,24 @@ interface Toast {
|
|
|
188
225
|
message: string;
|
|
189
226
|
type?: "info" | "success" | "error" | "warning";
|
|
190
227
|
}
|
|
191
|
-
|
|
192
|
-
duration?: number;
|
|
193
|
-
maxToasts?: number;
|
|
194
|
-
}): {
|
|
228
|
+
interface ToastInstance {
|
|
195
229
|
toasts: () => Toast[];
|
|
196
230
|
show: (message: string, type?: Toast["type"]) => string;
|
|
231
|
+
/** Show an info toast. */
|
|
232
|
+
info: (message: string) => string;
|
|
233
|
+
/** Show a success toast. */
|
|
234
|
+
success: (message: string) => string;
|
|
235
|
+
/** Show an error toast. */
|
|
236
|
+
error: (message: string) => string;
|
|
237
|
+
/** Show a warning toast. */
|
|
238
|
+
warning: (message: string) => string;
|
|
197
239
|
dismiss: (id: string) => void;
|
|
198
240
|
dismissAll: () => void;
|
|
199
|
-
}
|
|
241
|
+
}
|
|
242
|
+
declare function toast(options?: {
|
|
243
|
+
duration?: number;
|
|
244
|
+
maxToasts?: number;
|
|
245
|
+
}): ToastInstance;
|
|
200
246
|
|
|
201
247
|
/**
|
|
202
248
|
* infiniteScroll combines IntersectionObserver with a data-fetching trigger
|
|
@@ -259,4 +305,4 @@ declare function defineElement(name: string, component: (props: Record<string, u
|
|
|
259
305
|
*/
|
|
260
306
|
declare function svgElement(tag: string, props?: Record<string, unknown>, ...nodes: (SVGElement | string)[]): SVGElement;
|
|
261
307
|
|
|
262
|
-
export {
|
|
308
|
+
export { lazyLoad as A, type BoundFieldProps as B, type CustomElementOptions as C, matchesPattern as D, max as E, type FieldConfig as F, maxLength as G, min as H, type IntersectionResult as I, minLength as J, pagination as K, phoneMask as L, type MaskOptions as M, removeScopedStyle as N, required as O, scopedStyle as P, ssnMask as Q, svgElement as R, timeMask as S, type Toast as T, toast as U, type ValidatorFn as V, withScopedStyle as W, zipMask as X, FocusTrap as a, type FormConfig as b, type FormField as c, type FormReturn as d, type ToastInstance as e, VirtualList as f, type VirtualListProps as g, announce as h, aria as i, bindAttrs as j, bindBoolAttr as k, bindData as l, bindField as m, creditCardMask as n, custom as o, dateMask as p, defineElement as q, dialog as r, email as s, eventBus as t, focus as u, form as v, hotkey as w, infiniteScroll as x, inputMask as y, intersection as z };
|
|
@@ -35,6 +35,39 @@ declare function email(message?: string): ValidatorFn<string>;
|
|
|
35
35
|
declare function min(minVal: number, message?: string): ValidatorFn<number>;
|
|
36
36
|
declare function max(maxVal: number, message?: string): ValidatorFn<number>;
|
|
37
37
|
declare function custom<T>(fn: (value: T) => boolean, message: string): ValidatorFn<T>;
|
|
38
|
+
/**
|
|
39
|
+
* Props returned by bindField, ready to spread into an input tag factory.
|
|
40
|
+
*/
|
|
41
|
+
interface BoundFieldProps {
|
|
42
|
+
value: () => unknown;
|
|
43
|
+
on: {
|
|
44
|
+
input: (e: Event) => void;
|
|
45
|
+
change: (e: Event) => void;
|
|
46
|
+
blur: () => void;
|
|
47
|
+
};
|
|
48
|
+
[attr: string]: unknown;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Bind a FormField to an input element, eliminating the value/input/blur boilerplate.
|
|
52
|
+
*
|
|
53
|
+
* Works with text inputs (`input` event) and selects/checkboxes (`change` event).
|
|
54
|
+
*
|
|
55
|
+
* @param field A FormField from form().fields
|
|
56
|
+
* @param extras Additional props to merge (placeholder, class, disabled, etc.)
|
|
57
|
+
* @returns Props object ready to pass directly to a tag factory
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* const f = form({ email: { initial: "", validators: [required(), email()] } });
|
|
62
|
+
*
|
|
63
|
+
* // Before — verbose
|
|
64
|
+
* input({ value: f.fields.email.value(), on: { input: e => f.fields.email.set(e.target.value), blur: () => f.fields.email.touch() } })
|
|
65
|
+
*
|
|
66
|
+
* // After — one-liner
|
|
67
|
+
* input(bindField(f.fields.email, { type: "email", placeholder: "Email" }))
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
declare function bindField<T>(field: FormField<T>, extras?: Record<string, unknown>): BoundFieldProps;
|
|
38
71
|
declare function form<T extends Record<string, unknown>>(config: FormConfig<T>): FormReturn<T>;
|
|
39
72
|
|
|
40
73
|
interface VirtualListProps<T> {
|
|
@@ -135,6 +168,10 @@ declare function announce(message: string, priority?: "polite" | "assertive"): v
|
|
|
135
168
|
* scopedStyle creates component-scoped CSS by generating a unique scope ID
|
|
136
169
|
* and prefixing all selectors.
|
|
137
170
|
* Returns the scope attribute name and injects the CSS into the document.
|
|
171
|
+
*
|
|
172
|
+
* CSS is sanitized to remove dangerous patterns (`url()`, `@import`,
|
|
173
|
+
* `expression()`, `-moz-binding`, `behavior`). If you need `url()` for
|
|
174
|
+
* background images, use inline styles via the `style` prop instead.
|
|
138
175
|
*/
|
|
139
176
|
declare function scopedStyle(css: string): {
|
|
140
177
|
scope: string;
|
|
@@ -188,15 +225,24 @@ interface Toast {
|
|
|
188
225
|
message: string;
|
|
189
226
|
type?: "info" | "success" | "error" | "warning";
|
|
190
227
|
}
|
|
191
|
-
|
|
192
|
-
duration?: number;
|
|
193
|
-
maxToasts?: number;
|
|
194
|
-
}): {
|
|
228
|
+
interface ToastInstance {
|
|
195
229
|
toasts: () => Toast[];
|
|
196
230
|
show: (message: string, type?: Toast["type"]) => string;
|
|
231
|
+
/** Show an info toast. */
|
|
232
|
+
info: (message: string) => string;
|
|
233
|
+
/** Show a success toast. */
|
|
234
|
+
success: (message: string) => string;
|
|
235
|
+
/** Show an error toast. */
|
|
236
|
+
error: (message: string) => string;
|
|
237
|
+
/** Show a warning toast. */
|
|
238
|
+
warning: (message: string) => string;
|
|
197
239
|
dismiss: (id: string) => void;
|
|
198
240
|
dismissAll: () => void;
|
|
199
|
-
}
|
|
241
|
+
}
|
|
242
|
+
declare function toast(options?: {
|
|
243
|
+
duration?: number;
|
|
244
|
+
maxToasts?: number;
|
|
245
|
+
}): ToastInstance;
|
|
200
246
|
|
|
201
247
|
/**
|
|
202
248
|
* infiniteScroll combines IntersectionObserver with a data-fetching trigger
|
|
@@ -259,4 +305,4 @@ declare function defineElement(name: string, component: (props: Record<string, u
|
|
|
259
305
|
*/
|
|
260
306
|
declare function svgElement(tag: string, props?: Record<string, unknown>, ...nodes: (SVGElement | string)[]): SVGElement;
|
|
261
307
|
|
|
262
|
-
export {
|
|
308
|
+
export { lazyLoad as A, type BoundFieldProps as B, type CustomElementOptions as C, matchesPattern as D, max as E, type FieldConfig as F, maxLength as G, min as H, type IntersectionResult as I, minLength as J, pagination as K, phoneMask as L, type MaskOptions as M, removeScopedStyle as N, required as O, scopedStyle as P, ssnMask as Q, svgElement as R, timeMask as S, type Toast as T, toast as U, type ValidatorFn as V, withScopedStyle as W, zipMask as X, FocusTrap as a, type FormConfig as b, type FormField as c, type FormReturn as d, type ToastInstance as e, VirtualList as f, type VirtualListProps as g, announce as h, aria as i, bindAttrs as j, bindBoolAttr as k, bindData as l, bindField as m, creditCardMask as n, custom as o, dateMask as p, defineElement as q, dialog as r, email as s, eventBus as t, focus as u, form as v, hotkey as w, infiniteScroll as x, inputMask as y, intersection as z };
|