@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,95 @@
|
|
|
1
|
+
/** The placeholder each rule leaves behind. Pinned by the corpus — a sink's grouping keys are
|
|
2
|
+
* built from scrubbed text, so changing one of these re-groups every historical issue. */
|
|
3
|
+
export declare const TELEMETRY_PLACEHOLDERS: {
|
|
4
|
+
readonly email: "[email]";
|
|
5
|
+
readonly bearer: "Bearer [token]";
|
|
6
|
+
readonly jwt: "[jwt]";
|
|
7
|
+
readonly phone: "[phone]";
|
|
8
|
+
readonly card: "[card]";
|
|
9
|
+
readonly home: "[user]";
|
|
10
|
+
readonly key: "[redacted]";
|
|
11
|
+
};
|
|
12
|
+
/** The Luhn check every card rule gates on. Without it a 16-digit order number reads as a card
|
|
13
|
+
* and the developer loses the one field that would have identified the order. */
|
|
14
|
+
export declare function telemetryLuhn(digits: string): boolean;
|
|
15
|
+
/** The rule ids in application order — the corpus asserts this list, so a rule cannot be
|
|
16
|
+
* reordered on one renderer only. */
|
|
17
|
+
export declare const TELEMETRY_SCRUB_ORDER: readonly string[];
|
|
18
|
+
/** Is this a key whose value never leaves the device? */
|
|
19
|
+
export declare function telemetryIsSensitiveKey(key: string): boolean;
|
|
20
|
+
/** Redact one string. Applied at ENQUEUE, never at send — a crash during flush must not be able
|
|
21
|
+
* to leak an unredacted buffer, so the buffer never holds one. */
|
|
22
|
+
export declare function telemetryScrubText(input: string): string;
|
|
23
|
+
/** Redact one key/value pair: a sensitive key drops the value whole, everything else is scrubbed
|
|
24
|
+
* as text. */
|
|
25
|
+
export declare function telemetryScrubValue(key: string, value: string): string;
|
|
26
|
+
/** The ARG SHAPE of a failed `dsx.module` call: keys and value TYPES, never values. What is
|
|
27
|
+
* diagnostic about a failed call is which fields were present, and that is exactly the part that
|
|
28
|
+
* carries no secrets. */
|
|
29
|
+
export declare function telemetryArgShape(args: Readonly<Record<string, unknown>> | null | undefined): Record<string, string>;
|
|
30
|
+
/** Collapse the varying parts of a message so a crash loop folds to one fingerprint: addresses
|
|
31
|
+
* become `<addr>`, digit runs become `#`, whitespace collapses, and the tail is capped. */
|
|
32
|
+
export declare function telemetryCollapseMessage(message: string | null | undefined): string;
|
|
33
|
+
/** The dedupe/grouping key: source, code and the collapsed message. Two crashes at different
|
|
34
|
+
* addresses are ONE issue, which is the difference between a count and ten thousand events. */
|
|
35
|
+
export declare function telemetryFingerprint(source: string, code: string, message?: string | null): string;
|
|
36
|
+
/** FNV-1a 32-bit over UTF-8 — the one hash all three renderers compute identically. */
|
|
37
|
+
export declare function telemetryHash32(input: string): number;
|
|
38
|
+
/** Deterministic sampling: a pure function of the fingerprint, not a random draw, so one device's
|
|
39
|
+
* sample decision is every device's and a corpus can pin it. */
|
|
40
|
+
export declare function telemetrySampled(fingerprintKey: string, rate: number): boolean;
|
|
41
|
+
/** Exponential backoff, capped at five minutes. No jitter: a corpus cannot pin a random number,
|
|
42
|
+
* and the platform half is free to add jitter where it schedules the retry. */
|
|
43
|
+
export declare function telemetryBackoffMs(attempt: number): number;
|
|
44
|
+
/** What the owner does with a sink's answer to one batch: `remaining` events were not delivered (a later
|
|
45
|
+
* request was refused) and stay queued; `skipped` events were too large to send and are acknowledged without
|
|
46
|
+
* being sent. `sent` never includes a skipped event. */
|
|
47
|
+
export declare function telemetryFlushAccounting(batch: number, answer: {
|
|
48
|
+
skipped?: unknown;
|
|
49
|
+
remaining?: unknown;
|
|
50
|
+
} | null | undefined): {
|
|
51
|
+
acknowledge: number;
|
|
52
|
+
sent: number;
|
|
53
|
+
skipped: number;
|
|
54
|
+
retry: boolean;
|
|
55
|
+
};
|
|
56
|
+
/** What `offer` decided. `evicted` means the event was accepted AND the oldest one fell out. */
|
|
57
|
+
export type TelemetryOfferOutcome = "accepted" | "deduped" | "evicted";
|
|
58
|
+
export interface TelemetryOfferResult {
|
|
59
|
+
readonly outcome: TelemetryOfferOutcome;
|
|
60
|
+
readonly size: number;
|
|
61
|
+
readonly dropped: number;
|
|
62
|
+
readonly count: number;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* The bounded, de-duplicating event ring — pure, so the corpus judges it on every renderer.
|
|
66
|
+
*
|
|
67
|
+
* The platform half persists it to disk and drives the flush timer; nothing here does IO. A repeat
|
|
68
|
+
* of a live fingerprint inside the window increments a COUNT and slides the window, so a crash
|
|
69
|
+
* loop reports "this happened 4,182 times" instead of filling the queue with itself. Overflow
|
|
70
|
+
* drops the OLDEST and counts the drop, because the newest crash is the one being debugged and a
|
|
71
|
+
* silent drop is a lie to the sink.
|
|
72
|
+
*/
|
|
73
|
+
export declare class TelemetryQueue {
|
|
74
|
+
#private;
|
|
75
|
+
readonly capacity: number;
|
|
76
|
+
readonly windowMs: number;
|
|
77
|
+
readonly maxBatch: number;
|
|
78
|
+
constructor(capacity: number, windowMs: number, maxBatch: number);
|
|
79
|
+
get size(): number;
|
|
80
|
+
/** Events lost to the bound, ever. Reported to the sink so it sees its own blind spot. */
|
|
81
|
+
get dropped(): number;
|
|
82
|
+
offer(fingerprintKey: string, at: number): TelemetryOfferResult;
|
|
83
|
+
/** The next batch's fingerprints, oldest first, capped at `maxBatch`. */
|
|
84
|
+
batch(): string[];
|
|
85
|
+
/** How many times a live fingerprint has been seen, or 0 when it is not queued. */
|
|
86
|
+
countOf(fingerprintKey: string): number;
|
|
87
|
+
/** Drop the first `n` events — called after the sink accepted them. Never underflows. */
|
|
88
|
+
ack(n: number): {
|
|
89
|
+
size: number;
|
|
90
|
+
};
|
|
91
|
+
/** Revoked consent drops everything pending, and the drop is NOT counted: those events were
|
|
92
|
+
* never the sink's to know about. */
|
|
93
|
+
clear(): void;
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=telemetry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../src/telemetry.ts"],"names":[],"mappings":"AAcA;2FAC2F;AAC3F,eAAO,MAAM,sBAAsB;;;;;;;;CAQzB,CAAC;AAkBX;kFACkF;AAClF,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAcrD;AAmCD;sCACsC;AACtC,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAAuC,CAAC;AAyB3F,yDAAyD;AACzD,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAE5D;AAED;mEACmE;AACnE,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMxD;AAED;eACe;AACf,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED;;0BAE0B;AAC1B,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAQpH;AAQD;4FAC4F;AAC5F,wBAAgB,wBAAwB,CAAC,OAAO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,MAAM,CAAC;gBAId,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAMhE,IAAI,IAAI,IAAI,MAAM,CAA+B;IACjD,0FAA0F;IAC1F,IAAI,OAAO,IAAI,MAAM,CAA0B;IAE/C,KAAK,CAAC,cAAc,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,oBAAoB;IAkB/D,yEAAyE;IACzE,KAAK,IAAI,MAAM,EAAE;IAIjB,mFAAmF;IACnF,OAAO,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM;IAKvC,yFAAyF;IACzF,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;IAKhC;0CACsC;IACtC,KAAK,IAAI,IAAI;CAGd"}
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
//
|
|
2
|
+
// telemetry.ts — the shared telemetry core: the SCRUBBER and the QUEUE POLICY. The law is the
|
|
3
|
+
// corpus, OpenSource/Conformance/telemetry/{scrub,queue}.json (parity/F10-telemetry.md); the
|
|
4
|
+
// Kotlin twin is :core TelemetryPolicy.kt and the Swift twin is Engine/Swift/TelemetryPolicy.swift.
|
|
5
|
+
//
|
|
6
|
+
// Everything platform-shaped lives OUTSIDE this file — crash handlers, the ANR watchdog, the
|
|
7
|
+
// on-disk queue, the transports. What is here is the half that decides WHAT LEAVES THE DEVICE,
|
|
8
|
+
// which is exactly the half that must not drift between renderers: a redaction rule that fires
|
|
9
|
+
// on iOS and not on Android is a privacy defect with a platform column.
|
|
10
|
+
//
|
|
11
|
+
// This file records nothing and sends nothing. Core/Telemetry is a SINK ADAPTER over the kernel
|
|
12
|
+
// error ledger (`dsx.errors`, error-system.md); it never becomes a second error system.
|
|
13
|
+
//
|
|
14
|
+
/** The placeholder each rule leaves behind. Pinned by the corpus — a sink's grouping keys are
|
|
15
|
+
* built from scrubbed text, so changing one of these re-groups every historical issue. */
|
|
16
|
+
export const TELEMETRY_PLACEHOLDERS = {
|
|
17
|
+
email: "[email]",
|
|
18
|
+
bearer: "Bearer [token]",
|
|
19
|
+
jwt: "[jwt]",
|
|
20
|
+
phone: "[phone]",
|
|
21
|
+
card: "[card]",
|
|
22
|
+
home: "[user]",
|
|
23
|
+
key: "[redacted]",
|
|
24
|
+
};
|
|
25
|
+
/** Digits only, for the Luhn gate. */
|
|
26
|
+
function digitsOf(text) {
|
|
27
|
+
let out = "";
|
|
28
|
+
for (const ch of text)
|
|
29
|
+
if (ch >= "0" && ch <= "9")
|
|
30
|
+
out += ch;
|
|
31
|
+
return out;
|
|
32
|
+
}
|
|
33
|
+
/** The Luhn check every card rule gates on. Without it a 16-digit order number reads as a card
|
|
34
|
+
* and the developer loses the one field that would have identified the order. */
|
|
35
|
+
export function telemetryLuhn(digits) {
|
|
36
|
+
if (digits.length === 0)
|
|
37
|
+
return false;
|
|
38
|
+
let sum = 0;
|
|
39
|
+
let alternate = false;
|
|
40
|
+
for (let i = digits.length - 1; i >= 0; i--) {
|
|
41
|
+
let value = digits.charCodeAt(i) - 48;
|
|
42
|
+
if (alternate) {
|
|
43
|
+
value *= 2;
|
|
44
|
+
if (value > 9)
|
|
45
|
+
value -= 9;
|
|
46
|
+
}
|
|
47
|
+
sum += value;
|
|
48
|
+
alternate = !alternate;
|
|
49
|
+
}
|
|
50
|
+
return sum % 10 === 0;
|
|
51
|
+
}
|
|
52
|
+
function cardShaped(match) {
|
|
53
|
+
const digits = digitsOf(match);
|
|
54
|
+
return digits.length >= 14 && digits.length <= 19 && telemetryLuhn(digits);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* The ordered rule table. ORDER IS CONTRACT (corpus `order`):
|
|
58
|
+
* bearer before jwt — an Authorization header collapses to ONE placeholder rather than
|
|
59
|
+
* `Bearer [jwt]`, which reads like the header survived;
|
|
60
|
+
* card before phone — a card number is never reported as a phone number;
|
|
61
|
+
* home before phone — a path is redacted as a path.
|
|
62
|
+
*
|
|
63
|
+
* The `bearer` prefix is spelled as explicit character classes rather than a case-insensitive
|
|
64
|
+
* flag: the three regex engines disagree about inline modifiers and agree about character
|
|
65
|
+
* classes, and one scrubber that behaves differently per platform is worse than none.
|
|
66
|
+
*/
|
|
67
|
+
const SCRUB_RULES = [
|
|
68
|
+
{ id: "bearer", pattern: /[Bb][Ee][Aa][Rr][Ee][Rr] [A-Za-z0-9._~+/=-]{8,}/g, replace: TELEMETRY_PLACEHOLDERS.bearer },
|
|
69
|
+
{ id: "jwt", pattern: /eyJ[A-Za-z0-9_-]{4,}\.[A-Za-z0-9_-]{4,}(\.[A-Za-z0-9_-]+)?/g, replace: TELEMETRY_PLACEHOLDERS.jwt },
|
|
70
|
+
{ id: "email", pattern: /[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g, replace: TELEMETRY_PLACEHOLDERS.email },
|
|
71
|
+
{ id: "homeUnix", pattern: /\/Users\/[^/\s"']+/g, replace: `/Users/${TELEMETRY_PLACEHOLDERS.home}` },
|
|
72
|
+
{ id: "homeLinux", pattern: /\/home\/[^/\s"']+/g, replace: `/home/${TELEMETRY_PLACEHOLDERS.home}` },
|
|
73
|
+
{ id: "homeWindows", pattern: /Users\\[^\\/\s"']+/g, replace: `Users\\${TELEMETRY_PLACEHOLDERS.home}` },
|
|
74
|
+
{ id: "cardAmex", pattern: /[0-9]{4}[ -][0-9]{6}[ -][0-9]{5}/g, replace: TELEMETRY_PLACEHOLDERS.card, check: cardShaped },
|
|
75
|
+
{ id: "cardGrouped", pattern: /[0-9]{4}[ -][0-9]{4}[ -][0-9]{4}[ -][0-9]{1,7}/g, replace: TELEMETRY_PLACEHOLDERS.card, check: cardShaped },
|
|
76
|
+
// Greedy on purpose: a maximal digit run longer than 19 fails `cardShaped` and stays readable,
|
|
77
|
+
// which is how a 23-digit reference number survives without a lookbehind (three engines, one
|
|
78
|
+
// behavior).
|
|
79
|
+
{ id: "cardPlain", pattern: /[0-9]{14,}/g, replace: TELEMETRY_PLACEHOLDERS.card, check: cardShaped },
|
|
80
|
+
{ id: "phoneInternational", pattern: /\+[0-9][0-9 ().-]{6,18}[0-9]/g, replace: TELEMETRY_PLACEHOLDERS.phone },
|
|
81
|
+
{ id: "phoneGrouped", pattern: /\(?[0-9]{3}\)?[ .-][0-9]{3}[ .-][0-9]{4}/g, replace: TELEMETRY_PLACEHOLDERS.phone },
|
|
82
|
+
];
|
|
83
|
+
/** The rule ids in application order — the corpus asserts this list, so a rule cannot be
|
|
84
|
+
* reordered on one renderer only. */
|
|
85
|
+
export const TELEMETRY_SCRUB_ORDER = SCRUB_RULES.map((rule) => rule.id);
|
|
86
|
+
/**
|
|
87
|
+
* Keys whose VALUE is dropped whole, whatever it looks like.
|
|
88
|
+
*
|
|
89
|
+
* Matching is on the normalized key (lowercased, non-alphanumerics removed) and is EXACT, never a
|
|
90
|
+
* substring: `token` redacts, `tokenCount` does not, because a scrubber that eats metric names
|
|
91
|
+
* gets switched off. `email` and `phone` are deliberately absent — their values are still scrubbed
|
|
92
|
+
* by the text pass, and `identify` passes its explicit fields around the scrubber entirely, which
|
|
93
|
+
* is what "opt-in per field" means.
|
|
94
|
+
*/
|
|
95
|
+
const SENSITIVE_KEYS = new Set([
|
|
96
|
+
"password", "passwd", "secret", "token", "accesstoken", "refreshtoken", "idtoken", "apikey",
|
|
97
|
+
"authorization", "cookie", "setcookie", "sessionid", "ssn", "creditcard", "cardnumber",
|
|
98
|
+
"cvv", "cvc", "pin", "privatekey", "clientsecret",
|
|
99
|
+
]);
|
|
100
|
+
function normalizeKey(key) {
|
|
101
|
+
let out = "";
|
|
102
|
+
for (const ch of key.toLowerCase()) {
|
|
103
|
+
if ((ch >= "a" && ch <= "z") || (ch >= "0" && ch <= "9"))
|
|
104
|
+
out += ch;
|
|
105
|
+
}
|
|
106
|
+
return out;
|
|
107
|
+
}
|
|
108
|
+
/** Is this a key whose value never leaves the device? */
|
|
109
|
+
export function telemetryIsSensitiveKey(key) {
|
|
110
|
+
return SENSITIVE_KEYS.has(normalizeKey(key));
|
|
111
|
+
}
|
|
112
|
+
/** Redact one string. Applied at ENQUEUE, never at send — a crash during flush must not be able
|
|
113
|
+
* to leak an unredacted buffer, so the buffer never holds one. */
|
|
114
|
+
export function telemetryScrubText(input) {
|
|
115
|
+
let text = input;
|
|
116
|
+
for (const rule of SCRUB_RULES) {
|
|
117
|
+
text = text.replace(rule.pattern, (match) => (rule.check && !rule.check(match) ? match : rule.replace));
|
|
118
|
+
}
|
|
119
|
+
return text;
|
|
120
|
+
}
|
|
121
|
+
/** Redact one key/value pair: a sensitive key drops the value whole, everything else is scrubbed
|
|
122
|
+
* as text. */
|
|
123
|
+
export function telemetryScrubValue(key, value) {
|
|
124
|
+
return telemetryIsSensitiveKey(key) ? TELEMETRY_PLACEHOLDERS.key : telemetryScrubText(value);
|
|
125
|
+
}
|
|
126
|
+
/** The ARG SHAPE of a failed `dsx.module` call: keys and value TYPES, never values. What is
|
|
127
|
+
* diagnostic about a failed call is which fields were present, and that is exactly the part that
|
|
128
|
+
* carries no secrets. */
|
|
129
|
+
export function telemetryArgShape(args) {
|
|
130
|
+
const out = {};
|
|
131
|
+
if (!args)
|
|
132
|
+
return out;
|
|
133
|
+
for (const key of Object.keys(args).sort()) {
|
|
134
|
+
const value = args[key];
|
|
135
|
+
out[key] = value === null ? "null" : Array.isArray(value) ? "array" : typeof value;
|
|
136
|
+
}
|
|
137
|
+
return out;
|
|
138
|
+
}
|
|
139
|
+
// ─────────────────────────── the queue policy ───────────────────────────
|
|
140
|
+
const HEX_RUN = /0[xX][0-9a-fA-F]+/g;
|
|
141
|
+
const DIGIT_RUN = /[0-9]+/g;
|
|
142
|
+
const WHITESPACE_RUN = /\s+/g;
|
|
143
|
+
/** Collapse the varying parts of a message so a crash loop folds to one fingerprint: addresses
|
|
144
|
+
* become `<addr>`, digit runs become `#`, whitespace collapses, and the tail is capped. */
|
|
145
|
+
export function telemetryCollapseMessage(message) {
|
|
146
|
+
if (!message)
|
|
147
|
+
return "";
|
|
148
|
+
const folded = message.replace(HEX_RUN, "<addr>").replace(DIGIT_RUN, "#").replace(WHITESPACE_RUN, " ").trim();
|
|
149
|
+
return folded.length > 200 ? folded.slice(0, 200) : folded;
|
|
150
|
+
}
|
|
151
|
+
/** The dedupe/grouping key: source, code and the collapsed message. Two crashes at different
|
|
152
|
+
* addresses are ONE issue, which is the difference between a count and ten thousand events. */
|
|
153
|
+
export function telemetryFingerprint(source, code, message) {
|
|
154
|
+
return `${source}|${code}|${telemetryCollapseMessage(message)}`;
|
|
155
|
+
}
|
|
156
|
+
/** FNV-1a 32-bit over UTF-8 — the one hash all three renderers compute identically. */
|
|
157
|
+
export function telemetryHash32(input) {
|
|
158
|
+
const bytes = new TextEncoder().encode(input);
|
|
159
|
+
let hash = 0x811c9dc5;
|
|
160
|
+
for (const byte of bytes) {
|
|
161
|
+
hash ^= byte;
|
|
162
|
+
hash = Math.imul(hash, 0x01000193) >>> 0;
|
|
163
|
+
}
|
|
164
|
+
return hash >>> 0;
|
|
165
|
+
}
|
|
166
|
+
/** Deterministic sampling: a pure function of the fingerprint, not a random draw, so one device's
|
|
167
|
+
* sample decision is every device's and a corpus can pin it. */
|
|
168
|
+
export function telemetrySampled(fingerprintKey, rate) {
|
|
169
|
+
if (!(rate > 0))
|
|
170
|
+
return false;
|
|
171
|
+
if (rate >= 1)
|
|
172
|
+
return true;
|
|
173
|
+
return telemetryHash32(fingerprintKey) % 10000 < Math.round(rate * 10000);
|
|
174
|
+
}
|
|
175
|
+
/** Exponential backoff, capped at five minutes. No jitter: a corpus cannot pin a random number,
|
|
176
|
+
* and the platform half is free to add jitter where it schedules the retry. */
|
|
177
|
+
export function telemetryBackoffMs(attempt) {
|
|
178
|
+
if (attempt <= 0)
|
|
179
|
+
return 0;
|
|
180
|
+
const delay = 1000 * Math.pow(2, attempt - 1);
|
|
181
|
+
return delay > 300000 ? 300000 : delay;
|
|
182
|
+
}
|
|
183
|
+
/** What the owner does with a sink's answer to one batch: `remaining` events were not delivered (a later
|
|
184
|
+
* request was refused) and stay queued; `skipped` events were too large to send and are acknowledged without
|
|
185
|
+
* being sent. `sent` never includes a skipped event. */
|
|
186
|
+
export function telemetryFlushAccounting(batch, answer) {
|
|
187
|
+
const count = (value, max) => Math.min(max, Math.max(0, Math.trunc(Number(value) || 0)));
|
|
188
|
+
const remaining = count(answer?.remaining, batch);
|
|
189
|
+
const acknowledge = batch - remaining;
|
|
190
|
+
const skipped = count(answer?.skipped, acknowledge);
|
|
191
|
+
return { acknowledge, sent: acknowledge - skipped, skipped, retry: remaining > 0 };
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* The bounded, de-duplicating event ring — pure, so the corpus judges it on every renderer.
|
|
195
|
+
*
|
|
196
|
+
* The platform half persists it to disk and drives the flush timer; nothing here does IO. A repeat
|
|
197
|
+
* of a live fingerprint inside the window increments a COUNT and slides the window, so a crash
|
|
198
|
+
* loop reports "this happened 4,182 times" instead of filling the queue with itself. Overflow
|
|
199
|
+
* drops the OLDEST and counts the drop, because the newest crash is the one being debugged and a
|
|
200
|
+
* silent drop is a lie to the sink.
|
|
201
|
+
*/
|
|
202
|
+
export class TelemetryQueue {
|
|
203
|
+
capacity;
|
|
204
|
+
windowMs;
|
|
205
|
+
maxBatch;
|
|
206
|
+
#items = [];
|
|
207
|
+
#dropped = 0;
|
|
208
|
+
constructor(capacity, windowMs, maxBatch) {
|
|
209
|
+
this.capacity = capacity;
|
|
210
|
+
this.windowMs = windowMs;
|
|
211
|
+
this.maxBatch = maxBatch;
|
|
212
|
+
}
|
|
213
|
+
get size() { return this.#items.length; }
|
|
214
|
+
/** Events lost to the bound, ever. Reported to the sink so it sees its own blind spot. */
|
|
215
|
+
get dropped() { return this.#dropped; }
|
|
216
|
+
offer(fingerprintKey, at) {
|
|
217
|
+
for (const item of this.#items) {
|
|
218
|
+
if (item.fingerprint === fingerprintKey && at - item.at < this.windowMs) {
|
|
219
|
+
item.count += 1;
|
|
220
|
+
item.at = at;
|
|
221
|
+
return { outcome: "deduped", size: this.#items.length, dropped: this.#dropped, count: item.count };
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
this.#items.push({ fingerprint: fingerprintKey, at, count: 1 });
|
|
225
|
+
let outcome = "accepted";
|
|
226
|
+
if (this.#items.length > this.capacity) {
|
|
227
|
+
this.#items.shift();
|
|
228
|
+
this.#dropped += 1;
|
|
229
|
+
outcome = "evicted";
|
|
230
|
+
}
|
|
231
|
+
return { outcome, size: this.#items.length, dropped: this.#dropped, count: 1 };
|
|
232
|
+
}
|
|
233
|
+
/** The next batch's fingerprints, oldest first, capped at `maxBatch`. */
|
|
234
|
+
batch() {
|
|
235
|
+
return this.#items.slice(0, this.maxBatch).map((item) => item.fingerprint);
|
|
236
|
+
}
|
|
237
|
+
/** How many times a live fingerprint has been seen, or 0 when it is not queued. */
|
|
238
|
+
countOf(fingerprintKey) {
|
|
239
|
+
for (const item of this.#items)
|
|
240
|
+
if (item.fingerprint === fingerprintKey)
|
|
241
|
+
return item.count;
|
|
242
|
+
return 0;
|
|
243
|
+
}
|
|
244
|
+
/** Drop the first `n` events — called after the sink accepted them. Never underflows. */
|
|
245
|
+
ack(n) {
|
|
246
|
+
this.#items = this.#items.slice(n);
|
|
247
|
+
return { size: this.#items.length };
|
|
248
|
+
}
|
|
249
|
+
/** Revoked consent drops everything pending, and the drop is NOT counted: those events were
|
|
250
|
+
* never the sink's to know about. */
|
|
251
|
+
clear() {
|
|
252
|
+
this.#items = [];
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
//# sourceMappingURL=telemetry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../src/telemetry.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,+FAA+F;AAC/F,8FAA8F;AAC9F,qGAAqG;AACrG,EAAE;AACF,8FAA8F;AAC9F,gGAAgG;AAChG,gGAAgG;AAChG,yEAAyE;AACzE,EAAE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M,EAAE,OAAO,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;IACjF,CAAC;IAED,yEAAyE;IACzE,KAAK;QACH,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC7E,CAAC;IAED,mFAAmF;IACnF,OAAO,CAAC,cAAsB;QAC5B,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,MAAM;YAAE,IAAI,IAAI,CAAC,WAAW,KAAK,cAAc;gBAAE,OAAO,IAAI,CAAC,KAAK,CAAC;QAC3F,OAAO,CAAC,CAAC;IACX,CAAC;IAED,yFAAyF;IACzF,GAAG,CAAC,CAAS;QACX,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACnC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;IACtC,CAAC;IAED;0CACsC;IACtC,KAAK;QACH,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;IACnB,CAAC;CACF"}
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
export interface TransformArg {
|
|
2
|
+
n: number;
|
|
3
|
+
unit: string;
|
|
4
|
+
}
|
|
5
|
+
export interface TransformFn {
|
|
6
|
+
name: string;
|
|
7
|
+
args: TransformArg[];
|
|
8
|
+
}
|
|
9
|
+
/** A plane transform taken apart the way a graphics layer applies it, about the top left corner. */
|
|
10
|
+
export interface TransformDecomposition {
|
|
11
|
+
translateX: number;
|
|
12
|
+
translateY: number;
|
|
13
|
+
scaleX: number;
|
|
14
|
+
scaleY: number;
|
|
15
|
+
rotation: number;
|
|
16
|
+
skewX: number;
|
|
17
|
+
}
|
|
18
|
+
export declare const TRANSFORM_IDENTITY: readonly number[];
|
|
19
|
+
/** The function list of a `transform` value: null when malformed, empty for `none`. */
|
|
20
|
+
export declare function parseTransformList(source: string): TransformFn[] | null;
|
|
21
|
+
/**
|
|
22
|
+
* THE TRANSFORM AN ELEMENT DECLARES, as a function list the paint layer can compose.
|
|
23
|
+
*
|
|
24
|
+
* `transform` wins outright when it is there: a stylesheet's own declaration, or the frame a
|
|
25
|
+
* running keyframe sampled, REPLACES the base value, which is what CSS says an animation does to
|
|
26
|
+
* the property it animates. Otherwise the legacy paint attributes fold into the same list.
|
|
27
|
+
*/
|
|
28
|
+
export declare function transformListFromAttributes(attributes: Record<string, string | undefined>): TransformFn[] | null;
|
|
29
|
+
/**
|
|
30
|
+
* The same fold as ONE CSS DECLARATION VALUE, for a renderer that hands the string to a parser it
|
|
31
|
+
* already has. The web is that renderer: a browser composes its own transforms, so a declared
|
|
32
|
+
* `transform` rides through verbatim and only the legacy attributes need folding. Keeping this
|
|
33
|
+
* path free of the parser is what keeps the transform algebra out of an embed's bytes, where the
|
|
34
|
+
* G10 widget law leaves no room for a second one.
|
|
35
|
+
*/
|
|
36
|
+
export declare function transformDeclarationFromAttributes(attributes: Record<string, string | undefined>): string | null;
|
|
37
|
+
/** The canonical spelling of a function list; an empty list spells `none`. */
|
|
38
|
+
export declare function normalizeTransform(fns: readonly TransformFn[]): string;
|
|
39
|
+
/** The matrix of a function list about the box's top left corner, or null for an unknown function. */
|
|
40
|
+
export declare function transformMatrix(fns: readonly TransformFn[], width: number, height: number): number[] | null;
|
|
41
|
+
/** The matrix about an origin inside the box: `translate(origin) * functions * translate(-origin)`. */
|
|
42
|
+
export declare function transformMatrixAbout(fns: readonly TransformFn[], width: number, height: number, originX: number, originY: number): number[] | null;
|
|
43
|
+
/**
|
|
44
|
+
* The `transform-origin` of a box in points: the DSX words (logical, flipped under RTL), the CSS
|
|
45
|
+
* words (physical), one or two lengths or percentages; anything else is the centre, which is
|
|
46
|
+
* CSS's initial value.
|
|
47
|
+
*/
|
|
48
|
+
export declare function transformOrigin(value: string | undefined | null, width: number, height: number, rtl: boolean): [number, number];
|
|
49
|
+
/** True when the matrix moves nothing out of the plane: no z terms, no perspective. */
|
|
50
|
+
export declare function isAffineTransform(m: readonly number[]): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* The nine numbers of a flat element's projection: a plane's points have no z, so the third row
|
|
53
|
+
* and column fall away and the perspective terms stay. x' = p0 x + p3 y + p6,
|
|
54
|
+
* y' = p1 x + p4 y + p7, w' = p2 x + p5 y + p8.
|
|
55
|
+
*/
|
|
56
|
+
export declare function projectTransform(m: readonly number[]): number[];
|
|
57
|
+
/** The plane decomposition of an affine matrix, or null when it leaves the plane or collapses an axis. */
|
|
58
|
+
export declare function decomposeTransform(m: readonly number[]): TransformDecomposition | null;
|
|
59
|
+
/**
|
|
60
|
+
* The bounds of a box after a transform, relative to the box's own top left corner: the
|
|
61
|
+
* browser's `getBoundingClientRect` of a transformed element. A corner behind the viewer keeps
|
|
62
|
+
* its unprojected place rather than exploding.
|
|
63
|
+
*/
|
|
64
|
+
export declare function transformBounds(m: readonly number[], width: number, height: number): [number, number, number, number];
|
|
65
|
+
/** True when the element shows its back: the z axis points away from the viewer. */
|
|
66
|
+
export declare function transformShowsBackface(m: readonly number[]): boolean;
|
|
67
|
+
/**
|
|
68
|
+
* The depth of the `perspective` PROPERTY, in pixels, or null for `none`.
|
|
69
|
+
*
|
|
70
|
+
* This is not the `perspective()` transform FUNCTION: the function sits in the element's own
|
|
71
|
+
* matrix, while the property builds a matrix that applies to the element's CHILDREN, about
|
|
72
|
+
* `perspective-origin`. Measured in Chromium 149.0.7827.55, Firefox 151.0 and
|
|
73
|
+
* WebKit 26.5: `none` and any negative length compute to `none`, `0` computes to `0px`, and a
|
|
74
|
+
* relative length is already absolute by the time it reaches this file.
|
|
75
|
+
*
|
|
76
|
+
* Zero is DELIBERATELY not a depth here. The three browsers do not agree on what a zero or
|
|
77
|
+
* sub-pixel depth draws (Chromium and WebKit clamp to one pixel and collapse the box to a speck,
|
|
78
|
+
* Firefox projects it to hundreds of thousands of pixels), so there is no standard answer for the
|
|
79
|
+
* native lanes to copy and this function answers null rather than inventing one.
|
|
80
|
+
* https://www.w3.org/TR/css-transforms-2/#perspective-property
|
|
81
|
+
*/
|
|
82
|
+
export declare function perspectiveDepth(value: string | null | undefined): number | null;
|
|
83
|
+
/**
|
|
84
|
+
* THE DEPTH AS THE PARENT STAMP CARRIES IT, which is not CSS text. The bridge resolves the
|
|
85
|
+
* `perspective` property to points once, on the element that declares it (CssBridge
|
|
86
|
+
* `a["perspective"]`), and the container placement loops stamp that number on every child
|
|
87
|
+
* (`-dsx-parent-perspective`), so what reaches a child's paint ladder is a bare count of points
|
|
88
|
+
* and `perspectiveDepth` above rightly refuses it: a bare number is not a CSS length. Zero and
|
|
89
|
+
* anything negative are still not a depth, for the reason `perspectiveDepth` gives.
|
|
90
|
+
* https://www.w3.org/TR/css-transforms-2/#perspective-property
|
|
91
|
+
*/
|
|
92
|
+
export declare function perspectivePoints(stamped: string | null | undefined): number | null;
|
|
93
|
+
/**
|
|
94
|
+
* The `perspective-origin` of a box in pixels. The grammar is `transform-origin`'s two
|
|
95
|
+
* dimensional half and the initial value is the centre, so the origin parser above IS this
|
|
96
|
+
* parser; the name exists so a reader of the paint layer sees which property is being asked for.
|
|
97
|
+
* Measured in all three browsers: `left top` computes `0px 0px`, `25% 75%` on a 200x80 box
|
|
98
|
+
* computes `50px 60px`, and a single `10px` computes `10px 40px`.
|
|
99
|
+
* https://www.w3.org/TR/css-transforms-2/#perspective-origin-property
|
|
100
|
+
*/
|
|
101
|
+
export declare function perspectiveOrigin(value: string | null | undefined, width: number, height: number): [number, number];
|
|
102
|
+
/**
|
|
103
|
+
* THE MATRIX A PARENT'S `perspective` APPLIES TO A CHILD: the perspective matrix conjugated by
|
|
104
|
+
* the perspective origin, `translate(origin) * perspective(depth) * translate(-origin)`.
|
|
105
|
+
*
|
|
106
|
+
* The origin is given in the CHILD's own coordinates, which is the parent's perspective origin
|
|
107
|
+
* minus where the child sits inside the parent, because that is the frame the child's own matrix
|
|
108
|
+
* is already written in. Compose it on the LEFT of the child's matrix: a `perspective: 200px`
|
|
109
|
+
* parent over a child that translates 50 pixels toward the viewer scales the child by
|
|
110
|
+
* 200 / (200 - 50), which is what all three browsers drew (a 200x80 box became 266.667x106.667,
|
|
111
|
+
* exactly, in Chromium 149, Firefox 151 and WebKit 26.5).
|
|
112
|
+
* https://www.w3.org/TR/css-transforms-2/#perspective-matrix
|
|
113
|
+
*/
|
|
114
|
+
export declare function perspectiveMatrix(depth: number, originX: number, originY: number): number[];
|
|
115
|
+
/**
|
|
116
|
+
* `transform-style`, as the two words CSS has. Anything else is the initial value: a stylesheet
|
|
117
|
+
* that misspells the word gets a flattening context, not a dropped element.
|
|
118
|
+
* https://www.w3.org/TR/css-transforms-2/#transform-style-property
|
|
119
|
+
*/
|
|
120
|
+
export declare function transformStyleWord(value: string | null | undefined): string;
|
|
121
|
+
/**
|
|
122
|
+
* One member of the CSS grouping property set: the property, how its value is read, and the
|
|
123
|
+
* values that reading compares against. `kind` is one of `otherThan`, `oneOf`, `belowOne`,
|
|
124
|
+
* `tokenAny` and `namesGroupingProperty`, described in the corpus beside the set itself.
|
|
125
|
+
*/
|
|
126
|
+
export type GroupingRule = {
|
|
127
|
+
readonly property: string;
|
|
128
|
+
readonly kind: string;
|
|
129
|
+
readonly values: readonly string[];
|
|
130
|
+
};
|
|
131
|
+
export declare const GROUPING_PROPERTY_RULES: readonly GroupingRule[];
|
|
132
|
+
/**
|
|
133
|
+
* True when a `transform-style: preserve-3d` element is forced to flatten anyway because it
|
|
134
|
+
* carries a grouping property (css-transforms-2 section 7.1). The MEMBERS are the generated
|
|
135
|
+
* table above; this is only the reading of the five rule kinds, so a member is added to the
|
|
136
|
+
* corpus and never to three languages.
|
|
137
|
+
* https://www.w3.org/TR/css-transforms-2/#grouping-property-values
|
|
138
|
+
*/
|
|
139
|
+
export declare function flattensDespitePreserve3d(decls: Record<string, string | undefined>): boolean;
|
|
140
|
+
/**
|
|
141
|
+
* THE USED VALUE of `transform-style`: the word the author declared, forced to `flat` when the
|
|
142
|
+
* element also carries one of the grouping property values. An element whose used value is
|
|
143
|
+
* `preserve-3d` EXTENDS the 3D rendering context it participates in rather than establishing a
|
|
144
|
+
* flat plane of its own, so this one answer decides whether a descendant's z survives. Read from
|
|
145
|
+
* the RESOLVED STYLE and never from a table of tags.
|
|
146
|
+
* https://www.w3.org/TR/css-transforms-2/#transform-style-property
|
|
147
|
+
*/
|
|
148
|
+
export declare function usedTransformStyle(value: string | null | undefined, decls: Record<string, string | undefined>): string;
|
|
149
|
+
/**
|
|
150
|
+
* THE FLATTENING MATRIX of CSS Transforms 2 section 4.1: the identity with its third column
|
|
151
|
+
* removed. A `flat` element renders its descendants into a plane and then places that plane, so a
|
|
152
|
+
* descendant's own z must reach neither the projection nor the depth, while the element's OWN z,
|
|
153
|
+
* which lives in the translation column, still travels through the viewing distance its context
|
|
154
|
+
* opened. Composing this on the right of the element's matrix is exactly that: a descendant point
|
|
155
|
+
* (x, y, z) arrives as (x, y, 0) and the element's own translation is untouched.
|
|
156
|
+
* https://www.w3.org/TR/css-transforms-2/#3d-rendering-contexts
|
|
157
|
+
*/
|
|
158
|
+
export declare function flatteningMatrix(): number[];
|
|
159
|
+
/** The same matrix with everything a descendant's z could say to it removed. */
|
|
160
|
+
export declare function flattenTransform(m: readonly number[]): number[];
|
|
161
|
+
/**
|
|
162
|
+
* ONE STEP OF THE 3D RENDERING CONTEXT, from the accumulated matrix of the parent to the
|
|
163
|
+
* accumulated matrix of the child, both written in the context root's coordinates: where the child
|
|
164
|
+
* sits inside the parent, then the child's own matrix. A parent whose used transform-style is
|
|
165
|
+
* `flat` flattens first, which is what stops the child's z at that boundary; a parent that
|
|
166
|
+
* preserves 3D passes the space through untouched, which is what makes a grandchild's z compose
|
|
167
|
+
* with its grandparent's.
|
|
168
|
+
* https://www.w3.org/TR/css-transforms-2/#accumulated-3d-transformation-matrix-computation
|
|
169
|
+
*/
|
|
170
|
+
export declare function accumulateTransform(parent: readonly number[], offsetX: number, offsetY: number, own: readonly number[] | null, parentPreserves3d: boolean): number[];
|
|
171
|
+
/**
|
|
172
|
+
* THE DEPTH an accumulated matrix puts an element at: the z its own origin lands on, which is the
|
|
173
|
+
* translation column's third number. CSS Transforms 2 section 4.1 sorts the elements of one 3D
|
|
174
|
+
* rendering context by their position in that space rather than by document order, and this is the
|
|
175
|
+
* number that position is read from.
|
|
176
|
+
*/
|
|
177
|
+
export declare function transformDepth(m: readonly number[]): number;
|
|
178
|
+
/**
|
|
179
|
+
* THE PAINT ORDER of one 3D rendering context: the indices of its participants back to front, a
|
|
180
|
+
* STABLE sort so two elements at the same depth keep the order the document gave them, which is
|
|
181
|
+
* what CSS falls back to when the depths tie.
|
|
182
|
+
*/
|
|
183
|
+
export declare function depthOrder(depths: readonly number[]): number[];
|
|
184
|
+
/**
|
|
185
|
+
* THE 4x4 WHOSE PROJECTION IS THIS HOMOGRAPHY: `projectTransform`'s inverse for a plane. A toolkit
|
|
186
|
+
* whose canvas matrix is 3x3 takes its transforms as homographies, so a matrix computed in 3D has
|
|
187
|
+
* to travel back out through this one.
|
|
188
|
+
*/
|
|
189
|
+
export declare function unprojectTransform(p: readonly number[]): number[];
|
|
190
|
+
/** A plane translation as a homography, ordered like `projectTransform`. */
|
|
191
|
+
export declare function translationProjection(x: number, y: number): number[];
|
|
192
|
+
/** The product of two homographies, ordered like `projectTransform`. */
|
|
193
|
+
export declare function multiplyProjection(a: readonly number[], b: readonly number[]): number[];
|
|
194
|
+
/**
|
|
195
|
+
* THE HOMOGRAPHY THAT UNDOES ANOTHER, or null when it collapses the plane.
|
|
196
|
+
*
|
|
197
|
+
* A toolkit composes a descendant's transform with every transform its ancestors applied, and a 3D
|
|
198
|
+
* rendering context needs the descendant to land where the SHARED space puts it rather than where
|
|
199
|
+
* that composition would. So each participant applies the RESIDUAL: the inverse of what its
|
|
200
|
+
* ancestors already applied, then the projection its own accumulated matrix asks for. That is the
|
|
201
|
+
* whole trick that lets Compose and SwiftUI, whose canvas and projection effect are both 3x3, hold
|
|
202
|
+
* a real 3D rendering context they have no primitive for.
|
|
203
|
+
*/
|
|
204
|
+
export declare function invertProjection(p: readonly number[]): number[] | null;
|
|
205
|
+
/**
|
|
206
|
+
* `backface-visibility`, as the two words CSS has.
|
|
207
|
+
* https://www.w3.org/TR/css-transforms-2/#backface-visibility-property
|
|
208
|
+
*/
|
|
209
|
+
export declare function backfaceVisibilityWord(value: string | null | undefined): string;
|
|
210
|
+
/**
|
|
211
|
+
* True when this element must not be painted at all: its back is turned and it asked to be
|
|
212
|
+
* hidden when it is. Measured in all three browsers: a `rotateY(180deg)` box with
|
|
213
|
+
* `backface-visibility: hidden` is not the element under its own centre point.
|
|
214
|
+
*/
|
|
215
|
+
export declare function hidesBackface(m: readonly number[], visibility: string | null | undefined): boolean;
|
|
216
|
+
/**
|
|
217
|
+
* `will-change`, normalised the way the browsers serialize it: the keyword `auto`, or the comma
|
|
218
|
+
* separated list of idents in the author's order, one space after each comma. It is a RENDERING
|
|
219
|
+
* HINT and nothing else, so no renderer may draw differently for it; the native lanes carry it as
|
|
220
|
+
* a no-op with a platform parity row saying so.
|
|
221
|
+
* https://www.w3.org/TR/css-will-change-1/#will-change
|
|
222
|
+
*/
|
|
223
|
+
export declare function willChangeList(value: string | null | undefined): string;
|
|
224
|
+
/** The column major product of two matrices. */
|
|
225
|
+
export declare function multiplyTransform(a: readonly number[], b: readonly number[]): number[];
|
|
226
|
+
/** Four decimals, trailing zeros trimmed, negative zero normalised (MotionCore's rule). */
|
|
227
|
+
export declare function formatTransformNumber(value: number): string;
|
|
228
|
+
//# sourceMappingURL=transform-core.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transform-core.d.ts","sourceRoot":"","sources":["../src/transform-core.ts"],"names":[],"mappings":"AAiBA,MAAM,WAAW,YAAY;IAC3B,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,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