@despia-native/kernel 0.0.0-stage → 0.3.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/LICENSE +202 -0
- package/NOTICE +1414 -0
- package/README.md +17 -2
- package/dist/.dsx-build-stamp.json +7 -0
- package/dist/api-cohort.d.ts +27 -0
- package/dist/api-cohort.d.ts.map +1 -0
- package/dist/api-cohort.js +94 -0
- package/dist/api-cohort.js.map +1 -0
- package/dist/api.d.ts +454 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +2442 -0
- package/dist/api.js.map +1 -0
- package/dist/app-consts.d.ts +10 -0
- package/dist/app-consts.d.ts.map +1 -0
- package/dist/app-consts.js +39 -0
- package/dist/app-consts.js.map +1 -0
- package/dist/app-update.d.ts +12 -0
- package/dist/app-update.d.ts.map +1 -0
- package/dist/app-update.js +32 -0
- package/dist/app-update.js.map +1 -0
- package/dist/aria.d.ts +152 -0
- package/dist/aria.d.ts.map +1 -0
- package/dist/aria.js +524 -0
- package/dist/aria.js.map +1 -0
- package/dist/audio-core.d.ts +260 -0
- package/dist/audio-core.d.ts.map +1 -0
- package/dist/audio-core.js +1440 -0
- package/dist/audio-core.js.map +1 -0
- package/dist/audio-edit.d.ts +100 -0
- package/dist/audio-edit.d.ts.map +1 -0
- package/dist/audio-edit.js +489 -0
- package/dist/audio-edit.js.map +1 -0
- package/dist/audio-mix.d.ts +84 -0
- package/dist/audio-mix.d.ts.map +1 -0
- package/dist/audio-mix.js +393 -0
- package/dist/audio-mix.js.map +1 -0
- package/dist/auth-proof.d.ts +145 -0
- package/dist/auth-proof.d.ts.map +1 -0
- package/dist/auth-proof.js +644 -0
- package/dist/auth-proof.js.map +1 -0
- package/dist/availability-explain.d.ts +3 -0
- package/dist/availability-explain.d.ts.map +1 -0
- package/dist/availability-explain.js +322 -0
- package/dist/availability-explain.js.map +1 -0
- package/dist/availability.d.ts +246 -0
- package/dist/availability.d.ts.map +1 -0
- package/dist/availability.js +615 -0
- package/dist/availability.js.map +1 -0
- package/dist/background.d.ts +116 -0
- package/dist/background.d.ts.map +1 -0
- package/dist/background.js +235 -0
- package/dist/background.js.map +1 -0
- package/dist/boot-tables-flag.d.ts +2 -0
- package/dist/boot-tables-flag.d.ts.map +1 -0
- package/dist/boot-tables-flag.js +16 -0
- package/dist/boot-tables-flag.js.map +1 -0
- package/dist/boot-tables.d.ts +40 -0
- package/dist/boot-tables.d.ts.map +1 -0
- package/dist/boot-tables.js +102 -0
- package/dist/boot-tables.js.map +1 -0
- package/dist/border-edges.d.ts +5 -0
- package/dist/border-edges.d.ts.map +1 -0
- package/dist/border-edges.js +47 -0
- package/dist/border-edges.js.map +1 -0
- package/dist/bus.d.ts +1203 -0
- package/dist/bus.d.ts.map +1 -0
- package/dist/bus.js +2647 -0
- package/dist/bus.js.map +1 -0
- package/dist/calendar-core.d.ts +143 -0
- package/dist/calendar-core.d.ts.map +1 -0
- package/dist/calendar-core.js +372 -0
- package/dist/calendar-core.js.map +1 -0
- package/dist/call-value.d.ts +16 -0
- package/dist/call-value.d.ts.map +1 -0
- package/dist/call-value.js +54 -0
- package/dist/call-value.js.map +1 -0
- package/dist/camera-core.d.ts +222 -0
- package/dist/camera-core.d.ts.map +1 -0
- package/dist/camera-core.js +980 -0
- package/dist/camera-core.js.map +1 -0
- package/dist/canvas-core.d.ts +404 -0
- package/dist/canvas-core.d.ts.map +1 -0
- package/dist/canvas-core.js +2186 -0
- package/dist/canvas-core.js.map +1 -0
- package/dist/capture-core.d.ts +74 -0
- package/dist/capture-core.d.ts.map +1 -0
- package/dist/capture-core.js +158 -0
- package/dist/capture-core.js.map +1 -0
- package/dist/compile/codegen.d.ts +146 -0
- package/dist/compile/codegen.d.ts.map +1 -0
- package/dist/compile/codegen.js +1949 -0
- package/dist/compile/codegen.js.map +1 -0
- package/dist/compile/jstier.d.ts +44 -0
- package/dist/compile/jstier.d.ts.map +1 -0
- package/dist/compile/jstier.js +181 -0
- package/dist/compile/jstier.js.map +1 -0
- package/dist/compile/tier-door.d.ts +41 -0
- package/dist/compile/tier-door.d.ts.map +1 -0
- package/dist/compile/tier-door.js +167 -0
- package/dist/compile/tier-door.js.map +1 -0
- package/dist/compile/tier-realm.d.ts +49 -0
- package/dist/compile/tier-realm.d.ts.map +1 -0
- package/dist/compile/tier-realm.js +368 -0
- package/dist/compile/tier-realm.js.map +1 -0
- package/dist/compile/tier.d.ts +23 -0
- package/dist/compile/tier.d.ts.map +1 -0
- package/dist/compile/tier.js +157 -0
- package/dist/compile/tier.js.map +1 -0
- package/dist/compose-core.d.ts +86 -0
- package/dist/compose-core.d.ts.map +1 -0
- package/dist/compose-core.js +112 -0
- package/dist/compose-core.js.map +1 -0
- package/dist/config-validate.d.ts +31 -0
- package/dist/config-validate.d.ts.map +1 -0
- package/dist/config-validate.js +147 -0
- package/dist/config-validate.js.map +1 -0
- package/dist/config-values.d.ts +106 -0
- package/dist/config-values.d.ts.map +1 -0
- package/dist/config-values.js +340 -0
- package/dist/config-values.js.map +1 -0
- package/dist/contacts-core.d.ts +127 -0
- package/dist/contacts-core.d.ts.map +1 -0
- package/dist/contacts-core.js +211 -0
- package/dist/contacts-core.js.map +1 -0
- package/dist/content-transition.d.ts +58 -0
- package/dist/content-transition.d.ts.map +1 -0
- package/dist/content-transition.js +94 -0
- package/dist/content-transition.js.map +1 -0
- package/dist/controls-core.d.ts +227 -0
- package/dist/controls-core.d.ts.map +1 -0
- package/dist/controls-core.js +652 -0
- package/dist/controls-core.js.map +1 -0
- package/dist/cookies.d.ts +78 -0
- package/dist/cookies.d.ts.map +1 -0
- package/dist/cookies.js +265 -0
- package/dist/cookies.js.map +1 -0
- package/dist/corner-shape-core.d.ts +69 -0
- package/dist/corner-shape-core.d.ts.map +1 -0
- package/dist/corner-shape-core.js +261 -0
- package/dist/corner-shape-core.js.map +1 -0
- package/dist/crypto-core.d.ts +57 -0
- package/dist/crypto-core.d.ts.map +1 -0
- package/dist/crypto-core.js +128 -0
- package/dist/crypto-core.js.map +1 -0
- package/dist/dataviz.d.ts +436 -0
- package/dist/dataviz.d.ts.map +1 -0
- package/dist/dataviz.js +956 -0
- package/dist/dataviz.js.map +1 -0
- package/dist/debug.d.ts +293 -0
- package/dist/debug.d.ts.map +1 -0
- package/dist/debug.js +767 -0
- package/dist/debug.js.map +1 -0
- package/dist/device-ownership.d.ts +50 -0
- package/dist/device-ownership.d.ts.map +1 -0
- package/dist/device-ownership.js +105 -0
- package/dist/device-ownership.js.map +1 -0
- package/dist/effects.d.ts +86 -0
- package/dist/effects.d.ts.map +1 -0
- package/dist/effects.js +98 -0
- package/dist/effects.js.map +1 -0
- package/dist/element.d.ts +108 -0
- package/dist/element.d.ts.map +1 -0
- package/dist/element.js +63 -0
- package/dist/element.js.map +1 -0
- package/dist/file-watch.d.ts +16 -0
- package/dist/file-watch.d.ts.map +1 -0
- package/dist/file-watch.js +49 -0
- package/dist/file-watch.js.map +1 -0
- package/dist/filepaths.d.ts +72 -0
- package/dist/filepaths.d.ts.map +1 -0
- package/dist/filepaths.js +271 -0
- package/dist/filepaths.js.map +1 -0
- package/dist/film.d.ts +264 -0
- package/dist/film.d.ts.map +1 -0
- package/dist/film.js +313 -0
- package/dist/film.js.map +1 -0
- package/dist/fonts.d.ts +66 -0
- package/dist/fonts.d.ts.map +1 -0
- package/dist/fonts.js +135 -0
- package/dist/fonts.js.map +1 -0
- package/dist/forms.d.ts +191 -0
- package/dist/forms.d.ts.map +1 -0
- package/dist/forms.js +663 -0
- package/dist/forms.js.map +1 -0
- package/dist/geo.d.ts +289 -0
- package/dist/geo.d.ts.map +1 -0
- package/dist/geo.js +460 -0
- package/dist/geo.js.map +1 -0
- package/dist/handler-announce.d.ts +46 -0
- package/dist/handler-announce.d.ts.map +1 -0
- package/dist/handler-announce.js +96 -0
- package/dist/handler-announce.js.map +1 -0
- package/dist/handoff.d.ts +71 -0
- package/dist/handoff.d.ts.map +1 -0
- package/dist/handoff.js +250 -0
- package/dist/handoff.js.map +1 -0
- package/dist/identity-durability.d.ts +76 -0
- package/dist/identity-durability.d.ts.map +1 -0
- package/dist/identity-durability.js +150 -0
- package/dist/identity-durability.js.map +1 -0
- package/dist/image-core.d.ts +240 -0
- package/dist/image-core.d.ts.map +1 -0
- package/dist/image-core.js +618 -0
- package/dist/image-core.js.map +1 -0
- package/dist/image-schemes.d.ts +10 -0
- package/dist/image-schemes.d.ts.map +1 -0
- package/dist/image-schemes.js +28 -0
- package/dist/image-schemes.js.map +1 -0
- package/dist/index.d.ts +143 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +299 -0
- package/dist/index.js.map +1 -0
- package/dist/ink-core.d.ts +53 -0
- package/dist/ink-core.d.ts.map +1 -0
- package/dist/ink-core.js +119 -0
- package/dist/ink-core.js.map +1 -0
- package/dist/input.d.ts +148 -0
- package/dist/input.d.ts.map +1 -0
- package/dist/input.js +358 -0
- package/dist/input.js.map +1 -0
- package/dist/integrity.d.ts +63 -0
- package/dist/integrity.d.ts.map +1 -0
- package/dist/integrity.js +150 -0
- package/dist/integrity.js.map +1 -0
- package/dist/intents.d.ts +95 -0
- package/dist/intents.d.ts.map +1 -0
- package/dist/intents.js +282 -0
- package/dist/intents.js.map +1 -0
- package/dist/interpolate-core.d.ts +37 -0
- package/dist/interpolate-core.d.ts.map +1 -0
- package/dist/interpolate-core.js +443 -0
- package/dist/interpolate-core.js.map +1 -0
- package/dist/jse/color.d.ts +12 -0
- package/dist/jse/color.d.ts.map +1 -0
- package/dist/jse/color.js +196 -0
- package/dist/jse/color.js.map +1 -0
- package/dist/jse/core.d.ts +54 -0
- package/dist/jse/core.d.ts.map +1 -0
- package/dist/jse/core.js +1519 -0
- package/dist/jse/core.js.map +1 -0
- package/dist/jse/dispatch.d.ts +28 -0
- package/dist/jse/dispatch.d.ts.map +1 -0
- package/dist/jse/dispatch.js +116 -0
- package/dist/jse/dispatch.js.map +1 -0
- package/dist/jse/highlight-grammar.d.ts +15 -0
- package/dist/jse/highlight-grammar.d.ts.map +1 -0
- package/dist/jse/highlight-grammar.js +161 -0
- package/dist/jse/highlight-grammar.js.map +1 -0
- package/dist/jse/highlight-grammars.generated.d.ts +2 -0
- package/dist/jse/highlight-grammars.generated.d.ts.map +1 -0
- package/dist/jse/highlight-grammars.generated.js +4 -0
- package/dist/jse/highlight-grammars.generated.js.map +1 -0
- package/dist/jse/highlight.d.ts +37 -0
- package/dist/jse/highlight.d.ts.map +1 -0
- package/dist/jse/highlight.js +323 -0
- package/dist/jse/highlight.js.map +1 -0
- package/dist/jse/jse.d.ts +674 -0
- package/dist/jse/jse.d.ts.map +1 -0
- package/dist/jse/jse.js +5841 -0
- package/dist/jse/jse.js.map +1 -0
- package/dist/jse/pathmatch.d.ts +10 -0
- package/dist/jse/pathmatch.d.ts.map +1 -0
- package/dist/jse/pathmatch.js +73 -0
- package/dist/jse/pathmatch.js.map +1 -0
- package/dist/jse/regex.d.ts +33 -0
- package/dist/jse/regex.d.ts.map +1 -0
- package/dist/jse/regex.js +375 -0
- package/dist/jse/regex.js.map +1 -0
- package/dist/jse/stdlib.d.ts +8 -0
- package/dist/jse/stdlib.d.ts.map +1 -0
- package/dist/jse/stdlib.js +765 -0
- package/dist/jse/stdlib.js.map +1 -0
- package/dist/jse/tokens.d.ts +102 -0
- package/dist/jse/tokens.d.ts.map +1 -0
- package/dist/jse/tokens.js +982 -0
- package/dist/jse/tokens.js.map +1 -0
- package/dist/jse/values.d.ts +206 -0
- package/dist/jse/values.d.ts.map +1 -0
- package/dist/jse/values.js +846 -0
- package/dist/jse/values.js.map +1 -0
- package/dist/keyboard.d.ts +196 -0
- package/dist/keyboard.d.ts.map +1 -0
- package/dist/keyboard.js +186 -0
- package/dist/keyboard.js.map +1 -0
- package/dist/label-choices.d.ts +3 -0
- package/dist/label-choices.d.ts.map +1 -0
- package/dist/label-choices.js +168 -0
- package/dist/label-choices.js.map +1 -0
- package/dist/language.d.ts +33 -0
- package/dist/language.d.ts.map +1 -0
- package/dist/language.js +50 -0
- package/dist/language.js.map +1 -0
- package/dist/length-units.d.ts +30 -0
- package/dist/length-units.d.ts.map +1 -0
- package/dist/length-units.js +83 -0
- package/dist/length-units.js.map +1 -0
- package/dist/lightsensor.d.ts +48 -0
- package/dist/lightsensor.d.ts.map +1 -0
- package/dist/lightsensor.js +97 -0
- package/dist/lightsensor.js.map +1 -0
- package/dist/link-refresh.d.ts +27 -0
- package/dist/link-refresh.d.ts.map +1 -0
- package/dist/link-refresh.js +166 -0
- package/dist/link-refresh.js.map +1 -0
- package/dist/link.d.ts +57 -0
- package/dist/link.d.ts.map +1 -0
- package/dist/link.js +333 -0
- package/dist/link.js.map +1 -0
- package/dist/linkpreview.d.ts +114 -0
- package/dist/linkpreview.d.ts.map +1 -0
- package/dist/linkpreview.js +439 -0
- package/dist/linkpreview.js.map +1 -0
- package/dist/list-presence.d.ts +32 -0
- package/dist/list-presence.d.ts.map +1 -0
- package/dist/list-presence.js +48 -0
- package/dist/list-presence.js.map +1 -0
- package/dist/live-stream.d.ts +27 -0
- package/dist/live-stream.d.ts.map +1 -0
- package/dist/live-stream.js +274 -0
- package/dist/live-stream.js.map +1 -0
- package/dist/livelogs.d.ts +134 -0
- package/dist/livelogs.d.ts.map +1 -0
- package/dist/livelogs.js +409 -0
- package/dist/livelogs.js.map +1 -0
- package/dist/logs.d.ts +80 -0
- package/dist/logs.d.ts.map +1 -0
- package/dist/logs.js +206 -0
- package/dist/logs.js.map +1 -0
- package/dist/mcp/apps.d.ts +82 -0
- package/dist/mcp/apps.d.ts.map +1 -0
- package/dist/mcp/apps.js +219 -0
- package/dist/mcp/apps.js.map +1 -0
- package/dist/mcp/entities.d.ts +25 -0
- package/dist/mcp/entities.d.ts.map +1 -0
- package/dist/mcp/entities.js +71 -0
- package/dist/mcp/entities.js.map +1 -0
- package/dist/mcp/result.d.ts +73 -0
- package/dist/mcp/result.d.ts.map +1 -0
- package/dist/mcp/result.js +119 -0
- package/dist/mcp/result.js.map +1 -0
- package/dist/mcp/webmcp.d.ts +162 -0
- package/dist/mcp/webmcp.d.ts.map +1 -0
- package/dist/mcp/webmcp.js +214 -0
- package/dist/mcp/webmcp.js.map +1 -0
- package/dist/mcp.d.ts +5 -0
- package/dist/mcp.d.ts.map +1 -0
- package/dist/mcp.js +14 -0
- package/dist/mcp.js.map +1 -0
- package/dist/media-core.d.ts +191 -0
- package/dist/media-core.d.ts.map +1 -0
- package/dist/media-core.js +446 -0
- package/dist/media-core.js.map +1 -0
- package/dist/media-timeline-core.d.ts +94 -0
- package/dist/media-timeline-core.d.ts.map +1 -0
- package/dist/media-timeline-core.js +620 -0
- package/dist/media-timeline-core.js.map +1 -0
- package/dist/message.d.ts +42 -0
- package/dist/message.d.ts.map +1 -0
- package/dist/message.js +582 -0
- package/dist/message.js.map +1 -0
- package/dist/missing-element.d.ts +29 -0
- package/dist/missing-element.d.ts.map +1 -0
- package/dist/missing-element.js +76 -0
- package/dist/missing-element.js.map +1 -0
- package/dist/motion-core.d.ts +160 -0
- package/dist/motion-core.d.ts.map +1 -0
- package/dist/motion-core.js +752 -0
- package/dist/motion-core.js.map +1 -0
- package/dist/motion-pose.d.ts +65 -0
- package/dist/motion-pose.d.ts.map +1 -0
- package/dist/motion-pose.js +143 -0
- package/dist/motion-pose.js.map +1 -0
- package/dist/motion.d.ts +132 -0
- package/dist/motion.d.ts.map +1 -0
- package/dist/motion.js +260 -0
- package/dist/motion.js.map +1 -0
- package/dist/mount-core.d.ts +203 -0
- package/dist/mount-core.d.ts.map +1 -0
- package/dist/mount-core.js +437 -0
- package/dist/mount-core.js.map +1 -0
- package/dist/net-core.d.ts +110 -0
- package/dist/net-core.d.ts.map +1 -0
- package/dist/net-core.js +225 -0
- package/dist/net-core.js.map +1 -0
- package/dist/notify.d.ts +399 -0
- package/dist/notify.d.ts.map +1 -0
- package/dist/notify.js +964 -0
- package/dist/notify.js.map +1 -0
- package/dist/orientation-binding.d.ts +39 -0
- package/dist/orientation-binding.d.ts.map +1 -0
- package/dist/orientation-binding.js +64 -0
- package/dist/orientation-binding.js.map +1 -0
- package/dist/orientation.d.ts +55 -0
- package/dist/orientation.d.ts.map +1 -0
- package/dist/orientation.js +89 -0
- package/dist/orientation.js.map +1 -0
- package/dist/ota.d.ts +52 -0
- package/dist/ota.d.ts.map +1 -0
- package/dist/ota.js +122 -0
- package/dist/ota.js.map +1 -0
- package/dist/passkeys.d.ts +91 -0
- package/dist/passkeys.d.ts.map +1 -0
- package/dist/passkeys.js +307 -0
- package/dist/passkeys.js.map +1 -0
- package/dist/payment.d.ts +85 -0
- package/dist/payment.d.ts.map +1 -0
- package/dist/payment.js +270 -0
- package/dist/payment.js.map +1 -0
- package/dist/pending-presenter.d.ts +31 -0
- package/dist/pending-presenter.d.ts.map +1 -0
- package/dist/pending-presenter.js +119 -0
- package/dist/pending-presenter.js.map +1 -0
- package/dist/permission-core.d.ts +59 -0
- package/dist/permission-core.d.ts.map +1 -0
- package/dist/permission-core.js +102 -0
- package/dist/permission-core.js.map +1 -0
- package/dist/persist.d.ts +169 -0
- package/dist/persist.d.ts.map +1 -0
- package/dist/persist.js +361 -0
- package/dist/persist.js.map +1 -0
- package/dist/phase-plan.d.ts +114 -0
- package/dist/phase-plan.d.ts.map +1 -0
- package/dist/phase-plan.js +837 -0
- package/dist/phase-plan.js.map +1 -0
- package/dist/playback-core.d.ts +64 -0
- package/dist/playback-core.d.ts.map +1 -0
- package/dist/playback-core.js +176 -0
- package/dist/playback-core.js.map +1 -0
- package/dist/player-sources.d.ts +12 -0
- package/dist/player-sources.d.ts.map +1 -0
- package/dist/player-sources.js +44 -0
- package/dist/player-sources.js.map +1 -0
- package/dist/proxy-denylist.d.ts +11 -0
- package/dist/proxy-denylist.d.ts.map +1 -0
- package/dist/proxy-denylist.js +44 -0
- package/dist/proxy-denylist.js.map +1 -0
- package/dist/public-config.d.ts +20 -0
- package/dist/public-config.d.ts.map +1 -0
- package/dist/public-config.js +109 -0
- package/dist/public-config.js.map +1 -0
- package/dist/qoe-core.d.ts +72 -0
- package/dist/qoe-core.d.ts.map +1 -0
- package/dist/qoe-core.js +113 -0
- package/dist/qoe-core.js.map +1 -0
- package/dist/reactive-request.d.ts +80 -0
- package/dist/reactive-request.d.ts.map +1 -0
- package/dist/reactive-request.js +192 -0
- package/dist/reactive-request.js.map +1 -0
- package/dist/read-cache.d.ts +129 -0
- package/dist/read-cache.d.ts.map +1 -0
- package/dist/read-cache.js +566 -0
- package/dist/read-cache.js.map +1 -0
- package/dist/recorder-core.d.ts +57 -0
- package/dist/recorder-core.d.ts.map +1 -0
- package/dist/recorder-core.js +136 -0
- package/dist/recorder-core.js.map +1 -0
- package/dist/ref.d.ts +41 -0
- package/dist/ref.d.ts.map +1 -0
- package/dist/ref.js +98 -0
- package/dist/ref.js.map +1 -0
- package/dist/refusal.d.ts +82 -0
- package/dist/refusal.d.ts.map +1 -0
- package/dist/refusal.js +218 -0
- package/dist/refusal.js.map +1 -0
- package/dist/region-insets.d.ts +61 -0
- package/dist/region-insets.d.ts.map +1 -0
- package/dist/region-insets.js +67 -0
- package/dist/region-insets.js.map +1 -0
- package/dist/rive-core.d.ts +323 -0
- package/dist/rive-core.d.ts.map +1 -0
- package/dist/rive-core.js +677 -0
- package/dist/rive-core.js.map +1 -0
- package/dist/runner.d.ts +595 -0
- package/dist/runner.d.ts.map +1 -0
- package/dist/runner.js +4094 -0
- package/dist/runner.js.map +1 -0
- package/dist/scene/a11y.d.ts +11 -0
- package/dist/scene/a11y.d.ts.map +1 -0
- package/dist/scene/a11y.js +67 -0
- package/dist/scene/a11y.js.map +1 -0
- package/dist/scene/anim.d.ts +149 -0
- package/dist/scene/anim.d.ts.map +1 -0
- package/dist/scene/anim.js +396 -0
- package/dist/scene/anim.js.map +1 -0
- package/dist/scene/bind.d.ts +33 -0
- package/dist/scene/bind.d.ts.map +1 -0
- package/dist/scene/bind.js +66 -0
- package/dist/scene/bind.js.map +1 -0
- package/dist/scene/collide.d.ts +56 -0
- package/dist/scene/collide.d.ts.map +1 -0
- package/dist/scene/collide.js +146 -0
- package/dist/scene/collide.js.map +1 -0
- package/dist/scene/frame.d.ts +22 -0
- package/dist/scene/frame.d.ts.map +1 -0
- package/dist/scene/frame.js +57 -0
- package/dist/scene/frame.js.map +1 -0
- package/dist/scene/gltf.d.ts +79 -0
- package/dist/scene/gltf.d.ts.map +1 -0
- package/dist/scene/gltf.js +409 -0
- package/dist/scene/gltf.js.map +1 -0
- package/dist/scene/ir.d.ts +293 -0
- package/dist/scene/ir.d.ts.map +1 -0
- package/dist/scene/ir.js +692 -0
- package/dist/scene/ir.js.map +1 -0
- package/dist/scene/math.d.ts +50 -0
- package/dist/scene/math.d.ts.map +1 -0
- package/dist/scene/math.js +180 -0
- package/dist/scene/math.js.map +1 -0
- package/dist/scene/orbit.d.ts +19 -0
- package/dist/scene/orbit.d.ts.map +1 -0
- package/dist/scene/orbit.js +60 -0
- package/dist/scene/orbit.js.map +1 -0
- package/dist/scene/physics.d.ts +228 -0
- package/dist/scene/physics.d.ts.map +1 -0
- package/dist/scene/physics.js +1500 -0
- package/dist/scene/physics.js.map +1 -0
- package/dist/scene/registry.d.ts +85 -0
- package/dist/scene/registry.d.ts.map +1 -0
- package/dist/scene/registry.js +75 -0
- package/dist/scene/registry.js.map +1 -0
- package/dist/scene/skin.d.ts +82 -0
- package/dist/scene/skin.d.ts.map +1 -0
- package/dist/scene/skin.js +351 -0
- package/dist/scene/skin.js.map +1 -0
- package/dist/scene/sprite.d.ts +36 -0
- package/dist/scene/sprite.d.ts.map +1 -0
- package/dist/scene/sprite.js +107 -0
- package/dist/scene/sprite.js.map +1 -0
- package/dist/scene/viewer.d.ts +96 -0
- package/dist/scene/viewer.d.ts.map +1 -0
- package/dist/scene/viewer.js +235 -0
- package/dist/scene/viewer.js.map +1 -0
- package/dist/scoped-slots.d.ts +9 -0
- package/dist/scoped-slots.d.ts.map +1 -0
- package/dist/scoped-slots.js +42 -0
- package/dist/scoped-slots.js.map +1 -0
- package/dist/screen.d.ts +109 -0
- package/dist/screen.d.ts.map +1 -0
- package/dist/screen.js +309 -0
- package/dist/screen.js.map +1 -0
- package/dist/scroll.d.ts +525 -0
- package/dist/scroll.d.ts.map +1 -0
- package/dist/scroll.js +1226 -0
- package/dist/scroll.js.map +1 -0
- package/dist/settings-plane.d.ts +58 -0
- package/dist/settings-plane.d.ts.map +1 -0
- package/dist/settings-plane.js +86 -0
- package/dist/settings-plane.js.map +1 -0
- package/dist/share-inbox.d.ts +56 -0
- package/dist/share-inbox.d.ts.map +1 -0
- package/dist/share-inbox.js +114 -0
- package/dist/share-inbox.js.map +1 -0
- package/dist/shared-transition.d.ts +152 -0
- package/dist/shared-transition.d.ts.map +1 -0
- package/dist/shared-transition.js +257 -0
- package/dist/shared-transition.js.map +1 -0
- package/dist/sheet-content-padding.d.ts +24 -0
- package/dist/sheet-content-padding.d.ts.map +1 -0
- package/dist/sheet-content-padding.js +32 -0
- package/dist/sheet-content-padding.js.map +1 -0
- package/dist/shot-devices.d.ts +36 -0
- package/dist/shot-devices.d.ts.map +1 -0
- package/dist/shot-devices.js +90 -0
- package/dist/shot-devices.js.map +1 -0
- package/dist/shot-guards.d.ts +100 -0
- package/dist/shot-guards.d.ts.map +1 -0
- package/dist/shot-guards.js +260 -0
- package/dist/shot-guards.js.map +1 -0
- package/dist/shot-scope.d.ts +140 -0
- package/dist/shot-scope.d.ts.map +1 -0
- package/dist/shot-scope.js +302 -0
- package/dist/shot-scope.js.map +1 -0
- package/dist/slot-partition.d.ts +9 -0
- package/dist/slot-partition.d.ts.map +1 -0
- package/dist/slot-partition.js +38 -0
- package/dist/slot-partition.js.map +1 -0
- package/dist/snackbar.d.ts +165 -0
- package/dist/snackbar.d.ts.map +1 -0
- package/dist/snackbar.js +220 -0
- package/dist/snackbar.js.map +1 -0
- package/dist/socket.d.ts +96 -0
- package/dist/socket.d.ts.map +1 -0
- package/dist/socket.js +370 -0
- package/dist/socket.js.map +1 -0
- package/dist/spotlight.d.ts +77 -0
- package/dist/spotlight.d.ts.map +1 -0
- package/dist/spotlight.js +174 -0
- package/dist/spotlight.js.map +1 -0
- package/dist/state-primitive.d.ts +37 -0
- package/dist/state-primitive.d.ts.map +1 -0
- package/dist/state-primitive.js +91 -0
- package/dist/state-primitive.js.map +1 -0
- package/dist/store-query.d.ts +25 -0
- package/dist/store-query.d.ts.map +1 -0
- package/dist/store-query.js +88 -0
- package/dist/store-query.js.map +1 -0
- package/dist/store-value.d.ts +48 -0
- package/dist/store-value.d.ts.map +1 -0
- package/dist/store-value.js +264 -0
- package/dist/store-value.js.map +1 -0
- package/dist/store-versioning.d.ts +70 -0
- package/dist/store-versioning.d.ts.map +1 -0
- package/dist/store-versioning.js +188 -0
- package/dist/store-versioning.js.map +1 -0
- package/dist/store.d.ts +282 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +1144 -0
- package/dist/store.js.map +1 -0
- package/dist/strings.d.ts +141 -0
- package/dist/strings.d.ts.map +1 -0
- package/dist/strings.js +581 -0
- package/dist/strings.js.map +1 -0
- package/dist/telemetry.d.ts +95 -0
- package/dist/telemetry.d.ts.map +1 -0
- package/dist/telemetry.js +255 -0
- package/dist/telemetry.js.map +1 -0
- package/dist/transform-core.d.ts +228 -0
- package/dist/transform-core.d.ts.map +1 -0
- package/dist/transform-core.js +921 -0
- package/dist/transform-core.js.map +1 -0
- package/dist/transition-core.d.ts +58 -0
- package/dist/transition-core.d.ts.map +1 -0
- package/dist/transition-core.js +352 -0
- package/dist/transition-core.js.map +1 -0
- package/dist/trim-trailing.d.ts +3 -0
- package/dist/trim-trailing.d.ts.map +1 -0
- package/dist/trim-trailing.js +14 -0
- package/dist/trim-trailing.js.map +1 -0
- package/dist/upload.d.ts +51 -0
- package/dist/upload.d.ts.map +1 -0
- package/dist/upload.js +68 -0
- package/dist/upload.js.map +1 -0
- package/dist/vendor-face.d.ts +44 -0
- package/dist/vendor-face.d.ts.map +1 -0
- package/dist/vendor-face.js +80 -0
- package/dist/vendor-face.js.map +1 -0
- package/dist/vendor-session.d.ts +166 -0
- package/dist/vendor-session.d.ts.map +1 -0
- package/dist/vendor-session.js +423 -0
- package/dist/vendor-session.js.map +1 -0
- package/dist/vendor-surface.d.ts +290 -0
- package/dist/vendor-surface.d.ts.map +1 -0
- package/dist/vendor-surface.js +439 -0
- package/dist/vendor-surface.js.map +1 -0
- package/dist/version-rules.generated.d.ts +17 -0
- package/dist/version-rules.generated.d.ts.map +1 -0
- package/dist/version-rules.generated.js +99 -0
- package/dist/version-rules.generated.js.map +1 -0
- package/dist/view-transition-core.d.ts +99 -0
- package/dist/view-transition-core.d.ts.map +1 -0
- package/dist/view-transition-core.js +127 -0
- package/dist/view-transition-core.js.map +1 -0
- package/dist/view-transition-door.d.ts +26 -0
- package/dist/view-transition-door.d.ts.map +1 -0
- package/dist/view-transition-door.js +88 -0
- package/dist/view-transition-door.js.map +1 -0
- package/dist/window-identity.d.ts +3 -0
- package/dist/window-identity.d.ts.map +1 -0
- package/dist/window-identity.js +27 -0
- package/dist/window-identity.js.map +1 -0
- package/package.json +139 -4
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** A language version identifier: a member of `LANGUAGE_VERSIONS` and never a computed string. */
|
|
2
|
+
export type LanguageVersion = string;
|
|
3
|
+
export type LanguageRow = {
|
|
4
|
+
version: LanguageVersion;
|
|
5
|
+
/** what the language is, in the words a person reading a refusal needs */
|
|
6
|
+
summary: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* The language versions this runtime speaks, the default first. A version is a member of this list and never a
|
|
10
|
+
* computed string; the list grows only with a decision record (ADR 0010, ADR 0025 D2a).
|
|
11
|
+
*/
|
|
12
|
+
export declare const LANGUAGE_VERSIONS: readonly LanguageRow[];
|
|
13
|
+
/** The language version that introduces element-event dispatch (ADR 0025 D2a). */
|
|
14
|
+
export declare const ELEMENT_DISPATCH_LANGUAGE: LanguageVersion;
|
|
15
|
+
/** Whether a document of this language version dispatches element events through the capture and bubble phases. */
|
|
16
|
+
export declare function dispatchesElementEvents(version: LanguageVersion | undefined): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* The version a document that declares none is read as: an unversioned document is a version 1 document, so
|
|
19
|
+
* declaring a later version is always an explicit opt-in.
|
|
20
|
+
*/
|
|
21
|
+
export declare function currentLanguage(): LanguageVersion;
|
|
22
|
+
/** Whether this runtime speaks a version. */
|
|
23
|
+
export declare function knowsLanguage(version: string): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* THE REFUSAL, one sentence, naming the word and every version this runtime does know.
|
|
26
|
+
*
|
|
27
|
+
* A refusal that said only "unknown language version" would tell the person to guess; naming
|
|
28
|
+
* the versions the runtime speaks says what to write instead (or to drop the attribute, since an
|
|
29
|
+
* unversioned document is a version 1 document). The sentence has the same words on all three lanes; the
|
|
30
|
+
* list in it is each lane's own (see THIS LIST IS THE WEB LANE'S above).
|
|
31
|
+
*/
|
|
32
|
+
export declare function unknownLanguageRefusal(version: string): string;
|
|
33
|
+
//# sourceMappingURL=language.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"language.d.ts","sourceRoot":"","sources":["../src/language.ts"],"names":[],"mappings":"AA4BA,kGAAkG;AAClG,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC;AAErC,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,EAAE,eAAe,CAAC;IACzB,0EAA0E;IAC1E,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,WAAW,EAenD,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,yBAAyB,EAAE,eAAqB,CAAC;AAE9D,mHAAmH;AACnH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,eAAe,GAAG,SAAS,GAAG,OAAO,CAErF;AAED;;;GAGG;AACH,wBAAgB,eAAe,IAAI,eAAe,CAEjD;AAED,6CAA6C;AAC7C,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAG9D"}
|
package/dist/language.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The language versions this runtime speaks, the default first. A version is a member of this list and never a
|
|
3
|
+
* computed string; the list grows only with a decision record (ADR 0010, ADR 0025 D2a).
|
|
4
|
+
*/
|
|
5
|
+
export const LANGUAGE_VERSIONS = [
|
|
6
|
+
{
|
|
7
|
+
version: "1",
|
|
8
|
+
summary: "the DSX language: every reach is explicit (a bare identifier in a JSE region is a "
|
|
9
|
+
+ "block local and nothing else; every other reach spells its plane, `dsx.variable.count`) "
|
|
10
|
+
+ "and one input is one attribute (an `<action>` on a `server` or `cli` document declares "
|
|
11
|
+
+ "each input as its own `input:<name>` attribute).",
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
version: "3",
|
|
15
|
+
summary: "version 1 with element-event dispatch (ADR 0025 D2): an element event runs the DOM's three "
|
|
16
|
+
+ "phases, capture, at target and bubble, over the element tree of one component instance, so an outer "
|
|
17
|
+
+ "`on:tap` also runs for a tap on a nested tappable unless the inner listener declares "
|
|
18
|
+
+ "`on:tap.stop-propagation`.",
|
|
19
|
+
},
|
|
20
|
+
];
|
|
21
|
+
/** The language version that introduces element-event dispatch (ADR 0025 D2a). */
|
|
22
|
+
export const ELEMENT_DISPATCH_LANGUAGE = "3";
|
|
23
|
+
/** Whether a document of this language version dispatches element events through the capture and bubble phases. */
|
|
24
|
+
export function dispatchesElementEvents(version) {
|
|
25
|
+
return version === ELEMENT_DISPATCH_LANGUAGE;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The version a document that declares none is read as: an unversioned document is a version 1 document, so
|
|
29
|
+
* declaring a later version is always an explicit opt-in.
|
|
30
|
+
*/
|
|
31
|
+
export function currentLanguage() {
|
|
32
|
+
return LANGUAGE_VERSIONS[0].version;
|
|
33
|
+
}
|
|
34
|
+
/** Whether this runtime speaks a version. */
|
|
35
|
+
export function knowsLanguage(version) {
|
|
36
|
+
return LANGUAGE_VERSIONS.some((row) => row.version === version);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* THE REFUSAL, one sentence, naming the word and every version this runtime does know.
|
|
40
|
+
*
|
|
41
|
+
* A refusal that said only "unknown language version" would tell the person to guess; naming
|
|
42
|
+
* the versions the runtime speaks says what to write instead (or to drop the attribute, since an
|
|
43
|
+
* unversioned document is a version 1 document). The sentence has the same words on all three lanes; the
|
|
44
|
+
* list in it is each lane's own (see THIS LIST IS THE WEB LANE'S above).
|
|
45
|
+
*/
|
|
46
|
+
export function unknownLanguageRefusal(version) {
|
|
47
|
+
return `this runtime knows no language version ${JSON.stringify(version)} `
|
|
48
|
+
+ `(it knows ${LANGUAGE_VERSIONS.map((row) => row.version).join(", ")})`;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=language.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"language.js","sourceRoot":"","sources":["../src/language.ts"],"names":[],"mappings":"AAqCA;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAA2B;IACvD;QACE,OAAO,EAAE,GAAG;QACZ,OAAO,EAAE,oFAAoF;cACzF,0FAA0F;cAC1F,yFAAyF;cACzF,kDAAkD;KACvD;IACD;QACE,OAAO,EAAE,GAAG;QACZ,OAAO,EAAE,6FAA6F;cAClG,sGAAsG;cACtG,uFAAuF;cACvF,4BAA4B;KACjC;CACF,CAAC;AAEF,kFAAkF;AAClF,MAAM,CAAC,MAAM,yBAAyB,GAAoB,GAAG,CAAC;AAE9D,mHAAmH;AACnH,MAAM,UAAU,uBAAuB,CAAC,OAAoC;IAC1E,OAAO,OAAO,KAAK,yBAAyB,CAAC;AAC/C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe;IAC7B,OAAO,iBAAiB,CAAC,CAAC,CAAE,CAAC,OAAO,CAAC;AACvC,CAAC;AAED,6CAA6C;AAC7C,MAAM,UAAU,aAAa,CAAC,OAAe;IAC3C,OAAO,iBAAiB,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,KAAK,OAAO,CAAC,CAAC;AAClE,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB,CAAC,OAAe;IACpD,OAAO,0CAA0C,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG;UACvE,aAAa,iBAAiB,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;AAC7E,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** The root the rem/px relationship is defined against (dsx-css-properties.json conventions). */
|
|
2
|
+
export declare const ROOT_FONT_SIZE_PX = 16;
|
|
3
|
+
/** Units a length control may be switched between. Percent and degree are deliberately absent:
|
|
4
|
+
* a percent is of its container and a degree is an angle, so neither has a rem equivalent and
|
|
5
|
+
* offering one would be a control that lies about what it does. */
|
|
6
|
+
export declare const SWITCHABLE_LENGTH_UNITS: readonly ["rem", "px"];
|
|
7
|
+
export type LengthUnit = (typeof SWITCHABLE_LENGTH_UNITS)[number];
|
|
8
|
+
export type ParsedLength = {
|
|
9
|
+
value: number;
|
|
10
|
+
unit: string;
|
|
11
|
+
} | null;
|
|
12
|
+
/** Split an authored length into its number and unit. Returns null for anything that is not a
|
|
13
|
+
* plain length - `calc(...)`, a token reference, an empty well - because those must pass
|
|
14
|
+
* through a unit switch untouched rather than being mangled into a number. */
|
|
15
|
+
export declare function parseLength(text: unknown): ParsedLength;
|
|
16
|
+
/**
|
|
17
|
+
* Convert an authored length to `unit`, preserving the rendered size.
|
|
18
|
+
*
|
|
19
|
+
* A value that is already in the target unit is returned unchanged, so switching twice is
|
|
20
|
+
* lossless. A value this module cannot parse is returned VERBATIM - a unit switch is never a
|
|
21
|
+
* reason to destroy an expression the author wrote deliberately.
|
|
22
|
+
*/
|
|
23
|
+
export declare function convertLength(text: unknown, unit: LengthUnit): string;
|
|
24
|
+
/** Which unit an authored length is written in, for a control that shows the active one.
|
|
25
|
+
* A bare number is px by CSS's own reading, but the editor WRITES rem, so an unparsed or
|
|
26
|
+
* empty value reports the default rather than pretending to know. */
|
|
27
|
+
export declare function lengthUnitOf(text: unknown, fallback?: LengthUnit): LengthUnit;
|
|
28
|
+
/** The unit the editor appends when an author types a bare number. */
|
|
29
|
+
export declare const DEFAULT_LENGTH_UNIT: LengthUnit;
|
|
30
|
+
//# sourceMappingURL=length-units.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"length-units.d.ts","sourceRoot":"","sources":["../src/length-units.ts"],"names":[],"mappings":"AAkBA,iGAAiG;AACjG,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC;;oEAEoE;AACpE,eAAO,MAAM,uBAAuB,wBAAyB,CAAC;AAC9D,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE,MAAM,MAAM,YAAY,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC;AAElE;;+EAE+E;AAC/E,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,YAAY,CAQvD;AAQD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,GAAG,MAAM,CAYrE;AAED;;sEAEsE;AACtE,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,GAAE,UAAkB,GAAG,UAAU,CAMpF;AAED,sEAAsE;AACtE,eAAO,MAAM,mBAAmB,EAAE,UAAkB,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
//
|
|
2
|
+
// length-units.ts - THE UNIT PLANE for authored lengths.
|
|
3
|
+
//
|
|
4
|
+
// An editor that offers rem and px has to answer one question honestly: what happens to the
|
|
5
|
+
// NUMBER when the unit changes. Two answers are possible and only one is defensible.
|
|
6
|
+
//
|
|
7
|
+
// CONVERT 16px becomes 1rem. The rendered size does not move; the author changed how
|
|
8
|
+
// they want to SAY it. This is what a unit switch means everywhere else in
|
|
9
|
+
// design tooling, and it is what this module does.
|
|
10
|
+
// REINTERPRET 16px becomes 16rem. The author asked to see the value in another unit and
|
|
11
|
+
// the headline became sixteen times larger.
|
|
12
|
+
//
|
|
13
|
+
// REM IS THE DEFAULT, and that is a framework position rather than a preference: DSX-CSS
|
|
14
|
+
// defines rem as "root = 16 x Dynamic Type / fontScale", so a length authored in rem is
|
|
15
|
+
// accessibility-responsive by construction and the same length in px is frozen. A tool whose
|
|
16
|
+
// default silently freezes type is a tool that teaches the wrong habit at scale.
|
|
17
|
+
//
|
|
18
|
+
/** The root the rem/px relationship is defined against (dsx-css-properties.json conventions). */
|
|
19
|
+
export const ROOT_FONT_SIZE_PX = 16;
|
|
20
|
+
/** Units a length control may be switched between. Percent and degree are deliberately absent:
|
|
21
|
+
* a percent is of its container and a degree is an angle, so neither has a rem equivalent and
|
|
22
|
+
* offering one would be a control that lies about what it does. */
|
|
23
|
+
export const SWITCHABLE_LENGTH_UNITS = ["rem", "px"];
|
|
24
|
+
/** Split an authored length into its number and unit. Returns null for anything that is not a
|
|
25
|
+
* plain length - `calc(...)`, a token reference, an empty well - because those must pass
|
|
26
|
+
* through a unit switch untouched rather than being mangled into a number. */
|
|
27
|
+
export function parseLength(text) {
|
|
28
|
+
if (typeof text === "number" && Number.isFinite(text))
|
|
29
|
+
return { value: text, unit: "" };
|
|
30
|
+
if (typeof text !== "string")
|
|
31
|
+
return null;
|
|
32
|
+
const match = /^\s*(-?(?:\d+(?:\.\d+)?|\.\d+))\s*(?:([a-z%]+)\s*)?$/i.exec(text);
|
|
33
|
+
if (match === null)
|
|
34
|
+
return null;
|
|
35
|
+
const value = Number(match[1]);
|
|
36
|
+
if (!Number.isFinite(value))
|
|
37
|
+
return null;
|
|
38
|
+
return { value, unit: (match[2] ?? "").toLowerCase() };
|
|
39
|
+
}
|
|
40
|
+
/** Round to a readable precision: rem values carry decimals (0.9375rem is 15px) and a value
|
|
41
|
+
* printed to full float precision is unusable in a text well. */
|
|
42
|
+
function tidy(value) {
|
|
43
|
+
return Math.round(value * 10000) / 10000;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Convert an authored length to `unit`, preserving the rendered size.
|
|
47
|
+
*
|
|
48
|
+
* A value that is already in the target unit is returned unchanged, so switching twice is
|
|
49
|
+
* lossless. A value this module cannot parse is returned VERBATIM - a unit switch is never a
|
|
50
|
+
* reason to destroy an expression the author wrote deliberately.
|
|
51
|
+
*/
|
|
52
|
+
export function convertLength(text, unit) {
|
|
53
|
+
const parsed = parseLength(text);
|
|
54
|
+
if (parsed === null)
|
|
55
|
+
return typeof text === "string" ? text : "";
|
|
56
|
+
const from = parsed.unit === "" ? "px" : parsed.unit;
|
|
57
|
+
if (from === unit)
|
|
58
|
+
return `${tidy(parsed.value)}${unit}`;
|
|
59
|
+
// `em` is the element's own font size rather than the root, so it is not convertible without
|
|
60
|
+
// knowing that font size: treat it as its own unit and only relabel when asked for rem, which
|
|
61
|
+
// is the same number against the root the editor assumes.
|
|
62
|
+
if (from !== "px" && from !== "rem" && from !== "em")
|
|
63
|
+
return `${tidy(parsed.value)}${from}`;
|
|
64
|
+
const px = from === "px" ? parsed.value : parsed.value * ROOT_FONT_SIZE_PX;
|
|
65
|
+
const out = unit === "px" ? px : px / ROOT_FONT_SIZE_PX;
|
|
66
|
+
return `${tidy(out)}${unit}`;
|
|
67
|
+
}
|
|
68
|
+
/** Which unit an authored length is written in, for a control that shows the active one.
|
|
69
|
+
* A bare number is px by CSS's own reading, but the editor WRITES rem, so an unparsed or
|
|
70
|
+
* empty value reports the default rather than pretending to know. */
|
|
71
|
+
export function lengthUnitOf(text, fallback = "rem") {
|
|
72
|
+
const parsed = parseLength(text);
|
|
73
|
+
if (parsed === null || parsed.unit === "")
|
|
74
|
+
return fallback;
|
|
75
|
+
if (parsed.unit === "px")
|
|
76
|
+
return "px";
|
|
77
|
+
if (parsed.unit === "rem" || parsed.unit === "em")
|
|
78
|
+
return "rem";
|
|
79
|
+
return fallback;
|
|
80
|
+
}
|
|
81
|
+
/** The unit the editor appends when an author types a bare number. */
|
|
82
|
+
export const DEFAULT_LENGTH_UNIT = "rem";
|
|
83
|
+
//# sourceMappingURL=length-units.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"length-units.js","sourceRoot":"","sources":["../src/length-units.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0DAA0D;AAC1D,EAAE;AACF,6FAA6F;AAC7F,sFAAsF;AACtF,EAAE;AACF,8FAA8F;AAC9F,4FAA4F;AAC5F,oEAAoE;AACpE,6FAA6F;AAC7F,6DAA6D;AAC7D,EAAE;AACF,0FAA0F;AAC1F,yFAAyF;AACzF,8FAA8F;AAC9F,kFAAkF;AAClF,EAAE;AAEF,iGAAiG;AACjG,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAEpC;;oEAEoE;AACpE,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,KAAK,EAAE,IAAI,CAAU,CAAC;AAK9D;;+EAE+E;AAC/E,MAAM,UAAU,WAAW,CAAC,IAAa;IACvC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;QAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;IACxF,IAAI,OAAO,IAAI,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC1C,MAAM,KAAK,GAAG,uDAAuD,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjF,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IA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,MAAM,GAAG,GAAG,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,iBAAiB,CAAC;IACxD,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC;AAC/B,CAAC;AAED;;sEAEsE;AACtE,MAAM,UAAU,YAAY,CAAC,IAAa,EAAE,WAAuB,KAAK;IACtE,MAAM,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;IACjC,IAAI,MAAM,KAAK,IAAI,IAAI,MAAM,CAAC,IAAI,KAAK,EAAE;QAAE,OAAO,QAAQ,CAAC;IAC3D,IAAI,MAAM,CAAC,IAAI,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IACtC,IAAI,MAAM,CAAC,IAAI,KAAK,KAAK,IAAI,MAAM,CAAC,IAAI,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAChE,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,sEAAsE;AACtE,MAAM,CAAC,MAAM,mBAAmB,GAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/** Faster than this and the values are hardware jitter, not light. */
|
|
2
|
+
export declare const LIGHT_MIN_INTERVAL_MS = 50;
|
|
3
|
+
export declare const LIGHT_DEFAULT_INTERVAL_MS = 1000;
|
|
4
|
+
/** Slower than a minute and the reading is stale enough to be misleading. */
|
|
5
|
+
export declare const LIGHT_MAX_INTERVAL_MS = 60000;
|
|
6
|
+
/** Below this absolute change, the difference is sensor noise on every device tested. */
|
|
7
|
+
export declare const LIGHT_MIN_ABSOLUTE_CHANGE = 1;
|
|
8
|
+
/** Above the noise floor, a reading must move by a tenth to be worth waking the bridge for. */
|
|
9
|
+
export declare const LIGHT_MIN_RELATIVE_CHANGE = 0.1;
|
|
10
|
+
/**
|
|
11
|
+
* The categories, with the illuminance references they come from. These are the numbers an app
|
|
12
|
+
* actually branches on, so they are pinned rather than left to each caller's guess.
|
|
13
|
+
*
|
|
14
|
+
* dark < 10 a room with the lights off; a phone screen is the brightest thing in it
|
|
15
|
+
* dim < 50 candlelight, a corridor at night, a cinema
|
|
16
|
+
* indoor < 1000 ordinary room and office lighting
|
|
17
|
+
* overcast < 10000 daylight through a window, or an overcast sky
|
|
18
|
+
* daylight < 30000 full daylight in shade
|
|
19
|
+
* sunlight >= 30000 direct sun, where a screen needs its brightest setting to be readable
|
|
20
|
+
*/
|
|
21
|
+
export declare const LIGHT_CATEGORIES: readonly string[];
|
|
22
|
+
export declare const LIGHT_THRESHOLDS: readonly number[];
|
|
23
|
+
/** Which category a lux reading falls in. A negative or non-finite reading is `dark`: a sensor
|
|
24
|
+
* that reports nonsense is reporting no light, and inventing a separate "unknown" category
|
|
25
|
+
* would make every caller handle a case the hardware cannot distinguish anyway. */
|
|
26
|
+
export declare function luxCategory(lux: unknown): string;
|
|
27
|
+
/** Clamp an author-supplied interval into the band the sensor is honest at. Clamped rather than
|
|
28
|
+
* refused: a caller asking for 1 ms wants "as fast as you can", not an error. */
|
|
29
|
+
export declare function clampLightInterval(raw: unknown): number;
|
|
30
|
+
/**
|
|
31
|
+
* Should this reading be delivered?
|
|
32
|
+
*
|
|
33
|
+
* Yes when there is nothing to compare against, when the CATEGORY changed (which is what an app
|
|
34
|
+
* branches on, so it must never be filtered away), or when the value moved by more than the
|
|
35
|
+
* noise floor AND by more than a tenth of where it was. The relative test is what makes the
|
|
36
|
+
* filter work across four orders of magnitude: two lux of movement is everything in a dark room
|
|
37
|
+
* and nothing in direct sun.
|
|
38
|
+
*/
|
|
39
|
+
export declare function shouldEmitLux(previous: number | null | undefined, next: unknown): boolean;
|
|
40
|
+
export interface LightSample {
|
|
41
|
+
readonly lux: number;
|
|
42
|
+
readonly category: string;
|
|
43
|
+
}
|
|
44
|
+
/** The shape every renderer emits, so markup reads one thing. A negative hardware reading is
|
|
45
|
+
* clamped to zero rather than passed through: there is no such thing as negative light, and a
|
|
46
|
+
* caller charting the value should not have to guard against it. */
|
|
47
|
+
export declare function lightSample(lux: unknown): LightSample;
|
|
48
|
+
//# sourceMappingURL=lightsensor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lightsensor.d.ts","sourceRoot":"","sources":["../src/lightsensor.ts"],"names":[],"mappings":"AAkBA,sEAAsE;AACtE,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,eAAO,MAAM,yBAAyB,OAAO,CAAC;AAC9C,6EAA6E;AAC7E,eAAO,MAAM,qBAAqB,QAAQ,CAAC;AAE3C,yFAAyF;AACzF,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAC3C,+FAA+F;AAC/F,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAE7C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,MAAM,EAE7C,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,SAAS,MAAM,EAAiC,CAAC;AAEhF;;oFAEoF;AACpF,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAOhD;AAED;kFACkF;AAClF,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAMvD;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAQzF;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED;;qEAEqE;AACrE,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,WAAW,CAIrD"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
//
|
|
2
|
+
// lightsensor.ts — the SHARED PURE CORE behind Core/LightSensor (F17.9): what an ambient-light
|
|
3
|
+
// reading MEANS, decided once and run identically by all three renderers.
|
|
4
|
+
//
|
|
5
|
+
// WHY A SENSOR NEEDS A CORE AT ALL. A raw lux number is almost never what an app wants: it wants
|
|
6
|
+
// "is this a dark room?" so it can dim a reader, or "is this direct sun?" so it can raise the
|
|
7
|
+
// screen. Left to each caller, that threshold is invented three times per app and differs across
|
|
8
|
+
// platforms, so the BUCKETS are pinned here with real illuminance references.
|
|
9
|
+
//
|
|
10
|
+
// THE HYSTERESIS IS THE OTHER HALF, and it is not an optimisation. Android's TYPE_LIGHT fires
|
|
11
|
+
// on every hardware sample and the values jitter by several lux with no change in the room; an
|
|
12
|
+
// unfiltered stream wakes the JS bridge dozens of times a second to say nothing. The emit rule
|
|
13
|
+
// is therefore part of the contract rather than a per-facet detail: same stream shape, same
|
|
14
|
+
// battery cost, same test.
|
|
15
|
+
//
|
|
16
|
+
// Pinned by OpenSource/Conformance/light/ambient.json.
|
|
17
|
+
//
|
|
18
|
+
/** Faster than this and the values are hardware jitter, not light. */
|
|
19
|
+
export const LIGHT_MIN_INTERVAL_MS = 50;
|
|
20
|
+
export const LIGHT_DEFAULT_INTERVAL_MS = 1000;
|
|
21
|
+
/** Slower than a minute and the reading is stale enough to be misleading. */
|
|
22
|
+
export const LIGHT_MAX_INTERVAL_MS = 60000;
|
|
23
|
+
/** Below this absolute change, the difference is sensor noise on every device tested. */
|
|
24
|
+
export const LIGHT_MIN_ABSOLUTE_CHANGE = 1;
|
|
25
|
+
/** Above the noise floor, a reading must move by a tenth to be worth waking the bridge for. */
|
|
26
|
+
export const LIGHT_MIN_RELATIVE_CHANGE = 0.1;
|
|
27
|
+
/**
|
|
28
|
+
* The categories, with the illuminance references they come from. These are the numbers an app
|
|
29
|
+
* actually branches on, so they are pinned rather than left to each caller's guess.
|
|
30
|
+
*
|
|
31
|
+
* dark < 10 a room with the lights off; a phone screen is the brightest thing in it
|
|
32
|
+
* dim < 50 candlelight, a corridor at night, a cinema
|
|
33
|
+
* indoor < 1000 ordinary room and office lighting
|
|
34
|
+
* overcast < 10000 daylight through a window, or an overcast sky
|
|
35
|
+
* daylight < 30000 full daylight in shade
|
|
36
|
+
* sunlight >= 30000 direct sun, where a screen needs its brightest setting to be readable
|
|
37
|
+
*/
|
|
38
|
+
export const LIGHT_CATEGORIES = [
|
|
39
|
+
"dark", "dim", "indoor", "overcast", "daylight", "sunlight",
|
|
40
|
+
];
|
|
41
|
+
export const LIGHT_THRESHOLDS = [10, 50, 1000, 10000, 30000];
|
|
42
|
+
/** Which category a lux reading falls in. A negative or non-finite reading is `dark`: a sensor
|
|
43
|
+
* that reports nonsense is reporting no light, and inventing a separate "unknown" category
|
|
44
|
+
* would make every caller handle a case the hardware cannot distinguish anyway. */
|
|
45
|
+
export function luxCategory(lux) {
|
|
46
|
+
const n = typeof lux === "number" ? lux : Number(lux);
|
|
47
|
+
if (!Number.isFinite(n) || n < 0)
|
|
48
|
+
return LIGHT_CATEGORIES[0];
|
|
49
|
+
for (let i = 0; i < LIGHT_THRESHOLDS.length; i += 1) {
|
|
50
|
+
if (n < LIGHT_THRESHOLDS[i])
|
|
51
|
+
return LIGHT_CATEGORIES[i];
|
|
52
|
+
}
|
|
53
|
+
return LIGHT_CATEGORIES[LIGHT_CATEGORIES.length - 1];
|
|
54
|
+
}
|
|
55
|
+
/** Clamp an author-supplied interval into the band the sensor is honest at. Clamped rather than
|
|
56
|
+
* refused: a caller asking for 1 ms wants "as fast as you can", not an error. */
|
|
57
|
+
export function clampLightInterval(raw) {
|
|
58
|
+
const n = typeof raw === "number" ? raw : Number(raw);
|
|
59
|
+
if (!Number.isFinite(n) || n <= 0)
|
|
60
|
+
return LIGHT_DEFAULT_INTERVAL_MS;
|
|
61
|
+
if (n < LIGHT_MIN_INTERVAL_MS)
|
|
62
|
+
return LIGHT_MIN_INTERVAL_MS;
|
|
63
|
+
if (n > LIGHT_MAX_INTERVAL_MS)
|
|
64
|
+
return LIGHT_MAX_INTERVAL_MS;
|
|
65
|
+
return Math.round(n);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Should this reading be delivered?
|
|
69
|
+
*
|
|
70
|
+
* Yes when there is nothing to compare against, when the CATEGORY changed (which is what an app
|
|
71
|
+
* branches on, so it must never be filtered away), or when the value moved by more than the
|
|
72
|
+
* noise floor AND by more than a tenth of where it was. The relative test is what makes the
|
|
73
|
+
* filter work across four orders of magnitude: two lux of movement is everything in a dark room
|
|
74
|
+
* and nothing in direct sun.
|
|
75
|
+
*/
|
|
76
|
+
export function shouldEmitLux(previous, next) {
|
|
77
|
+
const value = typeof next === "number" ? next : Number(next);
|
|
78
|
+
if (!Number.isFinite(value))
|
|
79
|
+
return false;
|
|
80
|
+
if (previous === null || previous === undefined || !Number.isFinite(previous))
|
|
81
|
+
return true;
|
|
82
|
+
if (luxCategory(previous) !== luxCategory(value))
|
|
83
|
+
return true;
|
|
84
|
+
const delta = Math.abs(value - previous);
|
|
85
|
+
if (delta < LIGHT_MIN_ABSOLUTE_CHANGE)
|
|
86
|
+
return false;
|
|
87
|
+
return delta >= Math.abs(previous) * LIGHT_MIN_RELATIVE_CHANGE;
|
|
88
|
+
}
|
|
89
|
+
/** The shape every renderer emits, so markup reads one thing. A negative hardware reading is
|
|
90
|
+
* clamped to zero rather than passed through: there is no such thing as negative light, and a
|
|
91
|
+
* caller charting the value should not have to guard against it. */
|
|
92
|
+
export function lightSample(lux) {
|
|
93
|
+
const n = typeof lux === "number" ? lux : Number(lux);
|
|
94
|
+
const value = Number.isFinite(n) && n > 0 ? n : 0;
|
|
95
|
+
return { lux: value, category: luxCategory(value) };
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=lightsensor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lightsensor.js","sourceRoot":"","sources":["../src/lightsensor.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,gGAAgG;AAChG,2EAA2E;AAC3E,EAAE;AACF,kGAAkG;AAClG,+FAA+F;AAC/F,kGAAkG;AAClG,+EAA+E;AAC/E,EAAE;AACF,+FAA+F;AAC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;AAOD;;qEAEqE;AACrE,MAAM,UAAU,WAAW,CAAC,GAAY;IACtC,MAAM,CAAC,GAAG,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACtD,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAClD,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** What a refresh did, in the same closed-vocabulary spirit as the rest of the bus. */
|
|
2
|
+
export type RefreshOutcome = {
|
|
3
|
+
ok: true;
|
|
4
|
+
version: number;
|
|
5
|
+
routes: number;
|
|
6
|
+
} | {
|
|
7
|
+
ok: false;
|
|
8
|
+
reason: "unreachable" | "malformed" | "unsigned" | "bad_signature" | "rollback_detected" | "not_configured";
|
|
9
|
+
message: string;
|
|
10
|
+
};
|
|
11
|
+
export interface LinkRefreshOptions {
|
|
12
|
+
/** where the signed table lives — usually `<baseUrl>/dsx/link.json` */
|
|
13
|
+
url: string;
|
|
14
|
+
/** the author's Ed25519 public key, raw 32 bytes, base64 — the baked trust anchor */
|
|
15
|
+
publicKey: string;
|
|
16
|
+
/** the highest version accepted so far; a refresh may not regress below it */
|
|
17
|
+
minVersion?: number;
|
|
18
|
+
fetchImpl?: typeof fetch;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Fetch, verify and install a newer link table. Returns what happened; never throws.
|
|
22
|
+
*
|
|
23
|
+
* On ANY rejection the currently-installed table is untouched — the caller keeps serving from
|
|
24
|
+
* whatever it already had, which at worst is the generation zero compiled into the binary.
|
|
25
|
+
*/
|
|
26
|
+
export declare function refreshLink(options: LinkRefreshOptions): Promise<RefreshOutcome>;
|
|
27
|
+
//# sourceMappingURL=link-refresh.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link-refresh.d.ts","sourceRoot":"","sources":["../src/link-refresh.ts"],"names":[],"mappings":"AA6CA,uFAAuF;AACvF,MAAM,MAAM,cAAc,GACtB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAC7C;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,aAAa,GAAG,WAAW,GAAG,UAAU,GAAG,eAAe,GAAG,mBAAmB,GAAG,gBAAgB,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhJ,MAAM,WAAW,kBAAkB;IACjC,uEAAuE;IACvE,GAAG,EAAE,MAAM,CAAC;IACZ,qFAAqF;IACrF,SAAS,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;CAC1B;AAwCD;;;;;GAKG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,cAAc,CAAC,CAkFtF"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
//
|
|
2
|
+
// link-refresh.ts — keeping a SHIPPED app in sync with a backend that redeploys without it.
|
|
3
|
+
//
|
|
4
|
+
// THE PROBLEM THIS EXISTS FOR. The emitted link table is baked into the build. On the web that is
|
|
5
|
+
// fine: client and server ship together. A NATIVE binary is different — it sits in an app store
|
|
6
|
+
// for weeks while the backend redeploys, so three things drift:
|
|
7
|
+
//
|
|
8
|
+
// 1. the base URL — the backend moves host/region
|
|
9
|
+
// 2. the route paths — /notes becomes /v2/notes
|
|
10
|
+
// 3. the route set — an action is added or withdrawn
|
|
11
|
+
//
|
|
12
|
+
// A build-time table is still the right FLOOR: it works offline, on first launch, with no round
|
|
13
|
+
// trip. What it needs is a refresh, and DSX already has the machinery for exactly this — the
|
|
14
|
+
// content plane's generation-zero + stale-while-revalidate ladder, and the signed-manifest load
|
|
15
|
+
// gate. This is that ladder applied to the link table:
|
|
16
|
+
//
|
|
17
|
+
// generation zero (in the binary) → always available, never fetched
|
|
18
|
+
// ↓ refreshed, SIGNED, anti-rollback
|
|
19
|
+
// the current table (from the deploy)
|
|
20
|
+
//
|
|
21
|
+
// WHY SIGNED, WHEN IT IS ALREADY HTTPS. remote-bundle-signing.md answers this and the answer
|
|
22
|
+
// applies here verbatim: HTTPS authenticates the CHANNEL — that you reached that host over that
|
|
23
|
+
// certificate. It does not authenticate the AUTHOR of the bytes. The link table decides which
|
|
24
|
+
// calls leave the device and where they go, so a poisoned CDN, a mis-issued certificate or a
|
|
25
|
+
// compromised cache could otherwise repoint every `dsx.module.*` call — WITH the user's bearer
|
|
26
|
+
// token attached. The author's key is the anchor, not the transport.
|
|
27
|
+
//
|
|
28
|
+
// THE CONTRACT IS THE ONE THAT ALREADY SHIPS (remote-bundle-signing.md, "the byte/format
|
|
29
|
+
// contract"), so one signer serves both and the build tooling signs this
|
|
30
|
+
// file's input unchanged:
|
|
31
|
+
// • Ed25519, raw 64-byte signature, over the EXACT fetched bytes — no re-serialisation, no
|
|
32
|
+
// normalisation, not one added or removed newline between signing and verifying.
|
|
33
|
+
// • detached, read header-first: `X-DSX-Signature`, else the `<url>.sig` sidecar; base64,
|
|
34
|
+
// standard or URL-safe, padded or not.
|
|
35
|
+
// • ANTI-ROLLBACK (C1): a monotonic `version` INSIDE the signed bytes. A regressing version
|
|
36
|
+
// still verifies cryptographically and is still refused, because replaying a genuinely-signed
|
|
37
|
+
// OLD table is how an attacker restores a route you deliberately withdrew.
|
|
38
|
+
//
|
|
39
|
+
// FAILURE IS ALWAYS "KEEP WHAT WE HAD". Every rejection leaves the current table in place and
|
|
40
|
+
// returns a reason; nothing is ever half-applied, and there is no path from a bad refresh to an
|
|
41
|
+
// unsigned table. The floor in the binary is the worst case, and the floor is a working app.
|
|
42
|
+
//
|
|
43
|
+
import { LinkSeam } from "./bus.js";
|
|
44
|
+
/** Accept base64 in any of the four shapes the signer or a header may produce. */
|
|
45
|
+
function fromBase64(value) {
|
|
46
|
+
const cleaned = value.trim().replace(/-/g, "+").replace(/_/g, "/");
|
|
47
|
+
const padded = cleaned.length % 4 === 0 ? cleaned : cleaned + "=".repeat(4 - (cleaned.length % 4));
|
|
48
|
+
try {
|
|
49
|
+
const binary = atob(padded);
|
|
50
|
+
const out = new Uint8Array(binary.length);
|
|
51
|
+
for (let i = 0; i < binary.length; i += 1)
|
|
52
|
+
out[i] = binary.charCodeAt(i);
|
|
53
|
+
return out;
|
|
54
|
+
}
|
|
55
|
+
catch {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Verify a raw-64 Ed25519 signature over `bytes` with a raw-32 public key.
|
|
61
|
+
*
|
|
62
|
+
* WebCrypto only — the same constraint identity.ts works under, so this runs unchanged in a
|
|
63
|
+
* browser, in Node and on an edge runtime. A platform without Ed25519 support answers `false`
|
|
64
|
+
* rather than throwing: an unverifiable table must be REFUSED, never accepted by default.
|
|
65
|
+
*/
|
|
66
|
+
async function verifyEd25519(publicKeyRaw, signature, bytes) {
|
|
67
|
+
if (publicKeyRaw.length !== 32 || signature.length !== 64)
|
|
68
|
+
return false;
|
|
69
|
+
try {
|
|
70
|
+
const key = await crypto.subtle.importKey("raw", publicKeyRaw, { name: "Ed25519" }, false, ["verify"]);
|
|
71
|
+
return await crypto.subtle.verify({ name: "Ed25519" }, key, signature, bytes);
|
|
72
|
+
}
|
|
73
|
+
catch {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Fetch, verify and install a newer link table. Returns what happened; never throws.
|
|
79
|
+
*
|
|
80
|
+
* On ANY rejection the currently-installed table is untouched — the caller keeps serving from
|
|
81
|
+
* whatever it already had, which at worst is the generation zero compiled into the binary.
|
|
82
|
+
*/
|
|
83
|
+
export async function refreshLink(options) {
|
|
84
|
+
const doFetch = options.fetchImpl ?? globalThis.fetch;
|
|
85
|
+
if (typeof doFetch !== "function")
|
|
86
|
+
return { ok: false, reason: "not_configured", message: "no fetch implementation on this platform" };
|
|
87
|
+
const anchor = fromBase64(options.publicKey);
|
|
88
|
+
if (anchor === null || anchor.length !== 32) {
|
|
89
|
+
return { ok: false, reason: "not_configured", message: "the trust anchor must be a raw 32-byte Ed25519 public key, base64" };
|
|
90
|
+
}
|
|
91
|
+
let response;
|
|
92
|
+
let raw;
|
|
93
|
+
try {
|
|
94
|
+
response = await doFetch(options.url, { headers: { accept: "application/json" } });
|
|
95
|
+
raw = await response.arrayBuffer();
|
|
96
|
+
}
|
|
97
|
+
catch (e) {
|
|
98
|
+
return { ok: false, reason: "unreachable", message: e instanceof Error ? e.message : String(e) };
|
|
99
|
+
}
|
|
100
|
+
if (!response.ok)
|
|
101
|
+
return { ok: false, reason: "unreachable", message: `the table endpoint answered ${response.status}` };
|
|
102
|
+
// THE EXACT BYTES, kept as bytes. Parsing to an object and re-serialising would change them
|
|
103
|
+
// (key order, spacing, the trailing newline) and the signature is over what the server sent.
|
|
104
|
+
const bytes = new Uint8Array(raw);
|
|
105
|
+
const header = response.headers.get("x-dsx-signature");
|
|
106
|
+
let signatureText = header;
|
|
107
|
+
if (signatureText === null || signatureText.trim() === "") {
|
|
108
|
+
try {
|
|
109
|
+
const sidecar = await doFetch(`${options.url}.sig`, { headers: { accept: "text/plain" } });
|
|
110
|
+
if (sidecar.ok)
|
|
111
|
+
signatureText = await sidecar.text();
|
|
112
|
+
}
|
|
113
|
+
catch {
|
|
114
|
+
/* the sidecar is the fallback; its absence is reported as `unsigned` below */
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
if (signatureText === null || signatureText.trim() === "") {
|
|
118
|
+
return { ok: false, reason: "unsigned", message: "no X-DSX-Signature header and no .sig sidecar — an unsigned table is never installed" };
|
|
119
|
+
}
|
|
120
|
+
const signature = fromBase64(signatureText);
|
|
121
|
+
if (signature === null)
|
|
122
|
+
return { ok: false, reason: "bad_signature", message: "the detached signature is not valid base64" };
|
|
123
|
+
if (!(await verifyEd25519(anchor, signature, bytes))) {
|
|
124
|
+
return { ok: false, reason: "bad_signature", message: "the table is not signed by the configured key" };
|
|
125
|
+
}
|
|
126
|
+
// Only AFTER the bytes are proven authentic is anything parsed out of them.
|
|
127
|
+
let doc;
|
|
128
|
+
try {
|
|
129
|
+
doc = JSON.parse(new TextDecoder().decode(bytes));
|
|
130
|
+
}
|
|
131
|
+
catch {
|
|
132
|
+
return { ok: false, reason: "malformed", message: "the signed table is not valid JSON" };
|
|
133
|
+
}
|
|
134
|
+
if (doc.format !== "despia:client-link@1") {
|
|
135
|
+
return { ok: false, reason: "malformed", message: `unexpected format ${String(doc.format)}` };
|
|
136
|
+
}
|
|
137
|
+
if (typeof doc.version !== "number" || !Number.isInteger(doc.version) || doc.version < 0) {
|
|
138
|
+
return { ok: false, reason: "malformed", message: "the table carries no integer `version` — anti-rollback cannot be enforced without one" };
|
|
139
|
+
}
|
|
140
|
+
if (!Array.isArray(doc.routes))
|
|
141
|
+
return { ok: false, reason: "malformed", message: "the table carries no `routes` array" };
|
|
142
|
+
// ONE monotonic mark law: no floor yet (nothing accepted this trust epoch) always installs; a
|
|
143
|
+
// floor is set only once a version has been accepted. Against a set floor, strictly older is
|
|
144
|
+
// refused (a genuine older table being replayed) and EQUAL is refused too (a byte identical
|
|
145
|
+
// table reinstalling the version already active is still a replay, not a fresh table); only
|
|
146
|
+
// strictly newer advances the floor. Cryptographically fine either way: this call already
|
|
147
|
+
// verified the signature above, and a valid signature over a stale or repeated version is
|
|
148
|
+
// exactly what a captured, genuinely signed table looks like when replayed.
|
|
149
|
+
if (options.minVersion !== undefined && doc.version <= options.minVersion) {
|
|
150
|
+
return { ok: false, reason: "rollback_detected", message: `version ${doc.version} does not advance past the accepted ${options.minVersion}` };
|
|
151
|
+
}
|
|
152
|
+
for (const route of doc.routes) {
|
|
153
|
+
if (typeof route?.chain !== "string" || typeof route?.action !== "string" || typeof route?.method !== "string" || typeof route?.path !== "string") {
|
|
154
|
+
return { ok: false, reason: "malformed", message: "a route row is missing chain/action/method/path" };
|
|
155
|
+
}
|
|
156
|
+
if (!route.path.startsWith("/")) {
|
|
157
|
+
// A table that could point a call at another origin is the whole reason this file verifies
|
|
158
|
+
// anything; the transport refuses it too, and refusing here keeps it out of the table.
|
|
159
|
+
return { ok: false, reason: "malformed", message: `route ${route.chain}.${route.action} has a non-rooted path` };
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
// Installed only once every check has passed, so a refresh is atomic from the caller's view.
|
|
163
|
+
LinkSeam.routes = doc.routes;
|
|
164
|
+
return { ok: true, version: doc.version, routes: doc.routes.length };
|
|
165
|
+
}
|
|
166
|
+
//# sourceMappingURL=link-refresh.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link-refresh.js","sourceRoot":"","sources":["../src/link-refresh.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,6FAA6F;AAC7F,EAAE;AACF,mGAAmG;AACnG,iGAAiG;AACjG,iEAAiE;AACjE,EAAE;AACF,4DAA4D;AAC5D,uDAAuD;AACvD,8DAA8D;AAC9D,EAAE;AACF,iGAAiG;AACjG,8FAA8F;AAC9F,iGAAiG;AACjG,wDAAwD;AACxD,EAAE;AACF,2EAA2E;AAC3E,mDAAmD;AACnD,2CAA2C;AAC3C,EAAE;AACF,8FAA8F;AAC9F,iGAAiG;AACjG,+FAA+F;AAC/F,8FAA8F;AAC9F,gGAAgG;AAChG,sEAAsE;AACtE,EAAE;AACF,0FAA0F;AAC1F,0EAA0E;AAC1E,2BAA2B;AAC3B,8FAA8F;AAC9F,sFAAsF;AACtF,6FAA6F;AAC7F,4CAA4C;AAC5C,+FAA+F;AAC/F,mGAAmG;AACnG,gFAAg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