@despia-native/kernel 0.0.0-coming-soon.0 → 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 +16 -1
- 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 +141 -2
|
@@ -0,0 +1,615 @@
|
|
|
1
|
+
//
|
|
2
|
+
// availability.ts - "can this member run HERE, and if not, why?" (proposals/availability.md v2).
|
|
3
|
+
//
|
|
4
|
+
// THE UNIT IS THE MEMBER (a module, an action, a package component, one value of one argument).
|
|
5
|
+
// A TARGET IS A SET OF CONSTRAINT VALUES, NOT A NAME: an AXIS is a registered word whose row says
|
|
6
|
+
// when its value is known and which reason a mismatch produces; a requirement is the `platforms`
|
|
7
|
+
// list a member already declares, read as constraint values (OR within one axis, AND across axes,
|
|
8
|
+
// an unmentioned axis unconstrained). This file names no platform, no facet, no role and no
|
|
9
|
+
// target. A new lane, facet or device is a row of data in the generated table.
|
|
10
|
+
//
|
|
11
|
+
// FOUR REASONS, closed and ordered from the most static to the most dynamic:
|
|
12
|
+
//
|
|
13
|
+
// excluded this app's build left the module out (build)
|
|
14
|
+
// unsupported_platform the platform has no such concept (build)
|
|
15
|
+
// unsupported_os the OS is older than the member's floor (launch)
|
|
16
|
+
// unsupported_device the OS has it, this device lacks the hardware (live, the member's probe)
|
|
17
|
+
//
|
|
18
|
+
// ONE PURE FUNCTION, THREE-VALUED. `resolve(table, member, env)` answers `yes`, `no` (a reason and
|
|
19
|
+
// a `via` path) or `depends` (the residual conditions). The CLI calls it with the build facts
|
|
20
|
+
// only, so the OS version and the probes come back as conditions; the runtime calls it with every
|
|
21
|
+
// fact, or evaluates only the residual the build emitted (`evaluate`). The corpus pins
|
|
22
|
+
// `resolve(full) == evaluate(resolve(build).conditions, full)` on TS, Kotlin and Swift.
|
|
23
|
+
//
|
|
24
|
+
// Fail-open (Article 7): an unknown OS version, a floor that does not parse, a probe that was
|
|
25
|
+
// never asked or threw, all answer AVAILABLE and let the call's own typed answer stand.
|
|
26
|
+
//
|
|
27
|
+
// Pure by construction (it imports only the generated version rules beside it), so the corpus drives it with literal tables.
|
|
28
|
+
//
|
|
29
|
+
import { compareDotted } from "./version-rules.generated.js";
|
|
30
|
+
/** closed, ordered: the most static first */
|
|
31
|
+
export const AVAILABILITY_REASONS = ["excluded", "unsupported_platform", "unsupported_os", "unsupported_device"];
|
|
32
|
+
/** The six initial axis rows (v2 4.1): data like any other, shipped as the table's own `axes`; a
|
|
33
|
+
* registry with no table installed uses these so it still answers. */
|
|
34
|
+
export const DEFAULT_AXES = {
|
|
35
|
+
build: { known: "build", reason: "excluded" },
|
|
36
|
+
platform: { known: "build", reason: "unsupported_platform" },
|
|
37
|
+
facet: { known: "build", reason: "unsupported_platform" },
|
|
38
|
+
role: { known: "build", reason: "unsupported_platform" },
|
|
39
|
+
os: { known: "launch", reason: "unsupported_os" },
|
|
40
|
+
probe: { known: "live", reason: "unsupported_device" },
|
|
41
|
+
};
|
|
42
|
+
const YES = { status: "yes", reason: null, via: [], conditions: [], remote: false };
|
|
43
|
+
/** Numeric, segment-wise version compare: "9.0" < "17.0", "13" == "13.0". null = not comparable. This is the kernel's copy of
|
|
44
|
+
* @despia-native/project `compareDotted` (generated, see version-rules.generated.ts); the name is a published export. */
|
|
45
|
+
export function compareVersions(a, b) {
|
|
46
|
+
return compareDotted(a, b);
|
|
47
|
+
}
|
|
48
|
+
function words(v) {
|
|
49
|
+
return v === undefined ? [] : typeof v === "string" ? [v] : v;
|
|
50
|
+
}
|
|
51
|
+
function rank(r) { return AVAILABILITY_REASONS.indexOf(r); }
|
|
52
|
+
/** The module chains that own this member, innermost first: itself's owner and every ancestor. */
|
|
53
|
+
function chainsOf(table, member, row) {
|
|
54
|
+
const own = row?.of ?? (row?.kind === "module" || row === undefined ? member : undefined);
|
|
55
|
+
if (own === undefined)
|
|
56
|
+
return [];
|
|
57
|
+
const out = [];
|
|
58
|
+
for (let c = own; c.length > 0;) {
|
|
59
|
+
out.push(c);
|
|
60
|
+
const dot = c.lastIndexOf(".");
|
|
61
|
+
if (dot < 0)
|
|
62
|
+
break;
|
|
63
|
+
c = c.slice(0, dot);
|
|
64
|
+
}
|
|
65
|
+
return out;
|
|
66
|
+
}
|
|
67
|
+
/** One member's OWN answer: its row against the environment, no dependencies. */
|
|
68
|
+
function own(table, member, env, args) {
|
|
69
|
+
const row = table.members[member];
|
|
70
|
+
if (row === undefined)
|
|
71
|
+
return null;
|
|
72
|
+
const failures = [];
|
|
73
|
+
const conditions = [];
|
|
74
|
+
let remote = false;
|
|
75
|
+
const fail = (reason, axis, needs) => failures.push(axis === undefined ? { reason } : { reason, missing: { axis, needs: needs ?? [] } });
|
|
76
|
+
// build axis: the module (or an ancestor) is out of this build
|
|
77
|
+
const excluded = env.excluded === undefined ? null : new Set(env.excluded);
|
|
78
|
+
if (excluded !== null && chainsOf(table, member, row).some((c) => excluded.has(c)))
|
|
79
|
+
fail("excluded");
|
|
80
|
+
// build axis, provider-served: on a platform where the member runs only through a provider, it is
|
|
81
|
+
// in this build only when one of the provider chains that serve it is (an unknown build fact keeps
|
|
82
|
+
// a listed chain; an empty list never serves). Article 10: never `unsupported_platform` here.
|
|
83
|
+
if (row.providers !== undefined) {
|
|
84
|
+
for (const p of words(env.values["platform"])) {
|
|
85
|
+
const serving = row.providers[p];
|
|
86
|
+
if (serving === undefined)
|
|
87
|
+
continue;
|
|
88
|
+
const held = serving.filter((c) => excluded === null || !chainsOf(table, c, table.members[c]).some((x) => excluded.has(x)));
|
|
89
|
+
if (held.length === 0)
|
|
90
|
+
fail("excluded", "build", serving);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
// requirement axes: OR within one, AND across; an unmentioned axis is unconstrained
|
|
94
|
+
const requires = { ...(row.requires ?? {}) };
|
|
95
|
+
// A retained action (or control) with no implementing platform is an explicit SDK capability removal.
|
|
96
|
+
if ((row.kind === "action" || row.kind === "control") && requires["platform"]?.length === 0)
|
|
97
|
+
fail("unsupported_platform", "platform", []);
|
|
98
|
+
// the facet axis defaults to what the member `provides`
|
|
99
|
+
if (requires["facet"] === undefined && row.provides !== undefined && row.provides.length > 0) {
|
|
100
|
+
requires["facet"] = row.provides;
|
|
101
|
+
}
|
|
102
|
+
const narrowed = variantRows(row, args);
|
|
103
|
+
for (const v of narrowed)
|
|
104
|
+
for (const [axis, needs] of Object.entries(v.requires ?? {})) {
|
|
105
|
+
// a variant can only NARROW: intersect with what the member already asks
|
|
106
|
+
const base = requires[axis];
|
|
107
|
+
requires[axis] = base === undefined ? needs : needs.filter((w) => base.includes(w));
|
|
108
|
+
if (requires[axis].length === 0)
|
|
109
|
+
requires[axis] = needs;
|
|
110
|
+
}
|
|
111
|
+
for (const [axis, needs] of Object.entries(requires)) {
|
|
112
|
+
if (needs.length === 0)
|
|
113
|
+
continue; // an empty list constrains nothing
|
|
114
|
+
const axisRow = table.axes[axis];
|
|
115
|
+
if (axisRow === undefined)
|
|
116
|
+
continue; // an unregistered axis constrains nothing
|
|
117
|
+
const have = words(env.values[axis]);
|
|
118
|
+
if (axisRow.known === "build" && !needs.some((w) => have.includes(w))) {
|
|
119
|
+
// a facet mismatch is not "no" when `reach` admits our facet: the member runs over a link
|
|
120
|
+
if (axis === "facet" && row.reach !== undefined && row.reach !== false &&
|
|
121
|
+
row.reach.some((w) => words(env.values["facet"]).includes(w))) {
|
|
122
|
+
remote = true;
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
fail(axisRow.reason, axis, needs);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
// os axis (launch): the member's floor for this target's platform word
|
|
129
|
+
const floors = [];
|
|
130
|
+
for (const src of [row.since, ...narrowed.map((n) => n.since)]) {
|
|
131
|
+
if (src === undefined)
|
|
132
|
+
continue;
|
|
133
|
+
for (const p of words(env.values["platform"])) {
|
|
134
|
+
const f = src[p];
|
|
135
|
+
if (f !== undefined)
|
|
136
|
+
floors.push(f);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
if (floors.length > 0 && !remote) {
|
|
140
|
+
const floor = floors.reduce((a, b) => ((compareVersions(a, b) ?? 0) >= 0 ? a : b));
|
|
141
|
+
const osRow = Object.values(table.axes).find((a) => a.reason === "unsupported_os");
|
|
142
|
+
if (env.osVersion === undefined || env.osVersion === null) {
|
|
143
|
+
conditions.push({ member, axis: "os", needs: floor });
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
const c = compareVersions(env.osVersion, floor);
|
|
147
|
+
if (c !== null && c < 0)
|
|
148
|
+
fail(osRow?.reason ?? "unsupported_os", "os", [floor]);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
// probe axis (live): the member's own device probe
|
|
152
|
+
const probed = row.probe === true || narrowed.some((n) => n.probe === true);
|
|
153
|
+
if (probed && !remote) {
|
|
154
|
+
const answer = env.probe?.(member, args);
|
|
155
|
+
if (answer === undefined || answer === null)
|
|
156
|
+
conditions.push({ member, axis: "probe" });
|
|
157
|
+
else if (answer === false)
|
|
158
|
+
fail("unsupported_device", "probe", []);
|
|
159
|
+
}
|
|
160
|
+
failures.sort((a, b) => rank(a.reason) - rank(b.reason));
|
|
161
|
+
return { failed: failures[0] ?? null, conditions, remote };
|
|
162
|
+
}
|
|
163
|
+
function variantRows(row, args) {
|
|
164
|
+
if (row.variants === undefined || args === undefined)
|
|
165
|
+
return [];
|
|
166
|
+
const out = [];
|
|
167
|
+
for (const [arg, values] of Object.entries(row.variants)) {
|
|
168
|
+
const given = args[arg];
|
|
169
|
+
if (given === undefined || given === null)
|
|
170
|
+
continue;
|
|
171
|
+
const v = values[String(given)];
|
|
172
|
+
if (v !== undefined)
|
|
173
|
+
out.push(v);
|
|
174
|
+
}
|
|
175
|
+
return out;
|
|
176
|
+
}
|
|
177
|
+
/** The facet target a remote member answers on: the first target whose facet the member provides. */
|
|
178
|
+
function remoteTarget(table, row) {
|
|
179
|
+
const provides = row.provides ?? [];
|
|
180
|
+
return table.targets.find((t) => words(t.values["facet"]).some((f) => provides.includes(f)));
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* THE ONE FUNCTION. Three-valued: `yes`, `no` (reason + via) or `depends` (residual conditions).
|
|
184
|
+
* A member the table does not know is `no` with reason null (the call fails `unknown_action` /
|
|
185
|
+
* `not_loaded`, which are not availability reasons).
|
|
186
|
+
*/
|
|
187
|
+
export function resolve(table, member, env, args, opts = {}) {
|
|
188
|
+
const memo = new Map();
|
|
189
|
+
const walking = new Set();
|
|
190
|
+
const solve = (id, e, a, top) => {
|
|
191
|
+
const key = top ? id : `${id}\u0000${e === env ? "" : "r"}`;
|
|
192
|
+
const hit = memo.get(key);
|
|
193
|
+
if (hit !== undefined)
|
|
194
|
+
return hit;
|
|
195
|
+
if (walking.has(key))
|
|
196
|
+
return YES; // a cycle fails nothing
|
|
197
|
+
const o = own(table, id, e, a);
|
|
198
|
+
let answer;
|
|
199
|
+
if (o === null) {
|
|
200
|
+
answer = { status: "no", reason: null, via: [], conditions: [], remote: false };
|
|
201
|
+
}
|
|
202
|
+
else if (o.failed !== null) {
|
|
203
|
+
const step = { member: id, edge: null, remote: false, reason: o.failed.reason };
|
|
204
|
+
if (o.failed.missing !== undefined)
|
|
205
|
+
step.missing = o.failed.missing;
|
|
206
|
+
answer = { status: "no", reason: o.failed.reason, via: [step], conditions: [], remote: o.remote };
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
walking.add(key);
|
|
210
|
+
let conditions = o.conditions.map((c) => ({ ...c }));
|
|
211
|
+
answer = { status: "yes", reason: null, via: [], conditions: [], remote: o.remote };
|
|
212
|
+
if (opts.own !== true) {
|
|
213
|
+
for (const edge of table.edges ?? []) {
|
|
214
|
+
if (edge.from !== id || edge.guarded === true || edge.dynamic === true || edge.kind === "contains")
|
|
215
|
+
continue;
|
|
216
|
+
const depRow = table.members[edge.to];
|
|
217
|
+
// a remote hop answers on the far node's own target
|
|
218
|
+
let depEnv = e;
|
|
219
|
+
let hop = false;
|
|
220
|
+
if (depRow !== undefined) {
|
|
221
|
+
const probeOwn = own(table, edge.to, e, undefined);
|
|
222
|
+
if (probeOwn !== null && probeOwn.remote) {
|
|
223
|
+
const t = remoteTarget(table, depRow);
|
|
224
|
+
if (t !== undefined) {
|
|
225
|
+
depEnv = { ...e, values: t.values };
|
|
226
|
+
hop = true;
|
|
227
|
+
}
|
|
228
|
+
else
|
|
229
|
+
continue; // admitted over a link, nothing to ask: available
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
const dep = solve(edge.to, depEnv, undefined, false);
|
|
233
|
+
if (dep.status === "no") {
|
|
234
|
+
answer = {
|
|
235
|
+
status: "no", reason: dep.reason, remote: o.remote, conditions: [],
|
|
236
|
+
via: [{ member: id, edge: edge.kind, remote: hop }, ...dep.via],
|
|
237
|
+
};
|
|
238
|
+
conditions = [];
|
|
239
|
+
break;
|
|
240
|
+
}
|
|
241
|
+
if (dep.status === "depends") {
|
|
242
|
+
for (const c of dep.conditions) {
|
|
243
|
+
conditions.push({ ...c, via: [{ member: id, edge: edge.kind, remote: hop }, ...(c.via ?? [{ member: c.member, edge: null, remote: false }])] });
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
walking.delete(key);
|
|
249
|
+
if (answer.status !== "no") {
|
|
250
|
+
answer = { status: conditions.length > 0 ? "depends" : "yes", reason: null, via: [], conditions, remote: o.remote };
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
memo.set(key, answer);
|
|
254
|
+
return answer;
|
|
255
|
+
};
|
|
256
|
+
return solve(member, env, args, true);
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* The runtime half of partial evaluation: take the answer the BUILD produced (`resolve` with
|
|
260
|
+
* build facts only) and check just its residual conditions against the launch / live facts.
|
|
261
|
+
* `resolve(full) == evaluate(resolve(build), full)` is pinned by the corpus. An unknown fact
|
|
262
|
+
* stays a pass (fail-open).
|
|
263
|
+
*/
|
|
264
|
+
export function evaluate(answer, env, args, floors) {
|
|
265
|
+
if (answer.status !== "depends")
|
|
266
|
+
return answer;
|
|
267
|
+
const failing = [];
|
|
268
|
+
for (const c of answer.conditions) {
|
|
269
|
+
if (c.axis === "os") {
|
|
270
|
+
const floor = c.needs ?? floors?.[c.member];
|
|
271
|
+
if (floor !== undefined && env.osVersion !== undefined && env.osVersion !== null) {
|
|
272
|
+
const r = compareVersions(env.osVersion, floor);
|
|
273
|
+
if (r !== null && r < 0)
|
|
274
|
+
failing.push({ condition: c, reason: "unsupported_os" });
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
else if (c.axis === "probe") {
|
|
278
|
+
if (env.probe?.(c.member, args) === false)
|
|
279
|
+
failing.push({ condition: c, reason: "unsupported_device" });
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
if (failing.length === 0)
|
|
283
|
+
return { ...answer, status: "yes", conditions: [], via: [] };
|
|
284
|
+
failing.sort((a, b) => rank(a.reason) - rank(b.reason));
|
|
285
|
+
const first = failing[0];
|
|
286
|
+
const tail = { member: first.condition.member, edge: null, remote: false, reason: first.reason };
|
|
287
|
+
if (first.condition.axis === "os")
|
|
288
|
+
tail.missing = { axis: "os", needs: [first.condition.needs ?? ""] };
|
|
289
|
+
else
|
|
290
|
+
tail.missing = { axis: "probe", needs: [] };
|
|
291
|
+
const route = first.condition.via;
|
|
292
|
+
const via = route === undefined ? [tail] : [...route.slice(0, -1), tail];
|
|
293
|
+
return { status: "no", reason: first.reason, via, conditions: [], remote: answer.remote };
|
|
294
|
+
}
|
|
295
|
+
/** The residual a build stores for a member: the conditions of its build-only answer. */
|
|
296
|
+
export function residualOf(answer) {
|
|
297
|
+
return answer.status === "depends" ? answer.conditions : [];
|
|
298
|
+
}
|
|
299
|
+
/** The module roll-up (v2 6.4): AVAILABLE when any member is; otherwise the members' most STATIC
|
|
300
|
+
* common reason. `depends` when no member is yes but one depends. */
|
|
301
|
+
export function rollUp(members) {
|
|
302
|
+
if (members.some((m) => m.status === "yes"))
|
|
303
|
+
return YES;
|
|
304
|
+
const depends = members.find((m) => m.status === "depends");
|
|
305
|
+
if (depends !== undefined)
|
|
306
|
+
return { ...depends, via: [] };
|
|
307
|
+
let best = null;
|
|
308
|
+
for (const m of members) {
|
|
309
|
+
if (m.reason === null)
|
|
310
|
+
continue;
|
|
311
|
+
if (best === null || rank(m.reason) < rank(best))
|
|
312
|
+
best = m.reason;
|
|
313
|
+
}
|
|
314
|
+
return { status: "no", reason: best, via: [], conditions: [], remote: false };
|
|
315
|
+
}
|
|
316
|
+
/** The probe cache: a probe is synchronous and cheap, asked ONCE per launch (per argument shape);
|
|
317
|
+
* the module re-asks (`refresh`) when its own world changes (an external reader attached), which
|
|
318
|
+
* bumps `version` and tells the listeners. */
|
|
319
|
+
export class AvailabilityProbes {
|
|
320
|
+
fns = new Map();
|
|
321
|
+
cache = new Map();
|
|
322
|
+
/** members whose answer was read while no probe was installed yet */
|
|
323
|
+
missed = new Set();
|
|
324
|
+
/** bumps on every CHANGED answer: the reactive tick the markup planes subscribe to */
|
|
325
|
+
version = 0;
|
|
326
|
+
listeners = new Set();
|
|
327
|
+
/** Install (or replace) a member's probe. A probe installed after its answer was READ (a web facet
|
|
328
|
+
* that loads after the first paint, a re-registration) publishes one tick, so a read that saw
|
|
329
|
+
* "no probe yet" (unknown) re-evaluates instead of staying unsettled until an unrelated tick. */
|
|
330
|
+
set(key, fn) {
|
|
331
|
+
const k = key.toLowerCase();
|
|
332
|
+
this.fns.set(k, fn);
|
|
333
|
+
let read = this.missed.delete(k);
|
|
334
|
+
for (const slot of [...this.cache.keys()])
|
|
335
|
+
if (slot === k || slot.startsWith(`${k}\u0000`)) {
|
|
336
|
+
this.cache.delete(slot);
|
|
337
|
+
read = true;
|
|
338
|
+
}
|
|
339
|
+
if (read)
|
|
340
|
+
this.bump();
|
|
341
|
+
}
|
|
342
|
+
has(key) { return this.fns.has(key.toLowerCase()); }
|
|
343
|
+
slot(key, args) {
|
|
344
|
+
return args === undefined || Object.keys(args).length === 0 ? key : `${key}\u0000${JSON.stringify(args)}`;
|
|
345
|
+
}
|
|
346
|
+
/** the cached answer; null = no probe, or the probe threw (fail-open) */
|
|
347
|
+
ask(key, args) {
|
|
348
|
+
const k = key.toLowerCase();
|
|
349
|
+
const slot = this.slot(k, args);
|
|
350
|
+
const hit = this.cache.get(slot);
|
|
351
|
+
if (hit !== undefined)
|
|
352
|
+
return hit;
|
|
353
|
+
const fn = this.fns.get(k);
|
|
354
|
+
if (fn === undefined) {
|
|
355
|
+
this.missed.add(k);
|
|
356
|
+
return null;
|
|
357
|
+
}
|
|
358
|
+
let answer;
|
|
359
|
+
// v2.1 D1: a probe that cannot know yet answers null (unknown: available, not settled) and
|
|
360
|
+
// the lane calls refresh once it knows; only a literal false means "this device has none"
|
|
361
|
+
try {
|
|
362
|
+
const r = fn(args);
|
|
363
|
+
answer = r === true ? true : r === false ? false : null;
|
|
364
|
+
}
|
|
365
|
+
catch {
|
|
366
|
+
return null;
|
|
367
|
+
}
|
|
368
|
+
this.cache.set(slot, answer);
|
|
369
|
+
return answer;
|
|
370
|
+
}
|
|
371
|
+
/** Re-ask every cached probe answer under `chain` (all when omitted). True when any CHANGED. */
|
|
372
|
+
refresh(chain) {
|
|
373
|
+
const prefix = chain === undefined ? "" : `${chain.toLowerCase()}.`;
|
|
374
|
+
let changed = false;
|
|
375
|
+
for (const [slot, before] of [...this.cache]) {
|
|
376
|
+
if (!slot.startsWith(prefix))
|
|
377
|
+
continue;
|
|
378
|
+
const nul = slot.indexOf("\u0000");
|
|
379
|
+
const k = nul < 0 ? slot : slot.slice(0, nul);
|
|
380
|
+
const fn = this.fns.get(k);
|
|
381
|
+
if (fn === undefined)
|
|
382
|
+
continue;
|
|
383
|
+
let after;
|
|
384
|
+
try {
|
|
385
|
+
const r = fn(nul < 0 ? undefined : JSON.parse(slot.slice(nul + 1)));
|
|
386
|
+
after = r === true ? true : r === false ? false : null;
|
|
387
|
+
}
|
|
388
|
+
catch {
|
|
389
|
+
continue;
|
|
390
|
+
}
|
|
391
|
+
this.cache.set(slot, after);
|
|
392
|
+
if (before !== after)
|
|
393
|
+
changed = true;
|
|
394
|
+
}
|
|
395
|
+
if (changed) {
|
|
396
|
+
this.version += 1;
|
|
397
|
+
for (const l of this.listeners)
|
|
398
|
+
l(chain ?? "");
|
|
399
|
+
}
|
|
400
|
+
return changed;
|
|
401
|
+
}
|
|
402
|
+
/** v2.1 D9: a live fact outside the probe cache changed (a condition, a degradation): ONE tick */
|
|
403
|
+
bump(chain = "") {
|
|
404
|
+
this.version += 1;
|
|
405
|
+
for (const l of this.listeners)
|
|
406
|
+
l(chain);
|
|
407
|
+
}
|
|
408
|
+
onChange(fn) {
|
|
409
|
+
this.listeners.add(fn);
|
|
410
|
+
return () => { this.listeners.delete(fn); };
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
// ── v2.1: READY, CONDITION, DEGRADATION, REMEDY, EXPLAIN (availability.md v2.1 addendum) ────────
|
|
414
|
+
//
|
|
415
|
+
// Availability answers "could it ever run here". Three more questions share its answer object:
|
|
416
|
+
// is it READY now (a closed live `condition`, the permission plane composed in, never
|
|
417
|
+
// duplicated), does it run at full quality (a named `degradation`), and what would change the
|
|
418
|
+
// answer (a typed `remedy`), told to the person holding the device in one localized sentence
|
|
419
|
+
// (`explain`, from the one first-party catalog). `readiness` is a pure fold over the member
|
|
420
|
+
// table, the shaped availability answer and the live facts; corpus ready.json pins it on three
|
|
421
|
+
// kernels. It names no platform, engine, target or package: the web's "another browser can
|
|
422
|
+
// help" is the TARGET ROW's own `remedies` data.
|
|
423
|
+
/** closed, ordered: the most durable first (D3) */
|
|
424
|
+
export const CONDITIONS = ["permission_denied", "not_set_up", "switched_off", "offline", "busy"];
|
|
425
|
+
/** closed setting words a remedy may name */
|
|
426
|
+
export const SETTINGS = ["app", "bluetooth", "nfc", "location", "wifi", "network", "biometrics", "passcode", "wallet", "voice"];
|
|
427
|
+
export const REMEDY_KINDS = [
|
|
428
|
+
"use_other_target", "use_other_browser", "use_other_device", "update_os", "grant_permission",
|
|
429
|
+
"open_settings", "enable_setting", "set_up", "connect", "wait",
|
|
430
|
+
];
|
|
431
|
+
const conditionRank = (c) => CONDITIONS.indexOf(c);
|
|
432
|
+
function remedyOf(kind, over = {}) {
|
|
433
|
+
return { kind, setting: over.setting ?? null, inCall: over.inCall === true, needs: over.needs ?? null, targets: [...(over.targets ?? [])] };
|
|
434
|
+
}
|
|
435
|
+
/** The conditions a member declares for THIS platform: a code whose declaration lists `platforms` is subject only
|
|
436
|
+
* on those (Motion's `start` needs a grant on the web only; the native Motion & Fitness grant is not its). */
|
|
437
|
+
function declaredHere(all, here) {
|
|
438
|
+
const out = {};
|
|
439
|
+
for (const [code, c] of Object.entries(all ?? {})) {
|
|
440
|
+
if (c.platforms === undefined || here === null || c.platforms.includes(here))
|
|
441
|
+
out[code] = c;
|
|
442
|
+
}
|
|
443
|
+
return out;
|
|
444
|
+
}
|
|
445
|
+
function platformOf(row) {
|
|
446
|
+
const p = row?.values["platform"];
|
|
447
|
+
return typeof p === "string" ? p : null;
|
|
448
|
+
}
|
|
449
|
+
/** The OTHER app targets whose platform the member admits, as platform words in table order. */
|
|
450
|
+
function otherTargets(table, row, current) {
|
|
451
|
+
const facet = current?.values["facet"];
|
|
452
|
+
const admits = row?.requires?.["platform"];
|
|
453
|
+
const here = platformOf(current);
|
|
454
|
+
const out = [];
|
|
455
|
+
for (const t of table.targets) {
|
|
456
|
+
if (t === current)
|
|
457
|
+
continue;
|
|
458
|
+
if (facet !== undefined && t.values["facet"] !== facet)
|
|
459
|
+
continue;
|
|
460
|
+
const p = platformOf(t);
|
|
461
|
+
if (p === null || p === here || out.includes(p))
|
|
462
|
+
continue;
|
|
463
|
+
if (admits !== undefined && (admits.length > 0 || row?.kind === "action" || row?.kind === "control") && !admits.includes(p))
|
|
464
|
+
continue;
|
|
465
|
+
out.push(p);
|
|
466
|
+
}
|
|
467
|
+
return out;
|
|
468
|
+
}
|
|
469
|
+
/** One sentence: the app's table, then the catalog's translation on the locale ladder, then the
|
|
470
|
+
* English source; a `{0}` hole is filled after the lookup. */
|
|
471
|
+
export function explainSentence(catalog, id, holes = [], facts = {}, english) {
|
|
472
|
+
const source = english ?? catalog.sentences[id];
|
|
473
|
+
if (source === undefined)
|
|
474
|
+
return null;
|
|
475
|
+
let text = facts.lookup?.(source) ?? null;
|
|
476
|
+
if (text === null) {
|
|
477
|
+
for (const tag of facts.locales ?? []) {
|
|
478
|
+
const hit = catalog.translations[tag.toLowerCase()]?.[source];
|
|
479
|
+
if (hit !== undefined) {
|
|
480
|
+
text = hit;
|
|
481
|
+
break;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
return (text ?? source).replace(/\{(\d+)\}/g, (m, n) => holes[Number(n)] ?? m);
|
|
486
|
+
}
|
|
487
|
+
function sentenceId(catalog, base, suffix) {
|
|
488
|
+
if (suffix !== null && catalog.sentences[`${base}.${suffix}`] !== undefined)
|
|
489
|
+
return `${base}.${suffix}`;
|
|
490
|
+
return base;
|
|
491
|
+
}
|
|
492
|
+
/** THE READINESS FOLD (v2.1). Pure: the table, the member key, the shaped availability answer and
|
|
493
|
+
* the live facts in; `{ ready, condition, settled, degradation, remedy, explain }` out. */
|
|
494
|
+
export function readiness(table, catalog, member, answer, facts = {}) {
|
|
495
|
+
const current = table.targets.find((t) => t.name === facts.target);
|
|
496
|
+
const here = platformOf(current);
|
|
497
|
+
const say = (id, holes = [], english) => explainSentence(catalog, id, holes, facts, english);
|
|
498
|
+
const live = facts.conditions ?? [];
|
|
499
|
+
const row = table.members[member];
|
|
500
|
+
const local = row?.of !== undefined && member.startsWith(`${row.of}.`) ? member.slice(row.of.length + 1) : member;
|
|
501
|
+
const declared = declaredHere(row?.conditions, here);
|
|
502
|
+
const pending = live.some((c) => c.pending === true && declared[c.code] !== undefined &&
|
|
503
|
+
(c.members == null || c.members.includes(local)));
|
|
504
|
+
const settled = (answer.settled ?? true) && !pending;
|
|
505
|
+
if (!answer.available) {
|
|
506
|
+
const reason = answer.reason;
|
|
507
|
+
const tail = answer.via.length > 0 ? answer.via[answer.via.length - 1].member : member;
|
|
508
|
+
const failing = table.members[tail] ?? row;
|
|
509
|
+
let remedy = null;
|
|
510
|
+
let explain = null;
|
|
511
|
+
if (reason === "unsupported_platform") {
|
|
512
|
+
const targets = otherTargets(table, failing, current);
|
|
513
|
+
remedy = targets.length > 0 ? remedyOf("use_other_target", { targets }) : null;
|
|
514
|
+
explain = say("unsupported_platform");
|
|
515
|
+
}
|
|
516
|
+
else if (reason === "unsupported_os") {
|
|
517
|
+
const needs = (here !== null ? failing?.since?.[here] : undefined) ?? current?.floor ?? null;
|
|
518
|
+
remedy = remedyOf("update_os", { needs });
|
|
519
|
+
explain = needs === null ? say("unsupported_os") : say("unsupported_os.needs", [needs]);
|
|
520
|
+
}
|
|
521
|
+
else if (reason === "unsupported_device") {
|
|
522
|
+
const kind = current?.remedies?.["unsupported_device"];
|
|
523
|
+
const k = kind === "use_other_browser" ? "use_other_browser" : "use_other_device";
|
|
524
|
+
remedy = remedyOf(k, { targets: otherTargets(table, failing, current) });
|
|
525
|
+
explain = say(k === "use_other_browser" ? "unsupported_device.browser" : "unsupported_device");
|
|
526
|
+
}
|
|
527
|
+
else if (reason === "excluded") {
|
|
528
|
+
explain = say("excluded");
|
|
529
|
+
}
|
|
530
|
+
// THE MEMBER'S OWN SENTENCE first: what its manifest wrote for this reason, on the same lookup ladder
|
|
531
|
+
const own = reason === null ? undefined : failing?.message?.[reason];
|
|
532
|
+
if (own !== undefined && own !== "")
|
|
533
|
+
explain = say(reason, [], own);
|
|
534
|
+
return { ready: false, condition: null, settled, degradation: null, remedy, explain };
|
|
535
|
+
}
|
|
536
|
+
const active = [];
|
|
537
|
+
const perm = facts.permission;
|
|
538
|
+
if (declared["permission_denied"] !== undefined && perm != null && (perm.status === "denied" || perm.status === "restricted")) {
|
|
539
|
+
active.push({ code: "permission_denied", setting: "app", inCall: perm.canAsk === true, status: perm.status, canAsk: perm.canAsk === true });
|
|
540
|
+
}
|
|
541
|
+
for (const c of live) {
|
|
542
|
+
if (c.pending === true || c.code === "permission_denied" || declared[c.code] === undefined)
|
|
543
|
+
continue;
|
|
544
|
+
if (c.members != null && !c.members.includes(local))
|
|
545
|
+
continue;
|
|
546
|
+
active.push({ code: c.code, setting: c.setting ?? declared[c.code]?.setting ?? null, inCall: c.inCall === true });
|
|
547
|
+
}
|
|
548
|
+
active.sort((a, b) => conditionRank(a.code) - conditionRank(b.code));
|
|
549
|
+
const first = active[0];
|
|
550
|
+
// the degradation: a live one, else a static one declared for this platform (variant rows first)
|
|
551
|
+
let degradation = facts.degradation ?? null;
|
|
552
|
+
let degradationMessage;
|
|
553
|
+
const declaredDegradations = [];
|
|
554
|
+
for (const [arg, value] of Object.entries(facts.args ?? {})) {
|
|
555
|
+
const v = row?.variants?.[arg]?.[String(value)]?.degradations;
|
|
556
|
+
if (v !== undefined)
|
|
557
|
+
declaredDegradations.push(v);
|
|
558
|
+
}
|
|
559
|
+
if (row?.degradations !== undefined)
|
|
560
|
+
declaredDegradations.push(row.degradations);
|
|
561
|
+
if (degradation !== null) {
|
|
562
|
+
degradationMessage = declaredDegradations.map((d) => d[degradation]?.message).find((m) => m !== undefined);
|
|
563
|
+
}
|
|
564
|
+
else {
|
|
565
|
+
outer: for (const d of declaredDegradations) {
|
|
566
|
+
for (const [id, spec] of Object.entries(d)) {
|
|
567
|
+
if (spec.platforms !== undefined && here !== null && spec.platforms.includes(here)) {
|
|
568
|
+
degradation = id;
|
|
569
|
+
degradationMessage = spec.message;
|
|
570
|
+
break outer;
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
if (first === undefined) {
|
|
576
|
+
const explain = degradation === null ? null
|
|
577
|
+
: (degradationMessage !== undefined ? say("degraded", [], degradationMessage) : say("degraded"));
|
|
578
|
+
return { ready: true, condition: null, settled, degradation, remedy: null, explain };
|
|
579
|
+
}
|
|
580
|
+
let remedy;
|
|
581
|
+
let explain;
|
|
582
|
+
switch (first.code) {
|
|
583
|
+
case "permission_denied":
|
|
584
|
+
if (first.status === "restricted") {
|
|
585
|
+
remedy = null;
|
|
586
|
+
explain = say("permission_denied.restricted");
|
|
587
|
+
}
|
|
588
|
+
else if (first.canAsk) {
|
|
589
|
+
remedy = remedyOf("grant_permission", { inCall: true });
|
|
590
|
+
explain = say("permission_denied.ask");
|
|
591
|
+
}
|
|
592
|
+
else {
|
|
593
|
+
remedy = remedyOf("open_settings", { setting: "app" });
|
|
594
|
+
explain = say("permission_denied");
|
|
595
|
+
}
|
|
596
|
+
break;
|
|
597
|
+
case "switched_off":
|
|
598
|
+
remedy = remedyOf("enable_setting", { setting: first.setting, inCall: first.inCall });
|
|
599
|
+
explain = say(sentenceId(catalog, "switched_off", first.setting));
|
|
600
|
+
break;
|
|
601
|
+
case "not_set_up":
|
|
602
|
+
remedy = remedyOf("set_up", { setting: first.setting, inCall: first.inCall });
|
|
603
|
+
explain = say(sentenceId(catalog, "not_set_up", first.setting));
|
|
604
|
+
break;
|
|
605
|
+
case "offline":
|
|
606
|
+
remedy = remedyOf("connect", { setting: first.setting });
|
|
607
|
+
explain = say("offline");
|
|
608
|
+
break;
|
|
609
|
+
default:
|
|
610
|
+
remedy = remedyOf("wait");
|
|
611
|
+
explain = say("busy");
|
|
612
|
+
}
|
|
613
|
+
return { ready: false, condition: first.code, settled, degradation, remedy, explain };
|
|
614
|
+
}
|
|
615
|
+
//# sourceMappingURL=availability.js.map
|