@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
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
export const FALLBACK_SYMBOL = "circle", LUCIDE_TO_SF = {
|
|
2
|
+
activity: "waveform.path.ecg",
|
|
3
|
+
"alarm-clock": "alarm",
|
|
4
|
+
"alert-circle": "exclamationmark.circle",
|
|
5
|
+
"alert-triangle": "exclamationmark.triangle",
|
|
6
|
+
archive: "archivebox",
|
|
7
|
+
"arrow-down": "arrow.down",
|
|
8
|
+
"arrow-left": "arrow.left",
|
|
9
|
+
"arrow-right": "arrow.right",
|
|
10
|
+
"arrow-up": "arrow.up",
|
|
11
|
+
"arrow-up-right": "arrow.up.right",
|
|
12
|
+
"at-sign": "at",
|
|
13
|
+
"audio-lines": "waveform",
|
|
14
|
+
award: "rosette",
|
|
15
|
+
"badge-check": "checkmark.seal",
|
|
16
|
+
"bar-chart": "chart.bar",
|
|
17
|
+
"bar-chart-2": "chart.bar",
|
|
18
|
+
"bar-chart-3": "chart.bar",
|
|
19
|
+
battery: "battery.100",
|
|
20
|
+
bed: "bed.double",
|
|
21
|
+
bell: "bell",
|
|
22
|
+
"bell-off": "bell.slash",
|
|
23
|
+
bike: "figure.outdoor.cycle",
|
|
24
|
+
bluetooth: "antenna.radiowaves.left.and.right",
|
|
25
|
+
book: "book",
|
|
26
|
+
"book-open": "book",
|
|
27
|
+
bookmark: "bookmark",
|
|
28
|
+
brain: "brain",
|
|
29
|
+
calendar: "calendar",
|
|
30
|
+
"calendar-check": "calendar.badge.checkmark",
|
|
31
|
+
"calendar-clock": "calendar.badge.clock",
|
|
32
|
+
"calendar-days": "calendar",
|
|
33
|
+
"calendar-plus": "calendar.badge.plus",
|
|
34
|
+
"calendar-range": "calendar",
|
|
35
|
+
"calendar-sync": "arrow.triangle.2.circlepath",
|
|
36
|
+
camera: "camera",
|
|
37
|
+
"chart-bar": "chart.bar",
|
|
38
|
+
"chart-line": "chart.xyaxis.line",
|
|
39
|
+
check: "checkmark",
|
|
40
|
+
"check-circle": "checkmark.circle",
|
|
41
|
+
"check-circle-2": "checkmark.circle",
|
|
42
|
+
"chevron-down": "chevron.down",
|
|
43
|
+
"chevron-left": "chevron.left",
|
|
44
|
+
"chevron-right": "chevron.right",
|
|
45
|
+
"chevron-up": "chevron.up",
|
|
46
|
+
circle: "circle",
|
|
47
|
+
"circle-alert": "exclamationmark.circle",
|
|
48
|
+
"circle-check": "checkmark.circle",
|
|
49
|
+
"circle-check-big": "checkmark.circle",
|
|
50
|
+
"circle-help": "questionmark.circle",
|
|
51
|
+
"circle-play": "play.circle",
|
|
52
|
+
"circle-plus": "plus.circle",
|
|
53
|
+
"circle-user": "person.crop.circle",
|
|
54
|
+
"circle-x": "xmark.circle",
|
|
55
|
+
clapperboard: "film",
|
|
56
|
+
clipboard: "clipboard",
|
|
57
|
+
"clipboard-list": "list.clipboard",
|
|
58
|
+
clock: "clock",
|
|
59
|
+
cloud: "cloud",
|
|
60
|
+
"cloud-off": "icloud.slash",
|
|
61
|
+
coffee: "cup.and.saucer",
|
|
62
|
+
copy: "doc.on.doc",
|
|
63
|
+
"credit-card": "creditcard",
|
|
64
|
+
download: "arrow.down.circle",
|
|
65
|
+
droplet: "drop",
|
|
66
|
+
droplets: "drop",
|
|
67
|
+
dumbbell: "dumbbell",
|
|
68
|
+
edit: "pencil",
|
|
69
|
+
"external-link": "arrow.up.right.square",
|
|
70
|
+
eye: "eye",
|
|
71
|
+
"eye-off": "eye.slash",
|
|
72
|
+
file: "doc",
|
|
73
|
+
"file-text": "doc.text",
|
|
74
|
+
filter: "line.3.horizontal.decrease",
|
|
75
|
+
flag: "flag",
|
|
76
|
+
flame: "flame",
|
|
77
|
+
footprints: "figure.run",
|
|
78
|
+
gauge: "gauge",
|
|
79
|
+
gift: "gift",
|
|
80
|
+
globe: "globe",
|
|
81
|
+
"graduation-cap": "graduationcap",
|
|
82
|
+
"grip-vertical": "line.3.horizontal",
|
|
83
|
+
heart: "heart",
|
|
84
|
+
"heart-pulse": "heart.text.square",
|
|
85
|
+
"help-circle": "questionmark.circle",
|
|
86
|
+
history: "clock.arrow.circlepath",
|
|
87
|
+
home: "house",
|
|
88
|
+
house: "house",
|
|
89
|
+
image: "photo",
|
|
90
|
+
inbox: "tray",
|
|
91
|
+
info: "info.circle",
|
|
92
|
+
layers: "square.3.layers.3d",
|
|
93
|
+
"layout-grid": "square.grid.2x2",
|
|
94
|
+
library: "books.vertical",
|
|
95
|
+
link: "link",
|
|
96
|
+
list: "list.bullet",
|
|
97
|
+
"list-checks": "checklist",
|
|
98
|
+
loader: "arrow.triangle.2.circlepath",
|
|
99
|
+
"loader-2": "arrow.triangle.2.circlepath",
|
|
100
|
+
"loader-circle": "arrow.triangle.2.circlepath",
|
|
101
|
+
lock: "lock",
|
|
102
|
+
"log-in": "arrow.right.to.line",
|
|
103
|
+
"log-out": "rectangle.portrait.and.arrow.right",
|
|
104
|
+
mail: "envelope",
|
|
105
|
+
map: "map",
|
|
106
|
+
"map-pin": "mappin.and.ellipse",
|
|
107
|
+
medal: "medal",
|
|
108
|
+
menu: "line.3.horizontal",
|
|
109
|
+
"message-circle": "bubble.left",
|
|
110
|
+
"message-square": "text.bubble",
|
|
111
|
+
"message-square-quote": "quote.bubble",
|
|
112
|
+
mic: "mic",
|
|
113
|
+
minus: "minus",
|
|
114
|
+
moon: "moon",
|
|
115
|
+
"more-horizontal": "ellipsis",
|
|
116
|
+
"more-vertical": "ellipsis",
|
|
117
|
+
mountain: "mountain.2",
|
|
118
|
+
music: "music.note",
|
|
119
|
+
package: "shippingbox",
|
|
120
|
+
pause: "pause",
|
|
121
|
+
"pause-circle": "pause.circle",
|
|
122
|
+
pencil: "pencil",
|
|
123
|
+
"person-standing": "figure.walk",
|
|
124
|
+
phone: "phone",
|
|
125
|
+
play: "play.fill",
|
|
126
|
+
plug: "powerplug",
|
|
127
|
+
plus: "plus",
|
|
128
|
+
"plus-circle": "plus.circle",
|
|
129
|
+
"refresh-cw": "arrow.clockwise",
|
|
130
|
+
repeat: "repeat",
|
|
131
|
+
"rotate-ccw": "arrow.counterclockwise",
|
|
132
|
+
route: "point.topleft.down.to.point.bottomright.curvepath",
|
|
133
|
+
ruler: "ruler",
|
|
134
|
+
sailboat: "sailboat",
|
|
135
|
+
satellite: "antenna.radiowaves.left.and.right",
|
|
136
|
+
save: "square.and.arrow.down",
|
|
137
|
+
scale: "scalemass",
|
|
138
|
+
search: "magnifyingglass",
|
|
139
|
+
send: "paperplane",
|
|
140
|
+
settings: "gearshape",
|
|
141
|
+
"settings-2": "slider.horizontal.3",
|
|
142
|
+
share: "square.and.arrow.up",
|
|
143
|
+
"share-2": "square.and.arrow.up",
|
|
144
|
+
shield: "shield",
|
|
145
|
+
"shield-check": "checkmark.shield",
|
|
146
|
+
"shopping-bag": "bag",
|
|
147
|
+
"shopping-cart": "cart",
|
|
148
|
+
"skip-back": "backward.end",
|
|
149
|
+
"skip-forward": "forward.end",
|
|
150
|
+
sliders: "slider.horizontal.3",
|
|
151
|
+
"sliders-horizontal": "slider.horizontal.3",
|
|
152
|
+
smartphone: "iphone",
|
|
153
|
+
snowflake: "snowflake",
|
|
154
|
+
sparkles: "sparkles",
|
|
155
|
+
square: "square",
|
|
156
|
+
star: "star",
|
|
157
|
+
stopwatch: "stopwatch",
|
|
158
|
+
store: "storefront",
|
|
159
|
+
sun: "sun.max",
|
|
160
|
+
sunrise: "sunrise",
|
|
161
|
+
sunset: "sunset",
|
|
162
|
+
tag: "tag",
|
|
163
|
+
target: "scope",
|
|
164
|
+
thermometer: "thermometer.medium",
|
|
165
|
+
"thumbs-up": "hand.thumbsup",
|
|
166
|
+
timer: "timer",
|
|
167
|
+
trash: "trash",
|
|
168
|
+
"trash-2": "trash",
|
|
169
|
+
"trending-down": "chart.line.downtrend.xyaxis",
|
|
170
|
+
"trending-up": "chart.line.uptrend.xyaxis",
|
|
171
|
+
trophy: "trophy",
|
|
172
|
+
unlink: "personalhotspot.slash",
|
|
173
|
+
upload: "arrow.up.circle",
|
|
174
|
+
user: "person",
|
|
175
|
+
"user-plus": "person.badge.plus",
|
|
176
|
+
"user-round": "person",
|
|
177
|
+
users: "person.2",
|
|
178
|
+
video: "video",
|
|
179
|
+
"volume-2": "speaker.wave.2",
|
|
180
|
+
watch: "applewatch",
|
|
181
|
+
waves: "figure.pool.swim",
|
|
182
|
+
weight: "scalemass",
|
|
183
|
+
wifi: "wifi",
|
|
184
|
+
"wifi-off": "wifi.slash",
|
|
185
|
+
wind: "wind",
|
|
186
|
+
x: "xmark",
|
|
187
|
+
"x-circle": "xmark.circle",
|
|
188
|
+
zap: "bolt"
|
|
189
|
+
};
|
|
190
|
+
export function resolveIconName(name, asSymbol = !1) {
|
|
191
|
+
const value = String(name ?? "").trim();
|
|
192
|
+
if (!value)
|
|
193
|
+
return { symbol: FALLBACK_SYMBOL, known: !1 };
|
|
194
|
+
if (asSymbol)
|
|
195
|
+
return { symbol: value, known: !0 };
|
|
196
|
+
const prefixed = /^i-([a-z0-9]+)-(.+)$/.exec(value) ?? /^([a-z0-9]+):(.+)$/.exec(value), collection = prefixed ? prefixed[1] : "lucide", icon = prefixed ? prefixed[2] : value;
|
|
197
|
+
if (collection === "lucide") {
|
|
198
|
+
const symbol = LUCIDE_TO_SF[icon];
|
|
199
|
+
if (symbol)
|
|
200
|
+
return { symbol, iconify: `i-lucide-${icon}`, known: !0 };
|
|
201
|
+
if (!prefixed && value.includes("."))
|
|
202
|
+
return { symbol: value, known: !0 };
|
|
203
|
+
}
|
|
204
|
+
return { symbol: FALLBACK_SYMBOL, iconify: prefixed ? value : `i-lucide-${icon}`, known: !1 };
|
|
205
|
+
}
|
|
206
|
+
export function iconClassIn(classes) {
|
|
207
|
+
return classes.split(/\s+/).find((name) => /^i-[a-z0-9]+-[a-z0-9-]+$/.test(name));
|
|
208
|
+
}
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// Factory Functions
|
|
3
|
+
// ============================================================================
|
|
4
|
+
export declare function createNode(type: STXComponentType | string, props?: Record<string, unknown>, style?: STXStyle, events?: Record<string, string>, children?: (STXNode | string)[]): STXNode;
|
|
5
|
+
export declare function createDocument(root: STXNode, script: STXDocument['script'], meta?: Partial<STXDocument['meta']>): STXDocument;
|
|
6
|
+
export declare interface STXNode {
|
|
7
|
+
type: STXComponentType | string
|
|
8
|
+
key?: string
|
|
9
|
+
props: Record<string, unknown>
|
|
10
|
+
style: STXStyle
|
|
11
|
+
events: Record<string, string>
|
|
12
|
+
bindings?: Record<string, string>
|
|
13
|
+
directives?: STXDirectives
|
|
14
|
+
darkStyle?: STXStyle
|
|
15
|
+
children: (STXNode | string)[]
|
|
16
|
+
_classes?: string
|
|
17
|
+
_source?: {
|
|
18
|
+
file: string
|
|
19
|
+
line: number
|
|
20
|
+
column: number
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export declare interface STXDirectives {
|
|
24
|
+
if?: string
|
|
25
|
+
elseIf?: string
|
|
26
|
+
else?: boolean
|
|
27
|
+
for?: {
|
|
28
|
+
source: string
|
|
29
|
+
item: string
|
|
30
|
+
index?: string
|
|
31
|
+
}
|
|
32
|
+
show?: string
|
|
33
|
+
}
|
|
34
|
+
// ============================================================================
|
|
35
|
+
// Style Types (Maps to Yoga + Platform Styling)
|
|
36
|
+
// ============================================================================
|
|
37
|
+
export declare interface STXStyle {
|
|
38
|
+
display?: 'flex' | 'none' | 'grid'
|
|
39
|
+
gridColumns?: number
|
|
40
|
+
flex?: number
|
|
41
|
+
flexGrow?: number
|
|
42
|
+
flexShrink?: number
|
|
43
|
+
flexBasis?: number | string
|
|
44
|
+
flexDirection?: 'row' | 'column' | 'row-reverse' | 'column-reverse'
|
|
45
|
+
flexWrap?: 'wrap' | 'nowrap' | 'wrap-reverse'
|
|
46
|
+
justifyContent?: 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly'
|
|
47
|
+
alignItems?: 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline'
|
|
48
|
+
alignSelf?: 'auto' | 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline'
|
|
49
|
+
alignContent?: 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'space-between' | 'space-around'
|
|
50
|
+
position?: 'relative' | 'absolute'
|
|
51
|
+
top?: number | string
|
|
52
|
+
right?: number | string
|
|
53
|
+
bottom?: number | string
|
|
54
|
+
left?: number | string
|
|
55
|
+
zIndex?: number
|
|
56
|
+
width?: number | string
|
|
57
|
+
height?: number | string
|
|
58
|
+
minWidth?: number | string
|
|
59
|
+
maxWidth?: number | string
|
|
60
|
+
minHeight?: number | string
|
|
61
|
+
maxHeight?: number | string
|
|
62
|
+
aspectRatio?: number
|
|
63
|
+
margin?: number | string
|
|
64
|
+
marginTop?: number | string
|
|
65
|
+
marginRight?: number | string
|
|
66
|
+
marginBottom?: number | string
|
|
67
|
+
marginLeft?: number | string
|
|
68
|
+
marginHorizontal?: number | string
|
|
69
|
+
marginVertical?: number | string
|
|
70
|
+
padding?: number | string
|
|
71
|
+
paddingTop?: number | string
|
|
72
|
+
paddingRight?: number | string
|
|
73
|
+
paddingBottom?: number | string
|
|
74
|
+
paddingLeft?: number | string
|
|
75
|
+
paddingHorizontal?: number | string
|
|
76
|
+
paddingVertical?: number | string
|
|
77
|
+
gap?: number
|
|
78
|
+
rowGap?: number
|
|
79
|
+
columnGap?: number
|
|
80
|
+
borderWidth?: number
|
|
81
|
+
borderTopWidth?: number
|
|
82
|
+
borderRightWidth?: number
|
|
83
|
+
borderBottomWidth?: number
|
|
84
|
+
borderLeftWidth?: number
|
|
85
|
+
borderColor?: string
|
|
86
|
+
borderTopColor?: string
|
|
87
|
+
borderRightColor?: string
|
|
88
|
+
borderBottomColor?: string
|
|
89
|
+
borderLeftColor?: string
|
|
90
|
+
borderRadius?: number
|
|
91
|
+
borderTopLeftRadius?: number
|
|
92
|
+
borderTopRightRadius?: number
|
|
93
|
+
borderBottomLeftRadius?: number
|
|
94
|
+
borderBottomRightRadius?: number
|
|
95
|
+
borderStyle?: 'solid' | 'dashed' | 'dotted'
|
|
96
|
+
backgroundColor?: string
|
|
97
|
+
backgroundImage?: string
|
|
98
|
+
opacity?: number
|
|
99
|
+
shadowColor?: string
|
|
100
|
+
shadowOffset?: { width: number; height: number }
|
|
101
|
+
shadowOpacity?: number
|
|
102
|
+
shadowRadius?: number
|
|
103
|
+
elevation?: number
|
|
104
|
+
color?: string
|
|
105
|
+
fontSize?: number
|
|
106
|
+
fontWeight?: 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'
|
|
107
|
+
fontStyle?: 'normal' | 'italic'
|
|
108
|
+
fontFamily?: string
|
|
109
|
+
lineHeight?: number
|
|
110
|
+
letterSpacing?: number
|
|
111
|
+
textAlign?: 'auto' | 'left' | 'center' | 'right' | 'justify'
|
|
112
|
+
textDecorationLine?: 'none' | 'underline' | 'line-through' | 'underline line-through'
|
|
113
|
+
textDecorationColor?: string
|
|
114
|
+
textTransform?: 'none' | 'uppercase' | 'lowercase' | 'capitalize'
|
|
115
|
+
resizeMode?: 'cover' | 'contain' | 'stretch' | 'center' | 'repeat'
|
|
116
|
+
tintColor?: string
|
|
117
|
+
transform?: Array<
|
|
118
|
+
| { perspective: number }
|
|
119
|
+
| { rotate: string }
|
|
120
|
+
| { rotateX: string }
|
|
121
|
+
| { rotateY: string }
|
|
122
|
+
| { rotateZ: string }
|
|
123
|
+
| { scale: number }
|
|
124
|
+
| { scaleX: number }
|
|
125
|
+
| { scaleY: number }
|
|
126
|
+
| { translateX: number }
|
|
127
|
+
| { translateY: number }
|
|
128
|
+
| { skewX: string }
|
|
129
|
+
| { skewY: string }
|
|
130
|
+
>
|
|
131
|
+
overflow?: 'visible' | 'hidden' | 'scroll'
|
|
132
|
+
}
|
|
133
|
+
export declare interface STXEvent {
|
|
134
|
+
type: STXEventType
|
|
135
|
+
handler: string
|
|
136
|
+
nativeEvent?: unknown
|
|
137
|
+
}
|
|
138
|
+
// ============================================================================
|
|
139
|
+
// Document Types
|
|
140
|
+
// ============================================================================
|
|
141
|
+
export declare interface STXDocument {
|
|
142
|
+
version: '1.0.0'
|
|
143
|
+
root: STXNode
|
|
144
|
+
script: {
|
|
145
|
+
exports: Record<string, unknown>
|
|
146
|
+
functions: string[]
|
|
147
|
+
code: string
|
|
148
|
+
}
|
|
149
|
+
meta: {
|
|
150
|
+
source: string
|
|
151
|
+
compiledAt: number
|
|
152
|
+
headwindConfig?: string
|
|
153
|
+
warnings?: string[]
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
/** Platform-specific style overrides */
|
|
157
|
+
export declare interface PlatformStyles {
|
|
158
|
+
ios?: Partial<STXStyle>
|
|
159
|
+
android?: Partial<STXStyle>
|
|
160
|
+
web?: Partial<STXStyle>
|
|
161
|
+
}
|
|
162
|
+
/** Conditional style based on state */
|
|
163
|
+
export declare interface ConditionalStyle {
|
|
164
|
+
condition: string
|
|
165
|
+
style: STXStyle
|
|
166
|
+
}
|
|
167
|
+
/* eslint-disable style/max-statements-per-line */
|
|
168
|
+
/**
|
|
169
|
+
* STX Native Intermediate Representation (IR)
|
|
170
|
+
*
|
|
171
|
+
* Defines the JSON format that STX templates compile to.
|
|
172
|
+
* This IR is then consumed by platform-specific renderers
|
|
173
|
+
* to create native UI components.
|
|
174
|
+
*/
|
|
175
|
+
// ============================================================================
|
|
176
|
+
// Core Types
|
|
177
|
+
// ============================================================================
|
|
178
|
+
export type STXComponentType = | 'View'
|
|
179
|
+
| 'ScrollView'
|
|
180
|
+
| 'SafeAreaView'
|
|
181
|
+
| 'KeyboardAvoidingView'
|
|
182
|
+
// Text
|
|
183
|
+
| 'Text'
|
|
184
|
+
| 'TextInput'
|
|
185
|
+
// Interactive
|
|
186
|
+
| 'Button'
|
|
187
|
+
| 'TouchableOpacity'
|
|
188
|
+
| 'TouchableHighlight'
|
|
189
|
+
| 'Pressable'
|
|
190
|
+
// Media
|
|
191
|
+
| 'Image'
|
|
192
|
+
| 'ImageBackground'
|
|
193
|
+
// Lists
|
|
194
|
+
| 'FlatList'
|
|
195
|
+
| 'SectionList'
|
|
196
|
+
// Form
|
|
197
|
+
| 'Switch'
|
|
198
|
+
| 'Slider'
|
|
199
|
+
| 'Picker'
|
|
200
|
+
| 'DatePicker'
|
|
201
|
+
// Overlay
|
|
202
|
+
| 'Modal'
|
|
203
|
+
| 'ActivityIndicator'
|
|
204
|
+
// Platform specific
|
|
205
|
+
| 'StatusBar'
|
|
206
|
+
| 'RefreshControl';
|
|
207
|
+
// ============================================================================
|
|
208
|
+
// Event Types
|
|
209
|
+
// ============================================================================
|
|
210
|
+
export type STXEventType = | 'onPress'
|
|
211
|
+
| 'onPressIn'
|
|
212
|
+
| 'onPressOut'
|
|
213
|
+
| 'onLongPress'
|
|
214
|
+
// Gesture events
|
|
215
|
+
| 'onSwipe'
|
|
216
|
+
| 'onPan'
|
|
217
|
+
| 'onPinch'
|
|
218
|
+
// Text input events
|
|
219
|
+
| 'onChange'
|
|
220
|
+
| 'onChangeText'
|
|
221
|
+
| 'onFocus'
|
|
222
|
+
| 'onBlur'
|
|
223
|
+
| 'onSubmitEditing'
|
|
224
|
+
// Scroll events
|
|
225
|
+
| 'onScroll'
|
|
226
|
+
| 'onScrollBeginDrag'
|
|
227
|
+
| 'onScrollEndDrag'
|
|
228
|
+
| 'onMomentumScrollBegin'
|
|
229
|
+
| 'onMomentumScrollEnd'
|
|
230
|
+
// Layout events
|
|
231
|
+
| 'onLayout'
|
|
232
|
+
// List events
|
|
233
|
+
| 'onEndReached'
|
|
234
|
+
| 'onRefresh';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function createNode(type, props = {}, style = {}, events = {}, children = []) {
|
|
2
|
+
return { type, props, style, events, children };
|
|
3
|
+
}
|
|
4
|
+
export function createDocument(root, script, meta = {}) {
|
|
5
|
+
return {
|
|
6
|
+
version: "1.0.0",
|
|
7
|
+
root,
|
|
8
|
+
script,
|
|
9
|
+
meta: {
|
|
10
|
+
source: meta.source || "unknown",
|
|
11
|
+
compiledAt: meta.compiledAt || Date.now(),
|
|
12
|
+
headwindConfig: meta.headwindConfig
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { STXNode, STXDocument, STXComponentType, STXDirectives } from './ir';
|
|
2
|
+
export type { Token, TokenType, ParseContext };
|
|
3
|
+
/**
|
|
4
|
+
* `item in items`, `(item, index) in items`, `item of items`, and stx's
|
|
5
|
+
* `items as item` / `items as index => item`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function parseForExpression(value: string): STXDirectives['for'] | null;
|
|
8
|
+
/**
|
|
9
|
+
* stx's text directives as fragments the parser already understands.
|
|
10
|
+
*
|
|
11
|
+
* `@if (a) … @elseif (b) … @else … @endif` becomes sibling
|
|
12
|
+
* `<Fragment :if>`/`:else-if`/`:else` nodes, and `@foreach (items as item) …
|
|
13
|
+
* @endforeach` a `<Fragment :for>`, so the runtime evaluates both on every
|
|
14
|
+
* render like the attribute forms. Script and style blocks are left alone.
|
|
15
|
+
*/
|
|
16
|
+
export declare function expandTextDirectives(source: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* Parse an STX template string into an STX Document
|
|
19
|
+
*/
|
|
20
|
+
export declare function parseSTX(template: string, source?: string): STXDocument;
|
|
21
|
+
/**
|
|
22
|
+
* Parse an STX template and return just the root node (for simpler use cases)
|
|
23
|
+
*/
|
|
24
|
+
export declare function parseSTXToNode(template: string): STXNode;
|
|
25
|
+
/**
|
|
26
|
+
* Compile an STX template to JSON IR
|
|
27
|
+
*/
|
|
28
|
+
export declare function compileSTX(template: string, source?: string): string;
|
|
29
|
+
/**
|
|
30
|
+
* Compile multiple STX files and return a map of their IRs
|
|
31
|
+
*/
|
|
32
|
+
export declare function compileSTXFiles(files: Record<string, string>): Record<string, STXDocument>;
|
|
33
|
+
/**
|
|
34
|
+
* Map HTML-like tags to native component types
|
|
35
|
+
*/
|
|
36
|
+
export declare function mapToNativeComponent(tag: string): STXComponentType | string;
|
|
37
|
+
/**
|
|
38
|
+
* Transform a node tree to use native component types
|
|
39
|
+
*/
|
|
40
|
+
export declare function transformToNativeComponents(node: STXNode): STXNode;
|
|
41
|
+
declare interface Token {
|
|
42
|
+
type: TokenType
|
|
43
|
+
value: string
|
|
44
|
+
raw?: string
|
|
45
|
+
line: number
|
|
46
|
+
column: number
|
|
47
|
+
}
|
|
48
|
+
// ============================================================================
|
|
49
|
+
// Parser
|
|
50
|
+
// ============================================================================
|
|
51
|
+
declare interface ParseContext {
|
|
52
|
+
source: string
|
|
53
|
+
tokens: Token[]
|
|
54
|
+
pos: number
|
|
55
|
+
scriptCode: string
|
|
56
|
+
exports: Record<string, unknown>
|
|
57
|
+
functions: string[]
|
|
58
|
+
warnings: string[]
|
|
59
|
+
}
|
|
60
|
+
// ============================================================================
|
|
61
|
+
// Tokenizer Types
|
|
62
|
+
// ============================================================================
|
|
63
|
+
declare type TokenType = | 'TAG_OPEN' // <View
|
|
64
|
+
| 'TAG_CLOSE' // </View>
|
|
65
|
+
| 'TAG_SELF_CLOSE' // />
|
|
66
|
+
| 'TAG_END' // >
|
|
67
|
+
| 'ATTRIBUTE' // class="..."
|
|
68
|
+
| 'TEXT' // Plain text content
|
|
69
|
+
| 'EXPRESSION' // {variable}
|
|
70
|
+
| 'SCRIPT_BLOCK' // <script>...</script>
|
|
71
|
+
| 'STYLE_BLOCK' // <style>...</style>
|
|
72
|
+
| 'COMMENT' // <!-- ... -->
|
|
73
|
+
| 'EOF';
|
|
74
|
+
// ============================================================================
|
|
75
|
+
// Lexer
|
|
76
|
+
// ============================================================================
|
|
77
|
+
declare class Lexer {
|
|
78
|
+
constructor(input: string);
|
|
79
|
+
tokenize(): Token[];
|
|
80
|
+
}
|
|
81
|
+
declare class Parser {
|
|
82
|
+
constructor(tokens: Token[], source: string);
|
|
83
|
+
parse(): STXDocument;
|
|
84
|
+
}
|
|
85
|
+
// ============================================================================
|
|
86
|
+
// Exports
|
|
87
|
+
// ============================================================================
|
|
88
|
+
export { Lexer, Parser };
|