regen: WASM build artifacts after hs-f merge
Bytecode + sx_browser.bc.{js,wasm.js} regenerated from sources updated
by the hs-f merge (e8246340). No semantic change — these are build
outputs catching up to their inputs.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -806,7 +806,7 @@
|
||||
(define
|
||||
try-async-eval-content
|
||||
(fn (content-src env callback) (try-eval-content content-src env)))
|
||||
(define try-rerender-page (fn () nil))
|
||||
(define try-rerender-page (fn (page-name params result) nil))
|
||||
(define execute-action (fn () nil))
|
||||
(define bind-preload (fn () nil))
|
||||
(define persist-offline-data (fn () nil))
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -195,22 +195,19 @@
|
||||
"Query DOM and return an SX list (not a host NodeList)."
|
||||
(let
|
||||
((node-list (if (nil? sel) (host-call (dom-document) "querySelectorAll" root) (host-call root "querySelectorAll" sel))))
|
||||
(cond
|
||||
((nil? node-list) (list))
|
||||
((list? node-list) node-list)
|
||||
(true
|
||||
(if
|
||||
(nil? node-list)
|
||||
(list)
|
||||
(let
|
||||
((n (host-get node-list "length")) (result (list)))
|
||||
(let
|
||||
((n (host-get node-list "length")) (result (list)))
|
||||
loop
|
||||
((i 0))
|
||||
(when
|
||||
(not (nil? n))
|
||||
(let
|
||||
loop
|
||||
((i 0))
|
||||
(when
|
||||
(< i n)
|
||||
(append! result (host-call node-list "item" i))
|
||||
(loop (+ i 1)))))
|
||||
result))))))
|
||||
(< i n)
|
||||
(append! result (host-call node-list "item" i))
|
||||
(loop (+ i 1))))
|
||||
result)))))
|
||||
(define
|
||||
dom-query-by-id
|
||||
(fn (id) (host-call (dom-document) "getElementById" id)))
|
||||
@@ -261,28 +258,12 @@
|
||||
dom-add-class
|
||||
(fn
|
||||
(el cls)
|
||||
(cond
|
||||
((nil? el) nil)
|
||||
((list? el)
|
||||
(for-each
|
||||
(fn
|
||||
(x)
|
||||
(when x (host-call (host-get x "classList") "add" cls)))
|
||||
el))
|
||||
(true (host-call (host-get el "classList") "add" cls)))))
|
||||
(when el (host-call (host-get el "classList") "add" cls))))
|
||||
(define
|
||||
dom-remove-class
|
||||
(fn
|
||||
(el cls)
|
||||
(cond
|
||||
((nil? el) nil)
|
||||
((list? el)
|
||||
(for-each
|
||||
(fn
|
||||
(x)
|
||||
(when x (host-call (host-get x "classList") "remove" cls)))
|
||||
el))
|
||||
(true (host-call (host-get el "classList") "remove" cls)))))
|
||||
(when el (host-call (host-get el "classList") "remove" cls))))
|
||||
(define
|
||||
dom-has-class?
|
||||
(fn
|
||||
@@ -324,54 +305,42 @@
|
||||
(fn
|
||||
(el)
|
||||
"Return child nodes as an SX list."
|
||||
(cond
|
||||
((nil? el) (list))
|
||||
(true
|
||||
(if
|
||||
el
|
||||
(let
|
||||
((nl (host-get el "childNodes"))
|
||||
(n (host-get nl "length"))
|
||||
(result (list)))
|
||||
(let
|
||||
((nl (host-get el "childNodes")))
|
||||
(cond
|
||||
((nil? nl) (list))
|
||||
((list? nl) nl)
|
||||
(true
|
||||
(let
|
||||
((n (host-get nl "length")) (result (list)))
|
||||
(when
|
||||
(not (nil? n))
|
||||
(let
|
||||
loop
|
||||
((i 0))
|
||||
(when
|
||||
(< i n)
|
||||
(append! result (host-call nl "item" i))
|
||||
(loop (+ i 1)))))
|
||||
result))))))))
|
||||
loop
|
||||
((i 0))
|
||||
(when
|
||||
(< i n)
|
||||
(append! result (host-call nl "item" i))
|
||||
(loop (+ i 1))))
|
||||
result)
|
||||
(list))))
|
||||
(define dom-is-fragment? (fn (el) (= (host-get el "nodeType") 11)))
|
||||
(define
|
||||
dom-child-nodes
|
||||
(fn
|
||||
(el)
|
||||
"Return child nodes as an SX list."
|
||||
(cond
|
||||
((nil? el) (list))
|
||||
(true
|
||||
(if
|
||||
el
|
||||
(let
|
||||
((nl (host-get el "childNodes"))
|
||||
(n (host-get nl "length"))
|
||||
(result (list)))
|
||||
(let
|
||||
((nl (host-get el "childNodes")))
|
||||
(cond
|
||||
((nil? nl) (list))
|
||||
((list? nl) nl)
|
||||
(true
|
||||
(let
|
||||
((n (host-get nl "length")) (result (list)))
|
||||
(when
|
||||
(not (nil? n))
|
||||
(let
|
||||
loop
|
||||
((i 0))
|
||||
(when
|
||||
(< i n)
|
||||
(append! result (host-call nl "item" i))
|
||||
(loop (+ i 1)))))
|
||||
result))))))))
|
||||
loop
|
||||
((i 0))
|
||||
(when
|
||||
(< i n)
|
||||
(append! result (host-call nl "item" i))
|
||||
(loop (+ i 1))))
|
||||
result)
|
||||
(list))))
|
||||
(define
|
||||
dom-remove-children-after
|
||||
(fn
|
||||
@@ -466,7 +435,7 @@
|
||||
(el key val)
|
||||
(when
|
||||
(not (host-get el "__sx_data"))
|
||||
(host-set! el "__sx_data" (host-new "Object")))
|
||||
(host-set! el "__sx_data" (dict)))
|
||||
(host-set! (host-get el "__sx_data") key val)))
|
||||
(define
|
||||
dom-append-to-head
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,3 +1,3 @@
|
||||
(sxbc 1 "050ab6181dc93341"
|
||||
(code
|
||||
:constants ("freeze-registry" "dict" "freeze-signal" {:upvalue-count 0 :arity 2 :constants ("sx-freeze-scope" "context" "get" "freeze-registry" "list" "append!" "dict" "name" "signal" "dict-set!") :bytecode (1 0 0 2 52 1 0 2 17 2 16 2 33 55 0 20 3 0 16 2 52 2 0 2 6 34 5 0 5 52 4 0 0 17 3 16 3 1 7 0 16 0 1 8 0 16 1 52 6 0 4 52 5 0 2 5 20 3 0 16 2 16 3 52 9 0 3 32 1 0 2 50)} "freeze-scope" {:upvalue-count 0 :arity 2 :constants ("scope-push!" "sx-freeze-scope" "dict-set!" "freeze-registry" "list" "cek-call" "scope-pop!") :bytecode (1 1 0 16 0 52 0 0 2 5 20 3 0 16 0 52 4 0 0 52 2 0 3 5 16 1 2 52 5 0 2 5 1 1 0 52 6 0 1 5 2 50)} "cek-freeze-scope" {:upvalue-count 0 :arity 1 :constants ("get" "freeze-registry" "list" "dict" "for-each" {:upvalue-count 1 :arity 1 :constants ("dict-set!" "get" "name" "signal-value" "signal") :bytecode (18 0 16 0 1 2 0 52 1 0 2 20 3 0 16 0 1 4 0 52 1 0 2 48 1 52 0 0 3 50)} "name" "signals") :bytecode (20 1 0 16 0 52 0 0 2 6 34 5 0 5 52 2 0 0 17 1 52 3 0 0 17 2 51 5 0 1 2 16 1 52 4 0 2 5 1 6 0 16 0 1 7 0 16 2 52 3 0 4 50)} "cek-freeze-all" {:upvalue-count 0 :arity 0 :constants ("map" {:upvalue-count 0 :arity 1 :constants ("cek-freeze-scope") :bytecode (20 0 0 16 0 49 1 50)} "keys" "freeze-registry") :bytecode (51 1 0 20 3 0 52 2 0 1 52 0 0 2 50)} "cek-thaw-scope" {:upvalue-count 0 :arity 2 :constants ("get" "freeze-registry" "list" "signals" "for-each" {:upvalue-count 1 :arity 1 :constants ("get" "name" "signal" "not" "nil?" "reset!") :bytecode (16 0 1 1 0 52 0 0 2 17 1 16 0 1 2 0 52 0 0 2 17 2 18 0 16 1 52 0 0 2 17 3 16 3 52 4 0 1 52 3 0 1 33 12 0 20 5 0 16 2 16 3 49 2 32 1 0 2 50)}) :bytecode (20 1 0 16 0 52 0 0 2 6 34 5 0 5 52 2 0 0 17 2 16 1 1 3 0 52 0 0 2 17 3 16 3 33 14 0 51 5 0 1 3 16 2 52 4 0 2 32 1 0 2 50)} "cek-thaw-all" {:upvalue-count 0 :arity 1 :constants ("for-each" {:upvalue-count 0 :arity 1 :constants ("cek-thaw-scope" "get" "name") :bytecode (20 0 0 16 0 1 2 0 52 1 0 2 16 0 49 2 50)}) :bytecode (51 1 0 16 0 52 0 0 2 50)} "freeze-to-sx" {:upvalue-count 0 :arity 1 :constants ("sx-serialize" "cek-freeze-scope") :bytecode (20 1 0 16 0 48 1 52 0 0 1 50)} "thaw-from-sx" {:upvalue-count 0 :arity 1 :constants ("sx-parse" "not" "empty?" "first" "cek-thaw-scope" "get" "name") :bytecode (20 0 0 16 0 48 1 17 1 16 1 52 2 0 1 52 1 0 1 33 27 0 16 1 52 3 0 1 17 2 20 4 0 16 2 1 6 0 52 5 0 2 16 2 49 2 32 1 0 2 50)} {:library (sx freeze) :op "import"}) :bytecode (52 1 0 0 128 0 0 5 51 3 0 128 2 0 5 51 5 0 128 4 0 5 51 7 0 128 6 0 5 51 9 0 128 8 0 5 51 11 0 128 10 0 5 51 13 0 128 12 0 5 51 15 0 128 14 0 5 51 17 0 128 16 0 5 1 18 0 112 50)))
|
||||
:constants ("freeze-registry" "dict" "freeze-signal" {:upvalue-count nil :arity nil :constants ("sx-freeze-scope" "context" "get" "freeze-registry" "list" "append!" "dict" "name" "signal" "dict-set!") :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil)} "freeze-scope" {:upvalue-count nil :arity nil :constants ("scope-push!" "sx-freeze-scope" "dict-set!" "freeze-registry" "list" "cek-call" "scope-pop!") :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil)} "cek-freeze-scope" {:upvalue-count nil :arity nil :constants ("get" "freeze-registry" "list" "dict" "for-each" {:upvalue-count nil :arity nil :constants ("dict-set!" "get" "name" "signal-value" "signal") :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil)} "name" "signals") :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil)} "cek-freeze-all" {:upvalue-count nil :arity nil :constants ("map" {:upvalue-count nil :arity nil :constants ("cek-freeze-scope") :bytecode (nil nil nil nil nil nil nil nil)} "keys" "freeze-registry") :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil)} "cek-thaw-scope" {:upvalue-count nil :arity nil :constants ("get" "freeze-registry" "list" "signals" "for-each" {:upvalue-count nil :arity nil :constants ("get" "name" "signal" "not" "nil?" "reset!") :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil)}) :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil)} "cek-thaw-all" {:upvalue-count nil :arity nil :constants ("for-each" {:upvalue-count nil :arity nil :constants ("cek-thaw-scope" "get" "name") :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil)}) :bytecode (nil nil nil nil nil nil nil nil nil nil)} "freeze-to-sx" {:upvalue-count nil :arity nil :constants ("sx-serialize" "cek-freeze-scope") :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil)} "thaw-from-sx" {:upvalue-count nil :arity nil :constants ("sx-parse" "not" "empty?" "first" "cek-thaw-scope" "get" "name") :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil)} {:library (sx freeze) :op "import"}) :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil)))
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
(sxbc 1 "0bc2cc2f659d5a90"
|
||||
(code
|
||||
:constants ("assert-signal-value" {:upvalue-count 0 :arity 2 :constants ("deref" "assert=" "str" "Expected signal value " ", got ") :bytecode (16 0 52 0 0 1 17 2 20 1 0 16 2 16 1 1 3 0 16 1 1 4 0 16 2 52 2 0 4 49 3 50)} "assert-signal-has-subscribers" {:upvalue-count 0 :arity 1 :constants ("assert" ">" "len" "signal-subscribers" 0 "Expected signal to have subscribers") :bytecode (20 0 0 20 3 0 16 0 48 1 52 2 0 1 1 4 0 52 1 0 2 1 5 0 49 2 50)} "assert-signal-no-subscribers" {:upvalue-count 0 :arity 1 :constants ("assert" "=" "len" "signal-subscribers" 0 "Expected signal to have no subscribers") :bytecode (20 0 0 20 3 0 16 0 48 1 52 2 0 1 1 4 0 52 1 0 2 1 5 0 49 2 50)} "assert-signal-subscriber-count" {:upvalue-count 0 :arity 2 :constants ("len" "signal-subscribers" "assert=" "str" "Expected " " subscribers, got ") :bytecode (20 1 0 16 0 48 1 52 0 0 1 17 2 20 2 0 16 2 16 1 1 4 0 16 1 1 5 0 16 2 52 3 0 4 49 3 50)} "simulate-signal-set!" {:upvalue-count 0 :arity 2 :constants ("reset!") :bytecode (20 0 0 16 0 16 1 49 2 50)} "simulate-signal-swap!" {:upvalue-count 0 :arity 2 :constants ("swap!") :bytecode (20 0 0 16 0 16 1 49 2 50)} "assert-computed-dep-count" {:upvalue-count 0 :arity 2 :constants ("len" "signal-deps" "assert=" "str" "Expected " " deps, got ") :bytecode (20 1 0 16 0 48 1 52 0 0 1 17 2 20 2 0 16 2 16 1 1 4 0 16 1 1 5 0 16 2 52 3 0 4 49 3 50)} "assert-computed-depends-on" {:upvalue-count 0 :arity 2 :constants ("assert" "contains?" "signal-deps" "Expected computed to depend on the given signal") :bytecode (20 0 0 20 2 0 16 0 48 1 16 1 52 1 0 2 1 3 0 49 2 50)} "count-effect-runs" {:upvalue-count 0 :arity 1 :constants ("signal" 0 "effect" {:upvalue-count 1 :arity 0 :constants ("deref") :bytecode (18 0 52 0 0 1 50)} {:upvalue-count 2 :arity 0 :constants ("+" 1 "cek-call") :bytecode (18 0 1 1 0 52 0 0 2 19 0 5 18 1 2 52 2 0 2 50)}) :bytecode (20 0 0 1 1 0 48 1 17 1 20 2 0 51 3 0 1 1 48 1 5 1 1 0 17 2 20 2 0 51 4 0 1 2 1 0 48 1 17 3 16 2 50)} "make-test-signal" {:upvalue-count 0 :arity 1 :constants ("signal" "list" "effect" {:upvalue-count 2 :arity 0 :constants ("append!" "deref") :bytecode (18 0 18 1 52 1 0 1 52 0 0 2 50)} "history") :bytecode (20 0 0 16 0 48 1 17 1 52 1 0 0 17 2 20 2 0 51 3 0 1 2 1 1 48 1 5 1 0 0 16 1 1 4 0 16 2 65 2 0 50)} "assert-batch-coalesces" {:upvalue-count 0 :arity 2 :constants (0 "signal" "effect" {:upvalue-count 2 :arity 0 :constants ("deref" "+" 1) :bytecode (18 0 52 0 0 1 5 18 1 1 2 0 52 1 0 2 19 1 50)} "batch" "assert=" "str" "Expected " " notifications, got ") :bytecode (1 0 0 17 2 20 1 0 1 0 0 48 1 17 3 20 2 0 51 3 0 1 3 1 2 48 1 5 1 0 0 17 2 5 20 4 0 16 0 48 1 5 20 5 0 16 2 16 1 1 7 0 16 1 1 8 0 16 2 52 6 0 4 49 3 50)} {:library (sx harness-reactive) :op "import"}) :bytecode (51 1 0 128 0 0 5 51 3 0 128 2 0 5 51 5 0 128 4 0 5 51 7 0 128 6 0 5 51 9 0 128 8 0 5 51 11 0 128 10 0 5 51 13 0 128 12 0 5 51 15 0 128 14 0 5 51 17 0 128 16 0 5 51 19 0 128 18 0 5 51 21 0 128 20 0 5 1 22 0 112 50)))
|
||||
:constants ("assert-signal-value" {:upvalue-count nil :arity nil :constants ("deref" "assert=" "str" "Expected signal value " ", got ") :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil)} "assert-signal-has-subscribers" {:upvalue-count nil :arity nil :constants ("assert" ">" "len" "signal-subscribers" nil "Expected signal to have subscribers") :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil)} "assert-signal-no-subscribers" {:upvalue-count nil :arity nil :constants ("assert" "=" "len" "signal-subscribers" nil "Expected signal to have no subscribers") :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil)} "assert-signal-subscriber-count" {:upvalue-count nil :arity nil :constants ("len" "signal-subscribers" "assert=" "str" "Expected " " subscribers, got ") :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil)} "simulate-signal-set!" {:upvalue-count nil :arity nil :constants ("reset!") :bytecode (nil nil nil nil nil nil nil nil nil nil)} "simulate-signal-swap!" {:upvalue-count nil :arity nil :constants ("swap!") :bytecode (nil nil nil nil nil nil nil nil nil nil)} "assert-computed-dep-count" {:upvalue-count nil :arity nil :constants ("len" "signal-deps" "assert=" "str" "Expected " " deps, got ") :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil)} "assert-computed-depends-on" {:upvalue-count nil :arity nil :constants ("assert" "contains?" "signal-deps" "Expected computed to depend on the given signal") :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil)} "count-effect-runs" {:upvalue-count nil :arity nil :constants ("signal" nil "effect" {:upvalue-count nil :arity nil :constants ("deref") :bytecode (nil nil nil nil nil nil nil)} {:upvalue-count nil :arity nil :constants ("+" nil "cek-call") :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil)}) :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil)} "make-test-signal" {:upvalue-count nil :arity nil :constants ("signal" "list" "effect" {:upvalue-count nil :arity nil :constants ("append!" "deref") :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil nil)} "history") :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil)} "assert-batch-coalesces" {:upvalue-count nil :arity nil :constants (nil "signal" "effect" {:upvalue-count nil :arity nil :constants ("deref" "+" nil) :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil)} "batch" "assert=" "str" "Expected " " notifications, got ") :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil)} {:library (sx harness-reactive) :op "import"}) :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil)))
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -87,18 +87,33 @@
|
||||
(not (dom-get-data script "hs-script-loaded"))
|
||||
(let
|
||||
((src (host-get script "innerHTML")))
|
||||
(when
|
||||
(and src (not (= src "")))
|
||||
(guard
|
||||
(_e (true nil))
|
||||
(eval-expr-cek (hs-to-sx-from-source src)))
|
||||
(dom-set-data script "hs-script-loaded" true)))))
|
||||
(guard
|
||||
(_e (true nil))
|
||||
(let
|
||||
((handler (eval-expr-cek (hs-to-sx-from-source src))))
|
||||
(handler (dom-body)))))))
|
||||
(hs-query-all "script[type=text/hyperscript]"))))
|
||||
|
||||
;; ── Boot: scan entire document ──────────────────────────────────
|
||||
;; Called once at page load. Finds all elements with _ attribute,
|
||||
;; compiles their hyperscript, and activates them.
|
||||
|
||||
(define
|
||||
hs-scripting-disabled?
|
||||
(fn
|
||||
(el)
|
||||
(if
|
||||
(= el nil)
|
||||
false
|
||||
(if
|
||||
(dom-get-attr el "disable-scripting")
|
||||
true
|
||||
(hs-scripting-disabled? (dom-parent el))))))
|
||||
|
||||
;; ── Boot subtree: for dynamic content ───────────────────────────
|
||||
;; Called after HTMX swaps or dynamic DOM insertion.
|
||||
;; Only activates elements within the given root.
|
||||
|
||||
(define
|
||||
hs-activate!
|
||||
(fn
|
||||
@@ -108,7 +123,7 @@
|
||||
(let
|
||||
((src (dom-get-attr el "_")) (prev (dom-get-data el "hs-script")))
|
||||
(when
|
||||
(and src (not (= src prev)))
|
||||
(and src (not (= src prev)) (not (hs-scripting-disabled? el)))
|
||||
(when
|
||||
(dom-dispatch el "hyperscript:before:init" nil)
|
||||
(hs-log-event! "hyperscript:init")
|
||||
@@ -120,7 +135,7 @@
|
||||
(_e
|
||||
(true
|
||||
(do
|
||||
(dom-dispatch el "hyperscript:parse-error" {:detail {:errors (list _e)}})
|
||||
(dom-dispatch el "hyperscript:parse-error" {:errors (list _e)})
|
||||
nil)))
|
||||
(let
|
||||
((handler (hs-handler src)))
|
||||
@@ -138,10 +153,6 @@
|
||||
(host-set! (host-global "window") "__hs_current_me" nil)
|
||||
(dom-dispatch el "hyperscript:after:init" nil)))))))
|
||||
|
||||
;; ── Boot subtree: for dynamic content ───────────────────────────
|
||||
;; Called after HTMX swaps or dynamic DOM insertion.
|
||||
;; Only activates elements within the given root.
|
||||
|
||||
(define
|
||||
hs-deactivate!
|
||||
(fn
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,3 +1,3 @@
|
||||
(sxbc 1 "232c1519553b1d5f"
|
||||
(code
|
||||
:constants ("with-marsh-scope" {:upvalue-count 0 :arity 2 :constants ("list" "with-island-scope" {:upvalue-count 1 :arity 1 :constants ("append!") :bytecode (18 0 16 0 52 0 0 2 50)} "dom-set-data" "sx-marsh-disposers") :bytecode (52 0 0 0 17 2 20 1 0 51 2 0 1 2 16 1 48 2 5 20 3 0 16 0 1 4 0 16 2 49 3 50)} "dispose-marsh-scope" {:upvalue-count 0 :arity 1 :constants ("dom-get-data" "sx-marsh-disposers" "for-each" {:upvalue-count 0 :arity 1 :constants ("cek-call") :bytecode (16 0 2 52 0 0 2 50)} "dom-set-data") :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 16 1 33 24 0 51 3 0 16 1 52 2 0 2 5 20 4 0 16 0 1 1 0 2 49 3 32 1 0 2 50)} "emit-event" {:upvalue-count 0 :arity 3 :constants ("dom-dispatch") :bytecode (20 0 0 16 0 16 1 16 2 49 3 50)} "on-event" {:upvalue-count 0 :arity 3 :constants ("dom-on") :bytecode (20 0 0 16 0 16 1 16 2 49 3 50)} "bridge-event" {:upvalue-count 0 :arity 4 :constants ("effect" {:upvalue-count 4 :arity 0 :constants ("dom-on" {:upvalue-count 2 :arity 1 :constants ("event-detail" "cek-call" "list" "reset!") :bytecode (20 0 0 16 0 48 1 17 1 18 0 33 15 0 18 0 16 1 52 2 0 1 52 1 0 2 32 2 0 16 1 17 2 20 3 0 18 1 16 2 49 2 50)}) :bytecode (20 0 0 18 0 18 1 51 1 0 0 2 0 3 48 3 17 0 16 0 50)}) :bytecode (20 0 0 51 1 0 1 0 1 1 1 3 1 2 49 1 50)} "resource" {:upvalue-count 0 :arity 1 :constants ("signal" "dict" "loading" "data" "error" "promise-then" "cek-call" {:upvalue-count 1 :arity 1 :constants ("reset!" "dict" "loading" "data" "error") :bytecode (20 0 0 18 0 1 2 0 4 1 3 0 16 0 1 4 0 2 52 1 0 6 49 2 50)} {:upvalue-count 1 :arity 1 :constants ("reset!" "dict" "loading" "data" "error") :bytecode (20 0 0 18 0 1 2 0 4 1 3 0 2 1 4 0 16 0 52 1 0 6 49 2 50)}) :bytecode (20 0 0 1 2 0 3 1 3 0 2 1 4 0 2 52 1 0 6 48 1 17 1 20 5 0 16 0 2 52 6 0 2 51 7 0 1 1 51 8 0 1 1 48 3 5 16 1 50)} {:library (sx signals-web) :op "import"}) :bytecode (51 1 0 128 0 0 5 51 3 0 128 2 0 5 51 5 0 128 4 0 5 51 7 0 128 6 0 5 51 9 0 128 8 0 5 51 11 0 128 10 0 5 1 12 0 112 50)))
|
||||
:constants ("with-marsh-scope" {:upvalue-count nil :arity nil :constants ("list" "with-island-scope" {:upvalue-count nil :arity nil :constants ("append!") :bytecode (nil nil nil nil nil nil nil nil nil)} "dom-set-data" "sx-marsh-disposers") :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil)} "dispose-marsh-scope" {:upvalue-count nil :arity nil :constants ("dom-get-data" "sx-marsh-disposers" "for-each" {:upvalue-count nil :arity nil :constants ("cek-call") :bytecode (nil nil nil nil nil nil nil nil)} "dom-set-data") :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil)} "emit-event" {:upvalue-count nil :arity nil :constants ("dom-dispatch") :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil)} "on-event" {:upvalue-count nil :arity nil :constants ("dom-on") :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil)} "bridge-event" {:upvalue-count nil :arity nil :constants ("effect" {:upvalue-count nil :arity nil :constants ("dom-on" {:upvalue-count nil :arity nil :constants ("event-detail" "cek-call" "list" "reset!") :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil)}) :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil)}) :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil)} "resource" {:upvalue-count nil :arity nil :constants ("signal" "dict" "loading" "data" "error" "promise-then" "cek-call" {:upvalue-count nil :arity nil :constants ("reset!" "dict" "loading" "data" "error") :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil)} {:upvalue-count nil :arity nil :constants ("reset!" "dict" "loading" "data" "error") :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil)}) :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil)} {:library (sx signals-web) :op "import"}) :bytecode (nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil)))
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user