Parser: skip unit suffix when next ident is a comparison keyword (starts, ends, contains, matches, is, does, in, precedes, follows). Fixes "123 starts with '12'" returning "123starts" instead of true. eval-hs: use hs-compile directly instead of hs-to-sx-from-source with "return " prefix, which was causing the parser to consume the comparison as a string suffix. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
12 lines
816 B
Plaintext
12 lines
816 B
Plaintext
(defcomp
|
|
()
|
|
(~examples/page-content
|
|
:title "Dialogs"
|
|
:description "Open a modal dialog by swapping in the dialog component. Close by swapping in empty content. Pure sx — no JavaScript library needed."
|
|
:demo-description "Click to open a modal dialog."
|
|
:demo (~examples/dialogs-demo)
|
|
:sx-code "(button\n :sx-get \"/sx/(geography.(hypermedia.(example.(api.dialog))))\"\n :sx-target \"#dialog-container\"\n :sx-swap \"innerHTML\"\n \"Open Dialog\")\n\n;; Dialog closes by swapping empty content\n(button\n :sx-get \"/sx/(geography.(hypermedia.(example.(api.dialog-close))))\"\n :sx-target \"#dialog-container\"\n :sx-swap \"innerHTML\"\n \"Close\")"
|
|
:handler-names (list "ex-dialog" "ex-dialog-close")
|
|
:comp-placeholder-id "dialog-comp"
|
|
:wire-placeholder-id "dialog-wire"))
|