@stacksjs/stx 0.2.413 → 0.2.415
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/appearance-bootstrap.js +1 -1
- package/dist/binding-manifest.d.ts +1 -1
- package/dist/builtins/image-delivery.js +19 -11
- package/dist/bundle-analyzer.js +20 -20
- package/dist/chunk-020xyn9q.js +3 -0
- package/dist/chunk-04jhmfbz.js +2 -0
- package/dist/chunk-0pnj3zt2.js +2 -0
- package/dist/{chunk-bwjxk1dw.js → chunk-0zaess6f.js} +29 -29
- package/dist/chunk-1098mas0.js +2 -0
- package/dist/chunk-169n1vpx.js +12 -0
- package/dist/chunk-18vmfkcc.js +2 -0
- package/dist/chunk-1b6t12hd.js +2 -0
- package/dist/chunk-1xdzcy9d.js +14 -0
- package/dist/chunk-1zs30k3y.js +2 -0
- package/dist/chunk-2ce7f416.js +2 -0
- package/dist/chunk-340a824p.js +2 -0
- package/dist/chunk-393341w7.js +2 -0
- package/dist/chunk-39g1134q.js +2 -0
- package/dist/chunk-3efw27as.js +2785 -0
- package/dist/chunk-3kthfs03.js +3 -0
- package/dist/chunk-3qn1wcdg.js +2 -0
- package/dist/chunk-3s2vnqcf.js +2 -0
- package/dist/chunk-42wbs8vq.js +17 -0
- package/dist/chunk-4bjravgk.js +2 -0
- package/dist/chunk-5gsxpaqk.js +2 -0
- package/dist/{chunk-bwsxym3d.js → chunk-5qns2sdz.js} +17 -17
- package/dist/chunk-6cfa3g0r.js +2 -0
- package/dist/{chunk-bjar18jd.js → chunk-6h38kkjf.js} +46 -52
- package/dist/chunk-6hc5vz20.js +3 -0
- package/dist/chunk-6q6g76vg.js +499 -0
- package/dist/chunk-74j18qk0.js +930 -0
- package/dist/chunk-752hw7cd.js +4 -0
- package/dist/{chunk-kgd8kchy.js → chunk-765e1s44.js} +11 -76
- package/dist/chunk-7gkv67ky.js +4 -0
- package/dist/chunk-7z2ra0yf.js +2 -0
- package/dist/chunk-8eqrwj1k.js +20 -0
- package/dist/chunk-8nhshfz6.js +5 -0
- package/dist/chunk-92ps1xpk.js +2 -0
- package/dist/chunk-96k8s808.js +3 -0
- package/dist/chunk-9amp82bx.js +7 -0
- package/dist/chunk-9g27ybyr.js +3 -0
- package/dist/chunk-9p9qkbtg.js +3 -0
- package/dist/{chunk-xq1acw1r.js → chunk-9pt8fd2n.js} +13 -13
- package/dist/{chunk-24zher49.js → chunk-9vrja6vp.js} +4 -4
- package/dist/chunk-9xrbve19.js +2 -0
- package/dist/chunk-a688m6js.js +3 -0
- package/dist/chunk-ak1cgcah.js +5 -0
- package/dist/{chunk-4m7ajama.js → chunk-amd6ey3t.js} +14 -14
- package/dist/chunk-amtr3rmf.js +11 -0
- package/dist/chunk-atws6p5s.js +2 -0
- package/dist/chunk-b84h16er.js +61 -0
- package/dist/chunk-b98be3yp.js +32 -0
- package/dist/{chunk-hx998w7n.js → chunk-bay9s6rs.js} +13 -13
- package/dist/chunk-ce1sejr3.js +3 -0
- package/dist/chunk-cg8hg6cs.js +3 -0
- package/dist/{chunk-4f9zyfdw.js → chunk-czxt605c.js} +4 -5
- package/dist/chunk-dd8cja4h.js +2 -0
- package/dist/chunk-dgdm3hy3.js +2 -0
- package/dist/chunk-e9hs7kk6.js +12 -0
- package/dist/chunk-eed4fwps.js +3 -0
- package/dist/chunk-ej9j6k1q.js +3 -0
- package/dist/chunk-et0rr8c7.js +3 -0
- package/dist/chunk-f1sxycmv.js +2 -0
- package/dist/chunk-f46qsp4m.js +4 -0
- package/dist/chunk-fbcv4fes.js +2 -0
- package/dist/{chunk-bjcsc6wx.js → chunk-fh1qrp68.js} +21 -21
- package/dist/chunk-fjs0a8h7.js +2 -0
- package/dist/chunk-fpfzm238.js +2 -0
- package/dist/chunk-fr2txj8q.js +829 -0
- package/dist/{chunk-xssw417m.js → chunk-ft4p6d28.js} +14 -14
- package/dist/chunk-fyzajkrx.js +2 -0
- package/dist/chunk-fzapbw9p.js +3 -0
- package/dist/chunk-g03s93qr.js +3 -0
- package/dist/chunk-g186znp9.js +33 -0
- package/dist/chunk-gawrg4gb.js +216 -0
- package/dist/chunk-gc1drn2p.js +2 -0
- package/dist/chunk-gea5hf0v.js +2 -0
- package/dist/chunk-gqv3ta5d.js +2 -0
- package/dist/chunk-h6kp2m9r.js +2 -0
- package/dist/chunk-h6zsqb9r.js +3 -0
- package/dist/{chunk-2snqdnk9.js → chunk-h85hrwkq.js} +13 -13
- package/dist/chunk-hbxz85wy.js +2 -0
- package/dist/chunk-hepd9qgx.js +6 -0
- package/dist/chunk-hhnw2sn3.js +2 -0
- package/dist/chunk-hjg3ndgh.js +2 -0
- package/dist/chunk-hk1mj4tz.js +2 -0
- package/dist/{chunk-smcj3442.js → chunk-hkrmcbwy.js} +79 -79
- package/dist/chunk-hn9pkyv8.js +2 -0
- package/dist/chunk-hpgr4qgp.js +2 -0
- package/dist/chunk-hrbbbtbn.js +2 -0
- package/dist/chunk-j03revz2.js +8 -0
- package/dist/chunk-j9qcrwbg.js +2 -0
- package/dist/chunk-jk4njz0w.js +2 -0
- package/dist/chunk-jmabeqfq.js +2 -0
- package/dist/chunk-jnkrn913.js +4 -0
- package/dist/chunk-jp10q90g.js +2 -0
- package/dist/chunk-jt0n43mk.js +2 -0
- package/dist/chunk-kjbv8a3m.js +2 -0
- package/dist/chunk-m1vdghnx.js +2 -0
- package/dist/chunk-m4sk62wb.js +5 -0
- package/dist/chunk-md8rqn48.js +30 -0
- package/dist/chunk-mp6hy8g4.js +2 -0
- package/dist/chunk-nc8my58s.js +2 -0
- package/dist/chunk-ngc2wke4.js +3 -0
- package/dist/chunk-nn2vstke.js +2 -0
- package/dist/chunk-nppdrf0x.js +2 -0
- package/dist/chunk-p2v2a68k.js +2 -0
- package/dist/chunk-pazfr1a1.js +2 -0
- package/dist/{chunk-qn5srnj3.js → chunk-pbh4smw3.js} +16 -16
- package/dist/chunk-pdb5fw3r.js +2 -0
- package/dist/chunk-pdt69hpb.js +2 -0
- package/dist/chunk-pgzvyrv6.js +29 -0
- package/dist/chunk-px7fvbj6.js +3 -0
- package/dist/chunk-q6vrb2pe.js +2 -0
- package/dist/chunk-q7qchkvk.js +2 -0
- package/dist/chunk-q9bdh4s5.js +8 -0
- package/dist/chunk-qghxz7jm.js +194 -0
- package/dist/chunk-r3f9jcf7.js +5 -0
- package/dist/chunk-re8b5r9x.js +3 -0
- package/dist/chunk-s5xezjps.js +3 -0
- package/dist/chunk-sd321bn3.js +2 -0
- package/dist/chunk-shr559s7.js +3 -0
- package/dist/chunk-t4hzprsm.js +3 -0
- package/dist/chunk-t5pvq5mx.js +2 -0
- package/dist/{chunk-pv3d7sfn.js → chunk-t61vdbje.js} +89 -89
- package/dist/chunk-tafqyf2g.js +2033 -0
- package/dist/chunk-tfexmdkt.js +3 -0
- package/dist/chunk-thyt8ed8.js +6 -0
- package/dist/chunk-v91p6ekp.js +24 -0
- package/dist/chunk-vgvtnwxa.js +4 -0
- package/dist/chunk-w72qx0eb.js +2 -0
- package/dist/chunk-wfy1zq53.js +30 -0
- package/dist/chunk-wzx0164n.js +18 -0
- package/dist/chunk-x0q32ees.js +3 -0
- package/dist/chunk-xfp7k0v8.js +64 -0
- package/dist/chunk-xtvf6n6f.js +4 -0
- package/dist/chunk-xwzvfqcb.js +2 -0
- package/dist/chunk-y1cmjvk3.js +43 -0
- package/dist/chunk-y5310237.js +311 -0
- package/dist/chunk-ya0qecph.js +27 -0
- package/dist/chunk-yazk54jr.js +8 -0
- package/dist/chunk-ydjfar14.js +2 -0
- package/dist/chunk-ym95v4nc.js +3 -0
- package/dist/chunk-z0g9jvv0.js +40 -0
- package/dist/chunk-z23kaxq6.js +2 -0
- package/dist/chunk-z8xn5ta3.js +2 -0
- package/dist/{chunk-8sdhs0zk.js → chunk-zhxdpzga.js} +4 -4
- package/dist/cli.js +110 -110
- package/dist/craft-entry.js +7 -7
- package/dist/craft.js +7 -7
- package/dist/database.js +2 -2
- package/dist/image-optimization/component.js +4 -4
- package/dist/media/image/component.js +5 -5
- package/dist/media/protected/component.js +2 -2
- package/dist/media/video/index.js +4 -4
- package/dist/native/bridge/protocol.d.ts +325 -0
- package/dist/native/bridge/protocol.js +219 -0
- package/dist/native/cli.d.ts +24 -0
- package/dist/native/cli.js +52 -0
- package/dist/native/compiler/bundle.d.ts +41 -0
- package/dist/native/compiler/bundle.js +90 -0
- package/dist/native/compiler/client-script.d.ts +8 -0
- package/dist/native/compiler/client-script.js +31 -0
- package/dist/native/compiler/codegen.d.ts +10 -0
- package/dist/native/compiler/codegen.js +145 -0
- package/dist/native/compiler/headwind-to-style.d.ts +395 -0
- package/dist/native/compiler/headwind-to-style.js +1163 -0
- package/dist/native/compiler/html-to-ir.d.ts +41 -0
- package/dist/native/compiler/html-to-ir.js +411 -0
- package/dist/native/compiler/icons.d.ts +220 -0
- package/dist/native/compiler/icons.js +208 -0
- package/dist/native/compiler/ir.d.ts +234 -0
- package/dist/native/compiler/ir.js +15 -0
- package/dist/native/compiler/parser.d.ts +88 -0
- package/dist/native/compiler/parser.js +753 -0
- package/dist/native/compiler/render-screen.d.ts +26 -0
- package/dist/native/compiler/render-screen.js +31 -0
- package/dist/native/components/primitives.d.ts +291 -0
- package/dist/native/components/primitives.js +22 -0
- package/dist/native/hot-reload/client.d.ts +62 -0
- package/dist/native/hot-reload/client.js +324 -0
- package/dist/native/index.d.ts +90 -0
- package/dist/native/index.js +34 -0
- package/dist/native/primitives/ActivityIndicator.stx +5 -0
- package/dist/native/primitives/Button.stx +5 -0
- package/dist/native/primitives/DatePicker.stx +5 -0
- package/dist/native/primitives/FlatList.stx +5 -0
- package/dist/native/primitives/Image.stx +5 -0
- package/dist/native/primitives/ImageBackground.stx +5 -0
- package/dist/native/primitives/KeyboardAvoidingView.stx +5 -0
- package/dist/native/primitives/Modal.stx +5 -0
- package/dist/native/primitives/Picker.stx +5 -0
- package/dist/native/primitives/Pressable.stx +5 -0
- package/dist/native/primitives/RefreshControl.stx +5 -0
- package/dist/native/primitives/SafeAreaView.stx +5 -0
- package/dist/native/primitives/ScrollView.stx +5 -0
- package/dist/native/primitives/SectionList.stx +5 -0
- package/dist/native/primitives/Slider.stx +5 -0
- package/dist/native/primitives/StatusBar.stx +5 -0
- package/dist/native/primitives/Switch.stx +5 -0
- package/dist/native/primitives/Text.stx +5 -0
- package/dist/native/primitives/TextInput.stx +5 -0
- package/dist/native/primitives/TouchableHighlight.stx +5 -0
- package/dist/native/primitives/TouchableOpacity.stx +5 -0
- package/dist/native/primitives/View.stx +5 -0
- package/dist/native/runtime/craft.d.ts +75 -0
- package/dist/native/runtime/craft.js +0 -0
- package/dist/native/runtime/entry.d.ts +1 -0
- package/dist/native/runtime/entry.js +3 -0
- package/dist/native/runtime/index.d.ts +45 -0
- package/dist/native/runtime/index.js +165 -0
- package/dist/native/runtime/native-host.d.ts +33 -0
- package/dist/native/runtime/native-host.js +184 -0
- package/dist/native/runtime/screen.d.ts +43 -0
- package/dist/native/runtime/screen.js +808 -0
- package/dist/pwa/service-worker.js +1 -1
- package/dist/pwa/workbox.js +1 -1
- package/dist/pwa.js +8 -8
- package/dist/site-url.d.ts +1 -1
- package/dist/ssg.js +53 -53
- package/dist/visual-testing.js +42 -42
- package/dist/web-components/reactive-generator.js +2 -2
- package/package.json +9 -5
- package/dist/chunk-0btmm4m2.js +0 -147
- package/dist/chunk-0c2h69k2.js +0 -4
- package/dist/chunk-0d0qeqvv.js +0 -2
- package/dist/chunk-0psndabd.js +0 -2
- package/dist/chunk-0qv8yf53.js +0 -2
- package/dist/chunk-0vkxyvsd.js +0 -2
- package/dist/chunk-0we9nw1d.js +0 -3
- package/dist/chunk-0xqdmemy.js +0 -3
- package/dist/chunk-0y46fbkx.js +0 -3
- package/dist/chunk-158wqccn.js +0 -4422
- package/dist/chunk-1cyxbb8y.js +0 -16
- package/dist/chunk-1enwnh2a.js +0 -2
- package/dist/chunk-213pzm0d.js +0 -3
- package/dist/chunk-21hzqyja.js +0 -12
- package/dist/chunk-266t58b8.js +0 -5
- package/dist/chunk-27fgag95.js +0 -4
- package/dist/chunk-2a9n102n.js +0 -2
- package/dist/chunk-2eqzrczk.js +0 -2
- package/dist/chunk-2ke37m54.js +0 -14
- package/dist/chunk-35ds08e7.js +0 -3
- package/dist/chunk-3mtwkjcg.js +0 -2
- package/dist/chunk-4xr8zwkp.js +0 -2
- package/dist/chunk-58v77x2c.js +0 -2
- package/dist/chunk-5mhq8605.js +0 -2
- package/dist/chunk-5se8xt9e.js +0 -64
- package/dist/chunk-5zh0h080.js +0 -2
- package/dist/chunk-62435225.js +0 -2
- package/dist/chunk-6kdrncsx.js +0 -30
- package/dist/chunk-6n2rr3x7.js +0 -2
- package/dist/chunk-6xk87qf2.js +0 -30
- package/dist/chunk-72rwcbp6.js +0 -3
- package/dist/chunk-76w34xne.js +0 -3
- package/dist/chunk-7ekd7zj9.js +0 -2
- package/dist/chunk-7pr3wdd5.js +0 -3
- package/dist/chunk-7rxvafwc.js +0 -24
- package/dist/chunk-7tnwfa7w.js +0 -8
- package/dist/chunk-8c5je0wf.js +0 -2
- package/dist/chunk-8dz6nyvx.js +0 -2
- package/dist/chunk-98zj3fv2.js +0 -7
- package/dist/chunk-9e8t0twa.js +0 -3
- package/dist/chunk-9fqp72ze.js +0 -5
- package/dist/chunk-anydpa34.js +0 -3
- package/dist/chunk-ay6zjq8v.js +0 -3
- package/dist/chunk-az4v4ard.js +0 -3
- package/dist/chunk-ba5erggg.js +0 -2
- package/dist/chunk-bnagrdz6.js +0 -2
- package/dist/chunk-by8wghtf.js +0 -2
- package/dist/chunk-cd7h4q51.js +0 -2
- package/dist/chunk-cjmv8hgp.js +0 -33
- package/dist/chunk-cthf912y.js +0 -2
- package/dist/chunk-cxbpmwq5.js +0 -4
- package/dist/chunk-d3sy16qn.js +0 -2
- package/dist/chunk-dh6s7mrj.js +0 -1199
- package/dist/chunk-dm2nzg7a.js +0 -2
- package/dist/chunk-e2sgcnxc.js +0 -2
- package/dist/chunk-e3b7jj74.js +0 -2
- package/dist/chunk-ec4wq2sv.js +0 -6
- package/dist/chunk-ekzg97dn.js +0 -29
- package/dist/chunk-epjt342x.js +0 -2
- package/dist/chunk-eqe26g14.js +0 -18
- package/dist/chunk-ev0v1yma.js +0 -2
- package/dist/chunk-f53psr2y.js +0 -5
- package/dist/chunk-f8p69dsg.js +0 -3
- package/dist/chunk-f95drhdb.js +0 -194
- package/dist/chunk-ff5a6hvb.js +0 -17
- package/dist/chunk-fs5fy4h8.js +0 -2
- package/dist/chunk-fzsygce3.js +0 -2
- package/dist/chunk-g465x63k.js +0 -2
- package/dist/chunk-g708ekh1.js +0 -2
- package/dist/chunk-gcr9e83g.js +0 -11
- package/dist/chunk-gdmyrsr8.js +0 -4
- package/dist/chunk-gkms2ngq.js +0 -2
- package/dist/chunk-gnfywmgs.js +0 -7
- package/dist/chunk-hpf8kq7e.js +0 -2
- package/dist/chunk-j4x3faf8.js +0 -2
- package/dist/chunk-jkavtw9f.js +0 -2
- package/dist/chunk-kg1rdena.js +0 -3
- package/dist/chunk-km91wx0v.js +0 -2
- package/dist/chunk-kmsyvaex.js +0 -8
- package/dist/chunk-mrahwn5v.js +0 -8
- package/dist/chunk-nk3czvnk.js +0 -2
- package/dist/chunk-nmw4eewb.js +0 -2
- package/dist/chunk-nq5zxrk0.js +0 -4
- package/dist/chunk-ny67c03k.js +0 -3
- package/dist/chunk-p4wdxp2c.js +0 -2
- package/dist/chunk-pcxp4r9n.js +0 -3
- package/dist/chunk-pdyeaxc1.js +0 -2
- package/dist/chunk-pf06ded4.js +0 -2
- package/dist/chunk-pfs0gpzm.js +0 -2
- package/dist/chunk-pshdwq44.js +0 -2
- package/dist/chunk-pwgv84pn.js +0 -32
- package/dist/chunk-pwsnafp3.js +0 -4367
- package/dist/chunk-q9n5swx7.js +0 -3
- package/dist/chunk-qr346wnp.js +0 -2
- package/dist/chunk-r02hke04.js +0 -2
- package/dist/chunk-ranshpyc.js +0 -3
- package/dist/chunk-rn194bhp.js +0 -20
- package/dist/chunk-rn1hgyc8.js +0 -930
- package/dist/chunk-s7z5dp70.js +0 -43
- package/dist/chunk-s8jd13nb.js +0 -3
- package/dist/chunk-sn7exv0n.js +0 -2
- package/dist/chunk-t1tdjjht.js +0 -216
- package/dist/chunk-t6qx04s8.js +0 -499
- package/dist/chunk-t6y6gyps.js +0 -2
- package/dist/chunk-tjfs7cc3.js +0 -2
- package/dist/chunk-tkyrk66a.js +0 -3
- package/dist/chunk-tntv9hvq.js +0 -2
- package/dist/chunk-v3nwkveg.js +0 -12
- package/dist/chunk-vd4cb5xr.js +0 -2
- package/dist/chunk-vkhdce50.js +0 -2
- package/dist/chunk-w183av08.js +0 -2
- package/dist/chunk-w2m02njv.js +0 -2
- package/dist/chunk-wpjrcrs5.js +0 -2
- package/dist/chunk-wqmppf6b.js +0 -3
- package/dist/chunk-wtb9fxdy.js +0 -2
- package/dist/chunk-xmzygmcz.js +0 -3
- package/dist/chunk-xsng1mtq.js +0 -3
- package/dist/chunk-xxzefj4j.js +0 -2
- package/dist/chunk-yq8x8bxq.js +0 -47
- package/dist/chunk-ytma76qe.js +0 -3
- package/dist/chunk-yw1m115e.js +0 -2
- package/dist/chunk-z64a924m.js +0 -2
- package/dist/chunk-zcz9rs6p.js +0 -3
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{u}from"./chunk-cg8hg6cs.js";import{mkdir as w,writeFile as m}from"fs/promises";import{join as l}from"path";var f="https://api.iconify.design";async function D(){let e=await fetch(`${f}/collections`);if(!e.ok)throw Error(`Failed to fetch collections: ${e.statusText}`);return await e.json()}async function P(e,t){try{let c=u.resolve("@iconify/json"),r=`${`${c.substring(0,c.lastIndexOf("/node_modules/@iconify/json/"))}/node_modules/@iconify/json`}/json/${e}.json`,s=Bun.file(r);if(await s.exists()){let a=await s.json();if(t&&t.length>0){let d={};for(let y of t)if(a.icons[y])d[y]=a.icons[y];return{...a,icons:d}}return a}}catch{}let n=t&&t.length>0?`${f}/${e}.json?icons=${t.join(",")}`:`${f}/${e}.json`,i=await fetch(n);if(!i.ok)throw Error(`Failed to fetch icons for ${e}: ${i.statusText}`);return await i.json()}function F(e,t=24,n=24){return{body:e.body,width:e.width||t,height:e.height||n,viewBox:`0 0 ${e.width||t} ${e.height||n}`}}function T(e,t){let n=h(e);return`import type { IconData } from '@stacksjs/iconify-core'
|
|
3
3
|
|
|
4
|
-
export const ${
|
|
4
|
+
export const ${n}: IconData = ${JSON.stringify(t,null,2)}
|
|
5
5
|
|
|
6
|
-
export default ${
|
|
7
|
-
`}function
|
|
6
|
+
export default ${n}
|
|
7
|
+
`}function A(e,t){return`<script>
|
|
8
8
|
// Get props with defaults (handle undefined)
|
|
9
|
-
const iconWidth = (typeof width !== 'undefined' ? width : null) || (typeof size !== 'undefined' ? size : null) || ${
|
|
10
|
-
const iconHeight = (typeof height !== 'undefined' ? height : null) || (typeof size !== 'undefined' ? size : null) || ${
|
|
9
|
+
const iconWidth = (typeof width !== 'undefined' ? width : null) || (typeof size !== 'undefined' ? size : null) || ${t.width||24}
|
|
10
|
+
const iconHeight = (typeof height !== 'undefined' ? height : null) || (typeof size !== 'undefined' ? size : null) || ${t.height||24}
|
|
11
11
|
const iconColor = typeof color !== 'undefined' ? color : 'currentColor'
|
|
12
|
-
const viewBox = "${
|
|
12
|
+
const viewBox = "${t.viewBox||`0 0 ${t.width||24} ${t.height||24}`}"
|
|
13
13
|
|
|
14
14
|
// Build transform
|
|
15
15
|
const transforms = []
|
|
@@ -33,7 +33,7 @@ const styleAttr = styles.length > 0 ? \` style="\${styles.join(' ')}"\` : ''
|
|
|
33
33
|
const classAttr = typeof className !== 'undefined' && className ? \` class="\${className}"\` : ''
|
|
34
34
|
|
|
35
35
|
// Icon body
|
|
36
|
-
let body = ${JSON.stringify(
|
|
36
|
+
let body = ${JSON.stringify(t.body)}
|
|
37
37
|
if (iconColor && iconColor !== 'currentColor') {
|
|
38
38
|
body = body.replace(/currentColor/g, iconColor)
|
|
39
39
|
}
|
|
@@ -43,17 +43,17 @@ const svg = \`<svg xmlns="http://www.w3.org/2000/svg" width="\${iconWidth}" heig
|
|
|
43
43
|
</script>
|
|
44
44
|
|
|
45
45
|
{!! svg !!}
|
|
46
|
-
`}function
|
|
47
|
-
${
|
|
46
|
+
`}function _(e){let t=new Set;return`// Icon data exports
|
|
47
|
+
${e.map((i)=>{let o=h(i);if(t.has(o)){let r=i.replace(/[^a-zA-Z0-9]/g,"_");if(/^[0-9]/.test(r))r=`_${r}`;o=r;let s=2;while(t.has(o))o=`${r}_${s}`,s++}return t.add(o),`export { default as ${o} } from './${i}.js'`}).join(`
|
|
48
48
|
`)}
|
|
49
49
|
|
|
50
50
|
export * from './types.js'
|
|
51
|
-
`}function
|
|
51
|
+
`}function E(e){return`import type { IconData, IconProps } from '@stacksjs/iconify-core'
|
|
52
52
|
|
|
53
53
|
export type { IconData, IconProps }
|
|
54
54
|
|
|
55
|
-
export type ${
|
|
56
|
-
`}function N(
|
|
55
|
+
export type ${W(e)}Icon = IconData
|
|
56
|
+
`}function N(e,t,n){let i={name:`@stacksjs/iconify-${e}`,type:"module",version:"0.0.1",description:`${t.name} icons for stx from Iconify`,author:t.author?.name||"Iconify",license:t.license?.spdx||"MIT",repository:{type:"git",url:"https://github.com/stacksjs/stx.git",directory:`packages/iconify-${e}`},keywords:["iconify","icons","svg",e,t.name,"stx"],sideEffects:!1,exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.js"},"./*":"./dist/*"},main:"./dist/index.js",module:"./dist/index.js",types:"./dist/index.d.ts",files:["dist"],scripts:{build:"bun build.ts",prepublishOnly:"bun build.ts"},dependencies:{"@stacksjs/iconify-core":"workspace:*"}};return JSON.stringify(i,null,2)}function U(e){return`import { existsSync, readdirSync, statSync } from 'node:fs'
|
|
57
57
|
import { dirname, join } from 'node:path'
|
|
58
58
|
import { fileURLToPath } from 'node:url'
|
|
59
59
|
import dts from 'bun-plugin-dtsx'
|
|
@@ -88,7 +88,7 @@ function isDistFresh() {
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
if (isDistFresh()) {
|
|
91
|
-
console.log('\u2713 @stacksjs/iconify-${
|
|
91
|
+
console.log('\u2713 @stacksjs/iconify-${e} dist is fresh, skipping rebuild')
|
|
92
92
|
} else {
|
|
93
93
|
await Bun.build({
|
|
94
94
|
entrypoints: [join(srcDir, 'index.ts')],
|
|
@@ -100,16 +100,16 @@ if (isDistFresh()) {
|
|
|
100
100
|
sourcemap: 'external',
|
|
101
101
|
splitting: true,
|
|
102
102
|
})
|
|
103
|
-
console.log('\u2713 Built @stacksjs/iconify-${
|
|
103
|
+
console.log('\u2713 Built @stacksjs/iconify-${e}')
|
|
104
104
|
}
|
|
105
|
-
`}function
|
|
105
|
+
`}function R(e,t,n){return`# @stacksjs/iconify-${e}
|
|
106
106
|
|
|
107
|
-
${
|
|
107
|
+
${t.name} icons for stx from Iconify.
|
|
108
108
|
|
|
109
109
|
## Installation
|
|
110
110
|
|
|
111
111
|
\`\`\`bash
|
|
112
|
-
bun add @stacksjs/iconify-${
|
|
112
|
+
bun add @stacksjs/iconify-${e}
|
|
113
113
|
\`\`\`
|
|
114
114
|
|
|
115
115
|
## Usage
|
|
@@ -118,7 +118,7 @@ bun add @stacksjs/iconify-${G}
|
|
|
118
118
|
|
|
119
119
|
\`\`\`html
|
|
120
120
|
<script>
|
|
121
|
-
import { home } from '@stacksjs/iconify-${
|
|
121
|
+
import { home } from '@stacksjs/iconify-${e}'
|
|
122
122
|
import { renderIcon } from '@stacksjs/iconify-core'
|
|
123
123
|
|
|
124
124
|
export const homeIcon = renderIcon(home, { size: 24, color: 'currentColor' })
|
|
@@ -132,7 +132,7 @@ bun add @stacksjs/iconify-${G}
|
|
|
132
132
|
### In TypeScript/JavaScript
|
|
133
133
|
|
|
134
134
|
\`\`\`typescript
|
|
135
|
-
import { home, account, settings } from '@stacksjs/iconify-${
|
|
135
|
+
import { home, account, settings } from '@stacksjs/iconify-${e}'
|
|
136
136
|
import { renderIcon } from '@stacksjs/iconify-core'
|
|
137
137
|
|
|
138
138
|
const svg = renderIcon(home, {
|
|
@@ -143,38 +143,38 @@ const svg = renderIcon(home, {
|
|
|
143
143
|
|
|
144
144
|
## Available Icons
|
|
145
145
|
|
|
146
|
-
This package contains ${
|
|
146
|
+
This package contains ${n} icons from ${t.name}.
|
|
147
147
|
|
|
148
148
|
## License
|
|
149
149
|
|
|
150
|
-
${
|
|
150
|
+
${t.license?.title||"MIT"}
|
|
151
151
|
|
|
152
|
-
${
|
|
152
|
+
${t.license?.url?`License: ${t.license.url}`:""}
|
|
153
153
|
|
|
154
154
|
## Credits
|
|
155
155
|
|
|
156
|
-
- Icons: ${
|
|
156
|
+
- Icons: ${t.author?.name||"Iconify"}${t.author?.url?` (${t.author.url})`:""}
|
|
157
157
|
- Iconify: https://iconify.design/
|
|
158
|
-
`}function
|
|
159
|
-
`);return`# ${
|
|
158
|
+
`}function M(e,t,n){let i=n.length,c=n.slice(0,5).map(h),o=c.map((s)=>`${s.charAt(0).toUpperCase()}${s.slice(1)}Icon`),r=n.map((s)=>`- \`${h(s)}\``).join(`
|
|
159
|
+
`);return`# ${t.name}
|
|
160
160
|
|
|
161
|
-
> ${
|
|
161
|
+
> ${t.name} icons for stx from Iconify
|
|
162
162
|
|
|
163
163
|
## Overview
|
|
164
164
|
|
|
165
|
-
This package provides access to ${
|
|
165
|
+
This package provides access to ${i} icons from the ${t.name} collection through the stx iconify integration.
|
|
166
166
|
|
|
167
|
-
**Collection ID:** \`${
|
|
168
|
-
**Total Icons:** ${
|
|
169
|
-
${
|
|
170
|
-
${
|
|
171
|
-
${
|
|
172
|
-
${
|
|
167
|
+
**Collection ID:** \`${e}\`
|
|
168
|
+
**Total Icons:** ${i}
|
|
169
|
+
${t.author?.name?`**Author:** ${t.author.name}${t.author.url?` ([Website](${t.author.url}))`:""}`:""}
|
|
170
|
+
${t.license?.title?`**License:** ${t.license.title}${t.license.url?` ([Details](${t.license.url}))`:""}`:""}
|
|
171
|
+
${t.category?`**Category:** ${t.category}`:""}
|
|
172
|
+
${t.palette!==void 0?`**Palette:** ${t.palette?"Yes (color icons)":"No (monotone icons)"}`:""}
|
|
173
173
|
|
|
174
174
|
## Installation
|
|
175
175
|
|
|
176
176
|
\`\`\`bash
|
|
177
|
-
bun add @stacksjs/iconify-${
|
|
177
|
+
bun add @stacksjs/iconify-${e}
|
|
178
178
|
\`\`\`
|
|
179
179
|
|
|
180
180
|
## Quick Start
|
|
@@ -184,30 +184,30 @@ bun add @stacksjs/iconify-${G}
|
|
|
184
184
|
Icons are available as .stx components that can be used directly in templates:
|
|
185
185
|
|
|
186
186
|
\`\`\`html
|
|
187
|
-
<${
|
|
188
|
-
<${
|
|
189
|
-
<${
|
|
187
|
+
<${o[0]||"Icon"} height="1em" />
|
|
188
|
+
<${o[0]||"Icon"} width="1em" height="1em" />
|
|
189
|
+
<${o[0]||"Icon"} height="24" />
|
|
190
190
|
\`\`\`
|
|
191
191
|
|
|
192
192
|
### With Properties
|
|
193
193
|
|
|
194
194
|
\`\`\`html
|
|
195
195
|
<!-- Using size property -->
|
|
196
|
-
<${
|
|
197
|
-
<${
|
|
196
|
+
<${o[0]||"Icon"} size="24" />
|
|
197
|
+
<${o[0]||"Icon"} size="1em" />
|
|
198
198
|
|
|
199
199
|
<!-- Using width and height -->
|
|
200
|
-
<${
|
|
200
|
+
<${o[0]||"Icon"} width="24" height="32" />
|
|
201
201
|
|
|
202
202
|
<!-- With color -->
|
|
203
|
-
<${
|
|
204
|
-
<${
|
|
203
|
+
<${o[0]||"Icon"} size="24" color="red" />
|
|
204
|
+
<${o[0]||"Icon"} size="24" color="#4a90e2" />
|
|
205
205
|
|
|
206
206
|
<!-- With CSS class -->
|
|
207
|
-
<${
|
|
207
|
+
<${o[0]||"Icon"} size="24" class="icon-primary" />
|
|
208
208
|
|
|
209
209
|
<!-- With all properties -->
|
|
210
|
-
<${
|
|
210
|
+
<${o[0]||"Icon"}
|
|
211
211
|
size="32"
|
|
212
212
|
color="#4a90e2"
|
|
213
213
|
class="my-icon"
|
|
@@ -232,9 +232,9 @@ Icons are available as .stx components that can be used directly in templates:
|
|
|
232
232
|
</head>
|
|
233
233
|
<body>
|
|
234
234
|
<div class="icon-grid">
|
|
235
|
-
<${
|
|
236
|
-
<${
|
|
237
|
-
<${
|
|
235
|
+
<${o[0]||"Icon"} size="24" />
|
|
236
|
+
<${o[1]||"Icon"} size="24" color="#4a90e2" />
|
|
237
|
+
<${o[2]||"Icon"} size="32" class="my-icon" />
|
|
238
238
|
</div>
|
|
239
239
|
</body>
|
|
240
240
|
</html>
|
|
@@ -245,10 +245,10 @@ Icons are available as .stx components that can be used directly in templates:
|
|
|
245
245
|
You can also import icon data and use the \`renderIcon\` function directly:
|
|
246
246
|
|
|
247
247
|
\`\`\`typescript
|
|
248
|
-
import { ${
|
|
248
|
+
import { ${c.slice(0,3).join(", ")} } from '@stacksjs/iconify-${e}'
|
|
249
249
|
import { renderIcon } from '@stacksjs/iconify-core'
|
|
250
250
|
|
|
251
|
-
const svg = renderIcon(${
|
|
251
|
+
const svg = renderIcon(${c[0]||"icon"}, { size: 24 })
|
|
252
252
|
\`\`\`
|
|
253
253
|
|
|
254
254
|
## Icon Properties
|
|
@@ -269,23 +269,23 @@ All icon component functions and \`renderIcon\` accept the following properties:
|
|
|
269
269
|
|
|
270
270
|
## Color
|
|
271
271
|
|
|
272
|
-
${
|
|
272
|
+
${t.palette?`### Color Icons
|
|
273
273
|
|
|
274
274
|
This collection contains color icons. While you can still set a color property, it may override the original colors.`:"### Monotone Icons\n\nMonotone icons use `currentColor` by default, allowing you to change icon color via the `color` property or CSS:"}
|
|
275
275
|
|
|
276
276
|
\`\`\`html
|
|
277
277
|
<!-- Via color property -->
|
|
278
|
-
<${
|
|
279
|
-
<${
|
|
278
|
+
<${o[0]||"Icon"} size="24" color="red" />
|
|
279
|
+
<${o[0]||"Icon"} size="24" color="#4a90e2" />
|
|
280
280
|
|
|
281
281
|
<!-- Via inline style -->
|
|
282
|
-
<${
|
|
282
|
+
<${o[0]||"Icon"} size="24" style="color: green;" />
|
|
283
283
|
|
|
284
284
|
<!-- Via CSS class -->
|
|
285
|
-
<${
|
|
285
|
+
<${o[0]||"Icon"} size="24" class="text-primary" />
|
|
286
286
|
\`\`\`
|
|
287
287
|
|
|
288
|
-
${!
|
|
288
|
+
${!t.palette?`\`\`\`css
|
|
289
289
|
/* In your CSS */
|
|
290
290
|
.text-primary {
|
|
291
291
|
color: #4a90e2;
|
|
@@ -321,16 +321,16 @@ You do not need to set both properties. If you set one property, the other prope
|
|
|
321
321
|
**Examples:**
|
|
322
322
|
|
|
323
323
|
\`\`\`html
|
|
324
|
-
<${
|
|
325
|
-
<${
|
|
326
|
-
<${
|
|
324
|
+
<${o[0]||"DraftsIcon"} height="1em" />
|
|
325
|
+
<${o[0]||"DraftsIcon"} width="1em" height="1em" />
|
|
326
|
+
<${o[0]||"DraftsIcon"} height="24" />
|
|
327
327
|
\`\`\`
|
|
328
328
|
|
|
329
329
|
You can also use the \`size\` property as a shorthand for setting both width and height:
|
|
330
330
|
|
|
331
331
|
\`\`\`html
|
|
332
|
-
<${
|
|
333
|
-
<${
|
|
332
|
+
<${o[0]||"DraftsIcon"} size="24" />
|
|
333
|
+
<${o[0]||"DraftsIcon"} size="1em" />
|
|
334
334
|
\`\`\`
|
|
335
335
|
|
|
336
336
|
### CSS Sizing
|
|
@@ -338,21 +338,21 @@ You can also use the \`size\` property as a shorthand for setting both width and
|
|
|
338
338
|
You can also control icon size via CSS:
|
|
339
339
|
|
|
340
340
|
\`\`\`css
|
|
341
|
-
.${
|
|
341
|
+
.${h(e)}-icon {
|
|
342
342
|
width: 1em;
|
|
343
343
|
height: 1em;
|
|
344
344
|
}
|
|
345
345
|
\`\`\`
|
|
346
346
|
|
|
347
347
|
\`\`\`html
|
|
348
|
-
<${
|
|
348
|
+
<${o[0]||"DraftsIcon"} class="${h(e)}-icon" />
|
|
349
349
|
\`\`\`
|
|
350
350
|
|
|
351
351
|
## Available Icons
|
|
352
352
|
|
|
353
|
-
This package contains **${
|
|
353
|
+
This package contains **${i}** icons:
|
|
354
354
|
|
|
355
|
-
${
|
|
355
|
+
${r}
|
|
356
356
|
|
|
357
357
|
## Usage Examples
|
|
358
358
|
|
|
@@ -360,10 +360,10 @@ ${X}
|
|
|
360
360
|
|
|
361
361
|
\`\`\`html
|
|
362
362
|
<nav>
|
|
363
|
-
<a href="/"><${
|
|
364
|
-
<a href="/about"><${
|
|
365
|
-
<a href="/contact"><${
|
|
366
|
-
<a href="/settings"><${
|
|
363
|
+
<a href="/"><${o[0]||"Icon"} size="20" class="nav-icon" /> Home</a>
|
|
364
|
+
<a href="/about"><${o[1]||"Icon"} size="20" class="nav-icon" /> About</a>
|
|
365
|
+
<a href="/contact"><${o[2]||"Icon"} size="20" class="nav-icon" /> Contact</a>
|
|
366
|
+
<a href="/settings"><${o[3]||"Icon"} size="20" class="nav-icon" /> Settings</a>
|
|
367
367
|
</nav>
|
|
368
368
|
|
|
369
369
|
<style>
|
|
@@ -385,7 +385,7 @@ ${X}
|
|
|
385
385
|
### Custom Styling
|
|
386
386
|
|
|
387
387
|
\`\`\`html
|
|
388
|
-
<${
|
|
388
|
+
<${o[0]||"Icon"}
|
|
389
389
|
size="24"
|
|
390
390
|
class="icon icon-primary"
|
|
391
391
|
style="opacity: 0.8; transition: opacity 0.2s;"
|
|
@@ -406,15 +406,15 @@ ${X}
|
|
|
406
406
|
\`\`\`html
|
|
407
407
|
<div class="status-grid">
|
|
408
408
|
<div class="status-item">
|
|
409
|
-
<${
|
|
409
|
+
<${o[0]||"Icon"} size="16" color="#22c55e" />
|
|
410
410
|
<span>Success</span>
|
|
411
411
|
</div>
|
|
412
412
|
<div class="status-item">
|
|
413
|
-
<${
|
|
413
|
+
<${o[1]||"Icon"} size="16" color="#f59e0b" />
|
|
414
414
|
<span>Warning</span>
|
|
415
415
|
</div>
|
|
416
416
|
<div class="status-item">
|
|
417
|
-
<${
|
|
417
|
+
<${o[2]||"Icon"} size="16" color="#ef4444" />
|
|
418
418
|
<span>Error</span>
|
|
419
419
|
</div>
|
|
420
420
|
</div>
|
|
@@ -425,8 +425,8 @@ ${X}
|
|
|
425
425
|
1. **Use Components Directly**: Import and use icon components in your templates
|
|
426
426
|
\`\`\`html
|
|
427
427
|
<!-- Recommended -->
|
|
428
|
-
<${
|
|
429
|
-
<${
|
|
428
|
+
<${o[0]||"Icon"} size="24" />
|
|
429
|
+
<${o[1]||"Icon"} size="24" color="#4a90e2" />
|
|
430
430
|
\`\`\`
|
|
431
431
|
|
|
432
432
|
2. **Use CSS for Theming**: Apply consistent styling through CSS classes
|
|
@@ -443,24 +443,24 @@ ${X}
|
|
|
443
443
|
\`\`\`
|
|
444
444
|
|
|
445
445
|
\`\`\`html
|
|
446
|
-
<${
|
|
446
|
+
<${o[0]||"Icon"} size="24" class="icon" />
|
|
447
447
|
\`\`\`
|
|
448
448
|
|
|
449
449
|
3. **Set Appropriate Sizes**: Use \`1em\` for inline icons, fixed pixel sizes for standalone icons
|
|
450
450
|
\`\`\`html
|
|
451
451
|
<!-- Inline with text -->
|
|
452
|
-
<p>Click the <${
|
|
452
|
+
<p>Click the <${o[0]||"Icon"} height="1em" /> icon to continue</p>
|
|
453
453
|
|
|
454
454
|
<!-- Standalone -->
|
|
455
|
-
<${
|
|
455
|
+
<${o[0]||"Icon"} size="24" />
|
|
456
456
|
\`\`\`
|
|
457
457
|
|
|
458
458
|
4. **Use Data Import for Advanced Use Cases**: When you need more control
|
|
459
459
|
\`\`\`html
|
|
460
460
|
@js
|
|
461
|
-
import { ${
|
|
461
|
+
import { ${c[0]||"icon"} } from '@stacksjs/iconify-${e}'
|
|
462
462
|
import { renderIcon } from '@stacksjs/iconify-core'
|
|
463
|
-
global.customIcon = renderIcon(${
|
|
463
|
+
global.customIcon = renderIcon(${c[0]||"icon"}, { size: 24 })
|
|
464
464
|
@endjs
|
|
465
465
|
|
|
466
466
|
{!! customIcon !!}
|
|
@@ -472,10 +472,10 @@ This package includes full TypeScript support with type definitions for all icon
|
|
|
472
472
|
|
|
473
473
|
\`\`\`typescript
|
|
474
474
|
import type { IconData } from '@stacksjs/iconify-core'
|
|
475
|
-
import { ${
|
|
475
|
+
import { ${c[0]||"icon"} } from '@stacksjs/iconify-${e}'
|
|
476
476
|
|
|
477
477
|
// Icons are typed as IconData
|
|
478
|
-
const myIcon: IconData = ${
|
|
478
|
+
const myIcon: IconData = ${c[0]||"icon"}
|
|
479
479
|
\`\`\`
|
|
480
480
|
|
|
481
481
|
## Related Packages
|
|
@@ -486,20 +486,20 @@ const myIcon: IconData = ${Z[0]||"icon"}
|
|
|
486
486
|
|
|
487
487
|
## License
|
|
488
488
|
|
|
489
|
-
${
|
|
489
|
+
${t.license?.title||"MIT"}
|
|
490
490
|
|
|
491
|
-
${
|
|
491
|
+
${t.license?.url?`See [license details](${t.license.url}) for more information.`:""}
|
|
492
492
|
|
|
493
493
|
## Credits
|
|
494
494
|
|
|
495
|
-
- **Icons**: ${
|
|
495
|
+
- **Icons**: ${t.author?.name||"Iconify"}${t.author?.url?` ([Website](${t.author.url}))`:""}
|
|
496
496
|
- **Iconify**: [https://iconify.design/](https://iconify.design/)
|
|
497
|
-
- **Icon Set**: [View on Iconify](https://icon-sets.iconify.design/${
|
|
497
|
+
- **Icon Set**: [View on Iconify](https://icon-sets.iconify.design/${e}/)
|
|
498
498
|
|
|
499
499
|
## Resources
|
|
500
500
|
|
|
501
|
-
- [Browse all icons in this collection](https://icon-sets.iconify.design/${
|
|
501
|
+
- [Browse all icons in this collection](https://icon-sets.iconify.design/${e}/)
|
|
502
502
|
- [Iconify documentation](https://iconify.design/docs/)
|
|
503
503
|
- [stx iconify integration guide](../../docs/iconify.md)
|
|
504
|
-
`}async function
|
|
505
|
-
\uD83D\uDCE6 Generating package for ${
|
|
504
|
+
`}async function G(e,t,n,i){console.log(`
|
|
505
|
+
\uD83D\uDCE6 Generating package for ${e}...`);let o=(await D())[e];if(!o)throw Error(`Collection ${e} not found`);console.log(` Collection: ${o.name}`),console.log(` Total icons: ${o.total}`);let r=await P(e,n),s=Object.keys(r.icons);console.log(` Generating ${s.length} icons...`);let a=l(t,`iconify-${e}`),d=l(a,"src");await w(d,{recursive:!0});let y=r.width||24,b=r.height||24;for(let p of s){let g=r.icons[p],I=F(g,y,b),z=T(p,I);await m(l(d,`${p}.ts`),z);let k=A(p,I);await m(l(d,`${p}-icon.stx`),k)}let v=_(s);await m(l(d,"index.ts"),v);let C=E(e);await m(l(d,"types.ts"),C);let S=N(e,o,s.length);await m(l(a,"package.json"),S);let x=U(e);await m(l(a,"build.ts"),x);let j=R(e,o,s.length);if(await m(l(a,"README.md"),j),i){let p=l(i,`iconify-${e}.md`),g=M(e,o,s);await w(i,{recursive:!0}),await m(p,g),console.log(` \u2713 Generated documentation in ${p}`)}console.log(` \u2713 Generated ${s.length} icons in ${a}`)}var B=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with","let","static","yield","implements","interface","package","private","protected","public","await","eval","arguments"]);function h(e){let t=e.replace(/-([a-z0-9])/g,(n)=>n[1].toUpperCase());if(t=t.replace(/[^a-zA-Z0-9_$]/g,"_"),/^[0-9]/.test(t))t=`_${t}`;if(B.has(t))t=`${t}_`;return t}function W(e){let t=h(e);return t.charAt(0).toUpperCase()+t.slice(1)}export{D as fetchCollections,G as generatePackage};
|