@awacloud/fw 0.1.0
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/CHANGELOG.md +79 -0
- package/LICENSE +176 -0
- package/NOTICE +12 -0
- package/README.md +355 -0
- package/dist/build/fw.core.pure.meta.json +29 -0
- package/dist/build/fw.core.pure.min.js +26 -0
- package/dist/build/fw.full.pure.meta.json +224 -0
- package/dist/build/fw.full.pure.min.js +60 -0
- package/dist/build/fw.minimal.pure.meta.json +21 -0
- package/dist/build/fw.minimal.pure.min.js +26 -0
- package/dist/build/fw.pack.compress-heavy.pure.meta.json +29 -0
- package/dist/build/fw.pack.compress-heavy.pure.min.js +8 -0
- package/dist/build/fw.pack.crypto-advanced.pure.meta.json +38 -0
- package/dist/build/fw.pack.crypto-advanced.pure.min.js +6 -0
- package/dist/build/fw.pack.crypto-basic.pure.meta.json +29 -0
- package/dist/build/fw.pack.crypto-basic.pure.min.js +6 -0
- package/dist/build/fw.pack.crypto-identity.pure.meta.json +29 -0
- package/dist/build/fw.pack.crypto-identity.pure.min.js +9 -0
- package/dist/build/fw.pack.realtime.pure.meta.json +21 -0
- package/dist/build/fw.pack.realtime.pure.min.js +6 -0
- package/dist/build/fw.pack.sensors.pure.meta.json +21 -0
- package/dist/build/fw.pack.sensors.pure.min.js +6 -0
- package/dist/build/fw.pack.structures-advanced.pure.meta.json +20 -0
- package/dist/build/fw.pack.structures-advanced.pure.min.js +6 -0
- package/dist/build/fw.pack.text-advanced.pure.meta.json +20 -0
- package/dist/build/fw.pack.text-advanced.pure.min.js +6 -0
- package/dist/build/fw.pwa.pure.meta.json +127 -0
- package/dist/build/fw.pwa.pure.min.js +55 -0
- package/dist/build/fw.site-interactive.pure.meta.json +81 -0
- package/dist/build/fw.site-interactive.pure.min.js +52 -0
- package/dist/build/fw.site.pure.meta.json +51 -0
- package/dist/build/fw.site.pure.min.js +35 -0
- package/dist/build/fw.spa.pure.meta.json +108 -0
- package/dist/build/fw.spa.pure.min.js +55 -0
- package/dist/build/io/compress/brotli_dict.bin +432 -0
- package/dist/build/sanity-base-classic.min.js +6 -0
- package/dist/build/sanity-community-classic.min.js +6 -0
- package/dist/build/sanity.min.js +6 -0
- package/dist/types/core/logger.d.ts +71 -0
- package/dist/types/core/logger.d.ts.map +1 -0
- package/dist/types/core/modules.d.ts +3962 -0
- package/dist/types/core/modules.d.ts.map +1 -0
- package/dist/types/core/readyState.d.ts +14 -0
- package/dist/types/core/readyState.d.ts.map +1 -0
- package/dist/types/core/runtime.d.ts +625 -0
- package/dist/types/core/runtime.d.ts.map +1 -0
- package/dist/types/core/worker-helper.d.ts +153 -0
- package/dist/types/core/worker-helper.d.ts.map +1 -0
- package/dist/types/crypto/cipher/aes.d.ts +55 -0
- package/dist/types/crypto/cipher/aes.d.ts.map +1 -0
- package/dist/types/crypto/cipher/chacha20.d.ts +33 -0
- package/dist/types/crypto/cipher/chacha20.d.ts.map +1 -0
- package/dist/types/crypto/hash/adf.d.ts +65 -0
- package/dist/types/crypto/hash/adf.d.ts.map +1 -0
- package/dist/types/crypto/hash/argon2.d.ts +79 -0
- package/dist/types/crypto/hash/argon2.d.ts.map +1 -0
- package/dist/types/crypto/hash/blake2b.d.ts +40 -0
- package/dist/types/crypto/hash/blake2b.d.ts.map +1 -0
- package/dist/types/crypto/hash/hkdf.d.ts +88 -0
- package/dist/types/crypto/hash/hkdf.d.ts.map +1 -0
- package/dist/types/crypto/hash/hmac.d.ts +85 -0
- package/dist/types/crypto/hash/hmac.d.ts.map +1 -0
- package/dist/types/crypto/hash/pbkdf2.d.ts +80 -0
- package/dist/types/crypto/hash/pbkdf2.d.ts.map +1 -0
- package/dist/types/crypto/hash/poly1305.d.ts +31 -0
- package/dist/types/crypto/hash/poly1305.d.ts.map +1 -0
- package/dist/types/crypto/hash/sha224.d.ts +80 -0
- package/dist/types/crypto/hash/sha224.d.ts.map +1 -0
- package/dist/types/crypto/hash/sha256.d.ts +82 -0
- package/dist/types/crypto/hash/sha256.d.ts.map +1 -0
- package/dist/types/crypto/hash/sha3.d.ts +111 -0
- package/dist/types/crypto/hash/sha3.d.ts.map +1 -0
- package/dist/types/crypto/hash/sha384.d.ts +84 -0
- package/dist/types/crypto/hash/sha384.d.ts.map +1 -0
- package/dist/types/crypto/hash/sha512.d.ts +87 -0
- package/dist/types/crypto/hash/sha512.d.ts.map +1 -0
- package/dist/types/crypto/hash/sha512_224.d.ts +84 -0
- package/dist/types/crypto/hash/sha512_224.d.ts.map +1 -0
- package/dist/types/crypto/hash/sha512_256.d.ts +84 -0
- package/dist/types/crypto/hash/sha512_256.d.ts.map +1 -0
- package/dist/types/crypto/mode/cbc.d.ts +38 -0
- package/dist/types/crypto/mode/cbc.d.ts.map +1 -0
- package/dist/types/crypto/mode/chacha20poly1305.d.ts +71 -0
- package/dist/types/crypto/mode/chacha20poly1305.d.ts.map +1 -0
- package/dist/types/crypto/mode/cmac.d.ts +56 -0
- package/dist/types/crypto/mode/cmac.d.ts.map +1 -0
- package/dist/types/crypto/mode/ctr.d.ts +52 -0
- package/dist/types/crypto/mode/ctr.d.ts.map +1 -0
- package/dist/types/crypto/mode/gcm.d.ts +88 -0
- package/dist/types/crypto/mode/gcm.d.ts.map +1 -0
- package/dist/types/crypto/mode/kw.d.ts +60 -0
- package/dist/types/crypto/mode/kw.d.ts.map +1 -0
- package/dist/types/crypto/pkc/ecc.d.ts +284 -0
- package/dist/types/crypto/pkc/ecc.d.ts.map +1 -0
- package/dist/types/crypto/pkc/ed25519.d.ts +107 -0
- package/dist/types/crypto/pkc/ed25519.d.ts.map +1 -0
- package/dist/types/crypto/pkc/hybridKem.d.ts +154 -0
- package/dist/types/crypto/pkc/hybridKem.d.ts.map +1 -0
- package/dist/types/crypto/pkc/hybridSign.d.ts +383 -0
- package/dist/types/crypto/pkc/hybridSign.d.ts.map +1 -0
- package/dist/types/crypto/pkc/ml_dsa.d.ts +174 -0
- package/dist/types/crypto/pkc/ml_dsa.d.ts.map +1 -0
- package/dist/types/crypto/pkc/ml_kem.d.ts +194 -0
- package/dist/types/crypto/pkc/ml_kem.d.ts.map +1 -0
- package/dist/types/crypto/pkc/rsa.d.ts +175 -0
- package/dist/types/crypto/pkc/rsa.d.ts.map +1 -0
- package/dist/types/crypto/pkc/slh_dsa.d.ts +232 -0
- package/dist/types/crypto/pkc/slh_dsa.d.ts.map +1 -0
- package/dist/types/crypto/pkc/x25519.d.ts +37 -0
- package/dist/types/crypto/pkc/x25519.d.ts.map +1 -0
- package/dist/types/crypto/utils/aes_ctr.d.ts +84 -0
- package/dist/types/crypto/utils/aes_ctr.d.ts.map +1 -0
- package/dist/types/crypto/utils/aes_modes.d.ts +128 -0
- package/dist/types/crypto/utils/aes_modes.d.ts.map +1 -0
- package/dist/types/crypto/utils/asn1-oid.d.ts +45 -0
- package/dist/types/crypto/utils/asn1-oid.d.ts.map +1 -0
- package/dist/types/crypto/utils/asn1.d.ts +115 -0
- package/dist/types/crypto/utils/asn1.d.ts.map +1 -0
- package/dist/types/crypto/utils/bitArray.d.ts +75 -0
- package/dist/types/crypto/utils/bitArray.d.ts.map +1 -0
- package/dist/types/crypto/utils/bn.d.ts +214 -0
- package/dist/types/crypto/utils/bn.d.ts.map +1 -0
- package/dist/types/crypto/utils/jws.d.ts +159 -0
- package/dist/types/crypto/utils/jws.d.ts.map +1 -0
- package/dist/types/crypto/utils/keyformat.d.ts +100 -0
- package/dist/types/crypto/utils/keyformat.d.ts.map +1 -0
- package/dist/types/crypto/utils/pad.d.ts +44 -0
- package/dist/types/crypto/utils/pad.d.ts.map +1 -0
- package/dist/types/crypto/utils/pem.d.ts +41 -0
- package/dist/types/crypto/utils/pem.d.ts.map +1 -0
- package/dist/types/crypto/utils/random.d.ts +203 -0
- package/dist/types/crypto/utils/random.d.ts.map +1 -0
- package/dist/types/crypto/utils/rsaKeygen.d.ts +162 -0
- package/dist/types/crypto/utils/rsaKeygen.d.ts.map +1 -0
- package/dist/types/crypto/utils/totp.d.ts +183 -0
- package/dist/types/crypto/utils/totp.d.ts.map +1 -0
- package/dist/types/crypto/utils/uuid.d.ts +29 -0
- package/dist/types/crypto/utils/uuid.d.ts.map +1 -0
- package/dist/types/crypto/wasm/aes.d.ts +59 -0
- package/dist/types/crypto/wasm/aes.d.ts.map +1 -0
- package/dist/types/crypto/wasm/argon2.d.ts +70 -0
- package/dist/types/crypto/wasm/argon2.d.ts.map +1 -0
- package/dist/types/crypto/wasm/blake2b.d.ts +59 -0
- package/dist/types/crypto/wasm/blake2b.d.ts.map +1 -0
- package/dist/types/crypto/wasm/chacha20poly1305.d.ts +43 -0
- package/dist/types/crypto/wasm/chacha20poly1305.d.ts.map +1 -0
- package/dist/types/crypto/wasm/cmac.d.ts +42 -0
- package/dist/types/crypto/wasm/cmac.d.ts.map +1 -0
- package/dist/types/crypto/wasm/ecc.d.ts +56 -0
- package/dist/types/crypto/wasm/ecc.d.ts.map +1 -0
- package/dist/types/crypto/wasm/ed25519.d.ts +52 -0
- package/dist/types/crypto/wasm/ed25519.d.ts.map +1 -0
- package/dist/types/crypto/wasm/hkdf.d.ts +40 -0
- package/dist/types/crypto/wasm/hkdf.d.ts.map +1 -0
- package/dist/types/crypto/wasm/hmac.d.ts +42 -0
- package/dist/types/crypto/wasm/hmac.d.ts.map +1 -0
- package/dist/types/crypto/wasm/ml_dsa.d.ts +48 -0
- package/dist/types/crypto/wasm/ml_dsa.d.ts.map +1 -0
- package/dist/types/crypto/wasm/ml_kem.d.ts +58 -0
- package/dist/types/crypto/wasm/ml_kem.d.ts.map +1 -0
- package/dist/types/crypto/wasm/pbkdf2.d.ts +38 -0
- package/dist/types/crypto/wasm/pbkdf2.d.ts.map +1 -0
- package/dist/types/crypto/wasm/rsa.d.ts +56 -0
- package/dist/types/crypto/wasm/rsa.d.ts.map +1 -0
- package/dist/types/crypto/wasm/runtime.d.ts +99 -0
- package/dist/types/crypto/wasm/runtime.d.ts.map +1 -0
- package/dist/types/crypto/wasm/sha2.d.ts +45 -0
- package/dist/types/crypto/wasm/sha2.d.ts.map +1 -0
- package/dist/types/crypto/wasm/sha3.d.ts +57 -0
- package/dist/types/crypto/wasm/sha3.d.ts.map +1 -0
- package/dist/types/crypto/wasm/slh_dsa.d.ts +62 -0
- package/dist/types/crypto/wasm/slh_dsa.d.ts.map +1 -0
- package/dist/types/crypto/wasm/x25519.d.ts +53 -0
- package/dist/types/crypto/wasm/x25519.d.ts.map +1 -0
- package/dist/types/crypto/webcrypto/aes.d.ts +59 -0
- package/dist/types/crypto/webcrypto/aes.d.ts.map +1 -0
- package/dist/types/crypto/webcrypto/aeskw.d.ts +40 -0
- package/dist/types/crypto/webcrypto/aeskw.d.ts.map +1 -0
- package/dist/types/crypto/webcrypto/digest.d.ts +43 -0
- package/dist/types/crypto/webcrypto/digest.d.ts.map +1 -0
- package/dist/types/crypto/webcrypto/ecc.d.ts +51 -0
- package/dist/types/crypto/webcrypto/ecc.d.ts.map +1 -0
- package/dist/types/crypto/webcrypto/ed25519.d.ts +43 -0
- package/dist/types/crypto/webcrypto/ed25519.d.ts.map +1 -0
- package/dist/types/crypto/webcrypto/hkdf.d.ts +18 -0
- package/dist/types/crypto/webcrypto/hkdf.d.ts.map +1 -0
- package/dist/types/crypto/webcrypto/hmac.d.ts +43 -0
- package/dist/types/crypto/webcrypto/hmac.d.ts.map +1 -0
- package/dist/types/crypto/webcrypto/pbkdf2.d.ts +18 -0
- package/dist/types/crypto/webcrypto/pbkdf2.d.ts.map +1 -0
- package/dist/types/crypto/webcrypto/rsa.d.ts +51 -0
- package/dist/types/crypto/webcrypto/rsa.d.ts.map +1 -0
- package/dist/types/crypto/webcrypto/x25519.d.ts +43 -0
- package/dist/types/crypto/webcrypto/x25519.d.ts.map +1 -0
- package/dist/types/dom/display/animate.d.ts +35 -0
- package/dist/types/dom/display/animate.d.ts.map +1 -0
- package/dist/types/dom/display/fullscreen.d.ts +59 -0
- package/dist/types/dom/display/fullscreen.d.ts.map +1 -0
- package/dist/types/dom/fs/download.d.ts +36 -0
- package/dist/types/dom/fs/download.d.ts.map +1 -0
- package/dist/types/dom/fs/fsAccess.d.ts +107 -0
- package/dist/types/dom/fs/fsAccess.d.ts.map +1 -0
- package/dist/types/dom/fs/indexedDB.d.ts +62 -0
- package/dist/types/dom/fs/indexedDB.d.ts.map +1 -0
- package/dist/types/dom/fs/remoteStore.d.ts +64 -0
- package/dist/types/dom/fs/remoteStore.d.ts.map +1 -0
- package/dist/types/dom/fs/storage.d.ts +56 -0
- package/dist/types/dom/fs/storage.d.ts.map +1 -0
- package/dist/types/dom/lifecycle/idle.d.ts +91 -0
- package/dist/types/dom/lifecycle/idle.d.ts.map +1 -0
- package/dist/types/dom/lifecycle/visibility.d.ts +49 -0
- package/dist/types/dom/lifecycle/visibility.d.ts.map +1 -0
- package/dist/types/dom/lifecycle/wakeLock.d.ts +69 -0
- package/dist/types/dom/lifecycle/wakeLock.d.ts.map +1 -0
- package/dist/types/dom/net/ajax.d.ts +27 -0
- package/dist/types/dom/net/ajax.d.ts.map +1 -0
- package/dist/types/dom/net/broadcastChannel.d.ts +51 -0
- package/dist/types/dom/net/broadcastChannel.d.ts.map +1 -0
- package/dist/types/dom/net/network.d.ts +80 -0
- package/dist/types/dom/net/network.d.ts.map +1 -0
- package/dist/types/dom/net/sse.d.ts +72 -0
- package/dist/types/dom/net/sse.d.ts.map +1 -0
- package/dist/types/dom/net/webrtc.d.ts +149 -0
- package/dist/types/dom/net/webrtc.d.ts.map +1 -0
- package/dist/types/dom/net/ws.d.ts +70 -0
- package/dist/types/dom/net/ws.d.ts.map +1 -0
- package/dist/types/dom/query/dnd.d.ts +86 -0
- package/dist/types/dom/query/dnd.d.ts.map +1 -0
- package/dist/types/dom/query/dom.d.ts +194 -0
- package/dist/types/dom/query/dom.d.ts.map +1 -0
- package/dist/types/dom/query/events.d.ts +135 -0
- package/dist/types/dom/query/events.d.ts.map +1 -0
- package/dist/types/dom/query/gesture.d.ts +59 -0
- package/dist/types/dom/query/gesture.d.ts.map +1 -0
- package/dist/types/dom/query/media.d.ts +156 -0
- package/dist/types/dom/query/media.d.ts.map +1 -0
- package/dist/types/dom/rendering/chart.d.ts +143 -0
- package/dist/types/dom/rendering/chart.d.ts.map +1 -0
- package/dist/types/dom/rendering/component.d.ts +92 -0
- package/dist/types/dom/rendering/component.d.ts.map +1 -0
- package/dist/types/dom/rendering/devtools-ui.d.ts +83 -0
- package/dist/types/dom/rendering/devtools-ui.d.ts.map +1 -0
- package/dist/types/dom/rendering/devtools.d.ts +68 -0
- package/dist/types/dom/rendering/devtools.d.ts.map +1 -0
- package/dist/types/dom/rendering/parser.d.ts +216 -0
- package/dist/types/dom/rendering/parser.d.ts.map +1 -0
- package/dist/types/dom/rendering/reactiveBind.d.ts +101 -0
- package/dist/types/dom/rendering/reactiveBind.d.ts.map +1 -0
- package/dist/types/dom/rendering/render.d.ts +121 -0
- package/dist/types/dom/rendering/render.d.ts.map +1 -0
- package/dist/types/dom/rendering/sanitize.d.ts +48 -0
- package/dist/types/dom/rendering/sanitize.d.ts.map +1 -0
- package/dist/types/dom/rendering/secPolicy.d.ts +89 -0
- package/dist/types/dom/rendering/secPolicy.d.ts.map +1 -0
- package/dist/types/dom/rendering/template.d.ts +251 -0
- package/dist/types/dom/rendering/template.d.ts.map +1 -0
- package/dist/types/dom/rendering/themeTokens.d.ts +61 -0
- package/dist/types/dom/rendering/themeTokens.d.ts.map +1 -0
- package/dist/types/dom/rendering/uiSession-core.d.ts +192 -0
- package/dist/types/dom/rendering/uiSession-core.d.ts.map +1 -0
- package/dist/types/dom/rendering/uiSession-direct.d.ts +63 -0
- package/dist/types/dom/rendering/uiSession-direct.d.ts.map +1 -0
- package/dist/types/dom/rendering/uiSession-list.d.ts +205 -0
- package/dist/types/dom/rendering/uiSession-list.d.ts.map +1 -0
- package/dist/types/dom/rendering/uiSession.d.ts +285 -0
- package/dist/types/dom/rendering/uiSession.d.ts.map +1 -0
- package/dist/types/dom/rendering/virtualScroll.d.ts +80 -0
- package/dist/types/dom/rendering/virtualScroll.d.ts.map +1 -0
- package/dist/types/dom/sensors/battery.d.ts +71 -0
- package/dist/types/dom/sensors/battery.d.ts.map +1 -0
- package/dist/types/dom/sensors/geolocation.d.ts +83 -0
- package/dist/types/dom/sensors/geolocation.d.ts.map +1 -0
- package/dist/types/dom/sensors/networkInfo.d.ts +82 -0
- package/dist/types/dom/sensors/networkInfo.d.ts.map +1 -0
- package/dist/types/dom/sensors/sensors.d.ts +191 -0
- package/dist/types/dom/sensors/sensors.d.ts.map +1 -0
- package/dist/types/dom/sw/backgroundSync.d.ts +48 -0
- package/dist/types/dom/sw/backgroundSync.d.ts.map +1 -0
- package/dist/types/dom/sw/cache.d.ts +71 -0
- package/dist/types/dom/sw/cache.d.ts.map +1 -0
- package/dist/types/dom/sw/push.d.ts +77 -0
- package/dist/types/dom/sw/push.d.ts.map +1 -0
- package/dist/types/dom/sw/serviceWorker.d.ts +57 -0
- package/dist/types/dom/sw/serviceWorker.d.ts.map +1 -0
- package/dist/types/dom/sw/sharedWorker.d.ts +81 -0
- package/dist/types/dom/sw/sharedWorker.d.ts.map +1 -0
- package/dist/types/dom/utils/a11y.d.ts +53 -0
- package/dist/types/dom/utils/a11y.d.ts.map +1 -0
- package/dist/types/dom/utils/clipboard.d.ts +44 -0
- package/dist/types/dom/utils/clipboard.d.ts.map +1 -0
- package/dist/types/dom/utils/entropyCollector.d.ts +58 -0
- package/dist/types/dom/utils/entropyCollector.d.ts.map +1 -0
- package/dist/types/dom/utils/focus.d.ts +123 -0
- package/dist/types/dom/utils/focus.d.ts.map +1 -0
- package/dist/types/dom/utils/form.d.ts +227 -0
- package/dist/types/dom/utils/form.d.ts.map +1 -0
- package/dist/types/dom/utils/formKit.d.ts +206 -0
- package/dist/types/dom/utils/formKit.d.ts.map +1 -0
- package/dist/types/dom/utils/keybindings.d.ts +53 -0
- package/dist/types/dom/utils/keybindings.d.ts.map +1 -0
- package/dist/types/dom/utils/leaderElection.d.ts +70 -0
- package/dist/types/dom/utils/leaderElection.d.ts.map +1 -0
- package/dist/types/dom/utils/notifications.d.ts +164 -0
- package/dist/types/dom/utils/notifications.d.ts.map +1 -0
- package/dist/types/dom/utils/permissions.d.ts +35 -0
- package/dist/types/dom/utils/permissions.d.ts.map +1 -0
- package/dist/types/dom/utils/route.d.ts +117 -0
- package/dist/types/dom/utils/route.d.ts.map +1 -0
- package/dist/types/dom/utils/ua.d.ts +35 -0
- package/dist/types/dom/utils/ua.d.ts.map +1 -0
- package/dist/types/dom/utils/webauthn.d.ts +98 -0
- package/dist/types/dom/utils/webauthn.d.ts.map +1 -0
- package/dist/types/io/binary/reader.d.ts +59 -0
- package/dist/types/io/binary/reader.d.ts.map +1 -0
- package/dist/types/io/binary/writer.d.ts +56 -0
- package/dist/types/io/binary/writer.d.ts.map +1 -0
- package/dist/types/io/calc/adler32.d.ts +31 -0
- package/dist/types/io/calc/adler32.d.ts.map +1 -0
- package/dist/types/io/calc/bigint.d.ts +74 -0
- package/dist/types/io/calc/bigint.d.ts.map +1 -0
- package/dist/types/io/calc/crc32.d.ts +36 -0
- package/dist/types/io/calc/crc32.d.ts.map +1 -0
- package/dist/types/io/calc/easing.d.ts +60 -0
- package/dist/types/io/calc/easing.d.ts.map +1 -0
- package/dist/types/io/codec/b64.d.ts +28 -0
- package/dist/types/io/codec/b64.d.ts.map +1 -0
- package/dist/types/io/codec/base32.d.ts +28 -0
- package/dist/types/io/codec/base32.d.ts.map +1 -0
- package/dist/types/io/codec/base58.d.ts +28 -0
- package/dist/types/io/codec/base58.d.ts.map +1 -0
- package/dist/types/io/codec/buffer.d.ts +66 -0
- package/dist/types/io/codec/buffer.d.ts.map +1 -0
- package/dist/types/io/codec/cbor.d.ts +43 -0
- package/dist/types/io/codec/cbor.d.ts.map +1 -0
- package/dist/types/io/codec/csv.d.ts +35 -0
- package/dist/types/io/codec/csv.d.ts.map +1 -0
- package/dist/types/io/codec/hex.d.ts +28 -0
- package/dist/types/io/codec/hex.d.ts.map +1 -0
- package/dist/types/io/codec/mime.d.ts +100 -0
- package/dist/types/io/codec/mime.d.ts.map +1 -0
- package/dist/types/io/codec/msgpack.d.ts +36 -0
- package/dist/types/io/codec/msgpack.d.ts.map +1 -0
- package/dist/types/io/codec/url.d.ts +52 -0
- package/dist/types/io/codec/url.d.ts.map +1 -0
- package/dist/types/io/codec/utf8.d.ts +22 -0
- package/dist/types/io/codec/utf8.d.ts.map +1 -0
- package/dist/types/io/codec/xml.d.ts +91 -0
- package/dist/types/io/codec/xml.d.ts.map +1 -0
- package/dist/types/io/compress/bitstream.d.ts +51 -0
- package/dist/types/io/compress/bitstream.d.ts.map +1 -0
- package/dist/types/io/compress/brotli.d.ts +86 -0
- package/dist/types/io/compress/brotli.d.ts.map +1 -0
- package/dist/types/io/compress/brotli_dict.d.ts +76 -0
- package/dist/types/io/compress/brotli_dict.d.ts.map +1 -0
- package/dist/types/io/compress/brotli_dict_words.d.ts +43 -0
- package/dist/types/io/compress/brotli_dict_words.d.ts.map +1 -0
- package/dist/types/io/compress/brotli_frame.d.ts +166 -0
- package/dist/types/io/compress/brotli_frame.d.ts.map +1 -0
- package/dist/types/io/compress/brotli_shared.d.ts +165 -0
- package/dist/types/io/compress/brotli_shared.d.ts.map +1 -0
- package/dist/types/io/compress/deflate.d.ts +89 -0
- package/dist/types/io/compress/deflate.d.ts.map +1 -0
- package/dist/types/io/compress/gzip.d.ts +100 -0
- package/dist/types/io/compress/gzip.d.ts.map +1 -0
- package/dist/types/io/compress/huffman.d.ts +37 -0
- package/dist/types/io/compress/huffman.d.ts.map +1 -0
- package/dist/types/io/compress/lz4.d.ts +45 -0
- package/dist/types/io/compress/lz4.d.ts.map +1 -0
- package/dist/types/io/compress/lz77.d.ts +66 -0
- package/dist/types/io/compress/lz77.d.ts.map +1 -0
- package/dist/types/io/compress/lzw.d.ts +37 -0
- package/dist/types/io/compress/lzw.d.ts.map +1 -0
- package/dist/types/io/compress/zip.d.ts +112 -0
- package/dist/types/io/compress/zip.d.ts.map +1 -0
- package/dist/types/io/compress/zlib.d.ts +97 -0
- package/dist/types/io/compress/zlib.d.ts.map +1 -0
- package/dist/types/io/i18n/i18n.d.ts +64 -0
- package/dist/types/io/i18n/i18n.d.ts.map +1 -0
- package/dist/types/io/math/fixed-point.d.ts +30 -0
- package/dist/types/io/math/fixed-point.d.ts.map +1 -0
- package/dist/types/io/math/geom.d.ts +125 -0
- package/dist/types/io/math/geom.d.ts.map +1 -0
- package/dist/types/io/math/interp.d.ts +48 -0
- package/dist/types/io/math/interp.d.ts.map +1 -0
- package/dist/types/io/math/linalg.d.ts +117 -0
- package/dist/types/io/math/linalg.d.ts.map +1 -0
- package/dist/types/io/math/stats.d.ts +45 -0
- package/dist/types/io/math/stats.d.ts.map +1 -0
- package/dist/types/io/structures/btree.d.ts +84 -0
- package/dist/types/io/structures/btree.d.ts.map +1 -0
- package/dist/types/io/structures/heap.d.ts +75 -0
- package/dist/types/io/structures/heap.d.ts.map +1 -0
- package/dist/types/io/structures/lruCache.d.ts +88 -0
- package/dist/types/io/structures/lruCache.d.ts.map +1 -0
- package/dist/types/io/structures/ringBuffer.d.ts +82 -0
- package/dist/types/io/structures/ringBuffer.d.ts.map +1 -0
- package/dist/types/io/structures/tree-walker.d.ts +95 -0
- package/dist/types/io/structures/tree-walker.d.ts.map +1 -0
- package/dist/types/io/structures/trie.d.ts +71 -0
- package/dist/types/io/structures/trie.d.ts.map +1 -0
- package/dist/types/io/sync/abort.d.ts +59 -0
- package/dist/types/io/sync/abort.d.ts.map +1 -0
- package/dist/types/io/sync/atomics.d.ts +107 -0
- package/dist/types/io/sync/atomics.d.ts.map +1 -0
- package/dist/types/io/sync/cancellable.d.ts +69 -0
- package/dist/types/io/sync/cancellable.d.ts.map +1 -0
- package/dist/types/io/sync/channel.d.ts +70 -0
- package/dist/types/io/sync/channel.d.ts.map +1 -0
- package/dist/types/io/sync/mutex.d.ts +39 -0
- package/dist/types/io/sync/mutex.d.ts.map +1 -0
- package/dist/types/io/sync/semaphore.d.ts +40 -0
- package/dist/types/io/sync/semaphore.d.ts.map +1 -0
- package/dist/types/io/sync/tokenBucket.d.ts +53 -0
- package/dist/types/io/sync/tokenBucket.d.ts.map +1 -0
- package/dist/types/io/text/ansi.d.ts +125 -0
- package/dist/types/io/text/ansi.d.ts.map +1 -0
- package/dist/types/io/text/html-entities.d.ts +35 -0
- package/dist/types/io/text/html-entities.d.ts.map +1 -0
- package/dist/types/io/text/semver.d.ts +75 -0
- package/dist/types/io/text/semver.d.ts.map +1 -0
- package/dist/types/io/text/str.d.ts +88 -0
- package/dist/types/io/text/str.d.ts.map +1 -0
- package/dist/types/io/text/unicode.d.ts +70 -0
- package/dist/types/io/text/unicode.d.ts.map +1 -0
- package/dist/types/io/time/date.d.ts +73 -0
- package/dist/types/io/time/date.d.ts.map +1 -0
- package/dist/types/io/timing/clock.d.ts +39 -0
- package/dist/types/io/timing/clock.d.ts.map +1 -0
- package/dist/types/io/timing/rateLimit.d.ts +40 -0
- package/dist/types/io/timing/rateLimit.d.ts.map +1 -0
- package/dist/types/io/timing/scheduler.d.ts +122 -0
- package/dist/types/io/timing/scheduler.d.ts.map +1 -0
- package/dist/types/io/utils/bitmap.d.ts +34 -0
- package/dist/types/io/utils/bitmap.d.ts.map +1 -0
- package/dist/types/io/utils/errors.d.ts +94 -0
- package/dist/types/io/utils/errors.d.ts.map +1 -0
- package/dist/types/io/utils/eventBus.d.ts +68 -0
- package/dist/types/io/utils/eventBus.d.ts.map +1 -0
- package/dist/types/io/utils/queue.d.ts +69 -0
- package/dist/types/io/utils/queue.d.ts.map +1 -0
- package/dist/types/io/utils/signal.d.ts +362 -0
- package/dist/types/io/utils/signal.d.ts.map +1 -0
- package/dist/types/io/utils/ui8.d.ts +34 -0
- package/dist/types/io/utils/ui8.d.ts.map +1 -0
- package/dist/types/io/utils/valid.d.ts +130 -0
- package/dist/types/io/utils/valid.d.ts.map +1 -0
- package/dist/types/main.d.ts +25 -0
- package/dist/types/main.d.ts.map +1 -0
- package/dist/types/process/message.d.ts +64 -0
- package/dist/types/process/message.d.ts.map +1 -0
- package/dist/types/process/rpc.d.ts +35 -0
- package/dist/types/process/rpc.d.ts.map +1 -0
- package/dist/types/process/workerPool.d.ts +62 -0
- package/dist/types/process/workerPool.d.ts.map +1 -0
- package/dist/types/sanity/base.d.ts +28 -0
- package/dist/types/sanity/base.d.ts.map +1 -0
- package/dist/types/sanity/community.d.ts +20 -0
- package/dist/types/sanity/community.d.ts.map +1 -0
- package/dist/types/sanity/lockdown-apply.d.ts +7 -0
- package/dist/types/sanity/lockdown-apply.d.ts.map +1 -0
- package/dist/types/sanity/lockdown.d.ts +43 -0
- package/dist/types/sanity/lockdown.d.ts.map +1 -0
- package/dist/types/sanity/wasm-gate.d.ts +128 -0
- package/dist/types/sanity/wasm-gate.d.ts.map +1 -0
- package/docs/README.md +301 -0
- package/docs/api/README.md +33 -0
- package/docs/api/core/README.md +14 -0
- package/docs/api/core/logger.md +151 -0
- package/docs/api/core/main.md +105 -0
- package/docs/api/core/modules.md +123 -0
- package/docs/api/core/readyState.md +94 -0
- package/docs/api/core/runtime.md +499 -0
- package/docs/api/core/worker-helper.md +180 -0
- package/docs/api/crypto/README.md +39 -0
- package/docs/api/crypto/cipher/README.md +24 -0
- package/docs/api/crypto/cipher/aes.md +101 -0
- package/docs/api/crypto/cipher/chacha20.md +85 -0
- package/docs/api/crypto/hash/README.md +49 -0
- package/docs/api/crypto/hash/adf.md +61 -0
- package/docs/api/crypto/hash/argon2.md +92 -0
- package/docs/api/crypto/hash/blake2b.md +88 -0
- package/docs/api/crypto/hash/hkdf.md +82 -0
- package/docs/api/crypto/hash/hmac.md +90 -0
- package/docs/api/crypto/hash/pbkdf2.md +93 -0
- package/docs/api/crypto/hash/poly1305.md +71 -0
- package/docs/api/crypto/hash/sha224.md +61 -0
- package/docs/api/crypto/hash/sha256.md +84 -0
- package/docs/api/crypto/hash/sha3.md +89 -0
- package/docs/api/crypto/hash/sha384.md +58 -0
- package/docs/api/crypto/hash/sha512.md +73 -0
- package/docs/api/crypto/hash/sha512_224.md +59 -0
- package/docs/api/crypto/hash/sha512_256.md +58 -0
- package/docs/api/crypto/mode/README.md +33 -0
- package/docs/api/crypto/mode/cbc.md +69 -0
- package/docs/api/crypto/mode/chacha20poly1305.md +77 -0
- package/docs/api/crypto/mode/cmac.md +79 -0
- package/docs/api/crypto/mode/ctr.md +66 -0
- package/docs/api/crypto/mode/gcm.md +93 -0
- package/docs/api/crypto/mode/kw.md +84 -0
- package/docs/api/crypto/pkc/README.md +48 -0
- package/docs/api/crypto/pkc/ecc.md +91 -0
- package/docs/api/crypto/pkc/ed25519.md +99 -0
- package/docs/api/crypto/pkc/hybridKem.md +178 -0
- package/docs/api/crypto/pkc/hybridSign.md +192 -0
- package/docs/api/crypto/pkc/ml_dsa.md +99 -0
- package/docs/api/crypto/pkc/ml_kem.md +90 -0
- package/docs/api/crypto/pkc/rsa.md +87 -0
- package/docs/api/crypto/pkc/slh_dsa.md +86 -0
- package/docs/api/crypto/pkc/x25519.md +84 -0
- package/docs/api/crypto/utils/README.md +39 -0
- package/docs/api/crypto/utils/aes_ctr.md +71 -0
- package/docs/api/crypto/utils/aes_modes.md +81 -0
- package/docs/api/crypto/utils/asn1-oid.md +130 -0
- package/docs/api/crypto/utils/asn1.md +69 -0
- package/docs/api/crypto/utils/bitArray.md +77 -0
- package/docs/api/crypto/utils/bn.md +67 -0
- package/docs/api/crypto/utils/jws.md +94 -0
- package/docs/api/crypto/utils/keyformat.md +78 -0
- package/docs/api/crypto/utils/pad.md +66 -0
- package/docs/api/crypto/utils/pem.md +63 -0
- package/docs/api/crypto/utils/random.md +103 -0
- package/docs/api/crypto/utils/rsaKeygen.md +118 -0
- package/docs/api/crypto/utils/totp.md +159 -0
- package/docs/api/crypto/utils/uuid.md +98 -0
- package/docs/api/crypto/wasm/README.md +76 -0
- package/docs/api/crypto/wasm/aes.md +128 -0
- package/docs/api/crypto/wasm/argon2.md +110 -0
- package/docs/api/crypto/wasm/blake2b.md +103 -0
- package/docs/api/crypto/wasm/chacha20poly1305.md +120 -0
- package/docs/api/crypto/wasm/cmac.md +119 -0
- package/docs/api/crypto/wasm/ecc.md +114 -0
- package/docs/api/crypto/wasm/ed25519.md +117 -0
- package/docs/api/crypto/wasm/hkdf.md +163 -0
- package/docs/api/crypto/wasm/hmac.md +129 -0
- package/docs/api/crypto/wasm/ml_dsa.md +99 -0
- package/docs/api/crypto/wasm/ml_kem.md +91 -0
- package/docs/api/crypto/wasm/pbkdf2.md +111 -0
- package/docs/api/crypto/wasm/rsa.md +113 -0
- package/docs/api/crypto/wasm/runtime.md +172 -0
- package/docs/api/crypto/wasm/sha2.md +95 -0
- package/docs/api/crypto/wasm/sha3.md +127 -0
- package/docs/api/crypto/wasm/slh_dsa.md +89 -0
- package/docs/api/crypto/wasm/x25519.md +116 -0
- package/docs/api/crypto/webcrypto/README.md +56 -0
- package/docs/api/crypto/webcrypto/aes.md +140 -0
- package/docs/api/crypto/webcrypto/aeskw.md +120 -0
- package/docs/api/crypto/webcrypto/digest.md +103 -0
- package/docs/api/crypto/webcrypto/ecc.md +122 -0
- package/docs/api/crypto/webcrypto/ed25519.md +121 -0
- package/docs/api/crypto/webcrypto/hkdf.md +141 -0
- package/docs/api/crypto/webcrypto/hmac.md +112 -0
- package/docs/api/crypto/webcrypto/pbkdf2.md +140 -0
- package/docs/api/crypto/webcrypto/rsa.md +149 -0
- package/docs/api/crypto/webcrypto/x25519.md +96 -0
- package/docs/api/dom/README.md +117 -0
- package/docs/api/dom/display/README.md +27 -0
- package/docs/api/dom/display/animate.md +113 -0
- package/docs/api/dom/display/fullscreen.md +121 -0
- package/docs/api/dom/fs/README.md +36 -0
- package/docs/api/dom/fs/download.md +108 -0
- package/docs/api/dom/fs/fsAccess.md +200 -0
- package/docs/api/dom/fs/indexedDB.md +219 -0
- package/docs/api/dom/fs/remoteStore.md +158 -0
- package/docs/api/dom/fs/storage.md +197 -0
- package/docs/api/dom/lifecycle/README.md +11 -0
- package/docs/api/dom/lifecycle/idle.md +89 -0
- package/docs/api/dom/lifecycle/visibility.md +73 -0
- package/docs/api/dom/lifecycle/wakeLock.md +94 -0
- package/docs/api/dom/net/README.md +31 -0
- package/docs/api/dom/net/ajax.md +176 -0
- package/docs/api/dom/net/broadcastChannel.md +110 -0
- package/docs/api/dom/net/network.md +137 -0
- package/docs/api/dom/net/sse.md +141 -0
- package/docs/api/dom/net/webrtc.md +158 -0
- package/docs/api/dom/net/ws.md +168 -0
- package/docs/api/dom/query/README.md +30 -0
- package/docs/api/dom/query/dnd.md +137 -0
- package/docs/api/dom/query/dom.md +275 -0
- package/docs/api/dom/query/events.md +211 -0
- package/docs/api/dom/query/gesture.md +137 -0
- package/docs/api/dom/query/media.md +188 -0
- package/docs/api/dom/rendering/README.md +41 -0
- package/docs/api/dom/rendering/chart.md +149 -0
- package/docs/api/dom/rendering/component.md +287 -0
- package/docs/api/dom/rendering/devtools-ui.md +129 -0
- package/docs/api/dom/rendering/devtools.md +157 -0
- package/docs/api/dom/rendering/parser.md +200 -0
- package/docs/api/dom/rendering/reactiveBind.md +234 -0
- package/docs/api/dom/rendering/render.md +219 -0
- package/docs/api/dom/rendering/sanitize.md +97 -0
- package/docs/api/dom/rendering/secPolicy.md +155 -0
- package/docs/api/dom/rendering/template.md +301 -0
- package/docs/api/dom/rendering/themeTokens.md +175 -0
- package/docs/api/dom/rendering/uiSession.md +546 -0
- package/docs/api/dom/rendering/virtualScroll.md +126 -0
- package/docs/api/dom/sensors/README.md +12 -0
- package/docs/api/dom/sensors/battery.md +70 -0
- package/docs/api/dom/sensors/geolocation.md +115 -0
- package/docs/api/dom/sensors/networkInfo.md +73 -0
- package/docs/api/dom/sensors/sensors.md +123 -0
- package/docs/api/dom/sw/README.md +31 -0
- package/docs/api/dom/sw/backgroundSync.md +145 -0
- package/docs/api/dom/sw/cache.md +116 -0
- package/docs/api/dom/sw/push.md +114 -0
- package/docs/api/dom/sw/serviceWorker.md +90 -0
- package/docs/api/dom/sw/sharedWorker.md +131 -0
- package/docs/api/dom/utils/README.md +25 -0
- package/docs/api/dom/utils/a11y.md +143 -0
- package/docs/api/dom/utils/clipboard.md +146 -0
- package/docs/api/dom/utils/entropyCollector.md +175 -0
- package/docs/api/dom/utils/focus.md +140 -0
- package/docs/api/dom/utils/form.md +196 -0
- package/docs/api/dom/utils/formKit.md +181 -0
- package/docs/api/dom/utils/keybindings.md +138 -0
- package/docs/api/dom/utils/leaderElection.md +130 -0
- package/docs/api/dom/utils/notifications.md +106 -0
- package/docs/api/dom/utils/permissions.md +82 -0
- package/docs/api/dom/utils/route.md +112 -0
- package/docs/api/dom/utils/ua.md +119 -0
- package/docs/api/dom/utils/webauthn.md +190 -0
- package/docs/api/io/README.md +20 -0
- package/docs/api/io/binary/README.md +29 -0
- package/docs/api/io/binary/reader.md +126 -0
- package/docs/api/io/binary/writer.md +127 -0
- package/docs/api/io/calc/README.md +22 -0
- package/docs/api/io/calc/adler32.md +75 -0
- package/docs/api/io/calc/bigint.md +105 -0
- package/docs/api/io/calc/crc32.md +74 -0
- package/docs/api/io/calc/easing.md +118 -0
- package/docs/api/io/codec/README.md +35 -0
- package/docs/api/io/codec/b64.md +92 -0
- package/docs/api/io/codec/base32.md +98 -0
- package/docs/api/io/codec/base58.md +104 -0
- package/docs/api/io/codec/buffer.md +144 -0
- package/docs/api/io/codec/cbor.md +179 -0
- package/docs/api/io/codec/csv.md +178 -0
- package/docs/api/io/codec/hex.md +75 -0
- package/docs/api/io/codec/mime.md +156 -0
- package/docs/api/io/codec/msgpack.md +142 -0
- package/docs/api/io/codec/url.md +265 -0
- package/docs/api/io/codec/utf8.md +84 -0
- package/docs/api/io/codec/xml.md +87 -0
- package/docs/api/io/compress/README.md +62 -0
- package/docs/api/io/compress/bitstream.md +131 -0
- package/docs/api/io/compress/brotli.md +232 -0
- package/docs/api/io/compress/brotli_dict.md +119 -0
- package/docs/api/io/compress/brotli_dict_words.md +142 -0
- package/docs/api/io/compress/brotli_frame.md +214 -0
- package/docs/api/io/compress/brotli_shared.md +144 -0
- package/docs/api/io/compress/deflate.md +474 -0
- package/docs/api/io/compress/gzip.md +130 -0
- package/docs/api/io/compress/huffman.md +210 -0
- package/docs/api/io/compress/lz4.md +278 -0
- package/docs/api/io/compress/lz77.md +180 -0
- package/docs/api/io/compress/lzw.md +121 -0
- package/docs/api/io/compress/zip.md +209 -0
- package/docs/api/io/compress/zlib.md +125 -0
- package/docs/api/io/i18n/README.md +23 -0
- package/docs/api/io/i18n/i18n.md +128 -0
- package/docs/api/io/math/README.md +24 -0
- package/docs/api/io/math/fixed-point.md +115 -0
- package/docs/api/io/math/geom.md +144 -0
- package/docs/api/io/math/interp.md +115 -0
- package/docs/api/io/math/linalg.md +138 -0
- package/docs/api/io/math/stats.md +109 -0
- package/docs/api/io/structures/README.md +31 -0
- package/docs/api/io/structures/btree.md +155 -0
- package/docs/api/io/structures/heap.md +166 -0
- package/docs/api/io/structures/lruCache.md +156 -0
- package/docs/api/io/structures/ringBuffer.md +188 -0
- package/docs/api/io/structures/tree-walker.md +132 -0
- package/docs/api/io/structures/trie.md +138 -0
- package/docs/api/io/sync/README.md +29 -0
- package/docs/api/io/sync/abort.md +129 -0
- package/docs/api/io/sync/atomics.md +159 -0
- package/docs/api/io/sync/cancellable.md +176 -0
- package/docs/api/io/sync/channel.md +125 -0
- package/docs/api/io/sync/mutex.md +93 -0
- package/docs/api/io/sync/semaphore.md +106 -0
- package/docs/api/io/sync/tokenBucket.md +139 -0
- package/docs/api/io/text/README.md +23 -0
- package/docs/api/io/text/ansi.md +182 -0
- package/docs/api/io/text/html-entities.md +79 -0
- package/docs/api/io/text/semver.md +158 -0
- package/docs/api/io/text/str.md +129 -0
- package/docs/api/io/text/unicode.md +89 -0
- package/docs/api/io/time/README.md +22 -0
- package/docs/api/io/time/date.md +128 -0
- package/docs/api/io/timing/README.md +32 -0
- package/docs/api/io/timing/clock.md +102 -0
- package/docs/api/io/timing/rateLimit.md +137 -0
- package/docs/api/io/timing/scheduler.md +163 -0
- package/docs/api/io/utils/README.md +30 -0
- package/docs/api/io/utils/bitmap.md +96 -0
- package/docs/api/io/utils/errors.md +165 -0
- package/docs/api/io/utils/eventBus.md +162 -0
- package/docs/api/io/utils/queue.md +141 -0
- package/docs/api/io/utils/signal.md +388 -0
- package/docs/api/io/utils/ui8.md +111 -0
- package/docs/api/io/utils/valid.md +272 -0
- package/docs/api/process/README.md +18 -0
- package/docs/api/process/message.md +166 -0
- package/docs/api/process/rpc.md +161 -0
- package/docs/api/process/workerPool.md +130 -0
- package/docs/api/sanity/base.md +132 -0
- package/docs/api/sanity/community.md +96 -0
- package/docs/api/sanity/lockdown.md +128 -0
- package/docs/api/typed.md +85 -0
- package/docs/dev/README.md +25 -0
- package/docs/dev/provenance.md +80 -0
- package/docs/dev/publishing.md +31 -0
- package/docs/dev/runtime.md +64 -0
- package/docs/dev/testing.md +61 -0
- package/docs/dev/types.md +35 -0
- package/docs/evidence/pqc-hybrid-evidence.md +438 -0
- package/docs/guide/README.md +38 -0
- package/docs/guide/_QUICK_REF.md +341 -0
- package/docs/guide/by-use-case.md +160 -0
- package/docs/guide/doc-format.md +306 -0
- package/docs/guide/gesture-dnd-side-channel.md +119 -0
- package/docs/guide/getting-started.md +134 -0
- package/docs/guide/hmr.md +187 -0
- package/docs/guide/integration-bundlers.md +193 -0
- package/docs/guide/integrations-hmr.md +103 -0
- package/docs/guide/module-creation-workflow.md +342 -0
- package/docs/guide/module-pattern.md +244 -0
- package/docs/guide/rendering-pipeline.md +422 -0
- package/docs/guide/security.md +346 -0
- package/docs/guide/test-format.md +190 -0
- package/docs/guide/tutorial-todo.md +298 -0
- package/docs/guide/typescript.md +215 -0
- package/docs/guide/worker-confinement.md +301 -0
- package/docs/guide/workers.md +168 -0
- package/docs/notes/lz77-deflate-factorization.md +96 -0
- package/docs/notes/worker-confinement-spike.md +302 -0
- package/docs/tools/README.md +56 -0
- package/docs/tools/aot.md +108 -0
- package/docs/tools/audit.md +61 -0
- package/docs/tools/bundler.md +215 -0
- package/docs/tools/codegen.md +64 -0
- package/docs/tools/jsx.md +236 -0
- package/docs/tools/precompilation.md +88 -0
- package/docs/tools/standalone.md +107 -0
- package/fw.config.json +129 -0
- package/integrations/README.md +52 -0
- package/integrations/_shared/catalog.generated.json +207 -0
- package/integrations/_shared/config-resolve.js +201 -0
- package/integrations/_shared/core.js +362 -0
- package/integrations/astro/README.md +96 -0
- package/integrations/astro/index.d.ts +42 -0
- package/integrations/astro/index.js +94 -0
- package/integrations/bun/README.md +62 -0
- package/integrations/bun/index.d.ts +30 -0
- package/integrations/bun/index.js +134 -0
- package/integrations/deno/README.md +55 -0
- package/integrations/deno/deno.json +10 -0
- package/integrations/esbuild/README.md +75 -0
- package/integrations/esbuild/backend.js +147 -0
- package/integrations/esbuild/index.d.ts +32 -0
- package/integrations/esbuild/index.js +147 -0
- package/integrations/eslint/README.md +27 -0
- package/integrations/eslint/no-factory-capture.js +99 -0
- package/integrations/jest/README.md +45 -0
- package/integrations/jest/bun-test-shim.js +43 -0
- package/integrations/nestjs/README.md +68 -0
- package/integrations/nestjs/index.d.ts +38 -0
- package/integrations/nestjs/index.js +99 -0
- package/integrations/nextjs/README.md +149 -0
- package/integrations/nextjs/index.d.ts +30 -0
- package/integrations/nextjs/index.js +98 -0
- package/integrations/nodejs/README.md +46 -0
- package/integrations/nodejs/package.node.example.json +31 -0
- package/integrations/rollup/README.md +65 -0
- package/integrations/rollup/backend.js +132 -0
- package/integrations/rollup/index.d.ts +32 -0
- package/integrations/rollup/index.js +84 -0
- package/integrations/turbopack/README.md +56 -0
- package/integrations/turbopack/index.d.ts +47 -0
- package/integrations/turbopack/index.js +164 -0
- package/integrations/typedoc/README.md +57 -0
- package/integrations/typedoc/categorize.js +121 -0
- package/integrations/typedoc/tsconfig.typedoc.json +14 -0
- package/integrations/typedoc/typedoc.json +19 -0
- package/integrations/vite/README.md +115 -0
- package/integrations/vite/index.d.ts +29 -0
- package/integrations/vite/index.js +182 -0
- package/integrations/vite/package.json +8 -0
- package/integrations/vite/vite-env.d.ts +36 -0
- package/integrations/vitest/README.md +77 -0
- package/integrations/vitest/bun-test-shim.js +92 -0
- package/integrations/vitest/vitest.config.js +41 -0
- package/integrations/webpack/README.md +53 -0
- package/integrations/webpack/index.d.ts +29 -0
- package/integrations/webpack/index.js +182 -0
- package/package.json +303 -0
- package/src/core/logger.js +373 -0
- package/src/core/modules.js +289 -0
- package/src/core/readyState.js +119 -0
- package/src/core/runtime.js +929 -0
- package/src/core/worker-helper.js +261 -0
- package/src/crypto/NIST_CONFORMANCE.md +249 -0
- package/src/crypto/cipher/aes.acvp.md +74 -0
- package/src/crypto/cipher/aes.js +512 -0
- package/src/crypto/cipher/chacha20.acvp.md +117 -0
- package/src/crypto/cipher/chacha20.js +147 -0
- package/src/crypto/hash/adf.acvp.md +144 -0
- package/src/crypto/hash/adf.js +127 -0
- package/src/crypto/hash/argon2.acvp.md +144 -0
- package/src/crypto/hash/argon2.js +517 -0
- package/src/crypto/hash/blake2b.acvp.md +122 -0
- package/src/crypto/hash/blake2b.js +367 -0
- package/src/crypto/hash/hkdf.acvp.md +128 -0
- package/src/crypto/hash/hkdf.js +145 -0
- package/src/crypto/hash/hmac.acvp.md +110 -0
- package/src/crypto/hash/hmac.js +177 -0
- package/src/crypto/hash/pbkdf2.acvp.md +122 -0
- package/src/crypto/hash/pbkdf2.js +120 -0
- package/src/crypto/hash/poly1305.acvp.md +111 -0
- package/src/crypto/hash/poly1305.js +126 -0
- package/src/crypto/hash/sha224.acvp.md +81 -0
- package/src/crypto/hash/sha224.js +60 -0
- package/src/crypto/hash/sha256.acvp.md +75 -0
- package/src/crypto/hash/sha256.js +217 -0
- package/src/crypto/hash/sha3.acvp.md +133 -0
- package/src/crypto/hash/sha3.js +391 -0
- package/src/crypto/hash/sha384.acvp.md +82 -0
- package/src/crypto/hash/sha384.js +61 -0
- package/src/crypto/hash/sha512.acvp.md +84 -0
- package/src/crypto/hash/sha512.js +314 -0
- package/src/crypto/hash/sha512_224.acvp.md +90 -0
- package/src/crypto/hash/sha512_224.js +66 -0
- package/src/crypto/hash/sha512_256.acvp.md +96 -0
- package/src/crypto/hash/sha512_256.js +75 -0
- package/src/crypto/mode/cbc.acvp.md +105 -0
- package/src/crypto/mode/cbc.js +136 -0
- package/src/crypto/mode/chacha20poly1305.acvp.md +116 -0
- package/src/crypto/mode/chacha20poly1305.js +190 -0
- package/src/crypto/mode/cmac.acvp.md +106 -0
- package/src/crypto/mode/cmac.js +172 -0
- package/src/crypto/mode/ctr.acvp.md +110 -0
- package/src/crypto/mode/ctr.js +174 -0
- package/src/crypto/mode/gcm.acvp.md +129 -0
- package/src/crypto/mode/gcm.js +333 -0
- package/src/crypto/mode/kw.acvp.md +145 -0
- package/src/crypto/mode/kw.js +323 -0
- package/src/crypto/pkc/ecc.acvp.md +181 -0
- package/src/crypto/pkc/ecc.js +941 -0
- package/src/crypto/pkc/ed25519.acvp.md +172 -0
- package/src/crypto/pkc/ed25519.js +582 -0
- package/src/crypto/pkc/hybrid-kat.provenance.md +89 -0
- package/src/crypto/pkc/hybridKem.js +255 -0
- package/src/crypto/pkc/hybridSign.js +437 -0
- package/src/crypto/pkc/ml_dsa.acvp.md +146 -0
- package/src/crypto/pkc/ml_dsa.js +984 -0
- package/src/crypto/pkc/ml_kem.acvp.md +117 -0
- package/src/crypto/pkc/ml_kem.js +596 -0
- package/src/crypto/pkc/rsa.acvp.md +187 -0
- package/src/crypto/pkc/rsa.js +470 -0
- package/src/crypto/pkc/slh_dsa.acvp.md +155 -0
- package/src/crypto/pkc/slh_dsa.js +820 -0
- package/src/crypto/pkc/x25519.acvp.md +113 -0
- package/src/crypto/pkc/x25519.js +290 -0
- package/src/crypto/utils/aes_ctr.acvp.md +67 -0
- package/src/crypto/utils/aes_ctr.js +134 -0
- package/src/crypto/utils/aes_modes.acvp.md +66 -0
- package/src/crypto/utils/aes_modes.js +241 -0
- package/src/crypto/utils/asn1-oid.js +369 -0
- package/src/crypto/utils/asn1.js +343 -0
- package/src/crypto/utils/bitArray.js +312 -0
- package/src/crypto/utils/bn.js +825 -0
- package/src/crypto/utils/jws.js +222 -0
- package/src/crypto/utils/keyformat.js +303 -0
- package/src/crypto/utils/pad.js +198 -0
- package/src/crypto/utils/pem.js +90 -0
- package/src/crypto/utils/random.acvp.md +167 -0
- package/src/crypto/utils/random.js +846 -0
- package/src/crypto/utils/rsaKeygen.acvp.md +158 -0
- package/src/crypto/utils/rsaKeygen.js +448 -0
- package/src/crypto/utils/totp.js +409 -0
- package/src/crypto/utils/uuid.acvp.md +137 -0
- package/src/crypto/utils/uuid.js +176 -0
- package/src/crypto/wasm/aes.js +494 -0
- package/src/crypto/wasm/argon2.js +236 -0
- package/src/crypto/wasm/blake2b.js +213 -0
- package/src/crypto/wasm/chacha20poly1305.js +238 -0
- package/src/crypto/wasm/cmac.js +207 -0
- package/src/crypto/wasm/ecc.js +437 -0
- package/src/crypto/wasm/ed25519.js +307 -0
- package/src/crypto/wasm/hkdf.js +183 -0
- package/src/crypto/wasm/hmac.js +215 -0
- package/src/crypto/wasm/ml_dsa.js +375 -0
- package/src/crypto/wasm/ml_kem.js +313 -0
- package/src/crypto/wasm/pbkdf2.js +205 -0
- package/src/crypto/wasm/rsa.js +674 -0
- package/src/crypto/wasm/runtime.js +400 -0
- package/src/crypto/wasm/sha2.js +183 -0
- package/src/crypto/wasm/sha3.js +221 -0
- package/src/crypto/wasm/slh_dsa.js +397 -0
- package/src/crypto/wasm/x25519.js +241 -0
- package/src/crypto/webcrypto/aes.js +370 -0
- package/src/crypto/webcrypto/aeskw.js +185 -0
- package/src/crypto/webcrypto/digest.js +136 -0
- package/src/crypto/webcrypto/ecc.js +371 -0
- package/src/crypto/webcrypto/ed25519.js +248 -0
- package/src/crypto/webcrypto/hkdf.js +132 -0
- package/src/crypto/webcrypto/hmac.js +213 -0
- package/src/crypto/webcrypto/pbkdf2.js +146 -0
- package/src/crypto/webcrypto/rsa.js +415 -0
- package/src/crypto/webcrypto/x25519.js +250 -0
- package/src/dom/display/animate.js +154 -0
- package/src/dom/display/fullscreen.js +305 -0
- package/src/dom/fs/download.js +118 -0
- package/src/dom/fs/fsAccess.js +307 -0
- package/src/dom/fs/indexedDB.js +465 -0
- package/src/dom/fs/remoteStore.js +484 -0
- package/src/dom/fs/storage.js +440 -0
- package/src/dom/lifecycle/idle.js +133 -0
- package/src/dom/lifecycle/visibility.js +140 -0
- package/src/dom/lifecycle/wakeLock.js +187 -0
- package/src/dom/net/ajax.js +303 -0
- package/src/dom/net/broadcastChannel.js +89 -0
- package/src/dom/net/network.js +260 -0
- package/src/dom/net/sse.js +295 -0
- package/src/dom/net/webrtc.js +381 -0
- package/src/dom/net/ws.js +290 -0
- package/src/dom/query/dnd.js +409 -0
- package/src/dom/query/dom.js +831 -0
- package/src/dom/query/events.js +425 -0
- package/src/dom/query/gesture.js +396 -0
- package/src/dom/query/media.js +616 -0
- package/src/dom/rendering/chart.js +663 -0
- package/src/dom/rendering/component.js +469 -0
- package/src/dom/rendering/devtools-ui.js +399 -0
- package/src/dom/rendering/devtools.js +352 -0
- package/src/dom/rendering/parser.js +1055 -0
- package/src/dom/rendering/reactiveBind.js +341 -0
- package/src/dom/rendering/render.js +601 -0
- package/src/dom/rendering/sanitize.js +364 -0
- package/src/dom/rendering/secPolicy.js +281 -0
- package/src/dom/rendering/template.js +1031 -0
- package/src/dom/rendering/themeTokens.js +522 -0
- package/src/dom/rendering/uiSession-core.js +597 -0
- package/src/dom/rendering/uiSession-direct.js +251 -0
- package/src/dom/rendering/uiSession-list.js +751 -0
- package/src/dom/rendering/uiSession.js +145 -0
- package/src/dom/rendering/virtualScroll.js +341 -0
- package/src/dom/sensors/battery.js +153 -0
- package/src/dom/sensors/geolocation.js +156 -0
- package/src/dom/sensors/networkInfo.js +136 -0
- package/src/dom/sensors/sensors.js +340 -0
- package/src/dom/sw/backgroundSync.js +113 -0
- package/src/dom/sw/cache.js +139 -0
- package/src/dom/sw/push.js +181 -0
- package/src/dom/sw/serviceWorker.js +193 -0
- package/src/dom/sw/sharedWorker.js +192 -0
- package/src/dom/utils/a11y.js +244 -0
- package/src/dom/utils/clipboard.js +113 -0
- package/src/dom/utils/entropyCollector.js +344 -0
- package/src/dom/utils/focus.js +421 -0
- package/src/dom/utils/form.js +535 -0
- package/src/dom/utils/formKit.js +427 -0
- package/src/dom/utils/keybindings.js +574 -0
- package/src/dom/utils/leaderElection.js +280 -0
- package/src/dom/utils/notifications.js +218 -0
- package/src/dom/utils/permissions.js +107 -0
- package/src/dom/utils/route.js +482 -0
- package/src/dom/utils/ua.js +109 -0
- package/src/dom/utils/webauthn.js +369 -0
- package/src/external/README.md +15 -0
- package/src/io/binary/reader.js +374 -0
- package/src/io/binary/writer.js +351 -0
- package/src/io/calc/adler32.js +94 -0
- package/src/io/calc/bigint.js +276 -0
- package/src/io/calc/crc32.js +111 -0
- package/src/io/calc/easing.js +514 -0
- package/src/io/codec/b64.js +235 -0
- package/src/io/codec/base32.js +147 -0
- package/src/io/codec/base58.js +167 -0
- package/src/io/codec/buffer.js +630 -0
- package/src/io/codec/cbor.js +550 -0
- package/src/io/codec/csv.js +299 -0
- package/src/io/codec/hex.js +129 -0
- package/src/io/codec/mime.js +398 -0
- package/src/io/codec/msgpack.js +491 -0
- package/src/io/codec/url.js +530 -0
- package/src/io/codec/utf8.js +181 -0
- package/src/io/codec/xml.js +428 -0
- package/src/io/compress/bitstream.js +199 -0
- package/src/io/compress/brotli.js +3073 -0
- package/src/io/compress/brotli_dict.bin +432 -0
- package/src/io/compress/brotli_dict.js +356 -0
- package/src/io/compress/brotli_dict_words.js +157 -0
- package/src/io/compress/brotli_frame.js +420 -0
- package/src/io/compress/brotli_shared.js +715 -0
- package/src/io/compress/deflate.js +1432 -0
- package/src/io/compress/gzip.js +406 -0
- package/src/io/compress/huffman.js +322 -0
- package/src/io/compress/lz4.js +451 -0
- package/src/io/compress/lz77.js +408 -0
- package/src/io/compress/lzw.js +332 -0
- package/src/io/compress/zip.js +815 -0
- package/src/io/compress/zlib.js +340 -0
- package/src/io/i18n/i18n.js +236 -0
- package/src/io/math/fixed-point.js +269 -0
- package/src/io/math/geom.js +350 -0
- package/src/io/math/interp.js +263 -0
- package/src/io/math/linalg.js +472 -0
- package/src/io/math/stats.js +339 -0
- package/src/io/structures/btree.js +357 -0
- package/src/io/structures/heap.js +249 -0
- package/src/io/structures/lruCache.js +219 -0
- package/src/io/structures/ringBuffer.js +208 -0
- package/src/io/structures/tree-walker.js +413 -0
- package/src/io/structures/trie.js +219 -0
- package/src/io/sync/abort.js +196 -0
- package/src/io/sync/atomics.js +342 -0
- package/src/io/sync/cancellable.js +279 -0
- package/src/io/sync/channel.js +301 -0
- package/src/io/sync/mutex.js +148 -0
- package/src/io/sync/semaphore.js +156 -0
- package/src/io/sync/tokenBucket.js +208 -0
- package/src/io/text/ansi.js +536 -0
- package/src/io/text/html-entities.js +143 -0
- package/src/io/text/semver.js +375 -0
- package/src/io/text/str.js +243 -0
- package/src/io/text/unicode.js +188 -0
- package/src/io/time/date.js +355 -0
- package/src/io/timing/clock.js +79 -0
- package/src/io/timing/rateLimit.js +264 -0
- package/src/io/timing/scheduler.js +351 -0
- package/src/io/utils/bitmap.js +94 -0
- package/src/io/utils/errors.js +269 -0
- package/src/io/utils/eventBus.js +315 -0
- package/src/io/utils/queue.js +223 -0
- package/src/io/utils/signal.js +858 -0
- package/src/io/utils/ui8.js +99 -0
- package/src/io/utils/valid.js +556 -0
- package/src/main.js +41 -0
- package/src/polyfill/README.md +9 -0
- package/src/process/message.js +257 -0
- package/src/process/rpc.js +286 -0
- package/src/process/workerPool.js +392 -0
- package/src/sanity/base.js +374 -0
- package/src/sanity/community.js +254 -0
- package/src/sanity/lockdown-apply.js +58 -0
- package/src/sanity/lockdown.js +408 -0
- package/src/sanity/wasm-gate.js +316 -0
- package/src/typed.js +53 -0
- package/third-party/NOTICE-penner-easing +88 -0
- package/third-party/NOTICE-sjcl +50 -0
- package/tools/_lib/cli-help.js +55 -0
- package/tools/rendering/aot/index.js +148 -0
- package/tools/rendering/aot/lib/dom-codegen.js +295 -0
- package/tools/rendering/jsx/index.js +654 -0
- package/tools/rendering/precompilation/index.js +368 -0
- package/types/registry.generated.d.ts +217 -0
- package/types/typed.d.ts +106 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
---
|
|
2
|
+
module: devtools
|
|
3
|
+
category: dom/rendering
|
|
4
|
+
dependencies: [clock]
|
|
5
|
+
returns: object
|
|
6
|
+
worker-safe: false
|
|
7
|
+
status: complete
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# devtools
|
|
11
|
+
|
|
12
|
+
> Read-only introspection of a uiSession + lightweight profiler + readable elm-array dump.
|
|
13
|
+
|
|
14
|
+
**Module** `devtools` | **Source** `packages/front/fw/src/dom/rendering/devtools.js` | **Deps** `clock` | **Worker-safe** no
|
|
15
|
+
|
|
16
|
+
Exposes data only (snapshots, strings, durations) — no UI. The `sde/sdc` layer can build a debug panel or console on top. Standalone usage: pipe the outputs to `console.log` / `console.table`.
|
|
17
|
+
|
|
18
|
+
## Resolve
|
|
19
|
+
|
|
20
|
+
```js
|
|
21
|
+
const dev = runtime.resolve('devtools');
|
|
22
|
+
// Returns: { inspect, summarize, dumpTemplate, profile, profileAsync, timer }
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## API
|
|
26
|
+
|
|
27
|
+
| Method | Signature | Returns |
|
|
28
|
+
|---------|-----------|---------|
|
|
29
|
+
| `inspect` | `(session: UISession) => Snapshot` | Plain-JSON snapshot of the session |
|
|
30
|
+
| `summarize` | `(session: UISession) => string` | Single-line summary |
|
|
31
|
+
| `dumpTemplate` | `(input: ParseResult \| ElmNode[], opts?) => string` | Readable indented tree |
|
|
32
|
+
| `profile` | `(fn: () => T) => { result: T, durationMs: number }` | Sync profile |
|
|
33
|
+
| `profileAsync` | `(fn: () => Promise<T>) => Promise<{ result: T, durationMs: number }>` | Async profile |
|
|
34
|
+
| `timer` | `() => { mark(label), end() }` | Multi-segment profiler |
|
|
35
|
+
|
|
36
|
+
### `dev.inspect(session)` → Snapshot
|
|
37
|
+
|
|
38
|
+
Photographs the logical state of the session without capturing live DOM nodes. All missing internal fields are tolerated (returned as `null` or `[]`) — useful on a partially disposed session.
|
|
39
|
+
|
|
40
|
+
Returned shape:
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
{
|
|
44
|
+
container: string | null,
|
|
45
|
+
blocks: Array<{ id: string, logicalIds: string[], isLoop: boolean }>,
|
|
46
|
+
attaches: Array<{ blockId: string, slots: string[] }>,
|
|
47
|
+
children: Array<{ parent: string, children: string[] }>,
|
|
48
|
+
listeners: Array<{ blockId: string, logicalId: string, names: string[] }>,
|
|
49
|
+
mountHooks: string[],
|
|
50
|
+
unmountHooks: string[],
|
|
51
|
+
lists: Array<{ parent: string, slot: string, size: number, disposed: boolean }>,
|
|
52
|
+
portals: Array<{ name: string, container: any }>,
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Throws `Error` if `session` is `null` / not an object.
|
|
57
|
+
|
|
58
|
+
### `dev.summarize(session)` → string
|
|
59
|
+
|
|
60
|
+
Returns a space-separated string, one token per mounted block: `id(logicalIds…)`. Loops: `id(loop×N)`. Convenient for quick `console.log`.
|
|
61
|
+
|
|
62
|
+
### `dev.dumpTemplate(input, opts?)` → string
|
|
63
|
+
|
|
64
|
+
Indented render of the tree of an elm-array or a full `ParseResult`. Each line: `<tag#id> [text=…] [slot=…] [attrs=…] [map=…]`. The `iterates` of a `ParseResult` are displayed in separate sections.
|
|
65
|
+
|
|
66
|
+
| Option | Type | Default | Description |
|
|
67
|
+
|--------|------|--------|-------------|
|
|
68
|
+
| `indent` | `string` | `' '` (2 spaces) | Indentation string per level |
|
|
69
|
+
|
|
70
|
+
### `dev.profile(fn)` → `{ result, durationMs }`
|
|
71
|
+
|
|
72
|
+
Executes `fn()` synchronously and returns its result + the duration via `clock.monotonic` (~1 ms resolution). Throws `Error` if `fn` is not a function.
|
|
73
|
+
|
|
74
|
+
### `dev.profileAsync(fn)` → `Promise<{ result, durationMs }>`
|
|
75
|
+
|
|
76
|
+
Async variant. Throws `Error` if `fn` is not a function.
|
|
77
|
+
|
|
78
|
+
### `dev.timer()` → `{ mark(name), end() }`
|
|
79
|
+
|
|
80
|
+
Multi-segment profiler. `mark(name)` opens a segment and closes the previous one. `end()` closes the last open segment and returns:
|
|
81
|
+
|
|
82
|
+
```ts
|
|
83
|
+
{
|
|
84
|
+
total: number, // ms since the timer was created
|
|
85
|
+
segments: Array<{ name: string, durationMs: number }>
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Examples
|
|
90
|
+
|
|
91
|
+
### Inspecting a session in the console
|
|
92
|
+
|
|
93
|
+
```js
|
|
94
|
+
const dev = runtime.resolve('devtools');
|
|
95
|
+
const ui = runtime.resolve('uiSession')('app');
|
|
96
|
+
|
|
97
|
+
// … mount some blocks …
|
|
98
|
+
|
|
99
|
+
console.table(dev.inspect(ui).blocks);
|
|
100
|
+
console.log(dev.summarize(ui));
|
|
101
|
+
// e.g.: "header(h1,nav) content(body) sidebar(menu)"
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Dumping a parsed template
|
|
105
|
+
|
|
106
|
+
```js
|
|
107
|
+
const parser = runtime.resolve('parser');
|
|
108
|
+
const result = parser.fromHTML('<ul><li>#{text}</li></ul>');
|
|
109
|
+
|
|
110
|
+
console.log(dev.dumpTemplate(result));
|
|
111
|
+
// <ul#root>
|
|
112
|
+
// <li#item> map=[$text=#{text}=]
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Synchronous profile
|
|
116
|
+
|
|
117
|
+
```js
|
|
118
|
+
const { result, durationMs } = dev.profile(() => render.full(items));
|
|
119
|
+
console.log(`render: ${durationMs.toFixed(2)} ms`, result);
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Async profile
|
|
123
|
+
|
|
124
|
+
```js
|
|
125
|
+
const { result, durationMs } = await dev.profileAsync(async () => {
|
|
126
|
+
const resp = await fetch('/api/data');
|
|
127
|
+
return resp.json();
|
|
128
|
+
});
|
|
129
|
+
console.log(`fetch+parse: ${durationMs.toFixed(2)} ms`);
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Multi-segment timer
|
|
133
|
+
|
|
134
|
+
```js
|
|
135
|
+
const t = dev.timer();
|
|
136
|
+
t.mark('parse'); const parsed = parser.fromHTML(html);
|
|
137
|
+
t.mark('render'); const elms = render.full(parsed, data);
|
|
138
|
+
t.mark('insert'); template.elms('app', elms);
|
|
139
|
+
const { total, segments } = t.end();
|
|
140
|
+
console.table(segments);
|
|
141
|
+
// parse: 1.2 ms, render: 0.8 ms, insert: 2.1 ms, total: 4.1 ms
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Notes
|
|
145
|
+
|
|
146
|
+
- `inspect()` reads the internal fields `_map`, `_attach`, `_children`, `_listeners`, `_mount`, `_unmount`, `_lists`, `_portals`, `_container` of `uiSession`. These are implementation details — the snapshot may change between major versions.
|
|
147
|
+
- `worker-safe: false` — `devtools` is not designed for Worker use; the `clock` module itself does not impose this restriction.
|
|
148
|
+
- `profile` / `profileAsync` use `clock.monotonic` (sanity-safe, not direct `performance.now`) — resolution is ~1 ms on most platforms.
|
|
149
|
+
- **`devtools.factory(clock)` takes the clock INSTANCE, not the `clock` module descriptor**. `runtime.resolve('devtools')` injects it correctly — `def.factory.apply({}, deps)` in `src/core/runtime.js` calls dependency factories for you before injection. Hand-wiring outside `resolve()` must do the same call itself: `devtools.factory(clock.factory())`, never `devtools.factory(clock)`.
|
|
150
|
+
- `dumpTemplate` does not capture live DOM nodes — only the static elm-array structure. For live DOM state, use `dev.inspect()`.
|
|
151
|
+
- **Internals**: `uiSession` is composed of three internal mixins (`uiSession-core.js`, `uiSession-direct.js`, `uiSession-list.js`) that are not documented separately; `inspect()` reflects their combined structure.
|
|
152
|
+
|
|
153
|
+
## See also
|
|
154
|
+
|
|
155
|
+
- [uiSession](./uiSession.md) — the inspected session
|
|
156
|
+
- [parser](./parser.md) — produces the `ParseResult` objects passed to `dumpTemplate`
|
|
157
|
+
- [clock](../../io/timing/clock.md) — time base used by the profiler
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
---
|
|
2
|
+
module: parser
|
|
3
|
+
category: dom/rendering
|
|
4
|
+
dependencies: [secPolicy]
|
|
5
|
+
returns: object
|
|
6
|
+
worker-safe: true
|
|
7
|
+
status: complete
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# parser
|
|
11
|
+
|
|
12
|
+
> Converts HTML to elm-arrays (notation `#{...}`, `${...}`, `<!-- $name -->`) and back.
|
|
13
|
+
|
|
14
|
+
**Module** `parser` | **Source** `packages/front/fw/src/dom/rendering/parser.js` | **Deps** `secPolicy` | **Worker-safe** yes
|
|
15
|
+
|
|
16
|
+
> **Worker note**: `parser.fromHTML` uses `DOMParser` when available (window + some workers) and falls back to a self-contained tokenizer for Node/Bun or contexts without `DOMParser`. The other methods (elm-array serialisation, validation) are 100% data — no DOM dependency.
|
|
17
|
+
|
|
18
|
+
> **Security**: parsing rejects `<script>`, `<object>`, `<embed>`, `<iframe>`, `on*` attributes, and attribute names that do not start with a letter. These rules live in the [`secPolicy`](./secPolicy.md) module — single source of truth for the security policy, shared with `template`, `render`, `dom`, and `sanitize`.
|
|
19
|
+
|
|
20
|
+
## Resolve
|
|
21
|
+
|
|
22
|
+
```js
|
|
23
|
+
const parser = runtime.resolve('parser');
|
|
24
|
+
// Returns: { fromHTML, toHTML }
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## API
|
|
28
|
+
|
|
29
|
+
| Method | Signature | Description |
|
|
30
|
+
|---------|-----------|-------------|
|
|
31
|
+
| `fromHTML` | `(html: string, options?: FromHTMLOptions) => ParseResult` | HTML → elm-array + iterates |
|
|
32
|
+
| `toHTML` | `(input: ElmNode[]\|ParseResult) => string` | elm-array → HTML (reverse) |
|
|
33
|
+
|
|
34
|
+
### Typedef: FromHTMLOptions
|
|
35
|
+
|
|
36
|
+
| Field | Type | Description |
|
|
37
|
+
|---|---|---|
|
|
38
|
+
| `reserveIds` | `Iterable<string>` | Explicit ids the caller knows the assembled document will contain, declared **up front**. Reserved for the whole parser instance — this call and every later one — so an auto `p<n>` never collides with an explicit id the instance has not met yet. Empty and non-string entries are ignored. Supplying the option **bypasses the `ParseResult` cache** (read *and* write), because the reservation changes which ids are minted. |
|
|
39
|
+
|
|
40
|
+
### `parser.fromHTML(html)`
|
|
41
|
+
|
|
42
|
+
```js
|
|
43
|
+
const result = parser.fromHTML('<div><h1>#{title}</h1></div>');
|
|
44
|
+
// → {
|
|
45
|
+
// template: [
|
|
46
|
+
// { id: "p0", tag: "div" },
|
|
47
|
+
// { id: "p1", tag: "h1", parent: "p0", text: "", map: [{ name: "title", prop: "text" }] }
|
|
48
|
+
// ]
|
|
49
|
+
// }
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
#### With a content slot
|
|
53
|
+
|
|
54
|
+
```js
|
|
55
|
+
const result = parser.fromHTML('<div><h1>#{title}</h1>${content}</div>');
|
|
56
|
+
// template contains a node with content: "content"
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
#### With an iterable block
|
|
60
|
+
|
|
61
|
+
```js
|
|
62
|
+
const result = parser.fromHTML(`
|
|
63
|
+
<ul>
|
|
64
|
+
<!-- $item -->
|
|
65
|
+
<li>#{text}</li>
|
|
66
|
+
<!-- item$ -->
|
|
67
|
+
</ul>
|
|
68
|
+
`);
|
|
69
|
+
// → {
|
|
70
|
+
// template: [ ElmNode{tag:"ul"} ],
|
|
71
|
+
// iterates: { item: [ ElmNode{tag:"li", map:[{name:"text",prop:"text"}]} ] }
|
|
72
|
+
// }
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### `parser.toHTML(input)`
|
|
76
|
+
|
|
77
|
+
```js
|
|
78
|
+
const html = parser.toHTML(result.template);
|
|
79
|
+
// Rebuilds the original HTML (with #{...} notation preserved)
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Typedef: ParseResult
|
|
83
|
+
|
|
84
|
+
```js
|
|
85
|
+
{
|
|
86
|
+
template: ElmNode[], // flat array, parents before children
|
|
87
|
+
iterates?: { // present if <!-- $name --> blocks found
|
|
88
|
+
[blockName: string]: ElmNode[]
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Typedef: ElmNode
|
|
94
|
+
|
|
95
|
+
```js
|
|
96
|
+
{
|
|
97
|
+
id: string, // HTML id or auto-generated ("p0", "p1", ...)
|
|
98
|
+
tag: string, // "div", "h1", "svg_use", "text", ...
|
|
99
|
+
parent?: string, // parent id (absent for root nodes)
|
|
100
|
+
attrs?: string[], // names of tracked attributes
|
|
101
|
+
data?: Object.<string,string>,// static attribute values
|
|
102
|
+
text?: string, // static text (leaf nodes)
|
|
103
|
+
content?: string, // slot name or iterable block name
|
|
104
|
+
map?: MapEntry[] // variable descriptors
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Typedef: MapEntry
|
|
109
|
+
|
|
110
|
+
```js
|
|
111
|
+
{
|
|
112
|
+
name: string, // variable name (from #{name})
|
|
113
|
+
prop: string, // target property: attribute or "text"
|
|
114
|
+
data?: boolean, // true → targets elm.data[prop] (attribute)
|
|
115
|
+
append?: boolean, // value appended after the static base
|
|
116
|
+
prepend?: boolean, // value prepended before the static base
|
|
117
|
+
tail?: string, // static run that immediately FOLLOWS this variable
|
|
118
|
+
default?: any // value if variable is absent from the render
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Value positioning — the static/var segment model
|
|
123
|
+
|
|
124
|
+
A single text or attribute value is an ordered sequence of static runs and
|
|
125
|
+
`#{var}` markers. It is stored as a static base (`elm.text` / `elm.data[prop]`)
|
|
126
|
+
plus one `MapEntry` per marker, and rendered as:
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
base + Σ over entries in order ( resolve(varᵢ) + tailᵢ )
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
`base` is the leading static run; each entry's `tail` is the static run that
|
|
133
|
+
immediately follows its marker (unconditional — kept even when the variable is
|
|
134
|
+
absent). A marker may therefore sit **anywhere** in the value, with static
|
|
135
|
+
content on both sides:
|
|
136
|
+
|
|
137
|
+
| Source value | `base` | entries |
|
|
138
|
+
|---|---|---|
|
|
139
|
+
| `#{v}` | `""` | `{v}` (full replace) |
|
|
140
|
+
| `pre#{v}` | `"pre"` | `{v, append}` |
|
|
141
|
+
| `#{v}suf` | `"suf"` | `{v, prepend}` |
|
|
142
|
+
| `pre#{v}suf` | `"pre"` | `{v, append, tail:"suf"}` |
|
|
143
|
+
| `a#{v1}b#{v2}c` | `"a"` | `{v1, append, tail:"b"}, {v2, append, tail:"c"}` |
|
|
144
|
+
|
|
145
|
+
The prefix-only / suffix-only / full-replace shapes are unchanged; `tail` only
|
|
146
|
+
appears when a marker has a non-empty trailing static run (both-sides or the
|
|
147
|
+
interior runs of a multi-marker value). `render.js` and the AOT `dom-codegen`
|
|
148
|
+
apply the same model, and `toHTML` restores the full value.
|
|
149
|
+
|
|
150
|
+
## Template notation
|
|
151
|
+
|
|
152
|
+
| Marker | Usage | Examples |
|
|
153
|
+
|---------|-------|---------|
|
|
154
|
+
| `#{varName}` | Text or attribute value | `<h1>#{title}</h1>`, `class="#{cls}"` |
|
|
155
|
+
| `${slotName}` | Content slot (child element) | `<div>${body}</div>` |
|
|
156
|
+
| `<!-- $name --> ... <!-- name$ -->` | Iterable block | `<!-- $item --><li>#{t}</li><!-- item$ -->` |
|
|
157
|
+
|
|
158
|
+
## Examples
|
|
159
|
+
|
|
160
|
+
```js
|
|
161
|
+
const parser = runtime.resolve('parser');
|
|
162
|
+
|
|
163
|
+
// Simple variable
|
|
164
|
+
const r1 = parser.fromHTML('<h1>#{title}</h1>');
|
|
165
|
+
// r1.template[0].map = [{ name: "title", prop: "text" }]
|
|
166
|
+
|
|
167
|
+
// Variable in attribute
|
|
168
|
+
const r2 = parser.fromHTML('<div class="#{cls}" id="box">texte</div>');
|
|
169
|
+
// r2.template[0].map = [{ name: "cls", prop: "class", data: true }]
|
|
170
|
+
|
|
171
|
+
// Round-trip
|
|
172
|
+
const html = '<div><p>#{text}</p></div>';
|
|
173
|
+
const parsed = parser.fromHTML(html);
|
|
174
|
+
const rebuilt = parser.toHTML(parsed.template);
|
|
175
|
+
// rebuilt ≈ html (possible reformatting)
|
|
176
|
+
|
|
177
|
+
// One logical document assembled from several calls: declare the full
|
|
178
|
+
// explicit-id set up front so no auto id can collide with it.
|
|
179
|
+
const explicit = ['p2', 'intro'];
|
|
180
|
+
const head = parser.fromHTML('<div><span>a</span><span>b</span></div>', { reserveIds: explicit });
|
|
181
|
+
const body = parser.fromHTML('<section id="p2"><h1>Title</h1></section>');
|
|
182
|
+
const page = parser.toHTML([...head.template, ...body.template]);
|
|
183
|
+
// `head` skipped p2 → the <section> survives the merge.
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## Notes
|
|
187
|
+
|
|
188
|
+
- SVG children: `svg_` prefix (e.g. `svg_use`, `svg_rect`, `svg_path`).
|
|
189
|
+
- Mixed text nodes: synthetic tag `"text"`.
|
|
190
|
+
- HTML ids are preserved in `elm.id`; otherwise auto-incremented (`p0`, `p1`, ...).
|
|
191
|
+
- The auto counter is scoped to the parser **instance** and keeps running across `fromHTML` calls, so a site build that shares one parser gets stable, non-repeating ids. Within a single `fromHTML` call the ids are **guaranteed unique for that document**: a `pN` value already used as an explicit `id` anywhere in the parsed markup is skipped (the whole document is scanned before the first mint, so an explicit id further down the tree counts too). Feeding parser output back through `fromHTML` is therefore safe.
|
|
192
|
+
- **Multi-call document assembly.** A consumer that builds one logical document from *several* `fromHTML` calls on a shared instance gets the guarantee across that seam too, in two layers. (1) *Accumulation, always on*: every explicit id seen by a call is reserved for the instance, so a later call never re-mints it. (2) *Caller-supplied reservation*: pass the full explicit-id set of the assembled document as `fromHTML(html, { reserveIds })` on the **first** call — this is the only way to cover the opposite direction, an explicit `pN` that only arrives in a *later* call, which accumulation cannot foresee. A reservation is instance-wide and permanent; it applies to every subsequent call with no options. Reservation only affects *future* mints, so it must be declared before the first parse of the assembly. Uniqueness matters because `buildTree` merges nodes by id with last-write-wins: a collision **deletes** a subtree from the assembled output rather than duplicating it.
|
|
193
|
+
- **`id` is identity, never a binding site.** The `id` attribute is consumed as the node's `elm.id` and skipped by the attribute walk, so it never enters `attrs` / `data` and never gets a `MapEntry`. `id="#{key}"` therefore does **not** bind: the literal string `#{key}` becomes the node id. Bind a dynamic identity through another attribute (`data-key="#{key}"`) and let `render.rewrite` handle id uniqueness.
|
|
194
|
+
- The slot `${name}` becomes a `<span>` if the node has siblings, otherwise inlined on `elm.content`.
|
|
195
|
+
|
|
196
|
+
## See also
|
|
197
|
+
|
|
198
|
+
- [render](./render.md) — next step: binding data
|
|
199
|
+
- [uiSession](./uiSession.md) — `ui.parse()` wraps `parser.fromHTML()`
|
|
200
|
+
- [Guide pipeline](../../../guide/rendering-pipeline.md)
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
---
|
|
2
|
+
module: reactiveBind
|
|
3
|
+
category: dom/rendering
|
|
4
|
+
dependencies: [signal]
|
|
5
|
+
returns: object
|
|
6
|
+
worker-safe: false
|
|
7
|
+
status: complete
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# reactiveBind
|
|
11
|
+
|
|
12
|
+
> Explicit signal-to-DOM binding controller: patch nodes, never re-render.
|
|
13
|
+
|
|
14
|
+
**Module** `reactiveBind` | **Source** `packages/front/fw/src/dom/rendering/reactiveBind.js` | **Deps** `signal` | **Worker-safe** no
|
|
15
|
+
|
|
16
|
+
## Philosophy
|
|
17
|
+
|
|
18
|
+
`reactiveBind` makes reactivity *practical*, not *automatic*. Every binding is
|
|
19
|
+
a method the caller invokes explicitly — there is no magic template scanning or
|
|
20
|
+
transparent reactive proxy. This follows the
|
|
21
|
+
[Lit ReactiveController](https://lit.dev/docs/composition/controllers/) pattern
|
|
22
|
+
and aligns with Solid's fine-grained `createEffect` idiom.
|
|
23
|
+
|
|
24
|
+
Each call registers exactly one `signal.effect` that auto-tracks its source and
|
|
25
|
+
calls the corresponding `uiSession` mutator when the value changes. The effect
|
|
26
|
+
**patches** the live node in place — it never triggers a re-render, never
|
|
27
|
+
reconstructs a vdom, and never replaces the element. Node identity is always
|
|
28
|
+
preserved.
|
|
29
|
+
|
|
30
|
+
## Resolve
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
const reactiveBind = runtime.resolve('reactiveBind');
|
|
34
|
+
// → { create }
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## API
|
|
38
|
+
|
|
39
|
+
### `reactiveBind.create(ui)` → `ReactiveBindController`
|
|
40
|
+
|
|
41
|
+
Creates a new binding controller scoped to the `uiSession` instance `ui`.
|
|
42
|
+
|
|
43
|
+
```js
|
|
44
|
+
const bind = reactiveBind.create(ui);
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
All methods on the controller accept a `sigOrFn` argument which is either:
|
|
48
|
+
- a **signal** (object with `.get()`) — reads are auto-tracked, or
|
|
49
|
+
- a **thunk** `() => value` — also auto-tracked inside the effect.
|
|
50
|
+
|
|
51
|
+
Every method **throws** a descriptive error if the addressed `(blockId,
|
|
52
|
+
localId)` pair is not found in the session. This is intentional: silent no-ops
|
|
53
|
+
would make missing-element bugs invisible.
|
|
54
|
+
|
|
55
|
+
### One-way bindings
|
|
56
|
+
|
|
57
|
+
| Method | Signature | Patches |
|
|
58
|
+
|--------|-----------|---------|
|
|
59
|
+
| `text` | `(blockId, localId, sigOrFn) => disposer` | `textContent` |
|
|
60
|
+
| `attr` | `(blockId, localId, name, sigOrFn) => disposer` | Attribute `name` (`null`/`false` removes it) |
|
|
61
|
+
| `class` | `(blockId, localId, name, sigBool) => disposer` | CSS class toggle |
|
|
62
|
+
| `style` | `(blockId, localId, prop, sigOrFn) => disposer` | Inline style property (`null`/`false` removes it) |
|
|
63
|
+
| `show` | `(blockId, localId, sigBool) => disposer` | `hidden` attribute (truthy = visible, falsy = hidden) |
|
|
64
|
+
|
|
65
|
+
### Two-way binding
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
model(blockId, localId, sig, opts?) → disposer
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
`opts`:
|
|
72
|
+
|
|
73
|
+
| Field | Type | Default | Description |
|
|
74
|
+
|-------|------|---------|-------------|
|
|
75
|
+
| `event` | `string` | `'input'` | DOM event type to listen on. |
|
|
76
|
+
| `parse` | `(v: string) => *` | identity | Convert DOM value to signal value. |
|
|
77
|
+
| `format` | `(v: *) => string` | `String(v)` | Convert signal value to DOM value. |
|
|
78
|
+
|
|
79
|
+
The binding wires both directions:
|
|
80
|
+
- **Signal → DOM**: a `signal.effect` writes `format(sig.get())` to
|
|
81
|
+
`element.value` when the signal changes. The write is skipped if the
|
|
82
|
+
formatted value already matches to avoid caret-jump on fast typing.
|
|
83
|
+
- **DOM → Signal**: an event listener calls `sig.set(parse(element.value))`
|
|
84
|
+
and skips the set when the parsed value equals the current signal value
|
|
85
|
+
(feedback-loop guard via `Object.is`).
|
|
86
|
+
|
|
87
|
+
### List binding
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
list(listController, sigArray, opts) → disposer
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
`opts`:
|
|
94
|
+
|
|
95
|
+
| Field | Type | Description |
|
|
96
|
+
|-------|------|-------------|
|
|
97
|
+
| `keyFn` | `(item) => *` | **Required.** Key extractor forwarded to `UIList.sync`. |
|
|
98
|
+
| `block` | `ParseResult` | **Required.** Row template forwarded to `UIList.sync`. |
|
|
99
|
+
| `eqFn` | `function \| 'shallow' \| 'deep'` | Optional equality preset forwarded to `UIList.sync`. |
|
|
100
|
+
|
|
101
|
+
Whenever `sigArray` changes, `listController.sync(newValue, opts)` is called.
|
|
102
|
+
Reconciliation — reorder, add, remove — is entirely owned by `UIList`. No
|
|
103
|
+
diffing happens inside `reactiveBind`.
|
|
104
|
+
|
|
105
|
+
### Disposal
|
|
106
|
+
|
|
107
|
+
Every binding method returns its own **per-call disposer** `() => void` that
|
|
108
|
+
detaches only that one binding. The controller also accumulates all disposers
|
|
109
|
+
internally so a single `bind.dispose()` call cleans up everything at once.
|
|
110
|
+
|
|
111
|
+
```js
|
|
112
|
+
const stop = bind.text('card', 'title', nameSig);
|
|
113
|
+
stop(); // detach only this one binding
|
|
114
|
+
|
|
115
|
+
bind.dispose(); // detach all bindings registered on this controller
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
`dispose()` is idempotent.
|
|
119
|
+
|
|
120
|
+
## Examples
|
|
121
|
+
|
|
122
|
+
```js
|
|
123
|
+
const sig = runtime.resolve('signal');
|
|
124
|
+
const reactiveBind = runtime.resolve('reactiveBind');
|
|
125
|
+
|
|
126
|
+
const name = sig.create('Alice');
|
|
127
|
+
const visible = sig.create(true);
|
|
128
|
+
const color = sig.create('royalblue');
|
|
129
|
+
const count = sig.create(0);
|
|
130
|
+
|
|
131
|
+
const bind = reactiveBind.create(ui);
|
|
132
|
+
|
|
133
|
+
// One-way: patch text content
|
|
134
|
+
bind.text('card', 'title', name);
|
|
135
|
+
|
|
136
|
+
// One-way: set attribute from a computed thunk
|
|
137
|
+
bind.attr('card', 'title', 'aria-label', () => `User: ${name.get()}`);
|
|
138
|
+
|
|
139
|
+
// One-way: toggle CSS class
|
|
140
|
+
bind.class('card', 'root', 'highlighted', sig.computed(() => count.get() > 5));
|
|
141
|
+
|
|
142
|
+
// One-way: inline style
|
|
143
|
+
bind.style('card', 'root', 'border-color', color);
|
|
144
|
+
|
|
145
|
+
// One-way: show/hide
|
|
146
|
+
bind.show('card', 'spinner', visible);
|
|
147
|
+
|
|
148
|
+
// Two-way: input ↔ signal
|
|
149
|
+
const query = sig.create('');
|
|
150
|
+
bind.model('search', 'input', query);
|
|
151
|
+
|
|
152
|
+
// Two-way: numeric input with parse/format
|
|
153
|
+
bind.model('form', 'amount', count, {
|
|
154
|
+
parse: (v) => parseFloat(v) || 0,
|
|
155
|
+
format: (v) => v.toFixed(2),
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
// List
|
|
159
|
+
const items = sig.create([{ id: '1', name: 'Alice' }]);
|
|
160
|
+
const listCtrl = ui.list('app', 'rows', { keyFn: (x) => x.id, block: rowBlock });
|
|
161
|
+
bind.list(listCtrl, items, { keyFn: (x) => x.id, block: rowBlock });
|
|
162
|
+
|
|
163
|
+
// Signal changes drive patches immediately:
|
|
164
|
+
name.set('Bob'); // card#title.textContent = 'Bob'
|
|
165
|
+
visible.set(false); // card#spinner[hidden] = ''
|
|
166
|
+
|
|
167
|
+
// Bulk teardown:
|
|
168
|
+
bind.dispose();
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
## Non-goals
|
|
172
|
+
|
|
173
|
+
### Transparent reactivity (`ref` / Solid-style)
|
|
174
|
+
|
|
175
|
+
`reactiveBind` does **not** auto-instrument templates or scan variable
|
|
176
|
+
accesses at parse time. Explicit bindings are preferred because they make the
|
|
177
|
+
reactive surface visible in code, simplify debugging (one effect = one binding),
|
|
178
|
+
and avoid the overhead of proxy-based tracking across the whole DOM tree.
|
|
179
|
+
|
|
180
|
+
### Virtual DOM / structural diffing
|
|
181
|
+
|
|
182
|
+
`reactiveBind` does not implement its own differ. Structural changes (adding,
|
|
183
|
+
removing, reordering rows) are delegated to `UIList.sync` via the `list`
|
|
184
|
+
binding. For everything else — text, attributes, classes, styles — a single
|
|
185
|
+
targeted `uiSession` mutator call is sufficient and avoids unnecessary tree
|
|
186
|
+
comparisons.
|
|
187
|
+
|
|
188
|
+
## Notes
|
|
189
|
+
|
|
190
|
+
- Each one-way binding is backed by exactly one `signal.effect`; the effect
|
|
191
|
+
re-runs and re-collects its dependencies each time, so conditional reads
|
|
192
|
+
inside thunks work correctly (e.g. `() => flag.get() ? a.get() : b.get()`
|
|
193
|
+
tracks only the branch that was taken).
|
|
194
|
+
- `model` uses `sig.peek()` (non-tracking read) inside the event handler to
|
|
195
|
+
compare the parsed value — this avoids accidentally adding the signal as a
|
|
196
|
+
dependency of a stale effect.
|
|
197
|
+
- **Node addressing differs per binder — and it decides what survives a view
|
|
198
|
+
swap.** All six element binders validate `(blockId, localId)` eagerly at bind
|
|
199
|
+
time, but they do not address the node the same way afterwards:
|
|
200
|
+
|
|
201
|
+
| Binder | Addressing inside the effect |
|
|
202
|
+
|---|---|
|
|
203
|
+
| `text`, `attr`, `show` | **ID-addressed** — the effect calls the `uiSession` mutator with `(blockId, localId)`, so the node is re-resolved on every run |
|
|
204
|
+
| `cls`, `style`, `model` | **Node-captured** — the element is resolved once at bind time and mutated directly (`classList`, `style`, `value`) |
|
|
205
|
+
|
|
206
|
+
Consequences after `ui.replace(...)` on the bound block:
|
|
207
|
+
|
|
208
|
+
- `text` / `attr` / `show` **self-heal**: the next effect run writes into the
|
|
209
|
+
new node. The swap itself does not re-flush them, so the new node keeps its
|
|
210
|
+
rendered value until the signal next changes.
|
|
211
|
+
- `cls` / `style` / `model` keep writing into the **detached old element**.
|
|
212
|
+
Nothing throws and nothing warns — the binding is simply invisible from
|
|
213
|
+
then on. `model` also loses its DOM→signal direction, because its listener
|
|
214
|
+
is attached to the captured node (and removed from that same node by the
|
|
215
|
+
disposer).
|
|
216
|
+
|
|
217
|
+
Over a block that is **cleared** rather than replaced the two families diverge
|
|
218
|
+
the same way: the ID-addressed binders resolve nothing and are a silent
|
|
219
|
+
no-op, while the node-capturing ones go on mutating a detached element.
|
|
220
|
+
Neither throws — only the bind-time check reports a missing
|
|
221
|
+
`(blockId, localId)`.
|
|
222
|
+
|
|
223
|
+
The practical rule: **dispose a binder before its block is replaced or
|
|
224
|
+
cleared, then re-bind against the new block.** Relying on self-healing covers
|
|
225
|
+
three of the six binders only. `list` is unaffected — it addresses no element
|
|
226
|
+
itself and delegates reconciliation entirely to the `UIList` controller.
|
|
227
|
+
- Worker-safe: **no**. `reactiveBind` holds references to `uiSession` (DOM)
|
|
228
|
+
instances and manipulates `element.style`, `classList`, and `value` directly.
|
|
229
|
+
|
|
230
|
+
## See also
|
|
231
|
+
|
|
232
|
+
- [signal](../../io/utils/signal.md) — reactive primitives: `create`, `effect`, `computed`.
|
|
233
|
+
- [uiSession](./uiSession.md) — the session that `reactiveBind` patches.
|
|
234
|
+
- [component](./component.md) — higher-level component system; task 04 will add `self.bind` which wraps `reactiveBind`.
|