@elabs-ai/components-ui 4.1.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/chunk-22Z735L6.js +18 -0
- package/dist/chunk-22Z735L6.js.map +1 -0
- package/dist/chunk-23E62DNM.js +2 -0
- package/dist/chunk-23E62DNM.js.map +1 -0
- package/dist/chunk-2AABRSIN.js +2 -0
- package/dist/chunk-2AABRSIN.js.map +1 -0
- package/dist/chunk-2HXVFC4B.js +44 -0
- package/dist/chunk-2HXVFC4B.js.map +1 -0
- package/dist/chunk-2SBYBN45.js +2 -0
- package/dist/chunk-2SBYBN45.js.map +1 -0
- package/dist/chunk-333EWYWL.js +385 -0
- package/dist/chunk-333EWYWL.js.map +1 -0
- package/dist/chunk-35DUHYPC.js +59 -0
- package/dist/chunk-35DUHYPC.js.map +1 -0
- package/dist/chunk-35ZTVB35.js +76 -0
- package/dist/chunk-35ZTVB35.js.map +1 -0
- package/dist/chunk-36VULFFV.js +2 -0
- package/dist/chunk-36VULFFV.js.map +1 -0
- package/dist/chunk-3B7W334A.js +229 -0
- package/dist/chunk-3B7W334A.js.map +1 -0
- package/dist/chunk-3EKVSKGJ.js +256 -0
- package/dist/chunk-3EKVSKGJ.js.map +1 -0
- package/dist/chunk-3JAEQNCB.js +60 -0
- package/dist/chunk-3JAEQNCB.js.map +1 -0
- package/dist/chunk-3LWAAK3J.js +140 -0
- package/dist/chunk-3LWAAK3J.js.map +1 -0
- package/dist/chunk-3OSGTUN2.js +2 -0
- package/dist/chunk-3OSGTUN2.js.map +1 -0
- package/dist/chunk-3P7SRCDB.js +23 -0
- package/dist/chunk-3P7SRCDB.js.map +1 -0
- package/dist/chunk-45ICJ3EV.js +2 -0
- package/dist/chunk-45ICJ3EV.js.map +1 -0
- package/dist/chunk-4ACT7RLU.js +2 -0
- package/dist/chunk-4ACT7RLU.js.map +1 -0
- package/dist/chunk-4E73UAFA.js +296 -0
- package/dist/chunk-4E73UAFA.js.map +1 -0
- package/dist/chunk-4GQFIJAE.js +197 -0
- package/dist/chunk-4GQFIJAE.js.map +1 -0
- package/dist/chunk-4HTVJZVG.js +2 -0
- package/dist/chunk-4HTVJZVG.js.map +1 -0
- package/dist/chunk-4KDA5MDC.js +2 -0
- package/dist/chunk-4KDA5MDC.js.map +1 -0
- package/dist/chunk-4PITSMJ3.js +52 -0
- package/dist/chunk-4PITSMJ3.js.map +1 -0
- package/dist/chunk-4PXDZR2W.js +2 -0
- package/dist/chunk-4PXDZR2W.js.map +1 -0
- package/dist/chunk-4UWOADYM.js +2 -0
- package/dist/chunk-4UWOADYM.js.map +1 -0
- package/dist/chunk-4W3MVVKN.js +66 -0
- package/dist/chunk-4W3MVVKN.js.map +1 -0
- package/dist/chunk-4YOFSGHD.js +2 -0
- package/dist/chunk-4YOFSGHD.js.map +1 -0
- package/dist/chunk-533R5EKD.js +87 -0
- package/dist/chunk-533R5EKD.js.map +1 -0
- package/dist/chunk-545HI223.js +2 -0
- package/dist/chunk-545HI223.js.map +1 -0
- package/dist/chunk-57C25JYV.js +170 -0
- package/dist/chunk-57C25JYV.js.map +1 -0
- package/dist/chunk-5AWXGBSH.js +82 -0
- package/dist/chunk-5AWXGBSH.js.map +1 -0
- package/dist/chunk-5G2DDMHR.js +2 -0
- package/dist/chunk-5G2DDMHR.js.map +1 -0
- package/dist/chunk-5HBMI2DO.js +42 -0
- package/dist/chunk-5HBMI2DO.js.map +1 -0
- package/dist/chunk-5LCN5Q2L.js +23 -0
- package/dist/chunk-5LCN5Q2L.js.map +1 -0
- package/dist/chunk-5P4BSHIG.js +2 -0
- package/dist/chunk-5P4BSHIG.js.map +1 -0
- package/dist/chunk-5RC32MZH.js +161 -0
- package/dist/chunk-5RC32MZH.js.map +1 -0
- package/dist/chunk-5SHHIQVA.js +22 -0
- package/dist/chunk-5SHHIQVA.js.map +1 -0
- package/dist/chunk-5V5J7APL.js +27 -0
- package/dist/chunk-5V5J7APL.js.map +1 -0
- package/dist/chunk-5YZLOAKR.js +2 -0
- package/dist/chunk-5YZLOAKR.js.map +1 -0
- package/dist/chunk-5Z55AFOW.js +128 -0
- package/dist/chunk-5Z55AFOW.js.map +1 -0
- package/dist/chunk-653ZIWX6.js +2 -0
- package/dist/chunk-653ZIWX6.js.map +1 -0
- package/dist/chunk-6DHG7JVP.js +2 -0
- package/dist/chunk-6DHG7JVP.js.map +1 -0
- package/dist/chunk-6HGS5Z2Z.js +110 -0
- package/dist/chunk-6HGS5Z2Z.js.map +1 -0
- package/dist/chunk-6NKILKS6.js +35 -0
- package/dist/chunk-6NKILKS6.js.map +1 -0
- package/dist/chunk-6OFWWIEG.js +50 -0
- package/dist/chunk-6OFWWIEG.js.map +1 -0
- package/dist/chunk-6OPDRLMU.js +158 -0
- package/dist/chunk-6OPDRLMU.js.map +1 -0
- package/dist/chunk-6QU7OVFA.js +357 -0
- package/dist/chunk-6QU7OVFA.js.map +1 -0
- package/dist/chunk-6ROQKB4U.js +2 -0
- package/dist/chunk-6ROQKB4U.js.map +1 -0
- package/dist/chunk-6S43VAN7.js +2 -0
- package/dist/chunk-6S43VAN7.js.map +1 -0
- package/dist/chunk-6TJVJPNU.js +1321 -0
- package/dist/chunk-6TJVJPNU.js.map +1 -0
- package/dist/chunk-6VLJL7Q4.js +2 -0
- package/dist/chunk-6VLJL7Q4.js.map +1 -0
- package/dist/chunk-7G63B2B7.js +189 -0
- package/dist/chunk-7G63B2B7.js.map +1 -0
- package/dist/chunk-7P24I5OL.js +23 -0
- package/dist/chunk-7P24I5OL.js.map +1 -0
- package/dist/chunk-7PS5MKVH.js +97 -0
- package/dist/chunk-7PS5MKVH.js.map +1 -0
- package/dist/chunk-7WIHVGYL.js +2 -0
- package/dist/chunk-7WIHVGYL.js.map +1 -0
- package/dist/chunk-7WXDSTNR.js +62 -0
- package/dist/chunk-7WXDSTNR.js.map +1 -0
- package/dist/chunk-A43B4IT7.js +395 -0
- package/dist/chunk-A43B4IT7.js.map +1 -0
- package/dist/chunk-A47AZPCL.js +35 -0
- package/dist/chunk-A47AZPCL.js.map +1 -0
- package/dist/chunk-AA3SPDJU.js +2 -0
- package/dist/chunk-AA3SPDJU.js.map +1 -0
- package/dist/chunk-AC7X3D2M.js +2 -0
- package/dist/chunk-AC7X3D2M.js.map +1 -0
- package/dist/chunk-AE6UDP36.js +2 -0
- package/dist/chunk-AE6UDP36.js.map +1 -0
- package/dist/chunk-AFEFAGPW.js +2 -0
- package/dist/chunk-AFEFAGPW.js.map +1 -0
- package/dist/chunk-AFJCS2WV.js +95 -0
- package/dist/chunk-AFJCS2WV.js.map +1 -0
- package/dist/chunk-AQNLEP5F.js +2 -0
- package/dist/chunk-AQNLEP5F.js.map +1 -0
- package/dist/chunk-AUQVJ7KO.js +2 -0
- package/dist/chunk-AUQVJ7KO.js.map +1 -0
- package/dist/chunk-AXKZBRZK.js +32 -0
- package/dist/chunk-AXKZBRZK.js.map +1 -0
- package/dist/chunk-AZEABCK4.js +30 -0
- package/dist/chunk-AZEABCK4.js.map +1 -0
- package/dist/chunk-B23VW24W.js +2 -0
- package/dist/chunk-B23VW24W.js.map +1 -0
- package/dist/chunk-B2RSOLLO.js +2 -0
- package/dist/chunk-B2RSOLLO.js.map +1 -0
- package/dist/chunk-B5QQLMEE.js +31 -0
- package/dist/chunk-B5QQLMEE.js.map +1 -0
- package/dist/chunk-BLNXHETI.js +163 -0
- package/dist/chunk-BLNXHETI.js.map +1 -0
- package/dist/chunk-BM6NGS3A.js +201 -0
- package/dist/chunk-BM6NGS3A.js.map +1 -0
- package/dist/chunk-BN4CKDFU.js +989 -0
- package/dist/chunk-BN4CKDFU.js.map +1 -0
- package/dist/chunk-BPXLHGWI.js +54 -0
- package/dist/chunk-BPXLHGWI.js.map +1 -0
- package/dist/chunk-BTBYNKT4.js +2 -0
- package/dist/chunk-BTBYNKT4.js.map +1 -0
- package/dist/chunk-BWL7HWEF.js +325 -0
- package/dist/chunk-BWL7HWEF.js.map +1 -0
- package/dist/chunk-BZQF5QCN.js +18 -0
- package/dist/chunk-BZQF5QCN.js.map +1 -0
- package/dist/chunk-C2AQEEFB.js +2 -0
- package/dist/chunk-C2AQEEFB.js.map +1 -0
- package/dist/chunk-C753P3VJ.js +2 -0
- package/dist/chunk-C753P3VJ.js.map +1 -0
- package/dist/chunk-CDE74W6O.js +2 -0
- package/dist/chunk-CDE74W6O.js.map +1 -0
- package/dist/chunk-CEQER4CV.js +2 -0
- package/dist/chunk-CEQER4CV.js.map +1 -0
- package/dist/chunk-CQ5CH3SB.js +55 -0
- package/dist/chunk-CQ5CH3SB.js.map +1 -0
- package/dist/chunk-CRGGGHAM.js +2 -0
- package/dist/chunk-CRGGGHAM.js.map +1 -0
- package/dist/chunk-CRVB4SLG.js +2 -0
- package/dist/chunk-CRVB4SLG.js.map +1 -0
- package/dist/chunk-CT6XJIPY.js +2 -0
- package/dist/chunk-CT6XJIPY.js.map +1 -0
- package/dist/chunk-CY624JOL.js +2 -0
- package/dist/chunk-CY624JOL.js.map +1 -0
- package/dist/chunk-D3C3VVCX.js +38 -0
- package/dist/chunk-D3C3VVCX.js.map +1 -0
- package/dist/chunk-D53EN4Q6.js +2 -0
- package/dist/chunk-D53EN4Q6.js.map +1 -0
- package/dist/chunk-DCHYNTHI.js +11 -0
- package/dist/chunk-DCHYNTHI.js.map +1 -0
- package/dist/chunk-DCI6IOJX.js +236 -0
- package/dist/chunk-DCI6IOJX.js.map +1 -0
- package/dist/chunk-DFYPQ52O.js +476 -0
- package/dist/chunk-DFYPQ52O.js.map +1 -0
- package/dist/chunk-DIQJODQR.js +2 -0
- package/dist/chunk-DIQJODQR.js.map +1 -0
- package/dist/chunk-DSGTH6JW.js +2 -0
- package/dist/chunk-DSGTH6JW.js.map +1 -0
- package/dist/chunk-DT6RNLCP.js +32 -0
- package/dist/chunk-DT6RNLCP.js.map +1 -0
- package/dist/chunk-DU6ITAJL.js +2 -0
- package/dist/chunk-DU6ITAJL.js.map +1 -0
- package/dist/chunk-DUF2VZON.js +36 -0
- package/dist/chunk-DUF2VZON.js.map +1 -0
- package/dist/chunk-DXDLTYTT.js +2 -0
- package/dist/chunk-DXDLTYTT.js.map +1 -0
- package/dist/chunk-E3ES2KR6.js +55 -0
- package/dist/chunk-E3ES2KR6.js.map +1 -0
- package/dist/chunk-EAFPUZ46.js +2 -0
- package/dist/chunk-EAFPUZ46.js.map +1 -0
- package/dist/chunk-EBDOKU5K.js +2 -0
- package/dist/chunk-EBDOKU5K.js.map +1 -0
- package/dist/chunk-ECCNRCC4.js +74 -0
- package/dist/chunk-ECCNRCC4.js.map +1 -0
- package/dist/chunk-EDE73Q6Z.js +2 -0
- package/dist/chunk-EDE73Q6Z.js.map +1 -0
- package/dist/chunk-EHGIW7GA.js +190 -0
- package/dist/chunk-EHGIW7GA.js.map +1 -0
- package/dist/chunk-EJQYE4MY.js +100 -0
- package/dist/chunk-EJQYE4MY.js.map +1 -0
- package/dist/chunk-EKY3A5LO.js +133 -0
- package/dist/chunk-EKY3A5LO.js.map +1 -0
- package/dist/chunk-EL3OXVOW.js +31 -0
- package/dist/chunk-EL3OXVOW.js.map +1 -0
- package/dist/chunk-EP3U7OQ3.js +18 -0
- package/dist/chunk-EP3U7OQ3.js.map +1 -0
- package/dist/chunk-EY2PGOG3.js +246 -0
- package/dist/chunk-EY2PGOG3.js.map +1 -0
- package/dist/chunk-FAOX6A5D.js +2 -0
- package/dist/chunk-FAOX6A5D.js.map +1 -0
- package/dist/chunk-FBJ2JSRA.js +47 -0
- package/dist/chunk-FBJ2JSRA.js.map +1 -0
- package/dist/chunk-FDJ77DTR.js +2 -0
- package/dist/chunk-FDJ77DTR.js.map +1 -0
- package/dist/chunk-FDPONOOT.js +93 -0
- package/dist/chunk-FDPONOOT.js.map +1 -0
- package/dist/chunk-FHDJKH2A.js +2 -0
- package/dist/chunk-FHDJKH2A.js.map +1 -0
- package/dist/chunk-FINAKMC6.js +796 -0
- package/dist/chunk-FINAKMC6.js.map +1 -0
- package/dist/chunk-FKUP7QRJ.js +54 -0
- package/dist/chunk-FKUP7QRJ.js.map +1 -0
- package/dist/chunk-FPLZ24MK.js +2 -0
- package/dist/chunk-FPLZ24MK.js.map +1 -0
- package/dist/chunk-FRFSDZIN.js +2 -0
- package/dist/chunk-FRFSDZIN.js.map +1 -0
- package/dist/chunk-FYCCNQXQ.js +173 -0
- package/dist/chunk-FYCCNQXQ.js.map +1 -0
- package/dist/chunk-G3OTDYCD.js +53 -0
- package/dist/chunk-G3OTDYCD.js.map +1 -0
- package/dist/chunk-G72UOVKS.js +2 -0
- package/dist/chunk-G72UOVKS.js.map +1 -0
- package/dist/chunk-GAI4NEPU.js +151 -0
- package/dist/chunk-GAI4NEPU.js.map +1 -0
- package/dist/chunk-GRWGNWIJ.js +187 -0
- package/dist/chunk-GRWGNWIJ.js.map +1 -0
- package/dist/chunk-GV6GQXKX.js +176 -0
- package/dist/chunk-GV6GQXKX.js.map +1 -0
- package/dist/chunk-H5UA5JW4.js +140 -0
- package/dist/chunk-H5UA5JW4.js.map +1 -0
- package/dist/chunk-H5XSI63P.js +2 -0
- package/dist/chunk-H5XSI63P.js.map +1 -0
- package/dist/chunk-HANBQNW3.js +1498 -0
- package/dist/chunk-HANBQNW3.js.map +1 -0
- package/dist/chunk-HCU2JHPH.js +169 -0
- package/dist/chunk-HCU2JHPH.js.map +1 -0
- package/dist/chunk-HDDXP2J7.js +2 -0
- package/dist/chunk-HDDXP2J7.js.map +1 -0
- package/dist/chunk-HDS64Z5L.js +54 -0
- package/dist/chunk-HDS64Z5L.js.map +1 -0
- package/dist/chunk-HHVULJGX.js +2 -0
- package/dist/chunk-HHVULJGX.js.map +1 -0
- package/dist/chunk-HLMFRCFE.js +2 -0
- package/dist/chunk-HLMFRCFE.js.map +1 -0
- package/dist/chunk-HPUPDT4Q.js +2 -0
- package/dist/chunk-HPUPDT4Q.js.map +1 -0
- package/dist/chunk-HRYH7XQP.js +209 -0
- package/dist/chunk-HRYH7XQP.js.map +1 -0
- package/dist/chunk-HVFYAQLK.js +101 -0
- package/dist/chunk-HVFYAQLK.js.map +1 -0
- package/dist/chunk-HZPNST7D.js +2 -0
- package/dist/chunk-HZPNST7D.js.map +1 -0
- package/dist/chunk-I6O6ACCH.js +2 -0
- package/dist/chunk-I6O6ACCH.js.map +1 -0
- package/dist/chunk-IGP5E4FC.js +201 -0
- package/dist/chunk-IGP5E4FC.js.map +1 -0
- package/dist/chunk-IHMFEPIT.js +123 -0
- package/dist/chunk-IHMFEPIT.js.map +1 -0
- package/dist/chunk-IM5VJP6T.js +2 -0
- package/dist/chunk-IM5VJP6T.js.map +1 -0
- package/dist/chunk-IRUZDWJ3.js +218 -0
- package/dist/chunk-IRUZDWJ3.js.map +1 -0
- package/dist/chunk-ISWUCXEZ.js +2 -0
- package/dist/chunk-ISWUCXEZ.js.map +1 -0
- package/dist/chunk-ITFDGFOT.js +31 -0
- package/dist/chunk-ITFDGFOT.js.map +1 -0
- package/dist/chunk-IUQ474IC.js +2 -0
- package/dist/chunk-IUQ474IC.js.map +1 -0
- package/dist/chunk-IY23F2Y5.js +2 -0
- package/dist/chunk-IY23F2Y5.js.map +1 -0
- package/dist/chunk-IZJOZJDL.js +75 -0
- package/dist/chunk-IZJOZJDL.js.map +1 -0
- package/dist/chunk-J2P4YZLC.js +85 -0
- package/dist/chunk-J2P4YZLC.js.map +1 -0
- package/dist/chunk-JCRBDA66.js +2 -0
- package/dist/chunk-JCRBDA66.js.map +1 -0
- package/dist/chunk-JGS2IHER.js +140 -0
- package/dist/chunk-JGS2IHER.js.map +1 -0
- package/dist/chunk-JNWXHPZG.js +24 -0
- package/dist/chunk-JNWXHPZG.js.map +1 -0
- package/dist/chunk-JWWJ2Z5C.js +2 -0
- package/dist/chunk-JWWJ2Z5C.js.map +1 -0
- package/dist/chunk-K2GLXCTG.js +2 -0
- package/dist/chunk-K2GLXCTG.js.map +1 -0
- package/dist/chunk-K6YRTASS.js +55 -0
- package/dist/chunk-K6YRTASS.js.map +1 -0
- package/dist/chunk-KAAJL2HA.js +327 -0
- package/dist/chunk-KAAJL2HA.js.map +1 -0
- package/dist/chunk-KBNWM27Q.js +48 -0
- package/dist/chunk-KBNWM27Q.js.map +1 -0
- package/dist/chunk-KOVHUAHG.js +164 -0
- package/dist/chunk-KOVHUAHG.js.map +1 -0
- package/dist/chunk-KRVSD4OK.js +2 -0
- package/dist/chunk-KRVSD4OK.js.map +1 -0
- package/dist/chunk-KTH3GWAL.js +116 -0
- package/dist/chunk-KTH3GWAL.js.map +1 -0
- package/dist/chunk-KUAVM54Y.js +30 -0
- package/dist/chunk-KUAVM54Y.js.map +1 -0
- package/dist/chunk-KWQ6HV5Z.js +97 -0
- package/dist/chunk-KWQ6HV5Z.js.map +1 -0
- package/dist/chunk-KZWC6JCI.js +177 -0
- package/dist/chunk-KZWC6JCI.js.map +1 -0
- package/dist/chunk-L37QZALU.js +17 -0
- package/dist/chunk-L37QZALU.js.map +1 -0
- package/dist/chunk-L3SHPHLK.js +35 -0
- package/dist/chunk-L3SHPHLK.js.map +1 -0
- package/dist/chunk-L66VJIRD.js +2 -0
- package/dist/chunk-L66VJIRD.js.map +1 -0
- package/dist/chunk-LDOCY4SU.js +68 -0
- package/dist/chunk-LDOCY4SU.js.map +1 -0
- package/dist/chunk-LJGWA2XL.js +2 -0
- package/dist/chunk-LJGWA2XL.js.map +1 -0
- package/dist/chunk-LLQWLZ75.js +2 -0
- package/dist/chunk-LLQWLZ75.js.map +1 -0
- package/dist/chunk-LMO3QK7Q.js +137 -0
- package/dist/chunk-LMO3QK7Q.js.map +1 -0
- package/dist/chunk-LOSXINSS.js +100 -0
- package/dist/chunk-LOSXINSS.js.map +1 -0
- package/dist/chunk-LR2CU7HK.js +41 -0
- package/dist/chunk-LR2CU7HK.js.map +1 -0
- package/dist/chunk-LSYVAOSH.js +2 -0
- package/dist/chunk-LSYVAOSH.js.map +1 -0
- package/dist/chunk-LVRULYU4.js +400 -0
- package/dist/chunk-LVRULYU4.js.map +1 -0
- package/dist/chunk-LXW3GNF7.js +201 -0
- package/dist/chunk-LXW3GNF7.js.map +1 -0
- package/dist/chunk-LYVBDMDQ.js +2 -0
- package/dist/chunk-LYVBDMDQ.js.map +1 -0
- package/dist/chunk-M3WSUFD4.js +2 -0
- package/dist/chunk-M3WSUFD4.js.map +1 -0
- package/dist/chunk-MGAXCPT7.js +87 -0
- package/dist/chunk-MGAXCPT7.js.map +1 -0
- package/dist/chunk-MIXCXZWT.js +2 -0
- package/dist/chunk-MIXCXZWT.js.map +1 -0
- package/dist/chunk-MLGBLKUH.js +2 -0
- package/dist/chunk-MLGBLKUH.js.map +1 -0
- package/dist/chunk-MNS2VWHD.js +2 -0
- package/dist/chunk-MNS2VWHD.js.map +1 -0
- package/dist/chunk-MPMMU3QI.js +2 -0
- package/dist/chunk-MPMMU3QI.js.map +1 -0
- package/dist/chunk-MRWOHWEH.js +2 -0
- package/dist/chunk-MRWOHWEH.js.map +1 -0
- package/dist/chunk-MZDL7N52.js +2 -0
- package/dist/chunk-MZDL7N52.js.map +1 -0
- package/dist/chunk-N44PNGDS.js +169 -0
- package/dist/chunk-N44PNGDS.js.map +1 -0
- package/dist/chunk-N7PJTMRL.js +2 -0
- package/dist/chunk-N7PJTMRL.js.map +1 -0
- package/dist/chunk-NBMF7SIS.js +35 -0
- package/dist/chunk-NBMF7SIS.js.map +1 -0
- package/dist/chunk-NJAGSGPF.js +245 -0
- package/dist/chunk-NJAGSGPF.js.map +1 -0
- package/dist/chunk-NMGNXW3J.js +98 -0
- package/dist/chunk-NMGNXW3J.js.map +1 -0
- package/dist/chunk-NQY3QNLR.js +80 -0
- package/dist/chunk-NQY3QNLR.js.map +1 -0
- package/dist/chunk-NRNIUM75.js +2 -0
- package/dist/chunk-NRNIUM75.js.map +1 -0
- package/dist/chunk-NRSSSVWB.js +61 -0
- package/dist/chunk-NRSSSVWB.js.map +1 -0
- package/dist/chunk-NTTSHOOK.js +78 -0
- package/dist/chunk-NTTSHOOK.js.map +1 -0
- package/dist/chunk-O3JWMB6O.js +20 -0
- package/dist/chunk-O3JWMB6O.js.map +1 -0
- package/dist/chunk-OBEJUAN6.js +246 -0
- package/dist/chunk-OBEJUAN6.js.map +1 -0
- package/dist/chunk-OEPN373X.js +2 -0
- package/dist/chunk-OEPN373X.js.map +1 -0
- package/dist/chunk-OITCRC5D.js +2 -0
- package/dist/chunk-OITCRC5D.js.map +1 -0
- package/dist/chunk-OKV3N7QK.js +2 -0
- package/dist/chunk-OKV3N7QK.js.map +1 -0
- package/dist/chunk-ON2E7XHD.js +51 -0
- package/dist/chunk-ON2E7XHD.js.map +1 -0
- package/dist/chunk-OPMMD25Z.js +218 -0
- package/dist/chunk-OPMMD25Z.js.map +1 -0
- package/dist/chunk-OR4NVFPH.js +2 -0
- package/dist/chunk-OR4NVFPH.js.map +1 -0
- package/dist/chunk-OV4GQOLC.js +73 -0
- package/dist/chunk-OV4GQOLC.js.map +1 -0
- package/dist/chunk-OYKS7YHE.js +2 -0
- package/dist/chunk-OYKS7YHE.js.map +1 -0
- package/dist/chunk-OYM3NHSD.js +74 -0
- package/dist/chunk-OYM3NHSD.js.map +1 -0
- package/dist/chunk-OZTM6PYF.js +30 -0
- package/dist/chunk-OZTM6PYF.js.map +1 -0
- package/dist/chunk-PHAENHGL.js +19 -0
- package/dist/chunk-PHAENHGL.js.map +1 -0
- package/dist/chunk-PLCQZBZS.js +63 -0
- package/dist/chunk-PLCQZBZS.js.map +1 -0
- package/dist/chunk-PP7POY7C.js +110 -0
- package/dist/chunk-PP7POY7C.js.map +1 -0
- package/dist/chunk-PSBNQZB4.js +2 -0
- package/dist/chunk-PSBNQZB4.js.map +1 -0
- package/dist/chunk-PYPNGKRD.js +355 -0
- package/dist/chunk-PYPNGKRD.js.map +1 -0
- package/dist/chunk-QDJHUNBQ.js +2 -0
- package/dist/chunk-QDJHUNBQ.js.map +1 -0
- package/dist/chunk-QDTGDYMM.js +77 -0
- package/dist/chunk-QDTGDYMM.js.map +1 -0
- package/dist/chunk-QF6UWWDY.js +125 -0
- package/dist/chunk-QF6UWWDY.js.map +1 -0
- package/dist/chunk-QGX37P5L.js +24 -0
- package/dist/chunk-QGX37P5L.js.map +1 -0
- package/dist/chunk-QNEOO22E.js +75 -0
- package/dist/chunk-QNEOO22E.js.map +1 -0
- package/dist/chunk-QODOFLHL.js +2 -0
- package/dist/chunk-QODOFLHL.js.map +1 -0
- package/dist/chunk-QRGYKV4J.js +2 -0
- package/dist/chunk-QRGYKV4J.js.map +1 -0
- package/dist/chunk-QTIKGWU4.js +91 -0
- package/dist/chunk-QTIKGWU4.js.map +1 -0
- package/dist/chunk-R3SYH7RG.js +782 -0
- package/dist/chunk-R3SYH7RG.js.map +1 -0
- package/dist/chunk-R5JYMCEA.js +2 -0
- package/dist/chunk-R5JYMCEA.js.map +1 -0
- package/dist/chunk-R7DDZIE3.js +232 -0
- package/dist/chunk-R7DDZIE3.js.map +1 -0
- package/dist/chunk-RB5AWLDJ.js +26 -0
- package/dist/chunk-RB5AWLDJ.js.map +1 -0
- package/dist/chunk-RF7JSNXJ.js +2 -0
- package/dist/chunk-RF7JSNXJ.js.map +1 -0
- package/dist/chunk-RHXVQZOW.js +2 -0
- package/dist/chunk-RHXVQZOW.js.map +1 -0
- package/dist/chunk-RM5JIUVW.js +74 -0
- package/dist/chunk-RM5JIUVW.js.map +1 -0
- package/dist/chunk-RMSMTLXH.js +2 -0
- package/dist/chunk-RMSMTLXH.js.map +1 -0
- package/dist/chunk-RNC4M6SG.js +85 -0
- package/dist/chunk-RNC4M6SG.js.map +1 -0
- package/dist/chunk-RRYWMYGI.js +14 -0
- package/dist/chunk-RRYWMYGI.js.map +1 -0
- package/dist/chunk-RRZUMIYG.js +93 -0
- package/dist/chunk-RRZUMIYG.js.map +1 -0
- package/dist/chunk-RTHCX2TG.js +59 -0
- package/dist/chunk-RTHCX2TG.js.map +1 -0
- package/dist/chunk-RWUKMJYA.js +39 -0
- package/dist/chunk-RWUKMJYA.js.map +1 -0
- package/dist/chunk-SMTAPQEQ.js +2 -0
- package/dist/chunk-SMTAPQEQ.js.map +1 -0
- package/dist/chunk-SS6EOZKZ.js +2 -0
- package/dist/chunk-SS6EOZKZ.js.map +1 -0
- package/dist/chunk-T2XEMEN2.js +2 -0
- package/dist/chunk-T2XEMEN2.js.map +1 -0
- package/dist/chunk-T4JNXV75.js +125 -0
- package/dist/chunk-T4JNXV75.js.map +1 -0
- package/dist/chunk-T7JOWG2A.js +10 -0
- package/dist/chunk-T7JOWG2A.js.map +1 -0
- package/dist/chunk-TAQI4JTE.js +12 -0
- package/dist/chunk-TAQI4JTE.js.map +1 -0
- package/dist/chunk-TEKBTTP2.js +27 -0
- package/dist/chunk-TEKBTTP2.js.map +1 -0
- package/dist/chunk-TNOANK34.js +4483 -0
- package/dist/chunk-TNOANK34.js.map +1 -0
- package/dist/chunk-TU24Y4HN.js +178 -0
- package/dist/chunk-TU24Y4HN.js.map +1 -0
- package/dist/chunk-U26XDHMX.js +726 -0
- package/dist/chunk-U26XDHMX.js.map +1 -0
- package/dist/chunk-U4LHV5DS.js +36 -0
- package/dist/chunk-U4LHV5DS.js.map +1 -0
- package/dist/chunk-U7QYCYHC.js +2 -0
- package/dist/chunk-U7QYCYHC.js.map +1 -0
- package/dist/chunk-UANAVLMS.js +2 -0
- package/dist/chunk-UANAVLMS.js.map +1 -0
- package/dist/chunk-UCEVPLR5.js +2 -0
- package/dist/chunk-UCEVPLR5.js.map +1 -0
- package/dist/chunk-UCQDLRHR.js +31 -0
- package/dist/chunk-UCQDLRHR.js.map +1 -0
- package/dist/chunk-UFF7LLGU.js +2 -0
- package/dist/chunk-UFF7LLGU.js.map +1 -0
- package/dist/chunk-UG5TKXTK.js +2 -0
- package/dist/chunk-UG5TKXTK.js.map +1 -0
- package/dist/chunk-ULIDYFM7.js +192 -0
- package/dist/chunk-ULIDYFM7.js.map +1 -0
- package/dist/chunk-UPEMEBWH.js +186 -0
- package/dist/chunk-UPEMEBWH.js.map +1 -0
- package/dist/chunk-UQHWOPUY.js +61 -0
- package/dist/chunk-UQHWOPUY.js.map +1 -0
- package/dist/chunk-UQRYTMR7.js +2 -0
- package/dist/chunk-UQRYTMR7.js.map +1 -0
- package/dist/chunk-URVAZW44.js +323 -0
- package/dist/chunk-URVAZW44.js.map +1 -0
- package/dist/chunk-USI4LB3N.js +2 -0
- package/dist/chunk-USI4LB3N.js.map +1 -0
- package/dist/chunk-UXSV6RVS.js +31 -0
- package/dist/chunk-UXSV6RVS.js.map +1 -0
- package/dist/chunk-V2S5DINS.js +2 -0
- package/dist/chunk-V2S5DINS.js.map +1 -0
- package/dist/chunk-V3EQ6ACC.js +2 -0
- package/dist/chunk-V3EQ6ACC.js.map +1 -0
- package/dist/chunk-V4DDHF7S.js +147 -0
- package/dist/chunk-V4DDHF7S.js.map +1 -0
- package/dist/chunk-VA2OONPE.js +77 -0
- package/dist/chunk-VA2OONPE.js.map +1 -0
- package/dist/chunk-VFF3AN4Y.js +90 -0
- package/dist/chunk-VFF3AN4Y.js.map +1 -0
- package/dist/chunk-VH7GG77B.js +2 -0
- package/dist/chunk-VH7GG77B.js.map +1 -0
- package/dist/chunk-VHLPJ4XW.js +2 -0
- package/dist/chunk-VHLPJ4XW.js.map +1 -0
- package/dist/chunk-VLE5THFD.js +2 -0
- package/dist/chunk-VLE5THFD.js.map +1 -0
- package/dist/chunk-VORFRWM5.js +2 -0
- package/dist/chunk-VORFRWM5.js.map +1 -0
- package/dist/chunk-VQ2T3OEC.js +27 -0
- package/dist/chunk-VQ2T3OEC.js.map +1 -0
- package/dist/chunk-VRIAWF3A.js +25 -0
- package/dist/chunk-VRIAWF3A.js.map +1 -0
- package/dist/chunk-W6HCXQBH.js +198 -0
- package/dist/chunk-W6HCXQBH.js.map +1 -0
- package/dist/chunk-W7I2X6VI.js +2 -0
- package/dist/chunk-W7I2X6VI.js.map +1 -0
- package/dist/chunk-WCCCW4KD.js +140 -0
- package/dist/chunk-WCCCW4KD.js.map +1 -0
- package/dist/chunk-WNIVCHDP.js +2 -0
- package/dist/chunk-WNIVCHDP.js.map +1 -0
- package/dist/chunk-WOMO5CZ7.js +2 -0
- package/dist/chunk-WOMO5CZ7.js.map +1 -0
- package/dist/chunk-WTB4DDZP.js +163 -0
- package/dist/chunk-WTB4DDZP.js.map +1 -0
- package/dist/chunk-WW3CD7AU.js +118 -0
- package/dist/chunk-WW3CD7AU.js.map +1 -0
- package/dist/chunk-WX3LWMVU.js +81 -0
- package/dist/chunk-WX3LWMVU.js.map +1 -0
- package/dist/chunk-WYENWW3Y.js +2 -0
- package/dist/chunk-WYENWW3Y.js.map +1 -0
- package/dist/chunk-WZTFU6FJ.js +69 -0
- package/dist/chunk-WZTFU6FJ.js.map +1 -0
- package/dist/chunk-X4FE7UKP.js +2 -0
- package/dist/chunk-X4FE7UKP.js.map +1 -0
- package/dist/chunk-X6J4KKZZ.js +126 -0
- package/dist/chunk-X6J4KKZZ.js.map +1 -0
- package/dist/chunk-XAFRTZQF.js +56 -0
- package/dist/chunk-XAFRTZQF.js.map +1 -0
- package/dist/chunk-XGX3UFLD.js +2 -0
- package/dist/chunk-XGX3UFLD.js.map +1 -0
- package/dist/chunk-XGXCMA5M.js +2 -0
- package/dist/chunk-XGXCMA5M.js.map +1 -0
- package/dist/chunk-XJQADN6S.js +41 -0
- package/dist/chunk-XJQADN6S.js.map +1 -0
- package/dist/chunk-XMZ5LXL4.js +68 -0
- package/dist/chunk-XMZ5LXL4.js.map +1 -0
- package/dist/chunk-XONGYCW3.js +637 -0
- package/dist/chunk-XONGYCW3.js.map +1 -0
- package/dist/chunk-XYACSO57.js +36 -0
- package/dist/chunk-XYACSO57.js.map +1 -0
- package/dist/chunk-XYFEQHEM.js +2 -0
- package/dist/chunk-XYFEQHEM.js.map +1 -0
- package/dist/chunk-XZ23AFOP.js +26 -0
- package/dist/chunk-XZ23AFOP.js.map +1 -0
- package/dist/chunk-YACASX6X.js +54 -0
- package/dist/chunk-YACASX6X.js.map +1 -0
- package/dist/chunk-YCFOFNQF.js +28 -0
- package/dist/chunk-YCFOFNQF.js.map +1 -0
- package/dist/chunk-YIFB24WW.js +37 -0
- package/dist/chunk-YIFB24WW.js.map +1 -0
- package/dist/chunk-YIVL6HWS.js +68 -0
- package/dist/chunk-YIVL6HWS.js.map +1 -0
- package/dist/chunk-YK4H7VWM.js +2 -0
- package/dist/chunk-YK4H7VWM.js.map +1 -0
- package/dist/chunk-YL7VBHPZ.js +100 -0
- package/dist/chunk-YL7VBHPZ.js.map +1 -0
- package/dist/chunk-YMFEBGTU.js +2 -0
- package/dist/chunk-YMFEBGTU.js.map +1 -0
- package/dist/chunk-YPLKH5H4.js +226 -0
- package/dist/chunk-YPLKH5H4.js.map +1 -0
- package/dist/chunk-YWB7HLL7.js +126 -0
- package/dist/chunk-YWB7HLL7.js.map +1 -0
- package/dist/chunk-YXHHUJOZ.js +235 -0
- package/dist/chunk-YXHHUJOZ.js.map +1 -0
- package/dist/chunk-YZVXIPBC.js +2 -0
- package/dist/chunk-YZVXIPBC.js.map +1 -0
- package/dist/chunk-Z44RRTMX.js +2 -0
- package/dist/chunk-Z44RRTMX.js.map +1 -0
- package/dist/chunk-Z4CYBG3H.js +2 -0
- package/dist/chunk-Z4CYBG3H.js.map +1 -0
- package/dist/chunk-ZE2H4J3P.js +2 -0
- package/dist/chunk-ZE2H4J3P.js.map +1 -0
- package/dist/chunk-ZEMTALKO.js +2 -0
- package/dist/chunk-ZEMTALKO.js.map +1 -0
- package/dist/chunk-ZI2OXD6L.js +244 -0
- package/dist/chunk-ZI2OXD6L.js.map +1 -0
- package/dist/chunk-ZNFHDBUW.js +266 -0
- package/dist/chunk-ZNFHDBUW.js.map +1 -0
- package/dist/chunk-ZXBUOHCR.js +111 -0
- package/dist/chunk-ZXBUOHCR.js.map +1 -0
- package/dist/chunk-ZXVPEQM5.js +2 -0
- package/dist/chunk-ZXVPEQM5.js.map +1 -0
- package/dist/components/accordion/accordion.js +16 -0
- package/dist/components/accordion/accordion.js.map +1 -0
- package/dist/components/accordion/index.js +17 -0
- package/dist/components/accordion/index.js.map +1 -0
- package/dist/components/advanced-group/advanced-group.js +18 -0
- package/dist/components/advanced-group/advanced-group.js.map +1 -0
- package/dist/components/advanced-group/index.js +18 -0
- package/dist/components/advanced-group/index.js.map +1 -0
- package/dist/components/alert/alert.js +16 -0
- package/dist/components/alert/alert.js.map +1 -0
- package/dist/components/alert/index.js +17 -0
- package/dist/components/alert/index.js.map +1 -0
- package/dist/components/alert-dialog/alert-dialog.js +30 -0
- package/dist/components/alert-dialog/alert-dialog.js.map +1 -0
- package/dist/components/alert-dialog/index.js +31 -0
- package/dist/components/alert-dialog/index.js.map +1 -0
- package/dist/components/ambient-field/ambient-field.css +59 -0
- package/dist/components/ambient-field/ambient-field.css.map +1 -0
- package/dist/components/ambient-field/ambient-field.js +15 -0
- package/dist/components/ambient-field/ambient-field.js.map +1 -0
- package/dist/components/ambient-field/index.css +59 -0
- package/dist/components/ambient-field/index.css.map +1 -0
- package/dist/components/ambient-field/index.js +16 -0
- package/dist/components/ambient-field/index.js.map +1 -0
- package/dist/components/app-shell/app-shell.js +14 -0
- package/dist/components/app-shell/app-shell.js.map +1 -0
- package/dist/components/app-shell/index.js +15 -0
- package/dist/components/app-shell/index.js.map +1 -0
- package/dist/components/app-sidebar/app-sidebar.js +31 -0
- package/dist/components/app-sidebar/app-sidebar.js.map +1 -0
- package/dist/components/app-sidebar/index.js +31 -0
- package/dist/components/app-sidebar/index.js.map +1 -0
- package/dist/components/aspect-ratio/aspect-ratio.js +9 -0
- package/dist/components/aspect-ratio/aspect-ratio.js.map +1 -0
- package/dist/components/aspect-ratio/index.js +10 -0
- package/dist/components/aspect-ratio/index.js.map +1 -0
- package/dist/components/attribution-panel/attribution-panel.js +24 -0
- package/dist/components/attribution-panel/attribution-panel.js.map +1 -0
- package/dist/components/attribution-panel/attribution-types.js +2 -0
- package/dist/components/attribution-panel/attribution-types.js.map +1 -0
- package/dist/components/attribution-panel/attributions.generated.js +9 -0
- package/dist/components/attribution-panel/attributions.generated.js.map +1 -0
- package/dist/components/attribution-panel/index.js +24 -0
- package/dist/components/attribution-panel/index.js.map +1 -0
- package/dist/components/avatar/avatar.js +14 -0
- package/dist/components/avatar/avatar.js.map +1 -0
- package/dist/components/avatar/index.js +15 -0
- package/dist/components/avatar/index.js.map +1 -0
- package/dist/components/badge/badge.js +16 -0
- package/dist/components/badge/badge.js.map +1 -0
- package/dist/components/badge/index.js +13 -0
- package/dist/components/badge/index.js.map +1 -0
- package/dist/components/bento-grid/bento-grid.js +16 -0
- package/dist/components/bento-grid/bento-grid.js.map +1 -0
- package/dist/components/bento-grid/index.js +16 -0
- package/dist/components/bento-grid/index.js.map +1 -0
- package/dist/components/bounded-number/bounded-number.js +24 -0
- package/dist/components/bounded-number/bounded-number.js.map +1 -0
- package/dist/components/bounded-number/index.js +24 -0
- package/dist/components/bounded-number/index.js.map +1 -0
- package/dist/components/breadcrumb/breadcrumb.js +28 -0
- package/dist/components/breadcrumb/breadcrumb.js.map +1 -0
- package/dist/components/breadcrumb/index.js +26 -0
- package/dist/components/breadcrumb/index.js.map +1 -0
- package/dist/components/button/button.js +12 -0
- package/dist/components/button/button.js.map +1 -0
- package/dist/components/button/index.js +13 -0
- package/dist/components/button/index.js.map +1 -0
- package/dist/components/button-group/button-group.js +18 -0
- package/dist/components/button-group/button-group.js.map +1 -0
- package/dist/components/button-group/index.js +19 -0
- package/dist/components/button-group/index.js.map +1 -0
- package/dist/components/calendar/calendar.js +12 -0
- package/dist/components/calendar/calendar.js.map +1 -0
- package/dist/components/calendar/index.js +13 -0
- package/dist/components/calendar/index.js.map +1 -0
- package/dist/components/card/card.js +27 -0
- package/dist/components/card/card.js.map +1 -0
- package/dist/components/card/index.js +27 -0
- package/dist/components/card/index.js.map +1 -0
- package/dist/components/carousel/carousel.js +24 -0
- package/dist/components/carousel/carousel.js.map +1 -0
- package/dist/components/carousel/index.js +24 -0
- package/dist/components/carousel/index.js.map +1 -0
- package/dist/components/change-review/change-review.js +34 -0
- package/dist/components/change-review/change-review.js.map +1 -0
- package/dist/components/change-review/index.js +34 -0
- package/dist/components/change-review/index.js.map +1 -0
- package/dist/components/checkbox/checkbox.js +10 -0
- package/dist/components/checkbox/checkbox.js.map +1 -0
- package/dist/components/checkbox/index.js +11 -0
- package/dist/components/checkbox/index.js.map +1 -0
- package/dist/components/collapsible/collapsible.js +14 -0
- package/dist/components/collapsible/collapsible.js.map +1 -0
- package/dist/components/collapsible/index.js +15 -0
- package/dist/components/collapsible/index.js.map +1 -0
- package/dist/components/collapsible-panel/index.js +11 -0
- package/dist/components/collapsible-panel/index.js.map +1 -0
- package/dist/components/collapsible-panel/use-collapsible-panel.js +11 -0
- package/dist/components/collapsible-panel/use-collapsible-panel.js.map +1 -0
- package/dist/components/color-picker/color-picker.js +18 -0
- package/dist/components/color-picker/color-picker.js.map +1 -0
- package/dist/components/color-picker/index.js +18 -0
- package/dist/components/color-picker/index.js.map +1 -0
- package/dist/components/combobox/combobox.js +28 -0
- package/dist/components/combobox/combobox.js.map +1 -0
- package/dist/components/combobox/index.js +28 -0
- package/dist/components/combobox/index.js.map +1 -0
- package/dist/components/command/command.js +39 -0
- package/dist/components/command/command.js.map +1 -0
- package/dist/components/command/index.js +39 -0
- package/dist/components/command/index.js.map +1 -0
- package/dist/components/command-chip/command-chip.js +17 -0
- package/dist/components/command-chip/command-chip.js.map +1 -0
- package/dist/components/command-chip/index.js +17 -0
- package/dist/components/command-chip/index.js.map +1 -0
- package/dist/components/command-trigger/command-trigger.js +12 -0
- package/dist/components/command-trigger/command-trigger.js.map +1 -0
- package/dist/components/command-trigger/index.js +13 -0
- package/dist/components/command-trigger/index.js.map +1 -0
- package/dist/components/confirm-dialog/confirm-dialog.js +20 -0
- package/dist/components/confirm-dialog/confirm-dialog.js.map +1 -0
- package/dist/components/confirm-dialog/index.js +20 -0
- package/dist/components/confirm-dialog/index.js.map +1 -0
- package/dist/components/context-menu/context-menu.js +36 -0
- package/dist/components/context-menu/context-menu.js.map +1 -0
- package/dist/components/context-menu/index.js +37 -0
- package/dist/components/context-menu/index.js.map +1 -0
- package/dist/components/context-rail/context-rail.js +35 -0
- package/dist/components/context-rail/context-rail.js.map +1 -0
- package/dist/components/context-rail/index.js +35 -0
- package/dist/components/context-rail/index.js.map +1 -0
- package/dist/components/copyable-value/copyable-value.js +19 -0
- package/dist/components/copyable-value/copyable-value.js.map +1 -0
- package/dist/components/copyable-value/index.js +17 -0
- package/dist/components/copyable-value/index.js.map +1 -0
- package/dist/components/date-picker/date-picker.js +21 -0
- package/dist/components/date-picker/date-picker.js.map +1 -0
- package/dist/components/date-picker/index.js +21 -0
- package/dist/components/date-picker/index.js.map +1 -0
- package/dist/components/date-range-picker/date-range-picker.js +22 -0
- package/dist/components/date-range-picker/date-range-picker.js.map +1 -0
- package/dist/components/date-range-picker/index.js +22 -0
- package/dist/components/date-range-picker/index.js.map +1 -0
- package/dist/components/descriptions/descriptions.js +12 -0
- package/dist/components/descriptions/descriptions.js.map +1 -0
- package/dist/components/descriptions/index.js +13 -0
- package/dist/components/descriptions/index.js.map +1 -0
- package/dist/components/dialog/dialog.js +41 -0
- package/dist/components/dialog/dialog.js.map +1 -0
- package/dist/components/dialog/index.js +45 -0
- package/dist/components/dialog/index.js.map +1 -0
- package/dist/components/dialog/use-dialog-dismiss-guard.js +10 -0
- package/dist/components/dialog/use-dialog-dismiss-guard.js.map +1 -0
- package/dist/components/drawer/drawer.js +26 -0
- package/dist/components/drawer/drawer.js.map +1 -0
- package/dist/components/drawer/index.js +27 -0
- package/dist/components/drawer/index.js.map +1 -0
- package/dist/components/dropdown-menu/dropdown-menu.js +38 -0
- package/dist/components/dropdown-menu/dropdown-menu.js.map +1 -0
- package/dist/components/dropdown-menu/index.js +39 -0
- package/dist/components/dropdown-menu/index.js.map +1 -0
- package/dist/components/empty-state/empty-state.js +15 -0
- package/dist/components/empty-state/empty-state.js.map +1 -0
- package/dist/components/empty-state/index.js +16 -0
- package/dist/components/empty-state/index.js.map +1 -0
- package/dist/components/error-state/error-state.js +15 -0
- package/dist/components/error-state/error-state.js.map +1 -0
- package/dist/components/error-state/index.js +16 -0
- package/dist/components/error-state/index.js.map +1 -0
- package/dist/components/expand-dialog/expand-dialog.js +28 -0
- package/dist/components/expand-dialog/expand-dialog.js.map +1 -0
- package/dist/components/expand-dialog/index.js +28 -0
- package/dist/components/expand-dialog/index.js.map +1 -0
- package/dist/components/field/field-context.js +11 -0
- package/dist/components/field/field-context.js.map +1 -0
- package/dist/components/field/field.js +23 -0
- package/dist/components/field/field.js.map +1 -0
- package/dist/components/field/index.js +23 -0
- package/dist/components/field/index.js.map +1 -0
- package/dist/components/field-row/field-row.js +14 -0
- package/dist/components/field-row/field-row.js.map +1 -0
- package/dist/components/field-row/index.js +14 -0
- package/dist/components/field-row/index.js.map +1 -0
- package/dist/components/file-upload/file-upload.js +28 -0
- package/dist/components/file-upload/file-upload.js.map +1 -0
- package/dist/components/file-upload/index.js +26 -0
- package/dist/components/file-upload/index.js.map +1 -0
- package/dist/components/form/form.js +27 -0
- package/dist/components/form/form.js.map +1 -0
- package/dist/components/hover-card/hover-card.js +14 -0
- package/dist/components/hover-card/hover-card.js.map +1 -0
- package/dist/components/hover-card/index.js +15 -0
- package/dist/components/hover-card/index.js.map +1 -0
- package/dist/components/icon-button/icon-button.js +14 -0
- package/dist/components/icon-button/icon-button.js.map +1 -0
- package/dist/components/icon-button/index.js +15 -0
- package/dist/components/icon-button/index.js.map +1 -0
- package/dist/components/input/index.js +11 -0
- package/dist/components/input/index.js.map +1 -0
- package/dist/components/input/input.js +10 -0
- package/dist/components/input/input.js.map +1 -0
- package/dist/components/input-group/index.js +31 -0
- package/dist/components/input-group/index.js.map +1 -0
- package/dist/components/input-group/input-group.js +30 -0
- package/dist/components/input-group/input-group.js.map +1 -0
- package/dist/components/input-otp/index.js +17 -0
- package/dist/components/input-otp/index.js.map +1 -0
- package/dist/components/input-otp/input-otp.js +17 -0
- package/dist/components/input-otp/input-otp.js.map +1 -0
- package/dist/components/install-tabs/index.js +28 -0
- package/dist/components/install-tabs/index.js.map +1 -0
- package/dist/components/install-tabs/install-tabs.js +28 -0
- package/dist/components/install-tabs/install-tabs.js.map +1 -0
- package/dist/components/integration-matrix/index.js +26 -0
- package/dist/components/integration-matrix/index.js.map +1 -0
- package/dist/components/integration-matrix/integration-matrix.js +26 -0
- package/dist/components/integration-matrix/integration-matrix.js.map +1 -0
- package/dist/components/kbd/index.js +11 -0
- package/dist/components/kbd/index.js.map +1 -0
- package/dist/components/kbd/kbd.js +10 -0
- package/dist/components/kbd/kbd.js.map +1 -0
- package/dist/components/key-value-editor/index.js +18 -0
- package/dist/components/key-value-editor/index.js.map +1 -0
- package/dist/components/key-value-editor/key-value-editor.js +18 -0
- package/dist/components/key-value-editor/key-value-editor.js.map +1 -0
- package/dist/components/keyboard-shortcuts/index.js +25 -0
- package/dist/components/keyboard-shortcuts/index.js.map +1 -0
- package/dist/components/keyboard-shortcuts/keyboard-shortcuts.js +25 -0
- package/dist/components/keyboard-shortcuts/keyboard-shortcuts.js.map +1 -0
- package/dist/components/label/index.js +11 -0
- package/dist/components/label/index.js.map +1 -0
- package/dist/components/label/label.js +10 -0
- package/dist/components/label/label.js.map +1 -0
- package/dist/components/link-preview/index.js +14 -0
- package/dist/components/link-preview/index.js.map +1 -0
- package/dist/components/link-preview/link-preview.js +14 -0
- package/dist/components/link-preview/link-preview.js.map +1 -0
- package/dist/components/list-editor/index.js +18 -0
- package/dist/components/list-editor/index.js.map +1 -0
- package/dist/components/list-editor/list-editor.js +18 -0
- package/dist/components/list-editor/list-editor.js.map +1 -0
- package/dist/components/loading-state/index.js +16 -0
- package/dist/components/loading-state/index.js.map +1 -0
- package/dist/components/loading-state/loading-state.js +15 -0
- package/dist/components/loading-state/loading-state.js.map +1 -0
- package/dist/components/locale-provider/index.js +16 -0
- package/dist/components/locale-provider/index.js.map +1 -0
- package/dist/components/locale-provider/locale-provider.js +13 -0
- package/dist/components/locale-provider/locale-provider.js.map +1 -0
- package/dist/components/locale-provider/messages.js +10 -0
- package/dist/components/locale-provider/messages.js.map +1 -0
- package/dist/components/match-highlight/index.js +15 -0
- package/dist/components/match-highlight/index.js.map +1 -0
- package/dist/components/match-highlight/match-highlight.js +14 -0
- package/dist/components/match-highlight/match-highlight.js.map +1 -0
- package/dist/components/mention-input/index.js +46 -0
- package/dist/components/mention-input/index.js.map +1 -0
- package/dist/components/mention-input/mention-input.js +33 -0
- package/dist/components/mention-input/mention-input.js.map +1 -0
- package/dist/components/mention-input/mention-value.js +20 -0
- package/dist/components/mention-input/mention-value.js.map +1 -0
- package/dist/components/menubar/index.js +39 -0
- package/dist/components/menubar/index.js.map +1 -0
- package/dist/components/menubar/menubar.js +38 -0
- package/dist/components/menubar/menubar.js.map +1 -0
- package/dist/components/meter/index.js +15 -0
- package/dist/components/meter/index.js.map +1 -0
- package/dist/components/meter/meter.js +15 -0
- package/dist/components/meter/meter.js.map +1 -0
- package/dist/components/metric-card/index.js +24 -0
- package/dist/components/metric-card/index.js.map +1 -0
- package/dist/components/metric-card/metric-card.js +24 -0
- package/dist/components/metric-card/metric-card.js.map +1 -0
- package/dist/components/model-picker/index.js +37 -0
- package/dist/components/model-picker/index.js.map +1 -0
- package/dist/components/model-picker/model-picker-state.js +13 -0
- package/dist/components/model-picker/model-picker-state.js.map +1 -0
- package/dist/components/model-picker/model-picker.js +37 -0
- package/dist/components/model-picker/model-picker.js.map +1 -0
- package/dist/components/nav-main/index.js +33 -0
- package/dist/components/nav-main/index.js.map +1 -0
- package/dist/components/nav-main/nav-main.js +33 -0
- package/dist/components/nav-main/nav-main.js.map +1 -0
- package/dist/components/nav-notifications/index.js +20 -0
- package/dist/components/nav-notifications/index.js.map +1 -0
- package/dist/components/nav-notifications/nav-notifications.js +20 -0
- package/dist/components/nav-notifications/nav-notifications.js.map +1 -0
- package/dist/components/nav-user/index.js +35 -0
- package/dist/components/nav-user/index.js.map +1 -0
- package/dist/components/nav-user/nav-user.js +35 -0
- package/dist/components/nav-user/nav-user.js.map +1 -0
- package/dist/components/navigation-menu/index.js +25 -0
- package/dist/components/navigation-menu/index.js.map +1 -0
- package/dist/components/navigation-menu/navigation-menu.js +25 -0
- package/dist/components/navigation-menu/navigation-menu.js.map +1 -0
- package/dist/components/number-input/index.js +22 -0
- package/dist/components/number-input/index.js.map +1 -0
- package/dist/components/number-input/number-input.js +22 -0
- package/dist/components/number-input/number-input.js.map +1 -0
- package/dist/components/page-shell/index.js +11 -0
- package/dist/components/page-shell/index.js.map +1 -0
- package/dist/components/page-shell/page-shell.js +10 -0
- package/dist/components/page-shell/page-shell.js.map +1 -0
- package/dist/components/pagination/index.js +28 -0
- package/dist/components/pagination/index.js.map +1 -0
- package/dist/components/pagination/pagination.js +28 -0
- package/dist/components/pagination/pagination.js.map +1 -0
- package/dist/components/parallax-plane/index.css +17 -0
- package/dist/components/parallax-plane/index.css.map +1 -0
- package/dist/components/parallax-plane/index.js +18 -0
- package/dist/components/parallax-plane/index.js.map +1 -0
- package/dist/components/parallax-plane/parallax-plane.css +17 -0
- package/dist/components/parallax-plane/parallax-plane.css.map +1 -0
- package/dist/components/parallax-plane/parallax-plane.js +18 -0
- package/dist/components/parallax-plane/parallax-plane.js.map +1 -0
- package/dist/components/popover/index.js +17 -0
- package/dist/components/popover/index.js.map +1 -0
- package/dist/components/popover/popover.js +16 -0
- package/dist/components/popover/popover.js.map +1 -0
- package/dist/components/progress/index.js +13 -0
- package/dist/components/progress/index.js.map +1 -0
- package/dist/components/progress/progress.js +12 -0
- package/dist/components/progress/progress.js.map +1 -0
- package/dist/components/radio-group/index.js +13 -0
- package/dist/components/radio-group/index.js.map +1 -0
- package/dist/components/radio-group/radio-group.js +12 -0
- package/dist/components/radio-group/radio-group.js.map +1 -0
- package/dist/components/rating/index.js +11 -0
- package/dist/components/rating/index.js.map +1 -0
- package/dist/components/rating/rating.js +11 -0
- package/dist/components/rating/rating.js.map +1 -0
- package/dist/components/resizable/index.js +15 -0
- package/dist/components/resizable/index.js.map +1 -0
- package/dist/components/resizable/resizable.js +14 -0
- package/dist/components/resizable/resizable.js.map +1 -0
- package/dist/components/reveal/index.js +15 -0
- package/dist/components/reveal/index.js.map +1 -0
- package/dist/components/reveal/reveal.js +14 -0
- package/dist/components/reveal/reveal.js.map +1 -0
- package/dist/components/reveal-on-enter/index.css +21 -0
- package/dist/components/reveal-on-enter/index.css.map +1 -0
- package/dist/components/reveal-on-enter/index.js +12 -0
- package/dist/components/reveal-on-enter/index.js.map +1 -0
- package/dist/components/reveal-on-enter/reveal-on-enter.css +21 -0
- package/dist/components/reveal-on-enter/reveal-on-enter.css.map +1 -0
- package/dist/components/reveal-on-enter/reveal-on-enter.js +12 -0
- package/dist/components/reveal-on-enter/reveal-on-enter.js.map +1 -0
- package/dist/components/revision-timeline/index.js +18 -0
- package/dist/components/revision-timeline/index.js.map +1 -0
- package/dist/components/revision-timeline/revision-timeline.js +18 -0
- package/dist/components/revision-timeline/revision-timeline.js.map +1 -0
- package/dist/components/schema-form/from-json-schema.js +13 -0
- package/dist/components/schema-form/from-json-schema.js.map +1 -0
- package/dist/components/schema-form/index.js +140 -0
- package/dist/components/schema-form/index.js.map +1 -0
- package/dist/components/schema-form/schema-form-spec.js +63 -0
- package/dist/components/schema-form/schema-form-spec.js.map +1 -0
- package/dist/components/schema-form/schema-form-store.js +21 -0
- package/dist/components/schema-form/schema-form-store.js.map +1 -0
- package/dist/components/schema-form/schema-form.js +77 -0
- package/dist/components/schema-form/schema-form.js.map +1 -0
- package/dist/components/scroll-area/index.js +13 -0
- package/dist/components/scroll-area/index.js.map +1 -0
- package/dist/components/scroll-area/scroll-area.js +12 -0
- package/dist/components/scroll-area/scroll-area.js.map +1 -0
- package/dist/components/section-header/index.js +11 -0
- package/dist/components/section-header/index.js.map +1 -0
- package/dist/components/section-header/section-header.js +10 -0
- package/dist/components/section-header/section-header.js.map +1 -0
- package/dist/components/segmented-field/index.js +17 -0
- package/dist/components/segmented-field/index.js.map +1 -0
- package/dist/components/segmented-field/segmented-field.js +17 -0
- package/dist/components/segmented-field/segmented-field.js.map +1 -0
- package/dist/components/select/index.js +26 -0
- package/dist/components/select/index.js.map +1 -0
- package/dist/components/select/select.js +26 -0
- package/dist/components/select/select.js.map +1 -0
- package/dist/components/separator/index.js +11 -0
- package/dist/components/separator/index.js.map +1 -0
- package/dist/components/separator/separator.js +10 -0
- package/dist/components/separator/separator.js.map +1 -0
- package/dist/components/sheet/index.js +30 -0
- package/dist/components/sheet/index.js.map +1 -0
- package/dist/components/sheet/sheet.js +30 -0
- package/dist/components/sheet/sheet.js.map +1 -0
- package/dist/components/side-dock/index.js +20 -0
- package/dist/components/side-dock/index.js.map +1 -0
- package/dist/components/side-dock/side-dock.js +20 -0
- package/dist/components/side-dock/side-dock.js.map +1 -0
- package/dist/components/sidebar/index.js +77 -0
- package/dist/components/sidebar/index.js.map +1 -0
- package/dist/components/sidebar/sidebar.js +77 -0
- package/dist/components/sidebar/sidebar.js.map +1 -0
- package/dist/components/skeleton/index.js +11 -0
- package/dist/components/skeleton/index.js.map +1 -0
- package/dist/components/skeleton/skeleton.js +10 -0
- package/dist/components/skeleton/skeleton.js.map +1 -0
- package/dist/components/skip-link/index.js +11 -0
- package/dist/components/skip-link/index.js.map +1 -0
- package/dist/components/skip-link/skip-link.js +10 -0
- package/dist/components/skip-link/skip-link.js.map +1 -0
- package/dist/components/slider/index.js +11 -0
- package/dist/components/slider/index.js.map +1 -0
- package/dist/components/slider/slider.js +10 -0
- package/dist/components/slider/slider.js.map +1 -0
- package/dist/components/slider-number/index.js +26 -0
- package/dist/components/slider-number/index.js.map +1 -0
- package/dist/components/slider-number/slider-number.js +26 -0
- package/dist/components/slider-number/slider-number.js.map +1 -0
- package/dist/components/sonner/index.js +13 -0
- package/dist/components/sonner/index.js.map +1 -0
- package/dist/components/sonner/sonner.js +13 -0
- package/dist/components/sonner/sonner.js.map +1 -0
- package/dist/components/spec-playground/index.js +23 -0
- package/dist/components/spec-playground/index.js.map +1 -0
- package/dist/components/spec-playground/locate-json-path.js +17 -0
- package/dist/components/spec-playground/locate-json-path.js.map +1 -0
- package/dist/components/spec-playground/spec-playground.js +23 -0
- package/dist/components/spec-playground/spec-playground.js.map +1 -0
- package/dist/components/spinner/index.js +14 -0
- package/dist/components/spinner/index.js.map +1 -0
- package/dist/components/spinner/spinner.js +14 -0
- package/dist/components/spinner/spinner.js.map +1 -0
- package/dist/components/split-panel/index.js +13 -0
- package/dist/components/split-panel/index.js.map +1 -0
- package/dist/components/split-panel/split-panel.js +12 -0
- package/dist/components/split-panel/split-panel.js.map +1 -0
- package/dist/components/state-panel/index.js +17 -0
- package/dist/components/state-panel/index.js.map +1 -0
- package/dist/components/state-panel/state-panel.js +17 -0
- package/dist/components/state-panel/state-panel.js.map +1 -0
- package/dist/components/status-badge/index.js +30 -0
- package/dist/components/status-badge/index.js.map +1 -0
- package/dist/components/status-badge/status-badge.js +29 -0
- package/dist/components/status-badge/status-badge.js.map +1 -0
- package/dist/components/surface-tour/index.css +21 -0
- package/dist/components/surface-tour/index.css.map +1 -0
- package/dist/components/surface-tour/index.js +36 -0
- package/dist/components/surface-tour/index.js.map +1 -0
- package/dist/components/surface-tour/surface-tour.css +21 -0
- package/dist/components/surface-tour/surface-tour.css.map +1 -0
- package/dist/components/surface-tour/surface-tour.js +36 -0
- package/dist/components/surface-tour/surface-tour.js.map +1 -0
- package/dist/components/switch/index.js +11 -0
- package/dist/components/switch/index.js.map +1 -0
- package/dist/components/switch/switch.js +10 -0
- package/dist/components/switch/switch.js.map +1 -0
- package/dist/components/table/index.js +28 -0
- package/dist/components/table/index.js.map +1 -0
- package/dist/components/table/table.js +28 -0
- package/dist/components/table/table.js.map +1 -0
- package/dist/components/tabs/index.js +22 -0
- package/dist/components/tabs/index.js.map +1 -0
- package/dist/components/tabs/tabs.js +22 -0
- package/dist/components/tabs/tabs.js.map +1 -0
- package/dist/components/tag-input/index.js +21 -0
- package/dist/components/tag-input/index.js.map +1 -0
- package/dist/components/tag-input/tag-input.js +21 -0
- package/dist/components/tag-input/tag-input.js.map +1 -0
- package/dist/components/team-switcher/index.js +33 -0
- package/dist/components/team-switcher/index.js.map +1 -0
- package/dist/components/team-switcher/team-switcher.js +33 -0
- package/dist/components/team-switcher/team-switcher.js.map +1 -0
- package/dist/components/textarea/index.js +11 -0
- package/dist/components/textarea/index.js.map +1 -0
- package/dist/components/textarea/textarea.js +10 -0
- package/dist/components/textarea/textarea.js.map +1 -0
- package/dist/components/theme-family-switch/index.js +19 -0
- package/dist/components/theme-family-switch/index.js.map +1 -0
- package/dist/components/theme-family-switch/theme-family-switch.js +19 -0
- package/dist/components/theme-family-switch/theme-family-switch.js.map +1 -0
- package/dist/components/theme-switcher/index.js +24 -0
- package/dist/components/theme-switcher/index.js.map +1 -0
- package/dist/components/theme-switcher/theme-switcher.js +21 -0
- package/dist/components/theme-switcher/theme-switcher.js.map +1 -0
- package/dist/components/theme-switcher/use-theme-transition.js +10 -0
- package/dist/components/theme-switcher/use-theme-transition.js.map +1 -0
- package/dist/components/timeline/index.js +18 -0
- package/dist/components/timeline/index.js.map +1 -0
- package/dist/components/timeline/timeline.js +19 -0
- package/dist/components/timeline/timeline.js.map +1 -0
- package/dist/components/toggle/index.js +13 -0
- package/dist/components/toggle/index.js.map +1 -0
- package/dist/components/toggle/toggle.js +12 -0
- package/dist/components/toggle/toggle.js.map +1 -0
- package/dist/components/toggle-group/index.js +15 -0
- package/dist/components/toggle-group/index.js.map +1 -0
- package/dist/components/toggle-group/toggle-group.js +15 -0
- package/dist/components/toggle-group/toggle-group.js.map +1 -0
- package/dist/components/token-spotlight/index.css +25 -0
- package/dist/components/token-spotlight/index.css.map +1 -0
- package/dist/components/token-spotlight/index.js +23 -0
- package/dist/components/token-spotlight/index.js.map +1 -0
- package/dist/components/token-spotlight/token-spotlight.css +25 -0
- package/dist/components/token-spotlight/token-spotlight.css.map +1 -0
- package/dist/components/token-spotlight/token-spotlight.js +23 -0
- package/dist/components/token-spotlight/token-spotlight.js.map +1 -0
- package/dist/components/token-spotlight/token-value-format.js +11 -0
- package/dist/components/token-spotlight/token-value-format.js.map +1 -0
- package/dist/components/toolbar/index.js +27 -0
- package/dist/components/toolbar/index.js.map +1 -0
- package/dist/components/toolbar/toolbar.js +27 -0
- package/dist/components/toolbar/toolbar.js.map +1 -0
- package/dist/components/tooltip/index.js +17 -0
- package/dist/components/tooltip/index.js.map +1 -0
- package/dist/components/tooltip/tooltip.js +16 -0
- package/dist/components/tooltip/tooltip.js.map +1 -0
- package/dist/components/top-nav/index.js +11 -0
- package/dist/components/top-nav/index.js.map +1 -0
- package/dist/components/top-nav/top-nav.js +10 -0
- package/dist/components/top-nav/top-nav.js.map +1 -0
- package/dist/components/transfer/index.js +26 -0
- package/dist/components/transfer/index.js.map +1 -0
- package/dist/components/transfer/transfer.js +26 -0
- package/dist/components/transfer/transfer.js.map +1 -0
- package/dist/components/tree/index.js +21 -0
- package/dist/components/tree/index.js.map +1 -0
- package/dist/components/tree/tree.js +18 -0
- package/dist/components/tree/tree.js.map +1 -0
- package/dist/components/tree/use-tree-keyboard.js +14 -0
- package/dist/components/tree/use-tree-keyboard.js.map +1 -0
- package/dist/components/tree-select/index.js +26 -0
- package/dist/components/tree-select/index.js.map +1 -0
- package/dist/components/tree-select/tree-select.js +26 -0
- package/dist/components/tree-select/tree-select.js.map +1 -0
- package/dist/components/typography/index.js +41 -0
- package/dist/components/typography/index.js.map +1 -0
- package/dist/components/typography/prose.js +29 -0
- package/dist/components/typography/prose.js.map +1 -0
- package/dist/components/typography/typography.js +18 -0
- package/dist/components/typography/typography.js.map +1 -0
- package/dist/components/view-toolbar/index.js +27 -0
- package/dist/components/view-toolbar/index.js.map +1 -0
- package/dist/components/view-toolbar/view-toolbar.js +27 -0
- package/dist/components/view-toolbar/view-toolbar.js.map +1 -0
- package/dist/components/virtual-select/index.js +26 -0
- package/dist/components/virtual-select/index.js.map +1 -0
- package/dist/components/virtual-select/use-virtual-listbox.js +10 -0
- package/dist/components/virtual-select/use-virtual-listbox.js.map +1 -0
- package/dist/components/virtual-select/virtual-select.js +23 -0
- package/dist/components/virtual-select/virtual-select.js.map +1 -0
- package/dist/components/wizard/index.js +19 -0
- package/dist/components/wizard/index.js.map +1 -0
- package/dist/components/wizard/wizard.js +19 -0
- package/dist/components/wizard/wizard.js.map +1 -0
- package/dist/components/workspace-picker/index.js +38 -0
- package/dist/components/workspace-picker/index.js.map +1 -0
- package/dist/components/workspace-picker/workspace-picker-state.js +9 -0
- package/dist/components/workspace-picker/workspace-picker-state.js.map +1 -0
- package/dist/components/workspace-picker/workspace-picker.js +35 -0
- package/dist/components/workspace-picker/workspace-picker.js.map +1 -0
- package/dist/form.js +13 -110
- package/dist/form.js.map +1 -1
- package/dist/illustrations/empty-list-illustration.js +11 -0
- package/dist/illustrations/empty-list-illustration.js.map +1 -0
- package/dist/illustrations/error-illustration.js +11 -0
- package/dist/illustrations/error-illustration.js.map +1 -0
- package/dist/illustrations/first-run-illustration.js +11 -0
- package/dist/illustrations/first-run-illustration.js.map +1 -0
- package/dist/illustrations/illustration-base.js +16 -0
- package/dist/illustrations/illustration-base.js.map +1 -0
- package/dist/illustrations/index.js +41 -0
- package/dist/illustrations/index.js.map +1 -0
- package/dist/illustrations/no-access-illustration.js +11 -0
- package/dist/illustrations/no-access-illustration.js.map +1 -0
- package/dist/illustrations/no-results-illustration.js +11 -0
- package/dist/illustrations/no-results-illustration.js.map +1 -0
- package/dist/illustrations/offline-illustration.js +11 -0
- package/dist/illustrations/offline-illustration.js.map +1 -0
- package/dist/illustrations/success-illustration.js +11 -0
- package/dist/illustrations/success-illustration.js.map +1 -0
- package/dist/index.css +122 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.ts +1390 -146
- package/dist/index.js +997 -22676
- package/dist/index.js.map +1 -1
- package/dist/lib/agent-event-model.js +9 -0
- package/dist/lib/agent-event-model.js.map +1 -0
- package/dist/lib/approval-option.js +9 -0
- package/dist/lib/approval-option.js.map +1 -0
- package/dist/lib/check-result.js +3 -0
- package/dist/lib/check-result.js.map +1 -0
- package/dist/lib/cn.js +28 -3
- package/dist/lib/cn.js.map +1 -1
- package/dist/lib/color-scale.js +11 -0
- package/dist/lib/color-scale.js.map +1 -0
- package/dist/lib/compact-number.js +21 -0
- package/dist/lib/compact-number.js.map +1 -0
- package/dist/lib/csv.js +11 -0
- package/dist/lib/csv.js.map +1 -0
- package/dist/lib/diff-line.js +11 -0
- package/dist/lib/diff-line.js.map +1 -0
- package/dist/lib/diff-rows.js +12 -0
- package/dist/lib/diff-rows.js.map +1 -0
- package/dist/lib/document-address.js +13 -0
- package/dist/lib/document-address.js.map +1 -0
- package/dist/lib/download.js +11 -0
- package/dist/lib/download.js.map +1 -0
- package/dist/lib/file-icon.js +12 -0
- package/dist/lib/file-icon.js.map +1 -0
- package/dist/lib/file-kind.js +13 -0
- package/dist/lib/file-kind.js.map +1 -0
- package/dist/lib/file-source.js +10 -0
- package/dist/lib/file-source.js.map +1 -0
- package/dist/lib/format-duration.js +9 -0
- package/dist/lib/format-duration.js.map +1 -0
- package/dist/lib/has-renderable-content.js +9 -0
- package/dist/lib/has-renderable-content.js.map +1 -0
- package/dist/lib/merge-refs.js +10 -0
- package/dist/lib/merge-refs.js.map +1 -0
- package/dist/lib/operating-mode.js +9 -0
- package/dist/lib/operating-mode.js.map +1 -0
- package/dist/lib/optional-peer.js +11 -0
- package/dist/lib/optional-peer.js.map +1 -0
- package/dist/lib/session-launch.js +3 -0
- package/dist/lib/session-launch.js.map +1 -0
- package/dist/lib/slash-command.js +11 -0
- package/dist/lib/slash-command.js.map +1 -0
- package/dist/lib/streamdown-translations.js +15 -0
- package/dist/lib/streamdown-translations.js.map +1 -0
- package/dist/lib/trigger-query.js +11 -0
- package/dist/lib/trigger-query.js.map +1 -0
- package/dist/lib/use-controllable-state.js +10 -0
- package/dist/lib/use-controllable-state.js.map +1 -0
- package/dist/lib/use-copy-to-clipboard.js +12 -0
- package/dist/lib/use-copy-to-clipboard.js.map +1 -0
- package/dist/lib/use-mobile.js +10 -0
- package/dist/lib/use-mobile.js.map +1 -0
- package/dist/lib/use-scroll-progress.js +18 -0
- package/dist/lib/use-scroll-progress.js.map +1 -0
- package/package.json +12 -5
- package/src/__contract__/ambient-field.contract.test.tsx +49 -0
- package/src/__contract__/attribution-panel.contract.test.tsx +49 -0
- package/src/__contract__/badge.contract.test.tsx +49 -0
- package/src/__contract__/bounded-number.contract.test.tsx +49 -0
- package/src/__contract__/button.contract.test.tsx +49 -0
- package/src/__contract__/color-picker.contract.test.tsx +49 -0
- package/src/__contract__/combobox.contract.test.tsx +49 -0
- package/src/__contract__/command-chip.contract.test.tsx +49 -0
- package/src/__contract__/command-trigger.contract.test.tsx +49 -0
- package/src/__contract__/copyable-value.contract.test.tsx +49 -0
- package/src/__contract__/date-picker.contract.test.tsx +49 -0
- package/src/__contract__/date-range-picker.contract.test.tsx +49 -0
- package/src/__contract__/empty-state.contract.test.tsx +49 -0
- package/src/__contract__/error-state.contract.test.tsx +49 -0
- package/src/__contract__/icon-button.contract.test.tsx +49 -0
- package/src/__contract__/input.contract.test.tsx +49 -0
- package/src/__contract__/install-tabs.contract.test.tsx +49 -0
- package/src/__contract__/integration-matrix.contract.test.tsx +49 -0
- package/src/__contract__/key-value-editor.contract.test.tsx +49 -0
- package/src/__contract__/list-editor.contract.test.tsx +49 -0
- package/src/__contract__/loading-state.contract.test.tsx +49 -0
- package/src/__contract__/meter.contract.test.tsx +49 -0
- package/src/__contract__/metric-card.contract.test.tsx +49 -0
- package/src/__contract__/model-picker.contract.test.tsx +49 -0
- package/src/__contract__/nav-notifications.contract.test.tsx +49 -0
- package/src/__contract__/number-input.contract.test.tsx +49 -0
- package/src/__contract__/parallax-plane.contract.test.tsx +49 -0
- package/src/__contract__/rating.contract.test.tsx +49 -0
- package/src/__contract__/reveal-on-enter.contract.test.tsx +49 -0
- package/src/__contract__/schema-form.contract.test.tsx +49 -0
- package/src/__contract__/section-header.contract.test.tsx +49 -0
- package/src/__contract__/segmented-field.contract.test.tsx +49 -0
- package/src/__contract__/slider-number.contract.test.tsx +49 -0
- package/src/__contract__/spec-playground.contract.test.tsx +49 -0
- package/src/__contract__/status-badge.contract.test.tsx +49 -0
- package/src/__contract__/surface-tour.contract.test.tsx +49 -0
- package/src/__contract__/tag-input.contract.test.tsx +49 -0
- package/src/__contract__/text.contract.test.tsx +49 -0
- package/src/__contract__/textarea.contract.test.tsx +49 -0
- package/src/__contract__/theme-family-switch.contract.test.tsx +49 -0
- package/src/__contract__/timeline.contract.test.tsx +49 -0
- package/src/__contract__/toggle.contract.test.tsx +49 -0
- package/src/__contract__/token-spotlight.contract.test.tsx +49 -0
- package/src/__contract__/transfer.contract.test.tsx +49 -0
- package/src/__contract__/tree-select.contract.test.tsx +49 -0
- package/src/__contract__/tree.contract.test.tsx +49 -0
- package/src/__contract__/virtual-select.contract.test.tsx +49 -0
- package/src/__contract__/workspace-picker.contract.test.tsx +49 -0
- package/src/blocks-comparison-table.stories.tsx +1 -1
- package/src/components/accordion/accordion.tsx +41 -16
- package/src/components/advanced-group/advanced-group.stories.tsx +2 -0
- package/src/components/alert/alert.tsx +24 -8
- package/src/components/alert-dialog/alert-dialog.test.tsx +32 -0
- package/src/components/alert-dialog/alert-dialog.tsx +28 -6
- package/src/components/ambient-field/ambient-field.css +98 -0
- package/src/components/ambient-field/ambient-field.stories.tsx +75 -0
- package/src/components/ambient-field/ambient-field.test.tsx +28 -0
- package/src/components/ambient-field/ambient-field.tsx +69 -0
- package/src/components/ambient-field/index.ts +7 -0
- package/src/components/app-shell/app-shell.stories.tsx +344 -1
- package/src/components/app-shell/app-shell.test.tsx +266 -0
- package/src/components/app-shell/app-shell.tsx +147 -14
- package/src/components/app-shell/index.ts +1 -1
- package/src/components/attribution-panel/attribution-panel.tsx +2 -0
- package/src/components/attribution-panel/attributions.generated.ts +79 -6
- package/src/components/avatar/avatar.tsx +4 -1
- package/src/components/badge/badge.stories.tsx +62 -0
- package/src/components/badge/badge.test.tsx +29 -0
- package/src/components/badge/badge.tsx +101 -11
- package/src/components/bento-grid/bento-grid.test.tsx +23 -2
- package/src/components/bento-grid/bento-grid.tsx +10 -0
- package/src/components/bounded-number/bounded-number.test.tsx +1 -1
- package/src/components/bounded-number/bounded-number.tsx +78 -75
- package/src/components/breadcrumb/breadcrumb.stories.tsx +1 -1
- package/src/components/breadcrumb/breadcrumb.tsx +5 -2
- package/src/components/button/button.stories.tsx +5 -1
- package/src/components/button/button.tsx +37 -20
- package/src/components/button-group/button-group.tsx +1 -1
- package/src/components/calendar/calendar.tsx +9 -3
- package/src/components/card/card.stories.tsx +73 -1
- package/src/components/card/card.test.tsx +53 -4
- package/src/components/card/card.tsx +122 -17
- package/src/components/card/index.ts +2 -0
- package/src/components/carousel/carousel.test.tsx +169 -0
- package/src/components/carousel/carousel.tsx +93 -32
- package/src/components/change-review/change-review.tsx +39 -30
- package/src/components/checkbox/checkbox.tsx +1 -0
- package/src/components/collapsible-panel/index.ts +1 -0
- package/src/components/collapsible-panel/use-collapsible-panel.ts +21 -5
- package/src/components/color-picker/color-picker.tsx +20 -14
- package/src/components/combobox/combobox.stories.tsx +10 -0
- package/src/components/combobox/combobox.test.tsx +54 -0
- package/src/components/combobox/combobox.tsx +25 -11
- package/src/components/command/command.stories.tsx +64 -1
- package/src/components/command/command.test.tsx +88 -0
- package/src/components/command/command.tsx +81 -8
- package/src/components/command-chip/command-chip.stories.tsx +78 -0
- package/src/components/command-chip/command-chip.test.tsx +57 -0
- package/src/components/command-chip/command-chip.tsx +168 -0
- package/src/components/command-chip/index.ts +7 -0
- package/src/components/command-trigger/command-trigger.tsx +1 -1
- package/src/components/confirm-dialog/confirm-dialog.stories.tsx +2 -0
- package/src/components/context-menu/context-menu.stories.tsx +26 -0
- package/src/components/context-menu/context-menu.tsx +17 -8
- package/src/components/context-rail/context-rail.tsx +26 -8
- package/src/components/copyable-value/copyable-value.stories.tsx +10 -0
- package/src/components/copyable-value/copyable-value.test.tsx +28 -1
- package/src/components/copyable-value/copyable-value.tsx +12 -1
- package/src/components/date-picker/date-picker.stories.tsx +9 -0
- package/src/components/date-picker/date-picker.test.tsx +52 -0
- package/src/components/date-picker/date-picker.tsx +15 -15
- package/src/components/date-range-picker/date-range-picker.stories.tsx +9 -0
- package/src/components/date-range-picker/date-range-picker.test.tsx +76 -1
- package/src/components/date-range-picker/date-range-picker.tsx +39 -28
- package/src/components/descriptions/descriptions.stories.tsx +6 -0
- package/src/components/descriptions/descriptions.test.tsx +18 -0
- package/src/components/descriptions/descriptions.tsx +34 -6
- package/src/components/descriptions/index.ts +1 -0
- package/src/components/dialog/dialog.stories.tsx +5 -0
- package/src/components/dialog/dialog.test.tsx +8 -3
- package/src/components/dialog/dialog.tsx +13 -5
- package/src/components/drawer/drawer.tsx +23 -6
- package/src/components/dropdown-menu/dropdown-menu.stories.tsx +37 -0
- package/src/components/dropdown-menu/dropdown-menu.tsx +17 -9
- package/src/components/expand-dialog/expand-dialog.test.tsx +47 -0
- package/src/components/expand-dialog/expand-dialog.tsx +20 -5
- package/src/components/field/field.tsx +2 -0
- package/src/components/field-row/field-row.tsx +2 -0
- package/src/components/file-upload/file-upload.test.tsx +83 -10
- package/src/components/file-upload/file-upload.tsx +150 -28
- package/src/components/form/form.tsx +4 -2
- package/src/components/hover-card/hover-card.tsx +2 -1
- package/src/components/icon-button/icon-button.tsx +1 -1
- package/src/components/input/input.stories.tsx +17 -0
- package/src/components/input/input.tsx +8 -4
- package/src/components/input-group/input-group.stories.tsx +43 -6
- package/src/components/input-group/input-group.tsx +10 -7
- package/src/components/input-otp/input-otp.tsx +7 -3
- package/src/components/install-tabs/index.ts +8 -0
- package/src/components/install-tabs/install-tabs.stories.tsx +147 -0
- package/src/components/install-tabs/install-tabs.test.tsx +120 -0
- package/src/components/install-tabs/install-tabs.tsx +238 -0
- package/src/components/integration-matrix/index.ts +10 -0
- package/src/components/integration-matrix/integration-matrix.stories.tsx +171 -0
- package/src/components/integration-matrix/integration-matrix.test.tsx +89 -0
- package/src/components/integration-matrix/integration-matrix.tsx +237 -0
- package/src/components/keyboard-shortcuts/keyboard-shortcuts.tsx +2 -2
- package/src/components/label/label.tsx +1 -1
- package/src/components/list-editor/list-editor.test.tsx +24 -0
- package/src/components/list-editor/list-editor.tsx +126 -52
- package/src/components/locale-provider/locale-keys.test.ts +134 -0
- package/src/components/locale-provider/messages.ts +573 -0
- package/src/components/mention-input/mention-input.stories.tsx +3 -3
- package/src/components/mention-input/mention-input.test.tsx +51 -1
- package/src/components/mention-input/mention-input.tsx +59 -9
- package/src/components/menubar/menubar.stories.tsx +25 -0
- package/src/components/menubar/menubar.tsx +18 -8
- package/src/components/meter/index.ts +1 -0
- package/src/components/meter/meter.stories.tsx +102 -0
- package/src/components/meter/meter.test.tsx +61 -0
- package/src/components/meter/meter.tsx +173 -0
- package/src/components/metric-card/index.ts +6 -1
- package/src/components/metric-card/metric-card.stories.tsx +63 -0
- package/src/components/metric-card/metric-card.test.tsx +83 -0
- package/src/components/metric-card/metric-card.tsx +97 -14
- package/src/components/nav-main/nav-main.tsx +7 -3
- package/src/components/nav-notifications/nav-notifications.test.tsx +11 -0
- package/src/components/nav-notifications/nav-notifications.tsx +11 -5
- package/src/components/nav-user/nav-user.test.tsx +23 -1
- package/src/components/nav-user/nav-user.tsx +68 -53
- package/src/components/navigation-menu/navigation-menu.stories.tsx +42 -0
- package/src/components/navigation-menu/navigation-menu.tsx +16 -4
- package/src/components/number-input/number-input.stories.tsx +7 -3
- package/src/components/number-input/number-input.test.tsx +47 -0
- package/src/components/number-input/number-input.tsx +65 -24
- package/src/components/page-shell/page-shell.stories.tsx +1 -1
- package/src/components/page-shell/page-shell.tsx +3 -2
- package/src/components/pagination/pagination.test.tsx +20 -1
- package/src/components/pagination/pagination.tsx +20 -14
- package/src/components/parallax-plane/index.ts +8 -0
- package/src/components/parallax-plane/parallax-plane.css +26 -0
- package/src/components/parallax-plane/parallax-plane.stories.tsx +88 -0
- package/src/components/parallax-plane/parallax-plane.test.tsx +57 -0
- package/src/components/parallax-plane/parallax-plane.tsx +80 -0
- package/src/components/popover/popover.tsx +2 -1
- package/src/components/progress/progress.stories.tsx +85 -0
- package/src/components/progress/progress.test.tsx +47 -0
- package/src/components/progress/progress.tsx +59 -3
- package/src/components/rating/rating.tsx +2 -0
- package/src/components/resizable/resizable.test.tsx +76 -0
- package/src/components/resizable/resizable.tsx +31 -5
- package/src/components/reveal-on-enter/index.ts +5 -0
- package/src/components/reveal-on-enter/reveal-on-enter.css +32 -0
- package/src/components/reveal-on-enter/reveal-on-enter.stories.tsx +100 -0
- package/src/components/reveal-on-enter/reveal-on-enter.test.tsx +87 -0
- package/src/components/reveal-on-enter/reveal-on-enter.tsx +75 -0
- package/src/components/revision-timeline/revision-timeline.tsx +8 -5
- package/src/components/schema-form/index.ts +2 -0
- package/src/components/schema-form/schema-form-spec.ts +36 -0
- package/src/components/schema-form/schema-form-store.ts +506 -0
- package/src/components/schema-form/schema-form.stories.tsx +33 -0
- package/src/components/schema-form/schema-form.test.tsx +165 -1
- package/src/components/schema-form/schema-form.tsx +271 -328
- package/src/components/scroll-area/index.ts +1 -1
- package/src/components/scroll-area/scroll-area.tsx +47 -18
- package/src/components/section-header/section-header.tsx +2 -4
- package/src/components/select/select.stories.tsx +17 -0
- package/src/components/select/select.test.tsx +28 -1
- package/src/components/select/select.tsx +9 -7
- package/src/components/separator/separator.tsx +1 -0
- package/src/components/sheet/sheet.test.tsx +39 -0
- package/src/components/sheet/sheet.tsx +40 -9
- package/src/components/side-dock/side-dock.stories.tsx +83 -0
- package/src/components/side-dock/side-dock.test.tsx +26 -0
- package/src/components/side-dock/side-dock.tsx +65 -18
- package/src/components/sidebar/sidebar.stories.tsx +3 -3
- package/src/components/sidebar/sidebar.test.tsx +66 -2
- package/src/components/sidebar/sidebar.tsx +54 -13
- package/src/components/skeleton/skeleton.tsx +1 -0
- package/src/components/skip-link/skip-link.stories.tsx +1 -0
- package/src/components/slider/slider.stories.tsx +13 -77
- package/src/components/slider-number/slider-number.stories.tsx +4 -1
- package/src/components/slider-number/slider-number.test.tsx +1 -1
- package/src/components/sonner/sonner.tsx +2 -0
- package/src/components/spec-playground/index.ts +10 -0
- package/src/components/spec-playground/locate-json-path.ts +144 -0
- package/src/components/spec-playground/spec-playground.stories.tsx +156 -0
- package/src/components/spec-playground/spec-playground.test.tsx +106 -0
- package/src/components/spec-playground/spec-playground.tsx +351 -0
- package/src/components/spinner/spinner.test.tsx +18 -0
- package/src/components/spinner/spinner.tsx +14 -4
- package/src/components/state-panel/state-panel.stories.tsx +4 -2
- package/src/components/state-panel/state-panel.test.tsx +3 -3
- package/src/components/state-panel/state-panel.tsx +16 -9
- package/src/components/status-badge/status-badge.stories.tsx +53 -0
- package/src/components/status-badge/status-badge.test.tsx +37 -0
- package/src/components/status-badge/status-badge.tsx +75 -13
- package/src/components/surface-tour/index.ts +11 -0
- package/src/components/surface-tour/surface-tour.stories.tsx +150 -0
- package/src/components/surface-tour/surface-tour.test.tsx +117 -0
- package/src/components/surface-tour/surface-tour.tsx +456 -0
- package/src/components/switch/switch.tsx +2 -0
- package/src/components/table/table.stories.tsx +3 -1
- package/src/components/table/table.test.tsx +9 -2
- package/src/components/table/table.tsx +22 -9
- package/src/components/tabs/index.ts +10 -1
- package/src/components/tabs/tabs.stories.tsx +95 -1
- package/src/components/tabs/tabs.test.tsx +93 -0
- package/src/components/tabs/tabs.tsx +215 -77
- package/src/components/tag-input/tag-input.tsx +4 -2
- package/src/components/team-switcher/team-switcher.tsx +3 -3
- package/src/components/textarea/textarea.tsx +2 -2
- package/src/components/theme-family-switch/index.ts +10 -0
- package/src/components/theme-family-switch/theme-family-switch.stories.tsx +97 -0
- package/src/components/theme-family-switch/theme-family-switch.test.tsx +85 -0
- package/src/components/theme-family-switch/theme-family-switch.tsx +166 -0
- package/src/components/theme-switcher/theme-switcher.stories.tsx +76 -0
- package/src/components/theme-switcher/theme-switcher.test.tsx +182 -0
- package/src/components/theme-switcher/theme-switcher.tsx +144 -13
- package/src/components/timeline/timeline.tsx +0 -3
- package/src/components/toggle/toggle.tsx +7 -2
- package/src/components/toggle-group/toggle-group.tsx +2 -0
- package/src/components/token-spotlight/index.ts +11 -0
- package/src/components/token-spotlight/token-spotlight.css +32 -0
- package/src/components/token-spotlight/token-spotlight.stories.tsx +161 -0
- package/src/components/token-spotlight/token-spotlight.test.tsx +323 -0
- package/src/components/token-spotlight/token-spotlight.tsx +379 -0
- package/src/components/token-spotlight/token-value-format.ts +205 -0
- package/src/components/tooltip/tooltip.tsx +2 -1
- package/src/components/top-nav/top-nav.test.tsx +59 -0
- package/src/components/top-nav/top-nav.tsx +37 -7
- package/src/components/transfer/transfer.tsx +35 -30
- package/src/components/tree/tree.stories.tsx +1 -1
- package/src/components/tree/tree.test.tsx +45 -4
- package/src/components/tree/tree.tsx +81 -26
- package/src/components/tree/use-tree-keyboard.ts +37 -14
- package/src/components/tree-select/tree-select.stories.tsx +9 -0
- package/src/components/tree-select/tree-select.test.tsx +5 -0
- package/src/components/tree-select/tree-select.tsx +11 -14
- package/src/components/typography/prose.test.tsx +3 -2
- package/src/components/typography/prose.tsx +3 -3
- package/src/components/typography/typography.stories.tsx +7 -2
- package/src/components/typography/typography.tsx +8 -0
- package/src/components/view-toolbar/view-toolbar.stories.tsx +2 -1
- package/src/components/view-toolbar/view-toolbar.tsx +2 -2
- package/src/components/virtual-select/virtual-select.stories.tsx +9 -0
- package/src/components/virtual-select/virtual-select.test.tsx +28 -2
- package/src/components/virtual-select/virtual-select.tsx +56 -18
- package/src/components/wizard/wizard.test.tsx +9 -0
- package/src/components/wizard/wizard.tsx +12 -4
- package/src/decoration.stories.tsx +213 -2
- package/src/index.ts +51 -0
- package/src/lib/cn.test.ts +20 -0
- package/src/lib/cn.ts +36 -2
- package/src/lib/color-scale.test.ts +386 -0
- package/src/lib/color-scale.ts +628 -0
- package/src/lib/compact-number.ts +118 -28
- package/src/lib/csv.ts +48 -0
- package/src/lib/diff-rows.ts +2 -0
- package/src/lib/merge-refs.ts +2 -0
- package/src/lib/use-controllable-state.ts +47 -0
- package/src/lib/use-mobile.test.tsx +47 -0
- package/src/lib/use-mobile.ts +26 -10
- package/src/lib/use-scroll-progress.ts +103 -0
- package/src/motion.stories.tsx +1 -0
- package/src/templates-object-detail-hub.stories.tsx +8 -8
- package/src/templates-screen-states.stories.tsx +1 -1
- package/src/templates-settings.stories.tsx +8 -3
- package/dist/chunk-JKPPTL63.js +0 -48
- package/dist/chunk-JKPPTL63.js.map +0 -1
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
mediaTypeFromName,
|
|
4
|
+
resolveFileKind
|
|
5
|
+
} from "./chunk-IRUZDWJ3.js";
|
|
6
|
+
|
|
7
|
+
// src/lib/file-source.ts
|
|
8
|
+
function nameFromUrl(url) {
|
|
9
|
+
try {
|
|
10
|
+
const parsed = new URL(url, "http://localhost");
|
|
11
|
+
const last = parsed.pathname.split("/").filter(Boolean).pop();
|
|
12
|
+
return last ? decodeURIComponent(last) : "file";
|
|
13
|
+
} catch {
|
|
14
|
+
const stripped = url.split(/[?#]/)[0] ?? "";
|
|
15
|
+
const last = stripped.split("/").filter(Boolean).pop();
|
|
16
|
+
return last && last.length > 0 ? last : "file";
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function blobToArrayBuffer(blob) {
|
|
20
|
+
if (typeof blob.arrayBuffer === "function") return blob.arrayBuffer();
|
|
21
|
+
if (typeof FileReader !== "function") {
|
|
22
|
+
return Promise.reject(
|
|
23
|
+
new Error("Cannot read file bytes: no Blob.arrayBuffer and no FileReader.")
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
return new Promise((resolve, reject) => {
|
|
27
|
+
const reader = new FileReader();
|
|
28
|
+
reader.onload = () => resolve(reader.result);
|
|
29
|
+
reader.onerror = () => reject(reader.error ?? new Error("Could not read the file."));
|
|
30
|
+
reader.readAsArrayBuffer(blob);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function identify(source) {
|
|
34
|
+
switch (source.kind) {
|
|
35
|
+
case "file":
|
|
36
|
+
return { name: source.file.name || "file", declaredMediaType: source.file.type };
|
|
37
|
+
case "blob":
|
|
38
|
+
return { name: source.name, declaredMediaType: source.mediaType ?? source.blob.type };
|
|
39
|
+
case "buffer":
|
|
40
|
+
return { name: source.name, declaredMediaType: source.mediaType };
|
|
41
|
+
case "text":
|
|
42
|
+
return {
|
|
43
|
+
name: source.name,
|
|
44
|
+
declaredMediaType: source.mediaType ?? mediaTypeFromName(source.name) ?? "text/plain"
|
|
45
|
+
};
|
|
46
|
+
case "url":
|
|
47
|
+
return { name: source.name ?? nameFromUrl(source.url), declaredMediaType: source.mediaType };
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function knownSize(source) {
|
|
51
|
+
switch (source.kind) {
|
|
52
|
+
case "file":
|
|
53
|
+
return source.file.size;
|
|
54
|
+
case "blob":
|
|
55
|
+
return source.blob.size;
|
|
56
|
+
case "buffer":
|
|
57
|
+
return source.buffer.byteLength;
|
|
58
|
+
// `text` would need an encode pass, `url` a fetch — neither is free, so we
|
|
59
|
+
// report "unknown" rather than doing work a caller may not want.
|
|
60
|
+
default:
|
|
61
|
+
return void 0;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
function assertNotAborted(signal) {
|
|
65
|
+
if (signal?.aborted) throw signal.reason instanceof Error ? signal.reason : new Error("Aborted");
|
|
66
|
+
}
|
|
67
|
+
function normalizeFileSource(source) {
|
|
68
|
+
const { name, declaredMediaType } = identify(source);
|
|
69
|
+
const kind = resolveFileKind(name, declaredMediaType);
|
|
70
|
+
const alt = "alt" in source ? source.alt : void 0;
|
|
71
|
+
let bytesPromise;
|
|
72
|
+
let textPromise;
|
|
73
|
+
let objectUrl;
|
|
74
|
+
async function readBytes(signal) {
|
|
75
|
+
assertNotAborted(signal);
|
|
76
|
+
switch (source.kind) {
|
|
77
|
+
case "file":
|
|
78
|
+
return blobToArrayBuffer(source.file);
|
|
79
|
+
case "blob":
|
|
80
|
+
return blobToArrayBuffer(source.blob);
|
|
81
|
+
case "buffer":
|
|
82
|
+
return source.buffer;
|
|
83
|
+
case "text":
|
|
84
|
+
return new TextEncoder().encode(source.text).buffer;
|
|
85
|
+
case "url": {
|
|
86
|
+
const res = await fetch(source.url, {
|
|
87
|
+
...source.init,
|
|
88
|
+
signal: signal ?? source.init?.signal
|
|
89
|
+
});
|
|
90
|
+
if (!res.ok) {
|
|
91
|
+
throw new Error(`Could not read "${name}": the server responded ${res.status}.`);
|
|
92
|
+
}
|
|
93
|
+
return res.arrayBuffer();
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
async function blobOf(signal) {
|
|
98
|
+
if (source.kind === "file") return source.file;
|
|
99
|
+
if (source.kind === "blob") return source.blob;
|
|
100
|
+
const buffer = await bytes(signal);
|
|
101
|
+
return new Blob([buffer], { type: kind.mediaType });
|
|
102
|
+
}
|
|
103
|
+
function bytes(signal) {
|
|
104
|
+
bytesPromise ??= readBytes(signal).catch((error) => {
|
|
105
|
+
bytesPromise = void 0;
|
|
106
|
+
throw error;
|
|
107
|
+
});
|
|
108
|
+
return bytesPromise;
|
|
109
|
+
}
|
|
110
|
+
function text(signal) {
|
|
111
|
+
if (source.kind === "text") return Promise.resolve(source.text);
|
|
112
|
+
textPromise ??= bytes(signal).then((buffer) => new TextDecoder().decode(buffer)).catch((error) => {
|
|
113
|
+
textPromise = void 0;
|
|
114
|
+
throw error;
|
|
115
|
+
});
|
|
116
|
+
return textPromise;
|
|
117
|
+
}
|
|
118
|
+
async function url(signal) {
|
|
119
|
+
if (source.kind === "url" && !source.init) return source.url;
|
|
120
|
+
if (objectUrl) return objectUrl;
|
|
121
|
+
if (typeof URL === "undefined" || typeof URL.createObjectURL !== "function") {
|
|
122
|
+
throw new Error(
|
|
123
|
+
`Could not create a URL for "${name}": no object-URL support in this environment.`
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
objectUrl = URL.createObjectURL(await blobOf(signal));
|
|
127
|
+
return objectUrl;
|
|
128
|
+
}
|
|
129
|
+
function revoke() {
|
|
130
|
+
if (!objectUrl) return;
|
|
131
|
+
URL.revokeObjectURL(objectUrl);
|
|
132
|
+
objectUrl = void 0;
|
|
133
|
+
}
|
|
134
|
+
return {
|
|
135
|
+
name,
|
|
136
|
+
mediaType: kind.mediaType,
|
|
137
|
+
category: kind.category,
|
|
138
|
+
extension: kind.extension,
|
|
139
|
+
alt,
|
|
140
|
+
size: knownSize(source),
|
|
141
|
+
bytes,
|
|
142
|
+
text,
|
|
143
|
+
url,
|
|
144
|
+
revoke
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export {
|
|
149
|
+
normalizeFileSource
|
|
150
|
+
};
|
|
151
|
+
//# sourceMappingURL=chunk-GAI4NEPU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/file-source.ts"],"sourcesContent":["/**\n * One input model for \"a file\", whatever the app happens to be holding.\n *\n * The library previously had three: a `File` (upload), a `string` of content\n * (chat assets), and a bare URL (attachments) — so every surface that wanted to\n * render a file first had to guess which of the three it had. {@link FileSource}\n * is the union all of them collapse into, and {@link normalizeFileSource} turns\n * any member into one uniform reader.\n *\n * Two things this fixes beyond the merge:\n *\n * - **Authenticated remote files work.** The `url` variant carries\n * `init?: RequestInit`, so headers, credentials and an abort signal reach the\n * fetch. A viewer that can only take a naked URL cannot open anything behind\n * auth, which is most enterprise content.\n * - **Alt text has a home.** Every binary variant takes `alt`, so an image or a\n * rendered page can be described without a parallel prop channel.\n *\n * Pure DOM/platform mechanics: no React, no other deps. SSR-safe to import;\n * only {@link ResolvedFileSource.url} needs a browser, and it says so.\n */\n\nimport { type FileCategory, mediaTypeFromName, resolveFileKind } from \"./file-kind\";\n\n/** Any file the library can be handed. Discriminated on `kind`. */\nexport type FileSource =\n /** A user-picked file. Name and MIME come from the platform. */\n | { kind: \"file\"; file: File; alt?: string }\n /** In-memory bytes that already have a `Blob` wrapper (a generated export, a decoded attachment). */\n | { kind: \"blob\"; blob: Blob; name: string; mediaType?: string; alt?: string }\n /**\n * A remote file. `init` is passed straight to `fetch` — this is how auth\n * headers, `credentials` and an `AbortSignal` reach the request.\n */\n | {\n kind: \"url\";\n url: string;\n name?: string;\n mediaType?: string;\n alt?: string;\n init?: RequestInit;\n }\n /** Raw bytes with no wrapper (a worker result, a WASM output). */\n | { kind: \"buffer\"; buffer: ArrayBuffer; name: string; mediaType: string; alt?: string }\n /** Content the app already has as a string (an agent's markdown, a code snippet). */\n | { kind: \"text\"; text: string; name: string; mediaType?: string };\n\n/**\n * A {@link FileSource} with its identity resolved and its bytes reachable the\n * same way regardless of where they came from.\n *\n * Reads are memoized on success, so `text()` after `bytes()` costs nothing and a\n * remote file is fetched once. A failed read is NOT cached — a retry re-runs it.\n */\nexport interface ResolvedFileSource {\n /** Display name, always non-empty. Derived from the URL path when the caller gave none. */\n readonly name: string;\n /** Best-known MIME, resolved from the declared type then the extension. */\n readonly mediaType: string;\n /** Coarse shape, for icons/labels/fallbacks. Not a renderer routing key. */\n readonly category: FileCategory;\n /** Lowercased extension without the dot, or `\"\"`. */\n readonly extension: string;\n /** Author-supplied description, for images and rendered pages. */\n readonly alt?: string;\n /** Byte length when known up front. `undefined` for `text` and un-fetched `url` sources. */\n readonly size?: number;\n\n /** The full contents as bytes. */\n bytes(signal?: AbortSignal): Promise<ArrayBuffer>;\n /** The full contents decoded as UTF-8. */\n text(signal?: AbortSignal): Promise<string>;\n /**\n * A URL usable as an `<img>`/`<video>`/`<iframe>` src.\n *\n * A public `url` source returns its own URL unchanged, so the browser streams\n * it and no full read happens. Every other source (and any `url` source with\n * an `init`, which the element could not replay) mints an object URL — release\n * it with {@link revoke}. Browser only: rejects where `URL.createObjectURL`\n * does not exist.\n */\n url(signal?: AbortSignal): Promise<string>;\n /** Release any object URL this reader minted. Idempotent; safe to call unconditionally. */\n revoke(): void;\n}\n\n/** Best-effort filename from a URL path. Never empty. */\nfunction nameFromUrl(url: string): string {\n try {\n // A relative URL still needs a base to parse; the base is never used.\n const parsed = new URL(url, \"http://localhost\");\n const last = parsed.pathname.split(\"/\").filter(Boolean).pop();\n return last ? decodeURIComponent(last) : \"file\";\n } catch {\n // Unparseable: strip the query/hash by hand rather than give up. Note this\n // runs ONLY on a parse failure — running it as a fallback for an empty\n // pathname would return the host (\"x.test\" for \"https://x.test/\").\n const stripped = url.split(/[?#]/)[0] ?? \"\";\n const last = stripped.split(\"/\").filter(Boolean).pop();\n return last && last.length > 0 ? last : \"file\";\n }\n}\n\n/**\n * `Blob`/`File` → bytes, feature-detecting `Blob.prototype.arrayBuffer`.\n *\n * jsdom does not implement it (nor `Blob.prototype.text`), and this module is\n * reached from every downstream package's jsdom tests — so per the note in\n * `packages/ui/vitest.setup.ts`, the detection lives HERE rather than in a stub\n * that would only fix this package's own suite. `FileReader` is the fallback:\n * jsdom implements it, and it is the pre-2020 browser path anyway.\n */\nfunction blobToArrayBuffer(blob: Blob): Promise<ArrayBuffer> {\n if (typeof blob.arrayBuffer === \"function\") return blob.arrayBuffer();\n\n if (typeof FileReader !== \"function\") {\n return Promise.reject(\n new Error(\"Cannot read file bytes: no Blob.arrayBuffer and no FileReader.\"),\n );\n }\n return new Promise<ArrayBuffer>((resolve, reject) => {\n const reader = new FileReader();\n reader.onload = () => resolve(reader.result as ArrayBuffer);\n reader.onerror = () => reject(reader.error ?? new Error(\"Could not read the file.\"));\n reader.readAsArrayBuffer(blob);\n });\n}\n\n/** The declared name/MIME for a source, before extension inference. */\nfunction identify(source: FileSource): { name: string; declaredMediaType?: string } {\n switch (source.kind) {\n case \"file\":\n return { name: source.file.name || \"file\", declaredMediaType: source.file.type };\n case \"blob\":\n return { name: source.name, declaredMediaType: source.mediaType ?? source.blob.type };\n case \"buffer\":\n return { name: source.name, declaredMediaType: source.mediaType };\n case \"text\":\n return {\n name: source.name,\n declaredMediaType: source.mediaType ?? mediaTypeFromName(source.name) ?? \"text/plain\",\n };\n case \"url\":\n return { name: source.name ?? nameFromUrl(source.url), declaredMediaType: source.mediaType };\n }\n}\n\n/** Byte length where the platform already knows it, without reading anything. */\nfunction knownSize(source: FileSource): number | undefined {\n switch (source.kind) {\n case \"file\":\n return source.file.size;\n case \"blob\":\n return source.blob.size;\n case \"buffer\":\n return source.buffer.byteLength;\n // `text` would need an encode pass, `url` a fetch — neither is free, so we\n // report \"unknown\" rather than doing work a caller may not want.\n default:\n return undefined;\n }\n}\n\nfunction assertNotAborted(signal: AbortSignal | undefined): void {\n if (signal?.aborted) throw signal.reason instanceof Error ? signal.reason : new Error(\"Aborted\");\n}\n\n/**\n * Turn any {@link FileSource} into a uniform reader.\n *\n * Cheap and synchronous — it resolves identity only. Nothing is read, fetched or\n * decoded until a `bytes()` / `text()` / `url()` call.\n */\nexport function normalizeFileSource(source: FileSource): ResolvedFileSource {\n const { name, declaredMediaType } = identify(source);\n const kind = resolveFileKind(name, declaredMediaType);\n const alt = \"alt\" in source ? source.alt : undefined;\n\n let bytesPromise: Promise<ArrayBuffer> | undefined;\n let textPromise: Promise<string> | undefined;\n let objectUrl: string | undefined;\n\n async function readBytes(signal?: AbortSignal): Promise<ArrayBuffer> {\n assertNotAborted(signal);\n switch (source.kind) {\n case \"file\":\n return blobToArrayBuffer(source.file);\n case \"blob\":\n return blobToArrayBuffer(source.blob);\n case \"buffer\":\n return source.buffer;\n case \"text\":\n return new TextEncoder().encode(source.text).buffer as ArrayBuffer;\n case \"url\": {\n // The caller's own signal (via `init`) still applies; this one is layered\n // on top so a per-read abort works even when `init` carries none.\n const res = await fetch(source.url, {\n ...source.init,\n signal: signal ?? source.init?.signal,\n });\n if (!res.ok) {\n throw new Error(`Could not read \"${name}\": the server responded ${res.status}.`);\n }\n return res.arrayBuffer();\n }\n }\n }\n\n async function blobOf(signal?: AbortSignal): Promise<Blob> {\n if (source.kind === \"file\") return source.file;\n if (source.kind === \"blob\") return source.blob;\n const buffer = await bytes(signal);\n return new Blob([buffer], { type: kind.mediaType });\n }\n\n function bytes(signal?: AbortSignal): Promise<ArrayBuffer> {\n // Memoize the success only: a rejected read must be retryable.\n bytesPromise ??= readBytes(signal).catch((error: unknown) => {\n bytesPromise = undefined;\n throw error;\n });\n return bytesPromise;\n }\n\n function text(signal?: AbortSignal): Promise<string> {\n if (source.kind === \"text\") return Promise.resolve(source.text);\n textPromise ??= bytes(signal)\n .then((buffer) => new TextDecoder().decode(buffer))\n .catch((error: unknown) => {\n textPromise = undefined;\n throw error;\n });\n return textPromise;\n }\n\n async function url(signal?: AbortSignal): Promise<string> {\n // A public remote file is already a URL an element can stream. One carrying\n // `init` is not: the element cannot replay those headers, so we fetch here.\n if (source.kind === \"url\" && !source.init) return source.url;\n\n if (objectUrl) return objectUrl;\n if (typeof URL === \"undefined\" || typeof URL.createObjectURL !== \"function\") {\n throw new Error(\n `Could not create a URL for \"${name}\": no object-URL support in this environment.`,\n );\n }\n objectUrl = URL.createObjectURL(await blobOf(signal));\n return objectUrl;\n }\n\n function revoke(): void {\n if (!objectUrl) return;\n URL.revokeObjectURL(objectUrl);\n objectUrl = undefined;\n }\n\n return {\n name,\n mediaType: kind.mediaType,\n category: kind.category,\n extension: kind.extension,\n alt,\n size: knownSize(source),\n bytes,\n text,\n url,\n revoke,\n };\n}\n"],"mappings":";;;;;;;AAuFA,SAAS,YAAY,KAAqB;AACxC,MAAI;AAEF,UAAM,SAAS,IAAI,IAAI,KAAK,kBAAkB;AAC9C,UAAM,OAAO,OAAO,SAAS,MAAM,GAAG,EAAE,OAAO,OAAO,EAAE,IAAI;AAC5D,WAAO,OAAO,mBAAmB,IAAI,IAAI;AAAA,EAC3C,QAAQ;AAIN,UAAM,WAAW,IAAI,MAAM,MAAM,EAAE,CAAC,KAAK;AACzC,UAAM,OAAO,SAAS,MAAM,GAAG,EAAE,OAAO,OAAO,EAAE,IAAI;AACrD,WAAO,QAAQ,KAAK,SAAS,IAAI,OAAO;AAAA,EAC1C;AACF;AAWA,SAAS,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A,EACT;AAEA,WAAS,KAAK,QAAuC;AACnD,QAAI,OAAO,SAAS,OAAQ,QAAO,QAAQ,QAAQ,OAAO,IAAI;AAC9D,oBAAgB,MAAM,MAAM,EACzB,KAAK,CAAC,WAAW,IAAI,YAAY,EAAE,OAAO,MAAM,CAAC,EACjD,MAAM,CAAC,UAAmB;AACzB,oBAAc;AACd,YAAM;AAAA,IACR,CAAC;AACH,WAAO;AAAA,EACT;AAEA,iBAAe,IAAI,QAAuC;AAGxD,QAAI,OAAO,SAAS,SAAS,CAAC,OAAO,KAAM,QAAO,OAAO;AAEzD,QAAI,UAAW,QAAO;AACtB,QAAI,OAAO,QAAQ,eAAe,OAAO,IAAI,oBAAoB,YAAY;AAC3E,YAAM,IAAI;AAAA,QACR,+BAA+B,IAAI;AAAA,MACrC;AAAA,IACF;AACA,gBAAY,IAAI,gBAAgB,MAAM,OAAO,MAAM,CAAC;AACpD,WAAO;AAAA,EACT;AAEA,WAAS,SAAe;AACtB,QAAI,CAAC,UAAW;AAChB,QAAI,gBAAgB,SAAS;AAC7B,gBAAY;AAAA,EACd;AAEA,SAAO;AAAA,IACL;AAAA,IACA,WAAW,KAAK;AAAA,IAChB,UAAU,KAAK;AAAA,IACf,WAAW,KAAK;AAAA,IAChB;AAAA,IACA,MAAM,UAAU,MAAM;AAAA,IACtB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
FieldContext,
|
|
4
|
+
useFieldContext
|
|
5
|
+
} from "./chunk-22Z735L6.js";
|
|
6
|
+
import {
|
|
7
|
+
hasRenderableContent
|
|
8
|
+
} from "./chunk-TAQI4JTE.js";
|
|
9
|
+
import {
|
|
10
|
+
Label
|
|
11
|
+
} from "./chunk-TEKBTTP2.js";
|
|
12
|
+
import {
|
|
13
|
+
cn
|
|
14
|
+
} from "./chunk-KBNWM27Q.js";
|
|
15
|
+
|
|
16
|
+
// src/components/field/field.tsx
|
|
17
|
+
import {
|
|
18
|
+
cloneElement,
|
|
19
|
+
forwardRef,
|
|
20
|
+
useCallback,
|
|
21
|
+
useId,
|
|
22
|
+
useLayoutEffect,
|
|
23
|
+
useMemo,
|
|
24
|
+
useState
|
|
25
|
+
} from "react";
|
|
26
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
27
|
+
import { jsx } from "react/jsx-runtime";
|
|
28
|
+
var FieldRoot = forwardRef(function FieldRoot2({ invalid = false, required = false, className, children, ...props }, ref) {
|
|
29
|
+
const [descriptionIds, setDescriptionIds] = useState([]);
|
|
30
|
+
const registerDescription = useCallback((descId) => {
|
|
31
|
+
setDescriptionIds((prev) => prev.includes(descId) ? prev : [...prev, descId]);
|
|
32
|
+
}, []);
|
|
33
|
+
const unregisterDescription = useCallback((descId) => {
|
|
34
|
+
setDescriptionIds((prev) => prev.includes(descId) ? prev.filter((x) => x !== descId) : prev);
|
|
35
|
+
}, []);
|
|
36
|
+
const [errorIds, setErrorIds] = useState([]);
|
|
37
|
+
const registerError = useCallback((errId) => {
|
|
38
|
+
setErrorIds((prev) => prev.includes(errId) ? prev : [...prev, errId]);
|
|
39
|
+
}, []);
|
|
40
|
+
const unregisterError = useCallback((errId) => {
|
|
41
|
+
setErrorIds((prev) => prev.includes(errId) ? prev.filter((x) => x !== errId) : prev);
|
|
42
|
+
}, []);
|
|
43
|
+
const describedBy = useMemo(() => {
|
|
44
|
+
const ids = [...descriptionIds, ...errorIds];
|
|
45
|
+
return ids.length > 0 ? ids.join(" ") : void 0;
|
|
46
|
+
}, [descriptionIds, errorIds]);
|
|
47
|
+
const [controlOrder, setControlOrder] = useState([]);
|
|
48
|
+
const registerControl = useCallback((controlId) => {
|
|
49
|
+
setControlOrder((prev) => prev.includes(controlId) ? prev : [...prev, controlId]);
|
|
50
|
+
}, []);
|
|
51
|
+
const unregisterControl = useCallback((controlId) => {
|
|
52
|
+
setControlOrder(
|
|
53
|
+
(prev) => prev.includes(controlId) ? prev.filter((x) => x !== controlId) : prev
|
|
54
|
+
);
|
|
55
|
+
}, []);
|
|
56
|
+
const labelFor = controlOrder[0];
|
|
57
|
+
const value = useMemo(
|
|
58
|
+
() => ({
|
|
59
|
+
labelFor,
|
|
60
|
+
registerControl,
|
|
61
|
+
unregisterControl,
|
|
62
|
+
invalid,
|
|
63
|
+
required,
|
|
64
|
+
describedBy,
|
|
65
|
+
registerDescription,
|
|
66
|
+
unregisterDescription,
|
|
67
|
+
registerError,
|
|
68
|
+
unregisterError
|
|
69
|
+
}),
|
|
70
|
+
[
|
|
71
|
+
labelFor,
|
|
72
|
+
registerControl,
|
|
73
|
+
unregisterControl,
|
|
74
|
+
invalid,
|
|
75
|
+
required,
|
|
76
|
+
describedBy,
|
|
77
|
+
registerDescription,
|
|
78
|
+
unregisterDescription,
|
|
79
|
+
registerError,
|
|
80
|
+
unregisterError
|
|
81
|
+
]
|
|
82
|
+
);
|
|
83
|
+
return /* @__PURE__ */ jsx(FieldContext.Provider, { value, children: /* @__PURE__ */ jsx("div", { ref, "data-slot": "field", className: cn("space-y-2", className), ...props, children }) });
|
|
84
|
+
});
|
|
85
|
+
var FieldLabel = forwardRef(function FieldLabel2({ className, ...props }, ref) {
|
|
86
|
+
const { labelFor, invalid } = useFieldContext("FieldLabel");
|
|
87
|
+
return /* @__PURE__ */ jsx(
|
|
88
|
+
Label,
|
|
89
|
+
{
|
|
90
|
+
ref,
|
|
91
|
+
htmlFor: labelFor,
|
|
92
|
+
"data-slot": "field-label",
|
|
93
|
+
className: cn(
|
|
94
|
+
"transition-colors duration-fast ease-standard",
|
|
95
|
+
invalid && "text-destructive-text",
|
|
96
|
+
className
|
|
97
|
+
),
|
|
98
|
+
...props
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
});
|
|
102
|
+
var FieldControl = forwardRef(
|
|
103
|
+
function FieldControl2({ children }, ref) {
|
|
104
|
+
const { invalid, required, describedBy, registerControl, unregisterControl } = useFieldContext("FieldControl");
|
|
105
|
+
const generatedId = useId();
|
|
106
|
+
const control = children;
|
|
107
|
+
const childProps = control.props;
|
|
108
|
+
const id = childProps.id ?? generatedId;
|
|
109
|
+
const composedDescribedBy = [childProps["aria-describedby"] ?? null, describedBy ?? null].filter(Boolean).join(" ") || void 0;
|
|
110
|
+
useLayoutEffect(() => {
|
|
111
|
+
registerControl(id);
|
|
112
|
+
return () => unregisterControl(id);
|
|
113
|
+
}, [id, registerControl, unregisterControl]);
|
|
114
|
+
return /* @__PURE__ */ jsx(
|
|
115
|
+
Slot,
|
|
116
|
+
{
|
|
117
|
+
ref,
|
|
118
|
+
id,
|
|
119
|
+
"aria-describedby": composedDescribedBy,
|
|
120
|
+
"aria-invalid": invalid,
|
|
121
|
+
"aria-required": required || void 0,
|
|
122
|
+
"data-slot": "field-control",
|
|
123
|
+
children: cloneElement(control, { id, "aria-describedby": composedDescribedBy })
|
|
124
|
+
}
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
);
|
|
128
|
+
var FieldDescription = forwardRef(function FieldDescription2({ className, children, id, ...props }, ref) {
|
|
129
|
+
const { registerDescription, unregisterDescription } = useFieldContext("FieldDescription");
|
|
130
|
+
const instanceId = useId();
|
|
131
|
+
const generatedId = `${instanceId}-description`;
|
|
132
|
+
const descriptionId = id ?? generatedId;
|
|
133
|
+
const hasContent = hasRenderableContent(children);
|
|
134
|
+
useLayoutEffect(() => {
|
|
135
|
+
if (!hasContent) return void 0;
|
|
136
|
+
registerDescription(descriptionId);
|
|
137
|
+
return () => unregisterDescription(descriptionId);
|
|
138
|
+
}, [hasContent, descriptionId, registerDescription, unregisterDescription]);
|
|
139
|
+
if (!hasContent) return null;
|
|
140
|
+
return /* @__PURE__ */ jsx(
|
|
141
|
+
"p",
|
|
142
|
+
{
|
|
143
|
+
ref,
|
|
144
|
+
id: descriptionId,
|
|
145
|
+
"data-slot": "field-description",
|
|
146
|
+
className: cn("text-body text-muted-foreground", className),
|
|
147
|
+
...props,
|
|
148
|
+
children
|
|
149
|
+
}
|
|
150
|
+
);
|
|
151
|
+
});
|
|
152
|
+
var FieldError = forwardRef(
|
|
153
|
+
function FieldError2({ className, children, id, ...props }, ref) {
|
|
154
|
+
const { registerError, unregisterError } = useFieldContext("FieldError");
|
|
155
|
+
const instanceId = useId();
|
|
156
|
+
const generatedId = `${instanceId}-error`;
|
|
157
|
+
const errorId = id ?? generatedId;
|
|
158
|
+
const hasContent = hasRenderableContent(children);
|
|
159
|
+
useLayoutEffect(() => {
|
|
160
|
+
if (!hasContent) return void 0;
|
|
161
|
+
registerError(errorId);
|
|
162
|
+
return () => unregisterError(errorId);
|
|
163
|
+
}, [hasContent, errorId, registerError, unregisterError]);
|
|
164
|
+
if (!hasContent) return null;
|
|
165
|
+
return /* @__PURE__ */ jsx(
|
|
166
|
+
"p",
|
|
167
|
+
{
|
|
168
|
+
ref,
|
|
169
|
+
id: errorId,
|
|
170
|
+
role: "alert",
|
|
171
|
+
"data-slot": "field-error",
|
|
172
|
+
className: cn("text-body font-medium text-destructive-text", className),
|
|
173
|
+
...props,
|
|
174
|
+
children
|
|
175
|
+
}
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
);
|
|
179
|
+
|
|
180
|
+
export {
|
|
181
|
+
FieldRoot,
|
|
182
|
+
FieldLabel,
|
|
183
|
+
FieldControl,
|
|
184
|
+
FieldDescription,
|
|
185
|
+
FieldError
|
|
186
|
+
};
|
|
187
|
+
//# sourceMappingURL=chunk-GRWGNWIJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/field/field.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n cloneElement,\n forwardRef,\n useCallback,\n useId,\n useLayoutEffect,\n useMemo,\n useState,\n type ComponentPropsWithoutRef,\n type ElementRef,\n type HTMLAttributes,\n type ReactElement,\n} from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cn } from \"../../lib/cn\";\nimport { hasRenderableContent } from \"../../lib/has-renderable-content\";\nimport { Label } from \"../label\";\nimport { FieldContext, useFieldContext, type FieldContextValue } from \"./field-context\";\n\n// ── FieldRoot ─────────────────────────────────────────────────────────────\n\nexport interface FieldRootProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Whether the field is currently invalid. Drives `aria-invalid` on every\n * `FieldControl` and error styling on `FieldLabel` — independent of\n * whether a `FieldError` with content is actually mounted, so a caller can\n * mark the control invalid before its message has settled.\n */\n invalid?: boolean;\n /** Whether the field is required. Drives `aria-required` on every `FieldControl`. */\n required?: boolean;\n}\n\n/**\n * Compound-anatomy field: `FieldRoot` owns id generation and `aria-describedby`\n * composition; `FieldLabel`/`FieldControl`/`FieldDescription`/`FieldError` read\n * that state from context and can be composed in ANY order/layout — including\n * more than one `FieldControl` in one row (e.g. first/last name) or a\n * `FieldDescription` placed before the control. Mirrors the same accessibility\n * wiring `FieldRow` (`../field-row`) already validated (id/`aria-describedby`/\n * `aria-invalid`/`role=\"alert\"`), adapted to a shared lifted-state context so\n * it holds across independently-composed parts; `FieldRow` remains the\n * convenience wrapper for the common single-control case and is unaffected by\n * this addition (#43).\n *\n * @example\n * ```tsx\n * <FieldRoot invalid={!!error} required>\n * <FieldLabel>{label}</FieldLabel>\n * <FieldControl><Input /></FieldControl>\n * <FieldDescription>{helpText}</FieldDescription>\n * <FieldError>{error}</FieldError>\n * </FieldRoot>\n * ```\n */\nexport const FieldRoot = forwardRef<HTMLDivElement, FieldRootProps>(function FieldRoot(\n { invalid = false, required = false, className, children, ...props },\n ref,\n) {\n // Each `FieldDescription`/`FieldError` INSTANCE generates and registers its\n // own id (see below) — two lists, not one shared slot per part type, so\n // more than one of either part under one `FieldRoot` gets distinct ids\n // instead of colliding, and unmounting one instance only ever removes that\n // instance's own id from its own list (never a sibling's).\n const [descriptionIds, setDescriptionIds] = useState<readonly string[]>([]);\n const registerDescription = useCallback((descId: string) => {\n setDescriptionIds((prev) => (prev.includes(descId) ? prev : [...prev, descId]));\n }, []);\n const unregisterDescription = useCallback((descId: string) => {\n setDescriptionIds((prev) => (prev.includes(descId) ? prev.filter((x) => x !== descId) : prev));\n }, []);\n\n const [errorIds, setErrorIds] = useState<readonly string[]>([]);\n const registerError = useCallback((errId: string) => {\n setErrorIds((prev) => (prev.includes(errId) ? prev : [...prev, errId]));\n }, []);\n const unregisterError = useCallback((errId: string) => {\n setErrorIds((prev) => (prev.includes(errId) ? prev.filter((x) => x !== errId) : prev));\n }, []);\n\n // Fixed semantic order — every description before every error — regardless\n // of DOM order or registration order, so \"description placed before the\n // control\" reorders the VISIBLE layout without reordering the announced\n // description, and a second description/error is appended rather than\n // replacing the first.\n const describedBy = useMemo(() => {\n const ids = [...descriptionIds, ...errorIds];\n return ids.length > 0 ? ids.join(\" \") : undefined;\n }, [descriptionIds, errorIds]);\n\n // `FieldLabel`'s `htmlFor` can only point to ONE control, so it binds to\n // whichever `FieldControl` registers FIRST (JSX/mount order) — the common\n // single-control case gets this for free; a multi-control row (e.g.\n // first/last name) still labels the first field, and every additional\n // control needs its own explicit `id` the same way any two form controls\n // would (no new coordination prop invented for this).\n const [controlOrder, setControlOrder] = useState<readonly string[]>([]);\n const registerControl = useCallback((controlId: string) => {\n setControlOrder((prev) => (prev.includes(controlId) ? prev : [...prev, controlId]));\n }, []);\n const unregisterControl = useCallback((controlId: string) => {\n setControlOrder((prev) =>\n prev.includes(controlId) ? prev.filter((x) => x !== controlId) : prev,\n );\n }, []);\n const labelFor = controlOrder[0];\n\n const value = useMemo<FieldContextValue>(\n () => ({\n labelFor,\n registerControl,\n unregisterControl,\n invalid,\n required,\n describedBy,\n registerDescription,\n unregisterDescription,\n registerError,\n unregisterError,\n }),\n [\n labelFor,\n registerControl,\n unregisterControl,\n invalid,\n required,\n describedBy,\n registerDescription,\n unregisterDescription,\n registerError,\n unregisterError,\n ],\n );\n\n return (\n <FieldContext.Provider value={value}>\n <div ref={ref} data-slot=\"field\" className={cn(\"space-y-2\", className)} {...props}>\n {children}\n </div>\n </FieldContext.Provider>\n );\n});\n\n// ── FieldLabel ────────────────────────────────────────────────────────────\n\nexport const FieldLabel = forwardRef<\n ElementRef<typeof Label>,\n ComponentPropsWithoutRef<typeof Label>\n>(function FieldLabel({ className, ...props }, ref) {\n const { labelFor, invalid } = useFieldContext(\"FieldLabel\");\n return (\n <Label\n ref={ref}\n htmlFor={labelFor}\n data-slot=\"field-label\"\n className={cn(\n \"transition-colors duration-fast ease-standard\",\n invalid && \"text-destructive-text\",\n className,\n )}\n {...props}\n />\n );\n});\n\n// ── FieldControl ──────────────────────────────────────────────────────────\n\nexport interface FieldControlProps {\n /**\n * The single field control (`Input`, `Textarea`, `Select`, …). Receives\n * `id`/`aria-describedby`/`aria-invalid`/`aria-required` via a Radix\n * `Slot` — must be a single element that forwards those props to a real\n * form control. Compose more than one `FieldControl` inside one\n * `FieldRoot` for a multi-control row (each gets its own independent id;\n * give every control but the first its own explicit `id`, the same way\n * you would for any two form controls that must not collide). `FieldLabel`\n * can only associate with ONE control (the first to mount), so give every\n * OTHER control in the row its own `aria-label` — a shared visual label\n * plus a placeholder is not a real accessible name for the rest.\n */\n children: ReactElement<{\n id?: string;\n \"aria-describedby\"?: string;\n }>;\n}\n\nexport const FieldControl = forwardRef<ElementRef<typeof Slot>, FieldControlProps>(\n function FieldControl({ children }, ref) {\n const { invalid, required, describedBy, registerControl, unregisterControl } =\n useFieldContext(\"FieldControl\");\n // Independent per-instance fallback id — guarantees uniqueness with no\n // coordination needed when more than one `FieldControl` shares a\n // `FieldRoot` (e.g. a first/last-name row).\n const generatedId = useId();\n\n // Same \"child wins, but COMPOSE rather than discard\" merge FieldRow uses:\n // Radix `Slot` merges child props OVER slot props, so a control that\n // already carries its own `id`/`aria-describedby` must not silently lose\n // the label association / description-error wiring.\n const control = children;\n const childProps = control.props;\n const id = childProps.id ?? generatedId;\n const composedDescribedBy =\n [childProps[\"aria-describedby\"] ?? null, describedBy ?? null].filter(Boolean).join(\" \") ||\n undefined;\n\n useLayoutEffect(() => {\n registerControl(id);\n return () => unregisterControl(id);\n }, [id, registerControl, unregisterControl]);\n\n return (\n <Slot\n ref={ref}\n id={id}\n aria-describedby={composedDescribedBy}\n aria-invalid={invalid}\n aria-required={required || undefined}\n data-slot=\"field-control\"\n >\n {cloneElement(control, { id, \"aria-describedby\": composedDescribedBy })}\n </Slot>\n );\n },\n);\n\n// ── FieldDescription ──────────────────────────────────────────────────────\n\n/**\n * Optional field help text. Renders nothing — and registers no\n * `aria-describedby` reference — when `children` is falsy (`false`/`0`/`\"\"`/\n * `null`/`undefined`), an empty array, or an array containing only falsy\n * values (`{list.map(...)}` on an empty list; `[a && \"x\", b && \"y\"]` with\n * both false) — matching `FieldRow`'s `description ? … : null` convention:\n * `{hint && <FieldDescription>{hint}</FieldDescription>}` is the supported\n * way to express \"no description\".\n *\n * **Known limit:** a child that is itself a COMPONENT that renders nothing\n * (returns `null`/an empty fragment) is not knowable from the element\n * before render, so it still produces an empty paragraph that\n * `aria-describedby` points at. `FieldRow` and the wider React ecosystem\n * share this limit — pass a falsy child instead of a component that may\n * render nothing.\n */\nexport const FieldDescription = forwardRef<\n HTMLParagraphElement,\n HTMLAttributes<HTMLParagraphElement>\n>(function FieldDescription({ className, children, id, ...props }, ref) {\n const { registerDescription, unregisterDescription } = useFieldContext(\"FieldDescription\");\n // Own id per INSTANCE — two `FieldDescription`s under one `FieldRoot` (a hint\n // above the control and a hint below it) must not collide on one shared id.\n const instanceId = useId();\n const generatedId = `${instanceId}-description`;\n // Caller-supplied `id` wins — same \"child wins\" resolution `FieldControl`\n // already uses (`childProps.id ?? generatedId`). Resolving ONE effective id\n // up front, and destructuring `id` out of `...props` above, means the value\n // registered into `aria-describedby` and the value actually rendered on the\n // `<p>` can never diverge (PR #97 review finding 3).\n const descriptionId = id ?? generatedId;\n // Same falsy-content convention `FieldRow` uses (`description ? … : null`)\n // — see `hasRenderableContent` (`../../lib/has-renderable-content`) for\n // the full rationale, shared with `FieldError` below and `FieldRow`.\n const hasContent = hasRenderableContent(children);\n\n useLayoutEffect(() => {\n if (!hasContent) return undefined;\n registerDescription(descriptionId);\n return () => unregisterDescription(descriptionId);\n }, [hasContent, descriptionId, registerDescription, unregisterDescription]);\n\n if (!hasContent) return null;\n\n return (\n <p\n ref={ref}\n id={descriptionId}\n data-slot=\"field-description\"\n className={cn(\"text-body text-muted-foreground\", className)}\n {...props}\n >\n {children}\n </p>\n );\n});\n\n// ── FieldError ────────────────────────────────────────────────────────────\n\n/**\n * Validation error text, announced via `role=\"alert\"`. Renders nothing —\n * and registers no `aria-describedby` reference — when `children` is falsy\n * (`false`/`0`/`\"\"`/`null`/`undefined`), an empty array, or an array\n * containing only falsy values (`{errors.map(...)}` on an empty array is\n * exactly how a real form renders \"no errors\") — matching `FieldRow`'s\n * `error ? … : null` convention: `{error && <FieldError>{error}</FieldError>}`\n * is the supported way to express \"no error\".\n *\n * **Known limit:** a child that is itself a COMPONENT that renders nothing\n * (returns `null`/an empty fragment) is not knowable from the element\n * before render, so it still produces an empty `role=\"alert\"` element that\n * `aria-describedby` points at (a screen reader announces an empty alert).\n * `FieldRow` and the wider React ecosystem share this limit — pass a falsy\n * child instead of a component that may render nothing.\n */\nexport const FieldError = forwardRef<HTMLParagraphElement, HTMLAttributes<HTMLParagraphElement>>(\n function FieldError({ className, children, id, ...props }, ref) {\n const { registerError, unregisterError } = useFieldContext(\"FieldError\");\n // Own id per INSTANCE — same reasoning as `FieldDescription`.\n const instanceId = useId();\n const generatedId = `${instanceId}-error`;\n // Caller-supplied `id` wins — same resolution as `FieldDescription`/\n // `FieldControl` (PR #97 review finding 3: this had the identical\n // ordering bug as `FieldDescription`).\n const errorId = id ?? generatedId;\n // Same falsy-content convention as `FieldDescription`/`FieldRow`'s\n // `error ? … : null` — see `hasRenderableContent`\n // (`../../lib/has-renderable-content`) for the full rationale.\n const hasContent = hasRenderableContent(children);\n\n useLayoutEffect(() => {\n if (!hasContent) return undefined;\n registerError(errorId);\n return () => unregisterError(errorId);\n }, [hasContent, errorId, registerError, unregisterError]);\n\n if (!hasContent) return null;\n\n return (\n <p\n ref={ref}\n id={errorId}\n role=\"alert\"\n data-slot=\"field-error\"\n className={cn(\"text-body font-medium text-destructive-text\", className)}\n {...props}\n >\n {children}\n </p>\n );\n },\n);\n"],"mappings":";;;;;;;;;;;;;;;;AAEA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AACP,SAAS,YAAY;AA2Hf;AAjFC,IAAM,YAAY,WAA2C,SAASA,WAC3E,EAAE,UAAU,OAAO,WAAW,OAAO,WAAW,UAAU,GAAG,MAAM,GACnE,KACA;AAMA,QAAM,CAAC,gBAAgB,iBAAiB,IAAI,SAA4B,CAAC,CAAC;AAC1E,QAAM,sBAAsB,YAAY,CAAC,WAAmB;AAC1D,sBAAkB,CAAC,SAAU,KAAK,SAAS,MAAM,IAAI,OAAO,CAAC,GAAG,MAAM,MAAM,CAAE;AAAA,EAChF,GAAG,CAAC,CAAC;AACL,QAAM,wBAAwB,YAAY,CAAC,WAAmB;AAC5D,sBAAkB,CAAC,SAAU,KAAK,SAAS,MAAM,IAAI,KAAK,OAAO,CAAC,MAAM,MAAM,MAAM,IAAI,IAAK;AAAA,EAC/F,GAAG,CAAC,CAAC;AAEL,QAAM,CAAC,UAAU,WAAW,IAAI,SAA4B,CAAC,CAAC;AAC9D,QAAM,gBAAgB,YAAY,CAAC,UAAkB;AACnD,gBAAY,CAAC,SAAU,KAAK,SAAS,KAAK,IAAI,OAAO,CAAC,GAAG,MAAM,KAAK,CAAE;AAAA,EACxE,GAAG,CAAC,CAAC;AACL,QAAM,kBAAkB,YAAY,CAAC,UAAkB;AACrD,gBAAY,CAAC,SAAU,KAAK,SAAS,KAAK,IAAI,KAAK,OAAO,CAAC,MAAM,MAAM,KAAK,IAAI,IAAK;AAAA,EACvF,GAAG,CAAC,CAAC;AAOL,QAAM,cAAc,QAAQ,MAAM;AAChC,UAAM,MAAM,CAA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,QAAO;AAExB,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,IAAI;AAAA,MACJ,aAAU;AAAA,MACV,WAAW,GAAG,mCAAmC,SAAS;AAAA,MACzD,GAAG;AAAA,MAEH;AAAA;AAAA,EACH;AAEJ,CAAC;AAoBM,IAAM,aAAa;AAAA,EACxB,SAASC,YAAW,EAAE,WAAW,UAAU,IAAI,GAAG,MAAM,GAAG,KAAK;AAC9D,UAAM,EAAE,eAAe,gBAAgB,IAAI,gBAAgB,YAAY;AAEvE,UAAM,aAAa,MAAM;AACzB,UAAM,cAAc,GAAG,UAAU;AAIjC,UAAM,UAAU,MAAM;AAItB,UAAM,aAAa,qBAAqB,QAAQ;AAEhD,oBAAgB,MAAM;AACpB,UAAI,CAAC,WAAY,QAAO;AACxB,oBAAc,OAAO;AACrB,aAAO,MAAM,gBAAgB,OAAO;AAAA,IACtC,GAAG,CAAC,YAAY,SAAS,eAAe,eAAe,CAAC;AAExD,QAAI,CAAC,WAAY,QAAO;AAExB,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,IAAI;AAAA,QACJ,MAAK;AAAA,QACL,aAAU;AAAA,QACV,WAAW,GAAG,+CAA+C,SAAS;AAAA,QACrE,GAAG;AAAA,QAEH;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;","names":["FieldRoot","FieldLabel","FieldControl","FieldDescription","FieldError"]}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/components/schema-form/from-json-schema.ts
|
|
4
|
+
var UNSUPPORTED_COMBINATORS = ["$ref", "allOf", "oneOf", "anyOf", "not"];
|
|
5
|
+
var UnsupportedJsonSchemaError = class extends Error {
|
|
6
|
+
constructor(keyword, path) {
|
|
7
|
+
super(
|
|
8
|
+
`fromJsonSchema: unsupported JSON Schema keyword "${keyword}" at "${path}". fromJsonSchema() maps only a narrow, documented subset (string/number/integer/boolean/enum/array-of-string/object) and does not resolve $ref or implement allOf/oneOf/anyOf/not. Pre-resolve or inline this part of the schema before calling fromJsonSchema(), or build the affected FieldSpec by hand.`
|
|
9
|
+
);
|
|
10
|
+
this.name = "UnsupportedJsonSchemaError";
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
function isPlainObject(value) {
|
|
14
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
15
|
+
}
|
|
16
|
+
function assertSupported(schema, path) {
|
|
17
|
+
if (!isPlainObject(schema)) return;
|
|
18
|
+
for (const keyword of UNSUPPORTED_COMBINATORS) {
|
|
19
|
+
if (keyword in schema) throw new UnsupportedJsonSchemaError(keyword, path);
|
|
20
|
+
}
|
|
21
|
+
if (isPlainObject(schema.properties)) {
|
|
22
|
+
for (const [key, sub] of Object.entries(schema.properties)) {
|
|
23
|
+
assertSupported(sub, `${path}/properties/${key}`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if ("items" in schema) {
|
|
27
|
+
assertSupported(schema.items, `${path}/items`);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function stringArray(values) {
|
|
31
|
+
if (!Array.isArray(values) || !values.every((v) => typeof v === "string")) return null;
|
|
32
|
+
return values;
|
|
33
|
+
}
|
|
34
|
+
var SUPPORTED_STRING_FORMATS = /* @__PURE__ */ new Set(["email", "uri", "date", "date-time"]);
|
|
35
|
+
function mapProperty(name, schema, required) {
|
|
36
|
+
if (!isPlainObject(schema)) return null;
|
|
37
|
+
const title = typeof schema.title === "string" ? schema.title : void 0;
|
|
38
|
+
const description = typeof schema.description === "string" ? schema.description : void 0;
|
|
39
|
+
const base = {
|
|
40
|
+
name,
|
|
41
|
+
...title !== void 0 ? { label: title } : {},
|
|
42
|
+
...description !== void 0 ? { description } : {},
|
|
43
|
+
...required ? { required: true } : {}
|
|
44
|
+
};
|
|
45
|
+
switch (schema.type) {
|
|
46
|
+
case "string": {
|
|
47
|
+
const enumValues = stringArray(schema.enum);
|
|
48
|
+
if (enumValues) {
|
|
49
|
+
return {
|
|
50
|
+
type: "enum",
|
|
51
|
+
...base,
|
|
52
|
+
options: enumValues,
|
|
53
|
+
...typeof schema.default === "string" ? { default: schema.default } : {}
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
const format = typeof schema.format === "string" && SUPPORTED_STRING_FORMATS.has(schema.format) ? schema.format : void 0;
|
|
57
|
+
return {
|
|
58
|
+
type: "string",
|
|
59
|
+
...base,
|
|
60
|
+
...format !== void 0 ? { format } : {},
|
|
61
|
+
...Number.isInteger(schema.minLength) && schema.minLength >= 0 ? { minLength: schema.minLength } : {},
|
|
62
|
+
...Number.isInteger(schema.maxLength) && schema.maxLength >= 0 ? { maxLength: schema.maxLength } : {},
|
|
63
|
+
...typeof schema.pattern === "string" ? { pattern: schema.pattern } : {},
|
|
64
|
+
...typeof schema.default === "string" ? { default: schema.default } : {}
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
case "number": {
|
|
68
|
+
const validDefault = typeof schema.default === "number";
|
|
69
|
+
return {
|
|
70
|
+
type: "number",
|
|
71
|
+
...base,
|
|
72
|
+
...typeof schema.minimum === "number" ? { min: schema.minimum } : {},
|
|
73
|
+
...typeof schema.maximum === "number" ? { max: schema.maximum } : {},
|
|
74
|
+
...validDefault ? { default: schema.default } : {}
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
case "integer": {
|
|
78
|
+
const validDefault = typeof schema.default === "number" && Number.isInteger(schema.default);
|
|
79
|
+
return {
|
|
80
|
+
type: "integer",
|
|
81
|
+
...base,
|
|
82
|
+
...typeof schema.minimum === "number" ? { min: schema.minimum } : {},
|
|
83
|
+
...typeof schema.maximum === "number" ? { max: schema.maximum } : {},
|
|
84
|
+
...validDefault ? { default: schema.default } : {}
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
case "boolean":
|
|
88
|
+
return {
|
|
89
|
+
type: "boolean",
|
|
90
|
+
...base,
|
|
91
|
+
...typeof schema.default === "boolean" ? { default: schema.default } : {}
|
|
92
|
+
};
|
|
93
|
+
case "array": {
|
|
94
|
+
if (!isPlainObject(schema.items) || schema.items.type !== "string") return null;
|
|
95
|
+
const itemEnum = stringArray(schema.items.enum);
|
|
96
|
+
if (itemEnum) {
|
|
97
|
+
const enumDefault = stringArray(schema.default);
|
|
98
|
+
return {
|
|
99
|
+
type: "multi-enum",
|
|
100
|
+
...base,
|
|
101
|
+
options: itemEnum,
|
|
102
|
+
...enumDefault && enumDefault.every((v) => itemEnum.includes(v)) ? { default: enumDefault } : {}
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
const listDefault = stringArray(schema.default);
|
|
106
|
+
return {
|
|
107
|
+
type: "list",
|
|
108
|
+
...base,
|
|
109
|
+
...Number.isInteger(schema.minItems) && schema.minItems >= 0 ? { minItems: schema.minItems } : {},
|
|
110
|
+
...Number.isInteger(schema.maxItems) && schema.maxItems >= 0 ? { maxItems: schema.maxItems } : {},
|
|
111
|
+
...listDefault ? { default: listDefault } : {}
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
case "object": {
|
|
115
|
+
const nested = mapProperties(schema);
|
|
116
|
+
if (nested.length === 0) return null;
|
|
117
|
+
return {
|
|
118
|
+
type: "group",
|
|
119
|
+
name,
|
|
120
|
+
...title !== void 0 ? { label: title } : {},
|
|
121
|
+
...description !== void 0 ? { description } : {},
|
|
122
|
+
...required ? { required: true } : {},
|
|
123
|
+
variant: "advanced",
|
|
124
|
+
groups: [{ key: name, label: title ?? name, fields: nested }]
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
default:
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
function mapProperties(objectSchema) {
|
|
132
|
+
const properties = isPlainObject(objectSchema.properties) ? objectSchema.properties : {};
|
|
133
|
+
const required = stringArray(objectSchema.required) ?? [];
|
|
134
|
+
const fields = [];
|
|
135
|
+
for (const [name, propertySchema] of Object.entries(properties)) {
|
|
136
|
+
const field = mapProperty(name, propertySchema, required.includes(name));
|
|
137
|
+
if (field) fields.push(field);
|
|
138
|
+
}
|
|
139
|
+
return fields;
|
|
140
|
+
}
|
|
141
|
+
function fromJsonSchema(schema, options) {
|
|
142
|
+
assertSupported(schema, "#");
|
|
143
|
+
if (!isPlainObject(schema) || schema.type !== "object") {
|
|
144
|
+
throw new UnsupportedJsonSchemaError('type (expected "object" at the top level)', "#");
|
|
145
|
+
}
|
|
146
|
+
return {
|
|
147
|
+
formName: options.formName,
|
|
148
|
+
title: options.title ?? (typeof schema.title === "string" ? schema.title : void 0),
|
|
149
|
+
description: options.description ?? (typeof schema.description === "string" ? schema.description : void 0),
|
|
150
|
+
submitLabel: options.submitLabel,
|
|
151
|
+
fields: mapProperties(schema)
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
function jsonSchemaRequestBody(spec, values) {
|
|
155
|
+
return collectRequestBody(spec.fields, values);
|
|
156
|
+
}
|
|
157
|
+
function collectRequestBody(fields, values) {
|
|
158
|
+
const body = {};
|
|
159
|
+
for (const field of fields) {
|
|
160
|
+
if (field.type === "group") {
|
|
161
|
+
const branch = field.groups[0];
|
|
162
|
+
if (branch) body[field.name] = collectRequestBody(branch.fields, values);
|
|
163
|
+
continue;
|
|
164
|
+
}
|
|
165
|
+
const value = values[field.name];
|
|
166
|
+
if (value !== void 0) body[field.name] = value;
|
|
167
|
+
}
|
|
168
|
+
return body;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export {
|
|
172
|
+
UnsupportedJsonSchemaError,
|
|
173
|
+
fromJsonSchema,
|
|
174
|
+
jsonSchemaRequestBody
|
|
175
|
+
};
|
|
176
|
+
//# sourceMappingURL=chunk-GV6GQXKX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/schema-form/from-json-schema.ts"],"sourcesContent":["/**\n * from-json-schema.ts — `fromJsonSchema()`: the narrow, documented JSON\n * Schema → `FormSpec` adapter (issue #22, maintainer ruling 2026-09-01).\n *\n * Many consumers already have their config described as JSON Schema (an\n * OpenAPI request body, a connector manifest). This maps ONLY the common\n * subset such schemas actually use onto `SchemaForm`'s `FieldSpec`\n * vocabulary:\n *\n * { type: \"string\" } → StringFieldSpec\n * { type: \"string\", enum: [...] } → EnumFieldSpec\n * { type: \"number\" | \"integer\" } → NumberFieldSpec / IntegerFieldSpec\n * { type: \"boolean\" } → BooleanFieldSpec\n * { type: \"array\", items: { type: \"string\" } } → ListFieldSpec (free text)\n * { type: \"array\",\n * items: { type: \"string\", enum: [...] } } → MultiEnumFieldSpec\n * (a CONSTRAINED array\n * item schema maps onto\n * the field type that\n * actually enforces the\n * constraint — see\n * \"Constraint keywords\"\n * below for why this\n * one keyword IS read)\n * { type: \"object\", properties: {...} } → GroupFieldSpec\n * (variant: \"advanced\",\n * one always-open branch)\n *\n * `title`/`description` map to `label`/`description`; `required` (the\n * enclosing object schema's array of property names) maps to `required:\n * true`; `default` maps when it is type-compatible; `minLength`/`maxLength`/\n * `pattern`/`minimum`/`maximum`/`minItems`/`maxItems` map to their FieldSpec\n * equivalents. `format` maps only the four values `StringFieldSpec` itself\n * understands (`email`/`uri`/`date`/`date-time`) — any other `format` value\n * (`\"binary\"`, `\"password\"`, a custom one) is ignored predictably, the same\n * way an unknown JSON Schema `format` is defined to be advisory, not\n * validating.\n *\n * Deliberately NOT a general draft-07/2020-12 implementation (the maintainer\n * ruling's explicit narrow option) — this module does not resolve `$ref` and\n * does not implement the `allOf`/`oneOf`/`anyOf`/`not` combinators. Those\n * keywords change what a schema actually MEANS, and approximating them would\n * risk producing a field that looks plausible but is wrong (e.g. rendering a\n * `$ref`'d object as an empty string field) — silently wrong is exactly what\n * this adapter must never be. So `fromJsonSchema()` REFUSES: any of those\n * five keywords, found anywhere in the input (top-level or nested inside a\n * property/items schema), throws `UnsupportedJsonSchemaError` naming the\n * keyword and its JSON-Pointer-style path. Pre-resolve/inline that part of\n * the schema before calling `fromJsonSchema()`, or hand-write the affected\n * `FieldSpec`.\n *\n * A property whose `type` this subset does not cover (e.g. `\"null\"`, a\n * JSON-Schema-2020-12 array-of-types, an array of non-string items, an\n * object schema with no `properties`) is DROPPED from the result —\n * predictable and non-fatal, the same lenient-parse philosophy\n * `normalizeFormSpec` already uses for the render path, because omitting one\n * field is recoverable in a way a mis-mapped `$ref`/combinator is not.\n *\n * CONSTRAINT KEYWORDS this subset does not read: `const`, `if`/`then`/`else`,\n * `dependentSchemas`, `dependentRequired`, `additionalProperties`,\n * `patternProperties`, `propertyNames`, `contains`, `multipleOf`,\n * `exclusiveMinimum`/`exclusiveMaximum`, `uniqueItems`. These are\n * READ-IGNORED, not refused — unlike `$ref`/`allOf`/`oneOf`/`anyOf`/`not`,\n * none of them changes what TYPE a property maps to, so ignoring one never\n * produces a wrongly-shaped field. But ignoring one DOES widen what the\n * rendered form accepts relative to the source schema (a `const`-pinned\n * property renders as an ordinary editable field, not a fixed one; a\n * `multipleOf`-constrained number accepts any value in range). This is the\n * one place `fromJsonSchema()` is honestly silently-permissive rather than\n * silently-wrong or refusing — call it out in review when a schema leans on\n * one of these keywords for validation the mapped form will not enforce.\n * `items.enum` is the one exception among these: a constrained array-item\n * schema is common enough (and cheap enough to map faithfully) that it reads\n * `items.enum` and maps onto `MultiEnumFieldSpec` — see the table above —\n * rather than joining this ignore list and widening into a free-text\n * `ListFieldSpec`.\n *\n * Widening this subset later (more `format`s, `$ref` resolution) is an\n * additive, non-breaking change to this one function — see issue #22's\n * \"worth having alongside\" list.\n */\n\nimport type { FieldSpec, FormSpec, FormValues } from \"./schema-form-spec\";\n\n/**\n * The JSON Schema keywords this adapter refuses to approximate. Each changes\n * a schema's actual shape in a way a narrow field-by-field mapping cannot\n * safely ignore.\n */\nconst UNSUPPORTED_COMBINATORS = [\"$ref\", \"allOf\", \"oneOf\", \"anyOf\", \"not\"] as const;\n\n/**\n * Thrown by `fromJsonSchema()` when the input uses a JSON Schema keyword\n * outside its documented subset (see this module's doc comment) — never\n * silently mismapped.\n */\nexport class UnsupportedJsonSchemaError extends Error {\n constructor(keyword: string, path: string) {\n super(\n `fromJsonSchema: unsupported JSON Schema keyword \"${keyword}\" at \"${path}\". ` +\n \"fromJsonSchema() maps only a narrow, documented subset (string/number/\" +\n \"integer/boolean/enum/array-of-string/object) and does not resolve \" +\n \"$ref or implement allOf/oneOf/anyOf/not. Pre-resolve or inline this \" +\n \"part of the schema before calling fromJsonSchema(), or build the \" +\n \"affected FieldSpec by hand.\",\n );\n this.name = \"UnsupportedJsonSchemaError\";\n }\n}\n\ntype JsonSchemaObject = Record<string, unknown>;\n\nfunction isPlainObject(value: unknown): value is JsonSchemaObject {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\n/** Recursively asserts none of `UNSUPPORTED_COMBINATORS` appears anywhere under `schema`. */\nfunction assertSupported(schema: unknown, path: string): void {\n if (!isPlainObject(schema)) return;\n for (const keyword of UNSUPPORTED_COMBINATORS) {\n if (keyword in schema) throw new UnsupportedJsonSchemaError(keyword, path);\n }\n if (isPlainObject(schema.properties)) {\n for (const [key, sub] of Object.entries(schema.properties)) {\n assertSupported(sub, `${path}/properties/${key}`);\n }\n }\n if (\"items\" in schema) {\n assertSupported(schema.items, `${path}/items`);\n }\n}\n\n/** `values` narrowed to `string[]`, or `null` if any entry isn't a string. */\nfunction stringArray(values: unknown): string[] | null {\n if (!Array.isArray(values) || !values.every((v) => typeof v === \"string\")) return null;\n return values as string[];\n}\n\nconst SUPPORTED_STRING_FORMATS = new Set([\"email\", \"uri\", \"date\", \"date-time\"]);\n\nfunction mapProperty(name: string, schema: unknown, required: boolean): FieldSpec | null {\n if (!isPlainObject(schema)) return null;\n\n const title = typeof schema.title === \"string\" ? schema.title : undefined;\n const description = typeof schema.description === \"string\" ? schema.description : undefined;\n const base = {\n name,\n ...(title !== undefined ? { label: title } : {}),\n ...(description !== undefined ? { description } : {}),\n ...(required ? { required: true as const } : {}),\n };\n\n switch (schema.type) {\n case \"string\": {\n const enumValues = stringArray(schema.enum);\n if (enumValues) {\n return {\n type: \"enum\",\n ...base,\n options: enumValues,\n ...(typeof schema.default === \"string\" ? { default: schema.default } : {}),\n };\n }\n const format =\n typeof schema.format === \"string\" && SUPPORTED_STRING_FORMATS.has(schema.format)\n ? (schema.format as \"email\" | \"uri\" | \"date\" | \"date-time\")\n : undefined;\n return {\n type: \"string\",\n ...base,\n ...(format !== undefined ? { format } : {}),\n ...(Number.isInteger(schema.minLength) && (schema.minLength as number) >= 0\n ? { minLength: schema.minLength as number }\n : {}),\n ...(Number.isInteger(schema.maxLength) && (schema.maxLength as number) >= 0\n ? { maxLength: schema.maxLength as number }\n : {}),\n ...(typeof schema.pattern === \"string\" ? { pattern: schema.pattern } : {}),\n ...(typeof schema.default === \"string\" ? { default: schema.default } : {}),\n };\n }\n\n case \"number\": {\n const validDefault = typeof schema.default === \"number\";\n return {\n type: \"number\",\n ...base,\n ...(typeof schema.minimum === \"number\" ? { min: schema.minimum } : {}),\n ...(typeof schema.maximum === \"number\" ? { max: schema.maximum } : {}),\n ...(validDefault ? { default: schema.default as number } : {}),\n };\n }\n\n case \"integer\": {\n const validDefault = typeof schema.default === \"number\" && Number.isInteger(schema.default);\n return {\n type: \"integer\",\n ...base,\n ...(typeof schema.minimum === \"number\" ? { min: schema.minimum } : {}),\n ...(typeof schema.maximum === \"number\" ? { max: schema.maximum } : {}),\n ...(validDefault ? { default: schema.default as number } : {}),\n };\n }\n\n case \"boolean\":\n return {\n type: \"boolean\",\n ...base,\n ...(typeof schema.default === \"boolean\" ? { default: schema.default } : {}),\n };\n\n case \"array\": {\n // Only array-of-string is in the documented subset (issue #22's\n // \"array-of-string\" entry) — an array of numbers/objects/booleans, or\n // one with no `items` schema at all, is dropped predictably rather than\n // guessed at.\n if (!isPlainObject(schema.items) || schema.items.type !== \"string\") return null;\n\n // A CONSTRAINED item schema (`items.enum`) is a multi-select from a\n // fixed option list, not free text — map it onto the FieldSpec that\n // actually enforces that constraint (`multi-enum`) rather than\n // relaxing it into an unconstrained `list` (fix-round-1, issue #22: a\n // validator probe found `{type:'array', items:{type:'string',\n // enum:[...]}}` was silently widening to free text). `minItems`/\n // `maxItems` have no `multi-enum` equivalent and are dropped here —\n // documented in this module's doc comment alongside the other\n // constraint keywords this subset does not enforce.\n const itemEnum = stringArray(schema.items.enum);\n if (itemEnum) {\n const enumDefault = stringArray(schema.default);\n return {\n type: \"multi-enum\",\n ...base,\n options: itemEnum,\n ...(enumDefault && enumDefault.every((v) => itemEnum.includes(v))\n ? { default: enumDefault }\n : {}),\n };\n }\n\n const listDefault = stringArray(schema.default);\n return {\n type: \"list\",\n ...base,\n ...(Number.isInteger(schema.minItems) && (schema.minItems as number) >= 0\n ? { minItems: schema.minItems as number }\n : {}),\n ...(Number.isInteger(schema.maxItems) && (schema.maxItems as number) >= 0\n ? { maxItems: schema.maxItems as number }\n : {}),\n ...(listDefault ? { default: listDefault } : {}),\n };\n }\n\n case \"object\": {\n const nested = mapProperties(schema);\n if (nested.length === 0) return null; // an empty/property-less object has nothing to render\n return {\n type: \"group\",\n name,\n ...(title !== undefined ? { label: title } : {}),\n ...(description !== undefined ? { description } : {}),\n ...(required ? { required: true } : {}),\n variant: \"advanced\",\n groups: [{ key: name, label: title ?? name, fields: nested }],\n };\n }\n\n default:\n // An unrecognized/absent `type` (JSON-Schema-2020-12 type arrays,\n // `\"null\"`, a schema with no `type` at all) — outside the documented\n // subset, dropped predictably rather than mismapped.\n return null;\n }\n}\n\n/** Maps every property of an OBJECT schema onto `FieldSpec[]`, dropping unsupported ones. */\nfunction mapProperties(objectSchema: JsonSchemaObject): FieldSpec[] {\n const properties = isPlainObject(objectSchema.properties) ? objectSchema.properties : {};\n const required = stringArray(objectSchema.required) ?? [];\n const fields: FieldSpec[] = [];\n for (const [name, propertySchema] of Object.entries(properties)) {\n const field = mapProperty(name, propertySchema, required.includes(name));\n if (field) fields.push(field);\n }\n return fields;\n}\n\nexport interface FromJsonSchemaOptions {\n /** `FormSpec.formName` — required; JSON Schema has no equivalent stable identifier. */\n formName: string;\n /** Overrides the mapped `schema.title`. */\n title?: string;\n /** Overrides the mapped `schema.description`. */\n description?: string;\n /** `FormSpec.submitLabel` — JSON Schema has no equivalent. */\n submitLabel?: string;\n}\n\n/**\n * Maps a JSON Schema OBJECT schema (an OpenAPI request body, a connector\n * manifest) onto a `FormSpec`, using only the documented subset described in\n * this module's doc comment. Throws `UnsupportedJsonSchemaError` if `schema`\n * (at any depth) uses `$ref`/`allOf`/`oneOf`/`anyOf`/`not`, or if the\n * top-level schema is not an object schema — never silently mismapped. A\n * property whose shape falls outside the subset is dropped, not thrown on.\n */\nexport function fromJsonSchema(schema: unknown, options: FromJsonSchemaOptions): FormSpec {\n assertSupported(schema, \"#\");\n if (!isPlainObject(schema) || schema.type !== \"object\") {\n throw new UnsupportedJsonSchemaError('type (expected \"object\" at the top level)', \"#\");\n }\n return {\n formName: options.formName,\n title: options.title ?? (typeof schema.title === \"string\" ? schema.title : undefined),\n description:\n options.description ??\n (typeof schema.description === \"string\" ? schema.description : undefined),\n submitLabel: options.submitLabel,\n fields: mapProperties(schema),\n };\n}\n\n/**\n * Reconstructs the NESTED JSON object shape that `fromJsonSchema()`'s\n * `{ type: \"object\", properties: {...} }` mapping flattens away (PR #119\n * review thread 3, P1). `SchemaForm` stores every field's value in one flat\n * `FormValues` map keyed by BARE property name (`GroupFieldSpec` — see the\n * \"no notion of an active branch\" comment on `schema-form-spec.ts`'s\n * `GroupFieldSpec` — has no value slot of its own), so a form built from a\n * nested schema like `{ address: { properties: { city, zip } } }` submits\n * `{ city, zip }` instead of the advertised `{ address: { city, zip } }`.\n *\n * Call this (instead of reading `effectiveValues`/`onSubmit`'s payload\n * directly) when the schema passed to `fromJsonSchema()` had nested\n * `\"object\"` properties and the caller needs the request body back in its\n * original shape — e.g. `SchemaFormTestAction`'s `onTest` or a submit\n * handler that forwards the payload to the API the schema describes.\n *\n * Walks `spec.fields` and, for each `group` field this adapter produced\n * (always `variant: \"advanced\"`, always exactly one branch — see\n * `mapProperty`'s `\"object\"` case), recurses into `groups[0].fields` and\n * nests the result under that group's own `name` instead of splicing its\n * children into the top level.\n *\n * Two known, out-of-scope limits (see the reply on review thread 3):\n * 1. Two properties at DIFFERENT nesting depths that happen to share a bare\n * name (`{ name }` at the top level and `{ address: { name } }`) collide\n * in the flat `FormValues` map itself, upstream of this function — this\n * function cannot recover data `SchemaForm` never kept separate.\n * 2. A nested object's own `required` flag (`GroupFieldSpec.required`) is\n * mapped but never validated anywhere in `schema-form-spec.ts`'s\n * `collectValidatableFields` — fixing that touches a file outside this\n * unit's scope fence and is called out, unfixed, in the PR review reply.\n */\nexport function jsonSchemaRequestBody(spec: FormSpec, values: FormValues): Record<string, unknown> {\n return collectRequestBody(spec.fields, values);\n}\n\nfunction collectRequestBody(fields: FieldSpec[], values: FormValues): Record<string, unknown> {\n const body: Record<string, unknown> = {};\n for (const field of fields) {\n if (field.type === \"group\") {\n // `fromJsonSchema()` only ever emits a single-branch `\"advanced\"`\n // group per nested object (`mapProperty`'s `\"object\"` case) — nest\n // the branch's reconstructed values under the group's own name.\n const branch = field.groups[0];\n if (branch) body[field.name] = collectRequestBody(branch.fields, values);\n continue;\n }\n const value = values[field.name];\n if (value !== undefined) body[field.name] = value;\n }\n return body;\n}\n"],"mappings":";;;AAyFA,IAAM,0BAA0B,CAAC,QAAQ,SAAS,SAAS,SAAS,KAAK;AAOlE,IAAM,6BAAN,cAAyC,MAAM;AAAA,EACpD,YAAY,SAAiB,MAAc;AACzC;AAAA,MACE,oDAAoD,OAAO,SAAS,IAAI;AAAA,IAM1E;AACA,SAAK,OAAO;AAAA,EACd;AACF;AAIA,SAAS,cAAc,OAA2C;AAChE,SAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC5E;AAGA,SAAS,gBAAgB,QAAiB,MAAoB;AAC5D,MAAI,CAAC,cAAc,MAAM,EAAG;AAC5B,aAAW,WAAW,yBAAyB;AAC7C,QAAI,WAAW,OAAQ,OAAM,IAAI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