@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,302 @@
|
|
|
1
|
+
//
|
|
2
|
+
// shot-scope.ts - THE SHOT SCOPE RESOLVER (platform/10-screenshot-execution.md §5).
|
|
3
|
+
//
|
|
4
|
+
// A screenshot of an empty screen is worthless and a screenshot of a raw binding is a store
|
|
5
|
+
// rejection, so the hard part of an automated screenshot is not rasterising - it is arriving
|
|
6
|
+
// at a RESOLVED SCOPE before anything draws. This file is that arrival, and nothing else: it
|
|
7
|
+
// is pure, it touches no DOM, no clock and no network, and every runtime can share it.
|
|
8
|
+
//
|
|
9
|
+
// WHAT IT DOES NOT DO, on purpose. It does not order the api graph (/web/11 already builds
|
|
10
|
+
// that DAG on all three kernels), it does not evaluate formulas (seed the leaves and let the
|
|
11
|
+
// graph run), and it does not decide emptiness (that needs a render - shot-guards.ts). A
|
|
12
|
+
// resolver that re-implemented any of those would be a second opinion about how the runtime
|
|
13
|
+
// behaves, held by one caller and tested by nobody.
|
|
14
|
+
//
|
|
15
|
+
// THE LADDER (§7d of the 09 document), highest wins, per NAME KIND:
|
|
16
|
+
//
|
|
17
|
+
// leaf state (attribute · variable · expects) global plane (global.*)
|
|
18
|
+
// 1 shot override 1 shot override
|
|
19
|
+
// 2 captured snapshot 2 captured snapshot
|
|
20
|
+
// 3 sample= 3 project hydrate
|
|
21
|
+
// 4 default= (attribute only) 4 FAIL
|
|
22
|
+
// 5 declared initial (variable body runs)
|
|
23
|
+
// 6 FAIL
|
|
24
|
+
//
|
|
25
|
+
// Globals have no `sample=` site - there is no declaration to hang one on - which is exactly
|
|
26
|
+
// why the project `hydrate` plane exists and why it sits at their tier 3.
|
|
27
|
+
//
|
|
28
|
+
// TIER 6/4 IS THE WHOLE POINT. A name that reaches it does not render as an empty string, a
|
|
29
|
+
// placeholder, or the binding text: the shot FAILS and names the binding. An image is never
|
|
30
|
+
// produced from an unresolved scope, which is the placeholder-content store rejection made
|
|
31
|
+
// structural rather than hoped for.
|
|
32
|
+
//
|
|
33
|
+
import { JSE } from "./jse/jse.js";
|
|
34
|
+
import { isDict } from "./jse/values.js";
|
|
35
|
+
// ── sample parsing (the three laws: JSON, no production semantics, lint-gated) ────────
|
|
36
|
+
/** A sample is JSON, never an expression - `JSON.parse` on every runner, in lint, and in
|
|
37
|
+
* every future native editor. A malformed one is a lint error at authoring time; here it
|
|
38
|
+
* is simply not a value, so the name falls through to the next tier honestly. */
|
|
39
|
+
export function parseSample(text) {
|
|
40
|
+
if (text === undefined)
|
|
41
|
+
return { ok: false, value: null };
|
|
42
|
+
try {
|
|
43
|
+
return { ok: true, value: JSON.parse(text) };
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
return { ok: false, value: null };
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
// ── url templates: matching by SHAPE, because the hole's value is the DAG's ───────────
|
|
50
|
+
const REGEX_SPECIAL = /[.*+?^${}()|[\]\\]/g;
|
|
51
|
+
/** One `{{ … }}` hole widened to a single url segment. A hole is one path segment or one
|
|
52
|
+
* query value - never a `/` or a `&` - so a template cannot swallow the rest of the url
|
|
53
|
+
* and quietly answer a request it was not written for. */
|
|
54
|
+
const HOLE_PATTERN = "[^/?&#]*";
|
|
55
|
+
/** `/api/orders?user={{ user.data.id }}` → an anchored regex source. */
|
|
56
|
+
export function templateToPattern(template) {
|
|
57
|
+
let out = "";
|
|
58
|
+
let index = 0;
|
|
59
|
+
while (index < template.length) {
|
|
60
|
+
const open = template.indexOf("{{", index);
|
|
61
|
+
if (open < 0) {
|
|
62
|
+
out += template.substring(index).replace(REGEX_SPECIAL, "\\$&");
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
const close = template.indexOf("}}", open);
|
|
66
|
+
if (close < 0) {
|
|
67
|
+
out += template.substring(index).replace(REGEX_SPECIAL, "\\$&");
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
out += template.substring(index, open).replace(REGEX_SPECIAL, "\\$&");
|
|
71
|
+
out += HOLE_PATTERN;
|
|
72
|
+
index = close + 2;
|
|
73
|
+
}
|
|
74
|
+
return `^${out}$`;
|
|
75
|
+
}
|
|
76
|
+
/** A concrete url that the template certainly matches - used to detect two templates that
|
|
77
|
+
* could both answer one request. */
|
|
78
|
+
function specimen(template) {
|
|
79
|
+
// The language of `/\{\{[^}]*\}\}/g`, walked once: a hole is `{{` up to the first `}`, which
|
|
80
|
+
// must be doubled; when it is not, no opener before that `}` can match either.
|
|
81
|
+
let out = "";
|
|
82
|
+
let from = 0;
|
|
83
|
+
let scan = 0;
|
|
84
|
+
for (;;) {
|
|
85
|
+
const open = template.indexOf("{{", scan);
|
|
86
|
+
if (open < 0)
|
|
87
|
+
break;
|
|
88
|
+
const brace = template.indexOf("}", open + 2);
|
|
89
|
+
if (brace < 0)
|
|
90
|
+
break;
|
|
91
|
+
if (template[brace + 1] !== "}") {
|
|
92
|
+
scan = brace + 1;
|
|
93
|
+
continue;
|
|
94
|
+
}
|
|
95
|
+
out += template.slice(from, open) + "x";
|
|
96
|
+
from = scan = brace + 2;
|
|
97
|
+
}
|
|
98
|
+
return out + template.slice(from);
|
|
99
|
+
}
|
|
100
|
+
function sameJson(a, b) {
|
|
101
|
+
return JSON.stringify(a ?? null) === JSON.stringify(b ?? null);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Two routes COLLIDE when one request could be answered by either with a different answer.
|
|
105
|
+
*
|
|
106
|
+
* Identical shapes carrying identical data are not a collision: it does not matter which one
|
|
107
|
+
* answers, so refusing them would be a false positive on a screen that legitimately declares
|
|
108
|
+
* the same read twice. What is refused is genuine ambiguity, and it is refused at PLAN time
|
|
109
|
+
* rather than becoming a runtime coin flip nobody can reproduce.
|
|
110
|
+
*/
|
|
111
|
+
export function seamCollisions(routes) {
|
|
112
|
+
const out = [];
|
|
113
|
+
for (let i = 0; i < routes.length; i += 1) {
|
|
114
|
+
for (let j = i + 1; j < routes.length; j += 1) {
|
|
115
|
+
const a = routes[i];
|
|
116
|
+
const b = routes[j];
|
|
117
|
+
if (a.method !== b.method)
|
|
118
|
+
continue;
|
|
119
|
+
if (sameJson(a.data, b.data))
|
|
120
|
+
continue;
|
|
121
|
+
const overlaps = new RegExp(a.pattern).test(specimen(b.template))
|
|
122
|
+
|| new RegExp(b.pattern).test(specimen(a.template));
|
|
123
|
+
if (overlaps)
|
|
124
|
+
out.push({ a: a.as, b: b.as });
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return out;
|
|
128
|
+
}
|
|
129
|
+
// ── the ladder ───────────────────────────────────────────────────────────────────────
|
|
130
|
+
function snapshotVars(snapshot) {
|
|
131
|
+
const out = {};
|
|
132
|
+
for (const row of snapshot?.vars ?? []) {
|
|
133
|
+
if (typeof row?.name === "string")
|
|
134
|
+
out[row.name] = row.value;
|
|
135
|
+
}
|
|
136
|
+
return out;
|
|
137
|
+
}
|
|
138
|
+
/** An `<api>` is REACHABLE for the response plane unless it is a mutation: a non-GET never
|
|
139
|
+
* auto-fires, so a shot that never taps anything cannot provoke one, and demanding a sample
|
|
140
|
+
* for a POST would fail screens that are perfectly renderable. */
|
|
141
|
+
function apiAutoFires(attrs) {
|
|
142
|
+
const method = (attrs["method"] ?? "GET").trim().toUpperCase();
|
|
143
|
+
if (method !== "GET")
|
|
144
|
+
return false;
|
|
145
|
+
const auto = (attrs["auto"] ?? "").trim();
|
|
146
|
+
return auto !== "false";
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Resolve one screen's shot scope. Pure: same inputs, same result, on every runtime.
|
|
150
|
+
*/
|
|
151
|
+
export function resolveShotScope(input) {
|
|
152
|
+
const head = input.head;
|
|
153
|
+
const mode = input.mode ?? "sample";
|
|
154
|
+
const overrideVars = (input.overrides?.vars ?? {});
|
|
155
|
+
const overrideGlobals = (input.overrides?.globals ?? {});
|
|
156
|
+
const snapVars = snapshotVars(input.snapshot);
|
|
157
|
+
const snapGlobals = (input.snapshot?.globals ?? {});
|
|
158
|
+
const hydrateGlobals = (input.hydrate?.global ?? {});
|
|
159
|
+
const routeParams = (input.routeParams ?? {});
|
|
160
|
+
const cassette = new Set(input.cassetteKeys ?? []);
|
|
161
|
+
const attrs = {};
|
|
162
|
+
const vars = {};
|
|
163
|
+
const globals = {};
|
|
164
|
+
const apiSeeds = {};
|
|
165
|
+
const seamPlan = [];
|
|
166
|
+
const unresolved = [];
|
|
167
|
+
const has = (bag, name) => Object.prototype.hasOwnProperty.call(bag, name);
|
|
168
|
+
// ── attributes: override > snapshot > route param > sample > default ──
|
|
169
|
+
//
|
|
170
|
+
// A route param is a REAL value the frame will genuinely be mounted with, so it outranks
|
|
171
|
+
// a planted sample: a shot of `/notes/7` whose sample says `3` would render the wrong
|
|
172
|
+
// note and look like a data bug to whoever reviewed it.
|
|
173
|
+
for (const row of head.attributes) {
|
|
174
|
+
if (/[A-Z]/.test(row.as))
|
|
175
|
+
continue;
|
|
176
|
+
const name = JSE.componentAttributeName(row.as);
|
|
177
|
+
if (has(overrideVars, name)) {
|
|
178
|
+
attrs[name] = overrideVars[name];
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
181
|
+
if (has(snapVars, name)) {
|
|
182
|
+
attrs[name] = snapVars[name];
|
|
183
|
+
continue;
|
|
184
|
+
}
|
|
185
|
+
if (has(routeParams, name)) {
|
|
186
|
+
attrs[name] = routeParams[name];
|
|
187
|
+
continue;
|
|
188
|
+
}
|
|
189
|
+
const sample = parseSample(row.sample);
|
|
190
|
+
if (sample.ok) {
|
|
191
|
+
attrs[name] = sample.value;
|
|
192
|
+
continue;
|
|
193
|
+
}
|
|
194
|
+
if (row.default !== undefined && row.default.trim().length > 0)
|
|
195
|
+
continue; // tier 4: the runtime evaluates it
|
|
196
|
+
unresolved.push({
|
|
197
|
+
kind: "attribute",
|
|
198
|
+
name,
|
|
199
|
+
reason: "no override, snapshot, route param, sample= or default=",
|
|
200
|
+
fix: `declare sample= on <attribute as="${row.as}"/>, or give it a default=`,
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
// ── expects: override > snapshot > sample-less, so hydrate is its floor ──
|
|
204
|
+
//
|
|
205
|
+
// `<expects>` names state a PARENT or the native layer seeds. Headless there is neither,
|
|
206
|
+
// so an unmet row is unresolved like any other leaf rather than silently null.
|
|
207
|
+
for (const name of head.expects ?? []) {
|
|
208
|
+
if (has(overrideVars, name)) {
|
|
209
|
+
vars[name] = overrideVars[name];
|
|
210
|
+
continue;
|
|
211
|
+
}
|
|
212
|
+
if (has(snapVars, name)) {
|
|
213
|
+
vars[name] = snapVars[name];
|
|
214
|
+
continue;
|
|
215
|
+
}
|
|
216
|
+
if (has(hydrateGlobals, name)) {
|
|
217
|
+
vars[name] = hydrateGlobals[name];
|
|
218
|
+
continue;
|
|
219
|
+
}
|
|
220
|
+
unresolved.push({
|
|
221
|
+
kind: "expects",
|
|
222
|
+
name,
|
|
223
|
+
reason: "seeded state with no seeder - a headless shot has no mounting side",
|
|
224
|
+
fix: `add "${name}" to the shot's vars, or declare it in the project hydrate plane`,
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
// ── variables: override > snapshot > sample, then the body runs (never unresolved) ──
|
|
228
|
+
for (const row of head.variables) {
|
|
229
|
+
const name = row.as;
|
|
230
|
+
if (has(overrideVars, name)) {
|
|
231
|
+
vars[name] = overrideVars[name];
|
|
232
|
+
continue;
|
|
233
|
+
}
|
|
234
|
+
if (has(snapVars, name)) {
|
|
235
|
+
vars[name] = snapVars[name];
|
|
236
|
+
continue;
|
|
237
|
+
}
|
|
238
|
+
const sample = parseSample(row.sample);
|
|
239
|
+
if (sample.ok) {
|
|
240
|
+
vars[name] = sample.value;
|
|
241
|
+
continue;
|
|
242
|
+
}
|
|
243
|
+
// tier 5: a <variable> has a body, so it resolves itself. A computed one derives from
|
|
244
|
+
// its inputs - seed the leaves, run the graph - and neither can be "missing".
|
|
245
|
+
}
|
|
246
|
+
// ── the global plane: override > snapshot > hydrate ──
|
|
247
|
+
for (const bag of [hydrateGlobals, snapGlobals, overrideGlobals]) {
|
|
248
|
+
for (const [k, v] of Object.entries(bag))
|
|
249
|
+
globals[k] = v;
|
|
250
|
+
}
|
|
251
|
+
// ── the response plane ──
|
|
252
|
+
for (const row of head.apis) {
|
|
253
|
+
const name = row.as;
|
|
254
|
+
if (!apiAutoFires(row.attrs))
|
|
255
|
+
continue;
|
|
256
|
+
const sample = parseSample(row.sample);
|
|
257
|
+
if (sample.ok) {
|
|
258
|
+
apiSeeds[name] = { data: sample.value };
|
|
259
|
+
seamPlan.push({
|
|
260
|
+
as: name,
|
|
261
|
+
method: (row.attrs["method"] ?? "GET").trim().toUpperCase(),
|
|
262
|
+
template: row.attrs["url"] ?? "",
|
|
263
|
+
pattern: templateToPattern(row.attrs["url"] ?? ""),
|
|
264
|
+
data: sample.value,
|
|
265
|
+
});
|
|
266
|
+
continue;
|
|
267
|
+
}
|
|
268
|
+
if (mode === "live" || mode === "record")
|
|
269
|
+
continue; // the network answers it
|
|
270
|
+
if (mode === "replay" && cassette.has(name))
|
|
271
|
+
continue; // the cassette answers it
|
|
272
|
+
unresolved.push({
|
|
273
|
+
kind: "api",
|
|
274
|
+
name,
|
|
275
|
+
reason: mode === "replay"
|
|
276
|
+
? "no sample= and no cassette entry"
|
|
277
|
+
: "no sample= - the shot would render a spinner or an empty list",
|
|
278
|
+
fix: `declare sample='…' on <api as="${name}"/>, or record a cassette`,
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
for (const clash of seamCollisions(seamPlan)) {
|
|
282
|
+
unresolved.push({
|
|
283
|
+
kind: "api",
|
|
284
|
+
name: `${clash.a} / ${clash.b}`,
|
|
285
|
+
reason: "two url templates could answer one request with different data",
|
|
286
|
+
fix: `make the urls of <api as="${clash.a}"/> and <api as="${clash.b}"/> distinguishable`,
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
return { attrs, vars, globals, apiSeeds, seamPlan, unresolved };
|
|
290
|
+
}
|
|
291
|
+
/** The one-line verdict a report prints. Kept here so every face says it the same way. */
|
|
292
|
+
export function shotScopeVerdict(result) {
|
|
293
|
+
if (result.unresolved.length === 0) {
|
|
294
|
+
return `scope resolved: ${Object.keys(result.attrs).length} attr(s), `
|
|
295
|
+
+ `${Object.keys(result.vars).length} var(s), `
|
|
296
|
+
+ `${Object.keys(result.globals).length} global(s), ${result.seamPlan.length} api route(s)`;
|
|
297
|
+
}
|
|
298
|
+
return `${result.unresolved.length} unresolved binding(s): `
|
|
299
|
+
+ result.unresolved.map((u) => `${u.kind} ${u.name}`).join(", ");
|
|
300
|
+
}
|
|
301
|
+
export { isDict as isShotDict };
|
|
302
|
+
//# sourceMappingURL=shot-scope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shot-scope.js","sourceRoot":"","sources":["../src/shot-scope.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,qFAAqF;AACrF,EAAE;AACF,6FAA6F;AAC7F,8FAA8F;AAC9F,8FAA8F;AAC9F,wFAAwF;AACxF,EAAE;AACF,4FAA4F;AA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,CAAC,IAAI,CAAC;YACd,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,GAAG,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,EAAE;YAC/B,MAAM,EAAE,gEAAgE;YACxE,GAAG,EAAE,6BAA6B,KAAK,CAAC,CAAC,oBAAoB,KAAK,CAAC,CAAC,qBAAqB;SAC1F,CAAC,CAAC;IACL,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;AAClE,CAAC;AAED,0FAA0F;AAC1F,MAAM,UAAU,gBAAgB,CAAC,MAAuB;IACtD,IAAI,MAAM,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACnC,OAAO,mBAAmB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,YAAY;cAClE,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,WAAW;cAC7C,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,eAAe,MAAM,CAAC,QAAQ,CAAC,MAAM,eAAe,CAAC;IAChG,CAAC;IACD,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,0BAA0B;UACxD,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACrE,CAAC;AAED,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** The slot names a built-in element renders. Everything else renders one anonymous slot. */
|
|
2
|
+
export declare function slotClaims(tag: string): readonly string[];
|
|
3
|
+
/**
|
|
4
|
+
* The group a child belongs to: the empty string for the default flow, else the slot name. A name
|
|
5
|
+
* the element does not render is NOT a slot, so the child stays in the default flow rather than
|
|
6
|
+
* disappearing.
|
|
7
|
+
*/
|
|
8
|
+
export declare function slotGroup(tag: string, slot: string | null | undefined): string;
|
|
9
|
+
//# sourceMappingURL=slot-partition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slot-partition.d.ts","sourceRoot":"","sources":["../src/slot-partition.ts"],"names":[],"mappings":"AAiBA,6FAA6F;AAC7F,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAQzD;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAI9E"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//
|
|
2
|
+
// slot-partition.ts - which group a child belongs to when its parent is a BUILT-IN element (the
|
|
3
|
+
// TypeScript twin of OpenSource/Engine/Swift/SlotPartition.swift and :core SlotPartition.kt).
|
|
4
|
+
//
|
|
5
|
+
// `slot="name"` chooses among the slots its parent renders. An element that renders none has one
|
|
6
|
+
// anonymous slot and every child goes there, which is what a browser does with an attribute it
|
|
7
|
+
// does not understand. The web already behaved that way for a plain container, differently for
|
|
8
|
+
// its accordion (unclaimed names fell into the body) and differently again for its popover
|
|
9
|
+
// (unclaimed names vanished); one table is what makes those one answer.
|
|
10
|
+
//
|
|
11
|
+
// Authored components are a different mechanism: their `<slot name="x">` elements declare what
|
|
12
|
+
// they render, and mount.ts partitions a consumer's children by that declaration. This table is
|
|
13
|
+
// only for tags the runtime itself implements.
|
|
14
|
+
//
|
|
15
|
+
// Corpus: OpenSource/Conformance/composition/slot-partition.json.
|
|
16
|
+
//
|
|
17
|
+
/** The slot names a built-in element renders. Everything else renders one anonymous slot. */
|
|
18
|
+
export function slotClaims(tag) {
|
|
19
|
+
switch (tag.toLowerCase()) {
|
|
20
|
+
case "accordion": return ["header"];
|
|
21
|
+
case "popover":
|
|
22
|
+
case "menu": return ["content"];
|
|
23
|
+
case "system-settings-row": return ["leading", "accessory", "subtitle"];
|
|
24
|
+
default: return [];
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The group a child belongs to: the empty string for the default flow, else the slot name. A name
|
|
29
|
+
* the element does not render is NOT a slot, so the child stays in the default flow rather than
|
|
30
|
+
* disappearing.
|
|
31
|
+
*/
|
|
32
|
+
export function slotGroup(tag, slot) {
|
|
33
|
+
const name = (slot ?? "").trim();
|
|
34
|
+
if (name === "")
|
|
35
|
+
return "";
|
|
36
|
+
return slotClaims(tag).includes(name) ? name : "";
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=slot-partition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slot-partition.js","sourceRoot":"","sources":["../src/slot-partition.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,iGAAiG;AACjG,+FAA+F;AAC/F,EAAE;AACF,kGAAkG;AAClG,gGAAgG;AAChG,gGAAgG;AAChG,4FAA4F;AAC5F,yEAAyE;AACzE,EAAE;AACF,gGAAgG;AAChG,iGAAiG;AACjG,gDAAgD;AAChD,EAAE;AACF,mEAAmE;AACnE,EAAE;AAEF,6FAA6F;AAC7F,MAAM,UAAU,UAAU,CAAC,GAAW;IACpC,QAAQ,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC;QAC1B,KAAK,WAAW,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACpC,KAAK,SAAS,CAAC;QACf,KAAK,MAAM,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAChC,KAAK,qBAAqB,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;QACxE,OAAO,CAAC,CAAC,OAAO,EAAE,CAAC;IACrB,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,GAAW,EAAE,IAA+B;IACpE,MAAM,IAAI,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACjC,IAAI,IAAI,KAAK,EAAE;QAAE,OAAO,EAAE,CAAC;IAC3B,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;AACpD,CAAC"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* snackbar.ts — the snackbar contract, TS twin.
|
|
3
|
+
*
|
|
4
|
+
* The law and the reasoning live in OpenSource/Conformance/overlays/README.md; the cases live
|
|
5
|
+
* in snackbar.json and run against THIS file (packages/kernel/test/snackbar-conformance.test.ts),
|
|
6
|
+
* against the Kotlin twin (:core SnackbarQueue.kt) and against the Swift twin
|
|
7
|
+
* (OpenSource/Engine/Swift/SnackbarQueue.swift).
|
|
8
|
+
*
|
|
9
|
+
* Everything here is pure: requests and endings in, the visible card / the queue / the
|
|
10
|
+
* settlements out. The surface work — presenting the card, running the timer, reading the
|
|
11
|
+
* safe area, animating the swipe — belongs to Core/Toast's per-platform facet. Keeping the
|
|
12
|
+
* decision separate from the plumbing is what lets one corpus judge three runtimes.
|
|
13
|
+
*/
|
|
14
|
+
/** How a snackbar ended. This is what `toast.show` resolves with. */
|
|
15
|
+
export type SnackbarResult = 'dismissed' | 'action' | 'timeout' | 'replaced';
|
|
16
|
+
export type SnackbarEdge = 'bottom' | 'top';
|
|
17
|
+
export interface SnackbarAction {
|
|
18
|
+
label: string;
|
|
19
|
+
id: string;
|
|
20
|
+
}
|
|
21
|
+
/** What a caller asked for. */
|
|
22
|
+
export interface SnackbarRequest {
|
|
23
|
+
id: string;
|
|
24
|
+
/** The bold first line; `message` becomes the second line. */
|
|
25
|
+
title?: string;
|
|
26
|
+
message?: string;
|
|
27
|
+
action?: SnackbarAction | null;
|
|
28
|
+
/** `short` (4s) · `long` (10s) · a NUMBER OF SECONDS (the unit Core/Toast ships). */
|
|
29
|
+
duration?: string | number | null;
|
|
30
|
+
tone?: string | null;
|
|
31
|
+
icon?: string | null;
|
|
32
|
+
position?: string | null;
|
|
33
|
+
dismissible?: boolean | null;
|
|
34
|
+
replace?: boolean | null;
|
|
35
|
+
}
|
|
36
|
+
/** A normalized card: what the presenter needs and nothing else. */
|
|
37
|
+
export interface SnackbarEntry {
|
|
38
|
+
id: string;
|
|
39
|
+
title: string;
|
|
40
|
+
message: string;
|
|
41
|
+
action: SnackbarAction | null;
|
|
42
|
+
durationMs: number;
|
|
43
|
+
tone: string;
|
|
44
|
+
icon: string;
|
|
45
|
+
position: SnackbarEdge;
|
|
46
|
+
dismissible: boolean;
|
|
47
|
+
}
|
|
48
|
+
export interface SnackbarSettlement {
|
|
49
|
+
id: string;
|
|
50
|
+
result: SnackbarResult;
|
|
51
|
+
}
|
|
52
|
+
export interface SnackbarState {
|
|
53
|
+
/** The card on screen (the oldest when several are), or null. */
|
|
54
|
+
current: SnackbarEntry | null;
|
|
55
|
+
/** The cards visible BESIDE `current`, oldest first. Empty at capacity 1. */
|
|
56
|
+
stack: SnackbarEntry[];
|
|
57
|
+
/** How many cards may be visible at once: 1 on a compact width, up to 3 on a regular one. */
|
|
58
|
+
capacity: number;
|
|
59
|
+
/** Cards waiting, in FIFO order. Never includes a visible card. */
|
|
60
|
+
queue: SnackbarEntry[];
|
|
61
|
+
/** Every settlement so far, in the order they happened. */
|
|
62
|
+
settled: SnackbarSettlement[];
|
|
63
|
+
}
|
|
64
|
+
/** `id` on elapse/action/dismiss names the card they end; absent, the oldest visible card. */
|
|
65
|
+
export type SnackbarOp = ({
|
|
66
|
+
op: 'show';
|
|
67
|
+
} & SnackbarRequest) | {
|
|
68
|
+
op: 'elapse';
|
|
69
|
+
id?: string | null;
|
|
70
|
+
} | {
|
|
71
|
+
op: 'action';
|
|
72
|
+
id?: string | null;
|
|
73
|
+
} | {
|
|
74
|
+
op: 'dismiss';
|
|
75
|
+
id?: string | null;
|
|
76
|
+
} | {
|
|
77
|
+
op: 'hide';
|
|
78
|
+
id?: string | null;
|
|
79
|
+
} | {
|
|
80
|
+
op: 'capacity';
|
|
81
|
+
n: number;
|
|
82
|
+
};
|
|
83
|
+
/** The most cards one surface ever shows at once. */
|
|
84
|
+
export declare const SNACKBAR_MAX_VISIBLE = 3;
|
|
85
|
+
/** Material's two words, in milliseconds. */
|
|
86
|
+
export declare const SNACKBAR_SHORT_MS = 4000;
|
|
87
|
+
export declare const SNACKBAR_LONG_MS = 10000;
|
|
88
|
+
/** The duration Core/Toast has shipped since it existed, kept as the wordless default. */
|
|
89
|
+
export declare const SNACKBAR_DEFAULT_MS = 2000;
|
|
90
|
+
/** A toast nobody can finish reading is not a toast. */
|
|
91
|
+
export declare const SNACKBAR_MIN_MS = 1000;
|
|
92
|
+
/** A ceiling, so a bad number cannot pin a card to the screen forever (one day). */
|
|
93
|
+
export declare const SNACKBAR_MAX_MS = 86400000;
|
|
94
|
+
/** The inset between the card and whatever is under it. */
|
|
95
|
+
export declare const SNACKBAR_GAP = 16;
|
|
96
|
+
/** A top-edge card sits closer: it is a banner, not a floating capsule. */
|
|
97
|
+
export declare const SNACKBAR_TOP_GAP = 12;
|
|
98
|
+
/**
|
|
99
|
+
* How long the card stays up, in milliseconds.
|
|
100
|
+
*
|
|
101
|
+
* The WORDS are Material's. A NUMBER STAYS SECONDS: that is the unit `toast.show({ duration })`
|
|
102
|
+
* has always taken, and redefining it under the same key would halve or double every toast
|
|
103
|
+
* already shipped. An unrecognized word falls back to the default rather than failing a build.
|
|
104
|
+
*
|
|
105
|
+
* The default is the shipped 2s — EXCEPT when the caller supplied an action button, where two
|
|
106
|
+
* seconds is not enough time to notice an Undo and reach it, so `short` takes over.
|
|
107
|
+
*/
|
|
108
|
+
export declare function resolveDuration(duration: string | number | null | undefined, hasAction?: boolean): number;
|
|
109
|
+
/** The requested edge, normalized. A typo is `bottom`, never a build failure. */
|
|
110
|
+
export declare function resolveEdge(position: string | null | undefined): SnackbarEdge;
|
|
111
|
+
/** A request, normalized into the card the presenter draws. */
|
|
112
|
+
export declare function normalizeRequest(req: SnackbarRequest): SnackbarEntry;
|
|
113
|
+
export declare function snackbarInitial(capacity?: number): SnackbarState;
|
|
114
|
+
/** Every visible card, oldest first. */
|
|
115
|
+
export declare function snackbarVisible(state: SnackbarState): SnackbarEntry[];
|
|
116
|
+
/**
|
|
117
|
+
* The whole queue, in one reducer.
|
|
118
|
+
*
|
|
119
|
+
* ONE AT A TIME, FIFO, on a compact width (capacity 1): stacking snackbars there is how a
|
|
120
|
+
* bottom sheet becomes unreachable, so a second `show` waits its turn, unless it asks to
|
|
121
|
+
* `replace`, which settles the newest visible card as `replaced` and takes its place. On a
|
|
122
|
+
* regular width the presenter raises `capacity` (up to 3) and up to that many cards are
|
|
123
|
+
* visible at once, each with its own ending; the rest still wait FIFO. Replace is a SWAP, not a
|
|
124
|
+
* reset: the cards already waiting keep waiting, because the caller asked to change what is on
|
|
125
|
+
* screen, not to cancel a backlog.
|
|
126
|
+
*
|
|
127
|
+
* Every card settles EXACTLY ONCE, which is what makes `show` resolvable on outcome: an
|
|
128
|
+
* awaited `show` that never settles is a leaked promise, and one that settles twice is a
|
|
129
|
+
* double undo.
|
|
130
|
+
*/
|
|
131
|
+
export declare function snackbarApply(state: SnackbarState, op: SnackbarOp): SnackbarState;
|
|
132
|
+
/** Cards waiting behind the visible one — what `toast.queue()` resolves. */
|
|
133
|
+
export declare function snackbarPending(state: SnackbarState): number;
|
|
134
|
+
export interface SnackbarChrome {
|
|
135
|
+
position?: string | null;
|
|
136
|
+
safeAreaTop: number;
|
|
137
|
+
safeAreaBottom: number;
|
|
138
|
+
/** A tab bar / bottom navigation, 0 when there is none. */
|
|
139
|
+
bottomBar: number;
|
|
140
|
+
/** The height a floating action button occupies above the bar, 0 when there is none. */
|
|
141
|
+
fab: number;
|
|
142
|
+
/** What the soft keyboard covers of the layout viewport. */
|
|
143
|
+
keyboard: number;
|
|
144
|
+
}
|
|
145
|
+
export interface SnackbarLift {
|
|
146
|
+
edge: SnackbarEdge;
|
|
147
|
+
/** Points from that edge to the near side of the card. */
|
|
148
|
+
inset: number;
|
|
149
|
+
/** The invariant, reported rather than assumed. */
|
|
150
|
+
clearsHomeIndicator: boolean;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Where the card sits.
|
|
154
|
+
*
|
|
155
|
+
* The keyboard, when it is up, IS the obstruction: it already covers the bottom bar, the FAB
|
|
156
|
+
* and the safe area, so adding them would push the card into the middle of the screen.
|
|
157
|
+
* Otherwise the obstruction is the safe area plus the bar plus whatever the FAB occupies
|
|
158
|
+
* above it. The 16pt gap goes on top of whichever won.
|
|
159
|
+
*
|
|
160
|
+
* THE INVARIANT: the bottom inset is never less than the safe-area inset plus the gap, so no
|
|
161
|
+
* geometry a platform reports — including nonsense from a rotation race — can put the card on
|
|
162
|
+
* the home indicator.
|
|
163
|
+
*/
|
|
164
|
+
export declare function resolveLift(chrome: SnackbarChrome): SnackbarLift;
|
|
165
|
+
//# sourceMappingURL=snackbar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snackbar.d.ts","sourceRoot":"","sources":["../src/snackbar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,qEAAqE;AACrE,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAC;AAE7E,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,KAAK,CAAC;AAE5C,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,+BAA+B;AAC/B,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAA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