- signals.sx: guard effect body with (when (client?) ...) so effects
are no-op during SSR — only 2 stubs needed (effect, register-in-scope)
- sx_primitives.ml: add resource SSR stub (returns signal {loading: true}),
remove 27 unnecessary browser primitive stubs
- sx_server.ml: native component-source that looks up Component/Island
from env and pretty-prints the definition (replaces broken Python helper)
- reactive-islands/index.sx: Examples section with all 15 live demos
inline + highlighted source via component-source
- reactive-islands/demo.sx: replace 14 hardcoded highlight strings with
(component-source "~name") calls for always-current source
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
4 lines
7.2 KiB
Plaintext
4 lines
7.2 KiB
Plaintext
(sxbc 1 "b149b21c8bdcb90e"
|
|
(code
|
|
:constants ("browser-location-href" {:upvalue-count 0 :arity 0 :constants ("host-get" "dom-window" "location" "href") :bytecode (20 1 0 48 0 1 2 0 52 0 0 2 1 3 0 52 0 0 2 50)} "browser-location-pathname" {:upvalue-count 0 :arity 0 :constants ("host-get" "dom-window" "location" "pathname") :bytecode (20 1 0 48 0 1 2 0 52 0 0 2 1 3 0 52 0 0 2 50)} "browser-location-origin" {:upvalue-count 0 :arity 0 :constants ("host-get" "dom-window" "location" "origin") :bytecode (20 1 0 48 0 1 2 0 52 0 0 2 1 3 0 52 0 0 2 50)} "browser-same-origin?" {:upvalue-count 0 :arity 1 :constants ("starts-with?" "browser-location-origin") :bytecode (16 0 20 1 0 48 0 52 0 0 2 50)} "url-pathname" {:upvalue-count 0 :arity 1 :constants ("host-get" "host-new" "URL" "browser-location-origin" "pathname") :bytecode (1 2 0 16 0 20 3 0 48 0 52 1 0 3 1 4 0 52 0 0 2 50)} "browser-push-state" {:upvalue-count 0 :arity 3 :constants ("nil?" "host-call" "host-get" "dom-window" "history" "pushState" "") :bytecode (16 1 52 0 0 1 33 28 0 20 3 0 48 0 1 4 0 52 2 0 2 1 5 0 2 1 6 0 16 0 52 1 0 5 32 25 0 20 3 0 48 0 1 4 0 52 2 0 2 1 5 0 16 0 16 1 16 2 52 1 0 5 50)} "browser-replace-state" {:upvalue-count 0 :arity 3 :constants ("nil?" "host-call" "host-get" "dom-window" "history" "replaceState" "") :bytecode (16 1 52 0 0 1 33 28 0 20 3 0 48 0 1 4 0 52 2 0 2 1 5 0 2 1 6 0 16 0 52 1 0 5 32 25 0 20 3 0 48 0 1 4 0 52 2 0 2 1 5 0 16 0 16 1 16 2 52 1 0 5 50)} "browser-reload" {:upvalue-count 0 :arity 0 :constants ("host-call" "host-get" "dom-window" "location" "reload") :bytecode (20 2 0 48 0 1 3 0 52 1 0 2 1 4 0 52 0 0 2 50)} "browser-navigate" {:upvalue-count 0 :arity 1 :constants ("host-set!" "host-get" "dom-window" "location" "href") :bytecode (20 2 0 48 0 1 3 0 52 1 0 2 1 4 0 16 0 52 0 0 3 50)} "local-storage-get" {:upvalue-count 0 :arity 1 :constants ("host-call" "host-get" "dom-window" "localStorage" "getItem") :bytecode (20 2 0 48 0 1 3 0 52 1 0 2 1 4 0 16 0 52 0 0 3 50)} "local-storage-set" {:upvalue-count 0 :arity 2 :constants ("host-call" "host-get" "dom-window" "localStorage" "setItem") :bytecode (20 2 0 48 0 1 3 0 52 1 0 2 1 4 0 16 0 16 1 52 0 0 4 50)} "local-storage-remove" {:upvalue-count 0 :arity 1 :constants ("host-call" "host-get" "dom-window" "localStorage" "removeItem") :bytecode (20 2 0 48 0 1 3 0 52 1 0 2 1 4 0 16 0 52 0 0 3 50)} "set-timeout" {:upvalue-count 0 :arity 2 :constants ("host-call" "dom-window" "setTimeout" "host-callback") :bytecode (20 1 0 48 0 1 2 0 16 0 52 3 0 1 16 1 52 0 0 4 50)} "set-interval" {:upvalue-count 0 :arity 2 :constants ("host-call" "dom-window" "setInterval" "host-callback") :bytecode (20 1 0 48 0 1 2 0 16 0 52 3 0 1 16 1 52 0 0 4 50)} "clear-timeout" {:upvalue-count 0 :arity 1 :constants ("host-call" "dom-window" "clearTimeout") :bytecode (20 1 0 48 0 1 2 0 16 0 52 0 0 3 50)} "clear-interval" {:upvalue-count 0 :arity 1 :constants ("host-call" "dom-window" "clearInterval") :bytecode (20 1 0 48 0 1 2 0 16 0 52 0 0 3 50)} "request-animation-frame" {:upvalue-count 0 :arity 1 :constants ("host-call" "dom-window" "requestAnimationFrame" "host-callback") :bytecode (20 1 0 48 0 1 2 0 16 0 52 3 0 1 52 0 0 3 50)} "fetch-request" {:upvalue-count 0 :arity 2 :constants ("host-call" "dom-window" "fetch") :bytecode (20 1 0 48 0 1 2 0 16 0 16 1 52 0 0 4 50)} "new-abort-controller" {:upvalue-count 0 :arity 0 :constants ("host-new" "AbortController") :bytecode (1 1 0 52 0 0 1 50)} "controller-signal" {:upvalue-count 0 :arity 1 :constants ("host-get" "signal") :bytecode (16 0 1 1 0 52 0 0 2 50)} "controller-abort" {:upvalue-count 0 :arity 1 :constants ("host-call" "abort") :bytecode (16 0 1 1 0 52 0 0 2 50)} "promise-then" {:upvalue-count 0 :arity 3 :constants ("host-callback" "host-call" "then" "catch") :bytecode (16 1 52 0 0 1 17 3 16 2 33 9 0 16 2 52 0 0 1 32 1 0 2 17 4 16 4 33 23 0 16 0 1 2 0 16 3 52 1 0 3 1 3 0 16 4 52 1 0 3 32 11 0 16 0 1 2 0 16 3 52 1 0 3 50)} "promise-resolve" {:upvalue-count 0 :arity 1 :constants ("host-call" "host-global" "Promise" "resolve") :bytecode (1 2 0 52 1 0 1 1 3 0 16 0 52 0 0 3 50)} "promise-delayed" {:upvalue-count 0 :arity 2 :constants ("host-new" "Promise" "host-callback" {:upvalue-count 2 :arity 1 :constants ("set-timeout" {:upvalue-count 2 :arity 0 :constants ("host-call" "call") :bytecode (18 0 1 1 0 2 18 1 52 0 0 4 50)}) :bytecode (51 1 0 1 0 0 0 18 1 52 0 0 2 50)}) :bytecode (1 1 0 51 3 0 1 1 1 0 52 2 0 1 52 0 0 2 50)} "browser-confirm" {:upvalue-count 0 :arity 1 :constants ("host-call" "dom-window" "confirm") :bytecode (20 1 0 48 0 1 2 0 16 0 52 0 0 3 50)} "browser-prompt" {:upvalue-count 0 :arity 2 :constants ("host-call" "dom-window" "prompt") :bytecode (20 1 0 48 0 1 2 0 16 0 16 1 52 0 0 4 50)} "browser-media-matches?" {:upvalue-count 0 :arity 1 :constants ("host-get" "host-call" "dom-window" "matchMedia" "matches") :bytecode (20 2 0 48 0 1 3 0 16 0 52 1 0 3 1 4 0 52 0 0 2 50)} "json-parse" {:upvalue-count 0 :arity 1 :constants ("host-call" "host-global" "JSON" "parse") :bytecode (1 2 0 52 1 0 1 1 3 0 16 0 52 0 0 3 50)} "log-info" {:upvalue-count 0 :arity 1 :constants ("host-call" "host-global" "console" "log" "str" "[sx] ") :bytecode (1 2 0 52 1 0 1 1 3 0 1 5 0 16 0 52 4 0 2 52 0 0 3 50)} "log-warn" {:upvalue-count 0 :arity 1 :constants ("host-call" "host-global" "console" "warn" "str" "[sx] ") :bytecode (1 2 0 52 1 0 1 1 3 0 1 5 0 16 0 52 4 0 2 52 0 0 3 50)} "console-log" "now-ms" {:upvalue-count 0 :arity 0 :constants ("host-call" "host-global" "Date" "now") :bytecode (1 2 0 52 1 0 1 1 3 0 52 0 0 2 50)} "schedule-idle" {:upvalue-count 0 :arity 1 :constants ("host-callback" {:upvalue-count 1 :arity 1 :constants () :bytecode (18 0 49 0 50)} "host-get" "dom-window" "requestIdleCallback" "host-call" "set-timeout" 0) :bytecode (51 1 0 1 0 52 0 0 1 17 1 20 3 0 48 0 1 4 0 52 2 0 2 33 17 0 20 3 0 48 0 1 4 0 16 1 52 5 0 3 32 9 0 16 1 1 7 0 52 6 0 2 50)} "set-cookie" {:upvalue-count 0 :arity 3 :constants (365 "host-call" "host-new" "Date" "+" "host-global" "now" "*" 86400000 "toUTCString" "host-set!" "dom-document" "cookie" "str" "=" "encodeURIComponent" ";expires=" ";path=/;SameSite=Lax") :bytecode (16 2 6 34 4 0 5 1 0 0 17 3 1 3 0 1 3 0 52 5 0 1 1 6 0 52 1 0 2 16 3 1 8 0 52 7 0 2 52 4 0 2 52 2 0 2 1 9 0 52 1 0 2 17 4 20 11 0 48 0 1 12 0 16 0 1 14 0 2 1 15 0 16 1 52 1 0 3 1 16 0 16 4 1 17 0 52 13 0 6 52 10 0 3 50)} "get-cookie" {:upvalue-count 0 :arity 1 :constants ("host-get" "dom-document" "cookie" "host-call" "match" "host-new" "RegExp" "str" "(?:^|;\\s*)" "=([^;]*)" "decodeURIComponent" 1) :bytecode (20 1 0 48 0 1 2 0 52 0 0 2 17 1 16 1 1 4 0 1 6 0 1 8 0 16 0 1 9 0 52 7 0 3 52 5 0 2 52 3 0 3 17 2 16 2 33 20 0 2 1 10 0 16 2 1 11 0 52 0 0 2 52 3 0 3 32 1 0 2 50)}) :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 51 23 0 128 22 0 5 51 25 0 128 24 0 5 51 27 0 128 26 0 5 51 29 0 128 28 0 5 51 31 0 128 30 0 5 51 33 0 128 32 0 5 51 35 0 128 34 0 5 51 37 0 128 36 0 5 51 39 0 128 38 0 5 51 41 0 128 40 0 5 51 43 0 128 42 0 5 51 45 0 128 44 0 5 51 47 0 128 46 0 5 51 49 0 128 48 0 5 51 51 0 128 50 0 5 51 53 0 128 52 0 5 51 55 0 128 54 0 5 51 57 0 128 56 0 5 51 59 0 128 58 0 5 51 57 0 128 60 0 5 51 62 0 128 61 0 5 51 64 0 128 63 0 5 51 66 0 128 65 0 5 51 68 0 128 67 0 50)))
|